[cdo] 53/84: upstream 1.6.4

Alastair McKinstry mckinstry at moszumanska.debian.org
Sat Jun 13 16:48:36 UTC 2015


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

mckinstry pushed a commit to branch master
in repository cdo.

commit d21d2539d860baa587925a3584772f03c1f66214
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Sat Jul 5 14:18:42 2014 +0100

    upstream 1.6.4
---
 ChangeLog                                 |  729 ++--
 Makefile.in                               |  334 +-
 NEWS                                      |   21 +-
 OPERATORS                                 |    3 +
 aclocal.m4                                |  737 ++--
 cdo.spec                                  |    2 +-
 config/compile                            |  232 +-
 config/config.guess                       |  410 ++-
 config/config.sub                         |  241 +-
 config/default                            |   46 +-
 config/depcomp                            |  531 ++-
 config/install-sh                         |   29 +-
 config/ltmain.sh                          | 2494 ++++++++-----
 config/missing                            |  461 +--
 config/mkinstalldirs                      |    9 +-
 config/tap-driver.sh                      |  652 ++++
 configure                                 | 2470 +++++++++----
 configure.ac                              |   27 +-
 contrib/Makefile.in                       |  119 +-
 contrib/cdoCompletion.bash                |   15 +-
 contrib/cdoCompletion.tcsh                |   15 +-
 contrib/cdoCompletion.zsh                 |   15 +-
 doc/cdo.pdf                               |  Bin 1436698 -> 1452250 bytes
 doc/cdo_refcard.pdf                       |  Bin 96405 -> 96113 bytes
 libcdi/ChangeLog                          |  614 ++--
 libcdi/Makefile.in                        |  334 +-
 libcdi/NEWS                               |    7 +
 libcdi/aclocal.m4                         |  737 ++--
 libcdi/app/Makefile.in                    |  252 +-
 libcdi/app/cdi.c                          |  150 +-
 libcdi/app/printinfo.h                    |  361 +-
 libcdi/config/compile                     |  232 +-
 libcdi/config/config.guess                |  410 ++-
 libcdi/config/config.sub                  |  241 +-
 libcdi/config/default                     |   14 +-
 libcdi/config/depcomp                     |  531 ++-
 libcdi/config/install-sh                  |   29 +-
 libcdi/config/ltmain.sh                   |    3 +-
 libcdi/config/missing                     |  461 +--
 libcdi/config/mkinstalldirs               |    9 +-
 libcdi/configure                          |  856 +++--
 libcdi/configure.ac                       |    8 +-
 libcdi/doc/cdi_cman.pdf                   |  Bin 453981 -> 456965 bytes
 libcdi/doc/cdi_fman.pdf                   |  Bin 494569 -> 497919 bytes
 libcdi/examples/Makefile.in               |  302 +-
 libcdi/examples/cdi_write.c               |    4 +-
 libcdi/examples/cdi_write_ens.c           |    2 +-
 libcdi/examples/cdi_write_hybrid.c        |    8 +-
 libcdi/examples/pio/Makefile.in           |  268 +-
 libcdi/examples/pio/collectData.c         |   12 +-
 libcdi/examples/pio/collectDataNStreams.c |   13 +-
 libcdi/interfaces/Makefile.in             |  292 +-
 libcdi/interfaces/cdi.cpp                 |    6 +
 libcdi/m4/acx_options.m4                  |    2 +-
 libcdi/m4/libtool.m4                      |  265 +-
 libcdi/m4/ltoptions.m4                    |   19 +-
 libcdi/src/Makefile.am                    |   13 +-
 libcdi/src/Makefile.in                    |  298 +-
 libcdi/src/basetime.c                     |    3 +-
 libcdi/src/basetime.h                     |    5 +-
 libcdi/src/cdf_int.c                      |   16 +-
 libcdi/src/cdf_int.h                      |    7 +-
 libcdi/src/cdi.h                          |  166 +-
 libcdi/src/cdi.inc                        |   22 +-
 libcdi/src/cdiFortran.c                   |    4 +
 libcdi/src/cdi_cksum.c                    |    2 +-
 libcdi/src/cdi_int.c                      |   67 +-
 libcdi/src/cdi_int.h                      |   36 +-
 libcdi/src/cdilib.c                       | 5537 ++++++++++++++++-------------
 libcdi/src/cdipioFortran.c                |    8 +-
 libcdi/src/cfortran.h                     |   12 +-
 libcdi/src/cgribexlib.c                   |  186 +-
 libcdi/src/cksum.c                        |   54 +-
 libcdi/src/config.h.in                    |    3 -
 libcdi/src/dmemory.c                      |   44 +-
 libcdi/src/dmemory.h                      |   22 +-
 libcdi/src/extralib.c                     |   38 +-
 libcdi/src/file.c                         |   20 +-
 libcdi/src/gaussgrid.c                    |   16 +-
 libcdi/src/gaussgrid.h                    |    2 +-
 libcdi/src/grid.c                         |  278 +-
 libcdi/src/grid.h                         |   10 +-
 libcdi/src/ieglib.c                       |   22 +-
 libcdi/src/institution.c                  |  206 +-
 libcdi/src/institution.h                  |    6 +-
 libcdi/src/mo_cdi.f90                     |  460 ++-
 libcdi/src/model.c                        |  108 +-
 libcdi/src/model.h                        |    4 +-
 libcdi/src/namespace.c                    |   28 +-
 libcdi/src/namespace.h                    |    2 +-
 libcdi/src/pio.c                          |   30 +-
 libcdi/src/pio.h                          |    8 +-
 libcdi/src/pio_cdf_int.c                  |    3 +-
 libcdi/src/pio_client.c                   |    6 +-
 libcdi/src/pio_comm.c                     |   27 +-
 libcdi/src/pio_comm.h                     |    3 -
 libcdi/src/pio_dbuffer.c                  |    2 -
 libcdi/src/pio_impl.h                     |   28 +-
 libcdi/src/pio_interface.c                |   70 +-
 libcdi/src/pio_interface.h                |    4 -
 libcdi/src/pio_list_set.c                 |    7 +-
 libcdi/src/pio_mpinonb.c                  |   13 +-
 libcdi/src/pio_posixasynch.c              |   10 +-
 libcdi/src/pio_posixfpguardsendrecv.c     |    5 +-
 libcdi/src/pio_posixnonb.c                |    3 -
 libcdi/src/pio_record_send.c              |    5 +-
 libcdi/src/pio_rpc.h                      |    3 -
 libcdi/src/pio_serialize.c                |   18 +-
 libcdi/src/pio_serialize.h                |   10 +-
 libcdi/src/pio_server.c                   |   59 +-
 libcdi/src/pio_server.h                   |    6 +-
 libcdi/src/pio_util.c                     |   21 +-
 libcdi/src/pio_util.h                     |   32 +-
 libcdi/src/resource_handle.c              |  358 +-
 libcdi/src/resource_handle.h              |   26 +-
 libcdi/src/resource_unpack.c              |   31 +-
 libcdi/src/resource_unpack.h              |    2 -
 libcdi/src/servicelib.c                   |   32 +-
 libcdi/src/stream.c                       |  252 +-
 libcdi/src/stream_cdf.c                   | 1201 ++++---
 libcdi/src/stream_cgribex.c               |  144 +-
 libcdi/src/stream_ext.c                   |   39 +-
 libcdi/src/stream_grb.c                   |    2 +-
 libcdi/src/stream_gribapi.c               |  507 +--
 libcdi/src/stream_ieg.c                   |   56 +-
 libcdi/src/stream_record.c                |    6 +-
 libcdi/src/stream_srv.c                   |   39 +-
 libcdi/src/stream_var.c                   |   11 +-
 libcdi/src/taxis.c                        |  581 ++-
 libcdi/src/taxis.h                        |   49 +-
 libcdi/src/varscan.c                      |   44 +-
 libcdi/src/varscan.h                      |    2 +-
 libcdi/src/version.c                      |    6 +-
 libcdi/src/vlist.c                        |   94 +-
 libcdi/src/vlist.h                        |   11 +-
 libcdi/src/vlist_att.c                    |   28 +-
 libcdi/src/vlist_var.c                    |  126 +-
 libcdi/src/vlist_var.h                    |    1 +
 libcdi/src/zaxis.c                        |  543 ++-
 libcdi/src/zaxis.h                        |    5 +
 libcdi/tests/Makefile.am                  |    2 +-
 libcdi/tests/Makefile.in                  |  332 +-
 libcdi/tests/cksum_verify.c               |    4 +
 libcdi/tests/deco2d_model.c               |    1 -
 libcdi/tests/pio_write_run.in             |    5 +-
 libcdi/tests/test_resource_copy.c         |    8 +-
 m4/acx_options.m4                         |   10 +-
 m4/libtool.m4                             | 1305 +++++--
 m4/ltoptions.m4                           |   19 +-
 m4/ltversion.m4                           |   12 +-
 src/Adisit.c                              |   10 +-
 src/Arith.c                               |   16 +-
 src/Arithc.c                              |    4 +-
 src/Arithdays.c                           |    2 +-
 src/Arithlat.c                            |    4 +-
 src/CDIread.c                             |    4 +-
 src/CDItest.c                             |    6 +-
 src/CDIwrite.c                            |    8 +-
 src/Cat.c                                 |    2 +-
 src/Change.c                              |   25 +-
 src/Change_e5slm.c                        |    8 +-
 src/Cloudlayer.c                          |   10 +-
 src/Command.c                             |   15 +-
 src/Comp.c                                |   10 +-
 src/Compc.c                               |    4 +-
 src/Complextorect.c                       |    6 +-
 src/Cond.c                                |   14 +-
 src/Cond2.c                               |   16 +-
 src/Condc.c                               |    4 +-
 src/Consecstat.c                          |    6 +-
 src/Copy.c                                |    4 +-
 src/Deltime.c                             |   10 +-
 src/Derivepar.c                           |  161 +-
 src/Detrend.c                             |   26 +-
 src/Diff.c                                |   96 +-
 src/Duplicate.c                           |    8 +-
 src/EOFs.c                                |  102 +-
 src/EcaIndices.c                          |   18 +-
 src/Echam5ini.c                           |   72 +-
 src/Enlarge.c                             |    4 +-
 src/Enlargegrid.c                         |   18 +-
 src/Ensstat.c                             |   12 +-
 src/Ensstat3.c                            |   44 +-
 src/Ensval.c                              |   34 +-
 src/Eof3d.c                               |   77 +-
 src/Eofcoeff.c                            |   64 +-
 src/Eofcoeff3d.c                          |   68 +-
 src/Exprf.c                               |   18 +-
 src/FC.c                                  |    6 +-
 src/Filedes.c                             |   18 +-
 src/Fillmiss.c                            |   12 +-
 src/Filter.c                              |  377 +-
 src/Fldrms.c                              |    6 +-
 src/Fldstat.c                             |    4 +-
 src/Fldstat2.c                            |    6 +-
 src/Fourier.c                             |   46 +-
 src/Gather.c                              |   36 +-
 src/Gengrid.c                             |    6 +-
 src/Gradsdes.c                            |   44 +-
 src/Gridboxstat.c                         |   44 +-
 src/Gridcell.c                            |    8 +-
 src/Harmonic.c                            |   16 +-
 src/Hi.c                                  |    6 +-
 src/Histogram.c                           |   16 +-
 src/Importamsr.c                          |    6 +-
 src/Importbinary.c                        |   31 +-
 src/Importcmsaf.c                         |   47 +-
 src/Importobs.c                           |    8 +-
 src/Info.c                                |   70 +-
 src/Input.c                               |    6 +-
 src/Intgrid.c                             |   36 +-
 src/Intgridtraj.c                         |   14 +-
 src/Intlevel.c                            |   28 +-
 src/Intlevel3d.c                          |   46 +-
 src/Intntime.c                            |   24 +-
 src/Inttime.c                             |   22 +-
 src/Intyear.c                             |    8 +-
 src/Invert.c                              |   28 +-
 src/Invertlev.c                           |   18 +-
 src/Isosurface.c                          |   12 +-
 src/Maggraph.c                            |   42 +-
 src/Magplot.c                             |   14 +-
 src/Magvector.c                           |    8 +-
 src/Makefile.am                           |   22 +-
 src/Makefile.in                           | 4617 ++++++++++++------------
 src/Maskbox.c                             |   14 +-
 src/Mastrfu.c                             |   16 +-
 src/Math.c                                |    6 +-
 src/Merge.c                               |   10 +-
 src/Mergegrid.c                           |   18 +-
 src/Mergetime.c                           |    4 +-
 src/Merstat.c                             |    6 +-
 src/Monarith.c                            |   12 +-
 src/Mrotuv.c                              |   28 +-
 src/Mrotuvb.c                             |   28 +-
 src/Output.c                              |    8 +-
 src/Outputgmt.c                           |   34 +-
 src/Pack.c                                |    6 +-
 src/Pinfo.c                               |    4 +-
 src/Pressure.c                            |   24 +-
 src/Regres.c                              |    8 +-
 src/Remap.c                               |  671 ++--
 src/Remapeta.c                            |  158 +-
 src/Replace.c                             |   18 +-
 src/Replacevalues.c                       |    2 +-
 src/Rhopot.c                              |    8 +-
 src/Rotuv.c                               |   16 +-
 src/Runpctl.c                             |   10 +-
 src/Runstat.c                             |   18 +-
 src/SSOpar.c                              |   32 +-
 src/Scatter.c                             |   26 +-
 src/Seascount.c                           |    6 +-
 src/Seaspctl.c                            |   12 +-
 src/Seasstat.c                            |   10 +-
 src/Selbox.c                              |   92 +-
 src/Select.c                              |   47 +-
 src/Seloperator.c                         |    2 +-
 src/Seltime.c                             |   48 +-
 src/Selvar.c                              |    4 +-
 src/Set.c                                 |    9 +-
 src/Setbox.c                              |    4 +-
 src/Setgatt.c                             |    2 +-
 src/Setgrid.c                             |   16 +-
 src/Sethalo.c                             |   54 +-
 src/Setmiss.c                             |    2 +-
 src/Setpartab.c                           |   68 +-
 src/Setrcaname.c                          |    2 +-
 src/Settime.c                             |    2 +-
 src/Setzaxis.c                            |    2 +-
 src/Sinfo.c                               |  220 +-
 src/Smooth9.c                             |    8 +-
 src/Sort.c                                |    8 +-
 src/Sorttimestamp.c                       |   10 +-
 src/Specinfo.c                            |    2 +-
 src/Spectral.c                            |    8 +-
 src/Spectrum.c                            |   39 +-
 src/Split.c                               |   42 +-
 src/Splitrec.c                            |    2 +-
 src/Splitsel.c                            |    8 +-
 src/Splittime.c                           |    8 +-
 src/Splityear.c                           |    2 +-
 src/StringUtilities.c                     |    2 +-
 src/Subtrend.c                            |    4 +-
 src/Tee.c                                 |    2 +-
 src/Templates.c                           |    4 +-
 src/Test.c                                |   10 +-
 src/Tests.c                               |    4 +-
 src/Timcount.c                            |    6 +-
 src/Timpctl.c                             |    6 +-
 src/Timselpctl.c                          |    6 +-
 src/Timselstat.c                          |   10 +-
 src/Timsort.c                             |   12 +-
 src/Timstat.c                             |   13 +-
 src/Timstat2.c                            |   23 +-
 src/Timstat3.c                            |   21 +-
 src/Tinfo.c                               |   50 +-
 src/Tocomplex.c                           |    4 +-
 src/Transpose.c                           |    8 +-
 src/Trend.c                               |    8 +-
 src/Trms.c                                |   12 +-
 src/Tstepcount.c                          |    8 +-
 src/Vardup.c                              |   14 +-
 src/Vargen.c                              |   69 +-
 src/Varrms.c                              |   10 +-
 src/Vertint.c                             |  177 +-
 src/Vertstat.c                            |   16 +-
 src/Vertwind.c                            |   18 +-
 src/Wct.c                                 |    4 +-
 src/Wind.c                                |   10 +-
 src/Writegrid.c                           |    2 +-
 src/Writerandom.c                         |   12 +-
 src/YAR.c                                 |  129 +-
 src/Ydayarith.c                           |   12 +-
 src/Ydaypctl.c                            |    6 +-
 src/Ydaystat.c                            |   10 +-
 src/Ydrunpctl.c                           |   10 +-
 src/Ydrunstat.c                           |   12 +-
 src/Yearmonstat.c                         |   10 +-
 src/Yhourarith.c                          |   12 +-
 src/Yhourstat.c                           |   10 +-
 src/Ymonarith.c                           |   12 +-
 src/Ymonpctl.c                            |    6 +-
 src/Ymonstat.c                            |   17 +-
 src/Yseaspctl.c                           |    6 +-
 src/Yseasstat.c                           |   10 +-
 src/Zonstat.c                             |   26 +-
 src/cdo.c                                 |  542 ++-
 src/cdo.h                                 |   16 +-
 src/cdo_getopt.c                          |  248 ++
 src/cdo_getopt.h                          |   43 +
 src/cdo_int.h                             |    6 +-
 src/cdo_vlist.c                           |  160 +-
 src/cdotest.c                             |    6 +-
 src/clipping/area.c                       |  293 +-
 src/clipping/clipping.c                   |  904 +++--
 src/clipping/clipping.h                   |   13 +-
 src/clipping/geometry.h                   |  114 +-
 src/clipping/geometry_tools.c             |  159 +-
 src/clipping/grid.h                       |   14 +-
 src/clipping/grid_cell.c                  |   84 +-
 src/clipping/grid_cell.h                  |    7 +
 src/clipping/intersection.c               |  838 ++++-
 src/clipping/utils.c                      |    4 +
 src/clipping/utils.h                      |   41 +-
 src/color.c                               |    6 +-
 src/config.h.in                           |    3 -
 src/const.h                               |   14 +-
 src/dmemory.h                             |   16 +-
 src/ecacore.c                             |  120 +-
 src/exception.c                           |   16 +
 src/expr.c                                |   28 +-
 src/expr_yacc.c                           |    8 +-
 src/features.c                            |    3 +
 src/field.c                               |    2 +-
 src/field2.c                              |    2 +-
 src/fieldmem.c                            |    8 +-
 src/fieldmer.c                            |    2 +-
 src/fieldzon.c                            |    2 +-
 src/fouriertrans.c                        |   12 +-
 src/grid.c                                |   96 +-
 src/grid_area.c                           |   10 +-
 src/grid_gme.c                            |   26 +-
 src/grid_rot.c                            |   20 +-
 src/griddes.c                             |   68 +-
 src/griddes_h5.c                          |   12 +-
 src/griddes_nc.c                          |   12 +-
 src/hetaeta.c                             |  222 +-
 src/history.c                             |   47 +-
 src/interpol.c                            |  147 +-
 src/job.c                                 |    8 +-
 src/kvlist.c                              |    8 +-
 src/list.c                                |    6 +-
 src/magics_template_parser.c              |    4 +-
 src/merge_sort2.c                         |    4 +-
 src/modules.c                             |   19 +-
 src/namelist.c                            |  101 +-
 src/operator_help.h                       |  222 +-
 src/par_io.c                              |    1 +
 src/percentiles.c                         |   16 +-
 src/pipe.c                                |   24 +-
 src/printinfo.h                           |  371 +-
 src/process.c                             |   82 +-
 src/pstream.c                             |   67 +-
 src/pstream.h                             |    2 +
 src/remap.h                               |   89 +-
 src/remap_bicubic_scrip.c                 |  420 +++
 src/remap_bilinear_scrip.c                |  494 +++
 src/remap_conserv.c                       |  945 +++++
 src/remap_conserv_scrip.c                 | 1945 ++++++++++
 src/remap_distwgt_scrip.c                 |  597 ++++
 src/remap_scrip_io.c                      |   26 +-
 src/remap_search_latbins.c                |  362 +-
 src/remap_search_reg2d.c                  |  185 +
 src/remap_store_link.c                    |  290 ++
 src/remap_store_link.h                    |   35 +
 src/remaplib.c                            | 4792 +------------------------
 src/remapsort.c                           |   12 +-
 src/specspace.c                           |   60 +-
 src/statistic.c                           |   95 +-
 src/statistic.h                           |    4 +-
 src/stdnametable.c                        |   27 +-
 src/stdnametable.h                        |   14 +
 src/table.c                               |    2 +-
 src/text.c                                |   30 +
 src/text.h                                |   28 +
 src/userlog.c                             |   14 +-
 src/util.c                                |   38 +-
 src/util.h                                |    2 +-
 src/zaxis.c                               |   58 +-
 test/Cat.test.in                          |   43 +
 test/Detrend.test.in                      |   72 +
 test/Genweights.test.in                   |   60 +
 test/Gridarea.test.in                     |   37 +
 test/Makefile.am                          |   24 +-
 test/Makefile.in                          |  628 +++-
 test/Remap.test.in                        |   53 +
 test/Select.test.in                       |   53 +
 test/Spectral.test.in                     |   99 +
 test/Timstat.test.in                      |   42 +
 test/Vertint.test.in                      |   37 +
 test/data/Makefile.am                     |    8 +-
 test/data/Makefile.in                     |  126 +-
 test/data/detrend_data                    |  Bin 0 -> 5200 bytes
 test/data/detrend_ref                     |  Bin 0 -> 5200 bytes
 test/data/n16_ycon_ref                    |  Bin 0 -> 8240 bytes
 test/data/n32_ycon_ref                    |  Bin 0 -> 32816 bytes
 test/testStreams.py                       |   46 -
 test/test_Cat.sh                          |   42 -
 test/test_Gridarea.sh                     |   27 -
 test/test_Select.sh                       |   55 -
 test/test_Spectral.sh                     |   65 -
 test/test_Timstat.sh                      |   32 -
 test/test_Vertint.sh                      |   30 -
 433 files changed, 33613 insertions(+), 23390 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f4820c2..06f3637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,245 +1,325 @@
-2014-02-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-06-26  Uwe Schulzweida
+
+	* using CDI library version 1.6.4
+	* Version 1.6.4 released
+
+2014-06-19  Uwe Schulzweida
+
+	* Filter: disable zero-padding
+	* Detrend: added test
+	* added option --use_fftw: used in module filter
+
+2014-06-18  Uwe Schulzweida
+
+	* added option --netcdf_hdr_pad <nbr>: Pad netCDF output header with nbr bytes
+
+2014-06-12  Uwe Schulzweida
+
+	* remapeta: added support for standard name
+
+2014-06-11  Uwe Schulzweida
+
+	* Ymonstat: sorts output by month of year
+
+2014-06-10  Uwe Schulzweida
+
+	* eof3d: set sum weights to 1 (bug fix)
+	* eofcoeff: remove scaling with grid cell area weights (bug fix)
+	* eofcoeff3d: remove scaling with grid cell area weights (bug fix)
+
+2014-06-02  Uwe Schulzweida
+
+	* tinfo: added support for forecast time axis
+
+2014-05-22  Uwe Schulzweida
+
+	* remap.h: define M_PI [Bug #4845]
+
+2014-05-16  Uwe Schulzweida
+
+	* pstream.h: added include of sys/types [Bug #4810]
+
+2014-05-12  Uwe Schulzweida
+
+	* diff: check NaNs
+
+2014-05-09  Uwe Schulzweida
+
+	* make option -W default
+
+2014-04-24  Uwe Schulzweida
+
+	* Filter: segmentation fault (bug fix)
+	* Filter: filters only gridsize-1 grid cells (bug fix)
+	* setltype, chltype: added support for GRIB2
+
+2014-04-15  Uwe Schulzweida
+
+	* select/delete: add support for negative timesteps
+	* seltimestep: add support for negative timesteps [patch from: Etienne Tourigny]
+
+2014-04-14  Uwe Schulzweida
+
+	* New operator: sealevelpressure - sea level pressure
+
+2014-03-14  Uwe Schulzweida
+
+	* remapcon: check for missing values in normalisation
+
+2014-03-10  Uwe Schulzweida
+
+	* added Option -H to do not append to netCDF "history" global attribute
+
+2014-03-03  Uwe Schulzweida
+
+	* Zonstat: bug fix if input stream contains only zonal data
+
+2014-02-19  Uwe Schulzweida
+
+	* Diff: added number of different values to output
+
+2014-02-18  Uwe Schulzweida
 
 	* using CDI library version 1.6.3
 	* Version 1.6.3 released
 
-2014-01-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-29  Uwe Schulzweida
 
 	* gridFromH5file: skipped if attribute >bounds< is defined [Bug #4411]
 
-2014-01-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-24  Uwe Schulzweida
 
 	* expr: select variables by name
 
-2014-01-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-09  Uwe Schulzweida
 
 	* gradsdes: added support for GRIB files >2GB [request: Ingo Kirchner]
 
-2014-01-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-08  Uwe Schulzweida
 
 	* gradsdes: added overloading of streamInqGinfo() (bug fix for GRIB1)
 
-2014-01-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-07  Uwe Schulzweida
 
 	* settaxis: added support for negativ time increment
 
-2014-01-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-03  Uwe Schulzweida
 
 	* Added test/test_Select.sh
 
-2014-01-02 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-02 Uwe Schulzweida
 
 	* gradsdes: changed LCC to LCCR in PDEF definition [Bug #4344]
 
-2013-12-09 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-12-09 Uwe Schulzweida
 
 	* cat: "Segmentation fault" if the output file already exist [Bug #4291]
 
-2013-12-04 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-12-04 Uwe Schulzweida
 
 	* gridFromH5file: set fclose degree to H5F_CLOSE_STRONG [Bug #4272]
 	* cdoDefineGrid: first call gridFromH5file() for HDF tags
 
-2013-11-29 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-29 Uwe Schulzweida
 
 	* eca_csu: added number of csu periods with more than 5days per time period [request: Moritz Maneke]
 	* eca_cfd: added number of cfd periods with more than 5days per time period  [request: Moritz Maneke]
 
-2013-11-29 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-29 Uwe Schulzweida
 
 	* remapdis: optimization for regular 2D source grids
 
-2013-11-28 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-28 Uwe Schulzweida
 
 	* remapbic: optimization for regular 2D source grids
 
-2013-11-27 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-27 Uwe Schulzweida
 
 	* remapbil: optimization for regular 2D source grids
 
-2013-11-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-25  Uwe Schulzweida
 
 	* remapbil: skip explicitly call to sort_add() (weights are sorted implicitly)
 
-2013-11-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-18  Uwe Schulzweida
 
 	* remaplib: cleanup and preparation for opt. reg2d grids
 
-2013-11-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-13  Uwe Schulzweida
 
 	* delete: parameter level does not work [Bug #4216]
 
-2013-11-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-12  Uwe Schulzweida
 
 	* using CDI library version 1.6.2
 	* Version 1.6.2 released
 
-2013-11-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-06  Uwe Schulzweida
 
 	* Added test/test_Remap.sh
 
-2013-10-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-25  Uwe Schulzweida
 
 	* eca_gsl: start date of growing season is wrong if the length of growing season is zero (bug fix) 
 
-2013-10-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-21  Uwe Schulzweida
 
 	* splitmon: added optional parameter to set the format string for the month [Feature #4131]
 	* Sort: added support for multi level variables (bug fix) [report: Irina Fast]
 
-2013-10-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-18  Uwe Schulzweida
 
 	* gridarea: replace cell_area_tri() by huiliers_area()
 	* outputf: make second parameter (nelem) optional
 
-2013-10-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-06  Uwe Schulzweida
 
 	* gridarea: numeric inaccuracy for triangles located directly on the pole (bug fix)
 
-2013-09-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-09-02  Uwe Schulzweida
 
 	* Consecstat: init vars with 0 (bug fix)
 	* Seascount: added support for complex numbers
 	* Timcount: added support for complex numbers
 
-2013-08-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-26  Uwe Schulzweida
 
 	* Timstat: added support for complex numbers
 
-2013-08-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-09  Uwe Schulzweida
 
 	* setgridtype: parameter regular: added support for reduced grids on sub area
 
-2013-08-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-07  Uwe Schulzweida
 
 	* mastrfu: added missing value support
 
-2013-08-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-05  Uwe Schulzweida
 
 	* select: added support for key >timestep_of_year<
 
-2013-08-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-02  Uwe Schulzweida
 
 	* selyear: fixed wrong result for negative years [Bug #3836]
 
-2013-08-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-01  Uwe Schulzweida
 
 	* added support of ASCII grid description for GRID_LAEA
 
-2013-07-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-07-29  Uwe Schulzweida
 
 	* gridGenArea: added warning message if grid cell corner not available
 	* gp2sp: added warning message if gp data not found
 
-2013-07-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-07-08  Uwe Schulzweida
 
 	* split*: use filename extension from input file
 
-2013-06-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-28  Uwe Schulzweida
 
 	* gridCurvilinearToRegular: set tolerance to 1.e-6
 
-2013-06-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-28  Uwe Schulzweida
 
 	* using CDI library version 1.6.1
 	* Version 1.6.1 released
 
-2013-06-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-10  Uwe Schulzweida
 
 	* select: added support for key >minute< [request: Beate Gayer]
 
-2013-06-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-03  Uwe Schulzweida
 
 	* inttime: removes last time step [Bug #3611]
 
-2013-05-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-24  Uwe Schulzweida
 
 	* mrotuvb: added option >noint< to disable the interpolation to the grid cell centre
 
-2013-05-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-14  Uwe Schulzweida
 
 	* scatter: fails with missing values [Bug #3492]
 
-2013-04-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-19  Uwe Schulzweida
 
 	* gradsdes: added support for netCDF files
 
-2013-04-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-18  Uwe Schulzweida
 
 	* Info: add chunking information of netcdf files (only with verbose output) [Feature #3489]
 
-2013-04-17 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-17 Uwe Schulzweida
 
 	* select: added support to expand integer parameter
 	* select: added support for key >hour<
 
-2013-04-10 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-10 Uwe Schulzweida
 
 	* shifttime: wrong result for negative hours and days [Bug #3440]
 	* selmon: month not found for negative years [Bug #3439]
 	* splitmon: month not found for negative years
 
-2013-04-05 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-05 Uwe Schulzweida
 
 	* expr: wrong results if left operand has one level and right operand has more than one level (bug fix) [report: Walter Sauf]
 
-2013-04-02 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-02 Uwe Schulzweida
 
 	* enscrps: wrong result since CDO version 1.5.6 [Bug #3403]
 
-2013-03-19 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-19 Uwe Schulzweida
 
 	* fldcor: check missing value of 2. input file (bug fix) [report: Hans-J�rgen Panitz]
 
-2013-03-14 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-14 Uwe Schulzweida
 
 	* using CDI library version 1.6.0
 	* Version 1.6.0 released
 
-2013-03-01 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-01 Uwe Schulzweida
 
 	* gridarea: set number of timesteps to 0 (bug fix for operator chaining) [report: Dirk Notz]
 
-2013-02-25 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-25 Uwe Schulzweida
 
 	* merge: uses size of the first input file for the output buffer [Bug #3290]
 
-2013-02-22 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-22 Uwe Schulzweida
 
 	* New operator: yearmonmean - yearly mean from monthly data
 
-2013-02-21 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-21 Uwe Schulzweida
 
 	* added cdoDefaultFileType to UNCHANGED_RECORD (bug fix)
 
-2013-02-19 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-19 Uwe Schulzweida
 
 	* masklonlatbox: added support for curvilinear grids
 
-2013-02-09 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-09 Uwe Schulzweida
 
 	* New operator: duplicate  - Duplicates a dataset
 
-2013-02-08 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-08 Uwe Schulzweida
 
 	* sellonlatbox: wrong result with overlapped lonlatbox on curvilinear grids (bug fix) [report: Dirk Notz]
 
-2013-02-06 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-06 Uwe Schulzweida
 
 	* New operator: timselvar1  - Time range variance [Divisor is (n-1)]
 	* New operator: timselstd1  - Time range standard deviation [Divisor is (n-1)]
 	* New operator: runvar1  -  Running variance [Divisor is (n-1)]
 	* New operator: runstd1  -  Running standard deviation [Divisor is (n-1)]
 
-2013-02-05 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-05 Uwe Schulzweida
 
 	* ensrkhisttime: fixed memory fault [https://code.zmaw.de/boards/1/topics/1657]
 
-2013-02-04 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-04 Uwe Schulzweida
 
 	* Added CDO option -W to print extra warning messages
 
-2013-01-30 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-30 Uwe Schulzweida
 
 	* New operator: ymonvar1    - Multi-year monthly variance [Divisor is (n-1)]
 	* New operator: ymonstd1    - Multi-year monthly standard deviation [Divisor is(n-1)]
@@ -251,7 +331,7 @@
 	* New operator: ydrunstd1    - Multi-year daily running standard deviation [Divisor is (n-1)]
 
 
-2013-01-25 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-25 Uwe Schulzweida
 
         * New operator: timvar1    - Time variance [Divisor is (n-1)]
 	* New operator: timstd1    - Time standard deviation [Divisor is (n-1)]
@@ -264,161 +344,161 @@
 	* New operator: yearvar1   - Yearly variance [Divisor is (n-1)]
 	* New operator: yearstd1   - Yearly standard deviation [Divisor is (n-1)]
 
-2013-01-23 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-23 Uwe Schulzweida
 
 	* New operator: ensstd1 - Ensemble standard deviation [Divisor is (n-1)]
 	* New operator: ensvar1 - Ensemble variance [Divisor is (n-1)]
 	* New operator: fldstd1 - Field standard deviation [Divisor is (n-1)]
 	* New operator: fldvar1 - Field variance [Divisor is (n-1)]
 
-2013-01-22 Helmut Haak <Helmut.Haak at zmaw.de>
+2013-01-22 Helmut Haak
 
 	* New operator: adisit - Potential temperature to in-situ temperature
 
-2013-01-21 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-21 Uwe Schulzweida
 
 	* New operator: rhopot - Calculates potential density
 	* New operator: select - select fields from an unlimited number of input files
 
-2013-01-17 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-17 Uwe Schulzweida
 
 	* diff: print only records that differ
 	* setpartab: added namelist entry 'delete'
 
-2013-01-11 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-11 Uwe Schulzweida
 
 	* expr: wrong result for operation var1/var2 where var2 = 0
 
-2013-01-10 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-10 Uwe Schulzweida
 
 	* Settime: set number of output timesteps to unlimited
 
-2013-01-08 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-08 Uwe Schulzweida
 
 	* Runstat: added support for time bounds (Bug #3127)
         * runpctl: added support for time bounds
 	* setcalendar: changed CDO calendar names to CF calendar names
                     (standard, proleptic_gregorian, 360_day, 365_day, 366_day)
 
-2012-12-17 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-12-17 Uwe Schulzweida
 
 	* using CDI library version 1.5.9
 	* Version 1.5.9 released
 
-2012-12-06 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-12-06 Uwe Schulzweida
 
 	* PROJ.4: use proj_api.h instead of projects.h
 
-2012-11-27 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-27 Uwe Schulzweida
 
 	* gradsdes: use pstreamInqByteorder() [Bug #3041]
 	* zonSTAT: check whether a zonal grid already exists (bug fix)
 
-2012-11-26 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-26 Uwe Schulzweida
 
 	* added workaround to combine CDO operators with the result of	mergetime, merge, copy, cat, ens<STAT>
 	* Selbox: extend check for latitude indices
 
-2012-11-21 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-21 Uwe Schulzweida
 
 	* enlarge: added missing value support [request: Chris Fletcher]
 
-2012-11-15 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-15 Uwe Schulzweida
 
 	* Split: added parameter swap to swap the position of <obase> and <xxx>  in the filename
 	* splitgrid: bug fix for gridID output in filename <xxx>
 	* splitzaxis: bug fix for zaxisID output in filename <xxx>
 
-2012-11-14 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-14 Uwe Schulzweida
 
 	* cdo: added option -k <chunktype> to set the chunk type to auto, grid or lines
 	* cdo option -z zip: added optional compression level -z zip[_1-9] [request: Etienne Tourigny]
 
-2012-11-08 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-08 Uwe Schulzweida
 
 	* pipeInqVlist: wait MIN_WAIT_CYCLES if processNumsActive() == 1 (bug fix) [report:  Jaison Ambadan]
 
-2012-11-07 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-07 Uwe Schulzweida
 
 	* bug fix for user defined lon/lat grids
              This bug was introduced in CDO version 1.5.8.
 
-2012-10-30 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-30 Uwe Schulzweida
 
 	* using CDI library version 1.5.8
 	* Version 1.5.8 released
 
-2012-10-29 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-29 Uwe Schulzweida
 
 	* mastrfu: set datatype to 32-bit float
 
-2012-10-23 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-23 Uwe Schulzweida
 
 	* Fldstat: set weight to 1 if gridsize is 1
 
-2012-10-19 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-19 Uwe Schulzweida
 
 	* added operator seinfo
 
-2012-10-17 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-17 Uwe Schulzweida
 
 	* eca_rr1: result has wrong long name attribute [Bug #2763]
 	* eca_pd: disabled, use eca_rr1  (same functionallity) [Bug #2763]
 
-2012-10-14 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-14 Uwe Schulzweida
 
 	* added operator tee
 
-2012-10-13 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-13 Uwe Schulzweida
 
 	* remaplaf: fixed bug in binary_search_int()
 
-2012-10-05 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-05 Uwe Schulzweida
 
 	* use read/write timer only for single threaded CDO version [Support #2854]
 
-2012-10-05 Modali Kameswarrao  <modali.kameswarrao at zmaw.de>
+2012-10-05 Modali Kameswarrao
 
 	* Maggraph update
 
-2012-09-25 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-25 Uwe Schulzweida
 
 	* replace: change streamNtsteps() to vlistNtsteps() (bug fix for CDI 1.5.7)
 
-2012-09-13 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-13 Uwe Schulzweida
 
 	* Added support for netCDF4(HDF5) formatted SCRIP grids
 
-2012-09-07 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-07 Uwe Schulzweida
 
 	* Info: changed output format
 	* Diff: changed output format
 
-2012-09-04 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-04 Uwe Schulzweida
 
 	* processDelete: set Process[processID].threadID = 0 (bug fix)
 
-2012-09-03 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-03 Uwe Schulzweida
 
 	* added CDO option -L to lock all I/O calls. This option is neccessary if external I/O libraries like 
 	  netCDF4 (HDF5) were installed without thread-safe support.
 
-2012-08-30 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-08-30 Uwe Schulzweida
 
 	* Sinfo: changed output format
 
-2012-08-28 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-08-28 Uwe Schulzweida
 
 	* using CDI library version 1.5.7 (merged from cdi-pio)
 	* activate pstreamCopyRecord()
 	* Version 1.5.7 released
 
-2012-08-23 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-08-23 Uwe Schulzweida
 
 	* Arith: bug fix for NVARS1 == NVARS2
                     This bug was introduced in CDO version 1.5.6.
 
-2012-07-26 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-26 Uwe Schulzweida
 
 	* Version 1.5.6.1 released
 	* arradd: disable SSE2 optimazation (bug in residual loop)
@@ -430,232 +510,232 @@
 	       - the horizontal grid size is > 1 and not multiple of 8
             This bug was introduced in CDO version 1.5.6.
 
-2012-07-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-23  Uwe Schulzweida
 
 	* using CDI library version 1.5.6
 	* Version 1.5.6 released
 
-2012-07-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-20  Uwe Schulzweida
 
 	* Fixed bug #2605
 
-2012-07-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-17  Uwe Schulzweida
 
 	* Added operator zonrange
 
-2012-07-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-12  Uwe Schulzweida
 
 	* vlistCompare(): added check to compare sorted parameter names
 
-2012-07-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-11  Uwe Schulzweida
 
 	* gradsdes: added support for 64-bit SERVICE, EXTRA and IEG format
 	* import_binary: added support for 64-bit floats via extra OPTION keyword flt64 [request: Tim Bruecher]
 
-2012-07-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-10  Uwe Schulzweida
 
 	* sort_iter: call to sort_par() only for parent <= (nthreads-1)
 	* added remapsort.c
 
-2012-07-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-07  Uwe Schulzweida
 
 	* remaplib::sort_add: use optimized version (speedup +20%)
 
-2012-07-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-03  Uwe Schulzweida
 
 	* userFileOverwrite: accept also a simple 'y' as yes [request: Dirk Notz]
 
-2012-06-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-26  Uwe Schulzweida
 
 	* Arith: added support for 3D masks [request: Ralf M�ller]
 	* pipeInqVlist: wait only 1s and check for other active CDO processes
 
-2012-06-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-25  Uwe Schulzweida
 
 	* Selvar: added check for time constant fields (bug fix) [report: Ralf M�ller]
 	* mastrfu: use grid coordinates from input file
 
-2012-06-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-21  Uwe Schulzweida
 
 	* pstreamCheckDatarange: activate check only if ivals > 0
 
-2012-06-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-15  Uwe Schulzweida
 
 	* ymonmean: removed time bounds if present (bug fix) [Bug #2474]
 	* ymonsub: added support for time bounds (bug fix) [Bug #2475]
 
-2012-06-08  Ralf Mueller     <ralf.mueller at zmaw.de>
+2012-06-08  Ralf Mueller
 
 	* New operator: showunit (Showinfo)
 
-2012-06-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-06  Uwe Schulzweida
 
 	* Sinfo: changed Time entry to Ttype
 	* changed timeID to tsteptype
 
-2012-05-31  Luis Kornblueh  <Luis.Kornblueh at zmaw.de>
+2012-05-31  Luis Kornblueh
 
 	* arradd: SSE2 version (performance +15%)
 
-2012-05-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-29  Uwe Schulzweida
 
 	* Runstat: optimize missing value handling (speedup)
 	* Runstat: OpenMP parallelization over parameter nts
 	* Runstat: added env. RUNSTAT_NOMISS
 
-2012-05-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-29  Uwe Schulzweida
 
 	* input: changed time axis to RELATIVE
 
-2012-05-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-15  Uwe Schulzweida
 
 	* using CDI library version 1.5.5
 	* Version 1.5.5 released
 
-2012-05-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-09  Uwe Schulzweida
 
 	* Ensstat3: nvars undefined (bug fix)
 
-2012-05-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-08  Uwe Schulzweida
 
 	* remap_bilin: using fabs(src_lats[n]) for distance-weighted average (big fix) [report: Renate Brokopf]
 	* remap_bilic: using fabs(src_lats[n]) for distance-weighted average (big fix)
 
-2012-04-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-04-20  Uwe Schulzweida
 
 	* grid.c::gridCurvilinearToRegular: bug fix [report: Ag Stevens]
 	* remaplib: changed warning message for bilinear/bicubic interpolation
 
-2012-04-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-04-17  Uwe Schulzweida
 
 	* Yseasstat: changed timestamp of DJF season to last timestep of February
 
-2012-04-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-04-16  Uwe Schulzweida
 
 	* ml2pl: added support for GRIB2 parameter names [Bug #2252]
 
-2012-03-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-03-14  Uwe Schulzweida
 
 	* pipeInqVlist: changed init of time_to_wait [Bug #2133]
 
-2012-03-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-03-02  Uwe Schulzweida
 
 	* replace: removed debug output [report: K. Houchi]
 
-2012-03-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-03-01  Uwe Schulzweida
 
 	* eca_rr1: missing value not set correctly (bug fix) [report: Hans-Juergen Panitz]
 	* ecacore: fix all missing values
 
-2012-02-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-02-20  Uwe Schulzweida
 
 	* geopotheight: added support for WMO code table
 
-2012-02-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-02-06  Uwe Schulzweida
 
 	* New module: Yhourarith (yhouradd, yhoursub, yhourmul, yhourdiv) [request: Beate Gayer]
 
-2012-02-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-02-01  Uwe Schulzweida
 
 	* mergetime: added env. SKIP_SAME_TIME to skip all double entries of the same timestamp [request: K. Houchi]
 	* Added operator rohpot - potential density for MPIOM (experimental) [request: Helmut Haak]
 
-2012-01-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-30  Uwe Schulzweida
 
 	* using CDI library version 1.5.4
 	* Version 1.5.4 released
 
-2012-01-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-24  Uwe Schulzweida
 
 	* remapcon: added env REMAP_AREA_MIN, to set the minimum area fraction [request: Gernot Geppert]
 
-2012-01-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-23  Uwe Schulzweida
 
 	* remaplaf: using binary search (speedup)
 	* Timstepstat: added support for time bounds
 
-2012-01-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-16  Uwe Schulzweida
 
 	* remaplib: use grid2_bound_box only for conservativ remapping
 
-2012-01-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-09  Uwe Schulzweida
 
 	* setgridtype: added support for grid type lonlat
 
-2012-01-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-05  Uwe Schulzweida
 
 	splitsel: added support for constant fields [Bug #1701]
 	Splittime: added support for constant fields
 
-2011-12-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-12-19  Uwe Schulzweida
 
 	* timpctl: check index of bins (bug fix for NaNs) [report: Christopher Moseley]
 
-2011-12-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-12-15  Uwe Schulzweida
 
 	* pipeInqVlist: use pthread_cond_timedwait to wait 30 sec (bug fix) [report: Carsten Ehbrecht]
 
-2011-12-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-12-13  Uwe Schulzweida
 
 	* pstreamCheckDatarange: use nint() to round smin and smax [report: Kristina Fr�hlich]
 
-2011-11-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-11-16  Uwe Schulzweida
 
 	* Added operator timcovar - covariance over time
 	* Added operator fldcovar - covariance in grid space
 
-2011-10-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-26  Uwe Schulzweida
 
 	* shifttime: added support for time bounds
 	* setvrange: don't set the attribute valid_range
 
-2011-10-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-25  Uwe Schulzweida
 
 	* added operator mod - modulo [request: Swantje Preuschmann]
 
-2011-10-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-20  Uwe Schulzweida
 
 	* using CDI library version 1.5.3
 	* Version 1.5.3 released
 
-2011-10-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-19  Uwe Schulzweida
 
 	* Monarith (monadd, monsub, monmul, mondiv): wrong results for 3D variables (bug fix) [report: Chris Fletcher]
 
-2011-10-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-02  Uwe Schulzweida
 
         * deflate compression with netCDF4 doesn't work (bug fix) [report: Geert Jan van Oldenborgh]
 
-2011-09-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-09-26  Uwe Schulzweida
 
 	* Added operator: muldoy - Multiply with day of year [request: David Gobbett]
 
-2011-09-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-09-19  Uwe Schulzweida
 
 	* eca_cdd, eca_cwd, eca_rr1, eca_sdii: variable parameter [request: Martin Stendel]
 
-2011-09-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-09-16  Uwe Schulzweida
 
 	* gridarea: bug fix for coarse grid cells with lons between 350 and 0 degrees [report: Aiko Voigt]
 
-2011-09-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-09-14  Uwe Schulzweida
 
 	* sellonlatbox: correct lon bounds if necessary (bug fix) [report: Klaus Keuler]
 
-2011-08-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-30  Uwe Schulzweida
 
 	* ifthenelse: uses only the first time step of the first input file (bug fix) [report: Ronny Petrik]
 
-2011-08-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-22  Uwe Schulzweida
 
 	* using CDI library version 1.5.2
 	* Version 1.5.2 released
 
-2011-08-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-19  Uwe Schulzweida
 
 	* ymon<stat>: preserve time axis attributes (big fix) [report: Martin Juckes]
 
-2011-08-12  Cedrick Ansorge  <Cedrick.Ansorge at zmaw.de>
+2011-08-12  Cedrick Ansorge
 
         * eof, eoftime, eofspatial, eof3d - Empirical Orthogonal Functions:bug fix [report: Eileen Dahms and Frank Lunkeit]
             There was a bug in the calculation of the Frobenius norm, which has only been triggered in some cases
@@ -663,106 +743,106 @@
             and their absolute is 1. The default settings for convergence have been changed to be more conservative:
             CDO_SVD_MODE=jacobi    MAX_JACOBI_ITER=12     FNORM_PRECISION=1.e-12
 
-2011-08-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-12  Uwe Schulzweida
 
 	* setgridtype: compress GME grids [request: Jaison Ambadan]
 
-2011-08-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-11  Uwe Schulzweida
 
         * remapeta: Changed minimum pressure level for condensation from 1000Pa to 0Pa [request: Patrick Joeckel]
                            Use env. REMAPETA_PTOP to set the minimum pressure level for condensation.
 
-2011-08-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-09  Uwe Schulzweida
 
 	* dv2uv: added support for GRIB2 parameter names (d, vo)
 
-2011-08-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-04  Uwe Schulzweida
 
 	* expr: wrong result for expression 'const-var (e.g. 1-var)' (bug fix) [report: Hans-J�rgen Panitz]
 	           This bug was introduced in CDO version 1.5.1
 
-2011-08-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-04  Uwe Schulzweida
 
 	* invertlat: bug fix for CURVILINEAR grids [report: Christine Rademacher]
 	* import_binary: added support for OPTION ZREV (bug fix) [report: Rene Hommel]
 
-2011-08-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-01  Uwe Schulzweida
 
 	* histAddValue: added check for rounding errors
 
-2011-07-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-26  Uwe Schulzweida
 
 	* replace: added support to replace single levels
 	* Vertstat: bug fix for streams with time invariant variables
 
-2011-07-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-12  Uwe Schulzweida
 
 	* using CDI library version 1.5.1
 	* Version 1.5.1 released
 
-2011-07-11  Ralf Mueller  <ralf.mueller at zmaw.de>
+2011-07-11  Ralf Mueller
 
 	* Added operator stdatm: standard atmosphere values for T,PS
 	* Added operator intlevel3d: vertical interpolation to/from 3d vertical coordinates
 
-2011-07-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-04  Uwe Schulzweida
 
 	* Exprf:  wrong result for missing values != (double) -9.e33 (bug fix) [report: Michael Boettinger]
 
-2011-07-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-02  Uwe Schulzweida
 
 	* detrend: added support for time bounds (bug fix) [report: Andy Aschwanden]
 
-2011-07-01  Cedrick.Ansorge <Cedrick.Ansorge at zmaw.de>
+2011-07-01  Cedrick.Ansorge
 
 	* Filter: added support for time bounds (bug fix) [report: Andy Aschwanden]
 
-2011-06-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-06-01  Uwe Schulzweida
 
 	* setgridtype: convert curvilinear to unstructured grids [request: Steffen Tietsche]
 
-2011-05-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-05-25  Uwe Schulzweida
 
 	* Remap: added env REMAP_THRESHHOLD to set the threshhold for coordinate transformation
 
-2011-05-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-05-04  Uwe Schulzweida
 
 	* import_binary: Added support for 1 and 2 byte integer [code from: Karsten ???]
 
-2011-05-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-05-03  Uwe Schulzweida
 
         * bug fix: fldmean and similar operators fail with 1D grid (1 latitude value) [report: Etienne Tourigny]
 
-2011-04-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-04-27  Uwe Schulzweida
 
 	* Added support for netCDF4 classic format; option -f nc4c
 	* eca*: use the input calendar for the output streams (bug fix) [report: Martin Juckes]
 
-2011-04-04  Uwe Schulzweida  <Uwe.Schulzweda at zmaw.de>
+2011-04-04  Uwe Schulzweida
 
 	* intyear: check contents of input files [report: Angelika Heil]
 	* pipeDefTimestep: set EOP if nrecs = 0 (dead lock) [report: Luis Kornnblueh]
 
-2011-03-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-16  Uwe Schulzweida
 
 	* eofspatial: integer overflow; wrong result for grid size > 46340 (bug fix) [report: Hans-J�rgen Panitz]
 	* outputkeys: added keys xind, yind [request: Nils Fischer]
 
-2011-03-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-15  Uwe Schulzweida
 
 	* using CDI library version 1.5.0
 	* Version 1.5.0 released
 
-2011-03-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-12  Uwe Schulzweida
 
 	* Added operator chparam -  Change parameter identifier
 
-2011-03-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-12  Uwe Schulzweida
 
 	* Added operator setparam - Set parameter identifiers
 	* Added operator splitparam - Split parameter identifiers
 
-2011-03-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-11  Uwe Schulzweida
 
 	* Added operator selparam - Select parameters by identifier
 	* Added operator delparam - Delete parameters by identifier
@@ -770,381 +850,380 @@
 	* info:  changed output of code number to parameter identifier
 	* diff:  changed output of code number to parameter identifier
 
-2011-03-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-09  Uwe Schulzweida
 
 	* setgrid: added parameter: dereference
 	* cdo: added option -O to overwrite existing output file [request: Chris Fletscher]
 
-2011-03-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-08  Uwe Schulzweida
 
 	* fldmean: check range of lon/lat bounds [report: Jonas Bhend]
 	* ml2pl: wrong result if input file contains full and half level data (bug fix) [report: Jaison Ambadan]
 
-2011-03-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-07  Uwe Schulzweida
 
 	* gridToCell(GME): set X/Y units to degrees_east/degrees_north [report: Patrick Brockmann]
 
-2011-03-05  Uwe Schulzweida  <Uwe.Schulzweida at zma  int nvars;
-w.de>
+2011-03-05  Uwe Schulzweida
 
 	* expr: added functions abs(), int(), nint(), sqr()
 
-2011-02-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-02-25  Uwe Schulzweida
 
 	* remapbil: fix pole problem with gr15_psi grids [report: Karoline Block]
 
-2011-02-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-02-01  Uwe Schulzweida
 
 	* renamed function var to expr_var [report: Jed Kaplan]
 
-2011-01-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-25  Uwe Schulzweida
 
 	* splitcode: added support for code numbers > 999
 
-2011-01-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-21  Uwe Schulzweida
 
         * changed grid name GRID_CELL to GRID_UNSTRUCTURED
 
-2011-01-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-18  Uwe Schulzweida
 
 	* spcut: only correct results with continuous wave numbers starting at 1 (bug fix)
 
-2011-01-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-15  Uwe Schulzweida
 
 	* remaplib: fix data race in calculation of bin_addr (OpenMP)
 
-2011-01-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-12  Uwe Schulzweida
 
 	* detrend: integer overflow; wrong result for nts > 46340 (bug fix) [report: Torsten Seifert]
 
-2011-01-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-11  Uwe Schulzweida
 
 	* sellonlatbox: does not work as expected (bug fix) [report: Jonathan Schubert]
 
-2011-01-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-10  Uwe Schulzweida
 
 	* Added operator delete - Delete fields
 	* sellonlatbox: cellidx was not initialized (bug fix) [report: Jaison Ambadan]
 
-2011-01-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-07  Uwe Schulzweida
 
 	* remaplib: Changed remap weights from 2D to 1D array
 
-2011-01-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-06  Uwe Schulzweida
 
 	* using CDI library version 1.4.7
 	* Version 1.4.7 released
 
-2011-01-05  Frank Kaspar <Frank.Kaspar at dwd.de>
+2011-01-05  Frank Kaspar
 
 	* import_cmsaf: set max length of date string to 8 (bug fix)
 
-2011-01-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-05  Uwe Schulzweida
 
 	* import_cmsaf: added time information also for time constant fields [request: Frank Kaspar]
 
-2010-12-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-12-17  Uwe Schulzweida
 
 	* eofcoeff: set size of eof_name to 6 (bug fix)
 
-2010-12-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-12-16  Uwe Schulzweida
 
 	* import_binary: check for gauss grids only when flag linear=0
 
-2010-12-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-12-14  Uwe Schulzweida
 
 	* readline: filter carriage return '\r' [report: Christian Steger]
 
-2010-12-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-12-13  Uwe Schulzweida
 
 	* setclonlatbox: bug fix for 1x1 grids [report: Angelika Heil]
 
-2010-12-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-12-06  Uwe Schulzweida
 
 	* Settime: bug fix for time independent variables in combination with other operators (pipes)
 
-2010-11-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-11-22  Uwe Schulzweida
 
 	* mulcoslat: added support for GME grids [request: Jaison-Thomas Ambadan]
 
-2010-11-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-11-19  Uwe Schulzweida
 
 	* select: added paramter *ltype* [request: Jaison-Thomas Ambadan]
 
-2010-11-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-11-16  Uwe Schulzweida
 
 	* Added operator eca_pd - Precipitation days index per time period [request: Barbara Hennemuth]
 
-2010-11-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-11-13  Uwe Schulzweida
 
 	* sellonlatbox: fix rounding error of the last lon index [report: Mondher Chekki]
 
-2010-11-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-11-10  Uwe Schulzweida
 
 	* ml2pl: open output stream after all error checks
 
-2010-11-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-11-08  Uwe Schulzweida
 
 	* sethalo: added support for grid units radian
 	* sethalo: correct lower bound of grid bounds for negative halos (bug fix)
 	* fldmean: gives wrong result for grid units radian (bug fix) [report: Pilar Ripodas]
 
-2010-10-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-10-21  Uwe Schulzweida
 
 	* Yseasstat: bug fix for datasets with time constant fields [report: Ute Merkel]
 
-2010-10-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-10-20  Uwe Schulzweida
 
 	* added docu for operator dv2ps
 
-2010-10-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-10-13  Uwe Schulzweida
 
 	* Cat: call vlistCompare for all input files
 
-2010-09-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-29  Uwe Schulzweida
 
 	* added env. CDO_FILE_SUFFIX to set the file suffix of CDO generated file names
 
-2010-09-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-27  Uwe Schulzweida
 
 	* Fldstat2: replaced macros FDIV and FSQRT by function calls DIV and SQRT
 
-2010-09-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-20  Uwe Schulzweida
 
 	* New module: Ydayarith (ydayadd, ydaysub, ydaymul, ydaydiv)
 
-2010-09-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-17  Uwe Schulzweida
 
 	* using CDI library version 1.4.6
 	* Version 1.4.6 released
 
-2010-09-07 Ralf Mueller <ralf.mueller at zmaw.de>
+2010-09-07 Ralf Mueller
 
 	* using libtool for linking (rpath)
 	* include libcdi as subproject
 	* eca_gsl: adjust implementation to fit definition by ECA [report: Stefan Fronzek]
 	* eca_gsl: make usable in pipes (bug fix) [report: Stefan Fronzek]
 
-2010-08-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-26  Uwe Schulzweida
 
 	* sellevel: copy zaxis meta data name and units (bug fix) [report: Don Murray]
 
-2010-08-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-20  Uwe Schulzweida
 
         * pstreamDefTimestep: removed call to streamSync (very slow on GPFS)
 
-2010-08-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-05  Uwe Schulzweida
 
 	* changed percentile parameter type from integer to float [request: Nikolaus Groll]
 
-2010-08-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-03  Uwe Schulzweida
 
 	* changed predefined gaussian grid names from t<RES>grid to n<N>
 
-2010-08-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-02  Uwe Schulzweida
 
 	* added grid mask support
 
-2010-07-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-30  Uwe Schulzweida
 
 	* sellonlatbox: fix rounding error of the last lon index [report: Flore Mounier]
 
-2010-07-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-22  Uwe Schulzweida
 
 	* Module Expr: added missing value support [request: Marco van Hulten]
 
-2010-07-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-13  Uwe Schulzweida
 
 	* gridFromNCfile: check grid_dims
 	* seldate: open output file only when time steps found (bug fix) [report: Hannes Reuter]
 
-2010-07-12  Cedrick Ansorge <Cedrick.Ansorge at zmaw.de>
+2010-07-12  Cedrick Ansorge
 
 	* Added module Filter - Time series filtering
 
-2010-07-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-05  Uwe Schulzweida
 
 	* Version 1.4.5.1 released
 
-2010-07-05 Edi Kirk <E.Kirk at gmx.de>
+2010-07-05 Edi Kirk
 
 	* GRIB1 decode: Correct ZeroShiftError of simple packed spherical harmonics
 
-2010-06-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-06-30  Uwe Schulzweida
 
 	* bug fix for wrong result of SZIP compressed GRIB records with 24 bit 
 	  packing and a compression ratio < 1.05 [report: Aiko Voigt]
 
-2010-06-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-06-28  Uwe Schulzweida
 
 	* Version 1.4.5 released
 
-2010-06-17  Etienne Tourigny <tourigny at sca.uqam.ca>
+2010-06-17  Etienne Tourigny
 
 	* Added operator setvals - Set list of old values to new values
 
-2010-05-18  Cedrick Ansorge <Cedrick.Ansorge at zmaw.de>
+2010-05-18  Cedrick Ansorge
 
 	* Added operator eof - Calculate EOFs in spatial or time space
         * Added operator eoftime - Calculate EOFs in time space
         * Added operator eofspatial - Calculate EOFs in spatial space
 	* Added operator eofcoeff - Principal coefficients of EOFs
 
-2010-05-17  Ralf Mueller  <Ralf.Mueller at zmaw.de>
+2010-05-17  Ralf Mueller
 
 	* Added operator consecsum - Consecutive Sum
 	* Added operator consects - Consecutive Timesteps
 
-2010-04-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-29  Uwe Schulzweida
 
 	* using CDI library version 1.4.4
 	* Version 1.4.4 released
 
-2010-04-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-19  Uwe Schulzweida
 
         * fldsum: change result from 0 to missval, if only missing values found [report: Angelika Heil]
 	* intyear: set the interpolation result always to missval, if missing values found [report: Angelika Heil]
 
-2010-04-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-12  Uwe Schulzweida
 
 	* Added operator delday
 
-2010-04-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-09  Uwe Schulzweida
 
 	* Added support for time units 3hours and 6hours [request: Jaison-Thomas Ambadan]
 
-2010-04-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-07  Uwe Schulzweida
 
 	* Remap: bypass variables with gridtype generic and only one gridpoint
 
-2010-04-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-04  Uwe Schulzweida
 
 	* selgrid: change gridID to grididx (bug fix)
 	* Added operator cloudlayer: compute low, mid and high clouds [request: Daniel Klocke]
 
-2010-04-01  Martin Claus  <mclaus at ifm-geomar.de>
+2010-04-01  Martin Claus
 
 	* vertwind: added missing value support
 
-2010-03-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-25  Uwe Schulzweida
 
 	* standard deviation (bug fix): change the result from missval to zero, if variance is zero [report: Jaison-Thomas Ambadan]
 
-2010-03-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-23  Uwe Schulzweida
 
 	* Added operator tstepcount: count number of timesteps (experimental) [request: Swantje Preuschmann]
 
-2010-03-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-20  Uwe Schulzweida
 
 	* import_binary: added support for variables with different number of levels [report: Dennis Shea]
 
-2010-03-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-16  Uwe Schulzweida
 
 	* sellonlatbox: bug fix for parameter lon2 [report: Alberto Maurizi]
 	* random: added optional parameter seed
 
-2010-03-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-15  Uwe Schulzweida
 
 	* pstreamWriteRecord: check pstreamptr->varlist (bug fix) [report: Kevin Sieck]
 	* added operator fldcor to correlate two fields
 
-2010-03-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-12  Uwe Schulzweida
 
 	* added predefined grid t<RES>zon
 	
-2010-03-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-11  Uwe Schulzweida
 
 	* expr: added support for const/var (bug fix) [report: Youmin Chen]
 	
-2010-03-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-10  Uwe Schulzweida
 
 	* Added support for netCDF time bounds (bug fix) [report: Beate Geyer]
 
-2010-03-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-07  Uwe Schulzweida
 
 	* Released module Gridboxstat
 	
-2010-03-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-03  Uwe Schulzweida
 
 	* inputsrv: added level information (bug fix) [report: Simon Blessing]
 
-2010-02-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-22  Uwe Schulzweida
 
 	* using CDI library version 1.4.3
 	* changed GRIB1 default packing type of spherical harmonics to complex
 	* added CDO option -M to indicate that the I/O streams have missing values
 	* Version 1.4.3 released
 
-2010-02-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-08  Uwe Schulzweida
 
 	* using CDI library version 1.4.2
 	* Added new module Gridboxstat (testversion)
 	* Version 1.4.2 released
 
-2010-02-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-02  Uwe Schulzweida
 
 	* netCDF+packed data: check that all values are inside the valid range
 
-2010-02-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-01  Uwe Schulzweida
 
 	* remove netCDF offset/scalefactor if option -b 32 is set
 
-2010-01-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-28  Uwe Schulzweida
 
 	* Ensstat: don't overwrite existing files
 
-2010-01-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-20  Uwe Schulzweida
 
 	* Zonstat: added support for generic grids
 	* Merstat: added support for generic grids
 
-2010-01-14  Frank Kaspar <Frank.Kaspar at dwd.de>
+2010-01-14  Frank Kaspar
 
 	* import_cmsaf: added more corrections for wrong projection parameter
 
-2010-01-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-12  Uwe Schulzweida
 
 	* replace: added support for time constant fields [request: Wei Wei]
 
-2010-01-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-10  Uwe Schulzweida
 
 	* Genweights: use netCDF2 (64bit) for large remap weights files [request: Daniel Goll]
 
-2010-01-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-01  Uwe Schulzweida
 
 	* added module Fourier
 	* Detrend: OpenMP parallelization
 
-2009-12-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-23  Uwe Schulzweida
 
 	* remapcon, remaplaf: speed up by fast store of links
 
-2009-12-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-15  Uwe Schulzweida
 
 	* Version 1.4.1 released
 
-2009-12-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-14  Uwe Schulzweida
 
 	* Vertint: set default table number to 0
 	
-2009-12-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-10  Uwe Schulzweida
 
 	* Ensstat: change vlistCompare to func_sftn
 	
-2009-11-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-30  Uwe Schulzweida
 
 	* merge, mergetime: don't overwrite existing files
 	
-2009-11-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-27  Uwe Schulzweida
 
 	* New operator: splittabnum - Split parameter table numbers
 
-2009-11-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-19  Uwe Schulzweida
 
 	* showtime: removed output of date, only print time string hh:mm:ss
 	* convert date and time to string for printing
 
-2009-11-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-12  Uwe Schulzweida
 
 	* New operator: sethalo - Set the left and right bounds of a field
 	* change number of input streams from unlimited to 1 in pipes
@@ -1153,29 +1232,29 @@ w.de>
 	* added operator vct2
 	* Selvar: abort if no variable is selected
 	
-2009-11-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-08  Uwe Schulzweida
 
 	* added default zaxis name "surface"
 	
-2009-11-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-04  Uwe Schulzweida
 
 	* setgridtype: added parameter regular to convert reduced gaussian grids
 	* gridFromFile: check floating point parameter
 
-2009-11-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-03  Uwe Schulzweida
 
 	* remap: bug fix for weights from gennn (set remap_extrapolate = TRUE) [report: Helmut Frank]
 
-2009-11-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-02  Uwe Schulzweida
 
 	* gridFromNCfile: lock call to nc_open (race condition) [report: Nils Fischer]
 
-2009-10-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-23  Uwe Schulzweida
 
 	* outputbounds: added support for meridional data
 	* showtime: added comma to output string (bug fix) [report: Stefan Hagemann]
 
-2009-10-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-21  Uwe Schulzweida
 
 	* using CDI library version 1.4.0.1
 	* seltime: bug fix for scanning of input parameter (report: Emanuele Lombardi]
@@ -1183,11 +1262,11 @@ w.de>
 	* GRIB format: bug fix for decoding of missing values (scalar version only)
 	* Version 1.4.0.1 released
 
-2009-10-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-07  Uwe Schulzweida
 
 	* cdotest:eca_gsl: bug fix [report: Harald Anlauf]
 
-2009-10-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-05  Uwe Schulzweida
 
 	* using CDI library version 1.4.0
 	* New operator: import_binary - Import binary data sets via a GrADS data descriptor file
@@ -1204,19 +1283,19 @@ w.de>
 	* shifttime: bug fix for negative time increments [report: Andreas H�nsler]
 	* Version 1.4.0 released
 
-2009-09-29  Frank Kaspar <Frank.Kaspar at dwd.de>
+2009-09-29  Frank Kaspar
 
 	* import_cmsaf: Replacing incorrect projection parameters for sinusoidal products
 
-2009-09-18  Ralf Mueller <Ralf.Mueller at zmaw.de>
+2009-09-18  Ralf Mueller
 
 	* eca_gsl: consideration of different growing season start for northern and southern hemisphere
 
-2009-07-15  Ralf Mueller <Ralf.Mueller at zmaw.de>
+2009-07-15  Ralf Mueller
 
 	* eca_gsl: bug fix for finalDay in ecacore:eca4 [report: Elke Keup-Thiel]
 
-2009-06-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-06-15  Uwe Schulzweida
 
 	* using CDI library version 1.3.2
 	* change C compiler to ANSI C99
@@ -1233,7 +1312,7 @@ w.de>
 	* remapdis, remapnn: set num_srch_bins to 1 if REMAP_EXTRAPOLATE=OFF (bug fix) [report: Hamid Benhocine]
 	* Version 1.3.2 released
 
-2009-04-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-04-16  Uwe Schulzweida
 	
 	* using CDI library version 1.3.1
 	* set default calendar to proleptic gregorian
@@ -1267,16 +1346,16 @@ w.de>
 	* remap: read grid corners only if needed
 	* Version 1.3.1 released
 
-2009-04-15  Pier Giuseppe Fogli <fogli at bo.ingv.it>
+2009-04-15  Pier Giuseppe Fogli
 
 	* chlevel: fixed bug that happens when the list of oldlev,newlev 
 	           contains the same level more than once
 
-2009-01-16  �lvaro M. Valdebenito <alvaro.valdebenito at met.no>
+2009-01-16  �lvaro M. Valdebenito
 
 	* Settime: added "seconds" support to "settunits", "settaxis" and "shifttime"
 
-2009-01-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-01-15  Uwe Schulzweida
 
 	* using CDI library version 1.3.0
 	* New operator: remapcon2 - Second order conservative remapping
@@ -1305,7 +1384,7 @@ w.de>
 	* yseasstd,yseasvar: wrong array index (bug fix) [report: Robert Nicholas]
 	* Version 1.3.0 released
 
-2008-11-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-11-13  Uwe Schulzweida
 
 	* using CDI library version 1.2.1
 	* New operator: import_cmsaf - import CM-SAF files
@@ -1328,7 +1407,7 @@ w.de>
 	* namelist: bug fix for wrong input
 	* Version 1.2.1 released
 
-2008-08-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-08-13  Uwe Schulzweida
 
 	* using CDI library version 1.2.0
 	* added support for netCDF4 classic with deflate option (option -z zip)
@@ -1357,7 +1436,7 @@ w.de>
 	  (also affected: ndate, nmon, nyear, showdate, showtime, showmon, showyear)
 	* Version 1.2.0 released
 
-2008-04-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-04-08  Uwe Schulzweida
 
 	* using CDI library version 1.1.1
 	* configure: --with-szlib=<directory>
@@ -1381,7 +1460,7 @@ w.de>
 	* Seltime: changed value of NOPERATORS (bug fix)
 	* Version 1.1.1 released
 
-2008-01-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-01-24  Uwe Schulzweida
 
 	* using CDI library version 1.1.0
 	* New module: Monarith (monadd, monsub, monmul, mondiv) [request: Daniel Hernandez]
@@ -1397,14 +1476,14 @@ w.de>
 	* gridWeights: warning with code number when using constant area weights
 	* Version 1.1.0 released
 
-2007-10-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2007-10-29  Uwe Schulzweida
 
 	* cat: bug fix for large existing output files (>2GB) on 32-bit machines [report: Heinz-Dieter Hollweg]
 	* gradsdes: bug fix for monthly mean data with start day > 28 [report: Renate Brokopf]
 	* expr: change exponent precedence from left to right (bug fix)[report: Claas Teichmann]
 	* Version 1.0.9.1 released
 
-2007-10-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2007-10-22  Uwe Schulzweida
 
 	* using CDI library version 1.0.8
 	* New module: yhourstat (yhour -min/-max/-sum/-mean/-avg/-std/-var) [request: Holger Goettel]
@@ -1425,11 +1504,11 @@ w.de>
 	* merge: bug fix for all files with constant fields only [report: Jan Keller]
 	* Version 1.0.9 released
 
-2007-07-04  Ralf Quast  <ralf.quast at brockmann-consult.de>
+2007-07-04  Ralf Quast
 
 	* Timcount and Seascount: bug fix for missing values
 
-2007-06-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2007-06-27  Uwe Schulzweida
 
 	* using CDI library version 1.0.7
 	* New operator: remapeta
@@ -1454,28 +1533,28 @@ w.de>
 	* selltype, setltype, chltype: extent to all ltypes [request: Patrick Samuelsson]
 	* Version 1.0.8 released
 
-2007-06-26  Etienne Tourigny  <tourigny at sca.uqam.ca>
+2007-06-26  Etienne Tourigny
 
 	* Add new operator: splitsel
 	* Add new operator: histfreq
 	* Add new operator: setrtoc and setrtoc2
 	* list.c: changes to accept inf and -inf as arguments 
 
-2007-06-07  Cedrick Ansorge  <Cedrick.Ansorge at zmaw.de>
+2007-06-07  Cedrick Ansorge
 
 	* New operator: smooth9
 
-2007-05-30  Ralf Quast  <ralf.quast at brockmann-consult.de>
+2007-05-30  Ralf Quast
 
 	* New operator: timcount, hourcount, daycount, moncount, yearcount, seascount
 	* Renamed eca_fdns, eca_strwin, eca_strbre, eca_strgal, eca_hurr
 	       to fdns, strwin, strbre, strgal, hurr
 
-2007-04-18  Cedrick Ansorge  <Cedrick.Ansorge at zmaw.de>
+2007-04-18  Cedrick Ansorge
 
 	* New operator: maskregion
 
-2007-03-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2007-03-08  Uwe Schulzweida
 
 	* using CDI library version 1.0.6
 	* Add docu for dv2uvl and uv2dvl
@@ -1489,12 +1568,12 @@ w.de>
 	* gradsdes: process only the first 2GB of a GRIB file
 	* Version 1.0.7 released
 
-2007-01-02  Ralf Quast  <ralf.quast at brockmann-consult.de>
+2007-01-02  Ralf Quast
 
 	* rename tchill to wct
 	* split eca_strwind into eca_strwin, eca_strbre, eca_strgal and eca_hurr
 
-2006-12-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-12-14  Uwe Schulzweida
 
 	* using CDI library version 1.0.5
 	* New operator: vertvar, timvar, yearvar, monvar, dayvar, hourvar
@@ -1508,7 +1587,7 @@ w.de>
 	* Version 1.0.6 released
 
 
-2006-11-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-11-30  Uwe Schulzweida
 
 	* using CDI library version 1.0.4
 	* New operator: showformat (Showinfo) [request: Helmuth Haak]
@@ -1524,7 +1603,7 @@ w.de>
 	* operatorInqModID: speed up
 	* Version 1.0.5 released
 
-2006-11-17  Ralf Quast  <ralf.quast at brockmann-consult.de>
+2006-11-17  Ralf Quast
 
 	* New module: Tchill (tchill)
 	* New module: Hi (hi)
@@ -1538,13 +1617,13 @@ w.de>
                        eca_r95p, eca_r95ptot, eca_r99p, eca_r99ptot,
                        eca_rr1, eca_sdii, eca_fdns, eca_strwind)
 
-2006-11-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-11-06  Uwe Schulzweida
 
 	* processSelf: lock/unlock NumProcess (bug fix)
 	* pstreamOpenRead: move mutex_unlock after cdoInqHistory
 	* Version 1.0.4 released
 
-2006-11-06  Ralf Quast  <ralf.quast at brockmann-consult.de>
+2006-11-06  Ralf Quast
 
 	* New module: Ydrunstat (ydrun -min, -max, -sum, -mean, -avg, -std, -var)
 	* New module: Timpctl (tim-, hour-, day-, mon-, year- pctl)
@@ -1560,7 +1639,7 @@ w.de>
 	* New operator: zonpctl (Zonstat)
 	* New operator: merpctl (Merstat)
 
-2006-11-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-11-02  Uwe Schulzweida
 
 	* using CDI library version 1.0.3
 	* New operator: intntime [request: Michael Boettinger]
@@ -1575,7 +1654,7 @@ w.de>
 	* Remap: use REMAP_NON_GLOBAL only for gridsize > 1
 	* Version 1.0.3 released
 
-2006-09-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-09-18  Uwe Schulzweida
 
 	* using CDI library version 1.0.2
 	* set alias gradsdes to gradsdes2
@@ -1590,7 +1669,7 @@ w.de>
 	* pstreamDefVlist: unpack netCDF data if datatype = FLT64
 	* Version 1.0.2 released
 
-2006-08-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-08-01  Uwe Schulzweida
 
 	* using CDI library version 1.0.1
 	* add option -b to set the number of bits for the output precision
@@ -1613,7 +1692,7 @@ w.de>
 	* process: set MAX_ARGS from 1024 to 8192
 	* Version 1.0.1 released
 
-2006-06-15  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-06-15  Uwe Schulzweida
 
 	* using CDI library version 1.0.0
 	* New operator: dv2ps (Wind) [request: Luis Kornblueh]
@@ -1624,7 +1703,7 @@ w.de>
 	* configure: check compiler version
 	* Version 1.0.0 released
 
-2006-05-04  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-05-04  Uwe Schulzweida
 
 	* using CDI library version 0.9.7
 	* New module: Mergetime [request: Stefanie Legutke]
@@ -1655,7 +1734,7 @@ w.de>
 	* add option -s for silent mode [request: Martina Stockhaus]
 	* Version 0.9.13 released
 
-2006-03-08  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-03-08  Uwe Schulzweida
 
 	* using CDI library version 0.9.6
 	* New module: Wind (uv2dv, dv2uv) <- docu missing
@@ -1670,7 +1749,7 @@ w.de>
 	* namelist: update
 	* Version 0.9.12 released
 	
-2006-02-01  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-02-01  Uwe Schulzweida
 
 	* using CDI library version 0.9.5
 	* use macro DBL_IS_EQUAL to check floating-point equality
@@ -1693,7 +1772,7 @@ w.de>
 	* Selrec: add IEG support
 	* Version 0.9.11 released
 
-2005-12-14  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-12-14  Uwe Schulzweida
 
 	* using CDI library version 0.9.4
 	* IEG support
@@ -1709,7 +1788,7 @@ w.de>
 	* fourier: made ifax and trig local (bug fix)
 	* Version 0.9.10 released
 
-2005-10-18  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-10-18  Uwe Schulzweida
 
 	* using CDI library version 0.9.2
 	* remapcon: replace gridbox_area after remapping
@@ -1727,7 +1806,7 @@ w.de>
 	* zaxis: add bounds
 	* Version 0.9.9 released
 	
-2005-07-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-07-17  Uwe Schulzweida
 
 	* using CDI library version 0.9.1
 	* Arith:
@@ -1746,7 +1825,7 @@ w.de>
 	* Speedup spectral transformation (replace phcs by jspleg1)
 	* Version 0.9.8 released
 
-2005-05-26  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-05-26  Uwe Schulzweida
 
 	* using CDI library version 0.9.0
 	* Speedup Remap with masks by saving MAX_REMAPS maps
@@ -1770,7 +1849,7 @@ w.de>
 	* bug fix in all Modules (define timestep)
 	* Version 0.9.7 released
 
-2005-04-03  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-04-03  Uwe Schulzweida
 
 	* using CDI library version 0.8.9
 	* support for rotated grids
@@ -1784,7 +1863,7 @@ w.de>
 	* Splityear: change filename for doubled years
 	* Version 0.9.6 released
 
-2005-02-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-02-17  Uwe Schulzweida
 
 	* using CDI library version 0.8.8
 	* bug fix for taxis with remap, copy, setgrid
@@ -1797,7 +1876,7 @@ w.de>
 	* Reduced grids: read/write record if -R is used
 	* Version 0.9.5 released
 	
-2005-01-03  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-01-03  Uwe Schulzweida
 
 	* using CDI library version 0.8.7
 	* New operator: setmissval (set the missing value)
@@ -1805,7 +1884,7 @@ w.de>
 	* Docu for operator infov, sinfov and diffv
 	* Version 0.9.4 released
 
-2004-12-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-12-17  Uwe Schulzweida
 
 	* changes for CDI library version 0.8.6
 	* New operator: gradsdes for GRIB, SERVICE and EXTRA files
@@ -1818,7 +1897,7 @@ w.de>
 	* configure: checks for pthread and malloc library
 	* Version 0.9.3 released
 
-2004-11-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-11-17  Uwe Schulzweida
 
 	* changes for CDI library version 0.8.5
 	* New module: Seasstat (seasmin, seasmax, seassum, seasmean, seasavg, seasstd)
@@ -1832,7 +1911,7 @@ w.de>
 	* pthread_create: check return value
 	* Version 0.9.2 released
 
-2004-10-14  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-10-14  Uwe Schulzweida
 	
 	* changes for CDI library version 0.8.4
 	* use compNlon to compute nlon from nlat
@@ -1855,7 +1934,7 @@ w.de>
 	* netCDF2 support
 	* Version 0.9.1 released
 
-2004-09-08  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-09-08  Uwe Schulzweida
 
 	* changes for CDI library version 0.8.3
 	* new module: Vertint (ml2pl, ml2hl)
@@ -1869,7 +1948,7 @@ w.de>
 	* replace all streamCopyRecord by streamReadRecord and streamWriteRecord for piping
 	* Version 0.9.0 released
 	
-2004-07-09  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-07-09  Uwe Schulzweida
 
 	* changes for CDI library version 0.8.2
 	* new module: Remap (remapcon, remapbil, remapbic, remapdis)
@@ -1885,7 +1964,7 @@ w.de>
 	* new option -R: Convert reduced to regular grid
 	* Version 0.8.9 released
 	
-2004-05-21  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-05-21  Uwe Schulzweida
 
 	* changes for CDI library version 0.8.1
 	* Timstat, Runstat, Lmstat: extended for variables with TIME_CONSTANT
@@ -1895,7 +1974,7 @@ w.de>
 	* new module: Intyear
 	* Version 0.8.8 released
 
-2004-04-19  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-04-19  Uwe Schulzweida
 
 	* changes for CDI library version 0.8.0
 	* Arith: new operator (min and max)
@@ -1910,7 +1989,7 @@ w.de>
 	* bug fix: Change, Set, Settime - change copy to read/write
 	* Version 0.8.7 released
 	
-2004-03-14  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-03-14  Uwe Schulzweida
 
 	* changes for CDI library version 0.7.9
 	* change format for online help information
@@ -1928,7 +2007,7 @@ w.de>
 	* Timstat: bug fix (calculate timerange)
 	* Version 0.8.6 released
 
-2004-01-05  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-01-05  Uwe Schulzweida
 
 	* changes for CDI library version 0.7.8
 	* New module: Cat (cat)
@@ -1945,7 +2024,7 @@ w.de>
 	* Split: bug fix for splitcode
 	* Version 0.8.5 released
 
-2003-12-14  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-12-14  Uwe Schulzweida
 
 	* changes for CDI library version 0.7.7
 	* pipe bug fix
@@ -1953,24 +2032,24 @@ w.de>
 	* New module: Splitrec
 	* Version 0.8.4 released
 
-2003-10-29  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-10-29  Uwe Schulzweida
 
 	* changes for CDI library version 0.7.5
 	* Version 0.8.3 released
 
-2003-10-12  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-10-12  Uwe Schulzweida
 
 	* changes for CDI library version 0.7.4
 	* changes for CDI library version 0.7.2 (HDF test interface)
 	* New operator: intarea, setctomiss, setmisstoc, setrangetomiss
 	* Version 0.8.2 released
 
-2003-09-22  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-09-22  Uwe Schulzweida
 
 	* New operator: interpolate (source from PINGO)
 	* Version 0.8.1 released
 
-2003-09-10  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-09-10  Uwe Schulzweida
 
 	* renamed to CDO (Climate Data Operators)
 	* changes for CDI library version 0.7.0
@@ -1978,34 +2057,34 @@ w.de>
 	* New operator: splithour, splitday, splitmon
 	* Version 0.8.0 released
 
-2003-07-30  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-07-30  Uwe Schulzweida
 
 	* changes for gdi library version 0.6.0
 	* Info.c: handle missing values
 	* Version 0.7.0 released
 
-2003-06-25  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-25  Uwe Schulzweida
 
 	* gdi library version 0.5.11
 	* New operator: intgridtraj, mastrfu
 	* Version 0.6.4 released
 
-2003-06-23  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-23  Uwe Schulzweida
 
 	* New operator: intgrid, intpoint, inttime
 	* Version 0.6.3 released
 
-2003-06-12  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-12  Uwe Schulzweida
 
 	* gdi library version 0.5.9
 	* grib library version 0.4.5
 	* Version 0.6.2 released
 
-2003-05-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-05-17  Uwe Schulzweida
 
 	* add module Spectral with operator sp2gp, gp2sp and sp2sp
 	* Version 0.6.1 released
-	
-2003-04-06  Uwe Schulzweida  <schulzweida at dkrz.de>
+
+2003-04-06  Uwe Schulzweida
 
 	* Version 0.6.0 released
diff --git a/Makefile.in b/Makefile.in
index 016018d..b284a24 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,12 +78,18 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/cdo.settings.in \
-	$(srcdir)/cdo.spec.in $(top_srcdir)/configure AUTHORS COPYING \
-	ChangeLog INSTALL NEWS config/compile config/config.guess \
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(top_srcdir)/config/mkinstalldirs $(srcdir)/cdo.spec.in \
+	$(srcdir)/cdo.settings.in AUTHORS COPYING ChangeLog INSTALL \
+	NEWS README config/compile config/config.guess \
 	config/config.sub config/depcomp config/install-sh \
-	config/ltmain.sh config/missing config/mkinstalldirs
+	config/missing config/mkinstalldirs config/ltmain.sh \
+	$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
+	$(top_srcdir)/config/config.sub \
+	$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
+	$(top_srcdir)/config/missing \
+	$(top_srcdir)/config/tap-driver.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -71,15 +104,28 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = cdo.spec cdo.settings
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 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_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-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 \
+	tags-recursive uninstall-recursive
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -87,11 +133,32 @@ am__can_run_installinfo = \
   esac
 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
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -102,6 +169,7 @@ am__remove_distdir = \
       && rm -rf "$(distdir)" \
       || { sleep 5 && rm -rf "$(distdir)"; }; \
   else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -129,12 +197,15 @@ am__relativize = \
   reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -170,6 +241,7 @@ ENABLE_DATA = @ENABLE_DATA@
 ENABLE_EXTRA = @ENABLE_EXTRA@
 ENABLE_GRIB = @ENABLE_GRIB@
 ENABLE_IEG = @ENABLE_IEG@
+ENABLE_NETCDF = @ENABLE_NETCDF@
 ENABLE_SERVICE = @ENABLE_SERVICE@
 EXEEXT = @EXEEXT@
 FCFLAGS = @FCFLAGS@
@@ -181,7 +253,6 @@ HDF5_INCLUDE = @HDF5_INCLUDE@
 HDF5_LIBS = @HDF5_LIBS@
 HDF5_ROOT = @HDF5_ROOT@
 HOST_NAME = @HOST_NAME@
-INCLUDES = @INCLUDES@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -201,6 +272,7 @@ MAGICS_LIBS = @MAGICS_LIBS@
 MAGICS_ROOT = @MAGICS_ROOT@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NC_CONFIG = @NC_CONFIG@
 NETCDF_INCLUDE = @NETCDF_INCLUDE@
@@ -210,6 +282,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -246,6 +319,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
@@ -314,15 +388,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
 		&& exit 0; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu Makefile
+	  $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -357,22 +431,25 @@ distclean-libtool:
 	-rm -f libtool config.lt
 
 # 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; \
+# 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.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
 	  echo "Making $$target in $$subdir"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \
@@ -387,57 +464,12 @@ $(RECURSIVE_TARGETS):
 	  $(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: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-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)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -453,12 +485,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -470,15 +497,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$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; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -487,9 +510,31 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
@@ -557,40 +602,42 @@ distdir: $(DISTFILES)
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-lzip: distdir
 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
-	$(am__remove_distdir)
-
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-shar: distdir
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-zip: distdir
 	-rm -f $(distdir).zip
 	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_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
@@ -601,8 +648,6 @@ distcheck: dist
 	  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.lz*) \
 	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
@@ -614,9 +659,9 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -648,7 +693,7 @@ distcheck: dist
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
 	  && cd "$$am__cwd" \
 	  || exit 1
-	$(am__remove_distdir)
+	$(am__post_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'
@@ -784,14 +829,13 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
 
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am am--refresh check check-am clean clean-generic \
-	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-	dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
-	dist-zip distcheck distclean distclean-generic \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--refresh check check-am clean clean-cscope clean-generic \
+	clean-libtool cscope cscopelist-am ctags ctags-am dist \
+	dist-all dist-bzip2 dist-gzip dist-lzip 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-data install-data-am install-dvi \
@@ -801,7 +845,7 @@ uninstall-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
+	ps ps-am tags tags-am uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/NEWS b/NEWS
index 3309cea..a890c12 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,29 @@
 CDO NEWS
 --------
 
+Version 1.6.4 (26 June 2014):
+
+   New features:
+     * Option --history: Do not append to netCDF "history" global attribute
+     * Option --netcdf_hdr_pad <nbr>: Pad netCDF output header with nbr bytes
+   New operators:
+     * setpartabn: set parameter table by name
+     * setpartabp: set parameter table by parameter ID
+     * sealevelpressure: sea level pressure
+   Changed operators:
+     * Filter: disable zero-padding
+     * diff: print number of different values
+     * Ymonstat: sorts output by month of year
+   Fixed bugs:
+     * Filter:
+     * eof3d: set sum of weights to 1
+     * eofcoeff: remove scaling with grib cell area weights
+     * eofcoeff3d: remove scaling with grib cell area weights
+
 Version 1.6.3 (18 February 2014):
 
    New features:
-     * remapbil, remapbic, remapdis: performance optimization for regular 2D source grids
+     * remapbil, remapbic, remapdis, remapnn: performance optimization for regular 2D source grids
      * gradsdes: added support for GRIB files >2GB
      * eca_csu: added number of csu periods with more than 5days per time period
      * eca_cfd: added number of cfd periods with more than 5days per time period
diff --git a/OPERATORS b/OPERATORS
index c95c1b6..caac095 100644
--- a/OPERATORS
+++ b/OPERATORS
@@ -113,6 +113,8 @@ Operator catalog:
 -------------------------------------------------------------
    Modification
 -------------------------------------------------------------
+   Setpartab     setpartabp      Set parameter table
+   Setpartab     setpartabn      Set parameter table
    Set           setpartab       Set parameter table
    Set           setcode         Set code number
    Set           setparam        Set parameter identifier
@@ -488,6 +490,7 @@ Operator catalog:
    Vargen        stdatm          Create values for pressure and temperature for hydrostatic atmosphere
    Rotuv         rotuvb          Backward rotation
    Mastrfu       mastrfu         Mass stream function
+   Derivepar     sealevelpressure Sea level pressure
    Adisit        adisit          Potential temperature to in-situ temperature
    Adisit        adipot          In-situ temperature to potential temperature
    Rhopot        rhopot          Calculates potential density
diff --git a/aclocal.m4 b/aclocal.m4
index 5f570db..2ed0cb7 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -12,33 +11,31 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
 [m4_warning([this file was generated for autoconf 2.68.
 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'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2002-2013 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_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'
+[am__api_version='1.14'
 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.5], [],
+m4_if([$1], [1.14], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -54,24 +51,22 @@ m4_define([_AM_AUTOCONF_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.5])dnl
+[AM_AUTOMAKE_VERSION([1.14])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, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 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
-
 # 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/../..'.
+# $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
@@ -90,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 #
 # 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
+# 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,
@@ -116,22 +111,19 @@ 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.
+# Copyright (C) 1997-2013 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_PREREQ([2.52])dnl
+ m4_if([$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
@@ -150,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 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 12
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# 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
@@ -169,7 +159,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 # 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
@@ -182,12 +172,13 @@ 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=])
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" 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],
@@ -195,8 +186,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # 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'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -236,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > 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
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > 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"
+    # 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
+    # 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
@@ -254,8 +245,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # 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
@@ -263,7 +254,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # 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}
@@ -311,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# 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
@@ -321,9 +312,13 @@ 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])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
@@ -338,20 +333,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 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
+  # Older Autoconf 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
@@ -364,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # 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
+    # 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.
@@ -376,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    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
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -408,7 +399,7 @@ AC_DEFUN([_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
+# 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],
@@ -418,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # 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.
+# Copyright (C) 1996-2013 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.
 
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -442,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # 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
+[AC_PREREQ([2.65])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
@@ -471,31 +465,40 @@ 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_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+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_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
   [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
+[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)
+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
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
@@ -506,34 +509,78 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 			     [_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
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_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
+		  [_AM_DEPENDENCIES([CXX])],
+		  [m4_define([AC_PROG_CXX],
+			     m4_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_DEPENDENCIES([OBJC])],
+		  [m4_define([AC_PROG_OBJC],
+			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+		  [_AM_DEPENDENCIES([OBJCXX])],
+		  [m4_define([AC_PROG_OBJCXX],
+			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])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_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro 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
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi])
+
+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.
@@ -555,15 +602,12 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2013 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_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -577,16 +621,14 @@ if test x"${install_sh}" != xset; then
     install_sh="\${SHELL} $am_aux_dir/install-sh"
   esac
 fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 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],
@@ -603,20 +645,17 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 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_MAINTAINER_MODE([DEFAULT-MODE])
 # ----------------------------------
 # Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well.  Anyway, the user
 # can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
 [m4_case(m4_default([$1], [disable]),
@@ -627,10 +666,11 @@ AC_DEFUN([AM_MAINTAINER_MODE],
 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+      am_maintainer_other[ make rules and dependencies not useful
+      (and sometimes confusing) to the casual installer])],
+    [USE_MAINTAINER_MODE=$enableval],
+    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
@@ -638,18 +678,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 ]
 )
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 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.
@@ -667,7 +703,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# 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
@@ -692,52 +728,14 @@ 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.
+# Copyright (C) 1997-2013 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],
@@ -745,11 +743,10 @@ AC_DEFUN([AM_MISSING_PROG],
 $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.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, 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
@@ -762,54 +759,22 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  AC_MSG_WARN(['missing' script is too old or missing])
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 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_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, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2013 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_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
@@ -819,7 +784,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 # --------------------
 # 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)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 
 # _AM_SET_OPTIONS(OPTIONS)
 # ------------------------
@@ -833,24 +798,82 @@ AC_DEFUN([_AM_SET_OPTIONS],
 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) 1999-2013 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.
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+  [whether $CC understands -c and -o together],
+  [am_cv_prog_cc_c_o],
+  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i])
+if test "$am_cv_prog_cc_c_o" != 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_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2013 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_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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_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='
@@ -861,32 +884,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# 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
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     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
+     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
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$[2]" = conftest.file
    )
 then
@@ -896,46 +927,118 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
 
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 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], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+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
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 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
+# 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
+# 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
+# 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'.
+# 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, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 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 3
-
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -949,18 +1052,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 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'.
+# 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
@@ -970,76 +1071,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # 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.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 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.
+
+# We'll 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
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  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
 
-  # 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])
+    # 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])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   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_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/cdo.spec b/cdo.spec
index b74cc24..50a95b4 100644
--- a/cdo.spec
+++ b/cdo.spec
@@ -4,7 +4,7 @@
 
 Name:           cdo
 #BuildRequires:  
-Version:        1.6.3
+Version:        1.6.4
 Release:        1
 Summary:        Climate Data Operators
 License:        GNU GENERAL PUBLIC LICENSE Version 2, June 1991
diff --git a/config/compile b/config/compile
index c0096a7..531136b 100755
--- a/config/compile
+++ b/config/compile
@@ -1,10 +1,9 @@
 #! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey at cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -29,21 +28,224 @@ scriptversion=2009-10-06.20; # UTC
 # bugs to <bug-automake at gnu.org> or send patches to
 # <automake-patches at gnu.org>.
 
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""	$nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv/,$2, in
+	*,$file_conv,*)
+	  ;;
+	mingw/*)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin/*)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine/*)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  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'.
+	  eat=1
+	  case $2 in
+	    *.o | *.[oO][bB][jJ])
+	      func_file_conv "$2"
+	      set x "$@" -Fo"$file"
+	      shift
+	      ;;
+	    *)
+	      func_file_conv "$2"
+	      set x "$@" -Fe"$file"
+	      shift
+	      ;;
+	  esac
+	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-I*)
+	  func_file_conv "${1#-I}" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-l*)
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
+	-L*)
+	  func_cl_dashL "${1#-L}"
+	  ;;
+	-static)
+	  shared=false
+	  ;;
+	-Wl,*)
+	  arg=${1#-Wl,}
+	  save_ifs="$IFS"; IFS=','
+	  for flag in $arg; do
+	    IFS="$save_ifs"
+	    linker_opts="$linker_opts $flag"
+	  done
+	  IFS="$save_ifs"
+	  ;;
+	-Xlinker)
+	  eat=1
+	  linker_opts="$linker_opts $2"
+	  ;;
+	-*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+	  func_file_conv "$1"
+	  set x "$@" -Tp"$file"
+	  shift
+	  ;;
+	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+	  func_file_conv "$1" mingw
+	  set x "$@" "$file"
+	  shift
+	  ;;
+	*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     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
+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'.
+right script to run: please start by reading the file 'INSTALL'.
 
 Report bugs to <bug-automake at gnu.org>.
 EOF
@@ -53,11 +255,13 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
 esac
 
 ofile=
 cfile=
-eat=
 
 for arg
 do
@@ -66,8 +270,8 @@ do
   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.
+	# 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)
@@ -94,10 +298,10 @@ do
 done
 
 if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
+  # 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
+  # '.c' file was seen then we are probably linking.  That is also
   # ok.
   exec "$@"
 fi
@@ -106,7 +310,7 @@ fi
 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# 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
diff --git a/config/config.guess b/config/config.guess
index 115f944..b79252d 100755
--- a/config/config.guess
+++ b/config/config.guess
@@ -1,14 +1,12 @@
 #! /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, 2010
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2010-04-03'
+timestamp='2013-06-10'
 
 # 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
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2010-04-03'
 # 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # 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.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# 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.
+# Originally written by Per Bothner.
 #
 # 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
+#
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,9 +50,7 @@ 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, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright 1992-2013 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."
@@ -92,7 +84,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' HUP INT TERM
+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
@@ -106,7 +98,7 @@ trap 'exit 1' HUP INT TERM
 
 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" HUP INT PIPE TERM ;
+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) ; } ||
@@ -140,12 +132,33 @@ 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_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+esac
+
 # 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*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
@@ -181,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -224,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# 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 ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     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
@@ -296,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-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:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
 	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -395,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # 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}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -481,8 +501,8 @@ EOF
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# 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 ] || \
@@ -495,7 +515,7 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -552,7 +572,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	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
@@ -595,52 +615,52 @@ EOF
 	    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" ;;
+		    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
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#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);
+		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);
-              }
+		    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
@@ -731,22 +751,22 @@ EOF
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -770,14 +790,14 @@ EOF
 	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 ;;
+	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}"
+	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}
@@ -789,30 +809,35 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit ;;
     *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
 	    amd64)
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# 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
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
@@ -849,15 +874,22 @@ EOF
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -867,52 +899,56 @@ EOF
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${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}-unknown-linux-gnu
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	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}-pc-linux-${LIBC}"
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -931,51 +967,63 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
+	echo sparc-unknown-linux-${LIBC}
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+	echo hppa64-unknown-linux-${LIBC}
 	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-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
+	echo powerpc64-unknown-linux-${LIBC}
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +1032,11 @@ EOF
 	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,
+	# 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.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1068,7 @@ EOF
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@ -1048,13 +1096,13 @@ EOF
 	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.
+	# 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 ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1089,8 +1137,8 @@ EOF
 	/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; } ;;
+	/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 \
@@ -1133,10 +1181,10 @@ EOF
 		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 ;;
+    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
@@ -1162,11 +1210,11 @@ EOF
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1179,6 +1227,9 @@ EOF
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
 	echo i586-pc-haiku
 	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1205,19 +1256,21 @@ EOF
 	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
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	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
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1231,7 +1284,10 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1276,13 +1332,13 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1300,11 +1356,11 @@ EOF
     i*86:AROS:*:*)
 	echo ${UNAME_MACHINE}-pc-aros
 	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	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_
@@ -1322,11 +1378,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
diff --git a/config/config.sub b/config/config.sub
index 204218c..8b612ab 100755
--- a/config/config.sub
+++ b/config/config.sub
@@ -1,38 +1,31 @@
 #! /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, 2010
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2010-05-21'
+timestamp='2013-04-24'
 
-# 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
+# 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 3 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.
+# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # 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.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -75,9 +68,7 @@ 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, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright 1992-2013 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."
@@ -125,13 +116,17 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  linux-musl* | 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/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -154,12 +149,12 @@ case $os in
 	-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)
+	-apple | -axis | -knuth | -cray | -microblaze*)
 		os=
 		basic_machine=$1
 		;;
-        -bluegene*)
-	        os=-cnk
+	-bluegene*)
+		os=-cnk
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
@@ -175,10 +170,10 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -223,6 +218,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -247,20 +248,27 @@ case $basic_machine in
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| 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 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
 	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -278,29 +286,32 @@ case $basic_machine in
 	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
 	| moxie \
 	| mt \
 	| msp430 \
-	| nios | nios2 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
-	| or32 \
+	| open8 \
+	| or1k | or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| rx \
+	| rl78 | 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 | tic54x | tic55x | tic6x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
-	| v850 | v850e \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
@@ -313,8 +324,7 @@ case $basic_machine in
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -324,6 +334,21 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-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.
@@ -338,11 +363,13 @@ case $basic_machine in
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
@@ -351,12 +378,15 @@ case $basic_machine in
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -374,30 +404,34 @@ case $basic_machine in
 	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
 	| mipstx39-* | mipstx39el-* \
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
-	| nios-* | nios2-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* | rx-* \
+	| rl78-* | 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-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile-* | tilegx-* \
+	| tile*-* \
 	| tron-* \
 	| ubicom32-* \
-	| v850-* | v850e-* | vax-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -422,7 +456,7 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -505,7 +539,7 @@ case $basic_machine in
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
 		;;
@@ -537,7 +571,7 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
 		;;
@@ -695,7 +729,6 @@ case $basic_machine in
 	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
@@ -753,9 +786,13 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-        microblaze)
+	microblaze*)
 		basic_machine=microblaze-xilinx
 		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -792,10 +829,18 @@ case $basic_machine in
 	ms1-*)
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -860,6 +905,12 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -942,9 +993,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -969,7 +1021,11 @@ case $basic_machine in
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
-	rdos)
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
 		basic_machine=i386-pc
 		os=-rdos
 		;;
@@ -1038,6 +1094,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1094,13 +1153,8 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-        # This must be matched before tile*.
-        tilegx*)
-		basic_machine=tilegx-unknown
-		os=-linux-gnu
-		;;
 	tile*)
-		basic_machine=tile-unknown
+		basic_machine=$basic_machine-unknown
 		os=-linux-gnu
 		;;
 	tx39)
@@ -1170,6 +1224,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1267,11 +1324,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# 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
+	-auroraux)
+		os=-auroraux
 		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1295,21 +1352,21 @@ case $os in
 	-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* \
+	      | -sym* | -kopensolaris* | -plan9* \
 	      | -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* \
+	      | -bitrig* | -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-android* \
-	      | -linux-newlib* | -linux-uclibc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1356,7 +1413,7 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1405,7 +1462,7 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1441,17 +1498,14 @@ case $os in
 	-aros*)
 		os=-aros
 		;;
-	-kaos*)
-		os=-kaos
-		;;
 	-zvmoe)
 		os=-zvmoe
 		;;
 	-dicos*)
 		os=-dicos
 		;;
-        -nacl*)
-	        ;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1474,10 +1528,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1489,8 +1543,11 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	hexagon-*)
+		os=-elf
 		;;
 	tic54x-*)
 		os=-coff
@@ -1519,14 +1576,11 @@ case $basic_machine in
 		;;
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1535,6 +1589,9 @@ case $basic_machine in
 	mips*-*)
 		os=-elf
 		;;
+	or1k-*)
+		os=-elf
+		;;
 	or32-*)
 		os=-coff
 		;;
@@ -1553,7 +1610,7 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
diff --git a/config/default b/config/default
index eabccef..981638f 100755
--- a/config/default
+++ b/config/default
@@ -21,15 +21,15 @@ case "${HOSTNAME}" in
 	${CONFPATH}configure --prefix=$HOME/local \
                     --enable-maintainer-mode \
                     --with-jasper=$HOME/local \
-                    --with-grib_api=$HOME/local/gribapi-1.9.16 \
+                    --with-grib_api=$HOME/local/gribapi-1.10.4 \
                     --with-netcdf=$HOME/local \
                     --with-hdf5=$HOME/local \
                     --with-szlib=$HOME/local \
+                    --with-udunits2=$HOME/local/udunits-2.1.24 \
                     --with-proj=/opt/local \
-	            CC=icc CFLAGS="-g  -D_REENTRANT -Wall -W -O3 -march=native -openmp" \
+                    --with-curl=/opt/local \
+	            CC=icc CFLAGS="-g -Wall -O3 -vec-report2 -march=native -openmp -fp-model source -fast-transcendentals" \
                     LIBS="-L/opt/local/lib -lopenjpeg"
-#                    --with-libxml2=/usr \
-#                    --with-magics=/Users/m214003/local/magics-2.14.9 \
 	;;
 # i386-apple-darwin10
     bailung*)
@@ -43,12 +43,10 @@ case "${HOSTNAME}" in
                     --with-udunits2=$HOME/local/udunits-2.1.24 \
                     --with-proj=/opt/local \
                     --with-curl=/opt/local \
-                    --with-libxml2=/usr \
-                    --with-magics=/Users/m214003/local/magics-2.14.9 \
-	            CC=gcc CFLAGS="-g -pipe -D_REENTRANT -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fopenmp" \
+	            CC=gcc CFLAGS="-g -pipe -D_REENTRANT -Wall -W -Wfloat-equal -std=c99 -pedantic -O3 -march=native" \
                     LIBS="-L/opt/local/lib -lopenjpeg"
-#                    --with-libxml2=/usr
-#                    --with-magics=/Users/m214003/local/magics-2.14.9
+#                    --with-libxml2=/usr 
+#                    --with-magics=/Users/m214003/local/magics-2.14.9 
 	;;
     hama*)
 	${CONFPATH}configure --prefix=$HOME/local \
@@ -60,9 +58,9 @@ case "${HOSTNAME}" in
                     --with-szlib=$HOME/local \
                     --with-proj=/opt/local \
                     --with-curl=/opt/local \
-                    --with-libxml2=/usr \
-                    --with-magics=/Users/m214003/local/Magics-2.18.14nio \
-	            CC=gcc CFLAGS="-g -pipe -D_REENTRANT -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fopenmp"
+	            CC=gcc CFLAGS="-g -pipe -D_REENTRANT -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
+#                    --with-libxml2=/usr \
+#                    --with-magics=/Users/m214003/local/Magics-2.18.14nio \
 	;;
 # ia64-xxx-linux
     ds*)
@@ -87,7 +85,7 @@ case "${HOSTNAME}" in
                     --with-szlib=/sw/squeeze-x64/szip-2.1 \
                     --with-udunits2=/sw/squeeze-x64/udunits-2.1.19 \
                     --with-proj=/sw/squeeze-x64/proj-4.7.0 \
-                    CC=gcc CFLAGS='-g -Wall -O3 -march=native -fopenmp'
+                    CC=gcc CFLAGS='-g -Wall -O3 -march=native'
 	;;
 # x86_64-lenny-linux-gnu
     squall*)
@@ -100,7 +98,7 @@ case "${HOSTNAME}" in
                     --with-szlib=/sw/squeeze-x64/szip-2.1 \
                     --with-udunits2=/sw/squeeze-x64/udunits-2.1.19 \
                     --with-proj=/sw/squeeze-x64/proj-4.7.0 \
-                    CC=gcc CFLAGS='-g -Wall -O3 -fopenmp'
+                    CC=gcc CFLAGS='-g -Wall -O3'
 	;;
 # x86_64-archlinux
     thingol*)
@@ -115,19 +113,9 @@ case "${HOSTNAME}" in
                     --with-magics=$HOME/src/cdo/branches/libs4cdo/build-dev \
                     --with-libxml2=/usr \
                       --with-pic \
-                      CC=gcc CFLAGS="-g -Wall -O2 -fopenmp -DWITH_DATA" \
+                      CC=gcc CFLAGS="-g -Wall -O2 -DWITH_DATA" \
                       LDFLAGS='-L/home/ram/local/netcdf-4.1.2/lib -L/usr/lib64 -L/usr/lib -lhdf5_hl -lhdf5  -lz -lm -lhdf5_hl -lhdf5 -lz  -lcurl -L/usr/local/lib64 -L/usr/X11R6/lib64 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lz -lgd -lproj -lgrib_api -lpng -lxml2 -lm -ljasper -lopenjpeg   -L/home/ram/local/netcdf-4.1.2/lib -lnetcdf_c++ -lnetcdf  -lcurl  -lstdc++ -lgfortran'
 	;;
-# i686-suse-linux
-    linux | laptop)
-	${CONFPATH}configure --prefix=$HOME/local \
-                    --with-jasper=/usr \
-                    --with-grib_api=$HOME/local \
-                    --with-netcdf=$HOME/local \
-                    --with-hdf5=$HOME/local \
-                    --with-szlib=$HOME/local \
-	            CC=colorgcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2 -fopenmp"
-	;;
 # standard workstations at MPI-M x86_64-lenny
     mpipc* )
 	${CONFPATH}configure \
@@ -138,7 +126,7 @@ case "${HOSTNAME}" in
                --with-szlib='/sw/lenny-x64/szip-latest' \
                --with-proj='/sw/lenny-x64/proj-latest' \
                --enable-ruby --enable-swig --enable-python \
-	           CC=gcc CFLAGS="-g -fopenmp -Wall -W -Wfloat-equal -pedantic -O2"
+	           CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
         ;;
 # dap enabled
     egmont | columbine)
@@ -149,7 +137,7 @@ case "${HOSTNAME}" in
                     --with-szlib=/sw/etch-ia32/szip-2.1 \
                     --with-proj=/sw/etch-ia32/proj-4.6.0 \
 	            --enable-all-static CC=icc CFLAGS="-g -fast -openmp" AR=xiar LD=xild
-#	            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2 -fopenmp"
+#	            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
     ;;
 # i386-pc-solaris2.10
     grim | mil* )
@@ -187,7 +175,7 @@ case "${HOSTNAME}" in
                     --with-netcdf=/sw/centos58-x64/netcdf-4.2.1.1 \
                     --with-szlib=/sw/centos58-x64/szip-2.1 \
                     --with-zlib=/usr \
-	            CC=gcc44 CFLAGS="-g -Wall -O3 -fopenmp"
+	            CC=gcc44 CFLAGS="-g -Wall -O3"
 	;;
 # powerpc-ibm-aix5.2.0.0
     ecga*)
@@ -211,7 +199,7 @@ case "${HOSTNAME}" in
                     --with-udunits2=/sw/aix61/udunits-2.1.14 \
                     --with-proj=/sw/aix53/proj-4.6.1 \
                     --with-curl=/sw/aix61/curl-7.21.3 \
-                    AR="ar -X 64"  LDFLAGS="-brtl" \
+                    AR="ar -X 64"  LDFLAGS="-brtl -R/sw/aix61/openssl-1.0.0d/lib:/sw/aix61/zlib-1.2.6/lib" \
  	            CC=xlc_r CFLAGS="-g -O3 -q64 -qhot -qstrict -qarch=auto -qtune=auto -qsmp=omp -DHAVE_MMAP -qthreaded"
 	;;
     vip*)
diff --git a/config/depcomp b/config/depcomp
index df8eea7..4ebd5b3 100755
--- a/config/depcomp
+++ b/config/depcomp
@@ -1,10 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2013 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
@@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
   -h | --h*)
     cat <<\EOF
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -40,11 +39,11 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  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.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake at gnu.org>.
@@ -57,6 +56,66 @@ EOF
     ;;
 esac
 
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
 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
@@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
 
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
 # 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
@@ -80,18 +142,32 @@ if test "$depmode" = hp; then
 fi
 
 if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
 fi
 
 cygpath_u="cygpath -u -f -"
 if test "$depmode" = msvcmsys; then
-   # This is just like msvisualcpp but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u="sed s,\\\\\\\\,/,g"
-   depmode=msvisualcpp
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
 fi
 
 case "$depmode" in
@@ -114,8 +190,7 @@ gcc3)
   done
   "$@"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -123,13 +198,17 @@ gcc3)
   ;;
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## 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).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -137,31 +216,31 @@ gcc)
   fi
   "$@" -Wp,"$gccflag$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     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.
+  # 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.
+## 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
+## 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.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## 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"
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -179,8 +258,7 @@ sgi)
     "$@" -MDupdate "$tmpdepfile"
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -188,43 +266,41 @@ sgi)
 
   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
+    # 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"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$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"
+    tr ' ' "$nl" < "$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"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # 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
+  ;;
+
 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
+  # 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.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.u
     tmpdepfile2=$base.u
@@ -237,9 +313,7 @@ aix)
     "$@" -M
   fi
   stat=$?
-
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
@@ -248,44 +322,100 @@ aix)
   do
     test -f "$tmpdepfile" && break
   done
-  if test -f "$tmpdepfile"; then
-    # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$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"
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
   fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
   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
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\' :
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
 
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -297,8 +427,8 @@ icc)
   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"
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -309,9 +439,8 @@ hp2)
   # 'foo.d', which lands next to the object file, wherever that
   # happens to be.
   # Much of this is similar to the tru64 case; see comments there.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from  "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.d
     tmpdepfile2=$dir.libs/$base.d
@@ -322,8 +451,7 @@ hp2)
     "$@" +Maked
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
      rm -f "$tmpdepfile1" "$tmpdepfile2"
      exit $stat
   fi
@@ -333,77 +461,107 @@ hp2)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
-	       s/^ *//
-	       s/ \\*$//
-	       s/$/:/
-	       p
-	     }' "$tmpdepfile" >> "$depfile"
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
   else
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile" "$tmpdepfile2"
   ;;
 
 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 mechanism 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 $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"
-   ;;
+  # 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.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies 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$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # 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
+  ;;
 
 #nosideeffect)
   # This comment above is used by automake to tell side-effect
@@ -422,7 +580,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -442,18 +600,18 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # 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.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$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"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -503,12 +661,15 @@ makedepend)
   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"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile" "$tmpdepfile".bak
   ;;
 
@@ -525,7 +686,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -544,10 +705,10 @@ cpp)
     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"
+  "$@" -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"
@@ -579,23 +740,23 @@ msvisualcpp)
       shift
       ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-	set fnord "$@"
-	shift
-	shift
-	;;
+        set fnord "$@"
+        shift
+        shift
+        ;;
     *)
-	set fnord "$@" "$arg"
-	shift
-	shift
-	;;
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
     esac
   done
   "$@" -E 2>/dev/null |
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
diff --git a/config/install-sh b/config/install-sh
index 3f83ce9..377bb86 100755
--- a/config/install-sh
+++ b/config/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-11-20.07; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2010-02-06.18; # UTC
 # 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
+# '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
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
+	# Protect names problematic for 'test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
 	shift;;
 
     -T) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -194,7 +202,7 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
@@ -232,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -256,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # 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.
@@ -351,7 +354,7 @@ do
 	      if test -z "$dir_arg" || {
 		   # Check for POSIX incompatibilities with -m.
 		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
+		   # other-writable bit of parent directory when it shouldn't.
 		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
 		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
 		   case $ls_ld_tmpdir in
@@ -389,7 +392,7 @@ do
 
       case $dstdir in
 	/*) prefix='/';;
-	-*) prefix='./';;
+	[-=\(\)!]*) prefix='./';;
 	*)  prefix='';;
       esac
 
@@ -407,7 +410,7 @@ do
 
       for d
       do
-	test -z "$d" && continue
+	test X"$d" = X && continue
 
 	prefix=$prefix$d
 	if test -d "$prefix"; then
diff --git a/config/ltmain.sh b/config/ltmain.sh
index 04eaea4..63ae69d 100755
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -1,10 +1,9 @@
-# Generated from ltmain.m4sh.
 
-# libtool (GNU libtool) 2.2.10
+# libtool (GNU libtool) 2.4.2
 # 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, 2009, 2010 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011 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.
 
@@ -42,6 +41,7 @@
 #       --quiet, --silent    don't print informational messages
 #       --no-quiet, --no-silent
 #                            print informational messages (default)
+#       --no-warn            don't display warning messages
 #       --tag=TAG            use configuration variables from tag TAG
 #   -v, --verbose            print more informational messages than default
 #       --no-verbose         don't print the extra informational messages
@@ -70,17 +70,19 @@
 #         compiler:		$LTCC
 #         compiler flags:		$LTCFLAGS
 #         linker:		$LD (gnu? $with_gnu_ld)
-#         $progname:	(GNU libtool) 2.2.10
+#         $progname:	(GNU libtool) 2.4.2
 #         automake:	$automake_version
 #         autoconf:	$autoconf_version
 #
 # Report bugs to <bug-libtool at gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.2.10
+VERSION=2.4.2
 TIMESTAMP=""
-package_revision=1.3175
+package_revision=1.3337
 
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -135,15 +137,10 @@ progpath="$0"
 
 : ${CP="cp -f"}
 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="grep -E"}
-: ${FGREP="grep -F"}
-: ${GREP="grep"}
-: ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="sed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
@@ -163,6 +160,27 @@ IFS=" 	$lt_nl"
 dirname="s,/[^/]*$,,"
 basename="s,^.*/,,"
 
+# 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 ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
 # func_dirname_and_basename file append nondir_replacement
 # perform func_basename and func_dirname in a single function
 # call:
@@ -177,17 +195,31 @@ basename="s,^.*/,,"
 # those functions but instead duplicate the functionality here.
 func_dirname_and_basename ()
 {
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "${1}" | $SED -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 "${1}" | $SED -e "$basename"`
-}
+    # Extract subdirectory from the argument.
+    func_dirname_result=`$ECHO "${1}" | $SED -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 "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# 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 "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
 
-# Generated shell functions inserted here.
 
 # These SED scripts presuppose an absolute path with a trailing slash.
 pathcar='s,^/\([^/]*\).*$,\1,'
@@ -351,7 +383,7 @@ case $progpath in
      ;;
   *)
      save_IFS="$IFS"
-     IFS=:
+     IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
        IFS="$save_IFS"
        test -x "$progdir/$progname" && break
@@ -370,6 +402,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
 # Same as above, but do not quote variable references.
 double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|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.
@@ -398,7 +439,7 @@ opt_warning=:
 # name if it has been set yet.
 func_echo ()
 {
-    $ECHO "$progname${mode+: }$mode: $*"
+    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
 }
 
 # func_verbose arg...
@@ -424,14 +465,14 @@ func_echo_all ()
 # Echo program name prefixed message to standard error.
 func_error ()
 {
-    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+    $ECHO "$progname: ${opt_mode+$opt_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
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
 
     # bash bug again:
     :
@@ -650,11 +691,30 @@ func_show_eval_locale ()
     fi
 }
 
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
+
 
 # func_version
 # Echo version message to standard output and exit.
 func_version ()
 {
+    $opt_debug
+
     $SED -n '/(C)/!b go
 	:more
 	/\./!{
@@ -676,6 +736,8 @@ func_version ()
 # Echo short help message to standard output and exit.
 func_usage ()
 {
+    $opt_debug
+
     $SED -n '/^# Usage:/,/^#  *.*--help/ {
         s/^# //
 	s/^# *$//
@@ -692,7 +754,10 @@ func_usage ()
 # unless 'noexit' is passed as argument.
 func_help ()
 {
+    $opt_debug
+
     $SED -n '/^# Usage:/,/# Report bugs to/ {
+	:print
         s/^# //
 	s/^# *$//
 	s*\$progname*'$progname'*
@@ -702,10 +767,14 @@ func_help ()
 	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`"'/
+	s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
 	p
-     }' < "$progpath"
+	d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
     ret=$?
     if test -z "$1"; then
       exit $ret
@@ -717,12 +786,39 @@ func_help ()
 # exit_cmd.
 func_missing_arg ()
 {
+    $opt_debug
+
     func_error "missing argument for $1."
     exit_cmd=exit
 }
 
-exit_cmd=:
 
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
+
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
 
 
 
@@ -732,25 +828,64 @@ 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_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
 # func_fatal_configuration arg...
 # Echo program name prefixed message to standard error, followed by
 # a configuration failure hint, and exit.
@@ -840,129 +975,209 @@ func_enable_tag ()
   esac
 }
 
-# Parse options once, thoroughly.  This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
+# 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
+}
+
+
+# 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
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
 
-  # 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
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
     opt="$1"
     shift
-
     case $opt in
-      --config)		func_config					;;
-
-      --debug)		preserve_args="$preserve_args $opt"
+      --debug|-x)	opt_debug='set -x'
 			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|--dryrun|-n)
+			opt_dry_run=:
 			;;
-
-      --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"
+      --config)
+			opt_config=:
+func_config
+			;;
+      --dlopen|-dlopen)
+			optarg="$1"
+			opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
 			shift
 			;;
-
       --preserve-dup-deps)
-			opt_duplicate_deps=:				;;
-
-      --quiet|--silent)	preserve_args="$preserve_args $opt"
-			opt_silent=:
-			opt_verbose=false
+			opt_preserve_dup_deps=:
 			;;
-
-      --no-quiet|--no-silent)
-			preserve_args="$preserve_args $opt"
-			opt_silent=false
+      --features)
+			opt_features=:
+func_features
 			;;
-
-      --verbose| -v)	preserve_args="$preserve_args $opt"
+      --finish)
+			opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+			;;
+      --help)
+			opt_help=:
+			;;
+      --help-all)
+			opt_help_all=:
+opt_help=': help-all'
+			;;
+      --mode)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_mode="$optarg"
+case $optarg 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
+			shift
+			;;
+      --no-silent|--no-quiet)
 			opt_silent=false
-			opt_verbose=:
+func_append preserve_args " $opt"
 			;;
-
-      --no-verbose)	preserve_args="$preserve_args $opt"
+      --no-warning|--no-warn)
+			opt_warning=false
+func_append preserve_args " $opt"
+			;;
+      --no-verbose)
 			opt_verbose=false
+func_append preserve_args " $opt"
 			;;
-
-      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			preserve_args="$preserve_args $opt $1"
-			func_enable_tag "$1"	# tagname is set here
+      --silent|--quiet)
+			opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+			;;
+      --verbose|-v)
+			opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+			;;
+      --tag)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
 			shift
 			;;
 
+      -\?|-h)		func_usage				;;
+      --help)		func_help				;;
+      --version)	func_version				;;
+
       # Separate optargs to long options:
-      -dlopen=*|--mode=*|--tag=*)
-			func_opt_split "$opt"
-			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+      --*=*)
+			func_split_long_opt "$opt"
+			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
 			shift
 			;;
 
-      -\?|-h)		func_usage					;;
-      --help)		opt_help=:					;;
-      --help-all)	opt_help=': help-all'				;;
-      --version)	func_version					;;
-
-      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
-
-      *)		nonopt="$opt"
-			break
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+			func_split_short_opt "$opt"
+			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+			shift
 			;;
+
+      --)		break					;;
+      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
+      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
     esac
   done
 
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
 
   case $host in
     *cygwin* | *mingw* | *pw32* | *cegcc*)
@@ -970,82 +1185,44 @@ func_enable_tag ()
       opt_duplicate_compiler_generated_deps=:
       ;;
     *)
-      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
       ;;
   esac
 
-  # Having warned about all mis-specified options, bail out if
-  # anything was wrong.
-  $exit_cmd $EXIT_FAILURE
-}
+  $opt_help || {
+    # Sanity checks first:
+    func_check_version_match
 
-# 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
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
     fi
 
-    exit $EXIT_MISMATCH
-  fi
-}
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
 
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    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."
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
 
 
-  # Darwin sucks
-  eval std_shrext=\"$shrext_cmds\"
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
 
 
-  # 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."
-}
 
+## ----------- ##
+##    Main.    ##
+## ----------- ##
 
 # func_lalib_p file
 # True iff FILE is a libtool `.la' library or `.lo' object file.
@@ -1110,12 +1287,9 @@ func_ltwrapper_executable_p ()
 # 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_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
 }
 
 # func_ltwrapper_p file
@@ -1161,6 +1335,37 @@ func_source ()
 }
 
 
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case "$lt_sysroot:$1" in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result="=$func_stripname_result"
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$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.
@@ -1173,8 +1378,7 @@ func_infer_tag ()
     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"
+	func_append_quoted CC_quoted "$arg"
       done
       CC_expanded=`func_echo_all $CC`
       CC_quoted_expanded=`func_echo_all $CC_quoted`
@@ -1193,8 +1397,7 @@ func_infer_tag ()
 	    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"
+	      func_append_quoted CC_quoted "$arg"
 	    done
 	    CC_expanded=`func_echo_all $CC`
 	    CC_quoted_expanded=`func_echo_all $CC_quoted`
@@ -1225,43 +1428,523 @@ func_infer_tag ()
 }
 
 
-
-# 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 ()
+
+# 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}"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # 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_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# 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.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # 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_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
 {
-    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_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
 
-    $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
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
 
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
 
-EOF
-      $MV "${write_libobj}T" "${write_libobj}"
-    }
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # 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_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
 }
+# end func_convert_path_nix_to_cygwin
+
 
 # func_mode_compile arg...
 func_mode_compile ()
@@ -1303,12 +1986,12 @@ func_mode_compile ()
 	  ;;
 
 	-pie | -fpie | -fPIE)
-          pie_flag="$pie_flag $arg"
+          func_append pie_flag " $arg"
 	  continue
 	  ;;
 
 	-shared | -static | -prefer-pic | -prefer-non-pic)
-	  later="$later $arg"
+	  func_append later " $arg"
 	  continue
 	  ;;
 
@@ -1329,15 +2012,14 @@ func_mode_compile ()
 	  save_ifs="$IFS"; IFS=','
 	  for arg in $args; do
 	    IFS="$save_ifs"
-	    func_quote_for_eval "$arg"
-	    lastarg="$lastarg $func_quote_for_eval_result"
+	    func_append_quoted lastarg "$arg"
 	  done
 	  IFS="$save_ifs"
 	  func_stripname ' ' '' "$lastarg"
 	  lastarg=$func_stripname_result
 
 	  # Add the arguments to base_compile.
-	  base_compile="$base_compile $lastarg"
+	  func_append base_compile " $lastarg"
 	  continue
 	  ;;
 
@@ -1353,8 +2035,7 @@ func_mode_compile ()
       esac    #  case $arg_mode
 
       # Aesthetically quote the previous argument.
-      func_quote_for_eval "$lastarg"
-      base_compile="$base_compile $func_quote_for_eval_result"
+      func_append_quoted base_compile "$lastarg"
     done # for arg
 
     case $arg_mode in
@@ -1379,7 +2060,7 @@ func_mode_compile ()
     *.[cCFSifmso] | \
     *.ada | *.adb | *.ads | *.asm | \
     *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
       func_xform "$libobj"
       libobj=$func_xform_result
       ;;
@@ -1485,17 +2166,16 @@ compiler."
 	$opt_dry_run || $RM $removelist
 	exit $EXIT_FAILURE
       fi
-      removelist="$removelist $output_obj"
+      func_append removelist " $output_obj"
       $ECHO "$srcfile" > "$lockfile"
     fi
 
     $opt_dry_run || $RM $removelist
-    removelist="$removelist $lockfile"
+    func_append 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_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
     func_quote_for_eval "$srcfile"
     qsrcfile=$func_quote_for_eval_result
 
@@ -1515,7 +2195,7 @@ compiler."
 
       if test -z "$output_obj"; then
 	# Place PIC objects in $objdir
-	command="$command -o $lobj"
+	func_append command " -o $lobj"
       fi
 
       func_show_eval_locale "$command"	\
@@ -1562,11 +2242,11 @@ compiler."
 	command="$base_compile $qsrcfile $pic_flag"
       fi
       if test "$compiler_c_o" = yes; then
-	command="$command -o $obj"
+	func_append command " -o $obj"
       fi
 
       # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
+      func_append command "$suppress_output"
       func_show_eval_locale "$command" \
         '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
@@ -1611,13 +2291,13 @@ compiler."
 }
 
 $opt_help || {
-  test "$mode" = compile && func_mode_compile ${1+"$@"}
+  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
 {
     # We need to display help for each of the modes.
-    case $mode in
+    case $opt_mode in
       "")
         # Generic help is extracted from the usage comments
         # at the start of this file.
@@ -1793,7 +2473,7 @@ Otherwise, only FILE itself is deleted using RM."
         ;;
 
       *)
-        func_fatal_help "invalid operation mode \`$mode'"
+        func_fatal_help "invalid operation mode \`$opt_mode'"
         ;;
     esac
 
@@ -1808,13 +2488,13 @@ if $opt_help; then
   else
     {
       func_help noexit
-      for mode in compile link execute install finish uninstall clean; do
+      for opt_mode in compile link execute install finish uninstall clean; do
 	func_mode_help
       done
     } | sed -n '1p; 2,$s/^Usage:/  or: /p'
     {
       func_help noexit
-      for mode in compile link execute install finish uninstall clean; do
+      for opt_mode in compile link execute install finish uninstall clean; do
 	echo
 	func_mode_help
       done
@@ -1843,13 +2523,16 @@ func_mode_execute ()
       func_fatal_help "you must specify a COMMAND"
 
     # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
+    for file in $opt_dlopen; do
       test -f "$file" \
 	|| func_fatal_help "\`$file' is not a file"
 
       dir=
       case $file in
       *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
 	# 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"
@@ -1871,7 +2554,7 @@ func_mode_execute ()
 	dir="$func_dirname_result"
 
 	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
+	  func_append dir "/$objdir"
 	else
 	  if test ! -f "$dir/$dlname"; then
 	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
@@ -1928,8 +2611,7 @@ func_mode_execute ()
 	;;
       esac
       # Quote arguments (to preserve shell metacharacters).
-      func_quote_for_eval "$file"
-      args="$args $func_quote_for_eval_result"
+      func_append_quoted args "$file"
     done
 
     if test "X$opt_dry_run" = Xfalse; then
@@ -1961,22 +2643,59 @@ func_mode_execute ()
     fi
 }
 
-test "$mode" = execute && func_mode_execute ${1+"$@"}
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
 
 
 # func_mode_finish arg...
 func_mode_finish ()
 {
     $opt_debug
-    libdirs="$nonopt"
+    libs=
+    libdirs=
     admincmds=
 
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+	func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+	if func_lalib_unsafe_p "$opt"; then
+	  func_append libs " $opt"
+	else
+	  func_warning "\`$opt' is not a valid libtool archive"
+	fi
+
+      else
+	func_fatal_error "invalid argument \`$opt'"
+      fi
+    done
+
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
+
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+	    > $tmpdir/tmp-la
+	  mv -f $tmpdir/tmp-la $lib
+	done
+        ${RM}r "$tmpdir"
+      fi
+    fi
 
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
       for libdir in $libdirs; do
 	if test -n "$finish_cmds"; then
 	  # Do each command in the finish commands.
@@ -1986,7 +2705,7 @@ func_mode_finish ()
 	if test -n "$finish_eval"; then
 	  # Do the single finish_eval.
 	  eval cmds=\"$finish_eval\"
-	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+	  $opt_dry_run || eval "$cmds" || func_append admincmds "
        $cmds"
 	fi
       done
@@ -1995,53 +2714,55 @@ func_mode_finish ()
     # Exit here if they wanted silent mode.
     $opt_silent && exit $EXIT_SUCCESS
 
-    echo "----------------------------------------------------------------------"
-    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\"
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      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 "   - 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 "----------------------------------------------------------------------"
+      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 "----------------------------------------------------------------------"
+    fi
     exit $EXIT_SUCCESS
 }
 
-test "$mode" = finish && func_mode_finish ${1+"$@"}
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
 
 
 # func_mode_install arg...
@@ -2066,7 +2787,7 @@ func_mode_install ()
     # 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"
+    func_append install_prog "$func_quote_for_eval_result"
     install_shared_prog=$install_prog
     case " $install_prog " in
       *[\\\ /]cp\ *) install_cp=: ;;
@@ -2086,7 +2807,7 @@ func_mode_install ()
     do
       arg2=
       if test -n "$dest"; then
-	files="$files $dest"
+	func_append files " $dest"
 	dest=$arg
 	continue
       fi
@@ -2124,11 +2845,11 @@ func_mode_install ()
 
       # Aesthetically quote the argument.
       func_quote_for_eval "$arg"
-      install_prog="$install_prog $func_quote_for_eval_result"
+      func_append install_prog " $func_quote_for_eval_result"
       if test -n "$arg2"; then
 	func_quote_for_eval "$arg2"
       fi
-      install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
+      func_append install_shared_prog " $func_quote_for_eval_result"
     done
 
     test -z "$install_prog" && \
@@ -2140,7 +2861,7 @@ func_mode_install ()
     if test -n "$install_override_mode" && $no_mode; then
       if $install_cp; then :; else
 	func_quote_for_eval "$install_override_mode"
-	install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
+	func_append install_shared_prog " -m $func_quote_for_eval_result"
       fi
     fi
 
@@ -2198,10 +2919,13 @@ func_mode_install ()
       case $file in
       *.$libext)
 	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
+	func_append staticlibs " $file"
 	;;
 
       *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
 	# 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"
@@ -2215,19 +2939,19 @@ func_mode_install ()
 	if test "X$destdir" = "X$libdir"; then
 	  case "$current_libdirs " in
 	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  *) func_append current_libdirs " $libdir" ;;
 	  esac
 	else
 	  # Note the libdir as a future libdir.
 	  case "$future_libdirs " in
 	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  *) func_append future_libdirs " $libdir" ;;
 	  esac
 	fi
 
 	func_dirname "$file" "/" ""
 	dir="$func_dirname_result"
-	dir="$dir$objdir"
+	func_append dir "$objdir"
 
 	if test -n "$relink_command"; then
 	  # Determine the prefix the user has applied to our future dir.
@@ -2304,7 +3028,7 @@ func_mode_install ()
 	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 
 	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	test -n "$old_library" && func_append staticlibs " $dir/$old_library"
 	;;
 
       *.lo)
@@ -2478,11 +3202,13 @@ func_mode_install ()
 
       # Set up the ranlib parameters.
       oldlib="$destdir/$name"
+      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+      tool_oldlib=$func_to_tool_file_result
 
       func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
 
       if test -n "$stripme" && test -n "$old_striplib"; then
-	func_show_eval "$old_striplib $oldlib" 'exit $?'
+	func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
       fi
 
       # Do each command in the postinstall commands.
@@ -2501,7 +3227,7 @@ func_mode_install ()
     fi
 }
 
-test "$mode" = install && func_mode_install ${1+"$@"}
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
 
 
 # func_generate_dlsyms outputname originator pic_p
@@ -2548,6 +3274,18 @@ extern \"C\" {
 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
 #endif
 
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 /* External symbol declarations for the compiler. */\
 "
 
@@ -2559,8 +3297,9 @@ extern \"C\" {
 	  # Add our own program objects to the symbol list.
 	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$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'"
+	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
 	  done
 
 	  if test -n "$exclude_expsyms"; then
@@ -2609,10 +3348,52 @@ extern \"C\" {
 	  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'"
-	  }
+          case $host in
+	    *cygwin* | *mingw* | *cegcc* )
+	      # if an import library, we need to obtain dlname
+	      if func_win32_import_lib_p "$dlprefile"; then
+	        func_tr_sh "$dlprefile"
+	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
+	        dlprefile_dlbasename=""
+	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+	          # Use subshell, to avoid clobbering current variable values
+	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+	          if test -n "$dlprefile_dlname" ; then
+	            func_basename "$dlprefile_dlname"
+	            dlprefile_dlbasename="$func_basename_result"
+	          else
+	            # no lafile. user explicitly requested -dlpreopen <import library>.
+	            $sharedlib_from_linklib_cmd "$dlprefile"
+	            dlprefile_dlbasename=$sharedlib_from_linklib_result
+	          fi
+	        fi
+	        $opt_dry_run || {
+	          if test -n "$dlprefile_dlbasename" ; then
+	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+	          else
+	            func_warning "Could not compute DLL name from $name"
+	            eval '$ECHO ": $name " >> "$nlist"'
+	          fi
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+	            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+	        }
+	      else # not an import lib
+	        $opt_dry_run || {
+	          eval '$ECHO ": $name " >> "$nlist"'
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	        }
+	      fi
+	    ;;
+	    *)
+	      $opt_dry_run || {
+	        eval '$ECHO ": $name " >> "$nlist"'
+	        func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	        eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	      }
+	    ;;
+          esac
 	done
 
 	$opt_dry_run || {
@@ -2650,26 +3431,9 @@ 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
+extern LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
+LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[] =
 {\
   { \"$my_originator\", (void *) 0 },"
@@ -2709,7 +3473,7 @@ static const void *lt_preloaded_setup() {
 	  # 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*)
+	  *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
 	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
 	  *-*-hpux*)
 	    pic_flag_for_symtable=" $pic_flag"  ;;
@@ -2725,7 +3489,7 @@ static const void *lt_preloaded_setup() {
 	for arg in $LTCFLAGS; do
 	  case $arg in
 	  -pie | -fpie | -fPIE) ;;
-	  *) symtab_cflags="$symtab_cflags $arg" ;;
+	  *) func_append symtab_cflags " $arg" ;;
 	  esac
 	done
 
@@ -2788,7 +3552,8 @@ func_win32_libid ()
     # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
        $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
-      win32_nmres=`eval $NM -f posix -A $1 |
+      func_to_tool_file "$1" func_convert_file_msys_to_w32
+      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
 	$SED -n -e '
 	    1,100{
 		/ I /{
@@ -2817,6 +3582,131 @@ func_win32_libid ()
   $ECHO "$win32_libid_type"
 }
 
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[	 ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
 
 
 # func_extract_an_archive dir oldlib
@@ -3095,14 +3985,17 @@ func_exec_program_core ()
 # launches target application with the remaining arguments.
 func_exec_program ()
 {
-  for lt_wr_arg
-  do
-    case \$lt_wr_arg in
-    --lt-*) ;;
-    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
-    esac
-    shift
-  done
+  case \" \$* \" in
+  *\\ --lt-*)
+    for lt_wr_arg
+    do
+      case \$lt_wr_arg in
+      --lt-*) ;;
+      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+      esac
+      shift
+    done ;;
+  esac
   func_exec_program_core \${1+\"\$@\"}
 }
 
@@ -3195,6 +4088,18 @@ func_exec_program ()
 
   if test -f \"\$progdir/\$program\"; then"
 
+	# fixup the dll searchpath if we need to.
+	#
+	# Fix the DLL searchpath if we need to.  Do this before prepending
+	# to shlibpath, because on Windows, both are PATH and uninstalled
+	# libraries must come first.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
 	# Export our shlibpath_var if we have one.
 	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
 	  $ECHO "\
@@ -3209,14 +4114,6 @@ func_exec_program ()
 "
 	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.
@@ -3234,166 +4131,6 @@ fi\
 }
 
 
-# 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
-            func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
-              $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_path_result=`cygpath -w "$1" |
-	      $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_stripname : : "$1"
-        func_to_host_pathlist_tmp1=$func_stripname_result
-        case $build in
-          *mingw* ) # Actually, msys.
-            # Awkward: cmd appends spaces to result.
-            func_to_host_pathlist_result=`
-	      ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
-	      $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
-              $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_append func_to_host_pathlist_result ";$func_to_host_path_result"
-                  fi
-                fi
-              fi
-            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_append 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
@@ -3563,14 +4300,14 @@ void lt_dump_script (FILE *f);
 EOF
 
 	    cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
+volatile 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"
+              func_to_host_path "$temp_rpath"
 	      cat <<EOF
-const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
 EOF
 	    else
 	      cat <<"EOF"
@@ -3579,10 +4316,10 @@ EOF
 	    fi
 
 	    if test -n "$dllsearchpath"; then
-              func_to_host_pathlist "$dllsearchpath:"
+              func_to_host_path "$dllsearchpath:"
 	      cat <<EOF
 const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
 EOF
 	    else
 	      cat <<"EOF"
@@ -3765,8 +4502,12 @@ EOF
 
   lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
   lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
   lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
 
   lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
 		  nonnull (lt_argv_zero));
@@ -4322,9 +5063,15 @@ void lt_dump_script (FILE* f)
 {
 EOF
 	    func_emit_wrapper yes |
-              $SED -e 's/\([\\"]\)/\\\1/g' \
-	           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
-
+	      $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/  fputs ("\1", f);/p
+g
+D'
             cat <<"EOF"
 }
 EOF
@@ -4515,9 +5262,9 @@ func_mode_link ()
 	    ;;
 	  *)
 	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
+	      func_append dlfiles " $arg"
 	    else
-	      dlprefiles="$dlprefiles $arg"
+	      func_append dlprefiles " $arg"
 	    fi
 	    prev=
 	    continue
@@ -4541,7 +5288,7 @@ func_mode_link ()
 	    *-*-darwin*)
 	      case "$deplibs " in
 		*" $qarg.ltframework "*) ;;
-		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		*) func_append deplibs " $qarg.ltframework" # this is fixed later
 		   ;;
 	      esac
 	      ;;
@@ -4560,7 +5307,7 @@ func_mode_link ()
 	    moreargs=
 	    for fil in `cat "$save_arg"`
 	    do
-#	      moreargs="$moreargs $fil"
+#	      func_append moreargs " $fil"
 	      arg=$fil
 	      # A libtool-controlled object.
 
@@ -4589,7 +5336,7 @@ func_mode_link ()
 
 		  if test "$prev" = dlfiles; then
 		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		      dlfiles="$dlfiles $pic_object"
+		      func_append dlfiles " $pic_object"
 		      prev=
 		      continue
 		    else
@@ -4601,7 +5348,7 @@ func_mode_link ()
 		  # CHECK ME:  I think I busted this.  -Ossama
 		  if test "$prev" = dlprefiles; then
 		    # Preload the old-style object.
-		    dlprefiles="$dlprefiles $pic_object"
+		    func_append dlprefiles " $pic_object"
 		    prev=
 		  fi
 
@@ -4671,12 +5418,12 @@ func_mode_link ()
 	  if test "$prev" = rpath; then
 	    case "$rpath " in
 	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
+	    *) func_append rpath " $arg" ;;
 	    esac
 	  else
 	    case "$xrpath " in
 	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
+	    *) func_append xrpath " $arg" ;;
 	    esac
 	  fi
 	  prev=
@@ -4688,28 +5435,28 @@ func_mode_link ()
 	  continue
 	  ;;
 	weak)
-	  weak_libs="$weak_libs $arg"
+	  func_append weak_libs " $arg"
 	  prev=
 	  continue
 	  ;;
 	xcclinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $qarg"
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $qarg"
 	  prev=
 	  func_append compile_command " $qarg"
 	  func_append finalize_command " $qarg"
 	  continue
 	  ;;
 	xcompiler)
-	  compiler_flags="$compiler_flags $qarg"
+	  func_append 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"
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $wl$qarg"
 	  prev=
 	  func_append compile_command " $wl$qarg"
 	  func_append finalize_command " $wl$qarg"
@@ -4800,15 +5547,16 @@ func_mode_link ()
 	;;
 
       -L*)
-	func_stripname '-L' '' "$arg"
-	dir=$func_stripname_result
-	if test -z "$dir"; then
+	func_stripname "-L" '' "$arg"
+	if test -z "$func_stripname_result"; 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
+	func_resolve_sysroot "$func_stripname_result"
+	dir=$func_resolve_sysroot_result
 	# We need an absolute path.
 	case $dir in
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -4820,10 +5568,16 @@ func_mode_link ()
 	  ;;
 	esac
 	case "$deplibs " in
-	*" -L$dir "*) ;;
+	*" -L$dir "* | *" $arg "*)
+	  # Will only happen for absolute or sysroot arguments
+	  ;;
 	*)
-	  deplibs="$deplibs -L$dir"
-	  lib_search_path="$lib_search_path $dir"
+	  # Preserve sysroot, but never include relative directories
+	  case $dir in
+	    [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+	    *) func_append deplibs " -L$dir" ;;
+	  esac
+	  func_append lib_search_path " $dir"
 	  ;;
 	esac
 	case $host in
@@ -4832,12 +5586,12 @@ func_mode_link ()
 	  case :$dllsearchpath: in
 	  *":$dir:"*) ;;
 	  ::) dllsearchpath=$dir;;
-	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  *) func_append dllsearchpath ":$dir";;
 	  esac
 	  case :$dllsearchpath: in
 	  *":$testbindir:"*) ;;
 	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  *) func_append dllsearchpath ":$testbindir";;
 	  esac
 	  ;;
 	esac
@@ -4861,7 +5615,7 @@ func_mode_link ()
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C and math libraries are in the System framework
-	    deplibs="$deplibs System.ltframework"
+	    func_append deplibs " System.ltframework"
 	    continue
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
@@ -4881,7 +5635,7 @@ func_mode_link ()
 	   ;;
 	 esac
 	fi
-	deplibs="$deplibs $arg"
+	func_append deplibs " $arg"
 	continue
 	;;
 
@@ -4893,21 +5647,22 @@ func_mode_link ()
       # 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"
+      -model|-arch|-isysroot|--sysroot)
+	func_append 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"
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+	func_append 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" ;;
+	    * ) func_append new_inherited_linker_flags " $arg" ;;
 	esac
 	continue
 	;;
@@ -4974,13 +5729,17 @@ func_mode_link ()
 	# We need an absolute path.
 	case $dir in
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	=*)
+	  func_stripname '=' '' "$dir"
+	  dir=$lt_sysroot$func_stripname_result
+	  ;;
 	*)
 	  func_fatal_error "only absolute run-paths are allowed"
 	  ;;
 	esac
 	case "$xrpath " in
 	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
+	*) func_append xrpath " $dir" ;;
 	esac
 	continue
 	;;
@@ -5033,8 +5792,8 @@ func_mode_link ()
 	for flag in $args; do
 	  IFS="$save_ifs"
           func_quote_for_eval "$flag"
-	  arg="$arg $func_quote_for_eval_result"
-	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
+	  func_append arg " $func_quote_for_eval_result"
+	  func_append compiler_flags " $func_quote_for_eval_result"
 	done
 	IFS="$save_ifs"
 	func_stripname ' ' '' "$arg"
@@ -5049,9 +5808,9 @@ func_mode_link ()
 	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"
+	  func_append arg " $wl$func_quote_for_eval_result"
+	  func_append compiler_flags " $wl$func_quote_for_eval_result"
+	  func_append linker_flags " $func_quote_for_eval_result"
 	done
 	IFS="$save_ifs"
 	func_stripname ' ' '' "$arg"
@@ -5090,13 +5849,16 @@ func_mode_link ()
       # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
       # @file                GCC response files
       # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
         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"
+        func_append compiler_flags " $arg"
         continue
         ;;
 
@@ -5108,7 +5870,7 @@ func_mode_link ()
 
       *.$objext)
 	# A standard object.
-	objs="$objs $arg"
+	func_append objs " $arg"
 	;;
 
       *.lo)
@@ -5139,7 +5901,7 @@ func_mode_link ()
 
 	    if test "$prev" = dlfiles; then
 	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		dlfiles="$dlfiles $pic_object"
+		func_append dlfiles " $pic_object"
 		prev=
 		continue
 	      else
@@ -5151,7 +5913,7 @@ func_mode_link ()
 	    # CHECK ME:  I think I busted this.  -Ossama
 	    if test "$prev" = dlprefiles; then
 	      # Preload the old-style object.
-	      dlprefiles="$dlprefiles $pic_object"
+	      func_append dlprefiles " $pic_object"
 	      prev=
 	    fi
 
@@ -5196,24 +5958,25 @@ func_mode_link ()
 
       *.$libext)
 	# An archive.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
+	func_append deplibs " $arg"
+	func_append old_deplibs " $arg"
 	continue
 	;;
 
       *.la)
 	# A libtool-controlled library.
 
+	func_resolve_sysroot "$arg"
 	if test "$prev" = dlfiles; then
 	  # This library was specified with -dlopen.
-	  dlfiles="$dlfiles $arg"
+	  func_append dlfiles " $func_resolve_sysroot_result"
 	  prev=
 	elif test "$prev" = dlprefiles; then
 	  # The library was specified with -dlpreopen.
-	  dlprefiles="$dlprefiles $arg"
+	  func_append dlprefiles " $func_resolve_sysroot_result"
 	  prev=
 	else
-	  deplibs="$deplibs $arg"
+	  func_append deplibs " $func_resolve_sysroot_result"
 	fi
 	continue
 	;;
@@ -5260,6 +6023,8 @@ func_mode_link ()
 
     func_dirname "$output" "/" ""
     output_objdir="$func_dirname_result$objdir"
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
     # Create the object directory.
     func_mkdir_p "$output_objdir"
 
@@ -5280,12 +6045,12 @@ func_mode_link ()
     # 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
+      if $opt_preserve_dup_deps ; then
 	case "$libs " in
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	esac
       fi
-      libs="$libs $deplib"
+      func_append libs " $deplib"
     done
 
     if test "$linkmode" = lib; then
@@ -5298,9 +6063,9 @@ func_mode_link ()
       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" ;;
+	  *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
 	  esac
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	  func_append pre_post_deps " $pre_post_dep"
 	done
       fi
       pre_post_deps=
@@ -5367,8 +6132,9 @@ func_mode_link ()
 	for lib in $dlprefiles; do
 	  # Ignore non-libtool-libs
 	  dependency_libs=
+	  func_resolve_sysroot "$lib"
 	  case $lib in
-	  *.la)	func_source "$lib" ;;
+	  *.la)	func_source "$func_resolve_sysroot_result" ;;
 	  esac
 
 	  # Collect preopened libtool deplibs, except any this library
@@ -5378,7 +6144,7 @@ func_mode_link ()
             deplib_base=$func_basename_result
 	    case " $weak_libs " in
 	    *" $deplib_base "*) ;;
-	    *) deplibs="$deplibs $deplib" ;;
+	    *) func_append deplibs " $deplib" ;;
 	    esac
 	  done
 	done
@@ -5394,16 +6160,17 @@ func_mode_link ()
 	lib=
 	found=no
 	case $deplib in
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
 	  if test "$linkmode,$pass" = "prog,link"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
-	    compiler_flags="$compiler_flags $deplib"
+	    func_append compiler_flags " $deplib"
 	    if test "$linkmode" = lib ; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
-		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
 		esac
 	    fi
 	  fi
@@ -5488,7 +6255,7 @@ func_mode_link ()
 	    if test "$linkmode" = lib ; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
-		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
 		esac
 	    fi
 	  fi
@@ -5501,7 +6268,8 @@ func_mode_link ()
 	    test "$pass" = conv && continue
 	    newdependency_libs="$deplib $newdependency_libs"
 	    func_stripname '-L' '' "$deplib"
-	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  prog)
 	    if test "$pass" = conv; then
@@ -5515,7 +6283,8 @@ func_mode_link ()
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    fi
 	    func_stripname '-L' '' "$deplib"
-	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  *)
 	    func_warning "\`-L' is ignored for archives/objects"
@@ -5526,17 +6295,21 @@ func_mode_link ()
 	-R*)
 	  if test "$pass" = link; then
 	    func_stripname '-R' '' "$deplib"
-	    dir=$func_stripname_result
+	    func_resolve_sysroot "$func_stripname_result"
+	    dir=$func_resolve_sysroot_result
 	    # Make sure the xrpath contains only unique directories.
 	    case "$xrpath " in
 	    *" $dir "*) ;;
-	    *) xrpath="$xrpath $dir" ;;
+	    *) func_append xrpath " $dir" ;;
 	    esac
 	  fi
 	  deplibs="$deplib $deplibs"
 	  continue
 	  ;;
-	*.la) lib="$deplib" ;;
+	*.la)
+	  func_resolve_sysroot "$deplib"
+	  lib=$func_resolve_sysroot_result
+	  ;;
 	*.$libext)
 	  if test "$pass" = conv; then
 	    deplibs="$deplib $deplibs"
@@ -5599,11 +6372,11 @@ func_mode_link ()
 	    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"
+	      func_append newdlprefiles " $deplib"
 	      compile_deplibs="$deplib $compile_deplibs"
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    else
-	      newdlfiles="$newdlfiles $deplib"
+	      func_append newdlfiles " $deplib"
 	    fi
 	  fi
 	  continue
@@ -5649,7 +6422,7 @@ func_mode_link ()
 	  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";;
+	      *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
 	    esac
 	  done
 	fi
@@ -5657,8 +6430,8 @@ func_mode_link ()
 	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"
+	  test -n "$dlopen" && func_append dlfiles " $dlopen"
+	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
 	fi
 
 	if test "$pass" = conv; then
@@ -5669,20 +6442,20 @@ func_mode_link ()
 	      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"
+	    func_append convenience " $ladir/$objdir/$old_library"
+	    func_append 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
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $deplib"
 	  done
 	  continue
 	fi # $pass = conv
@@ -5690,9 +6463,15 @@ func_mode_link ()
 
 	# Get the name of the library we link against.
 	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
+	if test -n "$old_library" &&
+	   { test "$prefer_static_libs" = yes ||
+	     test "$prefer_static_libs,$installed" = "built,no"; }; then
+	  linklib=$old_library
+	else
+	  for l in $old_library $library_names; do
+	    linklib="$l"
+	  done
+	fi
 	if test -z "$linklib"; then
 	  func_fatal_error "cannot find name of link library for \`$lib'"
 	fi
@@ -5709,9 +6488,9 @@ func_mode_link ()
 	    # 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"
+	    func_append dlprefiles " $lib $dependency_libs"
 	  else
-	    newdlfiles="$newdlfiles $lib"
+	    func_append newdlfiles " $lib"
 	  fi
 	  continue
 	fi # $pass = dlopen
@@ -5733,14 +6512,14 @@ func_mode_link ()
 
 	# 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
+	  if test ! -f "$lt_sysroot$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"
+	    dir="$lt_sysroot$libdir"
+	    absdir="$lt_sysroot$libdir"
 	  fi
 	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 	else
@@ -5748,12 +6527,12 @@ func_mode_link ()
 	    dir="$ladir"
 	    absdir="$abs_ladir"
 	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
+	    func_append notinst_path " $abs_ladir"
 	  else
 	    dir="$ladir/$objdir"
 	    absdir="$abs_ladir/$objdir"
 	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
+	    func_append notinst_path " $abs_ladir"
 	  fi
 	fi # $installed = yes
 	func_stripname 'lib' '.la' "$laname"
@@ -5764,20 +6543,46 @@ func_mode_link ()
 	  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
+	  case "$host" in
+	    # special handling for platforms with PE-DLLs.
+	    *cygwin* | *mingw* | *cegcc* )
+	      # Linker will automatically link against shared library if both
+	      # static and shared are present.  Therefore, ensure we extract
+	      # symbols from the import library if a shared library is present
+	      # (otherwise, the dlopen module name will be incorrect).  We do
+	      # this by putting the import library name into $newdlprefiles.
+	      # We recover the dlopen module name by 'saving' the la file
+	      # name in a special purpose variable, and (later) extracting the
+	      # dlname from the la file.
+	      if test -n "$dlname"; then
+	        func_tr_sh "$dir/$linklib"
+	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+	        func_append newdlprefiles " $dir/$linklib"
+	      else
+	        func_append 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" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      fi
+	    ;;
+	    * )
+	      # Prefer using a static library (so that no silly _DYNAMIC symbols
+	      # are required to link).
+	      if test -n "$old_library"; then
+	        func_append 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" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      # Otherwise, use the dlname, so that lt_dlopen finds it.
+	      elif test -n "$dlname"; then
+	        func_append newdlprefiles " $dir/$dlname"
+	      else
+	        func_append newdlprefiles " $dir/$linklib"
+	      fi
+	    ;;
+	  esac
 	fi # $pass = dlpreopen
 
 	if test -z "$libdir"; then
@@ -5795,7 +6600,7 @@ func_mode_link ()
 
 
 	if test "$linkmode" = prog && test "$pass" != link; then
-	  newlib_search_path="$newlib_search_path $ladir"
+	  func_append newlib_search_path " $ladir"
 	  deplibs="$lib $deplibs"
 
 	  linkalldeplibs=no
@@ -5808,7 +6613,8 @@ func_mode_link ()
 	  for deplib in $dependency_libs; do
 	    case $deplib in
 	    -L*) func_stripname '-L' '' "$deplib"
-	         newlib_search_path="$newlib_search_path $func_stripname_result"
+	         func_resolve_sysroot "$func_stripname_result"
+	         func_append newlib_search_path " $func_resolve_sysroot_result"
 		 ;;
 	    esac
 	    # Need to link against all dependency_libs?
@@ -5819,12 +6625,12 @@ func_mode_link ()
 	      # or/and link against static libraries
 	      newdependency_libs="$deplib $newdependency_libs"
 	    fi
-	    if $opt_duplicate_deps ; then
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $deplib"
 	  done # for deplib
 	  continue
 	fi # $linkmode = prog...
@@ -5839,7 +6645,7 @@ func_mode_link ()
 	      # Make sure the rpath contains only unique directories.
 	      case "$temp_rpath:" in
 	      *"$absdir:"*) ;;
-	      *) temp_rpath="$temp_rpath$absdir:" ;;
+	      *) func_append temp_rpath "$absdir:" ;;
 	      esac
 	    fi
 
@@ -5851,7 +6657,7 @@ func_mode_link ()
 	    *)
 	      case "$compile_rpath " in
 	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
+	      *) func_append compile_rpath " $absdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5860,7 +6666,7 @@ func_mode_link ()
 	    *)
 	      case "$finalize_rpath " in
 	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
+	      *) func_append finalize_rpath " $libdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5885,12 +6691,12 @@ func_mode_link ()
 	  case $host in
 	  *cygwin* | *mingw* | *cegcc*)
 	      # No point in relinking DLLs because paths are not encoded
-	      notinst_deplibs="$notinst_deplibs $lib"
+	      func_append notinst_deplibs " $lib"
 	      need_relink=no
 	    ;;
 	  *)
 	    if test "$installed" = no; then
-	      notinst_deplibs="$notinst_deplibs $lib"
+	      func_append notinst_deplibs " $lib"
 	      need_relink=yes
 	    fi
 	    ;;
@@ -5925,7 +6731,7 @@ func_mode_link ()
 	    *)
 	      case "$compile_rpath " in
 	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
+	      *) func_append compile_rpath " $absdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5934,7 +6740,7 @@ func_mode_link ()
 	    *)
 	      case "$finalize_rpath " in
 	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
+	      *) func_append finalize_rpath " $libdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5988,7 +6794,7 @@ func_mode_link ()
 	    linklib=$newlib
 	  fi # test -n "$old_archive_from_expsyms_cmds"
 
-	  if test "$linkmode" = prog || test "$mode" != relink; then
+	  if test "$linkmode" = prog || test "$opt_mode" != relink; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
@@ -6039,12 +6845,12 @@ func_mode_link ()
 	         test "$hardcode_direct_absolute" = no; then
 		add="$dir/$linklib"
 	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$dir"
+		add_dir="-L$absdir"
 		# 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"
+		      func_append add_dir " -L$inst_prefix_dir$libdir"
 		      ;;
 		  esac
 		fi
@@ -6066,7 +6872,7 @@ func_mode_link ()
 	    if test -n "$add_shlibpath"; then
 	      case :$compile_shlibpath: in
 	      *":$add_shlibpath:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
 	      esac
 	    fi
 	    if test "$linkmode" = prog; then
@@ -6080,13 +6886,13 @@ func_mode_link ()
 		 test "$hardcode_shlibpath_var" = yes; then
 		case :$finalize_shlibpath: in
 		*":$libdir:"*) ;;
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		*) func_append finalize_shlibpath "$libdir:" ;;
 		esac
 	      fi
 	    fi
 	  fi
 
-	  if test "$linkmode" = prog || test "$mode" = relink; then
+	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
@@ -6100,7 +6906,7 @@ func_mode_link ()
 	    elif test "$hardcode_shlibpath_var" = yes; then
 	      case :$finalize_shlibpath: in
 	      *":$libdir:"*) ;;
-	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      *) func_append finalize_shlibpath "$libdir:" ;;
 	      esac
 	      add="-l$name"
 	    elif test "$hardcode_automatic" = yes; then
@@ -6117,7 +6923,7 @@ func_mode_link ()
 	      if test -n "$inst_prefix_dir"; then
 		case $libdir in
 		  [\\/]*)
-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    func_append add_dir " -L$inst_prefix_dir$libdir"
 		    ;;
 		esac
 	      fi
@@ -6194,27 +7000,33 @@ func_mode_link ()
 	           temp_xrpath=$func_stripname_result
 		   case " $xrpath " in
 		   *" $temp_xrpath "*) ;;
-		   *) xrpath="$xrpath $temp_xrpath";;
+		   *) func_append xrpath " $temp_xrpath";;
 		   esac;;
-	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      *) func_append temp_deplibs " $libdir";;
 	      esac
 	    done
 	    dependency_libs="$temp_deplibs"
 	  fi
 
-	  newlib_search_path="$newlib_search_path $absdir"
+	  func_append 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 $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $func_resolve_sysroot_result"
 	  done
 
 	  if test "$link_all_deplibs" != no; then
@@ -6224,8 +7036,10 @@ func_mode_link ()
 	      case $deplib in
 	      -L*) path="$deplib" ;;
 	      *.la)
+	        func_resolve_sysroot "$deplib"
+	        deplib=$func_resolve_sysroot_result
 	        func_dirname "$deplib" "" "."
-		dir="$func_dirname_result"
+		dir=$func_dirname_result
 		# We need an absolute path.
 		case $dir in
 		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
@@ -6252,8 +7066,8 @@ func_mode_link ()
                       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}"
+		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
 		      path=
 		    fi
 		  fi
@@ -6303,7 +7117,7 @@ func_mode_link ()
 	  for dir in $newlib_search_path; do
 	    case "$lib_search_path " in
 	    *" $dir "*) ;;
-	    *) lib_search_path="$lib_search_path $dir" ;;
+	    *) func_append lib_search_path " $dir" ;;
 	    esac
 	  done
 	  newlib_search_path=
@@ -6361,10 +7175,10 @@ func_mode_link ()
 	    -L*)
 	      case " $tmp_libs " in
 	      *" $deplib "*) ;;
-	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      *) func_append tmp_libs " $deplib" ;;
 	      esac
 	      ;;
-	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    *) func_append tmp_libs " $deplib" ;;
 	    esac
 	  done
 	  eval $var=\"$tmp_libs\"
@@ -6380,7 +7194,7 @@ func_mode_link ()
 	  ;;
 	esac
 	if test -n "$i" ; then
-	  tmp_libs="$tmp_libs $i"
+	  func_append tmp_libs " $i"
 	fi
       done
       dependency_libs=$tmp_libs
@@ -6421,7 +7235,7 @@ func_mode_link ()
       # Now set the variables for building old libraries.
       build_libtool_libs=no
       oldlibs="$output"
-      objs="$objs$old_deplibs"
+      func_append objs "$old_deplibs"
       ;;
 
     lib)
@@ -6457,7 +7271,7 @@ func_mode_link ()
 	  echo
 	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
 	  $ECHO "*** objects $objs is not portable!"
-	  libobjs="$libobjs $objs"
+	  func_append libobjs " $objs"
 	fi
       fi
 
@@ -6516,6 +7330,7 @@ func_mode_link ()
 	  # which has an extra 1 added just for fun
 	  #
 	  case $version_type in
+	  # correct linux to gnu/linux during the next big refactor
 	  darwin|linux|osf|windows|none)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
@@ -6632,7 +7447,7 @@ func_mode_link ()
 	  versuffix="$major.$revision"
 	  ;;
 
-	linux)
+	linux) # correct to gnu/linux during the next big refactor
 	  func_arith $current - $age
 	  major=.$func_arith_result
 	  versuffix="$major.$age.$revision"
@@ -6655,7 +7470,7 @@ func_mode_link ()
 	  done
 
 	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
+	  func_append verstring ":${current}.0"
 	  ;;
 
 	qnx)
@@ -6723,10 +7538,10 @@ func_mode_link ()
       fi
 
       func_generate_dlsyms "$libname" "$libname" "yes"
-      libobjs="$libobjs $symfileobj"
+      func_append libobjs " $symfileobj"
       test "X$libobjs" = "X " && libobjs=
 
-      if test "$mode" != relink; then
+      if test "$opt_mode" != relink; then
 	# Remove our outputs, but don't remove object files since they
 	# may have been created when compiling PIC objects.
 	removelist=
@@ -6742,7 +7557,7 @@ func_mode_link ()
 		   continue
 		 fi
 	       fi
-	       removelist="$removelist $p"
+	       func_append removelist " $p"
 	       ;;
 	    *) ;;
 	  esac
@@ -6753,7 +7568,7 @@ func_mode_link ()
 
       # 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"
+	func_append oldlibs " $output_objdir/$libname.$libext"
 
 	# Transform .lo files to .o files.
 	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
@@ -6770,10 +7585,11 @@ func_mode_link ()
 	# If the user specified any rpath flags, then add them.
 	temp_xrpath=
 	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
+	  func_replace_sysroot "$libdir"
+	  func_append temp_xrpath " -R$func_replace_sysroot_result"
 	  case "$finalize_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
 	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
@@ -6787,7 +7603,7 @@ func_mode_link ()
       for lib in $old_dlfiles; do
 	case " $dlprefiles $dlfiles " in
 	*" $lib "*) ;;
-	*) dlfiles="$dlfiles $lib" ;;
+	*) func_append dlfiles " $lib" ;;
 	esac
       done
 
@@ -6797,7 +7613,7 @@ func_mode_link ()
       for lib in $old_dlprefiles; do
 	case "$dlprefiles " in
 	*" $lib "*) ;;
-	*) dlprefiles="$dlprefiles $lib" ;;
+	*) func_append dlprefiles " $lib" ;;
 	esac
       done
 
@@ -6809,7 +7625,7 @@ func_mode_link ()
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs System.ltframework"
+	    func_append deplibs " System.ltframework"
 	    ;;
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
@@ -6826,7 +7642,7 @@ func_mode_link ()
 	  *)
 	    # Add libc to deplibs on all other systems if necessary.
 	    if test "$build_libtool_need_lc" = "yes"; then
-	      deplibs="$deplibs -lc"
+	      func_append deplibs " -lc"
 	    fi
 	    ;;
 	  esac
@@ -6875,7 +7691,7 @@ EOF
 		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		  case " $predeps $postdeps " in
 		  *" $i "*)
-		    newdeplibs="$newdeplibs $i"
+		    func_append newdeplibs " $i"
 		    i=""
 		    ;;
 		  esac
@@ -6886,7 +7702,7 @@ EOF
 		  set dummy $deplib_matches; shift
 		  deplib_match=$1
 		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
+		    func_append newdeplibs " $i"
 		  else
 		    droppeddeps=yes
 		    echo
@@ -6900,7 +7716,7 @@ EOF
 		fi
 		;;
 	      *)
-		newdeplibs="$newdeplibs $i"
+		func_append newdeplibs " $i"
 		;;
 	      esac
 	    done
@@ -6918,7 +7734,7 @@ EOF
 		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		    case " $predeps $postdeps " in
 		    *" $i "*)
-		      newdeplibs="$newdeplibs $i"
+		      func_append newdeplibs " $i"
 		      i=""
 		      ;;
 		    esac
@@ -6929,7 +7745,7 @@ EOF
 		    set dummy $deplib_matches; shift
 		    deplib_match=$1
 		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		      newdeplibs="$newdeplibs $i"
+		      func_append newdeplibs " $i"
 		    else
 		      droppeddeps=yes
 		      echo
@@ -6951,7 +7767,7 @@ EOF
 		fi
 		;;
 	      *)
-		newdeplibs="$newdeplibs $i"
+		func_append newdeplibs " $i"
 		;;
 	      esac
 	    done
@@ -6968,15 +7784,27 @@ EOF
 	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
+		  func_append newdeplibs " $a_deplib"
 		  a_deplib=""
 		  ;;
 		esac
 	      fi
 	      if test -n "$a_deplib" ; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
+		if test -n "$file_magic_glob"; then
+		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+		else
+		  libnameglob=$libname
+		fi
+		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  if test "$want_nocaseglob" = yes; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		    $nocaseglob
+		  else
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		  fi
 		  for potent_lib in $potential_libs; do
 		      # Follow soft links.
 		      if ls -lLd "$potent_lib" 2>/dev/null |
@@ -6999,7 +7827,7 @@ EOF
 		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
 			 $SED -e 10q |
 			 $EGREP "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
+			func_append newdeplibs " $a_deplib"
 			a_deplib=""
 			break 2
 		      fi
@@ -7024,7 +7852,7 @@ EOF
 	      ;;
 	    *)
 	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      func_append newdeplibs " $a_deplib"
 	      ;;
 	    esac
 	  done # Gone through all deplibs.
@@ -7040,7 +7868,7 @@ EOF
 	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
+		  func_append newdeplibs " $a_deplib"
 		  a_deplib=""
 		  ;;
 		esac
@@ -7053,7 +7881,7 @@ EOF
 		    potlib="$potent_lib" # see symlink-check above in file_magic test
 		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
 		       $EGREP "$match_pattern_regex" > /dev/null; then
-		      newdeplibs="$newdeplibs $a_deplib"
+		      func_append newdeplibs " $a_deplib"
 		      a_deplib=""
 		      break 2
 		    fi
@@ -7078,7 +7906,7 @@ EOF
 	      ;;
 	    *)
 	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      func_append newdeplibs " $a_deplib"
 	      ;;
 	    esac
 	  done # Gone through all deplibs.
@@ -7182,7 +8010,7 @@ EOF
 	*)
 	  case " $deplibs " in
 	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
+	    func_append new_libs " -L$path/$objdir" ;;
 	  esac
 	  ;;
 	esac
@@ -7192,10 +8020,10 @@ EOF
 	-L*)
 	  case " $new_libs " in
 	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
+	  *) func_append new_libs " $deplib" ;;
 	  esac
 	  ;;
-	*) new_libs="$new_libs $deplib" ;;
+	*) func_append new_libs " $deplib" ;;
 	esac
       done
       deplibs="$new_libs"
@@ -7207,15 +8035,22 @@ EOF
 
       # Test again, we may have decided not to build it any more
       if test "$build_libtool_libs" = yes; then
+	# Remove ${wl} instances when linking with ld.
+	# FIXME: should test the right _cmds variable.
+	case $archive_cmds in
+	  *\$LD\ *) wl= ;;
+        esac
 	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"
+	  test "$opt_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
+		func_replace_sysroot "$libdir"
+		libdir=$func_replace_sysroot_result
 		if test -z "$hardcode_libdirs"; then
 		  hardcode_libdirs="$libdir"
 		else
@@ -7224,18 +8059,18 @@ EOF
 		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		    ;;
 		  *)
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		    ;;
 		  esac
 		fi
 	      else
 		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
+		func_append dep_rpath " $flag"
 	      fi
 	    elif test -n "$runpath_var"; then
 	      case "$perm_rpath " in
 	      *" $libdir "*) ;;
-	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      *) func_append perm_rpath " $libdir" ;;
 	      esac
 	    fi
 	  done
@@ -7243,17 +8078,13 @@ EOF
 	  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
+	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
 	  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:"
+	      func_append rpath "$dir:"
 	    done
 	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
 	  fi
@@ -7261,7 +8092,7 @@ EOF
 	fi
 
 	shlibpath="$finalize_shlibpath"
-	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
 	if test -n "$shlibpath"; then
 	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
 	fi
@@ -7287,7 +8118,7 @@ EOF
 	linknames=
 	for link
 	do
-	  linknames="$linknames $link"
+	  func_append linknames " $link"
 	done
 
 	# Use standard objects if they are pic
@@ -7298,7 +8129,7 @@ EOF
 	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"
+	  func_append delfiles " $export_symbols"
 	fi
 
 	orig_export_symbols=
@@ -7329,13 +8160,45 @@ EOF
 	    $opt_dry_run || $RM $export_symbols
 	    cmds=$export_symbols_cmds
 	    save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
+	    for cmd1 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
+	      # Take the normal branch if the nm_file_list_spec branch
+	      # doesn't work or if tool conversion is not needed.
+	      case $nm_file_list_spec~$to_tool_file_cmd in
+		*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+		  try_normal_branch=yes
+		  eval cmd=\"$cmd1\"
+		  func_len " $cmd"
+		  len=$func_len_result
+		  ;;
+		*)
+		  try_normal_branch=no
+		  ;;
+	      esac
+	      if test "$try_normal_branch" = yes \
+		 && { test "$len" -lt "$max_cmd_len" \
+		      || test "$max_cmd_len" -le -1; }
+	      then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      elif test -n "$nm_file_list_spec"; then
+		func_basename "$output"
+		output_la=$func_basename_result
+		save_libobjs=$libobjs
+		save_output=$output
+		output=${output_objdir}/${output_la}.nm
+		func_to_tool_file "$output"
+		libobjs=$nm_file_list_spec$func_to_tool_file_result
+		func_append delfiles " $output"
+		func_verbose "creating $NM input file list: $output"
+		for obj in $save_libobjs; do
+		  func_to_tool_file "$obj"
+		  $ECHO "$func_to_tool_file_result"
+		done > "$output"
+		eval cmd=\"$cmd1\"
 		func_show_eval "$cmd" 'exit $?'
+		output=$save_output
+		libobjs=$save_libobjs
 		skipped_export=false
 	      else
 		# The command line is too long to execute in one step.
@@ -7369,7 +8232,7 @@ EOF
 	  # 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"
+	  func_append 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
@@ -7379,7 +8242,7 @@ EOF
 	  case " $convenience " in
 	  *" $test_deplib "*) ;;
 	  *)
-	    tmp_deplibs="$tmp_deplibs $test_deplib"
+	    func_append tmp_deplibs " $test_deplib"
 	    ;;
 	  esac
 	done
@@ -7399,21 +8262,21 @@ EOF
 	    test "X$libobjs" = "X " && libobjs=
 	  else
 	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
+	    func_append generated " $gentop"
 
 	    func_extract_archives $gentop $convenience
-	    libobjs="$libobjs $func_extract_archives_result"
+	    func_append 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"
+	  func_append linker_flags " $flag"
 	fi
 
 	# Make a backup of the uninstalled library when relinking
-	if test "$mode" = relink; then
+	if test "$opt_mode" = relink; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
 	fi
 
@@ -7475,10 +8338,13 @@ EOF
 	    echo 'INPUT (' > $output
 	    for obj in $save_libobjs
 	    do
-	      $ECHO "$obj" >> $output
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
 	    done
 	    echo ')' >> $output
-	    delfiles="$delfiles $output"
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$func_to_tool_file_result
 	  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"
@@ -7492,10 +8358,12 @@ EOF
 	    fi
 	    for obj
 	    do
-	      $ECHO "$obj" >> $output
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
 	    done
-	    delfiles="$delfiles $output"
-	    output=$firstobj\"$file_list_spec$output\"
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
 	  else
 	    if test -n "$save_libobjs"; then
 	      func_verbose "creating reloadable object files..."
@@ -7546,7 +8414,7 @@ EOF
 	      if test -n "$last_robj"; then
 	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
 	      fi
-	      delfiles="$delfiles $output"
+	      func_append delfiles " $output"
 
 	    else
 	      output=
@@ -7580,7 +8448,7 @@ EOF
 		lt_exit=$?
 
 		# Restore the uninstalled library and exit
-		if test "$mode" = relink; then
+		if test "$opt_mode" = relink; then
 		  ( cd "$output_objdir" && \
 		    $RM "${realname}T" && \
 		    $MV "${realname}U" "$realname" )
@@ -7613,7 +8481,7 @@ EOF
 	      # 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"
+	      func_append 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
@@ -7654,10 +8522,10 @@ EOF
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
 	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
-	  libobjs="$libobjs $func_extract_archives_result"
+	  func_append libobjs " $func_extract_archives_result"
 	  test "X$libobjs" = "X " && libobjs=
 	fi
 
@@ -7673,7 +8541,7 @@ EOF
 	    lt_exit=$?
 
 	    # Restore the uninstalled library and exit
-	    if test "$mode" = relink; then
+	    if test "$opt_mode" = relink; then
 	      ( cd "$output_objdir" && \
 	        $RM "${realname}T" && \
 		$MV "${realname}U" "$realname" )
@@ -7685,7 +8553,7 @@ EOF
 	IFS="$save_ifs"
 
 	# Restore the uninstalled library and exit
-	if test "$mode" = relink; then
+	if test "$opt_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
@@ -7769,13 +8637,16 @@ EOF
 	  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
 	else
 	  gentop="$output_objdir/${obj}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $convenience
 	  reload_conv_objs="$reload_objs $func_extract_archives_result"
 	fi
       fi
 
+      # If we're not building shared, we need to use non_pic_objs
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
       # Create the old-style object.
       reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
@@ -7849,8 +8720,8 @@ EOF
 	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"
+	      func_append compile_command " ${wl}-bind_at_load"
+	      func_append finalize_command " ${wl}-bind_at_load"
 	    ;;
 	  esac
 	fi
@@ -7870,7 +8741,7 @@ EOF
 	*)
 	  case " $compile_deplibs " in
 	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
+	    func_append new_libs " -L$path/$objdir" ;;
 	  esac
 	  ;;
 	esac
@@ -7880,17 +8751,17 @@ EOF
 	-L*)
 	  case " $new_libs " in
 	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
+	  *) func_append new_libs " $deplib" ;;
 	  esac
 	  ;;
-	*) new_libs="$new_libs $deplib" ;;
+	*) func_append new_libs " $deplib" ;;
 	esac
       done
       compile_deplibs="$new_libs"
 
 
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
+      func_append compile_command " $compile_deplibs"
+      func_append finalize_command " $finalize_deplibs"
 
       if test -n "$rpath$xrpath"; then
 	# If the user specified any rpath flags, then add them.
@@ -7898,7 +8769,7 @@ EOF
 	  # This is the magic to use -rpath.
 	  case "$finalize_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
       fi
@@ -7917,18 +8788,18 @@ EOF
 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		;;
 	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		;;
 	      esac
 	    fi
 	  else
 	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
+	    func_append rpath " $flag"
 	  fi
 	elif test -n "$runpath_var"; then
 	  case "$perm_rpath " in
 	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  *) func_append perm_rpath " $libdir" ;;
 	  esac
 	fi
 	case $host in
@@ -7937,12 +8808,12 @@ EOF
 	  case :$dllsearchpath: in
 	  *":$libdir:"*) ;;
 	  ::) dllsearchpath=$libdir;;
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  *) func_append dllsearchpath ":$libdir";;
 	  esac
 	  case :$dllsearchpath: in
 	  *":$testbindir:"*) ;;
 	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  *) func_append dllsearchpath ":$testbindir";;
 	  esac
 	  ;;
 	esac
@@ -7968,18 +8839,18 @@ EOF
 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		;;
 	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		;;
 	      esac
 	    fi
 	  else
 	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
+	    func_append rpath " $flag"
 	  fi
 	elif test -n "$runpath_var"; then
 	  case "$finalize_perm_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  *) func_append finalize_perm_rpath " $libdir" ;;
 	  esac
 	fi
       done
@@ -8030,6 +8901,12 @@ EOF
 	exit_status=0
 	func_show_eval "$link_command" 'exit_status=$?'
 
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
 	# Delete the generated files.
 	if test -f "$output_objdir/${outputname}S.${objext}"; then
 	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
@@ -8052,7 +8929,7 @@ EOF
 	  # We should set the runpath_var.
 	  rpath=
 	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
+	    func_append rpath "$dir:"
 	  done
 	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
@@ -8060,7 +8937,7 @@ EOF
 	  # We should set the runpath_var.
 	  rpath=
 	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
+	    func_append rpath "$dir:"
 	  done
 	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
@@ -8075,6 +8952,13 @@ EOF
 	$opt_dry_run || $RM $output
 	# Link the executable and exit
 	func_show_eval "$link_command" 'exit $?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
 	exit $EXIT_SUCCESS
       fi
 
@@ -8108,6 +8992,12 @@ EOF
 
       func_show_eval "$link_command" 'exit $?'
 
+      if test -n "$postlink_cmds"; then
+	func_to_tool_file "$output_objdir/$outputname"
+	postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
       # Now create the wrapper script.
       func_verbose "creating $output"
 
@@ -8205,7 +9095,7 @@ EOF
 	else
 	  oldobjs="$old_deplibs $non_pic_objects"
 	  if test "$preload" = yes && test -f "$symfileobj"; then
-	    oldobjs="$oldobjs $symfileobj"
+	    func_append oldobjs " $symfileobj"
 	  fi
 	fi
 	addlibs="$old_convenience"
@@ -8213,10 +9103,10 @@ EOF
 
       if test -n "$addlibs"; then
 	gentop="$output_objdir/${outputname}x"
-	generated="$generated $gentop"
+	func_append generated " $gentop"
 
 	func_extract_archives $gentop $addlibs
-	oldobjs="$oldobjs $func_extract_archives_result"
+	func_append oldobjs " $func_extract_archives_result"
       fi
 
       # Do each command in the archive commands.
@@ -8227,10 +9117,10 @@ EOF
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
 	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
-	  oldobjs="$oldobjs $func_extract_archives_result"
+	  func_append oldobjs " $func_extract_archives_result"
 	fi
 
 	# POSIX demands no paths to be encoded in archives.  We have
@@ -8248,7 +9138,7 @@ EOF
 	else
 	  echo "copying selected object files to avoid basename conflicts..."
 	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 	  func_mkdir_p "$gentop"
 	  save_oldobjs=$oldobjs
 	  oldobjs=
@@ -8272,18 +9162,30 @@ EOF
 		esac
 	      done
 	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-	      oldobjs="$oldobjs $gentop/$newobj"
+	      func_append oldobjs " $gentop/$newobj"
 	      ;;
-	    *) oldobjs="$oldobjs $obj" ;;
+	    *) func_append oldobjs " $obj" ;;
 	    esac
 	  done
 	fi
+	func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+	tool_oldlib=$func_to_tool_file_result
 	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
+	elif test -n "$archiver_list_spec"; then
+	  func_verbose "using command file archive linking..."
+	  for obj in $oldobjs
+	  do
+	    func_to_tool_file "$obj"
+	    $ECHO "$func_to_tool_file_result"
+	  done > $output_objdir/$libname.libcmd
+	  func_to_tool_file "$output_objdir/$libname.libcmd"
+	  oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+	  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..."
@@ -8377,12 +9279,23 @@ EOF
 	      *.la)
 		func_basename "$deplib"
 		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		func_resolve_sysroot "$deplib"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
 		test -z "$libdir" && \
 		  func_fatal_error "\`$deplib' is not a valid libtool archive"
-		newdependency_libs="$newdependency_libs $libdir/$name"
+		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      -L*)
+		func_stripname -L '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -L$func_replace_sysroot_result"
+		;;
+	      -R*)
+		func_stripname -R '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -R$func_replace_sysroot_result"
 		;;
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      *) func_append newdependency_libs " $deplib" ;;
 	      esac
 	    done
 	    dependency_libs="$newdependency_libs"
@@ -8396,9 +9309,9 @@ EOF
 		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"
+		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
-	      *) newdlfiles="$newdlfiles $lib" ;;
+	      *) func_append newdlfiles " $lib" ;;
 	      esac
 	    done
 	    dlfiles="$newdlfiles"
@@ -8415,7 +9328,7 @@ EOF
 		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"
+		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      esac
 	    done
@@ -8427,7 +9340,7 @@ EOF
 		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
-	      newdlfiles="$newdlfiles $abs"
+	      func_append newdlfiles " $abs"
 	    done
 	    dlfiles="$newdlfiles"
 	    newdlprefiles=
@@ -8436,7 +9349,7 @@ EOF
 		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
-	      newdlprefiles="$newdlprefiles $abs"
+	      func_append newdlprefiles " $abs"
 	    done
 	    dlprefiles="$newdlprefiles"
 	  fi
@@ -8521,7 +9434,7 @@ relink_command=\"$relink_command\""
     exit $EXIT_SUCCESS
 }
 
-{ test "$mode" = link || test "$mode" = relink; } &&
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
     func_mode_link ${1+"$@"}
 
 
@@ -8541,9 +9454,9 @@ func_mode_uninstall ()
     for arg
     do
       case $arg in
-      -f) RM="$RM $arg"; rmforce=yes ;;
-      -*) RM="$RM $arg" ;;
-      *) files="$files $arg" ;;
+      -f) func_append RM " $arg"; rmforce=yes ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
       esac
     done
 
@@ -8552,24 +9465,23 @@ func_mode_uninstall ()
 
     rmdirs=
 
-    origobjdir="$objdir"
     for file in $files; do
       func_dirname "$file" "" "."
       dir="$func_dirname_result"
       if test "X$dir" = X.; then
-	objdir="$origobjdir"
+	odir="$objdir"
       else
-	objdir="$dir/$origobjdir"
+	odir="$dir/$objdir"
       fi
       func_basename "$file"
       name="$func_basename_result"
-      test "$mode" = uninstall && objdir="$dir"
+      test "$opt_mode" = uninstall && odir="$dir"
 
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; then
 	case " $rmdirs " in
-	  *" $objdir "*) ;;
-	  *) rmdirs="$rmdirs $objdir" ;;
+	  *" $odir "*) ;;
+	  *) func_append rmdirs " $odir" ;;
 	esac
       fi
 
@@ -8595,18 +9507,17 @@ func_mode_uninstall ()
 
 	  # Delete the libtool libraries and symlinks.
 	  for n in $library_names; do
-	    rmfiles="$rmfiles $objdir/$n"
+	    func_append rmfiles " $odir/$n"
 	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
 
-	  case "$mode" in
+	  case "$opt_mode" in
 	  clean)
-	    case "  $library_names " in
-	    # "  " in the beginning catches empty $dlname
+	    case " $library_names " in
 	    *" $dlname "*) ;;
-	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
 	    esac
-	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
 	    ;;
 	  uninstall)
 	    if test -n "$library_names"; then
@@ -8634,19 +9545,19 @@ func_mode_uninstall ()
 	  # 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"
+	    func_append 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"
+	    func_append rmfiles " $dir/$non_pic_object"
 	  fi
 	fi
 	;;
 
       *)
-	if test "$mode" = clean ; then
+	if test "$opt_mode" = clean ; then
 	  noexename=$name
 	  case $file in
 	  *.exe)
@@ -8656,7 +9567,7 @@ func_mode_uninstall ()
 	    noexename=$func_stripname_result
 	    # $file with .exe has already been added to rmfiles,
 	    # add $file without .exe
-	    rmfiles="$rmfiles $file"
+	    func_append rmfiles " $file"
 	    ;;
 	  esac
 	  # Do a test to see if this is a libtool program.
@@ -8665,7 +9576,7 @@ func_mode_uninstall ()
 	      func_ltwrapper_scriptname "$file"
 	      relink_command=
 	      func_source $func_ltwrapper_scriptname_result
-	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+	      func_append rmfiles " $func_ltwrapper_scriptname_result"
 	    else
 	      relink_command=
 	      func_source $dir/$noexename
@@ -8673,12 +9584,12 @@ func_mode_uninstall ()
 
 	    # 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}"
+	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
 	    if test "$fast_install" = yes && test -n "$relink_command"; then
-	      rmfiles="$rmfiles $objdir/lt-$name"
+	      func_append rmfiles " $odir/lt-$name"
 	    fi
 	    if test "X$noexename" != "X$name" ; then
-	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	      func_append rmfiles " $odir/lt-${noexename}.c"
 	    fi
 	  fi
 	fi
@@ -8686,7 +9597,6 @@ func_mode_uninstall ()
       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
@@ -8698,16 +9608,16 @@ func_mode_uninstall ()
     exit $exit_status
 }
 
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
     func_mode_uninstall ${1+"$@"}
 
-test -z "$mode" && {
+test -z "$opt_mode" && {
   help="$generic_help"
   func_fatal_help "you must specify a MODE"
 }
 
 test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$mode'"
+  func_fatal_help "invalid operation mode \`$opt_mode'"
 
 if test -n "$exec_cmd"; then
   eval exec "$exec_cmd"
diff --git a/config/missing b/config/missing
index 28055d2..cdea514 100755
--- a/config/missing
+++ b/config/missing
@@ -1,11 +1,10 @@
 #! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-06-26.16; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written 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
@@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
 # 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"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# 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
+case $1 in
 
-msg="missing on your system"
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
 
-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
-  ;;
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
 
   -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.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
 
 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'
-  autom4te     touch the output file, or create a stub one
-  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]
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
 
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
 
 Send bug reports to <bug-automake at gnu.org>."
     exit $?
@@ -100,272 +70,141 @@ Send bug reports to <bug-automake at gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
 esac
 
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# 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).  This is about non-GNU programs, so use $1 not
-# $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 $program 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 "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    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 test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f y.tab.h; then
-	echo >y.tab.h
-    fi
-    if test ! -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 test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -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 "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit $?
-    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 "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    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
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
 
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'automa4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/config/mkinstalldirs b/config/mkinstalldirs
index ef7e16f..55d537f 100755
--- a/config/mkinstalldirs
+++ b/config/mkinstalldirs
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2006-05-11.19
+scriptversion=2009-04-28.21; # UTC
 
 # Original author: Noah Friedman <friedman at prep.ai.mit.edu>
 # Created: 1993-05-16
@@ -81,9 +81,9 @@ case $dirmode in
       echo "mkdir -p -- $*"
       exec mkdir -p -- "$@"
     else
-      # On NextStep and OpenStep, the `mkdir' command does not
+      # On NextStep and OpenStep, the 'mkdir' command does not
       # recognize any option.  It will interpret all options as
-      # directories to create, and then abort because `.' already
+      # directories to create, and then abort because '.' already
       # exists.
       test -d ./-p && rmdir ./-p
       test -d ./--version && rmdir ./--version
@@ -157,5 +157,6 @@ exit $errstatus
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/config/tap-driver.sh b/config/tap-driver.sh
new file mode 100755
index 0000000..19aa531
--- /dev/null
+++ b/config/tap-driver.sh
@@ -0,0 +1,652 @@
+#! /bin/sh
+# Copyright (C) 2011-2013 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, see <http://www.gnu.org/licenses/>.
+
+# 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>.
+
+scriptversion=2011-12-27.17; # UTC
+
+# Make unconditional expansion of undefined variables an error.  This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+me=tap-driver.sh
+
+fatal ()
+{
+  echo "$me: fatal: $*" >&2
+  exit 1
+}
+
+usage_error ()
+{
+  echo "$me: $*" >&2
+  print_usage >&2
+  exit 2
+}
+
+print_usage ()
+{
+  cat <<END
+Usage:
+  tap-driver.sh --test-name=NAME --log-file=PATH --trs-file=PATH
+                [--expect-failure={yes|no}] [--color-tests={yes|no}]
+                [--enable-hard-errors={yes|no}] [--ignore-exit]
+                [--diagnostic-string=STRING] [--merge|--no-merge]
+                [--comments|--no-comments] [--] TEST-COMMAND
+The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
+END
+}
+
+# TODO: better error handling in option parsing (in particular, ensure
+# TODO: $log_file, $trs_file and $test_name are defined).
+test_name= # Used for reporting.
+log_file=  # Where to save the result and output of the test script.
+trs_file=  # Where to save the metadata of the test run.
+expect_failure=0
+color_tests=0
+merge=0
+ignore_exit=0
+comments=0
+diag_string='#'
+while test $# -gt 0; do
+  case $1 in
+  --help) print_usage; exit $?;;
+  --version) echo "$me $scriptversion"; exit $?;;
+  --test-name) test_name=$2; shift;;
+  --log-file) log_file=$2; shift;;
+  --trs-file) trs_file=$2; shift;;
+  --color-tests) color_tests=$2; shift;;
+  --expect-failure) expect_failure=$2; shift;;
+  --enable-hard-errors) shift;; # No-op.
+  --merge) merge=1;;
+  --no-merge) merge=0;;
+  --ignore-exit) ignore_exit=1;;
+  --comments) comments=1;;
+  --no-comments) comments=0;;
+  --diagnostic-string) diag_string=$2; shift;;
+  --) shift; break;;
+  -*) usage_error "invalid option: '$1'";;
+  esac
+  shift
+done
+
+test $# -gt 0 || usage_error "missing test command"
+
+case $expect_failure in
+  yes) expect_failure=1;;
+    *) expect_failure=0;;
+esac
+
+if test $color_tests = yes; then
+  init_colors='
+    color_map["red"]="" # Red.
+    color_map["grn"]="" # Green.
+    color_map["lgn"]="" # Light green.
+    color_map["blu"]="" # Blue.
+    color_map["mgn"]="" # Magenta.
+    color_map["std"]=""     # No color.
+    color_for_result["ERROR"] = "mgn"
+    color_for_result["PASS"]  = "grn"
+    color_for_result["XPASS"] = "red"
+    color_for_result["FAIL"]  = "red"
+    color_for_result["XFAIL"] = "lgn"
+    color_for_result["SKIP"]  = "blu"'
+else
+  init_colors=''
+fi
+
+# :; is there to work around a bug in bash 3.2 (and earlier) which
+# does not always set '$?' properly on redirection failure.
+# See the Autoconf manual for more details.
+:;{
+  (
+    # Ignore common signals (in this subshell only!), to avoid potential
+    # problems with Korn shells.  Some Korn shells are known to propagate
+    # to themselves signals that have killed a child process they were
+    # waiting for; this is done at least for SIGINT (and usually only for
+    # it, in truth).  Without the `trap' below, such a behaviour could
+    # cause a premature exit in the current subshell, e.g., in case the
+    # test command it runs gets terminated by a SIGINT.  Thus, the awk
+    # script we are piping into would never seen the exit status it
+    # expects on its last input line (which is displayed below by the
+    # last `echo $?' statement), and would thus die reporting an internal
+    # error.
+    # For more information, see the Autoconf manual and the threads:
+    # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
+    # <http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
+    trap : 1 3 2 13 15
+    if test $merge -gt 0; then
+      exec 2>&1
+    else
+      exec 2>&3
+    fi
+    "$@"
+    echo $?
+  ) | LC_ALL=C ${AM_TAP_AWK-awk} \
+        -v me="$me" \
+        -v test_script_name="$test_name" \
+        -v log_file="$log_file" \
+        -v trs_file="$trs_file" \
+        -v expect_failure="$expect_failure" \
+        -v merge="$merge" \
+        -v ignore_exit="$ignore_exit" \
+        -v comments="$comments" \
+        -v diag_string="$diag_string" \
+'
+# FIXME: the usages of "cat >&3" below could be optimized when using
+# FIXME: GNU awk, and/on on systems that supports /dev/fd/.
+
+# Implementation note: in what follows, `result_obj` will be an
+# associative array that (partly) simulates a TAP result object
+# from the `TAP::Parser` perl module.
+
+## ----------- ##
+##  FUNCTIONS  ##
+## ----------- ##
+
+function fatal(msg)
+{
+  print me ": " msg | "cat >&2"
+  exit 1
+}
+
+function abort(where)
+{
+  fatal("internal error " where)
+}
+
+# Convert a boolean to a "yes"/"no" string.
+function yn(bool)
+{
+  return bool ? "yes" : "no";
+}
+
+function add_test_result(result)
+{
+  if (!test_results_index)
+    test_results_index = 0
+  test_results_list[test_results_index] = result
+  test_results_index += 1
+  test_results_seen[result] = 1;
+}
+
+# Whether the test script should be re-run by "make recheck".
+function must_recheck()
+{
+  for (k in test_results_seen)
+    if (k != "XFAIL" && k != "PASS" && k != "SKIP")
+      return 1
+  return 0
+}
+
+# Whether the content of the log file associated to this test should
+# be copied into the "global" test-suite.log.
+function copy_in_global_log()
+{
+  for (k in test_results_seen)
+    if (k != "PASS")
+      return 1
+  return 0
+}
+
+# FIXME: this can certainly be improved ...
+function get_global_test_result()
+{
+    if ("ERROR" in test_results_seen)
+      return "ERROR"
+    if ("FAIL" in test_results_seen || "XPASS" in test_results_seen)
+      return "FAIL"
+    all_skipped = 1
+    for (k in test_results_seen)
+      if (k != "SKIP")
+        all_skipped = 0
+    if (all_skipped)
+      return "SKIP"
+    return "PASS";
+}
+
+function stringify_result_obj(result_obj)
+{
+  if (result_obj["is_unplanned"] || result_obj["number"] != testno)
+    return "ERROR"
+
+  if (plan_seen == LATE_PLAN)
+    return "ERROR"
+
+  if (result_obj["directive"] == "TODO")
+    return result_obj["is_ok"] ? "XPASS" : "XFAIL"
+
+  if (result_obj["directive"] == "SKIP")
+    return result_obj["is_ok"] ? "SKIP" : COOKED_FAIL;
+
+  if (length(result_obj["directive"]))
+      abort("in function stringify_result_obj()")
+
+  return result_obj["is_ok"] ? COOKED_PASS : COOKED_FAIL
+}
+
+function decorate_result(result)
+{
+  color_name = color_for_result[result]
+  if (color_name)
+    return color_map[color_name] "" result "" color_map["std"]
+  # If we are not using colorized output, or if we do not know how
+  # to colorize the given result, we should return it unchanged.
+  return result
+}
+
+function report(result, details)
+{
+  if (result ~ /^(X?(PASS|FAIL)|SKIP|ERROR)/)
+    {
+      msg = ": " test_script_name
+      add_test_result(result)
+    }
+  else if (result == "#")
+    {
+      msg = " " test_script_name ":"
+    }
+  else
+    {
+      abort("in function report()")
+    }
+  if (length(details))
+    msg = msg " " details
+  # Output on console might be colorized.
+  print decorate_result(result) msg
+  # Log the result in the log file too, to help debugging (this is
+  # especially true when said result is a TAP error or "Bail out!").
+  print result msg | "cat >&3";
+}
+
+function testsuite_error(error_message)
+{
+  report("ERROR", "- " error_message)
+}
+
+function handle_tap_result()
+{
+  details = result_obj["number"];
+  if (length(result_obj["description"]))
+    details = details " " result_obj["description"]
+
+  if (plan_seen == LATE_PLAN)
+    {
+      details = details " # AFTER LATE PLAN";
+    }
+  else if (result_obj["is_unplanned"])
+    {
+       details = details " # UNPLANNED";
+    }
+  else if (result_obj["number"] != testno)
+    {
+       details = sprintf("%s # OUT-OF-ORDER (expecting %d)",
+                         details, testno);
+    }
+  else if (result_obj["directive"])
+    {
+      details = details " # " result_obj["directive"];
+      if (length(result_obj["explanation"]))
+        details = details " " result_obj["explanation"]
+    }
+
+  report(stringify_result_obj(result_obj), details)
+}
+
+# `skip_reason` should be empty whenever planned > 0.
+function handle_tap_plan(planned, skip_reason)
+{
+  planned += 0 # Avoid getting confused if, say, `planned` is "00"
+  if (length(skip_reason) && planned > 0)
+    abort("in function handle_tap_plan()")
+  if (plan_seen)
+    {
+      # Error, only one plan per stream is acceptable.
+      testsuite_error("multiple test plans")
+      return;
+    }
+  planned_tests = planned
+  # The TAP plan can come before or after *all* the TAP results; we speak
+  # respectively of an "early" or a "late" plan.  If we see the plan line
+  # after at least one TAP result has been seen, assume we have a late
+  # plan; in this case, any further test result seen after the plan will
+  # be flagged as an error.
+  plan_seen = (testno >= 1 ? LATE_PLAN : EARLY_PLAN)
+  # If testno > 0, we have an error ("too many tests run") that will be
+  # automatically dealt with later, so do not worry about it here.  If
+  # $plan_seen is true, we have an error due to a repeated plan, and that
+  # has already been dealt with above.  Otherwise, we have a valid "plan
+  # with SKIP" specification, and should report it as a particular kind
+  # of SKIP result.
+  if (planned == 0 && testno == 0)
+    {
+      if (length(skip_reason))
+        skip_reason = "- "  skip_reason;
+      report("SKIP", skip_reason);
+    }
+}
+
+function extract_tap_comment(line)
+{
+  if (index(line, diag_string) == 1)
+    {
+      # Strip leading `diag_string` from `line`.
+      line = substr(line, length(diag_string) + 1)
+      # And strip any leading and trailing whitespace left.
+      sub("^[ \t]*", "", line)
+      sub("[ \t]*$", "", line)
+      # Return what is left (if any).
+      return line;
+    }
+  return "";
+}
+
+# When this function is called, we know that line is a TAP result line,
+# so that it matches the (perl) RE "^(not )?ok\b".
+function setup_result_obj(line)
+{
+  # Get the result, and remove it from the line.
+  result_obj["is_ok"] = (substr(line, 1, 2) == "ok" ? 1 : 0)
+  sub("^(not )?ok[ \t]*", "", line)
+
+  # If the result has an explicit number, get it and strip it; otherwise,
+  # automatically assing the next progresive number to it.
+  if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/)
+    {
+      match(line, "^[0-9]+")
+      # The final `+ 0` is to normalize numbers with leading zeros.
+      result_obj["number"] = substr(line, 1, RLENGTH) + 0
+      line = substr(line, RLENGTH + 1)
+    }
+  else
+    {
+      result_obj["number"] = testno
+    }
+
+  if (plan_seen == LATE_PLAN)
+    # No further test results are acceptable after a "late" TAP plan
+    # has been seen.
+    result_obj["is_unplanned"] = 1
+  else if (plan_seen && testno > planned_tests)
+    result_obj["is_unplanned"] = 1
+  else
+    result_obj["is_unplanned"] = 0
+
+  # Strip trailing and leading whitespace.
+  sub("^[ \t]*", "", line)
+  sub("[ \t]*$", "", line)
+
+  # This will have to be corrected if we have a "TODO"/"SKIP" directive.
+  result_obj["description"] = line
+  result_obj["directive"] = ""
+  result_obj["explanation"] = ""
+
+  if (index(line, "#") == 0)
+    return # No possible directive, nothing more to do.
+
+  # Directives are case-insensitive.
+  rx = "[ \t]*#[ \t]*([tT][oO][dD][oO]|[sS][kK][iI][pP])[ \t]*"
+
+  # See whether we have the directive, and if yes, where.
+  pos = match(line, rx "$")
+  if (!pos)
+    pos = match(line, rx "[^a-zA-Z0-9_]")
+
+  # If there was no TAP directive, we have nothing more to do.
+  if (!pos)
+    return
+
+  # Let`s now see if the TAP directive has been escaped.  For example:
+  #  escaped:     ok \# SKIP
+  #  not escaped: ok \\# SKIP
+  #  escaped:     ok \\\\\# SKIP
+  #  not escaped: ok \ # SKIP
+  if (substr(line, pos, 1) == "#")
+    {
+      bslash_count = 0
+      for (i = pos; i > 1 && substr(line, i - 1, 1) == "\\"; i--)
+        bslash_count += 1
+      if (bslash_count % 2)
+        return # Directive was escaped.
+    }
+
+  # Strip the directive and its explanation (if any) from the test
+  # description.
+  result_obj["description"] = substr(line, 1, pos - 1)
+  # Now remove the test description from the line, that has been dealt
+  # with already.
+  line = substr(line, pos)
+  # Strip the directive, and save its value (normalized to upper case).
+  sub("^[ \t]*#[ \t]*", "", line)
+  result_obj["directive"] = toupper(substr(line, 1, 4))
+  line = substr(line, 5)
+  # Now get the explanation for the directive (if any), with leading
+  # and trailing whitespace removed.
+  sub("^[ \t]*", "", line)
+  sub("[ \t]*$", "", line)
+  result_obj["explanation"] = line
+}
+
+function get_test_exit_message(status)
+{
+  if (status == 0)
+    return ""
+  if (status !~ /^[1-9][0-9]*$/)
+    abort("getting exit status")
+  if (status < 127)
+    exit_details = ""
+  else if (status == 127)
+    exit_details = " (command not found?)"
+  else if (status >= 128 && status <= 255)
+    exit_details = sprintf(" (terminated by signal %d?)", status - 128)
+  else if (status > 256 && status <= 384)
+    # We used to report an "abnormal termination" here, but some Korn
+    # shells, when a child process die due to signal number n, can leave
+    # in $? an exit status of 256+n instead of the more standard 128+n.
+    # Apparently, both behaviours are allowed by POSIX (2008), so be
+    # prepared to handle them both.  See also Austing Group report ID
+    # 0000051 <http://www.austingroupbugs.net/view.php?id=51>
+    exit_details = sprintf(" (terminated by signal %d?)", status - 256)
+  else
+    # Never seen in practice.
+    exit_details = " (abnormal termination)"
+  return sprintf("exited with status %d%s", status, exit_details)
+}
+
+function write_test_results()
+{
+  print ":global-test-result: " get_global_test_result() > trs_file
+  print ":recheck: "  yn(must_recheck()) > trs_file
+  print ":copy-in-global-log: " yn(copy_in_global_log()) > trs_file
+  for (i = 0; i < test_results_index; i += 1)
+    print ":test-result: " test_results_list[i] > trs_file
+  close(trs_file);
+}
+
+BEGIN {
+
+## ------- ##
+##  SETUP  ##
+## ------- ##
+
+'"$init_colors"'
+
+# Properly initialized once the TAP plan is seen.
+planned_tests = 0
+
+COOKED_PASS = expect_failure ? "XPASS": "PASS";
+COOKED_FAIL = expect_failure ? "XFAIL": "FAIL";
+
+# Enumeration-like constants to remember which kind of plan (if any)
+# has been seen.  It is important that NO_PLAN evaluates "false" as
+# a boolean.
+NO_PLAN = 0
+EARLY_PLAN = 1
+LATE_PLAN = 2
+
+testno = 0     # Number of test results seen so far.
+bailed_out = 0 # Whether a "Bail out!" directive has been seen.
+
+# Whether the TAP plan has been seen or not, and if yes, which kind
+# it is ("early" is seen before any test result, "late" otherwise).
+plan_seen = NO_PLAN
+
+## --------- ##
+##  PARSING  ##
+## --------- ##
+
+is_first_read = 1
+
+while (1)
+  {
+    # Involutions required so that we are able to read the exit status
+    # from the last input line.
+    st = getline
+    if (st < 0) # I/O error.
+      fatal("I/O error while reading from input stream")
+    else if (st == 0) # End-of-input
+      {
+        if (is_first_read)
+          abort("in input loop: only one input line")
+        break
+      }
+    if (is_first_read)
+      {
+        is_first_read = 0
+        nextline = $0
+        continue
+      }
+    else
+      {
+        curline = nextline
+        nextline = $0
+        $0 = curline
+      }
+    # Copy any input line verbatim into the log file.
+    print | "cat >&3"
+    # Parsing of TAP input should stop after a "Bail out!" directive.
+    if (bailed_out)
+      continue
+
+    # TAP test result.
+    if ($0 ~ /^(not )?ok$/ || $0 ~ /^(not )?ok[^a-zA-Z0-9_]/)
+      {
+        testno += 1
+        setup_result_obj($0)
+        handle_tap_result()
+      }
+    # TAP plan (normal or "SKIP" without explanation).
+    else if ($0 ~ /^1\.\.[0-9]+[ \t]*$/)
+      {
+        # The next two lines will put the number of planned tests in $0.
+        sub("^1\\.\\.", "")
+        sub("[^0-9]*$", "")
+        handle_tap_plan($0, "")
+        continue
+      }
+    # TAP "SKIP" plan, with an explanation.
+    else if ($0 ~ /^1\.\.0+[ \t]*#/)
+      {
+        # The next lines will put the skip explanation in $0, stripping
+        # any leading and trailing whitespace.  This is a little more
+        # tricky in truth, since we want to also strip a potential leading
+        # "SKIP" string from the message.
+        sub("^[^#]*#[ \t]*(SKIP[: \t][ \t]*)?", "")
+        sub("[ \t]*$", "");
+        handle_tap_plan(0, $0)
+      }
+    # "Bail out!" magic.
+    # Older versions of prove and TAP::Harness (e.g., 3.17) did not
+    # recognize a "Bail out!" directive when preceded by leading
+    # whitespace, but more modern versions (e.g., 3.23) do.  So we
+    # emulate the latter, "more modern" behaviour.
+    else if ($0 ~ /^[ \t]*Bail out!/)
+      {
+        bailed_out = 1
+        # Get the bailout message (if any), with leading and trailing
+        # whitespace stripped.  The message remains stored in `$0`.
+        sub("^[ \t]*Bail out![ \t]*", "");
+        sub("[ \t]*$", "");
+        # Format the error message for the
+        bailout_message = "Bail out!"
+        if (length($0))
+          bailout_message = bailout_message " " $0
+        testsuite_error(bailout_message)
+      }
+    # Maybe we have too look for dianogtic comments too.
+    else if (comments != 0)
+      {
+        comment = extract_tap_comment($0);
+        if (length(comment))
+          report("#", comment);
+      }
+  }
+
+## -------- ##
+##  FINISH  ##
+## -------- ##
+
+# A "Bail out!" directive should cause us to ignore any following TAP
+# error, as well as a non-zero exit status from the TAP producer.
+if (!bailed_out)
+  {
+    if (!plan_seen)
+      {
+        testsuite_error("missing test plan")
+      }
+    else if (planned_tests != testno)
+      {
+        bad_amount = testno > planned_tests ? "many" : "few"
+        testsuite_error(sprintf("too %s tests run (expected %d, got %d)",
+                                bad_amount, planned_tests, testno))
+      }
+    if (!ignore_exit)
+      {
+        # Fetch exit status from the last line.
+        exit_message = get_test_exit_message(nextline)
+        if (exit_message)
+          testsuite_error(exit_message)
+      }
+  }
+
+write_test_results()
+
+exit 0
+
+} # End of "BEGIN" block.
+'
+
+# TODO: document that we consume the file descriptor 3 :-(
+} 3>"$log_file"
+
+test $? -eq 0 || fatal "I/O or internal error"
+
+# 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/configure b/configure
index ac3b58d..6aa21b8 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for cdo 1.6.3.
+# Generated by GNU Autoconf 2.68 for cdo 1.6.4.
 #
 # Report bugs to <http://code.zmaw.de/projects/cdo>.
 #
@@ -570,8 +570,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='cdo'
 PACKAGE_TARNAME='cdo'
-PACKAGE_VERSION='1.6.3'
-PACKAGE_STRING='cdo 1.6.3'
+PACKAGE_VERSION='1.6.4'
+PACKAGE_STRING='cdo 1.6.4'
 PACKAGE_BUGREPORT='http://code.zmaw.de/projects/cdo'
 PACKAGE_URL=''
 
@@ -617,7 +617,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
-INCLUDES
+AM_CPPFLAGS
 CLIBS
 CLDFLAGS
 FCFLAGS
@@ -650,6 +650,7 @@ JASPER_LIBS
 NETCDF_LIBS
 NETCDF_INCLUDE
 NETCDF_ROOT
+ENABLE_NETCDF
 NC_CONFIG
 HDF5_LIBS
 HDF5_INCLUDE
@@ -675,16 +676,19 @@ CXXDEPMODE
 ac_ct_CXX
 CXXFLAGS
 CXX
-DLLTOOL
 AS
+OPENMP_CFLAGS
 CPP
 OTOOL64
 OTOOL
 LIPO
 NMEDIT
 DSYMUTIL
+MANIFEST_TOOL
 RANLIB
+ac_ct_AR
 AR
+DLLTOOL
 OBJDUMP
 LN_S
 NM
@@ -716,6 +720,10 @@ LIBTOOL
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -788,6 +796,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_silent_rules
 enable_maintainer_mode
 enable_shared
 enable_static
@@ -795,7 +804,9 @@ with_pic
 enable_fast_install
 enable_dependency_tracking
 with_gnu_ld
+with_sysroot
 enable_libtool_lock
+enable_openmp
 enable_largefile
 enable_data
 with_threads
@@ -1374,7 +1385,7 @@ 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 cdo 1.6.3 to adapt to many kinds of systems.
+\`configure' configures cdo 1.6.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1444,7 +1455,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cdo 1.6.3:";;
+     short | recursive ) echo "Configuration of cdo 1.6.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1452,15 +1463,21 @@ 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-maintainer-mode  enable make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-maintainer-mode
+                          enable make rules and dependencies not useful (and
+                          sometimes confusing) to the casual installer
   --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-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-openmp        do not use OpenMP
   --disable-largefile     omit support for large files
   --enable-data           DATA support [default=yes]
   --enable-grib           GRIB support [default=yes]
@@ -1476,9 +1493,11 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pic              try to use only PIC/non-PIC objects [default=use
+  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
   --with-threads=<yes/no/directory>
                           Compile + link for multithreading [default=yes]
   --with-zlib=<yes|no|directory> (default=yes)
@@ -1490,7 +1509,7 @@ Optional Packages:
   --with-hdf5=<yes|no|directory> (default=no)
                           location of hdf5 library, NETCDF4 requires hdf5 high
                           level interface
-  --with-netcdf=<yes|no|directory> (default=yes)
+  --with-netcdf=<yes|no|directory> (default=no)
                           location of netcdf library (lib and include subdirs)
   --with-jasper=<directory>
                           Specify location of JASPER library. You must specify
@@ -1590,7 +1609,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cdo configure 1.6.3
+cdo configure 1.6.4
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2183,7 +2202,7 @@ 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 cdo $as_me 1.6.3, which was
+It was created by cdo $as_me 1.6.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2639,7 +2658,8 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
-am__api_version='1.11'
+# AM_INIT_AUTOMAKE([foreign -Wall -Werror])
+am__api_version='1.14'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2736,9 +2756,6 @@ 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='
@@ -2749,32 +2766,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# 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
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     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
+     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
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$2" = conftest.file
    )
 then
@@ -2786,6 +2811,16 @@ Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -2808,12 +2843,12 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 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;}
+  { $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
@@ -2825,10 +2860,10 @@ if test x"${install_sh}" != xset; then
   esac
 fi
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# 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.
+# 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.
@@ -2967,12 +3002,6 @@ 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.
@@ -3055,6 +3084,45 @@ else
 fi
 rmdir .tst 2>/dev/null
 
+# 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=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
 if test "`cd $srcdir && pwd`" != "`pwd`"; then
   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
   # is not polluted with repeated "-I."
@@ -3077,7 +3145,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='cdo'
- VERSION='1.6.3'
+ VERSION='1.6.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3105,18 +3173,70 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
 
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
 
 
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
 ac_config_headers="$ac_config_headers src/config.h"
 
 
@@ -3154,8 +3274,8 @@ esac
 
 
 
-macro_version='2.2.10'
-macro_revision='1.3175'
+macro_version='2.4.2'
+macro_revision='1.3337'
 
 
 
@@ -3195,7 +3315,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
 $as_echo_n "checking how to print strings... " >&6; }
 # Test print first, because it will be a builtin if present.
-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
   ECHO='print -r --'
 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -3259,7 +3379,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# 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
@@ -4093,6 +4213,65 @@ 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=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 whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; 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.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != 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
+
+
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -4104,8 +4283,8 @@ else
   # 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'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -4140,16 +4319,16 @@ else
     : > 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
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > 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"
+    # 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
+    # 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
@@ -4158,8 +4337,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # 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
@@ -4167,7 +4346,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # 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}
@@ -4910,6 +5089,11 @@ else
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   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
@@ -4949,7 +5133,7 @@ else
       # 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
@@ -4992,8 +5176,8 @@ $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,, \
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
     && eval 'test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
   && xsi_shell=yes
@@ -5042,6 +5226,80 @@ esac
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
 { $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 ${lt_cv_ld_reload_flag+:} false; then :
@@ -5058,6 +5316,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -5299,7 +5562,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -5381,6 +5644,21 @@ 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_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 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
@@ -5396,9 +5674,163 @@ 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
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool"
+    $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
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_DLLTOOL="dlltool"
+    $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_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="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
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  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 ${ac_cv_prog_AR+:} false; then :
@@ -5414,7 +5846,7 @@ do
   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"
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5434,11 +5866,15 @@ $as_echo "no" >&6; }
 fi
 
 
+    test -n "$AR" && break
+  done
 fi
-if test -z "$ac_cv_prog_AR"; then
+if test -z "$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
+  for ac_prog in ar
+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 ${ac_cv_prog_ac_ct_AR+:} false; then :
@@ -5454,7 +5890,7 @@ do
   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"
+    ac_cv_prog_ac_ct_AR="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5473,6 +5909,10 @@ else
 $as_echo "no" >&6; }
 fi
 
+
+  test -n "$ac_ct_AR" && break
+done
+
   if test "x$ac_ct_AR" = x; then
     AR="false"
   else
@@ -5484,16 +5924,72 @@ 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
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
 
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
 
 
 
@@ -5707,13 +6203,13 @@ 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 -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -5835,8 +6331,8 @@ esac
 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'"
+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=
@@ -5860,6 +6356,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -5872,6 +6369,7 @@ for ac_symprfx in "" "_"; do
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -5913,6 +6411,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -5924,7 +6434,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -5950,8 +6460,8 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_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
@@ -5961,8 +6471,8 @@ _LT_EOF
   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&5
 	fi
@@ -5999,6 +6509,18 @@ else
 $as_echo "ok" >&6; }
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+
+
+
+
+
 
 
 
@@ -6020,6 +6542,42 @@ fi
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+  withval=$with_sysroot;
+else
+  with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
 
 # Check whether --enable-libtool-lock was given.
 if test "${enable_libtool_lock+set}" = set; then :
@@ -6187,7 +6745,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*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
@@ -6198,7 +6756,20 @@ sparc*-*solaris*)
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -6212,7 +6783,124 @@ sparc*-*solaris*)
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MANIFEST_TOOL"; then
+  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_MANIFEST_TOOL="${ac_tool_prefix}mt"
+    $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
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+  # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MANIFEST_TOOL"; then
+  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_MANIFEST_TOOL="mt"
+    $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_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
+  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
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+  fi
+else
+  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&5
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
 
 
   case $host_os in
@@ -6721,7 +7409,13 @@ else
 	$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
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&5
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&5
@@ -6732,6 +7426,7 @@ else
 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 ${lt_cv_ld_exported_symbols_list+:} false; then :
@@ -6764,6 +7459,7 @@ rm -f core conftest.err conftest.$ac_objext \
 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; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
 $as_echo_n "checking for -force_load linker flag... " >&6; }
 if ${lt_cv_ld_force_load+:} false; then :
@@ -6785,7 +7481,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&5
@@ -7190,7 +7888,22 @@ fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -7268,6 +7981,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -7628,8 +8345,6 @@ fi
 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,'
@@ -7729,7 +8444,9 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       lt_prog_compiler_wl='-Xlinker '
-      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
       ;;
     esac
   else
@@ -7794,6 +8511,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	lt_prog_compiler_pic='--shared'
 	lt_prog_compiler_static='--static'
 	;;
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl='-Wl,-Wl,,'
+	lt_prog_compiler_pic='-PIC'
+	lt_prog_compiler_static='-Bstatic'
+	;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
@@ -7814,18 +8537,33 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # 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=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
 	  lt_prog_compiler_wl='-Wl,'
 	  ;;
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fPIC'
+	  lt_prog_compiler_static='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fpic'
+	  lt_prog_compiler_static='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -7913,13 +8651,17 @@ case $host_os in
     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; }
-
-
-
-
 
+{ $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 ${lt_cv_prog_compiler_pic+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
 
 #
 # Check to make sure the PIC flag actually works.
@@ -7980,6 +8722,11 @@ fi
 
 
 
+
+
+
+
+
 #
 # Check to make sure the static flag actually works.
 #
@@ -8178,7 +8925,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   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
@@ -8330,7 +9076,8 @@ _LT_EOF
       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'
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       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'
@@ -8378,7 +9125,7 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 	 && test "$tmp_diet" = no
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
@@ -8427,8 +9174,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # 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'
+	  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
@@ -8448,8 +9194,8 @@ _LT_EOF
 	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'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -8467,8 +9213,8 @@ _LT_EOF
 
 _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'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -8514,8 +9260,8 @@ _LT_EOF
 
     *)
       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'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -8645,7 +9391,13 @@ _LT_EOF
 	allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -8658,22 +9410,29 @@ main ()
 _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
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_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 "$lt_cv_aix_libpath_"; then
+    lt_cv_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
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
@@ -8685,7 +9444,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	 if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -8698,22 +9463,29 @@ main ()
 _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
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_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 "$lt_cv_aix_libpath_"; then
+    lt_cv_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
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
 
 	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
@@ -8758,20 +9530,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # 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 `func_echo_all "$deplibs" | $SED '\''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
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	always_export_symbols=yes
+	file_list_spec='@'
+	# 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+	enable_shared_with_static_runtimes=yes
+	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	old_postinstall_cmds='chmod 644 $oldlib'
+	postlink_cmds='lt_outputfile="@OUTPUT@"~
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	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 `func_echo_all "$deplibs" | $SED '\''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'
+	enable_shared_with_static_runtimes=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -8783,6 +9599,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_shlibpath_var=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec=''
   fi
@@ -8811,10 +9628,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       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
@@ -8827,7 +9640,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -8836,7 +9649,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       hardcode_shlibpath_var=no
@@ -8844,7 +9657,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     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'
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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
@@ -8860,13 +9673,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     hpux10*)
       if test "$GCC" = yes && test "$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'
+	archive_cmds='$CC -shared $pic_flag ${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
@@ -8884,10 +9696,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	  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 $pic_flag ${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'
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
@@ -8966,23 +9778,36 @@ fi
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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
+	# This should be the same for all languages, so no per-tag cache variable.
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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) {}
+int foo (void) { return 0; }
 _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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
       else
 	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
@@ -9067,7 +9892,7 @@ rm -f core conftest.err conftest.$ac_objext \
     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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
@@ -9086,9 +9911,9 @@ rm -f core conftest.err conftest.$ac_objext \
       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_cmds='$CC -shared $pic_flag ${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'
+	  $CC -shared $pic_flag ${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"*)
@@ -9477,11 +10302,6 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -9571,7 +10391,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -9580,7 +10400,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -9645,7 +10465,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -9664,8 +10484,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -9698,13 +10519,71 @@ cygwin* | mingw* | pw32* | cegcc*)
       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH.
+        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
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # 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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
+    # Assume MSVC wrapper
     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -9725,7 +10604,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -9733,10 +10612,6 @@ dgux*)
   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.
@@ -9744,7 +10619,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -9762,7 +10637,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -9782,17 +10657,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -9853,7 +10729,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -9869,7 +10745,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -9906,9 +10782,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -9990,7 +10866,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -10059,7 +10935,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -10084,7 +10960,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -10108,7 +10984,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -10139,7 +11015,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -10149,7 +11025,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -10640,10 +11516,10 @@ else
 /* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-void fnord () __attribute__((visibility("default")));
+int fnord () __attribute__((visibility("default")));
 #endif
 
-void fnord () { int i=42; }
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -10746,10 +11622,10 @@ else
 /* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-void fnord () __attribute__((visibility("default")));
+int fnord () __attribute__((visibility("default")));
 #endif
 
-void fnord () { int i=42; }
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -10931,6 +11807,8 @@ CC="$lt_save_CC"
 
 
 
+
+
         ac_config_commands="$ac_config_commands libtool"
 
 
@@ -11210,130 +12088,70 @@ if test "x$ac_cv_prog_cc_c99" != xno; then :
 fi
 
 
-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; }
+
+
+  OPENMP_CFLAGS=
+  # Check whether --enable-openmp was given.
+if test "${enable_openmp+set}" = set; then :
+  enableval=$enable_openmp;
 fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
-		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+
+  if test "$enable_openmp" != no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5
+$as_echo_n "checking for $CC option to support OpenMP... " >&6; }
+if ${ac_cv_prog_c_openmp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-int
-main ()
-{
+#ifndef _OPENMP
+ choke me
+#endif
+#include <omp.h>
+int main () { return omp_get_num_threads (); }
 
-  ;
-  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; }
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_prog_c_openmp='none needed'
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_prog_c_openmp='unsupported'
+	  	  	  	  	  	  	  	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
+	    ac_save_CFLAGS=$CFLAGS
+	    CFLAGS="$CFLAGS $ac_option"
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+#ifndef _OPENMP
+ choke me
+#endif
+#include <omp.h>
+int main () { return omp_get_num_threads (); }
 
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_prog_c_openmp=$ac_option
 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"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+	    CFLAGS=$ac_save_CFLAGS
+	    if test "$ac_cv_prog_c_openmp" != unsupported; then
+	      break
+	    fi
+	  done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5
+$as_echo "$ac_cv_prog_c_openmp" >&6; }
+    case $ac_cv_prog_c_openmp in #(
+      "none needed" | unsupported)
+	;; #(
+      *)
+	OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;;
+    esac
+  fi
 
 
 if test -n "$ac_tool_prefix"; then
@@ -12525,8 +13343,8 @@ else
   # 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'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -12561,16 +13379,16 @@ else
     : > 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
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > 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"
+    # 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
+    # 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
@@ -12579,8 +13397,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # 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
@@ -12588,7 +13406,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # 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}
@@ -12642,6 +13460,16 @@ else
 fi
 
 
+
+
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+
       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
     (test "X$CXX" != "Xg++"))) ; then
@@ -12797,7 +13625,6 @@ 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
@@ -12864,6 +13691,7 @@ $RM -r conftest*
 
   # Allow CC to be a program name with arguments.
   lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
   lt_save_LD=$LD
   lt_save_GCC=$GCC
   GCC=$GXX
@@ -12881,6 +13709,7 @@ $RM -r conftest*
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   compiler_CXX=$CC
   for cc_temp in $compiler""; do
@@ -13020,8 +13849,8 @@ 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'
+        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC $pic_flag -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'
@@ -13163,7 +13992,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
           allow_undefined_flag_CXX='-berok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+          if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -13176,22 +14011,29 @@ main ()
 _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
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`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
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
 
           hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
 
@@ -13204,7 +14046,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	    if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -13217,22 +14065,29 @@ main ()
 _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"`
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+
 fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
 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,
@@ -13275,29 +14130,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         ;;
 
       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'
-        export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
-        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
-        ;;
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX=' '
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=yes
+	  file_list_spec_CXX='@'
+	  # 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_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+	  enable_shared_with_static_runtimes_CXX=yes
+	  # Don't use ranlib
+	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
+	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _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'
+	  export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+	  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
+	  ;;
+	esac
+	;;
       darwin* | rhapsody*)
 
 
@@ -13307,6 +14208,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_shlibpath_var_CXX=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec_CXX=''
   fi
@@ -13351,7 +14253,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         esac
         ;;
 
-      freebsd[12]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         ld_shlibs_CXX=no
@@ -13403,7 +14305,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
             ;;
           *)
             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'
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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
@@ -13474,10 +14376,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	            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 $pic_flag ${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'
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -13518,9 +14420,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           *)
 	    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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 	      fi
 	    fi
 	    link_all_deplibs_CXX=yes
@@ -13798,7 +14700,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	      esac
 
@@ -13885,9 +14787,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    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_cmds_CXX='$CC -shared $pic_flag -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'
+		  $CC -shared $pic_flag -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
@@ -14022,6 +14924,14 @@ private:
 };
 _LT_EOF
 
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14035,7 +14945,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case ${prev}${p} in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
@@ -14044,13 +14954,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
           test $p = "-R"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        fi
 
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
        if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
+	 case ${prev} 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.
@@ -14070,8 +14989,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
 	 fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -14107,6 +15028,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 case $host_os in
@@ -14207,8 +15129,6 @@ fi
 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
@@ -14312,6 +15232,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	  ;;
 	esac
 	;;
+      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).
+	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+	;;
       dgux*)
 	case $cc_basename in
 	  ec++*)
@@ -14529,10 +15454,17 @@ case $host_os in
     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; }
-
 
+{ $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 ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
 
 #
 # Check to make sure the PIC flag actually works.
@@ -14590,6 +15522,8 @@ fi
 
 
 
+
+
 #
 # Check to make sure the static flag actually works.
 #
@@ -14767,6 +15701,7 @@ fi
 $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'
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   case $host_os in
   aix[4-9]*)
     # If we're using GNU nm, then we don't want the "-C" option.
@@ -14781,15 +15716,22 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     ;;
   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'
-  ;;
+    case $cc_basename in
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+      ;;
+    esac
+    ;;
   *)
     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; }
@@ -14932,8 +15874,6 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -14959,7 +15899,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -14968,7 +15908,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -15033,7 +15973,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -15052,8 +15992,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -15085,13 +16026,71 @@ cygwin* | mingw* | pw32* | cegcc*)
       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH.
+        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
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # 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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
+    # Assume MSVC wrapper
     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -15111,7 +16110,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -15119,10 +16118,6 @@ dgux*)
   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.
@@ -15130,7 +16125,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -15148,7 +16143,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -15168,17 +16163,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -15239,7 +16235,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -15255,7 +16251,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -15292,9 +16288,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15376,7 +16372,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -15445,7 +16441,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15470,7 +16466,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -15494,7 +16490,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -15525,7 +16521,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15535,7 +16531,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -15645,6 +16641,7 @@ fi
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -15662,7 +16659,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-
+#
 FC=no
 export FC
 #  ----------------------------------------------------------------------
@@ -16355,6 +17352,9 @@ $as_echo "$enable_data" >&6; }
 ENABLE_DATA=$enable_data
 
 #  ----------------------------------------------------------------------
+CFLAGS="$CFLAGS ${OPENMP_CFLAGS}"
+#  ----------------------------------------------------------------------
+
 # Add configure options
 
 
@@ -17549,6 +18549,7 @@ fi
 
 #  ----------------------------------------------------------------------
 #  Compile application with netcdf
+ENABLE_NETCDF=no
 NETCDF_ROOT=''
 NETCDF_INCLUDE=''
 NETCDF_LIBS=''
@@ -17630,6 +18631,7 @@ if test "$ac_res" != no; then :
 
 $as_echo "#define HAVE_LIBNETCDF 1" >>confdefs.h
 
+                                            ENABLE_NETCDF=yes
 else
   as_fn_error $? "Could not link to netcdf library" "$LINENO" 5
 fi
@@ -17773,6 +18775,7 @@ if test "$ac_res" != no; then :
 
 $as_echo "#define HAVE_LIBNETCDF 1" >>confdefs.h
 
+                                                 ENABLE_NETCDF=yes
 else
   as_fn_error $? "Could not link to netcdf library" "$LINENO" 5
 fi
@@ -17877,6 +18880,7 @@ fi
 
 
 
+
 #  ----------------------------------------------------------------------
 #  Link application with JASPER library (needed for GRIB2 compression)
 JASPER_LIBS=''
@@ -19458,6 +20462,7 @@ fi
 
 
 
+#AC_SUBST([INCLUDES])
 
 
 
@@ -19469,6 +20474,56 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+
+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 ${ac_cv_prog_AWK+:} false; 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
+
+
+ac_config_files="$ac_config_files test/Cat.test test/Gridarea.test test/Genweights.test test/Remap.test"
+
+ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Timstat.test test/Vertint.test"
+
+ac_config_files="$ac_config_files test/Detrend.test"
+
 ac_config_files="$ac_config_files Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings"
 
 cat >confcache <<\_ACEOF
@@ -19580,6 +20635,14 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
  if test -n "$EXEEXT"; then
   am__EXEEXT_TRUE=
   am__EXEEXT_FALSE='#'
@@ -20025,7 +21088,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cdo $as_me 1.6.3, which was
+This file was extended by cdo $as_me 1.6.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20091,7 +21154,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cdo config.status 1.6.3
+cdo config.status 1.6.4
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -20228,6 +21291,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
@@ -20248,13 +21312,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
@@ -20269,14 +21340,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
@@ -20300,7 +21374,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
@@ -20309,12 +21382,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -20353,8 +21426,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
@@ -20372,7 +21445,6 @@ with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
@@ -20381,12 +21453,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
-fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`'
 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
@@ -20411,6 +21483,7 @@ _LTECHO_EOF'
 # Quote evaled strings.
 for var in SHELL \
 ECHO \
+PATH_SEPARATOR \
 SED \
 GREP \
 EGREP \
@@ -20424,8 +21497,13 @@ reload_flag \
 OBJDUMP \
 deplibs_check_method \
 file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
 AR \
 AR_FLAGS \
+archiver_list_spec \
 STRIP \
 RANLIB \
 CC \
@@ -20435,12 +21513,14 @@ 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 \
+nm_file_list_spec \
 lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
 lt_prog_compiler_pic \
+lt_prog_compiler_wl \
 lt_prog_compiler_static \
 lt_cv_prog_compiler_c_o \
 need_locks \
+MANIFEST_TOOL \
 DSYMUTIL \
 NMEDIT \
 LIPO \
@@ -20454,9 +21534,7 @@ 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 \
@@ -20478,8 +21556,8 @@ LD_CXX \
 reload_flag_CXX \
 compiler_CXX \
 lt_prog_compiler_no_builtin_flag_CXX \
-lt_prog_compiler_wl_CXX \
 lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
 lt_prog_compiler_static_CXX \
 lt_cv_prog_compiler_c_o_CXX \
 export_dynamic_flag_spec_CXX \
@@ -20489,9 +21567,7 @@ with_gnu_ld_CXX \
 allow_undefined_flag_CXX \
 no_undefined_flag_CXX \
 hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
 hardcode_libdir_separator_CXX \
-fix_srcfile_path_CXX \
 exclude_expsyms_CXX \
 include_expsyms_CXX \
 file_list_spec_CXX \
@@ -20525,6 +21601,7 @@ module_cmds \
 module_expsym_cmds \
 export_symbols_cmds \
 prelink_cmds \
+postlink_cmds \
 postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
@@ -20539,7 +21616,8 @@ archive_expsym_cmds_CXX \
 module_cmds_CXX \
 module_expsym_cmds_CXX \
 export_symbols_cmds_CXX \
-prelink_cmds_CXX; do
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
@@ -20583,6 +21661,15 @@ do
     "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "test/Cat.test") CONFIG_FILES="$CONFIG_FILES test/Cat.test" ;;
+    "test/Gridarea.test") CONFIG_FILES="$CONFIG_FILES test/Gridarea.test" ;;
+    "test/Genweights.test") CONFIG_FILES="$CONFIG_FILES test/Genweights.test" ;;
+    "test/Remap.test") CONFIG_FILES="$CONFIG_FILES test/Remap.test" ;;
+    "test/Select.test") CONFIG_FILES="$CONFIG_FILES test/Select.test" ;;
+    "test/Spectral.test") CONFIG_FILES="$CONFIG_FILES test/Spectral.test" ;;
+    "test/Timstat.test") CONFIG_FILES="$CONFIG_FILES test/Timstat.test" ;;
+    "test/Vertint.test") CONFIG_FILES="$CONFIG_FILES test/Vertint.test" ;;
+    "test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
@@ -21186,7 +22273,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
   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
+  # Older Autoconf 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
@@ -21199,7 +22286,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     # 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
+    # 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.
@@ -21233,21 +22320,19 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    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
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
@@ -21301,8 +22386,8 @@ $as_echo X"$file" |
 # 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, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -21356,6 +22441,9 @@ SHELL=$lt_SHELL
 # An echo program that protects backslashes.
 ECHO=$lt_ECHO
 
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
 # The host system.
 host_alias=$host_alias
 host=$host
@@ -21405,19 +22493,42 @@ SP2NL=$lt_lt_SP2NL
 # turn newlines into spaces.
 NL2SP=$lt_lt_NL2SP
 
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
 # 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".
+# Command to use when deplibs_check_method = "file_magic".
 file_magic_cmd=$lt_file_magic_cmd
 
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
 # The archiver.
 AR=$lt_AR
+
+# Flags to create an archive.
 AR_FLAGS=$lt_AR_FLAGS
 
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
 # A symbol stripping program.
 STRIP=$lt_STRIP
 
@@ -21447,6 +22558,12 @@ 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
 
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
 # The name of the directory that contains temporary libtool files.
 objdir=$objdir
 
@@ -21456,6 +22573,9 @@ MAGIC_CMD=$MAGIC_CMD
 # Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
 DSYMUTIL=$lt_DSYMUTIL
 
@@ -21570,12 +22690,12 @@ 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
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static
 
@@ -21625,10 +22745,6 @@ no_undefined_flag=$lt_no_undefined_flag
 # 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
 
@@ -21662,9 +22778,6 @@ 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
 
@@ -21680,6 +22793,9 @@ include_expsyms=$lt_include_expsyms
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec
 
@@ -21726,210 +22842,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
   # 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 "${1}" | $SED "$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 "${1}" | $SED "$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 "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; 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 "${1}" | $SED "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "${1}" | $SED '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" ||
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+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}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 
@@ -21957,12 +23032,12 @@ 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
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static_CXX
 
@@ -22012,10 +23087,6 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
 # 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
 
@@ -22049,9 +23120,6 @@ 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
 
@@ -22067,6 +23135,9 @@ include_expsyms=$lt_include_expsyms_CXX
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds_CXX
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec_CXX
 
@@ -22091,6 +23162,15 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 _LT_EOF
 
  ;;
+    "test/Cat.test":F) chmod a+x "$ac_file" ;;
+    "test/Gridarea.test":F) chmod a+x "$ac_file" ;;
+    "test/Genweights.test":F) chmod a+x "$ac_file" ;;
+    "test/Remap.test":F) chmod a+x "$ac_file" ;;
+    "test/Select.test":F) chmod a+x "$ac_file" ;;
+    "test/Spectral.test":F) chmod a+x "$ac_file" ;;
+    "test/Timstat.test":F) chmod a+x "$ac_file" ;;
+    "test/Vertint.test":F) chmod a+x "$ac_file" ;;
+    "test/Detrend.test":F) chmod a+x "$ac_file" ;;
 
   esac
 done # for ac_tag
diff --git a/configure.ac b/configure.ac
index b5837c4..5509a95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,10 @@
 # Process this file with autoconf to produce a configure script.
+#
+#  automake 1.14
+#  autoconf 2.68
+#  libtool  2.4.2
 
-AC_INIT([cdo], [1.6.3], [http://code.zmaw.de/projects/cdo])
+AC_INIT([cdo], [1.6.4], [http://code.zmaw.de/projects/cdo])
 
 CONFIG_ABORT=yes
 AC_CONFIG_AUX_DIR(config)
@@ -8,7 +12,8 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CANONICAL_HOST
 AC_CANONICAL_BUILD
 
-AM_INIT_AUTOMAKE
+# AM_INIT_AUTOMAKE([foreign -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall])
 AC_CONFIG_HEADERS([src/config.h])
 AM_MAINTAINER_MODE([disable])
 
@@ -20,6 +25,7 @@ LT_INIT
 AC_CHECK_TOOL([CC],[gcc],[:])
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
+AC_OPENMP
 AC_CHECK_TOOL([AR],[ar],[:])
 AC_CHECK_TOOL([CPP],[cpp],[:])
 AC_CHECK_TOOL([LD],[ld],[:])
@@ -32,7 +38,7 @@ AC_CHECK_TOOL([STRIP],[strip],[:])
 AC_CHECK_TOOL([RANLIB],[ranlib],[:])
 AC_PROG_INSTALL
 AC_PROG_CXX
-
+#
 FC=no
 export FC
 #  ----------------------------------------------------------------------
@@ -111,6 +117,9 @@ AC_ARG_ENABLE([data],
 AC_MSG_RESULT([$enable_data])
 AC_SUBST([ENABLE_DATA],[$enable_data])
 #  ----------------------------------------------------------------------
+CFLAGS="$CFLAGS ${OPENMP_CFLAGS}"
+#  ----------------------------------------------------------------------
+
 # Add configure options
 ACX_OPTIONS
 #  ----------------------------------------------------------------------
@@ -118,14 +127,22 @@ AC_SUBST([CPPFLAGS])
 AC_SUBST([FCFLAGS])
 AC_SUBST([CLDFLAGS])
 AC_SUBST([CLIBS])
-AC_SUBST([INCLUDES])
+#AC_SUBST([INCLUDES])
+AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([AR])
 
 # Checks for compiler
 COMPILER="$CC $CFLAGS"
 AC_DEFINE_UNQUOTED(COMPILER, ["$COMPILER"], [Compiler])
 
-AC_OUTPUT(Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings)
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
+AC_PROG_AWK
+
+AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Remap.test],[chmod a+x "$ac_file"])
+AC_CONFIG_FILES([test/Select.test test/Spectral.test test/Timstat.test test/Vertint.test],[chmod a+x "$ac_file"])
+AC_CONFIG_FILES([test/Detrend.test],[chmod a+x "$ac_file"])
+AC_CONFIG_FILES([Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings])
+AC_OUTPUT
 
 #  ----------------------------------------------------------------------
 #  Show configuration
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index 2c4b44a..58c7759 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,7 +79,8 @@ build_triplet = @build@
 host_triplet = @host@
 @MAINTAINER_MODE_TRUE at am__append_1 = `ls cdoCompletion.*`
 subdir = contrib
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs COPYING
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -65,6 +93,18 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -72,9 +112,12 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -110,6 +153,7 @@ ENABLE_DATA = @ENABLE_DATA@
 ENABLE_EXTRA = @ENABLE_EXTRA@
 ENABLE_GRIB = @ENABLE_GRIB@
 ENABLE_IEG = @ENABLE_IEG@
+ENABLE_NETCDF = @ENABLE_NETCDF@
 ENABLE_SERVICE = @ENABLE_SERVICE@
 EXEEXT = @EXEEXT@
 FCFLAGS = @FCFLAGS@
@@ -121,7 +165,6 @@ HDF5_INCLUDE = @HDF5_INCLUDE@
 HDF5_LIBS = @HDF5_LIBS@
 HDF5_ROOT = @HDF5_ROOT@
 HOST_NAME = @HOST_NAME@
-INCLUDES = @INCLUDES@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -141,6 +184,7 @@ MAGICS_LIBS = @MAGICS_LIBS@
 MAGICS_ROOT = @MAGICS_ROOT@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NC_CONFIG = @NC_CONFIG@
 NETCDF_INCLUDE = @NETCDF_INCLUDE@
@@ -150,6 +194,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -186,6 +231,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
@@ -250,9 +296,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu contrib/Makefile
+	  $(AUTOMAKE) --foreign contrib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -277,11 +323,11 @@ mostlyclean-libtool:
 
 clean-libtool:
 	-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -419,16 +465,17 @@ uninstall-am:
 .MAKE: install-am install-strip
 
 .PHONY: all all-am all-local 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
+	clean-libtool cscopelist-am ctags-am 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 tags-am uninstall \
+	uninstall-am
 
 
 completions:
diff --git a/contrib/cdoCompletion.bash b/contrib/cdoCompletion.bash
index b8f8b33..9d788bb 100644
--- a/contrib/cdoCompletion.bash
+++ b/contrib/cdoCompletion.bash
@@ -1,4 +1,6 @@
 complete -W "
+-- \
+-- \
 -L \
 -M \
 -O \
@@ -60,10 +62,10 @@ complextorect -complextorect \
 consecsum -consecsum \
 consects -consects \
 const -const \
-contour -contour \
 conv_cmor_table -conv_cmor_table \
 copy -copy \
 cos -cos \
+coshill -coshill \
 covar0 -covar0 \
 covar0r -covar0r \
 dayavg -dayavg \
@@ -89,7 +91,6 @@ deltap_fl -deltap_fl \
 delvar -delvar \
 detrend -detrend \
 diff -diff \
-diff2 -diff2 \
 diffc -diffc \
 diffn -diffn \
 diffp -diffp \
@@ -207,21 +208,20 @@ genbic -genbic \
 genbil -genbil \
 gencon -gencon \
 gencon2 -gencon2 \
-gencons -gencons \
 gendis -gendis \
 gengrid -gengrid \
 genlaf -genlaf \
 gennn -gennn \
+genycon -genycon \
 geopotheight -geopotheight \
 ggstat -ggstat \
 ggstats -ggstats \
+gheight -gheight \
 globavg -globavg \
 gp2fc -gp2fc \
 gp2sp -gp2sp \
 gp2spl -gp2spl \
 gradsdes -gradsdes \
-graph -graph \
-grfill -grfill \
 gridarea -gridarea \
 gridboxavg -gridboxavg \
 gridboxmax -gridboxmax \
@@ -424,7 +424,6 @@ remapbil -remapbil \
 remapcon -remapcon \
 remapcon1 -remapcon1 \
 remapcon2 -remapcon2 \
-remapcons -remapcons \
 remapdis -remapdis \
 remapdis1 -remapdis1 \
 remapeta -remapeta \
@@ -433,6 +432,7 @@ remapeta_z -remapeta_z \
 remaplaf -remaplaf \
 remapnn -remapnn \
 remapsum -remapsum \
+remapycon -remapycon \
 replace -replace \
 retocomplex -retocomplex \
 rhopot -rhopot \
@@ -534,7 +534,6 @@ setvar -setvar \
 setvrange -setvrange \
 setyear -setyear \
 setzaxis -setzaxis \
-shaded -shaded \
 shifttime -shifttime \
 showcode -showcode \
 showdate -showdate \
@@ -596,7 +595,6 @@ ssopar -ssopar \
 stdatm -stdatm \
 stimelogo -stimelogo \
 strbre -strbre \
-stream -stream \
 strgal -strgal \
 strwin -strwin \
 studentt -studentt \
@@ -654,7 +652,6 @@ varquot2test -varquot2test \
 varrms -varrms \
 vct -vct \
 vct2 -vct2 \
-vector -vector \
 vertavg -vertavg \
 vertmax -vertmax \
 vertmean -vertmean \
diff --git a/contrib/cdoCompletion.tcsh b/contrib/cdoCompletion.tcsh
index 8b4f62b..42b4570 100644
--- a/contrib/cdoCompletion.tcsh
+++ b/contrib/cdoCompletion.tcsh
@@ -1,4 +1,6 @@
 set cdoCmpl = (\
+- \
+- \
 L \
 M \
 O \
@@ -60,10 +62,10 @@ complextorect \
 consecsum \
 consects \
 const \
-contour \
 conv_cmor_table \
 copy \
 cos \
+coshill \
 covar0 \
 covar0r \
 dayavg \
@@ -89,7 +91,6 @@ deltap_fl \
 delvar \
 detrend \
 diff \
-diff2 \
 diffc \
 diffn \
 diffp \
@@ -207,21 +208,20 @@ genbic \
 genbil \
 gencon \
 gencon2 \
-gencons \
 gendis \
 gengrid \
 genlaf \
 gennn \
+genycon \
 geopotheight \
 ggstat \
 ggstats \
+gheight \
 globavg \
 gp2fc \
 gp2sp \
 gp2spl \
 gradsdes \
-graph \
-grfill \
 gridarea \
 gridboxavg \
 gridboxmax \
@@ -424,7 +424,6 @@ remapbil \
 remapcon \
 remapcon1 \
 remapcon2 \
-remapcons \
 remapdis \
 remapdis1 \
 remapeta \
@@ -433,6 +432,7 @@ remapeta_z \
 remaplaf \
 remapnn \
 remapsum \
+remapycon \
 replace \
 retocomplex \
 rhopot \
@@ -534,7 +534,6 @@ setvar \
 setvrange \
 setyear \
 setzaxis \
-shaded \
 shifttime \
 showcode \
 showdate \
@@ -596,7 +595,6 @@ ssopar \
 stdatm \
 stimelogo \
 strbre \
-stream \
 strgal \
 strwin \
 studentt \
@@ -654,7 +652,6 @@ varquot2test \
 varrms \
 vct \
 vct2 \
-vector \
 vertavg \
 vertmax \
 vertmean \
diff --git a/contrib/cdoCompletion.zsh b/contrib/cdoCompletion.zsh
index 3576147..a134b83 100644
--- a/contrib/cdoCompletion.zsh
+++ b/contrib/cdoCompletion.zsh
@@ -1,4 +1,6 @@
 compctl -k "(
+-- \
+-- \
 -L \
 -M \
 -O \
@@ -60,10 +62,10 @@ complextorect -complextorect \
 consecsum -consecsum \
 consects -consects \
 const -const \
-contour -contour \
 conv_cmor_table -conv_cmor_table \
 copy -copy \
 cos -cos \
+coshill -coshill \
 covar0 -covar0 \
 covar0r -covar0r \
 dayavg -dayavg \
@@ -89,7 +91,6 @@ deltap_fl -deltap_fl \
 delvar -delvar \
 detrend -detrend \
 diff -diff \
-diff2 -diff2 \
 diffc -diffc \
 diffn -diffn \
 diffp -diffp \
@@ -207,21 +208,20 @@ genbic -genbic \
 genbil -genbil \
 gencon -gencon \
 gencon2 -gencon2 \
-gencons -gencons \
 gendis -gendis \
 gengrid -gengrid \
 genlaf -genlaf \
 gennn -gennn \
+genycon -genycon \
 geopotheight -geopotheight \
 ggstat -ggstat \
 ggstats -ggstats \
+gheight -gheight \
 globavg -globavg \
 gp2fc -gp2fc \
 gp2sp -gp2sp \
 gp2spl -gp2spl \
 gradsdes -gradsdes \
-graph -graph \
-grfill -grfill \
 gridarea -gridarea \
 gridboxavg -gridboxavg \
 gridboxmax -gridboxmax \
@@ -424,7 +424,6 @@ remapbil -remapbil \
 remapcon -remapcon \
 remapcon1 -remapcon1 \
 remapcon2 -remapcon2 \
-remapcons -remapcons \
 remapdis -remapdis \
 remapdis1 -remapdis1 \
 remapeta -remapeta \
@@ -433,6 +432,7 @@ remapeta_z -remapeta_z \
 remaplaf -remaplaf \
 remapnn -remapnn \
 remapsum -remapsum \
+remapycon -remapycon \
 replace -replace \
 retocomplex -retocomplex \
 rhopot -rhopot \
@@ -534,7 +534,6 @@ setvar -setvar \
 setvrange -setvrange \
 setyear -setyear \
 setzaxis -setzaxis \
-shaded -shaded \
 shifttime -shifttime \
 showcode -showcode \
 showdate -showdate \
@@ -596,7 +595,6 @@ ssopar -ssopar \
 stdatm -stdatm \
 stimelogo -stimelogo \
 strbre -strbre \
-stream -stream \
 strgal -strgal \
 strwin -strwin \
 studentt -studentt \
@@ -654,7 +652,6 @@ varquot2test -varquot2test \
 varrms -varrms \
 vct -vct \
 vct2 -vct2 \
-vector -vector \
 vertavg -vertavg \
 vertmax -vertmax \
 vertmean -vertmean \
diff --git a/doc/cdo.pdf b/doc/cdo.pdf
index 2af154a..b97cf4a 100644
Binary files a/doc/cdo.pdf and b/doc/cdo.pdf differ
diff --git a/doc/cdo_refcard.pdf b/doc/cdo_refcard.pdf
index 362dcd1..0d8488f 100644
Binary files a/doc/cdo_refcard.pdf and b/doc/cdo_refcard.pdf differ
diff --git a/libcdi/ChangeLog b/libcdi/ChangeLog
index 4a0d0fb..9fe4841 100644
--- a/libcdi/ChangeLog
+++ b/libcdi/ChangeLog
@@ -1,90 +1,172 @@
-2014-02-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-06-26  Uwe Schulzweida
+
+	* Version 1.6.4 released
+	* using EXSE library version 1.3.2
+	* using CGRIBEX library version 1.6.4
+
+2014-06-16  Uwe Schulzweida
+
+	* added support for env var CDI_NETCDF_HDR_PAD (pad netCDF header with nbr bytes)
+
+2014-06-06  Uwe Schulzweida
+
+	* Loss of coordinates attribute when merging files [Bug #4880]
+
+2014-06-04  Uwe Schulzweida
+
+	* netCDF: do not defined attribute calendar and units for time bounds [report: Stephanie Legutke]
+
+2014-05-19  Uwe Schulzweida
+
+	* netCDF: added support for  opendap files by https
+
+2014-05-16  Uwe Schulzweida
+
+	* netCDF: added write support of lat/lon coordinates without dimension
+
+2014-05-15  Uwe Schulzweida
+
+	* cgribexGetGrid: correct last lon when last lon < first lon
+
+2014-05-14  Uwe Schulzweida
+
+	* netCDF: skip unsupported dimension (no xyzt)
+
+2014-05-13  Uwe Schulzweida
+
+	* netCDF: added read support for lon/lat coordinates without dimension
+
+2014-05-12  Uwe Schulzweida
+
+	* gridCreate: removed default stdname and units  for GENERIC grids
+
+2014-05-11  Uwe Schulzweida
+
+	* added support for GRIB_API key cfName
+
+2014-04-10  Uwe Schulzweida
+
+	* varscan::cmpparam: apply patch from Thomas Jahns
+
+2014-03-24  Uwe Schulzweida
+
+	* configure --with-netCDF: set default=no
+	* gribapiDefDateTimeRel: set vdate to rdate for time invariant fields [Bug #4641]
+
+2014-03-20  Uwe Schulzweida
+
+	* netCDF4: changed default file name suffix from nc4 to nc
+	* GRIB2: changed default file name suffix fromg g2 to grb
+
+2014-03-10  Uwe Schulzweida
+
+	* netCDF4 classic: existing files are converted to netCDF4 - classic flag is lost (bug fix)
+	* cgribexDefParam: check validity of parameter number
+
+2014-03-04  Uwe Schulzweida
+
+	* zaxisCreate: check number of levels
+
+2014-02-27  Uwe Schulzweida
+
+	* added taxisDefFdate() and taxisDefFtime() - Define the forecast reference date
+	* added taxisInqFdate() and taxisInqFtime() - Get  the forecast reference date
+
+2014-02-21  Uwe Schulzweida
+
+	* grib_api: debug patch from Florian and Daniel
+
+2014-02-20  Uwe Schulzweida
+
+	* grib2: set stepUnits after changing the template [Bug #4500]
+
+2014-02-14  Uwe Schulzweida
 
 	* Version 1.6.3 released
 	* using CGRIBEX library version 1.6.3
 
-2014-02-03 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-02-03 Uwe Schulzweida
 
 	* gridInqUUID: changed return value from char* to void
 	* zaxisInqUUID: changed return value from char* to void
 
-2014-01-31 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-31 Uwe Schulzweida
 
 	* stream_cdf: added cdfDefZaxisUUID() [patch: Florian Prill]
 
-2014-01-13 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-13 Uwe Schulzweida
 
 	* stream_cdf::define_all_grids: bug fix for unstructured grids and an additional undefined dimension [report: Florian Prill]
 
-2014-01-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-08  Uwe Schulzweida
 
 	* streamInqGinfo: added support for GRIB files > 2GB
 
-2014-01-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2014-01-03  Uwe Schulzweida
 
 	* streamOpenA, streamOpen: parameter recordBufIsToBeCreated missing in call to cdiStreamOpenDefaultDelegate() (bug fix)
 
-2013-12-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-12-09  Uwe Schulzweida
 
 	* streamOpenA: removed line "streamptr->record = record"; record is allocated in cdiStreamOpenDefaultDelegate() (bug fix)
 
-2013-11-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-28  Uwe Schulzweida
 
 	* Merged branch cdi-pio to trunk cdi
 
-2013-11-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-12  Uwe Schulzweida
 
 	* Version 1.6.2 released
 	* using CGRIBEX library version 1.6.2
 
-2013-11-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-05  Uwe Schulzweida
 
 	* Added CDI function zaxisDefNlevRef() and zaxisInqNlevRef() [Feature #4117]
 
-2013-11-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-11-04  Uwe Schulzweida
 
 	* Merged branch cdi-pio to trunk cdi
 
-2013-10-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-22  Uwe Schulzweida
 
 	* Added support for netCDF CF time attribute: climatology [Feature #4092]
 
-2013-10-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-17  Uwe Schulzweida
 
 	* stream_cdf::isLatAxis() and isLonAxis(): added support for stdname latitude and longitude
 
-2013-10-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-15  Uwe Schulzweida
 
 	* added support for GRIB2 key typeOfGeneratingProcess
 	* added interface function vlistDefVarTypeOfGeneratingProcess() and vlistInqVarTypeOfGeneratingProcess()
 
-2013-10-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-07  Uwe Schulzweida
 
 	* listSizeExtend: initialize ops, val and status (Bug #3994) 
 
-2013-10-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-10-07  Uwe Schulzweida
 
 	* stream_cdf::isLonAxis/isLatAxis: case sensitive units check
 
-2013-09-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-09-02  Uwe Schulzweida
 
 	* streamCopyRecord: allow mixed netCDF file types
 
-2013-08-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-26  Uwe Schulzweida
 
 	* gribapiDefLevel: Bug fix for ZAXIS_REFERENCE (Bug #3747)
 
-2013-08-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-16  Uwe Schulzweida
 
 	* netCDF: read reference of an unstructured grid
 	* netCDF: write reference of an unstructured grid
 
-2013-08-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-15  Uwe Schulzweida
 
 	* made gridtype GRID_REFERENCE part of GRID_UNSTRUCTED
 	* removed gridtype GRID_REFERENCE
 
-2013-08-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-12  Uwe Schulzweida
 
 	* GRIB2: added support for level type Lake Bottom (grib level type 162)
         * GRIB2: added support for level type Bottom Of Sediment Layer (grib level type 163)
@@ -92,288 +174,288 @@
         * GRIB2: added support for level type Bottom Of Sediment Layer Penetrated By Thermal Wave (grib level type 165)
         * GRIB2: added support for level type Mixing Layer (grib level type 166)
 
-2013-08-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-08-09  Uwe Schulzweida
 
 	* gribapiGetValidityDateTime: check timeRangeIndicator for editionNumber =1 (bug fix)
 
-2013-07-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-07-16  Uwe Schulzweida
 
 	* netCDF: added support for zaxis attribute: positive
 
-2013-07-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-07-15  Uwe Schulzweida
 
 	* Version 1.6.1.1 released (merged branch cdi-pio to trunk cdi)
 
-2013-07-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-07-08  Uwe Schulzweida
 
 	* netCDF: wrong result if type  of data and type of attribute valid_range differ [Bug #3727]
 
-2013-07-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-07-04  Uwe Schulzweida
 
 	* gribapiDefLevel::ZAXIS_DEPTH_BELOW_LAND: apply scalefactor to dlevel2 (bug fix) [report: Harald Anlauf]
 	* streamFilesuffix: changed default filename suffix for FILETYPE_NC2 to nc
 
-2013-06-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-28  Uwe Schulzweida
 
 	* Version 1.6.1 released
 	* using CGRIBEX library version 1.6.1
 
-2013-06-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-27  Uwe Schulzweida
 
 	* file.c: added env. var. FILE_TYPE_WRITE (1:open; 2:fopen)
 
-2013-06-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-11  Uwe Schulzweida
 
 	* GRIB2: added support for snow level (level type 114)
 	* GRIB2: added support for layers with zaxis type ZAXIS_PRESSURE
 
-2013-06-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-06  Uwe Schulzweida
 
 	* cdfDefVarMissval: changed xtype from NC_BYTE to NC_INT for missvals > 127 (workaround for a netCDF bug)
 	* use 'number_of_grid_used' only for undefined grid types
 
-2013-06-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-06-03  Uwe Schulzweida
 
 	* added patch from Florian Prill: Lesen von 'number_of_grid_used', GRID_REFERENCE (bug fix)
 
-2013-05-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-29  Uwe Schulzweida
 
 	* netCDF: skip 4D variables without time dimension (bug fix)
 
-2013-05-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-28  Uwe Schulzweida
 
 	* GRIB2: added support for pressure levels with 3 fractional digits
 
-2013-05-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-27  Uwe Schulzweida
 
 	* gribapiGetEndStep: use stepUnits for timeunits2
 	* grib2GetLevel: set level bounds if  0 < leveltype2 < 255
 
-2013-05-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-23  Uwe Schulzweida
 
 	* netCDF: missing_value attribute removed [Bug #3592]
 
-2013-05-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-17  Uwe Schulzweida
 
 	* added CDI function cdiHaveFiletype() to check whether a filetype is available
 
-2013-05-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-05-13  Uwe Schulzweida
 
 	* added patch from Florian Prill: Lesen von "Nicht-Standard" GRIB-Keys (bug fix)
 
-2013-04-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-26  Uwe Schulzweida
 
 	* added patch from Florian Prill: Lesen von "Nicht-Standard" GRIB-Keys
 
-2013-04-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-25  Uwe Schulzweida
 
 	* institutInq: check contents of name and longname (bug fix) [Bug #3419]
 
-2013-04-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-23  Uwe Schulzweida
 
 	* cfortran.h::kill_trailing: wrong result with gcc -O3, use prama for -O2 (bug fix) [report: Luis Kornblueh]
 	* vlistXXXAttTxt: use cdi fortran datatype CBUF (char *) for the last argument (bug fix) [report: Luis Kornblueh]
 	* gridXXXUUID: use cdi fortran datatype CBUF (char *) for the last argument (bug fix) [Bug #3424]
 	* zaxisXXXUUID: use cdi fortran datatype CBUF (char *) for the last argument (bug fix)
 
-2013-04-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-19  Uwe Schulzweida
 
 	* stream_gribapi: replaced function getLevelFactor() [Bug #3446]
 
-2013-04-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-18  Uwe Schulzweida
 
 	* added function vlistDefVarExtra() and vlistInqVarExtra()
 
-2013-04-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-04  Uwe Schulzweida
 
 	* vlistDefVarDatatype: changed default missing values of signed integers to -TYPE_MAX
 
-2013-04-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-04-02  Uwe Schulzweida
 
 	* cdi.h: changed >char*< to >char *< (bug fix for fortran interface)
 	* make_cdilib: changed position of error.c and error.h (bug fix)
 
-2013-03-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-14  Uwe Schulzweida
 
 	* Version 1.6.0 released
 	* using CGRIBEX library version 1.6.0
 
-2013-03-13  Florian Prill  <Florian.Prill at dwd.de>
+2013-03-13  Florian Prill
 
 	* Read arbitrary GRIB keys [Feature #3267]
 
-2013-03-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-13  Uwe Schulzweida
 
 	* GRIB: added support for time step unit: seconds [Bug #3352]
 
-2013-03-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-12  Uwe Schulzweida
 
 	* Added support for level type CLOUD_BASE, CLOUD_TOP and ISOTHERM_ZERO [Feature #3247]
 	* stream_gribapi: changed units for level type GRIB2_LTYPE_LANDDEPTH to m (internally mm) [Bug #3287]
 	* gribapiGetGrid: get gridDescriptionFile with grib_get_string() instead of grib_get_bytes() (bug fix)
 
-2013-03-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-11  Uwe Schulzweida
 
 	* stream_gribapi: added support for local table shortName.def [Bug #3343]
 
-2013-03-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-08  Uwe Schulzweida
 
 	* vtime2timeval: check validity of month
 
-2013-03-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-03-07  Uwe Schulzweida
 
 	* cdfDefGrid: bug fix for generic grids with nx or ny > 0
 	* netCDF: ignore the attribute valid_min/valid_max, if the data type is inconsistent
 
-2013-02-18  Florian Prill  <Florian.Prill at dwd.de>
+2013-02-18  Florian Prill
 
 	* Added function vlistDefVarIntKey() and vlistDefVarDblKey() to set GRIB_API Key/Value pairs
 
-2013-02-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-13  Uwe Schulzweida
 
 	* cgribexGetTsteptype: changed default to TSTEP_INSTANT [Bug #3211]
 
-2013-02-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-02-04  Uwe Schulzweida
 
 	* netCDF: ignore the attribute valid_range, if the data type is inconsistent
 	* netCDF: added env IGNORE_VALID_RANGE to ignore the attribute valid_range
 
-2013-01-31  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-31  Uwe Schulzweida
 
 	* stream_cgribex::cgribexGetGrid: add 360 to lastLon, if lastlon <firstLon [Bug #3189]
 
-2013-01-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-08  Uwe Schulzweida
 
 	* netCDF: check position of time dimension
 
-2013-01-15  Thomas Jahns  <jahns at dkrz.de>
+2013-01-15  Thomas Jahns
 
 	* make_fint.c: added regexec support
 
-2013-01-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2013-01-08  Uwe Schulzweida
 
 	* global netCDF attribute "source" missing (bug fix)
 
-2012-12-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-12-18  Uwe Schulzweida
 
 	* reshGetValue: added caller function name to error message
 
-2012-12-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-12-17  Uwe Schulzweida
 
 	* Version 1.5.9 released
         * using CGRIBEX library version 1.5.6
 
-2012-12-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-12-13  Uwe Schulzweida
 
 	* removed unused function streamDefineTaxis()
 	* fix warning in streamDefTimestep() for stream with constant fields only
 
-2012-12-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-12-11  Uwe Schulzweida
 
 	* added cdfGridCompress() to compress coordinates
 	* added vlistDefVarChunkType() and vlistInqVarChunkType()
 
-2012-12-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-12-03  Uwe Schulzweida
 
 	* vlistCopyFlag: added support for level bounds
 
-2012-11-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-26  Uwe Schulzweida
 
 	* netCDF: added support for time axis name and long_name
 
-2012-11-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-17  Uwe Schulzweida
 
 	* stream_cdf::define_all_vars: added txt attributes to vlistDefAttTxt() without trailing 0 [Bug #3004]
 
-2012-11-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-16  Uwe Schulzweida
 
 	* file.c: added support for unbuffered write
 
-2012-11-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-15  Uwe Schulzweida
 
 	* cdfReadVarSliceDP: store DATATYPE_FLT32 in a float array and	convert it to double (speedup 2x)
 	* cdfInqTimestep: added check for timevalue = NC_FILL_DOUBLE
 
-2012-11-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-14  Uwe Schulzweida
 
 	* app/cdi: added optional compression level -z zip[_1-9]
 
-2012-11-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-09  Uwe Schulzweida
 
 	* file.c::file_initialize: added support for env GRIB_API_IO_BUFFER_SIZE [request: Florian Prill]
 
-2012-11-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-07  Uwe Schulzweida
 
 	* gridGenXvals/gridGenYvals: removed changes from 1.5.8 (bug fix)
 	* cgribexGetGrid: bug fix for xinc/yinc recomputation
 
-2012-11-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-11-05  Uwe Schulzweida
 
 	* grib2: correct endStep if timeunits is not equal stepUnits (bug fix)
 	* cgribexGetGrid: bug fix for yinc for odd ysize
 
-2012-10-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-30  Uwe Schulzweida
 
 	* Version 1.5.8 released
 	* using CGRIBEX library version 1.5.5
 
-2012-10-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-29  Uwe Schulzweida
 
 	* stream_cgribex.c: do not check fraction of xinc/yinc" stream_cgribex.c
 	* gridGenXvals/gridGenYvals: recheck xinc/yinc if (first+(size-1)*inc) > last
 
-2012-10-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-26  Uwe Schulzweida
 
 	* stream_gribapi.c::gribapiScanTimestep: changed GRIBAPI_MISSVAL to cdiDefaultMissval
 
-2012-10-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-18  Uwe Schulzweida
 
 	* vlistCopyFlag: copy ensdata (bug fix) [report: Jaison Ambadan]
 
-2012-10-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-16  Uwe Schulzweida
 
 	* grib2: changed packingType from grid_jpeg to grid_simple if nmiss > 0 (bug fix)
 
-2012-10-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-18  Uwe Schulzweida
 
 	* grib2: added stepType support for absolute time axis
 
-2012-10-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-10-15  Uwe Schulzweida
 
 	* pio.h remove line 'typedef int MPI_Comm;' [Bug #2882]
 
-2012-09-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-21  Uwe Schulzweida
 
 	* vlistInqZaxis: use zaxisGetIndexList() to get global zaxisIDs (bug fix)
 
-2012-09-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-20  Uwe Schulzweida
 
 	* listSizeExtend: init ops, val and status
 
-2012-09-20  Thomas Jahns <jahns at dkrz.de>
+2012-09-20  Thomas Jahns
 
 	* listInitialize: set mutex type to PTHREAD_MUTEX_RECURSIVE
 
-2012-09-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-11  Uwe Schulzweida
 
 	* cdfInqContents: make ncid local to varid
 	* cdfInqContents: group reading of global attribute to read_global_attributtes()
 	* cdfInqContents: set ntsteps to 0 if no data variable found
 	* netCDF: set 1D arrays to coordinate variables if axis attribute is available
 
-2012-09-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-10  Uwe Schulzweida
 
 	* unreduced: compute nlon and nvalues from rowlon[] (bug fix)
 
-2012-09-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-09-05  Uwe Schulzweida
 
 	* cgribexEncode: initialize the first 256 entries of isec1 to zero
 
-2012-08-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-08-30  Uwe Schulzweida
 
 	* app/cdi: changed output format of option -s (sinfo)
 
-2012-08-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-08-27  Uwe Schulzweida
 
 	* Version 1.5.7 released
 	* model.c::modelInq*: check instID != UNDEFID (buf fix)
@@ -382,553 +464,553 @@
 	* using CGRIBEX library version 1.5.4
 	* using EXSE library version 1.3.1
 
-2012-07-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-23  Uwe Schulzweida
 
 	* Version 1.5.6 released
 	* using CGRIBEX library version 1.5.3
 
-2012-07-17  Modali Kameswarrao  <modali.kameswarrao at zmaw.de>
+2012-07-17  Modali Kameswarrao
 
 	* added vlistDefVarEnsemble() for GRIB1 and netCDF
 
-2012-07-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-13  Uwe Schulzweida
 
 	* added call to cdiInitialize() in all streamOpen functions (bug fix)
 	* added support for environment variable NC_CHUNKSIZEHINT [Feature #2142]
 
-2012-07-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-04  Uwe Schulzweida
 
 	* grib scan timestep: changed Error() to Warning() for inconsistent timesteps
 
-2012-07-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-07-04  Uwe Schulzweida
 
 	* stream_cdf::define_all_grids: modify check for same x and y varids
 	* cdfInqContents: set all undefined 1D variables to data variables [request: Florian Prill]
 
-2012-06-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-20  Uwe Schulzweida
 
 	* cdf_write_var_data: bug fix for unscaled uint8, int8, int16, int32 (bug introduced in 1.5.5)
 
-2012-06-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-18  Uwe Schulzweida
 
 	* grib_api: use key significanceOfReferenceTime only for GRIB2
 
-2012-06-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-06  Uwe Schulzweida
 
 	* added support for grib_api key stepType  [request: D�rte Liermann]
 	* changed TIME_CONSTANT and TIME_VARIABLE to TSTEP_CONSTANT and TSTEP_XXX
 	* renamed vlistInqVarTime() vlistInqVarTsteptype()
 
-2012-06-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-06-01  Uwe Schulzweida
 
 	* stream_gribapi: added support for level type HYBRID_HALF	[request: D�rte Liermann]
 
-2012-05-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-18  Uwe Schulzweida
 
 	* stream_cdf::cdfDefUnstructured: fixed memory bug [ICON - Bug #2398]
 
-2012-05-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-15  Uwe Schulzweida
 
 	* Version 1.5.5 released
 	* using CGRIBEX library version 1.5.2
 
-2012-05-02 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-02 Uwe Schulzweida
 
 	* cdi.h: added vlistDefVarTime() [request: Florian Prill]
 
-2012-05-02 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-05-02 Uwe Schulzweida
 
 	* stream_gribapi: bug fix for validation date and time
 
-2012-04-27 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-04-27 Uwe Schulzweida
 
 	* stream_cdf::define_all_grids: changed scale_add() parameter from x to y (bug fix)
 
-2012-04-26 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-04-26 Uwe Schulzweida
 
 	* added support for ZAXIS_DEPTH_BELOW_LAND units "mm",  "cm", "dm" and "m"
 
-2012-03-24 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-03-24 Uwe Schulzweida
 
 	* added single precision support: streamWriteVarF, streamWriteVarSliceF
 
-2012-02-15 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-02-15 Uwe Schulzweida
 
 	* stream_cdf::cdfDefDatatype: bug fix for DATATYPE_UINT8
 
-2012-02-02 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-02-02 Uwe Schulzweida
 
 	* stream_cdf::cdfDefCurvilinear: bug fix for CLM s,u,v grids [report: Hans-J�rgen Panitz]
 
-2012-01-30 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-30 Uwe Schulzweida
 
 	* Version 1.5.4 released
 
-2011-12-27 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-12-27 Uwe Schulzweida
 
 	* added support for GRIB2 packing type grid_ieee
 
-2011-12-19 Luis Kornblueh  <Luis.Kornblueh at zmaw.de>
+2011-12-19 Luis Kornblueh
 
 	* added suppport for GRIB2 level type 150
 
-2011-12-13 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-12-13 Uwe Schulzweida
 
 	* verify_coordinate_vars: bug fix in check for units = "1" [report: Katharina Six]
 
-2011-11-11 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-11-11 Uwe Schulzweida
 
 	* added support for netCDF attributes scale_factor and add_offset for lon/lat coordinates
 
-2012-01-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2012-01-06  Uwe Schulzweida
 
 	* added support for GRIB gaussian grid parameter NumPar on non global grids [Bug #1711]
 	* added interface functions gridDefNP/gridInqNP (number of parallels between a pole and the equator)
 
-2011-11-04 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-11-04 Uwe Schulzweida
 
 	* added support for GRIB1_LTYPE_SIGMA_LAYER
 
-2011-11-01 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-11-01 Uwe Schulzweida
 
 	* added support for netcdf attribute valid_min/valid_max [request: Etienne Tourigny]
 
-2011-10-27 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-27 Uwe Schulzweida
 
 	* cdilib.c::defineAttributes: bug fix atttxt [report: Florian Prill]
 
-2011-10-25 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-25 Uwe Schulzweida
 
 	* added support for netcdf attribute valid_range [request: Etienne Tourigny]
 
-2011-10-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-17  Uwe Schulzweida
 
 	* Version 1.5.3 released
 	* using CGRIBEX library version 1.5.1
 
-2011-10-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-11  Uwe Schulzweida
 
        * zaxisCompare: set epsilon from 0 to 1e-9 [request: Felicia Brisc]
 
-2011-10-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-06  Uwe Schulzweida
 
 	* added level type ZAXIS_TOA, ZAXIS_SEA_BOTTOM, ZAXIS_ATMOSPHERE [request: D�rte Liermann]
 
-2011-10-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-05  Uwe Schulzweida
 
 	* stream_cdf::cdfInqContents: check units of hybrid levels
 	* varAddRecord: used max number of bit_per_value for 3D GRIB data
 	* gribapiDefGrid: added parameter jScansPositively [report: Juan Jose Tasso]
 
-2011-10-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-10-02  Uwe Schulzweida
 
 	* deflate compression with netCDF4 doesn't work (bug fix) [report: Geert Jan van Oldenborgh]
 
-2011-09-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-09-21  Uwe Schulzweida
 
 	* correct netCDF dimension order of unstructured grids (bug fix) [report: Ralf Mueller]
 
-2011-08-22 Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-22 Uwe Schulzweida
 
 	* Version 1.5.2 released
 
-2011-08-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-15  Uwe Schulzweida
 
 	* streamFilesuffix: added suffix for filetype NC4C (bug fix)
 
-2011-08-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-08-06  Uwe Schulzweida
 
 	* scanVarAttributes: check size of axis attribute (bug fix) [report: David Huard]
 
-2011-07-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-29  Uwe Schulzweida
 
 	* Added flexible XYZ dimension ordering for netCDF [request: Andy Aschwanden]
 
-2011-07-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-28  Uwe Schulzweida
 
 	* added interface function vlistDefVarXYZ to set the dimension order
 
-2011-07-23  Pier Giuseppe Fogli  <piergiuseppe.fogli at cmcc.it>
+2011-07-23  Pier Giuseppe Fogli
 
 	* added interface function zaxisInqVct to read the VCT
 
-2011-07-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-23  Uwe Schulzweida
 
 	* netcdf input: correct wrong formatted time units [request: Harald Anlauf]
 
-2011-07-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-14  Uwe Schulzweida
 
 	* netcdf: added support for GRID_FOURIER (fourier coefficients)
 
-2011-07-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-12  Uwe Schulzweida
 
 	* Version 1.5.1 released
 
-2011-07-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-07-07  Uwe Schulzweida
 
 	* vlistCopy: allocate and copy varsAllocated elements (bug fix) [report: Ralf Mueller]
 
-2011-06-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-06-24  Uwe Schulzweida
 
 	* vtime2timeval: do not round result (bug fix for TUNIT_YEAR) [report: Andy Aschwanden]
 
-2011-06-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-06-01  Uwe Schulzweida
 
 	* CDI: changed compression type from Ztype to CompType
 	* CDI: changed compression level from Zlevel to CompLevel [report: Thomas Jahns]
 
-2011-05-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-05-13  Uwe Schulzweida
 
 	* gridGenYvals: changed delta eps to 0.002 for gaussian grids [report: John Lillibridge] 
 	* ruby/python interface: changed GRID_CELL to GRID_UNSTRUCTURED [report: Tim Cera]
 
-2011-05-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-05-12  Uwe Schulzweida
 
 	* grid::compareXYvals: bug fix for generic grids [report: Felicia Brisc]
 
-2011-04-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-04-28  Uwe Schulzweida
 
 	* Added attribute standard_name to netCDF time var [request: Karin Meier-Fleischer]
 	* Added attribute standard_name to netCDF zaxes [request: Karin Meier-Fleischer]
 	* Added attribute positive to netCDF zaxes [request: Karin Meier-Fleischer]
 
-2011-04-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-04-27  Uwe Schulzweida
 
 	* Added support for FILETYPE_NC4C (netcdf4 classic)
 	* netcdf: Skiped time dependent variables if number of time steps is zero
 
-2011-03-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-15  Uwe Schulzweida
 
 	* using CGRIBEX library version 1.5.0
 	* Version 1.5.0 released
 
-2011-03-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-13  Uwe Schulzweida
 
 	* stream_cdf: added support for GRIB2 parameter identifier
 
-2011-03-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-03-08  Uwe Schulzweida
 
 	* Version 1.4.8 released
 
-2011-02-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-02-06  Uwe Schulzweida
 
 	* vlistDestroy: fix memory leak
 
-2011-01-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-25  Uwe Schulzweida
 
 	* added netCDF support for level bounds
 
-2011-01-21  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-21  Uwe Schulzweida
 
 	* added grid type GRID_REFERENCE
 	* changed grid name GRID_CELL to GRID_UNSTRUCTURED
 
-2011-01-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-19  Uwe Schulzweida
 
 	* added support to encode/decode GRIB1 with GRIB_API
 
-2011-01-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2011-01-03  Uwe Schulzweida
 
 	* using CGRIBEX library version 1.4.7
 	* Version 1.4.7 released
 
-2010-11-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-11-09  Uwe Schulzweida
 
 	* improved support for netCDF output from WRF model
 
-2010-10-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-10-28  Uwe Schulzweida
 
 	* cdfDefZaxis: changed hybrid level type from int to float
 	* taxisCopyTimestep: added mutex_lock
 	
-2010-10-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-10-26  Uwe Schulzweida
 
 	* cgribexAddRecord: correct xinc/yinc if necessary [report: Anders Ullerstig]
 	
-2010-10-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-10-12  Uwe Schulzweida
 
         * cdfDefVCT: remove var mlev and ilev (bug fix) [report: Torsten Weber]
 
-2010-10-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-10-05  Uwe Schulzweida
 
 	* cdfOpenFile: create netCDF4 files without NC_CLASSIC_MODEL
 	* cdfOpenFile: switch off checking of netCDF4 format (read)
 	
-2010-09-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-27  Uwe Schulzweida
 
         * cdfDefTime: bug fix for time units 3HOURS, 6HOURS, 12HOURS
 	
-2010-09-17  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-17  Uwe Schulzweida
 
 	* using CGRIBEX library version 1.4.6
 	* Version 1.4.6 released
 
-2010-09-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-09  Uwe Schulzweida
 
 	* GRIB1: use packing only for non constant fields [request: Luis Kornblueh]
 	* varDefZtype: bug fix [report: Stephanie Legutke]
 	
-2010-09-07  Ralf Mueller <ralf.mueller at zmaw.de>
+2010-09-07  Ralf Mueller
 
 	* use libtool 2.2.10 for compiling + linking
 	* create shared + static library with PIC support by default
 	  (positions independant code)
 	* build CDI configuration file: cdi.settings
 
-2010-09-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-09-03  Uwe Schulzweida
 
 	* check axis attribute (bug fix) [report: Cui Chen]
 	
-2010-08-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-26  Uwe Schulzweida
 
 	* vlistCopyFlag: copy zaxis meta data
 	
-2010-08-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-25  Uwe Schulzweida
 
 	* Added support for attribute type int16 and float32 [Request: Don Murray]
 	
-2010-08-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-24  Uwe Schulzweida
 	
 	* Version 1.4.5.2 released [request: Luis Kornblueh]
 
-2010-08-02  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-08-02  Uwe Schulzweida
 
 	* added grid mask support
 	
-2010-07-26  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-26  Uwe Schulzweida
 
 	* added ECHAM6 GRIB1 code table
 
-2010-07-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-23  Uwe Schulzweida
 
 	* cdfInqContents: fixed out of bounds access to attstring [report: Heiner Widmann]
 	
-2010-07-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-05  Uwe Schulzweida
 
 	* cdfInqContents: fix problem of wrong stdname for grid description [report: Michael Boettinger]
 	* Version 1.4.5.1 released
 
-2010-07-05 Edi Kirk <E.Kirk at gmx.de>
+2010-07-05 Edi Kirk
 
 	* GRIB1 decode: Correct ZeroShiftError of simple packed spherical harmonics
 
-2010-07-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-07-01  Uwe Schulzweida
 
 	* cdfInqContents: use complex packing for spectral data [report: Edi Kirk]
 
-2010-06-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-06-30  Uwe Schulzweida
 
 	* using CGRIBEX library version 1.4.5.1 (szip bug fix for 24 bit data)
 
-2010-06-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-06-16  Uwe Schulzweida
 
 	* using CGRIBEX library version 1.4.5
 	* Version 1.4.5 released
 
-2010-05-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-05-16  Uwe Schulzweida
 
 	* stream_history: added NC4 support [report: Etienne Tourigny]
 	
-2010-05-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-05-13  Uwe Schulzweida
 
 	* cdfDefXYaxis: check also dimnames (bug fix) [report: Mikhail Itkin]
 	
-2010-05-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-05-12  Uwe Schulzweida
 
 	* stream_cdf: added support for uppercase attributes [request: Patrick Brockmann]
 	
-2010-05-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-05-07  Uwe Schulzweida
 
 	* gridGenYvals: bug fix for nlat > 4096 [report: Thomas Bergmann]
 
-2010-04-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-29  Uwe Schulzweida
 
 	* Version 1.4.4 released
 
-2010-04-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-24  Uwe Schulzweida
 
 	* gaussgrid: define M_SQRT2 [report: alastair.mckinstry at ichec.ie]
 
-2010-04-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-16  Uwe Schulzweida
 
 	* MAX_STREAMS: changed fixed size of 4096 to dynamic range of 1024 - 65536
 	* MAX_VLISTS:  changed fixed size of 4096 to dynamic range of 1024 - 65536
 	* MAX_TAXES:   changed fixed size of 4096 to dynamic range of 1024 - 65536
 	
-2010-04-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-13  Uwe Schulzweida
 
 	* cgribexDefTime: bug fix for GRIB time range 10
 	
-2010-04-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-09  Uwe Schulzweida
 
 	* added support for GRIB time units 3hours and 6hours [request: Jaison-Thomas Ambadan]
 	
-2010-04-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-04-01  Uwe Schulzweida
 
 	* vlistMerge: added support to merge levels
 
-2010-03-31  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-31  Uwe Schulzweida
 
         * cgribexDefTime: bug fix for timerange=3 [report: Veronika Gayler]
 	* using CGRIBEX library version 1.4.4
 
-2010-03-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-30  Uwe Schulzweida
 
 	* vlistCat: correct temporary parameter numbers
 
-2010-03-19  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-19  Uwe Schulzweida
 
 	* added support for non integer time units MONTH
 
-2010-03-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-12  Uwe Schulzweida
 
 	* gauaw: bug fix for allocation of zfnlat for odd number of nlat
 
-2010-03-04  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-03-04  Uwe Schulzweida
 
 	* cdfDefGrid: check whether the variable or dimension name already exist
 	
-2010-02-27  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-27  Uwe Schulzweida
 
         * grid.c: replace for loops by memcpy (speed up)
 
-2010-02-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-25  Uwe Schulzweida
 
 	* implementation of gridDestroy
 	
-2010-02-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-22  Uwe Schulzweida
 
 	* Version 1.4.3 released
 
-2010-02-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-18  Uwe Schulzweida
 
 	* grib1: bug fix for description of gaussian reduced grids [report: Klaus Wyser]
 
-2010-02-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-16  Uwe Schulzweida
 
 	* gauaw: new code to calculate gaussian grid [Luis Kornblueh]
 	
-2010-02-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-15  Uwe Schulzweida
 
 	* rotated grids: correct standard name [report: Michael Boettinger]
 	* cgribexDefTime: bug fix for timerange = -1
 
-2010-02-10  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-10  Uwe Schulzweida
 
 	* added support for encoding of complex packed spectral data in GRIB1
 
-2010-02-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-09  Uwe Schulzweida
 
 	* added function gridInqComplexPacking/gridDefComplexPacking
 
-2010-02-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-02-08  Uwe Schulzweida
 
 	* Version 1.4.2 released
 
-2010-01-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-25  Uwe Schulzweida
 
 	* added support for timerange 1,2,3,4,5 (GRIB1)
 
-2010-01-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-14  Uwe Schulzweida
 
 	* cdfDefVar: define add_offset and scale_factor always together
 	
-2010-01-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-13  Uwe Schulzweida
 
 	* added optional sorting of parameters
 
-2010-01-13  Oliver Fuhrer <oliver.fuhrer at meteoswiss.ch>
+2010-01-13  Oliver Fuhrer
 
 	* added support for cosmo GRIB parameter tables
 	* added missing value support for cosmo GRIB files
 
-2010-01-07  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2010-01-07  Uwe Schulzweida
 
 	* using CGRIBEX library version 1.4.2 (large record support)
 	
-2009-12-29  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-29  Uwe Schulzweida
 
 	* using EXSE library version 1.2.0 (complex numbers with EXTRA)
 
-2009-12-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-15  Uwe Schulzweida
 
 	* fileRead: check result of fread
 	* binReadF77Block: check result of fileRead
 	* Version 1.4.1 released
 
-2009-12-11  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-11  Uwe Schulzweida
 
 	* streamSync: check that vlist has variables to sync [report: Martin Schultz]
 	
-2009-12-09  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-09  Uwe Schulzweida
 
 	* cdfDefVar: define attribute _FillValue if missval was defined (speed up)
 	
-2009-12-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-12-08  Uwe Schulzweida
 
 	* allocate gribHandle for every grid/zaxis combination (speed up for writing GRIB2)
 	
-2009-11-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-30  Uwe Schulzweida
 
 	* cdfInqContents: bug fix for GRID_CELL with levels [report: Stephan Lorenz]
 
-2009-11-25  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-25  Uwe Schulzweida
 
 	* using GRIB library version 1.4.1
 	  check max limit of binary scale value (bug fix)
 
-2009-11-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-22  Uwe Schulzweida
 
 	* change code/tabnum to param
 	
-2009-11-20  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-20  Uwe Schulzweida
 
 	* added function vlistDefVarParam/vlistInqVarParam
 
-2009-11-17  Ralf Mueller  <Ralf.Mueller at zmaw.de>
+2009-11-17  Ralf Mueller
 
 	* Added ruby and python interfaces
 	  --enable-ruby  --enable-python 
 	
-2009-11-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-13  Uwe Schulzweida
 
 	* cdi.h: added '_vec' to all int and double vector arguments
 	
-2009-11-12  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-12  Uwe Schulzweida
 
 	* set units to "Pa" if changing zaxis to "pressure" (bug fix) [report: Chao Li]
 
-2009-11-12  Ralf Mueller  <Ralf.Mueller at zmaw.de>
+2009-11-12  Ralf Mueller
 
 	* Added Fortran Interface via iso_c_bindings facility of F2003
 	  --enable-iso-c-interface
 	
-2009-11-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-11-01  Uwe Schulzweida
 
 	* added support for GRIB2 JPEG compression
 
-2009-10-28  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-28  Uwe Schulzweida
 
 	* grbWriteVar: bug fix
 	* Version 1.4.0.2 released
 
-2009-10-23  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-23  Uwe Schulzweida
 
 	* cdfDefXaxis: bug fix for multi generic grids [report: Uwe Mikolajewicz]
 	* streamCopyRecord: check byteorder (bug fix) [report: Claas Teichmann]
 	
-2009-10-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-15  Uwe Schulzweida
 
 	* using GRIB library version 1.4.0.1
 	* IEG format: bug fix for lonlat grids [report: Philip Lorenz]
 	* Version 1.4.0.1 released
 
-2009-10-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-06  Uwe Schulzweida
 
 	* cdtInqContents: check attribute type
 	* cdtInqContents: set default time units to DAYS
 	
-2009-10-05  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-10-05  Uwe Schulzweida
 	
 	* using GRIB library version 1.4.0
 	* added GRIB2 support (testversion) via grib_api(1.8.0)
@@ -944,7 +1026,7 @@
 	* stream_cdf:cdfReadVarSliceDP: bug fix for swapxy
 	* Version 1.4.0 released
 
-2009-06-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-06-15  Uwe Schulzweida
 
 	* netCDF: reduced number of nc_enddef
 	* added env CDI_SORTNAME to sort netCDF names
@@ -953,7 +1035,7 @@
 	* streamSync: extent to non netCDF files
 	* Version 1.3.2 released
 	
-2009-04-16  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-04-16  Uwe Schulzweida
 
 	* using GRIB library version 1.3.0
 	* added support for NaN in DBL_IS_EQUAL
@@ -970,7 +1052,7 @@
 	* replaced strncpy/strncmp by memcpy/memcmp
 	* Version 1.3.1 released
 
-2009-01-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2009-01-15  Uwe Schulzweida
 
 	* add support for GRID type SINUSOIDAL
 	* add support for GRID type LAEA
@@ -984,7 +1066,7 @@
 	* cdf_inq_contents: check zaxis type "depth_blow_sea/land" (bug fix)
 	* Version 1.3.0 released
 
-2008-11-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-11-13  Uwe Schulzweida
 
 	* add new function: streamSync
 	* add new taxis functions: taxisXXXVdateBounds and taxisXXXVtimeBounds
@@ -997,7 +1079,7 @@
 	* netcdf: support of timeunit 'year'
 	* Version 1.2.1 released
 
-2008-08-13  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-08-13  Uwe Schulzweida
 
         * using GRIB library version 1.2.0
 	* add support for netCDF4 classic with deflate option
@@ -1011,7 +1093,7 @@
 	* DBL_IS_EQUAL: check NaN with isnan
 	* Version 1.2.0 released
 	
-2008-04-08  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-04-08  Uwe Schulzweida
 
         * using GRIB library version 1.1.1
 	* configure: --with-szlib=<directory>
@@ -1033,7 +1115,7 @@
 	* grid_check_cyclic: bug fix
 	* Version 1.1.1 released
 
-2008-01-24  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2008-01-24  Uwe Schulzweida
 
         * using GRIB library version 1.1.0
 	* using FILE library version 1.6.0
@@ -1045,7 +1127,7 @@
 	* grbDefTime: add support for century < 0
 	* Version 1.1.0 released
 	
-2007-10-22  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2007-10-22  Uwe Schulzweida
 
         * using GRIB library version 1.0.6
 	* stream_grb:grbDefGrid use ISEC2_ScanFlag [request: Alex Kann]
@@ -1056,7 +1138,7 @@
 	* use always decode_date and encode_date to decode/encode date
 	* Version 1.0.8 released
 
-2007-06-15  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2007-06-15  Uwe Schulzweida
 
 	* using EXSE library version 1.0.2
 	* new ECHAM5 code table [Renate Brokopf]
@@ -1068,7 +1150,7 @@
 	* cdfInqContents: check also x/yvarid to compare curvilinear grids
 	* Version 1.0.7 released
 
-2007-03-06  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2007-03-06  Uwe Schulzweida
 
         * using GRIB library version 1.0.5
 	* use GRIB ltype to define GENERIC zaxis
@@ -1080,7 +1162,7 @@
 	* LOCK/UNLOCK around _init_pointer
 	* Version 1.0.6 released
 
-2006-12-14  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-12-14  Uwe Schulzweida
 
 	* stream: mt safe version
 	* zaxis: mt safe version
@@ -1091,7 +1173,7 @@
 	* cdi_limits: define MAX_STREAMS, MAX_VLISTS, MAX_GRIDS, MAX_ZAXIS
 	* Version 1.0.5 released
 
-2006-11-30  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-11-30  Uwe Schulzweida
 
         * using GRIB library version 1.0.4
 	* cdfInqContents: use grid_mapping not for curvilinear grids
@@ -1102,7 +1184,7 @@
 	* new function: streamNvals
 	* Version 1.0.4 released
 
-2006-11-03  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-11-03  Uwe Schulzweida
 
         * using GRIB library version 1.0.3
 	* using EXSE library version 1.0.1
@@ -1110,7 +1192,7 @@
 	* gridPrint: extented
 	* Version 1.0.3 released
 
-2006-09-18  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-09-18  Uwe Schulzweida
 
 	* using GRIB library version 1.0.2
 	* grbCopyRecord: add SZIP support
@@ -1119,7 +1201,7 @@
 	* cdfWriteVar*: round integer fields with NINT [report: Etienne Tourigny]
 	* Version 1.0.2 released
 
-2006-08-01  Uwe Schulzweida  <Uwe.Schulzweida at zmaw.de>
+2006-08-01  Uwe Schulzweida
 
 	* using GRIB library version 1.0.1
 	* add test version of SZIP for GRIB data
@@ -1130,7 +1212,7 @@
 	* tableWrite: bug fix for undefined strings
 	* Version 1.0.1 released
 
-2006-06-15  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-06-15  Uwe Schulzweida
 
 	* using GRIB library version 1.0.0
 	* rename *New functions to *Create
@@ -1142,7 +1224,7 @@
         * add dummy functions gridDestroy, zaxisDestroy, taxisDestroy
 	* Version 1.0.0 released
 
-2006-05-04  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-05-04  Uwe Schulzweida
 
 	* using GRIB library version 0.6.6
 	* cdfInqContents: check attlen for attname "axis"
@@ -1154,7 +1236,7 @@
 	* add function tableInqParCode
 	* Version 0.9.7 released
 
-2006-03-08  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-03-08  Uwe Schulzweida
 
 	* using GRIB library version 0.6.5
 	* vlist_var: Add function vlistChangeVarGrid
@@ -1164,7 +1246,7 @@
 	* gridToZonal: add support for GRID_GENERIC if ny > 1
 	* Version 0.9.6 released
 	
-2006-02-01  Uwe Schulzweida  <schulzweida at dkrz.de>
+2006-02-01  Uwe Schulzweida
 
 	* using GRIB library version 0.6.4
 	* update ECHAM5 parameter table
@@ -1176,11 +1258,11 @@
 	* add support of time bounds
 	* Version 0.9.5 released
 
-2006-01-20  Luis Kornblueh  <kornklueh at dkrz.de>
+2006-01-20  Luis Kornblueh
 
 	* grid_gme.c: compute boundaries of GME grid
 
-2005-12-14  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-12-14  Uwe Schulzweida
 
 	* using GRIB library version 0.6.3
 	* using EXSE library version 0.9.3
@@ -1190,7 +1272,7 @@
 	* bug fix for GRIB files with unusable VCT
 	* Version 0.9.4 released
 
-2005-11-21  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-11-21  Uwe Schulzweida
 
 	* using GRIB library version 0.6.2
 	* using FILE library version 1.5.1
@@ -1200,12 +1282,12 @@
 	* timeval2vtime: bug fix for time unit MONTH and YEAR
 	* Version 0.9.3 released
 
-2005-10-23  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-10-23  Uwe Schulzweida
 
 	* OPeNDAP support for netCDF (nc_dap)
 	  use configure option --enable-dap
 
-2005-10-18  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-10-18  Uwe Schulzweida
 
 	* cdfInqContents: support of CLM grid
 	* grbDefTime: prevent overflow of forcast timesteps
@@ -1220,7 +1302,7 @@
 	* grbScanTimestep: Bug fix (check all records)
 	* Version 0.9.2 released
 
-2005-07-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-07-17  Uwe Schulzweida
 
 	* New function: vlistChangeVarZaxis
 	* grbDefGrid: change NINT to INT
@@ -1229,7 +1311,7 @@
 	* stream_grb: correct xinc if necessary
 	* Version 0.9.1 released
 	
-2005-05-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-05-17  Uwe Schulzweida
 
 	* griblib: version 0.6.1
 	* exselib: version 0.9.2
@@ -1240,7 +1322,7 @@
 	* codeNewEntry: bug fix for code 0
 	* Version 0.9.0 released
 
-2005-04-03  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-04-03  Uwe Schulzweida
 
 	* griblib: version 0.6.0
 	* add function zaxisDuplicate
@@ -1252,7 +1334,7 @@
 	* Program cdi: change level from int to double
 	* Version 0.8.9 released
 
-2005-02-11  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-02-11  Uwe Schulzweida
 
 	* griblib: version 0.5.7
 	* gridDuplicate: update
@@ -1260,20 +1342,20 @@
 	* rename zaxisInqLevelDP to zaxisInqLevel
 	* Version 0.8.8 released
 
-2005-01-03  Uwe Schulzweida  <schulzweida at dkrz.de>
+2005-01-03  Uwe Schulzweida
 
 	* implementation of 360, 365 and 366 days calendar
 	* gridGenXvals: bug fix (xfirst == xlast)
 	* Version 0.8.7 released
 
-2004-12-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-12-17  Uwe Schulzweida
 
 	* define ECHAM5.3 table
 	* add missing value support for 4 Byte SRV and EXT data
 	* gridGenXvals: bug fix (set xinc > 0)
 	* Version 0.8.6 released
 
-2004-11-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-11-17  Uwe Schulzweida
 
 	* cdfInqContents: check gaussian grid
 	* gridToCurvilinear: add bounds
@@ -1285,14 +1367,14 @@
 	* vlist: initialize ntsteps
 	* Version 0.8.5 released
 	
-2004-10-12  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-10-12  Uwe Schulzweida
 
         * netCDF2 support
 	* cdfDefVars: Bug fix (vlistInqNgrids)
 	* stream_grb: check also leveltype to find different variables
 	* Version 0.8.4 released
 	
-2004-09-08  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-09-08  Uwe Schulzweida
 
 	* griblib: version 0.5.6
 	* grid: use bounds for gaussian and lonlat grids
@@ -1303,7 +1385,7 @@
 	                 to prevent rounding errors
         * Version 0.8.3 released
 
-2004-07-04  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-07-04  Uwe Schulzweida
 
 	* cdiInqContents: read all global text attributes
 	* cdf_create and cdf_open: set min chunksize to 128k
@@ -1311,7 +1393,7 @@
 	* new function in vlist.c: vlistChangeZaxisIndex, vlistChangeZaxis
         * Version 0.8.2 released
 
-2004-05-21  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-05-21  Uwe Schulzweida
 
 	* griblib: version 0.5.4
 	* file.c: set min I/O buffersize to 128k
@@ -1326,7 +1408,7 @@
 	* splitBasetime: bug fix
         * Version 0.8.1 released
 
-2004-04-12  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-04-12  Uwe Schulzweida
 
 	* stream_cdf: replace cdfDefLon and cdfDefLonRot by cdfDefXaxis
 	              replace cdfDefLat and cdfDefLatRot by cdfDefYaxis
@@ -1339,7 +1421,7 @@
 	          gridDefXinc, gridDefYinc
         * Version 0.8.0 released
 	
-2004-03-14  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-03-14  Uwe Schulzweida
 
 	* new GRID type: CURVILINEAR
 	* add MPIOM1 table
@@ -1353,14 +1435,14 @@
 	* cdfInqContent: change pressure level handling
         * Version 0.7.9 released
 
-2004-01-05  Uwe Schulzweida  <schulzweida at dkrz.de>
+2004-01-05  Uwe Schulzweida
 
 	* New function: cdiOpenAppend
 	* zaxisDefLevels: move allocation of levels to zaxisNew
 	* cdfDefZaxis: bug fix zaxisID -> zaxisindex
         * Version 0.7.8 released
 
-2003-12-8  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-12-8  Uwe Schulzweida
 
 	* griblib: version 0.5.3
 	* dtypes.h:   redefinition of INT64
@@ -1368,14 +1450,14 @@
 	              warning if bounds var not found
         * Version 0.7.7 released
 
-2003-11-5  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-11-5  Uwe Schulzweida
 
 	* dmemory: create memory list only if MEMORY_DEBUG is set
 	* memTotal: get total memory size from mallinfo
 	* tstepsNewEntry: change to add tsteps only (speedup)
         * Version 0.7.6 released
 
-2003-10-31  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-10-31  Uwe Schulzweida
 	
 	* redesign of the internal record stucture
 	* implementation of TUNIT_MONTH and TUNIT_YEAR
@@ -1383,7 +1465,7 @@
 	* grbDefLevel: check that vct size is less than 256
         * Version 0.7.5 released
 
-2003-10-12  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-10-12  Uwe Schulzweida
 
 	* environment variable CD_MISSVAL
 	* missing values for SERVICE and EXTRA
@@ -1391,7 +1473,7 @@
 	* tableRead: update
         * Version 0.7.4 released
 
-2003-10-5  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-10-5  Uwe Schulzweida
 
 	* streamInqVlist: return vlist
 	* replace streamVar to vlist
@@ -1399,18 +1481,18 @@
 	* change *funcID to *func
         * Version 0.7.3 released
 	
-2003-10-3  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-10-3  Uwe Schulzweida
 
 	* change configuration for netCDF and HDF5 library to --with
 	* HDF5 test interface
         * Version 0.7.2 released
 	
-2003-09-22  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-09-22  Uwe Schulzweida
 
 	* missing values for cdiReadVar*, cdiWriteVar*
         * Version 0.7.1 released
 	
-2003-09-10  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-09-10  Uwe Schulzweida
 
 	* rename library to CDI (Climate Date Interface)
 	* fortran interface
@@ -1420,35 +1502,35 @@
 	* cdfWriteVar*: bug fix for non regular grid
         * Version 0.7.0 released
 	
-2003-07-28  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-07-28  Uwe Schulzweida
 
         * handle missing values
         * Version 0.6.0 released
 	
-2003-06-25  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-25  Uwe Schulzweida
 
 	* implementation of trajectory grid
         * Version 0.5.11 released
 	
-2003-06-23  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-23  Uwe Schulzweida
 
 	* gdi_cdf: update for mozart initial files
         * Version 0.5.10 released
 
-2003-06-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-17  Uwe Schulzweida
 
 	* gdi_cdf: skip bound vars
 
-2003-06-17  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-17  Uwe Schulzweida
 
         * Version 0.5.9 released
 
-2003-06-11  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-06-11  Uwe Schulzweida
 
         * reimplementation of time axis
 	* timesteps accesssable with timeID
 
-2003-05-20  Uwe Schulzweida  <schulzweida at dkrz.de>
+2003-05-20  Uwe Schulzweida
 
 	* configuration with automake
         * Version 0.5.8 released
diff --git a/libcdi/Makefile.in b/libcdi/Makefile.in
index a90b72d..3b06290 100644
--- a/libcdi/Makefile.in
+++ b/libcdi/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,14 +78,20 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/cdi.settings.in \
-	$(top_srcdir)/configure $(top_srcdir)/src/pkgconfig/cdi.pc.in \
-	$(top_srcdir)/src/pkgconfig/cdipio.pc.in \
-	$(top_srcdir)/util/serialrun.in AUTHORS COPYING ChangeLog \
-	INSTALL NEWS config/compile config/config.guess \
-	config/config.sub config/depcomp config/install-sh \
-	config/ltmain.sh config/missing config/mkinstalldirs
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(top_srcdir)/config/mkinstalldirs \
+	$(top_srcdir)/util/serialrun.in $(srcdir)/cdi.settings.in \
+	$(top_srcdir)/src/pkgconfig/cdi.pc.in \
+	$(top_srcdir)/src/pkgconfig/cdipio.pc.in AUTHORS COPYING \
+	ChangeLog INSTALL NEWS README config/compile \
+	config/config.guess config/config.sub config/depcomp \
+	config/install-sh config/missing config/mkinstalldirs \
+	config/ltmain.sh $(top_srcdir)/config/compile \
+	$(top_srcdir)/config/config.guess \
+	$(top_srcdir)/config/config.sub \
+	$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
+	$(top_srcdir)/config/missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -81,15 +114,28 @@ CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = util/serialrun cdi.settings src/pkgconfig/cdi.pc \
 	src/pkgconfig/cdipio.pc
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 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_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-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 \
+	tags-recursive uninstall-recursive
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -97,11 +143,32 @@ am__can_run_installinfo = \
   esac
 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
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -112,6 +179,7 @@ am__remove_distdir = \
       && rm -rf "$(distdir)" \
       || { sleep 5 && rm -rf "$(distdir)"; }; \
   else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -139,12 +207,14 @@ am__relativize = \
   reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -354,15 +424,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
 		&& exit 0; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu Makefile
+	  $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -401,22 +471,25 @@ distclean-libtool:
 	-rm -f libtool config.lt
 
 # 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; \
+# 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.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
 	  echo "Making $$target in $$subdir"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \
@@ -431,57 +504,12 @@ $(RECURSIVE_TARGETS):
 	  $(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: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-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)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -497,12 +525,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -514,15 +537,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$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; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -531,9 +550,31 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
@@ -601,40 +642,42 @@ distdir: $(DISTFILES)
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-lzip: distdir
 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
-	$(am__remove_distdir)
-
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-shar: distdir
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-zip: distdir
 	-rm -f $(distdir).zip
 	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_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
@@ -645,8 +688,6 @@ distcheck: dist
 	  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.lz*) \
 	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
@@ -658,9 +699,9 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -692,7 +733,7 @@ distcheck: dist
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
 	  && cd "$$am__cwd" \
 	  || exit 1
-	$(am__remove_distdir)
+	$(am__post_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'
@@ -828,14 +869,13 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
 
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am am--refresh check check-am clean clean-generic \
-	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-	dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
-	dist-zip distcheck distclean distclean-generic \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--refresh check check-am clean clean-cscope clean-generic \
+	clean-libtool cscope cscopelist-am ctags ctags-am dist \
+	dist-all dist-bzip2 dist-gzip dist-lzip 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-data install-data-am install-dvi \
@@ -845,7 +885,7 @@ uninstall-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
+	ps ps-am tags tags-am uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libcdi/NEWS b/libcdi/NEWS
index 9ca34ac..9bfc827 100644
--- a/libcdi/NEWS
+++ b/libcdi/NEWS
@@ -1,6 +1,13 @@
 CDI NEWS
 --------
 
+Version 1.6.4 (26 June 2014):
+
+   New features:
+     * Added support for SPECS forecast time axis
+   Fixed bugs:
+     * netCDF4 classic: existing files are converted to netCDF4 - classic flag is lost
+
 Version 1.6.3 (14 February 2014):
 
    New features:
diff --git a/libcdi/aclocal.m4 b/libcdi/aclocal.m4
index 6d55539..39e5639 100644
--- a/libcdi/aclocal.m4
+++ b/libcdi/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -12,33 +11,31 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
 [m4_warning([this file was generated for autoconf 2.68.
 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'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2002-2013 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_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'
+[am__api_version='1.14'
 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.5], [],
+m4_if([$1], [1.14], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -54,24 +51,22 @@ m4_define([_AM_AUTOCONF_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.5])dnl
+[AM_AUTOMAKE_VERSION([1.14])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, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 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
-
 # 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/../..'.
+# $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
@@ -90,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 #
 # 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
+# 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,
@@ -116,22 +111,19 @@ 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.
+# Copyright (C) 1997-2013 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_PREREQ([2.52])dnl
+ m4_if([$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
@@ -150,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 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 12
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# 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
@@ -169,7 +159,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 # 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
@@ -182,12 +172,13 @@ 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=])
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" 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],
@@ -195,8 +186,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # 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'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -236,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > 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
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > 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"
+    # 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
+    # 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
@@ -254,8 +245,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # 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
@@ -263,7 +254,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # 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}
@@ -311,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# 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
@@ -321,9 +312,13 @@ 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])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
@@ -338,20 +333,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 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
+  # Older Autoconf 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
@@ -364,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # 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
+    # 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.
@@ -376,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    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
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -408,7 +399,7 @@ AC_DEFUN([_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
+# 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],
@@ -418,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # 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.
+# Copyright (C) 1996-2013 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.
 
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -442,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # 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
+[AC_PREREQ([2.65])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
@@ -471,31 +465,40 @@ 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_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+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_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
   [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
+[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)
+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
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
@@ -506,34 +509,78 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 			     [_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
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_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
+		  [_AM_DEPENDENCIES([CXX])],
+		  [m4_define([AC_PROG_CXX],
+			     m4_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_DEPENDENCIES([OBJC])],
+		  [m4_define([AC_PROG_OBJC],
+			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+		  [_AM_DEPENDENCIES([OBJCXX])],
+		  [m4_define([AC_PROG_OBJCXX],
+			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])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_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro 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
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi])
+
+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.
@@ -555,15 +602,12 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2013 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_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -577,16 +621,14 @@ if test x"${install_sh}" != xset; then
     install_sh="\${SHELL} $am_aux_dir/install-sh"
   esac
 fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 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],
@@ -603,20 +645,17 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 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_MAINTAINER_MODE([DEFAULT-MODE])
 # ----------------------------------
 # Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well.  Anyway, the user
 # can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
 [m4_case(m4_default([$1], [disable]),
@@ -627,10 +666,11 @@ AC_DEFUN([AM_MAINTAINER_MODE],
 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+      am_maintainer_other[ make rules and dependencies not useful
+      (and sometimes confusing) to the casual installer])],
+    [USE_MAINTAINER_MODE=$enableval],
+    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
@@ -638,18 +678,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 ]
 )
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 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.
@@ -667,7 +703,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# 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
@@ -692,52 +728,14 @@ 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.
+# Copyright (C) 1997-2013 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],
@@ -745,11 +743,10 @@ AC_DEFUN([AM_MISSING_PROG],
 $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.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, 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
@@ -762,54 +759,22 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  AC_MSG_WARN(['missing' script is too old or missing])
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 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_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, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2013 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_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
@@ -819,7 +784,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 # --------------------
 # 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)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 
 # _AM_SET_OPTIONS(OPTIONS)
 # ------------------------
@@ -833,24 +798,82 @@ AC_DEFUN([_AM_SET_OPTIONS],
 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) 1999-2013 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.
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+  [whether $CC understands -c and -o together],
+  [am_cv_prog_cc_c_o],
+  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i])
+if test "$am_cv_prog_cc_c_o" != 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_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2013 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_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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_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='
@@ -861,32 +884,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# 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
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     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
+     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
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$[2]" = conftest.file
    )
 then
@@ -896,46 +927,118 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
 
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 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], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+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
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 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
+# 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
+# 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
+# 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'.
+# 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, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 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 3
-
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -949,18 +1052,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 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'.
+# 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
@@ -970,76 +1071,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # 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.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 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.
+
+# We'll 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
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  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
 
-  # 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])
+    # 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])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   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_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/libcdi/app/Makefile.in b/libcdi/app/Makefile.in
index 4253fed..7073720 100644
--- a/libcdi/app/Makefile.in
+++ b/libcdi/app/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -16,23 +15,51 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -56,7 +83,9 @@ noinst_PROGRAMS = $(am__EXEEXT_2) createtable$(EXEEXT)
 @ENABLE_CDI_LIB_TRUE at am__append_1 = cdi
 @ENABLE_CDI_LIB_FALSE at am__append_2 = cdi
 subdir = app
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs \
+	$(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -83,28 +112,53 @@ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
 am_cdi_OBJECTS = cdi.$(OBJEXT)
 cdi_OBJECTS = $(am_cdi_OBJECTS)
 cdi_DEPENDENCIES = $(top_builddir)/src/libcdi.la
-cdi_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cdi_LDFLAGS) \
-	$(LDFLAGS) -o $@
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+cdi_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(cdi_LDFLAGS) $(LDFLAGS) -o $@
 am_createtable_OBJECTS = createtable.$(OBJEXT)
 createtable_OBJECTS = $(am_createtable_OBJECTS)
 createtable_DEPENDENCIES = $(top_builddir)/src/libcdi.la
-createtable_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+createtable_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(createtable_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(cdi_SOURCES) $(createtable_SOURCES)
 DIST_SOURCES = $(cdi_SOURCES) $(createtable_SOURCES)
 am__can_run_installinfo = \
@@ -112,11 +166,29 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -325,9 +397,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu app/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign app/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu app/Makefile
+	  $(AUTOMAKE) --foreign app/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -355,10 +427,12 @@ install-binPROGRAMS: $(bin_PROGRAMS)
 	fi; \
 	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; \
+	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|.*|.|' \
+	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 } \
@@ -379,7 +453,8 @@ uninstall-binPROGRAMS:
 	@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)/' `; \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
 	test -n "$$list" || exit 0; \
 	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
 	cd "$(DESTDIR)$(bindir)" && rm -f $$files
@@ -401,12 +476,14 @@ clean-noinstPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
+
 cdi$(EXEEXT): $(cdi_OBJECTS) $(cdi_DEPENDENCIES) $(EXTRA_cdi_DEPENDENCIES) 
 	@rm -f cdi$(EXEEXT)
-	$(cdi_LINK) $(cdi_OBJECTS) $(cdi_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(cdi_LINK) $(cdi_OBJECTS) $(cdi_LDADD) $(LIBS)
+
 createtable$(EXEEXT): $(createtable_OBJECTS) $(createtable_DEPENDENCIES) $(EXTRA_createtable_DEPENDENCIES) 
 	@rm -f createtable$(EXEEXT)
-	$(createtable_LINK) $(createtable_OBJECTS) $(createtable_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(createtable_LINK) $(createtable_OBJECTS) $(createtable_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -418,25 +495,25 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/createtable.Po at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -444,26 +521,15 @@ mostlyclean-libtool:
 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)
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -475,15 +541,11 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$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; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -492,6 +554,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -637,19 +714,20 @@ uninstall-am: uninstall-binPROGRAMS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool clean-noinstPROGRAMS 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 \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libtool \
+	clean-noinstPROGRAMS cscopelist-am ctags ctags-am 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
+	tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libcdi/app/cdi.c b/libcdi/app/cdi.c
index ded3b95..d6561e6 100644
--- a/libcdi/app/cdi.c
+++ b/libcdi/app/cdi.c
@@ -285,7 +285,7 @@ const char * tunit2str(int tunits)
 }
 
 
-const char * calendar2str(int calendar)
+const char* calendar2str(int calendar)
 {
   if      ( calendar == CALENDAR_STANDARD )  return ("standard");
   else if ( calendar == CALENDAR_PROLEPTIC ) return ("proleptic_gregorian");
@@ -296,30 +296,41 @@ const char * calendar2str(int calendar)
 }
 
 static
+void limit_string_length(char* string)
+{
+  size_t len = strlen(string);
+
+  if ( len > 10 )
+    {
+      for ( size_t i = 3; i < len; ++i )
+	if ( string[i] == ' ' )
+	  {
+	    string[i] = 0;
+	    break;
+	  }
+    }
+}
+
+static
 void printShortinfo(int streamID, int vlistID, int vardis)
 {
   int varID;
   int gridsize = 0;
   int gridID, zaxisID, param;
-  int zaxistype, ltype;
   int vdate, vtime;
-  int nrecs, nvars, nzaxis, ntsteps;
-  int levelID, levelsize;
-  int tsID, ntimeout;
+  int nvars, ntsteps;
+  int levelsize;
   int tsteptype, taxisID;
-  int nbyte, nbyte0;
-  int index;
+  char tmpname[CDI_MAX_NAME];
   char varname[CDI_MAX_NAME];
-  char longname[CDI_MAX_NAME];
-  char units[CDI_MAX_NAME];
-  double level;
   char *modelptr, *instptr;
   int datatype;
   int year, month, day, hour, minute, second;
   char pstr[4];
   char paramstr[32];
 
-      printf("   File format: ");
+      fprintf(stdout, "   File format");
+      fprintf(stdout, " : ");
       printFiletype(streamID, vlistID);
 
       if ( vardis )
@@ -341,17 +352,17 @@ void printShortinfo(int streamID, int vlistID, int vardis)
 
 	  /* institute info */
 	  instptr = institutInqNamePtr(vlistInqVarInstitut(vlistID, varID));
-	  if ( instptr )
-	    fprintf(stdout, "%-8s ", instptr);
-	  else
-	    fprintf(stdout, "unknown  ");
+	  strcpy(tmpname, "unknown");
+	  if ( instptr ) strcpy(tmpname, instptr);
+	  limit_string_length(tmpname);
+	  fprintf(stdout, "%-8s ", tmpname);
 
 	  /* source info */
 	  modelptr = modelInqNamePtr(vlistInqVarModel(vlistID, varID));
-	  if ( modelptr )
-	    fprintf(stdout, "%-8s ", modelptr);
-	  else
-	    fprintf(stdout, "unknown  ");
+	  strcpy(tmpname, "unknown");
+	  if ( modelptr ) strcpy(tmpname, modelptr);
+	  limit_string_length(tmpname);
+	  fprintf(stdout, "%-8s ", tmpname);
 
 	  /* tsteptype */
 	  tsteptype = vlistInqVarTsteptype(vlistID, varID);
@@ -412,83 +423,15 @@ void printShortinfo(int streamID, int vlistID, int vardis)
 	  fprintf(stdout, "\n");
 	}
 
-      fprintf(stdout, "   Grid coordinates :\n");
+      fprintf(stdout, "   Grid coordinates");
+      fprintf(stdout, " :\n");
+
       printGridInfo(vlistID);
 
-      nzaxis = vlistNzaxis(vlistID);
-      fprintf(stdout, "   Vertical coordinates :\n");
-      for ( index = 0; index < nzaxis; index++)
-	{
-	  zaxisID   = vlistZaxis(vlistID, index);
-	  zaxistype = zaxisInqType(zaxisID);
-	  ltype     = zaxisInqLtype(zaxisID);
-	  levelsize = zaxisInqSize(zaxisID);
-	  /* zaxisInqLongname(zaxisID, longname); */
-	  zaxisName(zaxistype, longname);
-	  longname[18] = 0;
-	  zaxisInqUnits(zaxisID, units);
-	  units[12] = 0;
-	  if ( zaxistype == ZAXIS_GENERIC && ltype != 0 )
-	    nbyte0    = fprintf(stdout, "  %4d : %-11s  (ltype=%3d) : ", vlistZaxisIndex(vlistID, zaxisID)+1, longname, ltype);
-	  else
-	    nbyte0    = fprintf(stdout, "  %4d : %-18s %5s : ", vlistZaxisIndex(vlistID, zaxisID)+1, longname, units);
-	  nbyte = nbyte0;
-	  for ( levelID = 0; levelID < levelsize; levelID++ )
-	    {
-	      if ( nbyte > MAXCHARS )
-		{
-		  fprintf(stdout, "\n");
-		  fprintf(stdout, "%*s", nbyte0, "");
-		  nbyte = nbyte0;
-		}
-	      level = zaxisInqLevel(zaxisID, levelID);
-	      nbyte += fprintf(stdout, "%.9g ", level);
-	    }
-	  fprintf(stdout, "\n");
-	  if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
-	    {
-	      double level1, level2;
-	      nbyte = nbyte0;
-	      fprintf(stdout, "%33s : ", "bounds");
-	      for ( levelID = 0; levelID < levelsize; levelID++ )
-		{
-		  if ( nbyte > MAXCHARS )
-		    {
-		      fprintf(stdout, "\n");
-		      fprintf(stdout, "%*s", nbyte0, "");
-		      nbyte = nbyte0;
-		    }
-		  level1 = zaxisInqLbound(zaxisID, levelID);
-		  level2 = zaxisInqUbound(zaxisID, levelID);
-		  nbyte += fprintf(stdout, "%.9g-%.9g ", level1, level2);
-		}
-	      fprintf(stdout, "\n");
-	    }
+      fprintf(stdout, "   Vertical coordinates");
+      fprintf(stdout, " :\n");
 
-          if ( zaxistype == ZAXIS_REFERENCE )
-            {
-              int number   = zaxisInqNumber(zaxisID);
-
-              if ( number > 0 )
-                {
-                  fprintf(stdout, "%33s : ", "zaxis");
-                  fprintf(stdout, "number = %d\n", number);
-                }
-
-              char uuidOfVGrid[17];
-              zaxisInqUUID(zaxisID, uuidOfVGrid);
-              if ( uuidOfVGrid[0] != 0 )
-                {
-                  char uuidOfVGridStr[37];
-                  uuid2str(uuidOfVGrid, uuidOfVGridStr);
-                  if ( uuidOfVGridStr[0] != 0  && strlen(uuidOfVGridStr) == 36 )
-                    {
-                      fprintf(stdout, "%33s : ", "uuid");
-                      fprintf(stdout, "%s\n", uuidOfVGridStr);
-                    }
-                }
-            }
-	}
+      printZaxisInfo(vlistID);
 
       taxisID = vlistInqTaxis(vlistID);
       ntsteps = vlistNtsteps(vlistID);
@@ -530,27 +473,8 @@ void printShortinfo(int streamID, int vlistID, int vardis)
 
 	  fprintf(stdout, "  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss\n");
 
-	  ntimeout = 0;
-	  tsID = 0;
-	  while ( (nrecs = streamInqTimestep(streamID, tsID)) )
-	    {
-	      if ( ntimeout == 4 )
-		{
-		  ntimeout = 0;
-		  fprintf(stdout, "\n");
-		}
-
-	      vdate = taxisInqVdate(taxisID);
-	      vtime = taxisInqVtime(taxisID);
+	  printTimesteps(streamID, taxisID, 0);
 
-	      cdiDecodeDate(vdate, &year, &month, &day);
-	      cdiDecodeTime(vtime, &hour, &minute, &second);
-
-	      fprintf(stdout, " %5.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d",
-		      year, month, day, hour, minute, second);
-	      ntimeout++;
-	      tsID++;
-	    }
 	  fprintf(stdout, "\n");
 	}
 }
diff --git a/libcdi/app/printinfo.h b/libcdi/app/printinfo.h
index 2ad9706..991531c 100644
--- a/libcdi/app/printinfo.h
+++ b/libcdi/app/printinfo.h
@@ -133,8 +133,7 @@ static
 void printGridInfo(int vlistID)
 {
   int ngrids, index;
-  int gridID, gridtype, trunc, gridsize, xsize, ysize;
-  int nbyte0;
+  int gridID, gridtype, trunc, gridsize, xsize, ysize, xysize;
   char xname[CDI_MAX_NAME], yname[CDI_MAX_NAME], xunits[CDI_MAX_NAME], yunits[CDI_MAX_NAME];
   char uuidOfHGrid[17];
 
@@ -147,12 +146,13 @@ void printGridInfo(int vlistID)
       gridsize = gridInqSize(gridID);
       xsize    = gridInqXsize(gridID);
       ysize    = gridInqYsize(gridID);
+      xysize   = xsize*ysize;
       gridInqXname(gridID, xname);
       gridInqYname(gridID, yname);
       gridInqXunits(gridID, xunits);
       gridInqYunits(gridID, yunits);
 
-      nbyte0   = fprintf(stdout, "  %4d : %-12s > ", index+1, gridNamePtr(gridtype));
+      fprintf(stdout, "  %4d : %-24s", index+1, gridNamePtr(gridtype));
 
       if ( gridtype == GRID_LONLAT   ||
 	   gridtype == GRID_LCC2 ||
@@ -171,13 +171,14 @@ void printGridInfo(int vlistID)
 	  ylast  = gridInqYval(gridID, ysize-1);
 	  yinc   = gridInqYinc(gridID);
 
+          fprintf(stdout, " : points=%d", gridsize);
 	  if ( gridtype == GRID_GAUSSIAN_REDUCED )
-	    fprintf(stdout, "size : dim = %d  nlat = %d", gridsize, ysize);
-	  else
-	    fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d", gridsize, xsize, ysize);
+	    fprintf(stdout, "  nlat=%d", ysize);
+	  else if ( xysize )
+	    fprintf(stdout, " (%dx%d)", xsize, ysize);
 
 	  if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED )
-	    fprintf(stdout, "  np = %d", gridInqNP(gridID));
+	    fprintf(stdout, "  np=%d", gridInqNP(gridID));
 
 	  fprintf(stdout, "\n");
 
@@ -186,36 +187,31 @@ void printGridInfo(int vlistID)
 
 	  if ( xsize > 0 && lxcoord )
 	    {
-	      if ( gridtype == GRID_GAUSSIAN_REDUCED )
-		{
-		  fprintf(stdout, "size : dim = %d  nlat = %d\n", gridsize, ysize);
-		  fprintf(stdout, "%*s", nbyte0, "");
-		  fprintf(stdout, "longitude : reduced\n");
-		}
-	      else
-		{
-		  xfirst = gridInqXval(gridID, 0);
-		  xlast  = gridInqXval(gridID, xsize-1);
-		  xinc   = gridInqXinc(gridID);
-		  fprintf(stdout, "%*s", nbyte0, "");
-		  fprintf(stdout, "%-9s : first = %.9g", xname, xfirst);
-		  if ( xsize > 1 ) fprintf(stdout, "  last = %.9g", xlast);
-		  if ( IS_NOT_EQUAL(xinc, 0) )
-		    fprintf(stdout, "  inc = %.9g", xinc);
-		  fprintf(stdout, "  %s", xunits);
-		  if ( gridIsCircular(gridID) ) fprintf(stdout, "  circular");
-		  fprintf(stdout, "\n");
-		}
+              xfirst = gridInqXval(gridID, 0);
+              xlast  = gridInqXval(gridID, xsize-1);
+              xinc   = gridInqXinc(gridID);
+              fprintf(stdout, "%33s : %g", xname, xfirst);
+              if ( xsize > 1 )
+                {
+                  fprintf(stdout, " to %g", xlast);
+                  if ( IS_NOT_EQUAL(xinc, 0) )
+                    fprintf(stdout, " by %g", xinc);
+                }
+              fprintf(stdout, " %s", xunits);
+              if ( gridIsCircular(gridID) ) fprintf(stdout, "  circular");
+              fprintf(stdout, "\n");
 	    }
 
 	  if ( ysize > 0 && lycoord )
 	    {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "%-9s : first = %.9g", yname, yfirst);
-	      if ( ysize > 1 ) fprintf(stdout, "  last = %.9g", ylast);
-	      if ( IS_NOT_EQUAL(yinc, 0) && gridtype != GRID_GAUSSIAN && gridtype != GRID_GAUSSIAN_REDUCED )
-		fprintf(stdout, "  inc = %.9g", yinc);
-	      fprintf(stdout, "  %s", yunits);
+	      fprintf(stdout, "%33s : %g", yname, yfirst);
+	      if ( ysize > 1 )
+                {
+                  fprintf(stdout, " to %g", ylast);
+                  if ( IS_NOT_EQUAL(yinc, 0) && gridtype != GRID_GAUSSIAN && gridtype != GRID_GAUSSIAN_REDUCED )
+                    fprintf(stdout, " by %g", yinc);
+                }
+              fprintf(stdout, " %s", yunits);
 	      fprintf(stdout, "\n");
 	    }
 
@@ -225,16 +221,14 @@ void printGridInfo(int vlistID)
 	      lonpole = gridInqXpole(gridID);
 	      latpole = gridInqYpole(gridID);
 	      angle   = gridInqAngle(gridID);
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "northpole : lon = %.9g  lat = %.9g", lonpole, latpole);
-	      if ( angle > 0 ) fprintf(stdout, "  angle = %.9g", angle);
+	      fprintf(stdout, "%33s : lon=%g  lat=%g", "northpole", lonpole, latpole);
+	      if ( angle > 0 ) fprintf(stdout, "  angle=%g", angle);
 	      fprintf(stdout, "\n");
 	    }
 
 	  if ( gridInqXbounds(gridID, NULL) || gridInqYbounds(gridID, NULL) )
 	    {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "available :");
+	      fprintf(stdout, "%33s :", "available");
 	      if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds");
 	      if ( gridInqYbounds(gridID, NULL) ) fprintf(stdout, " ybounds");
 	      if ( gridHasArea(gridID) )          fprintf(stdout, " area");
@@ -246,45 +240,43 @@ void printGridInfo(int vlistID)
 	    {
 	      double a, lon_0, lat_0;
 	      gridInqLaea(gridID, &a, &lon_0, &lat_0);
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "projpar   : a = %g  lon_0 = %g  lat_0 = %g\n", a, lon_0, lat_0);
+	      fprintf(stdout, "%33s : a=%g  lon_0=%g  lat_0=%g\n", "projpar", a, lon_0, lat_0);
 	    }
 
 	  if ( gridtype == GRID_LCC2 )
 	    {
 	      double a, lon_0, lat_0, lat_1, lat_2;
 	      gridInqLcc2(gridID, &a, &lon_0, &lat_0, &lat_1, &lat_2);
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "projpar   : a = %7.0f  lon_0 = %g  lat_0 = %g  lat_1 = %g  lat_2 = %g\n",
-		      a, lon_0, lat_0, lat_1, lat_2);
+	      fprintf(stdout, "%33s : a=%7.0f  lon_0=%g  lat_0=%g  lat_1=%g  lat_2=%g\n",
+                      "projpar", a, lon_0, lat_0, lat_1, lat_2);
 	    }
 	}
       else if ( gridtype == GRID_SPECTRAL )
 	{
-	  fprintf(stdout, "size      : dim = %d  nsp = %d  truncation = %d\n", gridsize, gridsize/2, trunc);
-	  fprintf(stdout, "%*s", nbyte0, "");
-	  fprintf(stdout, "            complexPacking = %d\n", gridInqComplexPacking(gridID));
+	  fprintf(stdout, " : points=%d  nsp=%d  truncation=%d", gridsize, gridsize/2, trunc);
+          if ( gridInqComplexPacking(gridID) ) fprintf(stdout, "  complexPacking");
+          fprintf(stdout, "\n");
 	}
       else if ( gridtype == GRID_FOURIER )
 	{
-	  fprintf(stdout, "size      : dim = %d  nfc = %d  truncation = %d\n", gridsize, gridsize/2, trunc);
+	  fprintf(stdout, " : points=%d  nfc=%d  truncation=%d\n", gridsize, gridsize/2, trunc);
 	}
       else if ( gridtype == GRID_GME )
 	{
 	  int ni, nd;
 	  ni = gridInqGMEni(gridID);
 	  nd = gridInqGMEnd(gridID);
-	  fprintf(stdout, "size      : dim = %d  nd = %d  ni = %d\n", gridsize, nd, ni);
+	  fprintf(stdout, " : points=%d  nd=%d  ni=%d\n", gridsize, nd, ni);
 	}
       else if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED )
 	{
 	  if ( gridtype == GRID_CURVILINEAR )
-	    fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d", gridsize, xsize, ysize);
+	    fprintf(stdout, " : points=%d (%dx%d)", gridsize, xsize, ysize);
 	  else
-	    fprintf(stdout, "size      : dim = %d", gridsize);
+	    fprintf(stdout, " : points=%d", gridsize);
 
           if ( gridtype == GRID_UNSTRUCTURED && gridInqNvertex(gridID) > 0 )
-	    fprintf(stdout, "  nvertex = %d", gridInqNvertex(gridID));
+	    fprintf(stdout, "  nvertex=%d", gridInqNvertex(gridID));
 
           fprintf(stdout, "\n");
 
@@ -295,16 +287,14 @@ void printGridInfo(int vlistID)
 
               if ( number > 0 )
                 {
-                  fprintf(stdout, "%*s", nbyte0, "");
-                  fprintf(stdout, "grid      : number = %d  position = %d\n", number, position);
+                  fprintf(stdout, "%33s : number=%d  position=%d\n", "grid", number, position);
                 }
 
               if ( gridInqReference(gridID, NULL) )
                 {
                   char reference_link[8192];
                   gridInqReference(gridID, reference_link);
-                  fprintf(stdout, "%*s", nbyte0, "");
-                  fprintf(stdout, "uri       : %s\n", reference_link);
+                  fprintf(stdout, "%33s : %s\n", "uri", reference_link);
                 }
             }
 
@@ -313,8 +303,8 @@ void printGridInfo(int vlistID)
 	      int i;
 	      double *xvals, *yvals;
 	      double xfirst, xlast, yfirst, ylast;
-	      xvals = (double *) malloc(gridsize*sizeof(double));
-	      yvals = (double *) malloc(gridsize*sizeof(double));
+	      xvals = (double*) malloc(gridsize*sizeof(double));
+	      yvals = (double*) malloc(gridsize*sizeof(double));
 
 	      gridInqXvals(gridID, xvals);
 	      gridInqYvals(gridID, yvals);
@@ -326,17 +316,15 @@ void printGridInfo(int vlistID)
 	      for ( i = 1; i < gridsize; i++ )
 		{
 		  if ( xvals[i] < xfirst ) xfirst = xvals[i];
-		  if ( xvals[i] > xlast )  xlast  = xvals[i];
+		  if ( xvals[i] > xlast  ) xlast  = xvals[i];
 		  if ( yvals[i] < yfirst ) yfirst = yvals[i];
-		  if ( yvals[i] > ylast )  ylast  = yvals[i];
+		  if ( yvals[i] > ylast  ) ylast  = yvals[i];
 		}
 
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "%-9s : min = %.9g  max = %.9g  %s", xname, xfirst, xlast, xunits);
+	      fprintf(stdout, "%33s : %g to %g %s", xname, xfirst, xlast, xunits);
 	      if ( gridIsCircular(gridID) ) fprintf(stdout, "  circular");
 	      fprintf(stdout, "\n");
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "%-9s : min = %.9g  max = %.9g  %s\n", yname, yfirst, ylast, yunits);
+	      fprintf(stdout, "%33s : %g to %g %s\n", yname, yfirst, ylast, yunits);
 
 	      free(xvals);
 	      free(yvals);
@@ -350,24 +338,21 @@ void printGridInfo(int vlistID)
 	  gridInqLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
 		     &projflag, &scanflag);
 
-	  fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d  ", gridsize, xsize, ysize);
+	  fprintf(stdout, " : points=%d (%dx%d)  ", gridsize, xsize, ysize);
 	  if ( (projflag&128) == 0 )
 	    fprintf(stdout, "North Pole\n");
 	  else
 	    fprintf(stdout, "South Pole\n");
-	  fprintf(stdout, "%*s", nbyte0, "");
-	  fprintf(stdout, "            originLon = %g  originLat = %g  lonParY = %g\n",
-		  originLon, originLat, lonParY);
-	  fprintf(stdout, "%*s", nbyte0, "");
-	  fprintf(stdout, "            lat1 = %g  lat2 = %g  xinc = %g m  yinc = %g m\n",
-		  lat1, lat2, xincm, yincm);
+
+	  fprintf(stdout, "%33s : originLon=%g  originLat=%g  lonParY=%g\n", " ", originLon, originLat, lonParY);
+	  fprintf(stdout, "%33s : lat1=%g  lat2=%g  xinc=%g m  yinc=%g m\n", " ", lat1, lat2, xincm, yincm);
 	}
       else /* if ( gridtype == GRID_GENERIC ) */
 	{
 	  if ( ysize == 0 )
-	    fprintf(stdout, "size      : dim = %d\n", gridsize);
+	    fprintf(stdout, " : points=%d\n", gridsize);
 	  else
-            fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d\n", gridsize, xsize, ysize);
+            fprintf(stdout, " : points=%d (%dx%d)\n", gridsize, xsize, ysize);
 	}
 
       if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED || gridtype == GRID_LCC )
@@ -375,8 +360,7 @@ void printGridInfo(int vlistID)
 	  if ( gridInqXvals(gridID, NULL) || gridInqYvals(gridID, NULL) || gridHasArea(gridID) ||
 	       gridInqXbounds(gridID, NULL) || gridInqYbounds(gridID, NULL) )
 	    {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "available :");
+	      fprintf(stdout, "%33s :", "available");
 	      if ( gridInqXvals(gridID, NULL) )   fprintf(stdout, " xvals");
 	      if ( gridInqYvals(gridID, NULL) )   fprintf(stdout, " yvals");
 	      if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds");
@@ -394,12 +378,237 @@ void printGridInfo(int vlistID)
           uuid2str(uuidOfHGrid, uuidOfHGridStr);
           if ( uuidOfHGridStr[0] != 0  && strlen(uuidOfHGridStr) == 36 )
             {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "uuid      : %s\n", uuidOfHGridStr);
+	      fprintf(stdout, "%33s : %s\n", "uuid", uuidOfHGridStr);
             }
         }
     }
 }
+
+static
+void printZaxisInfo(int vlistID)
+{
+  int nzaxis, index;
+  int zaxisID, zaxistype, levelsize, levelID;
+  int ltype;
+  double *levels = NULL;
+  char zaxisname[CDI_MAX_NAME], zname[CDI_MAX_NAME], zunits[CDI_MAX_NAME];
+
+  nzaxis = vlistNzaxis(vlistID);
+  for ( index = 0; index < nzaxis; index++)
+    {
+      double zfirst = 0, zlast = 0, zinc = 0;
+      zaxisID   = vlistZaxis(vlistID, index);
+      zaxistype = zaxisInqType(zaxisID);
+      ltype     = zaxisInqLtype(zaxisID);
+      levelsize = zaxisInqSize(zaxisID);
+      zaxisName(zaxistype, zaxisname);
+      zaxisInqName(zaxisID, zname);
+      zaxisInqUnits(zaxisID, zunits);
+      zunits[12] = 0;
+
+      if ( zaxistype == ZAXIS_GENERIC && ltype != 0 )
+        fprintf(stdout, "  %4d : %-12s (ltype=%3d) :", vlistZaxisIndex(vlistID, zaxisID)+1, zaxisname, ltype);
+      else
+        fprintf(stdout, "  %4d : %-24s :", vlistZaxisIndex(vlistID, zaxisID)+1, zaxisname);
+
+      fprintf(stdout, " levels=%d", levelsize);
+      fprintf(stdout, "\n");
+
+      levels = (double*) malloc(levelsize*sizeof(double));
+      zaxisInqLevels(zaxisID, levels);
+
+      if ( !(zaxistype == ZAXIS_SURFACE && levelsize == 1 && !(fabs(levels[0]) > 0)) )
+        {
+          zfirst = levels[0];
+          zlast  = levels[levelsize-1];
+          if ( levelsize > 2 )
+            {
+              zinc = (levels[levelsize-1] - levels[0]) / (levelsize-1);
+              for ( levelID = 2; levelID < levelsize; ++levelID )
+                if ( fabs(fabs(levels[levelID] - levels[levelID-1]) - zinc) > 0.001*zinc ) break;
+
+              if ( levelID < levelsize ) zinc = 0;
+            }
+
+          fprintf(stdout, "%33s : %g", zname, zfirst);
+          if ( levelsize > 1 )
+            {
+              fprintf(stdout, " to %g", zlast);
+              if ( IS_NOT_EQUAL(zinc, 0) )
+                fprintf(stdout, " by %g", zinc);
+            }
+          fprintf(stdout, " %s", zunits);
+          fprintf(stdout, "\n");
+        }
+
+      free(levels);
+
+      if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
+        {
+          double level1, level2;
+          fprintf(stdout, "%33s : ", "bounds");
+
+          level1 = zaxisInqLbound(zaxisID, 0);
+          level2 = zaxisInqUbound(zaxisID, 0);
+          fprintf(stdout, "%.9g-%.9g", level1, level2);
+          if ( levelsize > 1 )
+            {
+              level1 = zaxisInqLbound(zaxisID, levelsize-1);
+              level2 = zaxisInqUbound(zaxisID, levelsize-1);
+              fprintf(stdout, " to %.9g-%.9g", level1, level2);
+              if ( IS_NOT_EQUAL(zinc, 0) )
+                fprintf(stdout, " by %g", zinc);
+            }
+          fprintf(stdout, " %s", zunits);
+          fprintf(stdout, "\n");
+        }
+
+      if ( zaxistype == ZAXIS_REFERENCE )
+        {
+          int number   = zaxisInqNumber(zaxisID);
+
+          if ( number > 0 )
+            {
+              fprintf(stdout, "%33s : ", "zaxis");
+              fprintf(stdout, "number = %d\n", number);
+            }
+
+          char uuidOfVGrid[17];
+          zaxisInqUUID(zaxisID, uuidOfVGrid);
+          if ( uuidOfVGrid[0] != 0 )
+            {
+              char uuidOfVGridStr[37];
+              uuid2str(uuidOfVGrid, uuidOfVGridStr);
+              if ( uuidOfVGridStr[0] != 0  && strlen(uuidOfVGridStr) == 36 )
+                {
+                  fprintf(stdout, "%33s : ", "uuid");
+                  fprintf(stdout, "%s\n", uuidOfVGridStr);
+                }
+            }
+        }
+    }
+}
+
+
+static
+int printDateTime(int ntimeout, int vdate, int vtime)
+{
+  char vdatestr[32], vtimestr[32];
+
+  if ( ntimeout == 4 )
+    {
+      ntimeout = 0;
+      fprintf(stdout, "\n");
+    }
+
+  date2str(vdate, vdatestr, sizeof(vdatestr));
+  time2str(vtime, vtimestr, sizeof(vtimestr));
+
+  fprintf(stdout, " %s %s", vdatestr, vtimestr);
+
+  return (++ntimeout);
+}
+
+#define NUM_TIMESTEP 60
+#define MAX_DOTS     80
+
+static
+int printDot(int ndotout, int *nfact, int *ncout)
+{
+
+  //printf("ncout %d %d %d\n",*ncout, (*ncout)%(*nfact), *nfact);
+  if ( (*ncout)%(*nfact) == 0 )
+    {
+      if ( ndotout == MAX_DOTS )
+	{
+	  *ncout = 0;
+	  ndotout = 0;
+	  fprintf(stdout, "\n   ");
+	  (*nfact) *= 10;
+	}
+
+      fprintf(stdout, ".");
+      fflush(stdout);
+      ndotout++;
+    }
+
+  (*ncout)++;
+
+  return (ndotout);
+}
+
+static
+void printTimesteps(int streamID, int taxisID, int verbose)
+{
+  int nrecs;
+  int vdate, vtime;
+  struct datetime {
+    int vdate;
+    int vtime;
+    struct datetime *next;
+  };
+  struct datetime vdatetime[NUM_TIMESTEP];
+  struct datetime *next_vdatetime = vdatetime;
+
+  for ( int i = 0; i < NUM_TIMESTEP-1; ++i ) vdatetime[i].next = &vdatetime[i+1];
+  vdatetime[NUM_TIMESTEP-1].next = &vdatetime[0];
+
+  int ntimeout = 0;
+  int ndotout = 0;
+  int nvdatetime = 0;
+  int ncout = 0;
+  int nfact = 1;
+  int tsID = 0;
+
+  while ( (nrecs = streamInqTimestep(streamID, tsID)) )
+    {
+      vdate = taxisInqVdate(taxisID);
+      vtime = taxisInqVtime(taxisID);
+
+      if ( verbose || tsID < NUM_TIMESTEP )
+	{
+	  ntimeout = printDateTime(ntimeout, vdate, vtime);
+	}
+      else
+	{
+	  if ( tsID == 2*NUM_TIMESTEP ) fprintf(stdout, "\n   ");
+	  if ( tsID >= 2*NUM_TIMESTEP ) ndotout = printDot(ndotout, &nfact, &ncout);
+
+	  if ( nvdatetime < NUM_TIMESTEP )
+	    {
+	      vdatetime[nvdatetime].vdate = vdate;
+	      vdatetime[nvdatetime].vtime = vtime;
+	      nvdatetime++;
+	    }
+	  else
+	    {
+	      next_vdatetime->vdate = vdate;
+	      next_vdatetime->vtime = vtime;
+	      next_vdatetime = next_vdatetime->next;
+	    }
+	}
+
+      tsID++;
+    }
+
+  if ( nvdatetime )
+    {
+      fprintf(stdout, "\n");
+
+      ntimeout = 0;
+      int toff = tsID%4;
+      if ( toff > 0 ) toff = 4 - toff;
+      for ( int i = 0; i < toff; ++i ) next_vdatetime = next_vdatetime->next;
+
+      for ( int i = toff; i < nvdatetime; ++i )
+	{
+	  vdate = next_vdatetime->vdate;
+	  vtime = next_vdatetime->vtime;
+	  ntimeout = printDateTime(ntimeout, vdate, vtime);
+	  next_vdatetime = next_vdatetime->next;
+	}
+    }
+}
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/config/compile b/libcdi/config/compile
index c0096a7..531136b 100755
--- a/libcdi/config/compile
+++ b/libcdi/config/compile
@@ -1,10 +1,9 @@
 #! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey at cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -29,21 +28,224 @@ scriptversion=2009-10-06.20; # UTC
 # bugs to <bug-automake at gnu.org> or send patches to
 # <automake-patches at gnu.org>.
 
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""	$nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv/,$2, in
+	*,$file_conv,*)
+	  ;;
+	mingw/*)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin/*)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine/*)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  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'.
+	  eat=1
+	  case $2 in
+	    *.o | *.[oO][bB][jJ])
+	      func_file_conv "$2"
+	      set x "$@" -Fo"$file"
+	      shift
+	      ;;
+	    *)
+	      func_file_conv "$2"
+	      set x "$@" -Fe"$file"
+	      shift
+	      ;;
+	  esac
+	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-I*)
+	  func_file_conv "${1#-I}" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-l*)
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
+	-L*)
+	  func_cl_dashL "${1#-L}"
+	  ;;
+	-static)
+	  shared=false
+	  ;;
+	-Wl,*)
+	  arg=${1#-Wl,}
+	  save_ifs="$IFS"; IFS=','
+	  for flag in $arg; do
+	    IFS="$save_ifs"
+	    linker_opts="$linker_opts $flag"
+	  done
+	  IFS="$save_ifs"
+	  ;;
+	-Xlinker)
+	  eat=1
+	  linker_opts="$linker_opts $2"
+	  ;;
+	-*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+	  func_file_conv "$1"
+	  set x "$@" -Tp"$file"
+	  shift
+	  ;;
+	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+	  func_file_conv "$1" mingw
+	  set x "$@" "$file"
+	  shift
+	  ;;
+	*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     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
+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'.
+right script to run: please start by reading the file 'INSTALL'.
 
 Report bugs to <bug-automake at gnu.org>.
 EOF
@@ -53,11 +255,13 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
 esac
 
 ofile=
 cfile=
-eat=
 
 for arg
 do
@@ -66,8 +270,8 @@ do
   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.
+	# 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)
@@ -94,10 +298,10 @@ do
 done
 
 if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
+  # 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
+  # '.c' file was seen then we are probably linking.  That is also
   # ok.
   exec "$@"
 fi
@@ -106,7 +310,7 @@ fi
 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# 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
diff --git a/libcdi/config/config.guess b/libcdi/config/config.guess
index 115f944..b79252d 100755
--- a/libcdi/config/config.guess
+++ b/libcdi/config/config.guess
@@ -1,14 +1,12 @@
 #! /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, 2010
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2010-04-03'
+timestamp='2013-06-10'
 
 # 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
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2010-04-03'
 # 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # 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.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# 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.
+# Originally written by Per Bothner.
 #
 # 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
+#
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,9 +50,7 @@ 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, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright 1992-2013 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."
@@ -92,7 +84,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' HUP INT TERM
+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
@@ -106,7 +98,7 @@ trap 'exit 1' HUP INT TERM
 
 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" HUP INT PIPE TERM ;
+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) ; } ||
@@ -140,12 +132,33 @@ 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_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+esac
+
 # 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*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
@@ -181,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -224,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# 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 ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     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
@@ -296,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-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:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
 	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -395,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # 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}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -481,8 +501,8 @@ EOF
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# 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 ] || \
@@ -495,7 +515,7 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -552,7 +572,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	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
@@ -595,52 +615,52 @@ EOF
 	    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" ;;
+		    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
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#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);
+		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);
-              }
+		    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
@@ -731,22 +751,22 @@ EOF
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -770,14 +790,14 @@ EOF
 	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 ;;
+	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}"
+	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}
@@ -789,30 +809,35 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit ;;
     *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
 	    amd64)
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# 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
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
@@ -849,15 +874,22 @@ EOF
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -867,52 +899,56 @@ EOF
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${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}-unknown-linux-gnu
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	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}-pc-linux-${LIBC}"
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -931,51 +967,63 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
+	echo sparc-unknown-linux-${LIBC}
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+	echo hppa64-unknown-linux-${LIBC}
 	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-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
+	echo powerpc64-unknown-linux-${LIBC}
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +1032,11 @@ EOF
 	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,
+	# 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.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1068,7 @@ EOF
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@ -1048,13 +1096,13 @@ EOF
 	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.
+	# 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 ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1089,8 +1137,8 @@ EOF
 	/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; } ;;
+	/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 \
@@ -1133,10 +1181,10 @@ EOF
 		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 ;;
+    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
@@ -1162,11 +1210,11 @@ EOF
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1179,6 +1227,9 @@ EOF
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
 	echo i586-pc-haiku
 	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1205,19 +1256,21 @@ EOF
 	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
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	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
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1231,7 +1284,10 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1276,13 +1332,13 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1300,11 +1356,11 @@ EOF
     i*86:AROS:*:*)
 	echo ${UNAME_MACHINE}-pc-aros
 	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	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_
@@ -1322,11 +1378,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
diff --git a/libcdi/config/config.sub b/libcdi/config/config.sub
index 204218c..8b612ab 100755
--- a/libcdi/config/config.sub
+++ b/libcdi/config/config.sub
@@ -1,38 +1,31 @@
 #! /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, 2010
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2010-05-21'
+timestamp='2013-04-24'
 
-# 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
+# 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 3 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.
+# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # 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.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -75,9 +68,7 @@ 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, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright 1992-2013 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."
@@ -125,13 +116,17 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  linux-musl* | 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/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -154,12 +149,12 @@ case $os in
 	-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)
+	-apple | -axis | -knuth | -cray | -microblaze*)
 		os=
 		basic_machine=$1
 		;;
-        -bluegene*)
-	        os=-cnk
+	-bluegene*)
+		os=-cnk
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
@@ -175,10 +170,10 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -223,6 +218,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -247,20 +248,27 @@ case $basic_machine in
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| 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 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
 	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -278,29 +286,32 @@ case $basic_machine in
 	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
 	| moxie \
 	| mt \
 	| msp430 \
-	| nios | nios2 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
-	| or32 \
+	| open8 \
+	| or1k | or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| rx \
+	| rl78 | 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 | tic54x | tic55x | tic6x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
-	| v850 | v850e \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
@@ -313,8 +324,7 @@ case $basic_machine in
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -324,6 +334,21 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-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.
@@ -338,11 +363,13 @@ case $basic_machine in
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
@@ -351,12 +378,15 @@ case $basic_machine in
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -374,30 +404,34 @@ case $basic_machine in
 	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
 	| mipstx39-* | mipstx39el-* \
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
-	| nios-* | nios2-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* | rx-* \
+	| rl78-* | 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-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile-* | tilegx-* \
+	| tile*-* \
 	| tron-* \
 	| ubicom32-* \
-	| v850-* | v850e-* | vax-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -422,7 +456,7 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -505,7 +539,7 @@ case $basic_machine in
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
 		;;
@@ -537,7 +571,7 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
 		;;
@@ -695,7 +729,6 @@ case $basic_machine in
 	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
@@ -753,9 +786,13 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-        microblaze)
+	microblaze*)
 		basic_machine=microblaze-xilinx
 		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -792,10 +829,18 @@ case $basic_machine in
 	ms1-*)
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -860,6 +905,12 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -942,9 +993,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -969,7 +1021,11 @@ case $basic_machine in
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
-	rdos)
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
 		basic_machine=i386-pc
 		os=-rdos
 		;;
@@ -1038,6 +1094,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1094,13 +1153,8 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-        # This must be matched before tile*.
-        tilegx*)
-		basic_machine=tilegx-unknown
-		os=-linux-gnu
-		;;
 	tile*)
-		basic_machine=tile-unknown
+		basic_machine=$basic_machine-unknown
 		os=-linux-gnu
 		;;
 	tx39)
@@ -1170,6 +1224,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1267,11 +1324,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# 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
+	-auroraux)
+		os=-auroraux
 		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1295,21 +1352,21 @@ case $os in
 	-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* \
+	      | -sym* | -kopensolaris* | -plan9* \
 	      | -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* \
+	      | -bitrig* | -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-android* \
-	      | -linux-newlib* | -linux-uclibc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1356,7 +1413,7 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1405,7 +1462,7 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1441,17 +1498,14 @@ case $os in
 	-aros*)
 		os=-aros
 		;;
-	-kaos*)
-		os=-kaos
-		;;
 	-zvmoe)
 		os=-zvmoe
 		;;
 	-dicos*)
 		os=-dicos
 		;;
-        -nacl*)
-	        ;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1474,10 +1528,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1489,8 +1543,11 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	hexagon-*)
+		os=-elf
 		;;
 	tic54x-*)
 		os=-coff
@@ -1519,14 +1576,11 @@ case $basic_machine in
 		;;
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1535,6 +1589,9 @@ case $basic_machine in
 	mips*-*)
 		os=-elf
 		;;
+	or1k-*)
+		os=-elf
+		;;
 	or32-*)
 		os=-coff
 		;;
@@ -1553,7 +1610,7 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
diff --git a/libcdi/config/default b/libcdi/config/default
index 977c973..46efe45 100755
--- a/libcdi/config/default
+++ b/libcdi/config/default
@@ -12,6 +12,18 @@ set -x
 #
 case "${HOSTNAME}" in
 # i386-apple-darwin10
+    icc)
+	./configure --prefix=$HOME/local \
+                    --enable-maintainer-mode \
+                    --enable-iso-c-interface \
+                    --enable-swig \
+                    --enable-python \
+                    --with-jasper=/opt/local \
+                    --with-grib_api=$HOME/local/gribapi-1.10.4 \
+                    --with-netcdf=$HOME/local \
+                    --with-szlib=$HOME/local \
+	            CC=icc CFLAGS="-g -D_REENTRANT -Wall -O3 -march=native -Df2cFortran -fp-model source"
+	;;
     bailung*)
 	./configure --prefix=$HOME/local \
                     --enable-maintainer-mode \
@@ -132,7 +144,7 @@ case "${HOSTNAME}" in
                     --with-szlib=/sw/aix61/szip-2.1-threadsafe \
                     AR="ar -X 64" LDFLAGS="-brtl" FC=xlf2003_r CC=xlc_r \
                     CFLAGS="-g -O3 -qhot -q64 -qarch=auto -qtune=auto -qlistfmt=html=transforms -DHAVE_MMAP -Dextname" \
-                    FCFLAGS="-qsuffix=cpp=f90" \
+                    FCFLAGS="-qsuffix=cpp=f90 -qextname" \
                     SHELL=/bin/bash
         ;;
     *)
diff --git a/libcdi/config/depcomp b/libcdi/config/depcomp
index df8eea7..4ebd5b3 100755
--- a/libcdi/config/depcomp
+++ b/libcdi/config/depcomp
@@ -1,10 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2013 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
@@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
   -h | --h*)
     cat <<\EOF
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -40,11 +39,11 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  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.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake at gnu.org>.
@@ -57,6 +56,66 @@ EOF
     ;;
 esac
 
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
 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
@@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
 
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
 # 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
@@ -80,18 +142,32 @@ if test "$depmode" = hp; then
 fi
 
 if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
 fi
 
 cygpath_u="cygpath -u -f -"
 if test "$depmode" = msvcmsys; then
-   # This is just like msvisualcpp but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u="sed s,\\\\\\\\,/,g"
-   depmode=msvisualcpp
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
 fi
 
 case "$depmode" in
@@ -114,8 +190,7 @@ gcc3)
   done
   "$@"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -123,13 +198,17 @@ gcc3)
   ;;
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## 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).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -137,31 +216,31 @@ gcc)
   fi
   "$@" -Wp,"$gccflag$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     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.
+  # 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.
+## 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
+## 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.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## 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"
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -179,8 +258,7 @@ sgi)
     "$@" -MDupdate "$tmpdepfile"
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -188,43 +266,41 @@ sgi)
 
   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
+    # 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"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$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"
+    tr ' ' "$nl" < "$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"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # 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
+  ;;
+
 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
+  # 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.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.u
     tmpdepfile2=$base.u
@@ -237,9 +313,7 @@ aix)
     "$@" -M
   fi
   stat=$?
-
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
@@ -248,44 +322,100 @@ aix)
   do
     test -f "$tmpdepfile" && break
   done
-  if test -f "$tmpdepfile"; then
-    # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$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"
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
   fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
   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
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\' :
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
 
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -297,8 +427,8 @@ icc)
   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"
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -309,9 +439,8 @@ hp2)
   # 'foo.d', which lands next to the object file, wherever that
   # happens to be.
   # Much of this is similar to the tru64 case; see comments there.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from  "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.d
     tmpdepfile2=$dir.libs/$base.d
@@ -322,8 +451,7 @@ hp2)
     "$@" +Maked
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
      rm -f "$tmpdepfile1" "$tmpdepfile2"
      exit $stat
   fi
@@ -333,77 +461,107 @@ hp2)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
-	       s/^ *//
-	       s/ \\*$//
-	       s/$/:/
-	       p
-	     }' "$tmpdepfile" >> "$depfile"
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
   else
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile" "$tmpdepfile2"
   ;;
 
 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 mechanism 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 $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"
-   ;;
+  # 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.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies 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$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # 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
+  ;;
 
 #nosideeffect)
   # This comment above is used by automake to tell side-effect
@@ -422,7 +580,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -442,18 +600,18 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # 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.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$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"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -503,12 +661,15 @@ makedepend)
   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"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile" "$tmpdepfile".bak
   ;;
 
@@ -525,7 +686,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -544,10 +705,10 @@ cpp)
     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"
+  "$@" -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"
@@ -579,23 +740,23 @@ msvisualcpp)
       shift
       ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-	set fnord "$@"
-	shift
-	shift
-	;;
+        set fnord "$@"
+        shift
+        shift
+        ;;
     *)
-	set fnord "$@" "$arg"
-	shift
-	shift
-	;;
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
     esac
   done
   "$@" -E 2>/dev/null |
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
diff --git a/libcdi/config/install-sh b/libcdi/config/install-sh
index 3f83ce9..377bb86 100755
--- a/libcdi/config/install-sh
+++ b/libcdi/config/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-11-20.07; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2010-02-06.18; # UTC
 # 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
+# '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
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
+	# Protect names problematic for 'test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
 	shift;;
 
     -T) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -194,7 +202,7 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
@@ -232,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -256,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # 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.
@@ -351,7 +354,7 @@ do
 	      if test -z "$dir_arg" || {
 		   # Check for POSIX incompatibilities with -m.
 		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
+		   # other-writable bit of parent directory when it shouldn't.
 		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
 		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
 		   case $ls_ld_tmpdir in
@@ -389,7 +392,7 @@ do
 
       case $dstdir in
 	/*) prefix='/';;
-	-*) prefix='./';;
+	[-=\(\)!]*) prefix='./';;
 	*)  prefix='';;
       esac
 
@@ -407,7 +410,7 @@ do
 
       for d
       do
-	test -z "$d" && continue
+	test X"$d" = X && continue
 
 	prefix=$prefix$d
 	if test -d "$prefix"; then
diff --git a/libcdi/config/ltmain.sh b/libcdi/config/ltmain.sh
index 9ae038c..63ae69d 100644
--- a/libcdi/config/ltmain.sh
+++ b/libcdi/config/ltmain.sh
@@ -5851,10 +5851,9 @@ func_mode_link ()
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-      # -stdlib=*            select c++ std lib with clang
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-stdlib=*)
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
         func_quote_for_eval "$arg"
 	arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"
diff --git a/libcdi/config/missing b/libcdi/config/missing
index 28055d2..cdea514 100755
--- a/libcdi/config/missing
+++ b/libcdi/config/missing
@@ -1,11 +1,10 @@
 #! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-06-26.16; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written 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
@@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
 # 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"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# 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
+case $1 in
 
-msg="missing on your system"
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
 
-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
-  ;;
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
 
   -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.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
 
 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'
-  autom4te     touch the output file, or create a stub one
-  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]
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
 
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
 
 Send bug reports to <bug-automake at gnu.org>."
     exit $?
@@ -100,272 +70,141 @@ Send bug reports to <bug-automake at gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
 esac
 
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# 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).  This is about non-GNU programs, so use $1 not
-# $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 $program 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 "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    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 test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f y.tab.h; then
-	echo >y.tab.h
-    fi
-    if test ! -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 test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -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 "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit $?
-    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 "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    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
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
 
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'automa4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/libcdi/config/mkinstalldirs b/libcdi/config/mkinstalldirs
index ef7e16f..55d537f 100755
--- a/libcdi/config/mkinstalldirs
+++ b/libcdi/config/mkinstalldirs
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2006-05-11.19
+scriptversion=2009-04-28.21; # UTC
 
 # Original author: Noah Friedman <friedman at prep.ai.mit.edu>
 # Created: 1993-05-16
@@ -81,9 +81,9 @@ case $dirmode in
       echo "mkdir -p -- $*"
       exec mkdir -p -- "$@"
     else
-      # On NextStep and OpenStep, the `mkdir' command does not
+      # On NextStep and OpenStep, the 'mkdir' command does not
       # recognize any option.  It will interpret all options as
-      # directories to create, and then abort because `.' already
+      # directories to create, and then abort because '.' already
       # exists.
       test -d ./-p && rmdir ./-p
       test -d ./--version && rmdir ./--version
@@ -157,5 +157,6 @@ exit $errstatus
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/libcdi/configure b/libcdi/configure
index eefae9c..ffea8d6 100755
--- a/libcdi/configure
+++ b/libcdi/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for cdi 1.6.3.
+# Generated by GNU Autoconf 2.68 for cdi 1.6.4.
 #
 # Report bugs to <http://code.zmaw.de/projects/cdi>.
 #
@@ -570,8 +570,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='cdi'
 PACKAGE_TARNAME='cdi'
-PACKAGE_VERSION='1.6.3'
-PACKAGE_STRING='cdi 1.6.3'
+PACKAGE_VERSION='1.6.4'
+PACKAGE_STRING='cdi 1.6.4'
 PACKAGE_BUGREPORT='http://code.zmaw.de/projects/cdi'
 PACKAGE_URL=''
 
@@ -758,6 +758,10 @@ LIBTOOL
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -830,6 +834,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_silent_rules
 enable_maintainer_mode
 with_pic
 enable_shared
@@ -1437,7 +1442,7 @@ 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 cdi 1.6.3 to adapt to many kinds of systems.
+\`configure' configures cdi 1.6.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1507,7 +1512,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cdi 1.6.3:";;
+     short | recursive ) echo "Configuration of cdi 1.6.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1515,14 +1520,19 @@ 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-maintainer-mode  enable make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-maintainer-mode
+                          enable make rules and dependencies not useful (and
+                          sometimes confusing) to the casual installer
   --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-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-largefile     omit support for large files
   --enable-grib           GRIB support [default=yes]
@@ -1545,7 +1555,7 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pic              try to use only PIC/non-PIC objects [default=use
+  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-sysroot=DIR Search for dependent libraries within DIR
@@ -1561,7 +1571,7 @@ Optional Packages:
   --with-hdf5=<yes|no|directory> (default=no)
                           location of hdf5 library, NETCDF4 requires hdf5 high
                           level interface
-  --with-netcdf=<yes|no|directory> (default=yes)
+  --with-netcdf=<yes|no|directory> (default=no)
                           location of netcdf library (lib and include subdirs)
   --with-jasper=<directory>
                           Specify location of JASPER library. You must specify
@@ -1689,7 +1699,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cdi configure 1.6.3
+cdi configure 1.6.4
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2450,7 +2460,7 @@ 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 cdi $as_me 1.6.3, which was
+It was created by cdi $as_me 1.6.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2909,7 +2919,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
-am__api_version='1.11'
+am__api_version='1.14'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -3006,9 +3016,6 @@ 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='
@@ -3019,32 +3026,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# 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
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     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
+     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
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$2" = conftest.file
    )
 then
@@ -3056,6 +3071,16 @@ Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -3078,12 +3103,12 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 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;}
+  { $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
@@ -3095,10 +3120,10 @@ if test x"${install_sh}" != xset; then
   esac
 fi
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# 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.
+# 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.
@@ -3237,12 +3262,6 @@ 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.
@@ -3325,6 +3344,45 @@ else
 fi
 rmdir .tst 2>/dev/null
 
+# 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=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
 if test "`cd $srcdir && pwd`" != "`pwd`"; then
   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
   # is not polluted with repeated "-I."
@@ -3347,7 +3405,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='cdi'
- VERSION='1.6.3'
+ VERSION='1.6.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3375,18 +3433,70 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
 
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
 
 
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
 ac_config_headers="$ac_config_headers src/config.h"
 
 
@@ -3529,7 +3639,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# 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
@@ -4363,6 +4473,65 @@ 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=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 whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; 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.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != 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
+
+
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -4374,8 +4543,8 @@ else
   # 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'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -4410,16 +4579,16 @@ else
     : > 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
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > 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"
+    # 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
+    # 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
@@ -4428,8 +4597,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # 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
@@ -4437,7 +4606,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # 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}
@@ -5180,6 +5349,11 @@ else
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   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
@@ -5219,7 +5393,7 @@ else
       # 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
@@ -5648,7 +5822,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -6289,13 +6463,13 @@ 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 -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -6442,6 +6616,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -6830,7 +7005,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*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
@@ -6841,7 +7016,20 @@ sparc*-*solaris*)
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -7481,7 +7669,13 @@ else
 	$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
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&5
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&5
@@ -7492,6 +7686,7 @@ else
 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 ${lt_cv_ld_exported_symbols_list+:} false; then :
@@ -7524,6 +7719,7 @@ rm -f core conftest.err conftest.$ac_objext \
 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; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
 $as_echo_n "checking for -force_load linker flag... " >&6; }
 if ${lt_cv_ld_force_load+:} false; then :
@@ -7545,7 +7741,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&5
@@ -7879,7 +8077,22 @@ done
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -8027,6 +8240,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -8486,7 +8703,9 @@ lt_prog_compiler_static=
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       lt_prog_compiler_wl='-Xlinker '
-      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
       ;;
     esac
   else
@@ -8577,18 +8796,33 @@ lt_prog_compiler_static=
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # 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=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
 	  lt_prog_compiler_wl='-Wl,'
 	  ;;
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fPIC'
+	  lt_prog_compiler_static='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fpic'
+	  lt_prog_compiler_static='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -8950,7 +9184,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   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
@@ -9200,8 +9433,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # 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'
+	  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
@@ -9580,6 +9812,7 @@ fi
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
 	enable_shared_with_static_runtimes=yes
+	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 	# Don't use ranlib
 	old_postinstall_cmds='chmod 644 $oldlib'
@@ -9625,6 +9858,7 @@ fi
   hardcode_shlibpath_var=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec=''
   fi
@@ -9653,10 +9887,6 @@ fi
       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
@@ -9669,7 +9899,7 @@ fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -9708,7 +9938,6 @@ fi
       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
@@ -10332,11 +10561,6 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -10426,7 +10650,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -10435,7 +10659,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -10500,7 +10724,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -10639,7 +10863,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -10647,10 +10871,6 @@ dgux*)
   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.
@@ -10658,7 +10878,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -10676,7 +10896,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -10696,17 +10916,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -10767,7 +10988,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -10783,7 +11004,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -10820,9 +11041,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -10904,7 +11125,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -10973,7 +11194,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -10998,7 +11219,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -11022,7 +11243,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -11053,7 +11274,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -11063,7 +11284,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -11845,6 +12066,8 @@ CC="$lt_save_CC"
 
 
 
+
+
         ac_config_commands="$ac_config_commands libtool"
 
 
@@ -12124,131 +12347,6 @@ if test "x$ac_cv_prog_cc_c99" != xno; then :
 fi
 
 
-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 eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; 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=${ac_fc_srcext-f}
 ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
@@ -12484,7 +12582,6 @@ 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
@@ -12640,6 +12737,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 esac
 
 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -12884,7 +12982,9 @@ lt_prog_compiler_static_FC=
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       lt_prog_compiler_wl_FC='-Xlinker '
-      lt_prog_compiler_pic_FC='-Xcompiler -fPIC'
+      if test -n "$lt_prog_compiler_pic_FC"; then
+        lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC"
+      fi
       ;;
     esac
   else
@@ -12975,18 +13075,33 @@ lt_prog_compiler_static_FC=
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # 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=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic_FC='-KPIC'
+	  lt_prog_compiler_static_FC='-Bstatic'
+	  lt_prog_compiler_wl_FC='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic_FC='-KPIC'
 	  lt_prog_compiler_static_FC='-Bstatic'
 	  lt_prog_compiler_wl_FC='-Wl,'
 	  ;;
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl_FC='-Wl,'
+	  lt_prog_compiler_pic_FC='-fPIC'
+	  lt_prog_compiler_static_FC='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl_FC='-Wl,'
+	  lt_prog_compiler_pic_FC='-fpic'
+	  lt_prog_compiler_static_FC='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -13333,7 +13448,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   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
@@ -13583,8 +13697,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # 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'
+	  hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
 	  archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
@@ -13951,6 +14064,7 @@ fi
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, FC)='true'
 	enable_shared_with_static_runtimes_FC=yes
+	exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 	# Don't use ranlib
 	old_postinstall_cmds_FC='chmod 644 $oldlib'
@@ -13996,6 +14110,7 @@ fi
   hardcode_shlibpath_var_FC=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    compiler_needs_object_FC=yes
   else
     whole_archive_flag_spec_FC=''
   fi
@@ -14024,10 +14139,6 @@ fi
       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
@@ -14040,7 +14151,7 @@ fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct_FC=yes
       hardcode_minus_L_FC=yes
@@ -14079,7 +14190,6 @@ fi
       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
@@ -14566,8 +14676,6 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -14593,7 +14701,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -14602,7 +14710,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -14667,7 +14775,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -14804,7 +14912,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -14812,10 +14920,6 @@ dgux*)
   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.
@@ -14823,7 +14927,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -14841,7 +14945,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -14861,17 +14965,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -14932,7 +15037,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -14948,7 +15053,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -14985,9 +15090,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15063,7 +15168,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -15132,7 +15237,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15157,7 +15262,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -15181,7 +15286,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -15212,7 +15317,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15222,7 +15327,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -16365,7 +16470,6 @@ 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
@@ -16601,7 +16705,9 @@ lt_prog_compiler_static_F77=
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       lt_prog_compiler_wl_F77='-Xlinker '
-      lt_prog_compiler_pic_F77='-Xcompiler -fPIC'
+      if test -n "$lt_prog_compiler_pic_F77"; then
+        lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77"
+      fi
       ;;
     esac
   else
@@ -16692,18 +16798,33 @@ lt_prog_compiler_static_F77=
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # 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=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic_F77='-KPIC'
 	  lt_prog_compiler_static_F77='-Bstatic'
 	  lt_prog_compiler_wl_F77='-Wl,'
 	  ;;
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  lt_prog_compiler_pic_F77='-fPIC'
+	  lt_prog_compiler_static_F77='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  lt_prog_compiler_pic_F77='-fpic'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -17050,7 +17171,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   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
@@ -17300,8 +17420,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # 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'
+	  hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
 	  archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
@@ -17668,6 +17787,7 @@ fi
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, F77)='true'
 	enable_shared_with_static_runtimes_F77=yes
+	exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 	# Don't use ranlib
 	old_postinstall_cmds_F77='chmod 644 $oldlib'
@@ -17713,6 +17833,7 @@ fi
   hardcode_shlibpath_var_F77=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    compiler_needs_object_F77=yes
   else
     whole_archive_flag_spec_F77=''
   fi
@@ -17741,10 +17862,6 @@ fi
       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
@@ -17757,7 +17874,7 @@ fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct_F77=yes
       hardcode_minus_L_F77=yes
@@ -17796,7 +17913,6 @@ fi
       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
@@ -18283,8 +18399,6 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -18310,7 +18424,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -18319,7 +18433,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -18384,7 +18498,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -18521,7 +18635,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -18529,10 +18643,6 @@ dgux*)
   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.
@@ -18540,7 +18650,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -18558,7 +18668,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -18578,17 +18688,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -18649,7 +18760,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -18665,7 +18776,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -18702,9 +18813,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -18780,7 +18891,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -18849,7 +18960,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -18874,7 +18985,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -18898,7 +19009,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -18929,7 +19040,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -18939,7 +19050,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -19328,8 +19439,8 @@ else
   # 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'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -19364,16 +19475,16 @@ else
     : > 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
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > 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"
+    # 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
+    # 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
@@ -19382,8 +19493,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # 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
@@ -19391,7 +19502,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # 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}
@@ -19600,7 +19711,6 @@ 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
@@ -20184,6 +20294,7 @@ fi
   hardcode_shlibpath_var_CXX=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec_CXX=''
   fi
@@ -20228,7 +20339,7 @@ fi
         esac
         ;;
 
-      freebsd[12]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         ld_shlibs_CXX=no
@@ -20904,6 +21015,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 esac
 
 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -21675,7 +21787,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*) ;;
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
     *)
       export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
       exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
@@ -21828,8 +21942,6 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -21855,7 +21967,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -21864,7 +21976,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -21929,7 +22041,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -22066,7 +22178,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -22074,10 +22186,6 @@ dgux*)
   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.
@@ -22085,7 +22193,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -22103,7 +22211,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -22123,17 +22231,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -22194,7 +22303,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -22210,7 +22319,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -22247,9 +22356,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -22331,7 +22440,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -22400,7 +22509,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -22425,7 +22534,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -22449,7 +22558,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -22480,7 +22589,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -22490,7 +22599,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -27819,6 +27928,14 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
  if test -n "$EXEEXT"; then
   am__EXEEXT_TRUE=
   am__EXEEXT_FALSE='#'
@@ -28300,7 +28417,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cdi $as_me 1.6.3, which was
+This file was extended by cdi $as_me 1.6.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -28366,7 +28483,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cdi config.status 1.6.3
+cdi config.status 1.6.4
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -28503,6 +28620,7 @@ enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
@@ -28585,7 +28703,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
@@ -28709,9 +28826,6 @@ no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quo
 hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_FC='`$ECHO "$hardcode_libdir_flag_spec_ld_FC" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_F77='`$ECHO "$hardcode_libdir_flag_spec_ld_F77" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
@@ -28794,6 +28908,7 @@ _LTECHO_EOF'
 # Quote evaled strings.
 for var in SHELL \
 ECHO \
+PATH_SEPARATOR \
 SED \
 GREP \
 EGREP \
@@ -28844,7 +28959,6 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
 exclude_expsyms \
 include_expsyms \
@@ -28908,9 +29022,6 @@ no_undefined_flag_CXX \
 hardcode_libdir_flag_spec_FC \
 hardcode_libdir_flag_spec_F77 \
 hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_FC \
-hardcode_libdir_flag_spec_ld_F77 \
-hardcode_libdir_flag_spec_ld_CXX \
 hardcode_libdir_separator_FC \
 hardcode_libdir_separator_F77 \
 hardcode_libdir_separator_CXX \
@@ -29674,7 +29785,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
   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
+  # Older Autoconf 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
@@ -29687,7 +29798,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     # 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
+    # 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.
@@ -29721,21 +29832,19 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    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
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
@@ -29789,8 +29898,8 @@ $as_echo X"$file" |
 # 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, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -29844,6 +29953,9 @@ SHELL=$lt_SHELL
 # An echo program that protects backslashes.
 ECHO=$lt_ECHO
 
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
 # The host system.
 host_alias=$host_alias
 host=$host
@@ -30145,10 +30257,6 @@ no_undefined_flag=$lt_no_undefined_flag
 # 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
 
@@ -30491,10 +30599,6 @@ no_undefined_flag=$lt_no_undefined_flag_FC
 # 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
 
@@ -30648,10 +30752,6 @@ no_undefined_flag=$lt_no_undefined_flag_F77
 # 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
 
@@ -30805,10 +30905,6 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
 # 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
 
diff --git a/libcdi/configure.ac b/libcdi/configure.ac
index 3dd8467..86b5c9c 100644
--- a/libcdi/configure.ac
+++ b/libcdi/configure.ac
@@ -1,6 +1,10 @@
 #  Process this file with autoconf to produce a configure script.
+#
+#  automake 1.14
+#  autoconf 2.68
+#  libtool  2.4.2
 
-AC_INIT([cdi], [1.6.3], [http://code.zmaw.de/projects/cdi])
+AC_INIT([cdi], [1.6.4], [http://code.zmaw.de/projects/cdi])
 
 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}"
 
@@ -11,7 +15,7 @@ AC_CANONICAL_HOST
 AC_CANONICAL_BUILD
 
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign serial-tests])
 AC_CONFIG_HEADERS([src/config.h])
 AM_MAINTAINER_MODE([disable])
 
diff --git a/libcdi/doc/cdi_cman.pdf b/libcdi/doc/cdi_cman.pdf
index a72e359..6751a48 100644
Binary files a/libcdi/doc/cdi_cman.pdf and b/libcdi/doc/cdi_cman.pdf differ
diff --git a/libcdi/doc/cdi_fman.pdf b/libcdi/doc/cdi_fman.pdf
index 36d2ad1..dba4acc 100644
Binary files a/libcdi/doc/cdi_fman.pdf and b/libcdi/doc/cdi_fman.pdf differ
diff --git a/libcdi/examples/Makefile.in b/libcdi/examples/Makefile.in
index 78113c8..cf2109b 100644
--- a/libcdi/examples/Makefile.in
+++ b/libcdi/examples/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -16,23 +15,51 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -56,7 +83,9 @@ noinst_PROGRAMS = cdi_write$(EXEEXT) cdi_write_ens$(EXEEXT) \
 	$(am__EXEEXT_1)
 @CREATE_ISOC_TRUE at am__append_1 = cdi_read_f2003 cdi_write_f2003
 subdir = examples
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs \
+	$(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -82,26 +111,31 @@ PROGRAMS = $(noinst_PROGRAMS)
 am_cdi_copy_OBJECTS = cdi_copy.$(OBJEXT)
 cdi_copy_OBJECTS = $(am_cdi_copy_OBJECTS)
 cdi_copy_DEPENDENCIES = $(top_builddir)/src/libcdi.la
-cdi_copy_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cdi_copy_LDFLAGS) \
-	$(LDFLAGS) -o $@
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+cdi_copy_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(cdi_copy_LDFLAGS) $(LDFLAGS) -o $@
 am_cdi_read_OBJECTS = cdi_read.$(OBJEXT)
 cdi_read_OBJECTS = $(am_cdi_read_OBJECTS)
 cdi_read_DEPENDENCIES = $(top_builddir)/src/libcdi.la
-cdi_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cdi_read_LDFLAGS) \
-	$(LDFLAGS) -o $@
+cdi_read_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(cdi_read_LDFLAGS) $(LDFLAGS) -o $@
 am_cdi_read_f2003_OBJECTS = cdi_read_f2003.$(OBJEXT)
 cdi_read_f2003_OBJECTS = $(am_cdi_read_f2003_OBJECTS)
 cdi_read_f2003_DEPENDENCIES = $(top_builddir)/src/libcdi.la \
 	$(top_builddir)/src/mo_cdi.o
-cdi_read_f2003_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
-	$(cdi_read_f2003_LDFLAGS) $(LDFLAGS) -o $@
+cdi_read_f2003_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \
+	$(AM_FCFLAGS) $(FCFLAGS) $(cdi_read_f2003_LDFLAGS) $(LDFLAGS) \
+	-o $@
 am_cdi_write_OBJECTS = cdi_write.$(OBJEXT)
 cdi_write_OBJECTS = $(am_cdi_write_OBJECTS)
 cdi_write_DEPENDENCIES = $(top_builddir)/src/libcdi.la
-cdi_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+cdi_write_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(cdi_write_LDFLAGS) $(LDFLAGS) -o $@
 am_cdi_write_ens_OBJECTS = cdi_write_ens.$(OBJEXT)
@@ -111,32 +145,62 @@ am_cdi_write_f2003_OBJECTS = cdi_write_f2003.$(OBJEXT)
 cdi_write_f2003_OBJECTS = $(am_cdi_write_f2003_OBJECTS)
 cdi_write_f2003_DEPENDENCIES = $(top_builddir)/src/libcdi.la \
 	$(top_builddir)/src/mo_cdi.o
-cdi_write_f2003_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
-	$(cdi_write_f2003_LDFLAGS) $(LDFLAGS) -o $@
+cdi_write_f2003_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \
+	$(AM_FCFLAGS) $(FCFLAGS) $(cdi_write_f2003_LDFLAGS) $(LDFLAGS) \
+	-o $@
 am_cdi_write_hybrid_OBJECTS = cdi_write_hybrid.$(OBJEXT)
 cdi_write_hybrid_OBJECTS = $(am_cdi_write_hybrid_OBJECTS)
 cdi_write_hybrid_DEPENDENCIES = $(top_builddir)/src/libcdi.la
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS)
-LTFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(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_ at AM_V@)
+am__v_FC_ = $(am__v_FC_ at AM_DEFAULT_V@)
+am__v_FC_0 = @echo "  FC      " $@;
+am__v_FC_1 = 
 FCLD = $(FC)
-FCLINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_FCLD_ = $(am__v_FCLD_ at AM_DEFAULT_V@)
+am__v_FCLD_0 = @echo "  FCLD    " $@;
+am__v_FCLD_1 = 
 SOURCES = $(cdi_copy_SOURCES) $(cdi_read_SOURCES) \
 	$(cdi_read_f2003_SOURCES) $(cdi_write_SOURCES) \
 	$(cdi_write_ens_SOURCES) $(cdi_write_f2003_SOURCES) \
@@ -150,11 +214,29 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -384,9 +466,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu examples/Makefile
+	  $(AUTOMAKE) --foreign examples/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -414,27 +496,34 @@ clean-noinstPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
+
 cdi_copy$(EXEEXT): $(cdi_copy_OBJECTS) $(cdi_copy_DEPENDENCIES) $(EXTRA_cdi_copy_DEPENDENCIES) 
 	@rm -f cdi_copy$(EXEEXT)
-	$(cdi_copy_LINK) $(cdi_copy_OBJECTS) $(cdi_copy_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(cdi_copy_LINK) $(cdi_copy_OBJECTS) $(cdi_copy_LDADD) $(LIBS)
+
 cdi_read$(EXEEXT): $(cdi_read_OBJECTS) $(cdi_read_DEPENDENCIES) $(EXTRA_cdi_read_DEPENDENCIES) 
 	@rm -f cdi_read$(EXEEXT)
-	$(cdi_read_LINK) $(cdi_read_OBJECTS) $(cdi_read_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(cdi_read_LINK) $(cdi_read_OBJECTS) $(cdi_read_LDADD) $(LIBS)
+
 cdi_read_f2003$(EXEEXT): $(cdi_read_f2003_OBJECTS) $(cdi_read_f2003_DEPENDENCIES) $(EXTRA_cdi_read_f2003_DEPENDENCIES) 
 	@rm -f cdi_read_f2003$(EXEEXT)
-	$(cdi_read_f2003_LINK) $(cdi_read_f2003_OBJECTS) $(cdi_read_f2003_LDADD) $(LIBS)
+	$(AM_V_FCLD)$(cdi_read_f2003_LINK) $(cdi_read_f2003_OBJECTS) $(cdi_read_f2003_LDADD) $(LIBS)
+
 cdi_write$(EXEEXT): $(cdi_write_OBJECTS) $(cdi_write_DEPENDENCIES) $(EXTRA_cdi_write_DEPENDENCIES) 
 	@rm -f cdi_write$(EXEEXT)
-	$(cdi_write_LINK) $(cdi_write_OBJECTS) $(cdi_write_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(cdi_write_LINK) $(cdi_write_OBJECTS) $(cdi_write_LDADD) $(LIBS)
+
 cdi_write_ens$(EXEEXT): $(cdi_write_ens_OBJECTS) $(cdi_write_ens_DEPENDENCIES) $(EXTRA_cdi_write_ens_DEPENDENCIES) 
 	@rm -f cdi_write_ens$(EXEEXT)
-	$(LINK) $(cdi_write_ens_OBJECTS) $(cdi_write_ens_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(cdi_write_ens_OBJECTS) $(cdi_write_ens_LDADD) $(LIBS)
+
 cdi_write_f2003$(EXEEXT): $(cdi_write_f2003_OBJECTS) $(cdi_write_f2003_DEPENDENCIES) $(EXTRA_cdi_write_f2003_DEPENDENCIES) 
 	@rm -f cdi_write_f2003$(EXEEXT)
-	$(cdi_write_f2003_LINK) $(cdi_write_f2003_OBJECTS) $(cdi_write_f2003_LDADD) $(LIBS)
+	$(AM_V_FCLD)$(cdi_write_f2003_LINK) $(cdi_write_f2003_OBJECTS) $(cdi_write_f2003_LDADD) $(LIBS)
+
 cdi_write_hybrid$(EXEEXT): $(cdi_write_hybrid_OBJECTS) $(cdi_write_hybrid_DEPENDENCIES) $(EXTRA_cdi_write_hybrid_DEPENDENCIES) 
 	@rm -f cdi_write_hybrid$(EXEEXT)
-	$(LINK) $(cdi_write_hybrid_OBJECTS) $(cdi_write_hybrid_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(cdi_write_hybrid_OBJECTS) $(cdi_write_hybrid_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -449,34 +538,34 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdi_write_hybrid.Po at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 .f90.o:
-	$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
+	$(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
 
 .f90.obj:
-	$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
+	$(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
 
 .f90.lo:
-	$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
+	$(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -484,26 +573,15 @@ mostlyclean-libtool:
 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)
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -515,15 +593,11 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$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; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -532,6 +606,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -673,18 +762,19 @@ uninstall-am:
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstPROGRAMS 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
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+	ctags-am 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 tags-am uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libcdi/examples/cdi_write.c b/libcdi/examples/cdi_write.c
index 89094c2..da7ae2d 100644
--- a/libcdi/examples/cdi_write.c
+++ b/libcdi/examples/cdi_write.c
@@ -36,8 +36,8 @@ int main(void)
   vlistID = vlistCreate();
 
   // Define the variables
-  varID1 = vlistDefVar(vlistID, gridID, zaxisID1, TIME_VARIABLE);
-  varID2 = vlistDefVar(vlistID, gridID, zaxisID2, TIME_VARIABLE);
+  varID1 = vlistDefVar(vlistID, gridID, zaxisID1, TSTEP_INSTANT);
+  varID2 = vlistDefVar(vlistID, gridID, zaxisID2, TSTEP_INSTANT);
 
   // Define the variable names
   vlistDefVarName(vlistID, varID1, "varname1");
diff --git a/libcdi/examples/cdi_write_ens.c b/libcdi/examples/cdi_write_ens.c
index f578f00..6406ff4 100644
--- a/libcdi/examples/cdi_write_ens.c
+++ b/libcdi/examples/cdi_write_ens.c
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
   instID  = institutDef( 252, 0, NULL, NULL );
 
   vlistID = vlistCreate();
-  varID = vlistDefVar(vlistID, gridID, zaxisID, TIME_VARIABLE);
+  varID = vlistDefVar(vlistID, gridID, zaxisID, TSTEP_INSTANT);
   
   vlistDefVarEnsemble( vlistID, varID, 1, 2, 3);
   
diff --git a/libcdi/examples/cdi_write_hybrid.c b/libcdi/examples/cdi_write_hybrid.c
index dd4fc73..e697393 100644
--- a/libcdi/examples/cdi_write_hybrid.c
+++ b/libcdi/examples/cdi_write_hybrid.c
@@ -54,10 +54,10 @@ int main(void)
   vlistID = vlistCreate();
 
   // Define the variables
-  varID1 = vlistDefVar(vlistID, gridID, zaxisID1, TIME_VARIABLE);
-  varID2 = vlistDefVar(vlistID, gridID, zaxisID2, TIME_VARIABLE);
-  varID3 = vlistDefVar(vlistID, gridID, zaxisID3, TIME_VARIABLE);
-  varID4 = vlistDefVar(vlistID, gridID, zaxisID4, TIME_VARIABLE);
+  varID1 = vlistDefVar(vlistID, gridID, zaxisID1, TSTEP_INSTANT);
+  varID2 = vlistDefVar(vlistID, gridID, zaxisID2, TSTEP_INSTANT);
+  varID3 = vlistDefVar(vlistID, gridID, zaxisID3, TSTEP_INSTANT);
+  varID4 = vlistDefVar(vlistID, gridID, zaxisID4, TSTEP_INSTANT);
 
   // Define the variable names
   vlistDefVarName(vlistID, varID1, "sp");
diff --git a/libcdi/examples/pio/Makefile.in b/libcdi/examples/pio/Makefile.in
index 90c57b1..3185123 100644
--- a/libcdi/examples/pio/Makefile.in
+++ b/libcdi/examples/pio/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -16,23 +15,51 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -57,7 +84,9 @@ noinst_PROGRAMS = collectData$(EXEEXT) collectDataNStreams$(EXEEXT) \
 @USE_MPI_TRUE at am__append_2 = $(FPP_DEFOPT)USE_MPI
 @USE_FC_TRUE at am__append_3 = collectData2003
 subdir = examples/pio
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs \
+	$(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -88,6 +117,10 @@ collectData_LDADD = $(LDADD)
 @USE_MPI_TRUE at collectData_DEPENDENCIES =  \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdipio.la \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdi.la
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
 am_collectData2003_OBJECTS = collectData2003.$(OBJEXT)
 collectData2003_OBJECTS = $(am_collectData2003_OBJECTS)
 collectData2003_LDADD = $(LDADD)
@@ -112,28 +145,58 @@ compareResourcesArray_LDADD = $(LDADD)
 @USE_MPI_TRUE at compareResourcesArray_DEPENDENCIES =  \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdipio.la \
 @USE_MPI_TRUE@	$(top_builddir)/src/libcdi.la
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_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
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_FCFLAGS) $(FCFLAGS)
+AM_V_PPFC = $(am__v_PPFC_ at AM_V@)
+am__v_PPFC_ = $(am__v_PPFC_ at AM_DEFAULT_V@)
+am__v_PPFC_0 = @echo "  PPFC    " $@;
+am__v_PPFC_1 = 
 FCLD = $(FC)
-FCLINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_FCLD_ = $(am__v_FCLD_ at AM_DEFAULT_V@)
+am__v_FCLD_0 = @echo "  FCLD    " $@;
+am__v_FCLD_1 = 
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(collectData_SOURCES) $(collectData2003_SOURCES) \
 	$(collectDataNStreams_SOURCES) \
 	$(compareResourcesArray_SOURCES)
@@ -145,11 +208,29 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -355,9 +436,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/pio/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/pio/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu examples/pio/Makefile
+	  $(AUTOMAKE) --foreign examples/pio/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -385,18 +466,22 @@ clean-noinstPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
+
 collectData$(EXEEXT): $(collectData_OBJECTS) $(collectData_DEPENDENCIES) $(EXTRA_collectData_DEPENDENCIES) 
 	@rm -f collectData$(EXEEXT)
-	$(LINK) $(collectData_OBJECTS) $(collectData_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(collectData_OBJECTS) $(collectData_LDADD) $(LIBS)
+
 collectData2003$(EXEEXT): $(collectData2003_OBJECTS) $(collectData2003_DEPENDENCIES) $(EXTRA_collectData2003_DEPENDENCIES) 
 	@rm -f collectData2003$(EXEEXT)
-	$(FCLINK) $(collectData2003_OBJECTS) $(collectData2003_LDADD) $(LIBS)
+	$(AM_V_FCLD)$(FCLINK) $(collectData2003_OBJECTS) $(collectData2003_LDADD) $(LIBS)
+
 collectDataNStreams$(EXEEXT): $(collectDataNStreams_OBJECTS) $(collectDataNStreams_DEPENDENCIES) $(EXTRA_collectDataNStreams_DEPENDENCIES) 
 	@rm -f collectDataNStreams$(EXEEXT)
-	$(LINK) $(collectDataNStreams_OBJECTS) $(collectDataNStreams_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(collectDataNStreams_OBJECTS) $(collectDataNStreams_LDADD) $(LIBS)
+
 compareResourcesArray$(EXEEXT): $(compareResourcesArray_OBJECTS) $(compareResourcesArray_DEPENDENCIES) $(EXTRA_compareResourcesArray_DEPENDENCIES) 
 	@rm -f compareResourcesArray$(EXEEXT)
-	$(LINK) $(compareResourcesArray_OBJECTS) $(compareResourcesArray_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(compareResourcesArray_OBJECTS) $(compareResourcesArray_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -409,34 +494,34 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/compareResourcesArray.Po at am__quote@
 
 .F90.o:
-	$(PPFCCOMPILE) -c -o $@ $<
+	$(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $<
 
 .F90.obj:
-	$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .F90.lo:
-	$(LTPPFCCOMPILE) -c -o $@ $<
+	$(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $<
 
 .c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -444,26 +529,15 @@ mostlyclean-libtool:
 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)
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -475,15 +549,11 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$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; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -492,6 +562,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -633,18 +718,19 @@ uninstall-am:
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstPROGRAMS 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
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+	ctags-am 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 tags-am uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libcdi/examples/pio/collectData.c b/libcdi/examples/pio/collectData.c
index 9bda63b..bd0905d 100644
--- a/libcdi/examples/pio/collectData.c
+++ b/libcdi/examples/pio/collectData.c
@@ -2,19 +2,23 @@
 #  include "config.h"
 #endif
 
+#include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #ifdef USE_MPI
 #include <unistd.h>
 #include <mpi.h>
 #include <yaxt.h>
+
+#include "pio_util.h"
 #else
 typedef int MPI_Comm;
 #define MPI_COMM_NULL 0
 #endif
 
 #include "cdi.h"
-#include "pio_util.h"
+#include "error.h"
 
 #ifdef USE_MPI
 #include "cdipio.h"
@@ -124,21 +128,17 @@ static void modelRun(MPI_Comm commModel)
 	  for ( i = 0; i < nVars; i++ )
 	    {
 #ifdef USE_MPI
-              int start = varDeco[i].start;
               int chunk = varDeco[i].chunkSize;
 #else
               int chunk = varSize[i];
-              int start = 0;
 #endif
 	      for (j = 0; j < chunk; ++j) var[j] = 2.2;
 #ifdef USE_MPI
               streamWriteVarPart(streamID, varID[i], var, nmiss,
                                  varDeco[i].partDesc);
 #else
-	      streamWriteVar ( streamID, varID[i], &var[start], nmiss );
+	      streamWriteVar ( streamID, varID[i], var, nmiss );
 #endif
-	      start = CDI_UNDEFID;
-	      chunk = CDI_UNDEFID;
 	    }
 #ifdef USE_MPI
 	  pioWriteTimestep();
diff --git a/libcdi/examples/pio/collectDataNStreams.c b/libcdi/examples/pio/collectDataNStreams.c
index 20f6266..c4b0cf9 100644
--- a/libcdi/examples/pio/collectDataNStreams.c
+++ b/libcdi/examples/pio/collectDataNStreams.c
@@ -2,6 +2,9 @@
 #  include "config.h"
 #endif
 
+#include <stdio.h>
+#include <string.h>
+
 #ifdef USE_MPI
 #include <mpi.h>
 #else
@@ -10,10 +13,11 @@ typedef int MPI_Comm;
 #endif
 
 #include "cdi.h"
-#include "pio_util.h"
+#include "error.h"
 
 #ifdef USE_MPI
 #include "cdipio.h"
+#include "pio_util.h"
 #endif
 
 static void hoursPassingHack ( int * vdate, int * vtime, int hoursPassed )
@@ -51,8 +55,8 @@ static void modelRun(MPI_Comm commModel)
   static int nlev[nStreams][nVars] =
     {{1,1,5,5,2},{3,5,2,2,1},{3,5,2,2,1},{5,2,2,2,1}, {3,3,3,3,3}};
 
-  static char nameExp[7]           = "example";
-  static int asciiA                = 65;
+  static char nameExp[] = "example";
+  static int asciiA     = 65;
   char filename[1024];
 
   int gridID, zaxisID[nStreams][nVars], taxisID;
@@ -126,7 +130,7 @@ static void modelRun(MPI_Comm commModel)
           maxChunkSize = varSize[i][j];
 #endif
       }
-    var = malloc(maxChunkSize * sizeof (var[0]));
+    var = (double*) malloc(maxChunkSize * sizeof (var[0]));
   }
   taxisID = taxisCreate ( TAXIS_ABSOLUTE );
   for ( i = 0; i < nStreams; i++ )
@@ -217,7 +221,6 @@ static void modelRun(MPI_Comm commModel)
       zaxisDestroy ( zaxisID[i][j] );
   gridDestroy ( gridID );
   free(var);
-  xdebug("%s", "RETURN");
 }
 
 
diff --git a/libcdi/interfaces/Makefile.in b/libcdi/interfaces/Makefile.in
index be51760..a8f81b0 100644
--- a/libcdi/interfaces/Makefile.in
+++ b/libcdi/interfaces/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -63,7 +90,9 @@ noinst_PROGRAMS = $(am__EXEEXT_1)
 # =========================================================
 @ENABLE_PYTHON_TRUE at am__append_5 = pythonObj
 subdir = interfaces
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs \
+	$(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -87,7 +116,11 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
 libcdipp_la_DEPENDENCIES = $(top_builddir)/src/libcdi.la
 am_libcdipp_la_OBJECTS = cdi.lo
 libcdipp_la_OBJECTS = $(am_libcdipp_la_OBJECTS)
-libcdipp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libcdipp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
 	$(CXXFLAGS) $(libcdipp_la_LDFLAGS) $(LDFLAGS) -o $@
 @CREATE_INTERFACES_TRUE at am_libcdipp_la_rpath =
@@ -97,31 +130,61 @@ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
 am_CdiInfo_OBJECTS = CdiInfo.$(OBJEXT)
 CdiInfo_OBJECTS = $(am_CdiInfo_OBJECTS)
 CdiInfo_DEPENDENCIES = libcdipp.la
-CdiInfo_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
-	$(CdiInfo_LDFLAGS) $(LDFLAGS) -o $@
+CdiInfo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(CdiInfo_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_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) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(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_ at AM_V@)
+am__v_CXX_ = $(am__v_CXX_ at AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
 CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_ at AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(libcdipp_la_SOURCES) $(CdiInfo_SOURCES)
 DIST_SOURCES = $(libcdipp_la_SOURCES) $(CdiInfo_SOURCES)
 am__can_run_installinfo = \
@@ -129,11 +192,29 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -356,9 +437,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu interfaces/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign interfaces/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu interfaces/Makefile
+	  $(AUTOMAKE) --foreign interfaces/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -380,14 +461,17 @@ $(am__aclocal_m4_deps):
 
 clean-noinstLTLIBRARIES:
 	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
+	@list='$(noinst_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
 libcdipp.la: $(libcdipp_la_OBJECTS) $(libcdipp_la_DEPENDENCIES) $(EXTRA_libcdipp_la_DEPENDENCIES) 
-	$(libcdipp_la_LINK) $(am_libcdipp_la_rpath) $(libcdipp_la_OBJECTS) $(libcdipp_la_LIBADD) $(LIBS)
+	$(AM_V_CXXLD)$(libcdipp_la_LINK) $(am_libcdipp_la_rpath) $(libcdipp_la_OBJECTS) $(libcdipp_la_LIBADD) $(LIBS)
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -397,10 +481,12 @@ install-binPROGRAMS: $(bin_PROGRAMS)
 	fi; \
 	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; \
+	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|.*|.|' \
+	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 } \
@@ -421,7 +507,8 @@ uninstall-binPROGRAMS:
 	@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)/' `; \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
 	test -n "$$list" || exit 0; \
 	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
 	cd "$(DESTDIR)$(bindir)" && rm -f $$files
@@ -443,9 +530,10 @@ clean-noinstPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
+
 CdiInfo$(EXEEXT): $(CdiInfo_OBJECTS) $(CdiInfo_DEPENDENCIES) $(EXTRA_CdiInfo_DEPENDENCIES) 
 	@rm -f CdiInfo$(EXEEXT)
-	$(CdiInfo_LINK) $(CdiInfo_OBJECTS) $(CdiInfo_LDADD) $(LIBS)
+	$(AM_V_CXXLD)$(CdiInfo_LINK) $(CdiInfo_OBJECTS) $(CdiInfo_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -457,25 +545,25 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdi.Plo at am__quote@
 
 .cpp.o:
- at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXXCOMPILE) -c -o $@ $<
 
 .cpp.obj:
- at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .cpp.lo:
- at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -483,26 +571,15 @@ mostlyclean-libtool:
 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)
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -514,15 +591,11 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$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; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -531,6 +604,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -676,20 +764,20 @@ uninstall-am: uninstall-binPROGRAMS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool clean-noinstLTLIBRARIES \
-	clean-noinstPROGRAMS 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
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libtool \
+	clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscopelist-am \
+	ctags ctags-am 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 tags-am uninstall uninstall-am uninstall-binPROGRAMS
 
 # Ruby ====================================================
 @ENABLE_RUBY_TRUE at rubyLibMakefile:
diff --git a/libcdi/interfaces/cdi.cpp b/libcdi/interfaces/cdi.cpp
index a8381a3..70c12d8 100644
--- a/libcdi/interfaces/cdi.cpp
+++ b/libcdi/interfaces/cdi.cpp
@@ -4,7 +4,13 @@
 #include <vector>
 #include <map>
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 #include "cdi.h"
+#if defined (__cplusplus)
+}
+#endif
 #include "cdi.hpp"
 
 /*
diff --git a/libcdi/m4/acx_options.m4 b/libcdi/m4/acx_options.m4
index aecd012..5cea626 100644
--- a/libcdi/m4/acx_options.m4
+++ b/libcdi/m4/acx_options.m4
@@ -142,7 +142,7 @@ ENABLE_NETCDF=no
 ENABLE_NC2=no
 ENABLE_NC4=no
 AC_ARG_WITH([netcdf],
-            [AS_HELP_STRING([--with-netcdf=<yes|no|directory> (default=yes)],[location of netcdf library (lib and include subdirs)])],
+            [AS_HELP_STRING([--with-netcdf=<yes|no|directory> (default=no)],[location of netcdf library (lib and include subdirs)])],
             [AS_CASE(["$with_netcdf"],
                      [no],[AC_MSG_CHECKING([for netcdf library])
                            AC_MSG_RESULT([suppressed])],
diff --git a/libcdi/m4/libtool.m4 b/libcdi/m4/libtool.m4
index d812584..44e0ecf 100644
--- a/libcdi/m4/libtool.m4
+++ b/libcdi/m4/libtool.m4
@@ -1,8 +1,8 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -11,8 +11,8 @@
 
 m4_define([_LT_COPYING], [dnl
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -637,7 +639,7 @@ 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) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
@@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],			[_LT_LANG(C)],
   [C++],		[_LT_LANG(CXX)],
+  [Go],			[_LT_LANG(GO)],
   [Java],		[_LT_LANG(GCJ)],
   [Fortran 77],		[_LT_LANG(F77)],
   [Fortran],		[_LT_LANG(FC)],
@@ -822,6 +825,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	$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
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	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
@@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	[lt_cv_ld_exported_symbols_list=no])
 	LDFLAGS="$save_LDFLAGS"
     ])
+
     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
       [lt_cv_ld_force_load=no
       cat > conftest.c << _LT_EOF
@@ -990,7 +1030,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1035,8 +1077,8 @@ _LT_EOF
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
   else
     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   fi
@@ -1330,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*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" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -1414,13 +1471,13 @@ 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 -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -1600,6 +1657,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   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
@@ -1639,7 +1701,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
@@ -2185,7 +2247,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -2194,7 +2256,7 @@ aix3*)
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -2259,7 +2321,7 @@ beos*)
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -2398,7 +2460,7 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -2406,10 +2468,6 @@ dgux*)
   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.
@@ -2417,7 +2475,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -2435,7 +2493,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2455,17 +2513,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -2526,7 +2585,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[[3-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -2542,7 +2601,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -2579,9 +2638,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2644,7 +2703,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -2713,7 +2772,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2738,7 +2797,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -2762,7 +2821,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -2793,7 +2852,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2803,7 +2862,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -3225,7 +3284,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3645,6 +3704,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -4229,7 +4289,9 @@ m4_if([$1], [CXX], [
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
       ;;
     esac
   else
@@ -4321,18 +4383,33 @@ m4_if([$1], [CXX], [
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
 	  # 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)=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  _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 '
+	  ;;
 	*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,'
 	  ;;
+        *Intel*\ [[CF]]*Compiler*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	  ;;
+	*Portland\ Group*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -4492,7 +4569,9 @@ m4_if([$1], [CXX], [
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*) ;;
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
     *)
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
@@ -4517,7 +4596,6 @@ m4_if([$1], [CXX], [
   _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
@@ -4768,8 +4846,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # 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(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_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~
@@ -5064,6 +5141,7 @@ _LT_EOF
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	_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'
 	# Don't use ranlib
 	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
@@ -5110,10 +5188,6 @@ _LT_EOF
       _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
@@ -5126,7 +5200,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    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
@@ -5165,7 +5239,6 @@ _LT_EOF
       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
@@ -5607,9 +5680,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _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],
@@ -5767,7 +5837,6 @@ _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
@@ -6137,7 +6206,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6898,12 +6967,18 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
 ])
 
 _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 esac
 
 dnl Parse the compiler output and extract the necessary
@@ -7100,7 +7175,6 @@ _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
@@ -7233,7 +7307,6 @@ _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
@@ -7420,6 +7493,77 @@ CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# 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_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go 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
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## 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...
+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
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
@@ -7489,6 +7633,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
diff --git a/libcdi/m4/ltoptions.m4 b/libcdi/m4/ltoptions.m4
index 17cfd51..5d9acd8 100644
--- a/libcdi/m4/ltoptions.m4
+++ b/libcdi/m4/ltoptions.m4
@@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # 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],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
     [pic_mode=default])
 
 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
diff --git a/libcdi/src/Makefile.am b/libcdi/src/Makefile.am
index 4d17f8f..2e66f53 100644
--- a/libcdi/src/Makefile.am
+++ b/libcdi/src/Makefile.am
@@ -37,8 +37,6 @@ libcdi_la_SOURCES = 	 \
 	cksum.h		\
 	cdi_cksum.c	\
 	cdi_cksum.h	\
-	pio_util.c							\
-	pio_util.h							\
 	dtypes.h	 \
 	error.c        	 \
 	error.h	 	 \
@@ -145,6 +143,8 @@ libcdipio_la_SOURCES =							\
 	pio_server.h							\
 	pio_serialize.h							\
 	pio_serialize.c							\
+	pio_util.c							\
+	pio_util.h							\
 	pio_cdf_int.c							\
 	pio_cdf_int.h
 
@@ -169,18 +169,15 @@ endif
 endif
 
 if CREATE_ISOC
-LOCALTARGETS += mo_cdi.o mo_cdi.$(FCMODEXT)
+LOCALTARGETS += mo_cdi.$(OBJEXT)
 endif
 #
 mo_cdi.f90: $(top_srcdir)/src/cdi.h
 	ruby $(top_srcdir)/interfaces/f2003/bindGen.rb $(top_srcdir)/src/cdi.h $@
 #
-mo_cdi.o: mo_cdi.f90
+mo_cdi.$(OBJEXT): mo_cdi.f90
 	$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
 #
-mo_cdi.$(FCMODEXT): mo_cdi.f90
-	$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
-
 pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status
 	(cd .. ; ./config.status src/pkgconfig/cdi.pc)
 
@@ -192,7 +189,7 @@ all-local: $(LOCALTARGETS)
 CLEANFILES  = `ls *~`
 #CLEANFILES += cdilib.c
 if CREATE_ISOC
-CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
+CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.$(OBJEXT)
 endif
 
 if ENABLE_CDI_LIB
diff --git a/libcdi/src/Makefile.in b/libcdi/src/Makefile.in
index 46d95e8..3e7517a 100644
--- a/libcdi/src/Makefile.in
+++ b/libcdi/src/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -57,15 +84,16 @@ host_triplet = @host@
 @ENABLE_CDI_LIB_FALSE@@USE_MPI_TRUE at am__append_3 = libcdipio.la
 @ENABLE_CDI_LIB_TRUE at am__append_4 = pkgconfig/cdi.pc
 @ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE at am__append_5 = pkgconfig/cdipio.pc
- at CREATE_ISOC_TRUE@am__append_6 = mo_cdi.o mo_cdi.$(FCMODEXT)
+ at CREATE_ISOC_TRUE@am__append_6 = mo_cdi.$(OBJEXT)
 #CLEANFILES += cdilib.c
- at CREATE_ISOC_TRUE@am__append_7 = $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
+ at CREATE_ISOC_TRUE@am__append_7 = $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.$(OBJEXT)
 @ENABLE_CDI_LIB_TRUE at am__append_8 = pkgconfig/cdi.pc
 @ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE at am__append_9 = pkgconfig/cdipio.pc
 @ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE at am__append_10 = pkgconfig/cdipio.pc
 subdir = src
-DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/config.h.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/config.h.in $(top_srcdir)/config/mkinstalldirs \
+	$(top_srcdir)/config/depcomp $(am__include_HEADERS_DIST)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -117,9 +145,9 @@ LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 libcdi_la_DEPENDENCIES =
 am_libcdi_la_OBJECTS = basetime.lo binary.lo calendar.lo cdf.lo \
 	cdf_int.lo cdi_error.lo cdi_util.lo cdiFortran.lo \
-	cgribexlib.lo dmemory.lo cksum.lo cdi_cksum.lo pio_util.lo \
-	error.lo extralib.lo file.lo gaussgrid.lo gribapi.lo grid.lo \
-	ieglib.lo institution.lo model.lo namespace.lo serialize.lo \
+	cgribexlib.lo dmemory.lo cksum.lo cdi_cksum.lo error.lo \
+	extralib.lo file.lo gaussgrid.lo gribapi.lo grid.lo ieglib.lo \
+	institution.lo model.lo namespace.lo serialize.lo \
 	resource_handle.lo servicelib.lo stream_cdf.lo \
 	stream_cgribex.lo stream_ext.lo stream_grb.lo \
 	stream_gribapi.lo stream_history.lo stream_ieg.lo cdi_int.lo \
@@ -127,6 +155,10 @@ am_libcdi_la_OBJECTS = basetime.lo binary.lo calendar.lo cdf.lo \
 	timebase.lo tsteps.lo util.lo varscan.lo version.lo vlist.lo \
 	vlist_att.lo vlist_var.lo zaxis.lo stream.lo swap.lo
 libcdi_la_OBJECTS = $(am_libcdi_la_OBJECTS)
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
 @ENABLE_CDI_LIB_FALSE at am_libcdi_la_rpath =
 @ENABLE_CDI_LIB_TRUE at am_libcdi_la_rpath = -rpath $(libdir)
 am__DEPENDENCIES_1 =
@@ -137,24 +169,45 @@ am_libcdipio_la_OBJECTS = cdipioFortran.lo pio.lo pio_comm.lo \
 	pio_record_send.lo pio_posixasynch.lo \
 	pio_posixfpguardsendrecv.lo pio_posixnonb.lo pio_list_set.lo \
 	resource_unpack.lo pio_client.lo pio_server.lo \
-	pio_serialize.lo pio_cdf_int.lo
+	pio_serialize.lo pio_util.lo pio_cdf_int.lo
 libcdipio_la_OBJECTS = $(am_libcdipio_la_OBJECTS)
 @ENABLE_CDI_LIB_FALSE@@USE_MPI_TRUE at am_libcdipio_la_rpath =
 @ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE at am_libcdipio_la_rpath = -rpath \
 @ENABLE_CDI_LIB_TRUE@@USE_MPI_TRUE@	$(libdir)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = -I. at am__isrc@
 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(libcdi_la_SOURCES) $(libcdipio_la_SOURCES)
 DIST_SOURCES = $(libcdi_la_SOURCES) $(libcdipio_la_SOURCES)
 am__can_run_installinfo = \
@@ -164,11 +217,30 @@ am__can_run_installinfo = \
   esac
 am__include_HEADERS_DIST = cdi.h cdi.inc cdipio.h cdipio.inc
 HEADERS = $(include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+	$(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -385,8 +457,6 @@ libcdi_la_SOURCES = \
 	cksum.h		\
 	cdi_cksum.c	\
 	cdi_cksum.h	\
-	pio_util.c							\
-	pio_util.h							\
 	dtypes.h	 \
 	error.c        	 \
 	error.h	 	 \
@@ -484,6 +554,8 @@ libcdipio_la_SOURCES = \
 	pio_server.h							\
 	pio_serialize.h							\
 	pio_serialize.c							\
+	pio_util.c							\
+	pio_util.h							\
 	pio_cdf_int.c							\
 	pio_cdf_int.h
 
@@ -516,9 +588,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu src/Makefile
+	  $(AUTOMAKE) --foreign src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -539,8 +611,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-	@if test ! -f $@; then rm -f stamp-h1; else :; fi
-	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+	@test -f $@ || rm -f stamp-h1
+	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
@@ -552,6 +624,7 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 
 distclean-hdr:
 	-rm -f config.h stamp-h1
+
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
 	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
@@ -578,25 +651,31 @@ uninstall-libLTLIBRARIES:
 
 clean-libLTLIBRARIES:
 	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
 
 clean-noinstLTLIBRARIES:
 	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
+	@list='$(noinst_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
 libcdi.la: $(libcdi_la_OBJECTS) $(libcdi_la_DEPENDENCIES) $(EXTRA_libcdi_la_DEPENDENCIES) 
-	$(LINK) $(am_libcdi_la_rpath) $(libcdi_la_OBJECTS) $(libcdi_la_LIBADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(am_libcdi_la_rpath) $(libcdi_la_OBJECTS) $(libcdi_la_LIBADD) $(LIBS)
+
 libcdipio.la: $(libcdipio_la_OBJECTS) $(libcdipio_la_DEPENDENCIES) $(EXTRA_libcdipio_la_DEPENDENCIES) 
-	$(LINK) $(am_libcdipio_la_rpath) $(libcdipio_la_OBJECTS) $(libcdipio_la_LIBADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(am_libcdipio_la_rpath) $(libcdipio_la_OBJECTS) $(libcdipio_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -672,25 +751,25 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/zaxis.Plo at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -719,26 +798,15 @@ uninstall-includeHEADERS:
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
 
-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) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS) 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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -750,15 +818,11 @@ TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	      $$unique; \
 	  fi; \
 	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS) 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; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -767,6 +831,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -917,34 +996,31 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
 
 .MAKE: all install-am install-data-am install-exec-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
 	clean-generic clean-libLTLIBRARIES clean-libtool \
-	clean-noinstLTLIBRARIES ctags distclean distclean-compile \
-	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-data-hook install-dvi install-dvi-am install-exec \
-	install-exec-am install-exec-hook install-exec-local \
-	install-html install-html-am install-includeHEADERS \
-	install-info install-info-am install-libLTLIBRARIES \
-	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-libLTLIBRARIES \
-	uninstall-local
+	clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+	distclean-compile 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-data-hook install-dvi install-dvi-am \
+	install-exec install-exec-am install-exec-hook \
+	install-exec-local install-html install-html-am \
+	install-includeHEADERS install-info install-info-am \
+	install-libLTLIBRARIES 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 tags-am uninstall uninstall-am uninstall-includeHEADERS \
+	uninstall-libLTLIBRARIES uninstall-local
 
 #
 mo_cdi.f90: $(top_srcdir)/src/cdi.h
 	ruby $(top_srcdir)/interfaces/f2003/bindGen.rb $(top_srcdir)/src/cdi.h $@
 #
-mo_cdi.o: mo_cdi.f90
+mo_cdi.$(OBJEXT): mo_cdi.f90
 	$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
 #
-mo_cdi.$(FCMODEXT): mo_cdi.f90
-	$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
-
 pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status
 	(cd .. ; ./config.status src/pkgconfig/cdi.pc)
 
diff --git a/libcdi/src/basetime.c b/libcdi/src/basetime.c
index 005bb52..f42d2f9 100644
--- a/libcdi/src/basetime.c
+++ b/libcdi/src/basetime.c
@@ -11,7 +11,7 @@
 #undef  UNDEFID
 #define UNDEFID  CDI_UNDEFID
 
-void basetimeInit(BaseTime *basetime)
+void basetimeInit(basetime_t *basetime)
 {
   if ( basetime == NULL )
     Error("Internal problem! Basetime not allocated.");
@@ -19,6 +19,7 @@ void basetimeInit(BaseTime *basetime)
   (*basetime).ncvarid       = UNDEFID;
   (*basetime).ncdimid       = UNDEFID;
   (*basetime).ncvarboundsid = UNDEFID;
+  (*basetime).leadtimeid    = UNDEFID;
   (*basetime).lwrf          = 0;
 }
 /*
diff --git a/libcdi/src/basetime.h b/libcdi/src/basetime.h
index 92c6191..1bdc997 100644
--- a/libcdi/src/basetime.h
+++ b/libcdi/src/basetime.h
@@ -6,11 +6,12 @@ typedef struct {
   int   ncvarid;
   int   ncdimid;
   int   ncvarboundsid;
+  int   leadtimeid;
   int   lwrf;     /* TRUE for time axis in WRF format */
 }
-BaseTime;
+basetime_t;
 
-void basetimeInit(BaseTime *basetime);
+void basetimeInit(basetime_t *basetime);
 
 #endif  /* _BASETIME_H */
 /*
diff --git a/libcdi/src/cdf_int.c b/libcdi/src/cdf_int.c
index 18d8cab..3f42f13 100644
--- a/libcdi/src/cdf_int.c
+++ b/libcdi/src/cdf_int.c
@@ -84,7 +84,7 @@ int cdf_open(const char *path, int omode, int *ncidp)
   size_t chunksizehint = 0;
 
 #if  defined  (HAVE_LIBNC_DAP)
-  if ( memcmp(path, "http:", 5) == 0 ) dapfile = TRUE;
+  if ( strncmp(path, "http:", 5) == 0 || strncmp(path, "https:", 6) == 0 ) dapfile = TRUE;
 #endif
 
   if ( dapfile )
@@ -148,6 +148,20 @@ void cdf_enddef(int ncid)
 }
 
 
+void cdf__enddef(const int ncid, const size_t hdr_pad)
+{
+  int status;
+  const size_t v_align   = 4UL; /* [B] Alignment of beginning of data section for fixed variables */
+  const size_t v_minfree = 0UL; /* [B] Pad at end of data section for fixed size variables */
+  const size_t r_align   = 4UL; /* [B] Alignment of beginning of data section for record variables */
+
+  /* nc_enddef(ncid) is equivalent to nc__enddef(ncid, 0, 4, 0, 4) */
+  status = nc__enddef(ncid, hdr_pad, v_align, v_minfree, r_align);
+
+  if ( status != NC_NOERR ) Error("%s", nc_strerror(status));
+}
+
+
 void cdf_sync(int ncid)
 {
   int status;
diff --git a/libcdi/src/cdf_int.h b/libcdi/src/cdf_int.h
index fa29c29..e73166f 100644
--- a/libcdi/src/cdf_int.h
+++ b/libcdi/src/cdf_int.h
@@ -10,9 +10,10 @@ void cdf_create (const char *path, int cmode, int *idp);
 int  cdf_open   (const char *path, int omode, int *idp);
 void cdf_close  (int ncid);
 
-void cdf_redef (int ncid);
-void cdf_enddef (int ncid);
-void cdf_sync (int ncid);
+void cdf_redef(int ncid);
+void cdf_enddef(int ncid);
+void cdf__enddef(const int ncid, const size_t hdr_pad);
+void cdf_sync(int ncid);
 
 void cdf_inq (int ncid, int *ndimsp, int *nvarsp, int *ngattsp, int *unlimdimidp);
 
diff --git a/libcdi/src/cdi.h b/libcdi/src/cdi.h
index 4bdc195..035720b 100644
--- a/libcdi/src/cdi.h
+++ b/libcdi/src/cdi.h
@@ -8,11 +8,11 @@
 #define  CDI_H_
 
 #include <sys/types.h>
-
+/*
 #if defined(__cplusplus)
 extern "C" {
 #endif
-
+*/
 #define  CDI_MAX_NAME           256   /* max length of a name                 */
 
 #define  CDI_UNDEFID             -1
@@ -191,6 +191,7 @@ extern "C" {
 
 #define  TAXIS_ABSOLUTE           1
 #define  TAXIS_RELATIVE           2
+#define  TAXIS_FORECAST           3
 
 /* TUNIT types */
 
@@ -277,6 +278,7 @@ void    streamDefVlist(int streamID, int vlistID);
 
 /*      streamInqVlist: Get the Vlist of a stream */
 int     streamInqVlist(int streamID);
+/*      PIO: */
 int     streamInqVlistIDorig(int streamID);
 
 /*      streamInqFiletype: Get the filetype */
@@ -291,24 +293,24 @@ int     streamInqByteorder(int streamID);
 /*      streamDefCompType: Define compression type */
 void    streamDefCompType(int streamID, int comptype);
 
-/*      streamDefCompLevel: Define compression level */
-void    streamDefCompLevel(int streamID, int complevel);
-
 /*      streamInqCompType: Get compression type */
 int     streamInqCompType(int streamID);
 
+/*      streamDefCompLevel: Define compression level */
+void    streamDefCompLevel(int streamID, int complevel);
+
 /*      streamInqCompLevel: Get compression level */
 int     streamInqCompLevel(int streamID);
 
 /*      streamDefTimestep: Define time step */
 int     streamDefTimestep(int streamID, int tsID);
 
-/* query currently set timestep id  */
-int streamInqCurTimestepID(int streamID);
-
 /*      streamInqTimestep: Get time step */
 int     streamInqTimestep(int streamID, int tsID);
 
+/*      PIO: query currently set timestep id  */
+int     streamInqCurTimestepID(int streamID);
+
 char   *streamFilename(int streamID);
 char   *streamFilesuffix(int filetype);
 int     streamNtsteps(int streamID);
@@ -318,31 +320,31 @@ int     streamInqNvars ( int streamID );
 
 /* STREAM var I/O routines */
 
-/*      streamReadVar: Read a variable */
-void    streamReadVar(int streamID, int varID, double *data_vec, int *nmiss);
-
 /*      streamWriteVar: Write a variable */
 void    streamWriteVar(int streamID, int varID, const double *data_vec, int nmiss);
 void    streamWriteVarF(int streamID, int varID, const float *data_vec, int nmiss);
 
-/*      streamReadVarSlice: Read a horizontal slice of a variable */
-void    streamReadVarSlice(int streamID, int varID, int levelID, double *data_vec, int *nmiss);
+/*      streamReadVar: Read a variable */
+void    streamReadVar(int streamID, int varID, double *data_vec, int *nmiss);
 
 /*      streamWriteVarSlice: Write a horizontal slice of a variable */
 void    streamWriteVarSlice(int streamID, int varID, int levelID, const double *data_vec, int nmiss);
 void    streamWriteVarSliceF(int streamID, int varID, int levelID, const float *data_vec, int nmiss);
 
+/*      streamReadVarSlice: Read a horizontal slice of a variable */
+void    streamReadVarSlice(int streamID, int varID, int levelID, double *data_vec, int *nmiss);
+
 void    streamWriteVarChunk(int streamID, int varID, const int rect[][2],
                             const double *data_vec, int nmiss);
 
 
 /* STREAM record I/O routines */
 
-void    streamInqRecord(int streamID, int *varID, int *levelID);
 void    streamDefRecord(int streamID, int  varID, int  levelID);
-void    streamReadRecord(int streamID, double *data_vec, int *nmiss);
+void    streamInqRecord(int streamID, int *varID, int *levelID);
 void    streamWriteRecord(int streamID, const double *data_vec, int nmiss);
 void    streamWriteRecordF(int streamID, const float *data_vec, int nmiss);
+void    streamReadRecord(int streamID, double *data_vec, int *nmiss);
 void    streamCopyRecord(int streamIDdest, int streamIDsrc);
 
 void    streamInqGinfo(int streamID, int *intnum, float *fltnum, off_t *bignum);
@@ -428,8 +430,8 @@ int     vlistInqVarZaxis(int vlistID, int varID);
 /* used in MPIOM */
 int     vlistInqVarID(int vlistID, int code);
 
-int     vlistInqVarTsteptype(int vlistID, int varID);
 void    vlistDefVarTsteptype(int vlistID, int varID, int tsteptype);
+int     vlistInqVarTsteptype(int vlistID, int varID);
 
 void    vlistDefVarCompType(int vlistID, int varID, int comptype);
 int     vlistInqVarCompType(int vlistID, int varID);
@@ -577,7 +579,7 @@ int     vlistInqAttTxt(int vlistID, int varID, const char *name, int mlen, char
 /* GRID routines */
 
 void    gridName(int gridtype, char *gridname);
-char   *gridNamePtr(int gridtype);
+const char *gridNamePtr(int gridtype);
 
 void    gridCompress(int gridID);
 
@@ -637,45 +639,45 @@ int     gridInqYvals(int gridID, double *yvals_vec);
 /*      gridDefXname: Define the name of a X-axis */
 void    gridDefXname(int gridID, const char *xname);
 
+/*      gridInqXname: Get the name of a X-axis */
+void    gridInqXname(int gridID, char *xname);
+
 /*      gridDefXlongname: Define the longname of a X-axis  */
 void    gridDefXlongname(int gridID, const char *xlongname);
 
+/*      gridInqXlongname: Get the longname of a X-axis */
+void    gridInqXlongname(int gridID, char *xlongname);
+
 /*      gridDefXunits: Define the units of a X-axis */
 void    gridDefXunits(int gridID, const char *xunits);
 
+/*      gridInqXunits: Get the units of a X-axis */
+void    gridInqXunits(int gridID, char *xunits);
+
 /*      gridDefYname: Define the name of a Y-axis */
 void    gridDefYname(int gridID, const char *yname);
 
+/*      gridInqYname: Get the name of a Y-axis */
+void    gridInqYname(int gridID, char *yname);
+
 /*      gridDefYlongname: Define the longname of a Y-axis */
 void    gridDefYlongname(int gridID, const char *ylongname);
 
+/*      gridInqYlongname: Get the longname of a Y-axis */
+void    gridInqYlongname(int gridID, char *ylongname);
+
 /*      gridDefYunits: Define the units of a Y-axis */
 void    gridDefYunits(int gridID, const char *yunits);
 
-/*      gridInqXname: Get the name of a X-axis */
-void    gridInqXname(int gridID, char *xname);
-
-/*      gridInqXlongname: Get the longname of a X-axis */
-void    gridInqXlongname(int gridID, char *xlongname);
+/*      gridInqYunits: Get the units of a Y-axis */
+void    gridInqYunits(int gridID, char *yunits);
 
 /*      gridInqXstdname: Get the standard name of a X-axis */
 void    gridInqXstdname(int gridID, char *xstdname);
 
-/*      gridInqXunits: Get the units of a X-axis */
-void    gridInqXunits(int gridID, char *xunits);
-
-/*      gridInqYname: Get the name of a Y-axis */
-void    gridInqYname(int gridID, char *yname);
-
-/*      gridInqYlongname: Get the longname of a Y-axis */
-void    gridInqYlongname(int gridID, char *ylongname);
-
 /*      gridInqYstdname: Get the standard name of a Y-axis */
 void    gridInqYstdname(int gridID, char *ystdname);
 
-/*      gridInqYunits: Get the units of a Y-axis */
-void    gridInqYunits(int gridID, char *yunits);
-
 /*      gridDefPrec: Define the precision of a Grid */
 void    gridDefPrec(int gridID, int prec);
 
@@ -693,23 +695,23 @@ double  gridInqYinc(int gridID);
 
 int     gridIsCircular(int gridID);
 int     gridIsRotated(int gridID);
-double  gridInqXpole(int gridID);
 void    gridDefXpole(int gridID, double xpole);
-double  gridInqYpole(int gridID);
+double  gridInqXpole(int gridID);
 void    gridDefYpole(int gridID, double ypole);
-double  gridInqAngle(int gridID);
+double  gridInqYpole(int gridID);
 void    gridDefAngle(int gridID, double angle);
-void    gridDefTrunc(int gridID, int trunc);
+double  gridInqAngle(int gridID);
 int     gridInqTrunc(int gridID);
+void    gridDefTrunc(int gridID, int trunc);
 /* Hexagonal GME grid */
-int     gridInqGMEnd(int gridID);
 void    gridDefGMEnd(int gridID, int nd);
-int     gridInqGMEni(int gridID);
+int     gridInqGMEnd(int gridID);
 void    gridDefGMEni(int gridID, int ni);
-int     gridInqGMEni2(int gridID);
+int     gridInqGMEni(int gridID);
 void    gridDefGMEni2(int gridID, int ni2);
-int     gridInqGMEni3(int gridID);
+int     gridInqGMEni2(int gridID);
 void    gridDefGMEni3(int gridID, int ni3);
+int     gridInqGMEni3(int gridID);
 
 /* Reference of an unstructured grid */
 
@@ -836,24 +838,24 @@ void    zaxisInqUUID(int zaxisID, char *uuid_cbuf);
 /*      zaxisDefName: Define the name of a Z-axis */
 void    zaxisDefName(int zaxisID, const char *name);
 
-/*      zaxisDefLongname: Define the longname of a Z-axis */
-void    zaxisDefLongname(int zaxisID, const char *longname);
-
-/*      zaxisDefUnits: Define the units of a Z-axis */
-void    zaxisDefUnits(int zaxisID, const char *units);
-
 /*      zaxisInqName: Get the name of a Z-axis */
 void    zaxisInqName(int zaxisID, char *name);
 
+/*      zaxisDefLongname: Define the longname of a Z-axis */
+void    zaxisDefLongname(int zaxisID, const char *longname);
+
 /*      zaxisInqLongname: Get the longname of a Z-axis */
 void    zaxisInqLongname(int zaxisID, char *longname);
 
-/*      zaxisInqStdname: Get the standard name of a Z-axis */
-void    zaxisInqStdname(int zaxisID, char *stdname);
+/*      zaxisDefUnits: Define the units of a Z-axis */
+void    zaxisDefUnits(int zaxisID, const char *units);
 
 /*      zaxisInqUnits: Get the units of a Z-axis */
 void    zaxisInqUnits(int zaxisID, char *units);
 
+/*      zaxisInqStdname: Get the standard name of a Z-axis */
+void    zaxisInqStdname(int zaxisID, char *stdname);
+
 void    zaxisDefPrec(int zaxisID, int prec);
 int     zaxisInqPrec(int zaxisID);
 
@@ -868,14 +870,14 @@ void    zaxisDefVct(int zaxisID, int size, const double *vct_vec);
 void    zaxisInqVct(int zaxisID, double *vct_vec);
 int     zaxisInqVctSize(int zaxisID);
 const double *zaxisInqVctPtr(int zaxisID);
+void    zaxisDefLbounds(int zaxisID, const double *lbounds_vec);
 int     zaxisInqLbounds(int zaxisID, double *lbounds_vec);
-int     zaxisInqUbounds(int zaxisID, double *ubounds_vec);
-int     zaxisInqWeights(int zaxisID, double *weights_vec);
 double  zaxisInqLbound(int zaxisID, int index);
-double  zaxisInqUbound(int zaxisID, int index);
-void    zaxisDefLbounds(int zaxisID, const double *lbounds_vec);
 void    zaxisDefUbounds(int zaxisID, const double *ubounds_vec);
+int     zaxisInqUbounds(int zaxisID, double *ubounds_vec);
+double  zaxisInqUbound(int zaxisID, int index);
 void    zaxisDefWeights(int zaxisID, const double *weights_vec);
+int     zaxisInqWeights(int zaxisID, double *weights_vec);
 void    zaxisChangeType(int zaxisID, int zaxistype);
 
 /* TAXIS routines */
@@ -898,12 +900,36 @@ void    taxisDefVdate(int taxisID, int date);
 /*      taxisDefVtime: Define the verification time */
 void    taxisDefVtime(int taxisID, int time);
 
+/*      taxisInqVdate: Get the verification date */
+int     taxisInqVdate(int taxisID);
+
+/*      taxisInqVtime: Get the verification time */
+int     taxisInqVtime(int taxisID);
+
 /*      taxisDefRdate: Define the reference date */
 void    taxisDefRdate(int taxisID, int date);
 
-/*      taxisDefRtime: Define the reference date */
+/*      taxisDefRtime: Define the reference time */
 void    taxisDefRtime(int taxisID, int time);
 
+/*      taxisInqRdate: Get the reference date */
+int     taxisInqRdate(int taxisID);
+
+/*      taxisInqRtime: Get the reference time */
+int     taxisInqRtime(int taxisID);
+
+/*      taxisDefFdate: Define the forecast reference date */
+void    taxisDefFdate(int taxisID, int date);
+
+/*      taxisDefFtime: Define the forecast reference time */
+void    taxisDefFtime(int taxisID, int time);
+
+/*      taxisInqFdate: Get the forecast reference date */
+int     taxisInqFdate(int taxisID);
+
+/*      taxisInqFtime: Get the forecast reference time */
+int     taxisInqFtime(int taxisID);
+
 int     taxisHasBounds(int taxisID);
 
 void    taxisDeleteBounds(int taxisID);
@@ -919,28 +945,21 @@ void    taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub);
 /*      taxisDefCalendar: Define the calendar */
 void    taxisDefCalendar(int taxisID, int calendar);
 
-void    taxisDefTunit(int taxisID, int tunit);
-
-void    taxisDefNumavg(int taxisID, int numavg);
-
-int     taxisInqType(int taxisID);
-
-/*      taxisInqVdate: Get the verification date */
-int     taxisInqVdate(int taxisID);
+/*      taxisInqCalendar: Get the calendar */
+int     taxisInqCalendar(int taxisID);
 
-/*      taxisInqVtime: Get the verification time */
-int     taxisInqVtime(int taxisID);
+void    taxisDefTunit(int taxisID, int tunit);
+int     taxisInqTunit(int taxisID);
 
-/*      taxisInqRdate: Get the reference date */
-int     taxisInqRdate(int taxisID);
+void    taxisDefForecastTunit(int taxisID, int tunit);
+int     taxisInqForecastTunit(int taxisID);
 
-/*      taxisInqRtime: Get the reference time */
-int     taxisInqRtime(int taxisID);
+void    taxisDefForecastPeriod(int taxisID, double fc_period);
+double  taxisInqForecastPeriod(int taxisID);
 
-/*      taxisInqCalendar: Get the calendar */
-int     taxisInqCalendar(int taxisID);
+void    taxisDefNumavg(int taxisID, int numavg);
 
-int     taxisInqTunit(int taxisID);
+int     taxisInqType(int taxisID);
 
 int     taxisInqNumavg(int taxisID);
 
@@ -998,10 +1017,11 @@ void    streamDefHistory(int streamID, int size, const char *history);
 int     streamInqHistorySize(int streamID);
 void    streamInqHistoryString(int streamID, char *history);
 
+/*
 #if defined (__cplusplus)
 }
 #endif
-
+*/
 #endif  /* CDI_H_ */
 /*
  * Local Variables:
diff --git a/libcdi/src/cdi.inc b/libcdi/src/cdi.inc
index 789a555..c6eb0f0 100644
--- a/libcdi/src/cdi.inc
+++ b/libcdi/src/cdi.inc
@@ -1,6 +1,6 @@
 ! This file was automatically generated, don't edit!
 !
-! Fortran interface for CDI library version 1.6.3
+! Fortran interface for CDI library version 1.6.4
 !
 ! Author:
 ! -------
@@ -325,6 +325,8 @@
       PARAMETER (TAXIS_ABSOLUTE         =  1)
       INTEGER    TAXIS_RELATIVE        
       PARAMETER (TAXIS_RELATIVE         =  2)
+      INTEGER    TAXIS_FORECAST        
+      PARAMETER (TAXIS_FORECAST         =  3)
 !
 !  TUNIT types
 !
@@ -2021,6 +2023,16 @@
 !                                     INTEGER         time)
       EXTERNAL        taxisDefRtime
 
+!                     taxisDefFdate
+!                                    (INTEGER         taxisID,
+!                                     INTEGER         date)
+      EXTERNAL        taxisDefFdate
+
+!                     taxisDefFtime
+!                                    (INTEGER         taxisID,
+!                                     INTEGER         time)
+      EXTERNAL        taxisDefFtime
+
       INTEGER         taxisHasBounds
 !                                    (INTEGER         taxisID)
       EXTERNAL        taxisHasBounds
@@ -2088,6 +2100,14 @@
 !                                    (INTEGER         taxisID)
       EXTERNAL        taxisInqRtime
 
+      INTEGER         taxisInqFdate
+!                                    (INTEGER         taxisID)
+      EXTERNAL        taxisInqFdate
+
+      INTEGER         taxisInqFtime
+!                                    (INTEGER         taxisID)
+      EXTERNAL        taxisInqFtime
+
       INTEGER         taxisInqCalendar
 !                                    (INTEGER         taxisID)
       EXTERNAL        taxisInqCalendar
diff --git a/libcdi/src/cdiFortran.c b/libcdi/src/cdiFortran.c
index 4abf9d9..b469d10 100644
--- a/libcdi/src/cdiFortran.c
+++ b/libcdi/src/cdiFortran.c
@@ -429,6 +429,8 @@ FCALLSCSUB2 (taxisDefVdate, TAXISDEFVDATE, taxisdefvdate, INT, INT)
 FCALLSCSUB2 (taxisDefVtime, TAXISDEFVTIME, taxisdefvtime, INT, INT)
 FCALLSCSUB2 (taxisDefRdate, TAXISDEFRDATE, taxisdefrdate, INT, INT)
 FCALLSCSUB2 (taxisDefRtime, TAXISDEFRTIME, taxisdefrtime, INT, INT)
+FCALLSCSUB2 (taxisDefFdate, TAXISDEFFDATE, taxisdeffdate, INT, INT)
+FCALLSCSUB2 (taxisDefFtime, TAXISDEFFTIME, taxisdefftime, INT, INT)
 FCALLSCFUN1 (INT, taxisHasBounds, TAXISHASBOUNDS, taxishasbounds, INT)
 FCALLSCSUB1 (taxisDeleteBounds, TAXISDELETEBOUNDS, taxisdeletebounds, INT)
 FCALLSCSUB3 (taxisDefVdateBounds, TAXISDEFVDATEBOUNDS, taxisdefvdatebounds, INT, INT, INT)
@@ -443,6 +445,8 @@ FCALLSCFUN1 (INT, taxisInqVdate, TAXISINQVDATE, taxisinqvdate, INT)
 FCALLSCFUN1 (INT, taxisInqVtime, TAXISINQVTIME, taxisinqvtime, INT)
 FCALLSCFUN1 (INT, taxisInqRdate, TAXISINQRDATE, taxisinqrdate, INT)
 FCALLSCFUN1 (INT, taxisInqRtime, TAXISINQRTIME, taxisinqrtime, INT)
+FCALLSCFUN1 (INT, taxisInqFdate, TAXISINQFDATE, taxisinqfdate, INT)
+FCALLSCFUN1 (INT, taxisInqFtime, TAXISINQFTIME, taxisinqftime, INT)
 FCALLSCFUN1 (INT, taxisInqCalendar, TAXISINQCALENDAR, taxisinqcalendar, INT)
 FCALLSCFUN1 (INT, taxisInqTunit, TAXISINQTUNIT, taxisinqtunit, INT)
 FCALLSCFUN1 (INT, taxisInqNumavg, TAXISINQNUMAVG, taxisinqnumavg, INT)
diff --git a/libcdi/src/cdi_cksum.c b/libcdi/src/cdi_cksum.c
index 6680c51..775031a 100644
--- a/libcdi/src/cdi_cksum.c
+++ b/libcdi/src/cdi_cksum.c
@@ -11,7 +11,7 @@ uint32_t cdiCheckSum(int type, int count, void *buffer)
   uint32_t s = 0U;
   xassert(count >= 0);
   size_t elemSize = (size_t)serializeGetSizeInCore(1, type, NULL);
-  memcrc_r_eswap(&s, buffer, count, elemSize);
+  memcrc_r_eswap(&s, (const unsigned char*) buffer, count, elemSize);
   s = memcrc_finish(&s, elemSize * (size_t)count);
   return s;
 }
diff --git a/libcdi/src/cdi_int.c b/libcdi/src/cdi_int.c
index 58bc2eb..f0231b1 100644
--- a/libcdi/src/cdi_int.c
+++ b/libcdi/src/cdi_int.c
@@ -39,13 +39,14 @@ int cdiIgnoreAttCoordinates = FALSE;
 int cdiIgnoreValidRange     = FALSE;
 int cdiSkipRecords          = 0;
 int cdiInventoryMode        = 1;
+size_t CDI_netcdf_hdr_pad   = 0UL;
 
 char *cdiPartabPath   = NULL;
 int   cdiPartabIntern = 1;
 
 double cdiDefaultMissval = -9.E33;
 
-char *Filetypes[] = {
+const char Filetypes[][9] = {
   "UNKNOWN",
   "GRIB",
   "GRIB2",
@@ -67,6 +68,7 @@ int CDI_Debug   = 0;    /* If set to 1, debugging           */
 
 static int  STREAM_Debug = 0;   /* If set to 1, debugging */
 
+int cdiGribApiDebug     = 0;
 int cdiDefaultLeveltype = -1;
 static int cdiDataUnreduced = 0;
 static int cdiSortName = 0;
@@ -80,10 +82,13 @@ static int    streamGetPackSize ( void * streamptr, void *context);
 static void   streamPack        ( void * streamptr, void * buff, int size, int * position, void *context );
 static int    streamTxCode      ( void );
 
-resOps streamOps = { streamCompareP, streamDestroyP, streamPrintP,
-                     streamGetPackSize,
-		     streamPack,
-                     streamTxCode
+const resOps streamOps = {
+  streamCompareP,
+  streamDestroyP,
+  streamPrintP,
+  streamGetPackSize,
+  streamPack,
+  streamTxCode
 };
 
 long cdiGetenvInt(char *envName)
@@ -178,6 +183,12 @@ void cdiInitialize(void)
       gribSetConst(1); // 1: Don't pack constant fields on regular grids
 #endif
 
+      value = cdiGetenvInt("CDI_DEBUG");
+      if ( value >= 0 ) CDI_Debug = (int) value;
+
+      value = cdiGetenvInt("CDI_GRIBAPI_DEBUG");
+      if ( value >= 0 ) cdiGribApiDebug = (int) value;
+
       value = cdiGetenvInt("CDI_REGULARGRID");
       if ( value >= 0 ) cdiDataUnreduced = (int) value;
 
@@ -190,6 +201,9 @@ void cdiInitialize(void)
       value = cdiGetenvInt("CDI_LEVELTYPE");
       if ( value >= 0 ) cdiDefaultLeveltype = (int) value;
 
+      value = cdiGetenvInt("CDI_NETCDF_HDR_PAD");
+      if ( value >= 0 ) CDI_netcdf_hdr_pad = (size_t) value;
+
       envString = getenv("CDI_MISSVAL");
       if ( envString ) cdiDefaultMissval = atof(envString);
       /*
@@ -218,7 +232,7 @@ void cdiInitialize(void)
 	  cdiSkipRecords = cdiSkipRecords > 0 ? cdiSkipRecords : 0;
 	}
 
-      envString = getenv("GRIB_INVENTORY_MODE");
+      envString = getenv("CDI_INVENTORY_MODE");
       if ( envString )
 	{
 	  if ( strncmp(envString, "time", 4) == 0 )
@@ -264,9 +278,9 @@ void cdiInitialize(void)
 }
 
 
-char *strfiletype(int filetype)
+const char *strfiletype(int filetype)
 {
-  char *name;
+  const char *name;
   int size = (int) (sizeof(Filetypes)/sizeof(char *));
 
   if ( filetype > 0 && filetype < size )
@@ -388,26 +402,13 @@ int streamSize(void)
 
 void cdiDefGlobal(const char *string, int val)
 {
-  if ( strcmp(string, "REGULARGRID") == 0 )
-    {
-      cdiDataUnreduced = val;
-    }
-  else if ( strcmp(string, "SORTNAME") == 0 )
-    {
-      cdiSortName = val;
-    }
-  else if ( strcmp(string, "HAVE_MISSVAL") == 0 )
-    {
-      cdiHaveMissval = val;
-    }
-  else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 )
-    {
-      cdiNcChunksizehint = val;
-    }
-  else
-    {
-      Warning("Unsupported global key: %s", string);
-    }
+  if      ( strcmp(string, "REGULARGRID")      == 0 ) cdiDataUnreduced = val;
+  else if ( strcmp(string, "GRIBAPI_DEBUG")    == 0 ) cdiGribApiDebug = val;
+  else if ( strcmp(string, "SORTNAME")         == 0 ) cdiSortName = val;
+  else if ( strcmp(string, "HAVE_MISSVAL")     == 0 ) cdiHaveMissval = val;
+  else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 ) cdiNcChunksizehint = val;
+  else if ( strcmp(string, "NETCDF_HDR_PAD")   == 0 ) CDI_netcdf_hdr_pad = (size_t) val;
+  else Warning("Unsupported global key: %s", string);
 }
 
 
@@ -601,10 +602,10 @@ void streamPrintP   ( void * streamptr, FILE * fp )
 
   fprintf ( fp, "#\n");
   fprintf ( fp, "# streamID %d\n", sp->self);
-  fprintf ( fp, "#\n"); 
+  fprintf ( fp, "#\n");
   fprintf ( fp, "self          = %d\n", sp->self );
   fprintf ( fp, "accesstype    = %d\n", sp->accesstype );
-  fprintf ( fp, "accessmode    = %d\n", sp->accessmode ); 
+  fprintf ( fp, "accessmode    = %d\n", sp->accessmode );
   fprintf ( fp, "filetype      = %d\n", sp->filetype );
   fprintf ( fp, "byteorder     = %d\n", sp->byteorder );
   fprintf ( fp, "fileID        = %d\n", sp->fileID );
@@ -626,7 +627,7 @@ void streamPrintP   ( void * streamptr, FILE * fp )
   fprintf ( fp, "//  tsteps_t   *tsteps;\n" );
   fprintf ( fp, "tstepsTableSize= %d\n", sp->tstepsTableSize );
   fprintf ( fp, "tstepsNextID  = %d\n", sp->tstepsNextID );
-  fprintf ( fp, "//BaseTime  basetime;\n" );
+  fprintf ( fp, "//basetime_t  basetime;\n" );
   fprintf ( fp, "ncmode        = %d\n", sp->ncmode );
   fprintf ( fp, "vlistID       = %d\n", sp->vlistID );
   fprintf ( fp, "//  int       xdimID[MAX_GRIDS_PS];\n" );
@@ -751,7 +752,7 @@ streamPack(void * streamptr, void * packBuffer, int packBufferSize,
 
 struct streamAssoc
 streamUnpack(char * unpackBuffer, int unpackBufferSize,
-             int * unpackBufferPos, int nspTarget, void *context)
+             int * unpackBufferPos, int originNamespace, void *context)
 {
   int intBuffer[streamNint], streamID;
   uint32_t d;
@@ -772,7 +773,7 @@ streamUnpack(char * unpackBuffer, int unpackBufferSize,
   xassert(d == cdiCheckSum(DATATYPE_TXT, intBuffer[2], filename));
   streamID = streamOpenWrite ( filename, intBuffer[1] );
   xassert ( streamID >= 0 &&
-            namespaceAdaptKey ( intBuffer[0], nspTarget ) == streamID );
+            namespaceAdaptKey ( intBuffer[0], originNamespace ) == streamID );
   streamDefByteorder(streamID, intBuffer[5]);
   streamDefCompType(streamID, intBuffer[6]);
   streamDefCompLevel(streamID, intBuffer[7]);
diff --git a/libcdi/src/cdi_int.h b/libcdi/src/cdi_int.h
index 0336bac..2470dbb 100644
--- a/libcdi/src/cdi_int.h
+++ b/libcdi/src/cdi_int.h
@@ -58,6 +58,9 @@ char *strdup(const char *s);
 #ifndef  _IEG_H
 #  include "ieg.h"
 #endif
+#ifndef RESOURCE_HANDLE_H
+#  include "resource_handle.h"
+#endif
 
 
 #define check_parg(arg)  if ( arg == 0 ) Warning("Argument '" #arg "' not allocated!")
@@ -89,14 +92,6 @@ char *strdup(const char *s);
 #endif
 
 
-#ifndef INT
-#  define  INT(x)  ((int)(x))
-#endif
-
-#ifndef NINT
-#  define  NINT(x)  ((x) < 0 ? (int)((x)-.5) : (int)((x)+.5))
-#endif
-
 #define  FALSE  0
 #define  TRUE   1
 
@@ -131,15 +126,7 @@ typedef struct
   int       sec2[4096];
   int       sec3[2];
   int       sec4[512];
-#if  defined  (HAVE_LIBSERVICE)
-  srvrec_t   *srvp;
-#endif
-#if  defined  (HAVE_LIBEXTRA)
-  extrec_t   *extp;
-#endif
-#if  defined  (HAVE_LIBIEG)
-  iegrec_t   *iegp;
-#endif
+  void     *exsep;
 }
 Record;
 
@@ -226,7 +213,7 @@ typedef struct {
   tsteps_t   *tsteps;
   int         tstepsTableSize;
   int         tstepsNextID;
-  BaseTime    basetime;
+  basetime_t  basetime;
   int         ncmode;
   int         vlistID;
   int         xdimID[MAX_GRIDS_PS];
@@ -265,6 +252,7 @@ stream_t;
 
 
 extern int CDI_Debug;      /* If set to 1, debuggig (default 0)            */
+extern int cdiGribApiDebug;
 extern double cdiDefaultMissval;
 extern int cdiDefaultInstID;
 extern int cdiDefaultModelID;
@@ -285,9 +273,11 @@ void stream_check_ptr(const char *caller, stream_t *streamptr);
 
 int     streamInqFileID(int streamID);
 
-int     zaxisInqLevelID(int zaxisID, double level);
-char   *gridNamePtr(int gridtype);
+void    gridDefHasDims(int gridID, int hasdims);
+int     gridInqHasDims(int gridID);
+const char *gridNamePtr(int gridtype);
 char   *zaxisNamePtr(int leveltype);
+int     zaxisInqLevelID(int zaxisID, double level);
 
 void    streamCheckID(const char *caller, int streamID);
 
@@ -300,7 +290,7 @@ int     stream_new_var(stream_t *streamptr, int gridID, int zaxisID);
 
 int     tstepsNewEntry(stream_t *streamptr);
 
-char   *strfiletype(int filetype);
+const char *strfiletype(int filetype);
 
 void    cdi_generate_vars(stream_t *streamptr);
 
@@ -351,7 +341,7 @@ struct streamAssoc
 
 struct streamAssoc
 streamUnpack(char * unpackBuffer, int unpackBufferSize,
-             int * unpackBufferPos, int nspTarget, void *context);
+             int * unpackBufferPos, int originNamespace, void *context);
 
 int
 cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
@@ -376,7 +366,7 @@ void cdiStreamSync_(stream_t *streamptr);
 
 char *cdiUnitNamePtr(int cdi_unit);
 
-
+extern const resOps streamOps;
 
 #endif  /* _CDI_INT_H */
 /*
diff --git a/libcdi/src/cdilib.c b/libcdi/src/cdilib.c
index e8c64ba..885bec1 100644
--- a/libcdi/src/cdilib.c
+++ b/libcdi/src/cdilib.c
@@ -1,7 +1,7 @@
 
-/* Automatically generated by m214003 at 2014-02-12, do not edit */
+/* Automatically generated by m214003 at 2014-06-27, do not edit */
 
-/* CDILIB_VERSION="1.6.3" */
+/* CDILIB_VERSION="1.6.4" */
 
 #ifdef _ARCH_PWR6
 #pragma options nostrict
@@ -32,9 +32,6 @@
 #include <aio.h>
 #endif
 #include <stdbool.h>
-#ifdef USE_MPI
-#include "mpi.h"
-#endif
 #include <assert.h>
 
 #if  defined  (HAVE_LIBGRIB_API)
@@ -113,19 +110,25 @@ typedef struct {
   valTxCodeFunc      valTxCode;
 }resOps;
 
-enum { RESH_UNDEFID, ASSIGNED, SUSPENDED, CLOSED };
+enum {
+  RESH_UNUSED,             /* resource holds no value */
+  RESH_ASSIGNED,           /* resource is user-assigned */
+  RESH_PRE_ASSIGNED,       /* resource is pre-assigned by library */
+  RESH_CLOSED,             /* resource is marked immutable */
+};
 
 void   reshListCreate(int namespaceID);
 void   reshListDestruct(int namespaceID);
-int    reshPut ( void *, resOps * );
-void   reshRemove ( cdiResH, resOps * );
+int    reshPut ( void *, const resOps * );
+void reshReplace(cdiResH resH, void *p, const resOps *ops);
+void   reshRemove ( cdiResH, const resOps * );
 
-int    reshCountType ( resOps * );
+int    reshCountType ( const resOps * );
 
-void * reshGetValue(const char *, cdiResH, resOps * );
+void * reshGetValue(const char *, cdiResH, const resOps * );
 #define reshGetVal(resH, ops)  reshGetValue(__func__, resH, ops)
 
-void   reshGetResHListOfType ( int, int *, resOps * );
+void   reshGetResHListOfType ( int, int *, const resOps * );
 
 enum cdiApplyRet {
   CDI_APPLY_ERROR = -1,
@@ -143,11 +146,11 @@ cdiResHFilterApply(const resOps *p,
 
 void   reshPackBufferCreate ( char **, int *, void *context );
 void   reshPackBufferDestroy ( char ** );
-int    reshResourceGetPackSize(int resh, resOps *ops, void *context);
-void   reshPackResource(int resh, resOps *ops,
+int    reshResourceGetPackSize(int resh, const resOps *ops, void *context);
+void   reshPackResource(int resh, const resOps *ops,
                         void *buf, int buf_size, int *position, void *context);
-void   reshSetStatus ( cdiResH, resOps *, int );
-int    reshGetStatus ( cdiResH, resOps * );
+void   reshSetStatus ( cdiResH, const resOps *, int );
+int    reshGetStatus ( cdiResH, const resOps * );
 
 void   reshLock   ( void );
 void   reshUnlock ( void );
@@ -183,40 +186,45 @@ typedef struct {
   /* Time format    hhmmss */
   int     self;
   int     used;
-  int     type;           /* time type             */
-  int     vdate;          /* verification date     */
-  int     vtime;          /* verification time     */
-  int     rdate;          /* reference date        */
-  int     rtime;          /* reference time        */
+  int     type;           // time type
+  int     vdate;          // verification date
+  int     vtime;          // verification time
+  int     rdate;          // reference date
+  int     rtime;          // reference time
+  int     fdate;          // forecast reference date
+  int     ftime;          // forecast reference time
   int     calendar;
-  int     unit;           /* time unit             */
+  int     unit;           // time unit
   int     numavg;
   int     climatology;
   int     has_bounds;
-  int     vdate_lb;       /* lower bounds of vdate */
-  int     vtime_lb;       /* lower bounds of vtime */
-  int     vdate_ub;       /* upper bounds of vdate */
-  int     vtime_ub;       /* upper bounds of vtime */
-  char   *name;
-  char   *longname;
+  int     vdate_lb;       // lower bounds of vdate
+  int     vtime_lb;       // lower bounds of vtime
+  int     vdate_ub;       // upper bounds of vdate
+  int     vtime_ub;       // upper bounds of vtime
+  int     fc_unit;        // forecast time unit
+  double  fc_period;      // forecast time period
+  char*   name;
+  char*   longname;
 }
 taxis_t;
 
-void    ptaxisInit(taxis_t *taxis);
-void    ptaxisCopy(taxis_t *dest, taxis_t *source);
-taxis_t  *taxisPtr(int taxisID);
-void    cdiDecodeTimeval(double timevalue, taxis_t *taxis, int *date, int *time);
-double  cdiEncodeTimeval(int date, int time, taxis_t *taxis);
-void    timeval2vtime(double timevalue, taxis_t *taxis, int *vdate, int *vtime);
-double  vtime2timeval(int vdate, int vtime, taxis_t *taxis);
+void     ptaxisInit(taxis_t* taxis);
+void     ptaxisCopy(taxis_t* dest, taxis_t* source);
+taxis_t* taxisPtr(int taxisID);
+void     cdiSetForecastPeriod(double timevalue, taxis_t *taxis);
+void     cdiDecodeTimeval(double timevalue, taxis_t* taxis, int* date, int* time);
+double   cdiEncodeTimeval(int date, int time, taxis_t* taxis);
+void     timeval2vtime(double timevalue, taxis_t* taxis, int* vdate, int* vtime);
+double   vtime2timeval(int vdate, int vtime, taxis_t *taxis);
 
 #if !defined (SX)
-extern resOps taxisOps;
+extern const resOps taxisOps;
 #endif
 
 int
-taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
-            int nspTarget, void *context, int checkForSameID);
+taxisUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos,
+            int originNamespace, void *context, int checkForSameID);
 
 #endif  /* _TAXIS_H */
 /*
@@ -556,11 +564,11 @@ int  iegDefDataDP(iegrec_t *iegp, const double *data);
 #define  CDI_H_
 
 #include <sys/types.h>
-
+/*
 #if defined(__cplusplus)
 extern "C" {
 #endif
-
+*/
 #define  CDI_MAX_NAME           256   /* max length of a name                 */
 
 #define  CDI_UNDEFID             -1
@@ -739,6 +747,7 @@ extern "C" {
 
 #define  TAXIS_ABSOLUTE           1
 #define  TAXIS_RELATIVE           2
+#define  TAXIS_FORECAST           3
 
 /* TUNIT types */
 
@@ -825,6 +834,7 @@ void    streamDefVlist(int streamID, int vlistID);
 
 /*      streamInqVlist: Get the Vlist of a stream */
 int     streamInqVlist(int streamID);
+/*      PIO: */
 int     streamInqVlistIDorig(int streamID);
 
 /*      streamInqFiletype: Get the filetype */
@@ -839,24 +849,24 @@ int     streamInqByteorder(int streamID);
 /*      streamDefCompType: Define compression type */
 void    streamDefCompType(int streamID, int comptype);
 
-/*      streamDefCompLevel: Define compression level */
-void    streamDefCompLevel(int streamID, int complevel);
-
 /*      streamInqCompType: Get compression type */
 int     streamInqCompType(int streamID);
 
+/*      streamDefCompLevel: Define compression level */
+void    streamDefCompLevel(int streamID, int complevel);
+
 /*      streamInqCompLevel: Get compression level */
 int     streamInqCompLevel(int streamID);
 
 /*      streamDefTimestep: Define time step */
 int     streamDefTimestep(int streamID, int tsID);
 
-/* query currently set timestep id  */
-int streamInqCurTimestepID(int streamID);
-
 /*      streamInqTimestep: Get time step */
 int     streamInqTimestep(int streamID, int tsID);
 
+/*      PIO: query currently set timestep id  */
+int     streamInqCurTimestepID(int streamID);
+
 char   *streamFilename(int streamID);
 char   *streamFilesuffix(int filetype);
 int     streamNtsteps(int streamID);
@@ -866,31 +876,31 @@ int     streamInqNvars ( int streamID );
 
 /* STREAM var I/O routines */
 
-/*      streamReadVar: Read a variable */
-void    streamReadVar(int streamID, int varID, double *data_vec, int *nmiss);
-
 /*      streamWriteVar: Write a variable */
 void    streamWriteVar(int streamID, int varID, const double *data_vec, int nmiss);
 void    streamWriteVarF(int streamID, int varID, const float *data_vec, int nmiss);
 
-/*      streamReadVarSlice: Read a horizontal slice of a variable */
-void    streamReadVarSlice(int streamID, int varID, int levelID, double *data_vec, int *nmiss);
+/*      streamReadVar: Read a variable */
+void    streamReadVar(int streamID, int varID, double *data_vec, int *nmiss);
 
 /*      streamWriteVarSlice: Write a horizontal slice of a variable */
 void    streamWriteVarSlice(int streamID, int varID, int levelID, const double *data_vec, int nmiss);
 void    streamWriteVarSliceF(int streamID, int varID, int levelID, const float *data_vec, int nmiss);
 
+/*      streamReadVarSlice: Read a horizontal slice of a variable */
+void    streamReadVarSlice(int streamID, int varID, int levelID, double *data_vec, int *nmiss);
+
 void    streamWriteVarChunk(int streamID, int varID, const int rect[][2],
                             const double *data_vec, int nmiss);
 
 
 /* STREAM record I/O routines */
 
-void    streamInqRecord(int streamID, int *varID, int *levelID);
 void    streamDefRecord(int streamID, int  varID, int  levelID);
-void    streamReadRecord(int streamID, double *data_vec, int *nmiss);
+void    streamInqRecord(int streamID, int *varID, int *levelID);
 void    streamWriteRecord(int streamID, const double *data_vec, int nmiss);
 void    streamWriteRecordF(int streamID, const float *data_vec, int nmiss);
+void    streamReadRecord(int streamID, double *data_vec, int *nmiss);
 void    streamCopyRecord(int streamIDdest, int streamIDsrc);
 
 void    streamInqGinfo(int streamID, int *intnum, float *fltnum, off_t *bignum);
@@ -976,8 +986,8 @@ int     vlistInqVarZaxis(int vlistID, int varID);
 /* used in MPIOM */
 int     vlistInqVarID(int vlistID, int code);
 
-int     vlistInqVarTsteptype(int vlistID, int varID);
 void    vlistDefVarTsteptype(int vlistID, int varID, int tsteptype);
+int     vlistInqVarTsteptype(int vlistID, int varID);
 
 void    vlistDefVarCompType(int vlistID, int varID, int comptype);
 int     vlistInqVarCompType(int vlistID, int varID);
@@ -1125,7 +1135,7 @@ int     vlistInqAttTxt(int vlistID, int varID, const char *name, int mlen, char
 /* GRID routines */
 
 void    gridName(int gridtype, char *gridname);
-char   *gridNamePtr(int gridtype);
+const char *gridNamePtr(int gridtype);
 
 void    gridCompress(int gridID);
 
@@ -1185,45 +1195,45 @@ int     gridInqYvals(int gridID, double *yvals_vec);
 /*      gridDefXname: Define the name of a X-axis */
 void    gridDefXname(int gridID, const char *xname);
 
+/*      gridInqXname: Get the name of a X-axis */
+void    gridInqXname(int gridID, char *xname);
+
 /*      gridDefXlongname: Define the longname of a X-axis  */
 void    gridDefXlongname(int gridID, const char *xlongname);
 
+/*      gridInqXlongname: Get the longname of a X-axis */
+void    gridInqXlongname(int gridID, char *xlongname);
+
 /*      gridDefXunits: Define the units of a X-axis */
 void    gridDefXunits(int gridID, const char *xunits);
 
+/*      gridInqXunits: Get the units of a X-axis */
+void    gridInqXunits(int gridID, char *xunits);
+
 /*      gridDefYname: Define the name of a Y-axis */
 void    gridDefYname(int gridID, const char *yname);
 
+/*      gridInqYname: Get the name of a Y-axis */
+void    gridInqYname(int gridID, char *yname);
+
 /*      gridDefYlongname: Define the longname of a Y-axis */
 void    gridDefYlongname(int gridID, const char *ylongname);
 
+/*      gridInqYlongname: Get the longname of a Y-axis */
+void    gridInqYlongname(int gridID, char *ylongname);
+
 /*      gridDefYunits: Define the units of a Y-axis */
 void    gridDefYunits(int gridID, const char *yunits);
 
-/*      gridInqXname: Get the name of a X-axis */
-void    gridInqXname(int gridID, char *xname);
-
-/*      gridInqXlongname: Get the longname of a X-axis */
-void    gridInqXlongname(int gridID, char *xlongname);
+/*      gridInqYunits: Get the units of a Y-axis */
+void    gridInqYunits(int gridID, char *yunits);
 
 /*      gridInqXstdname: Get the standard name of a X-axis */
 void    gridInqXstdname(int gridID, char *xstdname);
 
-/*      gridInqXunits: Get the units of a X-axis */
-void    gridInqXunits(int gridID, char *xunits);
-
-/*      gridInqYname: Get the name of a Y-axis */
-void    gridInqYname(int gridID, char *yname);
-
-/*      gridInqYlongname: Get the longname of a Y-axis */
-void    gridInqYlongname(int gridID, char *ylongname);
-
 /*      gridInqYstdname: Get the standard name of a Y-axis */
 void    gridInqYstdname(int gridID, char *ystdname);
 
-/*      gridInqYunits: Get the units of a Y-axis */
-void    gridInqYunits(int gridID, char *yunits);
-
 /*      gridDefPrec: Define the precision of a Grid */
 void    gridDefPrec(int gridID, int prec);
 
@@ -1241,23 +1251,23 @@ double  gridInqYinc(int gridID);
 
 int     gridIsCircular(int gridID);
 int     gridIsRotated(int gridID);
-double  gridInqXpole(int gridID);
 void    gridDefXpole(int gridID, double xpole);
-double  gridInqYpole(int gridID);
+double  gridInqXpole(int gridID);
 void    gridDefYpole(int gridID, double ypole);
-double  gridInqAngle(int gridID);
+double  gridInqYpole(int gridID);
 void    gridDefAngle(int gridID, double angle);
-void    gridDefTrunc(int gridID, int trunc);
+double  gridInqAngle(int gridID);
 int     gridInqTrunc(int gridID);
+void    gridDefTrunc(int gridID, int trunc);
 /* Hexagonal GME grid */
-int     gridInqGMEnd(int gridID);
 void    gridDefGMEnd(int gridID, int nd);
-int     gridInqGMEni(int gridID);
+int     gridInqGMEnd(int gridID);
 void    gridDefGMEni(int gridID, int ni);
-int     gridInqGMEni2(int gridID);
+int     gridInqGMEni(int gridID);
 void    gridDefGMEni2(int gridID, int ni2);
-int     gridInqGMEni3(int gridID);
+int     gridInqGMEni2(int gridID);
 void    gridDefGMEni3(int gridID, int ni3);
+int     gridInqGMEni3(int gridID);
 
 /* Reference of an unstructured grid */
 
@@ -1384,24 +1394,24 @@ void    zaxisInqUUID(int zaxisID, char *uuid_cbuf);
 /*      zaxisDefName: Define the name of a Z-axis */
 void    zaxisDefName(int zaxisID, const char *name);
 
-/*      zaxisDefLongname: Define the longname of a Z-axis */
-void    zaxisDefLongname(int zaxisID, const char *longname);
-
-/*      zaxisDefUnits: Define the units of a Z-axis */
-void    zaxisDefUnits(int zaxisID, const char *units);
-
 /*      zaxisInqName: Get the name of a Z-axis */
 void    zaxisInqName(int zaxisID, char *name);
 
+/*      zaxisDefLongname: Define the longname of a Z-axis */
+void    zaxisDefLongname(int zaxisID, const char *longname);
+
 /*      zaxisInqLongname: Get the longname of a Z-axis */
 void    zaxisInqLongname(int zaxisID, char *longname);
 
-/*      zaxisInqStdname: Get the standard name of a Z-axis */
-void    zaxisInqStdname(int zaxisID, char *stdname);
+/*      zaxisDefUnits: Define the units of a Z-axis */
+void    zaxisDefUnits(int zaxisID, const char *units);
 
 /*      zaxisInqUnits: Get the units of a Z-axis */
 void    zaxisInqUnits(int zaxisID, char *units);
 
+/*      zaxisInqStdname: Get the standard name of a Z-axis */
+void    zaxisInqStdname(int zaxisID, char *stdname);
+
 void    zaxisDefPrec(int zaxisID, int prec);
 int     zaxisInqPrec(int zaxisID);
 
@@ -1416,14 +1426,14 @@ void    zaxisDefVct(int zaxisID, int size, const double *vct_vec);
 void    zaxisInqVct(int zaxisID, double *vct_vec);
 int     zaxisInqVctSize(int zaxisID);
 const double *zaxisInqVctPtr(int zaxisID);
+void    zaxisDefLbounds(int zaxisID, const double *lbounds_vec);
 int     zaxisInqLbounds(int zaxisID, double *lbounds_vec);
-int     zaxisInqUbounds(int zaxisID, double *ubounds_vec);
-int     zaxisInqWeights(int zaxisID, double *weights_vec);
 double  zaxisInqLbound(int zaxisID, int index);
-double  zaxisInqUbound(int zaxisID, int index);
-void    zaxisDefLbounds(int zaxisID, const double *lbounds_vec);
 void    zaxisDefUbounds(int zaxisID, const double *ubounds_vec);
+int     zaxisInqUbounds(int zaxisID, double *ubounds_vec);
+double  zaxisInqUbound(int zaxisID, int index);
 void    zaxisDefWeights(int zaxisID, const double *weights_vec);
+int     zaxisInqWeights(int zaxisID, double *weights_vec);
 void    zaxisChangeType(int zaxisID, int zaxistype);
 
 /* TAXIS routines */
@@ -1446,12 +1456,36 @@ void    taxisDefVdate(int taxisID, int date);
 /*      taxisDefVtime: Define the verification time */
 void    taxisDefVtime(int taxisID, int time);
 
+/*      taxisInqVdate: Get the verification date */
+int     taxisInqVdate(int taxisID);
+
+/*      taxisInqVtime: Get the verification time */
+int     taxisInqVtime(int taxisID);
+
 /*      taxisDefRdate: Define the reference date */
 void    taxisDefRdate(int taxisID, int date);
 
-/*      taxisDefRtime: Define the reference date */
+/*      taxisDefRtime: Define the reference time */
 void    taxisDefRtime(int taxisID, int time);
 
+/*      taxisInqRdate: Get the reference date */
+int     taxisInqRdate(int taxisID);
+
+/*      taxisInqRtime: Get the reference time */
+int     taxisInqRtime(int taxisID);
+
+/*      taxisDefFdate: Define the forecast reference date */
+void    taxisDefFdate(int taxisID, int date);
+
+/*      taxisDefFtime: Define the forecast reference time */
+void    taxisDefFtime(int taxisID, int time);
+
+/*      taxisInqFdate: Get the forecast reference date */
+int     taxisInqFdate(int taxisID);
+
+/*      taxisInqFtime: Get the forecast reference time */
+int     taxisInqFtime(int taxisID);
+
 int     taxisHasBounds(int taxisID);
 
 void    taxisDeleteBounds(int taxisID);
@@ -1467,28 +1501,21 @@ void    taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub);
 /*      taxisDefCalendar: Define the calendar */
 void    taxisDefCalendar(int taxisID, int calendar);
 
-void    taxisDefTunit(int taxisID, int tunit);
-
-void    taxisDefNumavg(int taxisID, int numavg);
-
-int     taxisInqType(int taxisID);
-
-/*      taxisInqVdate: Get the verification date */
-int     taxisInqVdate(int taxisID);
+/*      taxisInqCalendar: Get the calendar */
+int     taxisInqCalendar(int taxisID);
 
-/*      taxisInqVtime: Get the verification time */
-int     taxisInqVtime(int taxisID);
+void    taxisDefTunit(int taxisID, int tunit);
+int     taxisInqTunit(int taxisID);
 
-/*      taxisInqRdate: Get the reference date */
-int     taxisInqRdate(int taxisID);
+void    taxisDefForecastTunit(int taxisID, int tunit);
+int     taxisInqForecastTunit(int taxisID);
 
-/*      taxisInqRtime: Get the reference time */
-int     taxisInqRtime(int taxisID);
+void    taxisDefForecastPeriod(int taxisID, double fc_period);
+double  taxisInqForecastPeriod(int taxisID);
 
-/*      taxisInqCalendar: Get the calendar */
-int     taxisInqCalendar(int taxisID);
+void    taxisDefNumavg(int taxisID, int numavg);
 
-int     taxisInqTunit(int taxisID);
+int     taxisInqType(int taxisID);
 
 int     taxisInqNumavg(int taxisID);
 
@@ -1546,10 +1573,11 @@ void    streamDefHistory(int streamID, int size, const char *history);
 int     streamInqHistorySize(int streamID);
 void    streamInqHistoryString(int streamID, char *history);
 
+/*
 #if defined (__cplusplus)
 }
 #endif
-
+*/
 #endif  /* CDI_H_ */
 /*
  * Local Variables:
@@ -1611,11 +1639,12 @@ typedef struct {
   int   ncvarid;
   int   ncdimid;
   int   ncvarboundsid;
+  int   leadtimeid;
   int   lwrf;     /* TRUE for time axis in WRF format */
 }
-BaseTime;
+basetime_t;
 
-void basetimeInit(BaseTime *basetime);
+void basetimeInit(basetime_t *basetime);
 
 #endif  /* _BASETIME_H */
 /*
@@ -1709,7 +1738,7 @@ int              namespaceGetActive    ( void );
 int              namespaceIdxEncode    ( namespaceTuple_t );
 int              namespaceIdxEncode2   ( int, int );
 namespaceTuple_t namespaceResHDecode   ( int );
-int              namespaceAdaptKey     ( int, int );
+int              namespaceAdaptKey     ( int originResH, int originNamespace);
 int              namespaceAdaptKey2    ( int );
 void             namespaceDefResStatus ( statusCode );
 statusCode       namespaceInqResStatus ( void );
@@ -2029,6 +2058,9 @@ char *strdup(const char *s);
 #ifndef  _IEG_H
 #  include "ieg.h"
 #endif
+#ifndef RESOURCE_HANDLE_H
+#  include "resource_handle.h"
+#endif
 
 
 #define check_parg(arg)  if ( arg == 0 ) Warning("Argument '" #arg "' not allocated!")
@@ -2060,14 +2092,6 @@ char *strdup(const char *s);
 #endif
 
 
-#ifndef INT
-#  define  INT(x)  ((int)(x))
-#endif
-
-#ifndef NINT
-#  define  NINT(x)  ((x) < 0 ? (int)((x)-.5) : (int)((x)+.5))
-#endif
-
 #define  FALSE  0
 #define  TRUE   1
 
@@ -2102,15 +2126,7 @@ typedef struct
   int       sec2[4096];
   int       sec3[2];
   int       sec4[512];
-#if  defined  (HAVE_LIBSERVICE)
-  srvrec_t   *srvp;
-#endif
-#if  defined  (HAVE_LIBEXTRA)
-  extrec_t   *extp;
-#endif
-#if  defined  (HAVE_LIBIEG)
-  iegrec_t   *iegp;
-#endif
+  void     *exsep;
 }
 Record;
 
@@ -2197,7 +2213,7 @@ typedef struct {
   tsteps_t   *tsteps;
   int         tstepsTableSize;
   int         tstepsNextID;
-  BaseTime    basetime;
+  basetime_t  basetime;
   int         ncmode;
   int         vlistID;
   int         xdimID[MAX_GRIDS_PS];
@@ -2236,6 +2252,7 @@ stream_t;
 
 
 extern int CDI_Debug;      /* If set to 1, debuggig (default 0)            */
+extern int cdiGribApiDebug;
 extern double cdiDefaultMissval;
 extern int cdiDefaultInstID;
 extern int cdiDefaultModelID;
@@ -2256,9 +2273,11 @@ void stream_check_ptr(const char *caller, stream_t *streamptr);
 
 int     streamInqFileID(int streamID);
 
-int     zaxisInqLevelID(int zaxisID, double level);
-char   *gridNamePtr(int gridtype);
+void    gridDefHasDims(int gridID, int hasdims);
+int     gridInqHasDims(int gridID);
+const char *gridNamePtr(int gridtype);
 char   *zaxisNamePtr(int leveltype);
+int     zaxisInqLevelID(int zaxisID, double level);
 
 void    streamCheckID(const char *caller, int streamID);
 
@@ -2271,7 +2290,7 @@ int     stream_new_var(stream_t *streamptr, int gridID, int zaxisID);
 
 int     tstepsNewEntry(stream_t *streamptr);
 
-char   *strfiletype(int filetype);
+const char *strfiletype(int filetype);
 
 void    cdi_generate_vars(stream_t *streamptr);
 
@@ -2322,7 +2341,7 @@ struct streamAssoc
 
 struct streamAssoc
 streamUnpack(char * unpackBuffer, int unpackBufferSize,
-             int * unpackBufferPos, int nspTarget, void *context);
+             int * unpackBufferPos, int originNamespace, void *context);
 
 int
 cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
@@ -2347,7 +2366,7 @@ void cdiStreamSync_(stream_t *streamptr);
 
 char *cdiUnitNamePtr(int cdi_unit);
 
-
+extern const resOps streamOps;
 
 #endif  /* _CDI_INT_H */
 /*
@@ -4257,7 +4276,7 @@ tableDefault(void)
 #ifndef _GAUSSGRID_H
 #define _GAUSSGRID_H
 
-void   gaussaw(double *pa, double *pw, int nlat);
+void   gaussaw(double *restrict pa, double *restrict pw, int nlat);
 
 #endif  /* _GAUSSGRID_H */
 /*
@@ -4328,6 +4347,7 @@ typedef struct {
   int     np;                     /* number of parallels between a pole and the equator */
   int     locked;
   int     lcomplex;
+  int     hasdims;
   char    xname[CDI_MAX_NAME];
   char    yname[CDI_MAX_NAME];
   char    xlongname[CDI_MAX_NAME];
@@ -4349,8 +4369,8 @@ int gridSize(void);
 const double *gridInqXvalsPtr(int gridID);
 const double *gridInqYvalsPtr(int gridID);
 
-double *gridInqXboundsPtr(int gridID);
-double *gridInqYboundsPtr(int gridID);
+const double *gridInqXboundsPtr(int gridID);
+const double *gridInqYboundsPtr(int gridID);
 const double *gridInqAreaPtr(int gridID);
 
 int gridCompare(int gridID, grid_t grid);
@@ -4358,6 +4378,11 @@ int gridGenerate(grid_t grid);
 
 void gridGetIndexList( int, int * );
 
+void
+gridUnpack(char * unpackBuffer, int unpackBufferSize,
+           int * unpackBufferPos, int originNamespace, void *context,
+           int force_id);
+
 #endif
 /*
  * Local Variables:
@@ -4373,6 +4398,11 @@ void gridGetIndexList( int, int * );
 
 int zaxisSize(void);
 
+void
+zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
+            int * unpackBufferPos, int originNamespace, void *context,
+            int force_id);
+
 #endif
 #ifndef _VARSCAN_H
 #define _VARSCAN_H
@@ -4385,7 +4415,7 @@ int zaxisSize(void);
 void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
 		  int level1, int level2, int level_sf, int level_unit, int prec,
 		  int *pvarID, int *plevelID, int tsteptype, int numavg, int ltype,
-		  const char *name, const char *longname, const char *units);
+		  const char *name, const char *stdname, const char *longname, const char *units);
 
 void varDefVCT(size_t vctsize, double *vctptr);
 void varDefZAxisReference(int nlev, int nvgrid, char *uuid);
@@ -4633,9 +4663,10 @@ void cdf_create (const char *path, int cmode, int *idp);
 int  cdf_open   (const char *path, int omode, int *idp);
 void cdf_close  (int ncid);
 
-void cdf_redef (int ncid);
-void cdf_enddef (int ncid);
-void cdf_sync (int ncid);
+void cdf_redef(int ncid);
+void cdf_enddef(int ncid);
+void cdf__enddef(const int ncid, const size_t hdr_pad);
+void cdf_sync(int ncid);
 
 void cdf_inq (int ncid, int *ndimsp, int *nvarsp, int *ngattsp, int *unlimdimidp);
 
@@ -4806,8 +4837,11 @@ typedef struct
 levinfo_t;
 
 #define DEFAULT_LEVINFO(levID) \
+  (levinfo_t){ 0, -1, levID, levID}
+/*
+#define DEFAULT_LEVINFO(levID) \
   (levinfo_t){ .flag = 0, .index = -1, .flevelID = levID, .mlevelID = levID}
-
+*/
 typedef struct
 {
   int ens_index;
@@ -4913,7 +4947,8 @@ int      vlistHasTime(int vlistID);
 int      vlistDelAtts(int vlistID, int varID);
 int      vlistCopyVarAtts(int vlistID1, int varID_1, int vlistID2, int varID_2);
 
-void     vlistUnpack(char * buffer, int bufferSize, int * pos, int, void *context);
+void     vlistUnpack(char * buffer, int bufferSize, int * pos,
+                     int originNamespace, void *context, int force_id);
 
 /*      vlistDefVarValidrange: Define the valid range of a Variable */
 void    vlistDefVarValidrange(int vlistID, int varID, const double *validrange);
@@ -4921,6 +4956,9 @@ void    vlistDefVarValidrange(int vlistID, int varID, const double *validrange);
 /*      vlistInqVarValidrange: Get the valid range of a Variable */
 int     vlistInqVarValidrange(int vlistID, int varID, double *validrange);
 
+int vlist_att_compare(vlist_t *a, int varIDA, vlist_t *b, int varIDB,
+                      int attnum);
+
 #if  defined  (HAVE_LIBGRIB_API)
 extern int   cdiNAdditionalGRIBKeys;
 extern char* cdiAdditionalGRIBKeys[];
@@ -4952,6 +4990,7 @@ void vlistVarPack(vlist_t *p, int varID,
                   char * buffer, int bufferSize, int * pos, void *context);
 void vlistVarUnpack(int vlistID,
                     char * buf, int size, int *position, int, void *context);
+int vlistVarCompare(vlist_t *a, int varIDA, vlist_t *b, int varIDB);
 void vlistDefVarIOrank    ( int, int, int );
 int  vlistInqVarIOrank    ( int, int );
 
@@ -5002,7 +5041,9 @@ vlistAttsUnpack(int vlistID, int varID,
 
 int
 modelUnpack(void *buf, int size, int *position,
-            int, void *context);
+            int originNamespace, void *context, int force_id);
+
+void modelDefaultEntries(void);
 
 #endif
 /*
@@ -5018,8 +5059,10 @@ modelUnpack(void *buf, int size, int *position,
 #define INSTITUTION_H
 
 int
-instituteUnpack(void *buf, int size, int *position, int,
-                void *context);
+instituteUnpack(void *buf, int size, int *position, int originNamespace,
+                void *context, int force_id);
+
+void instituteDefaultEntries(void);
 
 #endif
 
@@ -5049,8 +5092,6 @@ enum
   VLIST     = 7,
   START     = 55555555,
   SEPARATOR = 66666666,
-  DATATOKEN = 77777777,
-  FUNCCALL  = 88888888,
   END       = 99999999
 };
 
@@ -5135,9 +5176,9 @@ typedef struct
   char      file[MAXNAME];
   char      caller[MAXNAME];
 }
-MemTable;
+MemTable_t;
 
-static MemTable *memTable;
+static MemTable_t* memTable;
 static int     memTableSize  = 0;
 static long    memAccess     = 0;
 
@@ -5157,7 +5198,7 @@ static
 void memInternalProblem(const char *caller, const char *fmt, ...)
 {
   va_list args;
-	
+
   va_start(args, fmt);
 
   printf("\n");
@@ -5174,12 +5215,11 @@ static
 void memError(const char *caller, const char *file, int line, size_t size)
 {
   printf("\n");
-  fprintf(stderr, "Error (%s) : Allocation of %lu bytes failed. [ line %d file %s ]\n",
-	  caller, (unsigned long) size, line, file);
+  fprintf(stderr, "Error (%s) : Allocation of %zu bytes failed. [ line %d file %s ]\n",
+	  caller, size, line, file);
+
+  if ( errno ) perror("System error message ");
 
-  if ( errno )
-    perror("System error message ");
-	
   exit(EXIT_FAILURE);
 }
 
@@ -5204,15 +5244,15 @@ void memListPrintEntry(int mtype, int item, size_t size, void *ptr,
     }
 
    fprintf(stderr, "memory item %3d ", item);
-   fprintf(stderr, "(%6lu byte) ", (unsigned long) size);
+   fprintf(stderr, "(%6zu byte) ", size);
    fprintf(stderr, "at %p", ptr);
    if ( file != NULL )
      {
        fprintf(stderr, " line %4d", line);
        fprintf(stderr, " file %s", file);
-     }    
+     }
    if ( caller != NULL )
-     fprintf(stderr, " (%s)", caller);     
+     fprintf(stderr, " (%s)", caller);
    fprintf(stderr, "]\n");
 }
 
@@ -5301,7 +5341,7 @@ void memInit(void)
     {
       memGetDebugLevel();
       initDebugLevel = 1;
-    }  
+    }
 }
 
 static
@@ -5359,8 +5399,8 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
   if ( memTableSize == 0 )
     {
       memTableSize = 8;
-      memSize  = memTableSize*sizeof(MemTable);
-      memTable = (MemTable *) malloc(memSize);
+      memSize  = memTableSize*sizeof(MemTable_t);
+      memTable = (MemTable_t*) malloc(memSize);
       if( memTable == NULL ) memError(__func__, __FILE__, __LINE__, memSize);
 
       for( i = 0; i < memTableSize; i++ )
@@ -5380,8 +5420,8 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
   if ( memID == memTableSize )
     {
       memTableSize = 2*memTableSize;
-      memSize  = memTableSize*sizeof(MemTable);
-      memTable = (MemTable *) realloc(memTable, memSize);
+      memSize  = memTableSize*sizeof(MemTable_t);
+      memTable = (MemTable_t*) realloc(memTable, memSize);
       if( memTable == NULL ) memError(__func__, __FILE__, __LINE__, memSize);
 
       for( i = memID; i < memTableSize; i++ )
@@ -5399,7 +5439,7 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
     {
       len = strlen(file);
       if ( len > MAXNAME-1 ) len = MAXNAME-1;
-    
+
       (void) memcpy(memTable[memID].file, file, len);
       memTable[memID].file[len] = '\0';
     }
@@ -5455,7 +5495,7 @@ int memListChangeEntry(void *ptrold, void *ptr, size_t size,
       item = memTable[memID].item;
 
       sizeold = memTable[memID].size*memTable[memID].nobj;
-      
+
       memTable[memID].ptr   = ptr;
       memTable[memID].size  = size;
       memTable[memID].nobj  = 1;
@@ -5512,8 +5552,7 @@ void *Calloc(const char *caller, const char *file, int line, size_t nobjs, size_
 	{
 	  memAccess++;
 
-	  if ( ptr )
-	    item = memListNewEntry(CALLOC_FUNC, ptr, size, nobjs, caller, file, line);
+	  if ( ptr ) item = memListNewEntry(CALLOC_FUNC, ptr, size, nobjs, caller, file, line);
 
 	  memListPrintEntry(CALLOC_FUNC, item, size*nobjs, ptr, caller, file, line);
 	}
@@ -5543,8 +5582,7 @@ void *Malloc(const char *caller, const char *file, int line, size_t size)
 	{
 	  memAccess++;
 
-	  if ( ptr )
-	    item = memListNewEntry(MALLOC_FUNC, ptr, size, 1, caller, file, line);
+	  if ( ptr ) item = memListNewEntry(MALLOC_FUNC, ptr, size, 1, caller, file, line);
 
 	  memListPrintEntry(MALLOC_FUNC, item, size, ptr, caller, file, line);
 	}
@@ -5578,8 +5616,7 @@ void *Realloc(const char *caller, const char *file, int line, void *ptrold, size
 	    {
 	      item = memListChangeEntry(ptrold, ptr, size, caller, file, line);
 
-	      if ( item == UNDEFID )
-		item = memListNewEntry(REALLOC_FUNC, ptr, size, 1, caller, file, line);
+	      if ( item == UNDEFID ) item = memListNewEntry(REALLOC_FUNC, ptr, size, 1, caller, file, line);
 	    }
 
 	  memListPrintEntry(REALLOC_FUNC, item, size, ptr, caller, file, line);
@@ -5721,15 +5758,15 @@ extern void    Free   (const char *caller, const char *file, int line, void *ptr
 #endif
 
 #if  defined  WITH_CALLER_NAME
-#  define  realloc(p, s)  Realloc(__func__, __FILE__, __LINE__, p, (size_t)s)
-#  define   calloc(n, s)   Calloc(__func__, __FILE__, __LINE__, n, (size_t)s)
-#  define   malloc(s)      Malloc(__func__, __FILE__, __LINE__, (size_t)s)
-#  define     free(p)        Free(__func__, __FILE__, __LINE__, p)
+#  define  realloc(p, s)  Realloc(__func__, __FILE__, __LINE__, (p), (s))
+#  define   calloc(n, s)   Calloc(__func__, __FILE__, __LINE__, (n), (s))
+#  define   malloc(s)      Malloc(__func__, __FILE__, __LINE__, (s))
+#  define     free(p)        Free(__func__, __FILE__, __LINE__, (p))
 #else
-#  define  realloc(p, s)  Realloc((void *) NULL, __FILE__, __LINE__, p, (size_t)s)
-#  define   calloc(n, s)   Calloc((void *) NULL, __FILE__, __LINE__, n, (size_t)s)
-#  define   malloc(s)      Malloc((void *) NULL, __FILE__, __LINE__, (size_t)s)
-#  define     free(p)        Free((void *) NULL, __FILE__, __LINE__, p)
+#  define  realloc(p, s)  Realloc((void *) NULL, __FILE__, __LINE__, (p), (s))
+#  define   calloc(n, s)   Calloc((void *) NULL, __FILE__, __LINE__, (n), (s))
+#  define   malloc(s)      Malloc((void *) NULL, __FILE__, __LINE__, (s))
+#  define     free(p)        Free((void *) NULL, __FILE__, __LINE__, (p))
 #endif
 
 #endif /* DEBUG_MEMORY */
@@ -5738,12 +5775,10 @@ void *cdiXmalloc(size_t, const char *, const char *, int);
 #define xmalloc(size) cdiXmalloc((size), __FILE__, __func__,  __LINE__ )
 
 void *cdiXcalloc(size_t, size_t, const char *, const char *, int);
-#define xcalloc(nmemb,size) cdiXcalloc((nmemb), (size),        \
-                                        __FILE__, __func__, __LINE__)
+#define xcalloc(nmemb,size) cdiXcalloc((nmemb), (size), __FILE__, __func__, __LINE__)
 
 void *cdiXrealloc(void *, size_t, const char *, const char *, int);
-#define xrealloc(p,size) cdiXrealloc((p), (size),              \
-                                      __FILE__, __func__, __LINE__)
+#define xrealloc(p,size) cdiXrealloc((p), (size), __FILE__, __func__, __LINE__)
 
 #endif /* _DMEMORY_H */
 /*
@@ -5756,6 +5791,9 @@ void *cdiXrealloc(void *, size_t, const char *, const char *, int);
  * End:
  */
 #include <inttypes.h>
+#ifdef HAVE_CONFIG_H
+#endif
+
 #include <stdlib.h>
 #include <sys/types.h>
 
@@ -5865,18 +5903,19 @@ memcrc_r(uint32_t *state, const unsigned char *block, size_t block_len)
   *state = s;
 }
 
-#define SWAP_CSUM(BITWIDTH,BYTEWIDTH)                             \
-  do {                                                            \
-  for (size_t i = num_elems; i > 0; --i) {                        \
-    {                                                             \
-      uint##BITWIDTH##_t accum = *(uint##BITWIDTH##_t *)b++;      \
-      for (j = 0; j < BYTEWIDTH; ++j)                             \
-      {                                                           \
-        uint32_t c = (uint32_t)(accum & UCHAR_MAX);               \
-        s = (s << 8) ^ crctab[(s >> 24) ^ c];                     \
-        accum >>= 8;                                              \
-      }                                                           \
-    }                                                             \
+#define SWAP_CSUM(BITWIDTH,BYTEWIDTH,NACC)                              \
+  do {                                                                  \
+    register const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *)elems; \
+    for (size_t i = 0; i < num_elems; ++i) {                            \
+      for(size_t aofs = NACC; aofs > 0; --aofs) {                       \
+        uint##BITWIDTH##_t accum = b[i + aofs - 1];                     \
+        for (size_t j = 0; j < BYTEWIDTH; ++j) {                        \
+          uint32_t c = (uint32_t)(accum & UCHAR_MAX);                   \
+          s = (s << 8) ^ crctab[(s >> 24) ^ c];                         \
+          accum >>= 8;                                                  \
+        }                                                               \
+      }                                                                 \
+    }                                                                   \
   } while (0)
 
 
@@ -5893,25 +5932,24 @@ memcrc_r_eswap(uint32_t *state, const unsigned char *elems, size_t num_elems,
                size_t elem_size)
 {
 #ifdef WORDS_BIGENDIAN
-  register uint32_t c, s = *state;
-  register size_t n = block_len;
-  register unsigned char *b = elems;
+  register uint32_t s = *state;
 
   switch (elem_size)
   {
   case 1:
-    return memcrc_r(state, elems, num_elems, elem_size);
+    memcrc_r(state, elems, num_elems * elem_size);
+    return;
   case 2:
-    SWAP_CSUM(16,2);
+    SWAP_CSUM(16,2,1);
     break;
   case 4:
-    SWAP_CSUM(32,4);
+    SWAP_CSUM(32,4,1);
     break;
   case 8:
-    SWAP_CSUM(64,8);
+    SWAP_CSUM(64,8,1);
     break;
   case 16:
-    SWAP_CSUM(64,8);
+    SWAP_CSUM(64,8,2);
     break;
   }
   *state = s;
@@ -5936,6 +5974,16 @@ memcrc_finish(uint32_t *state, off_t total_size)
 
   return ~s;
 }
+
+/*
+ * Local Variables:
+ * c-file-style: "Java"
+ * c-basic-offset: 2
+ * indent-tabs-mode: nil
+ * show-trailing-whitespace: t
+ * require-trailing-newline: t
+ * End:
+ */
 #include <inttypes.h>
 #include <stdlib.h>
 
@@ -5945,7 +5993,7 @@ uint32_t cdiCheckSum(int type, int count, void *buffer)
   uint32_t s = 0U;
   xassert(count >= 0);
   size_t elemSize = (size_t)serializeGetSizeInCore(1, type, NULL);
-  memcrc_r_eswap(&s, buffer, count, elemSize);
+  memcrc_r_eswap(&s, (const unsigned char*) buffer, count, elemSize);
   s = memcrc_finish(&s, elemSize * (size_t)count);
   return s;
 }
@@ -5979,14 +6027,19 @@ char *Timeunits[] = {
 
 static int    taxisCompareP    ( void * taxisptr1, void * taxisptr2 );
 static void   taxisDestroyP    ( void * taxisptr );
-static void   taxisPrintP      ( void * taxisptr, FILE * fp );
+static void   taxisPrintKernel(taxis_t *taxisptr, FILE * fp);
 static int    taxisGetPackSize ( void * taxisptr, void *context );
 static void   taxisPack        ( void * taxisptr, void *buf, int size,
 				 int *position, void *context );
 static int    taxisTxCode      ( void );
 
-resOps taxisOps = { taxisCompareP, taxisDestroyP, taxisPrintP
-                    , taxisGetPackSize, taxisPack, taxisTxCode
+const resOps taxisOps = {
+  taxisCompareP,
+  taxisDestroyP,
+  (void (*)(void *, FILE *))taxisPrintKernel,
+  taxisGetPackSize,
+  taxisPack,
+  taxisTxCode
 };
 
 
@@ -6038,7 +6091,7 @@ void taxis_defaults(void)
 #endif
 
 static
-void taxisDefaultValue ( taxis_t *taxisptr )
+void taxisDefaultValue(taxis_t* taxisptr)
 {
   taxisptr->self        = CDI_UNDEFID;
   taxisptr->used        = FALSE;
@@ -6047,28 +6100,36 @@ void taxisDefaultValue ( taxis_t *taxisptr )
   taxisptr->vtime       = 0;
   taxisptr->rdate       = CDI_UNDEFID;
   taxisptr->rtime       = 0;
+  taxisptr->fdate       = CDI_UNDEFID;
+  taxisptr->ftime       = 0;
   taxisptr->calendar    = cdiDefaultCalendar;
   taxisptr->unit        = DefaultTimeUnit;
   taxisptr->numavg      = 0;
+  taxisptr->climatology = FALSE;
   taxisptr->has_bounds  = FALSE;
   taxisptr->vdate_lb    = 0;
   taxisptr->vtime_lb    = 0;
   taxisptr->vdate_ub    = 0;
   taxisptr->vtime_ub    = 0;
+  taxisptr->fc_unit     = DefaultTimeUnit;
+  taxisptr->fc_period   = 0;
   taxisptr->name        = NULL;
   taxisptr->longname    = NULL;
-  taxisptr->climatology = FALSE;
 }
 
-static
-taxis_t *taxisNewEntry(void)
+static taxis_t *
+taxisNewEntry(cdiResH resH)
 {
-  taxis_t *taxisptr;
+  taxis_t *taxisptr = (taxis_t*) xmalloc(sizeof(taxis_t));
 
-  taxisptr = (taxis_t *) xmalloc ( sizeof ( taxis_t ));
-
-  taxisDefaultValue ( taxisptr );
-  taxisptr->self = reshPut (( void * ) taxisptr, &taxisOps );
+  taxisDefaultValue(taxisptr);
+  if (resH == CDI_UNDEFID)
+    taxisptr->self = reshPut(taxisptr, &taxisOps);
+  else
+    {
+      taxisptr->self = resH;
+      reshReplace(resH, taxisptr, &taxisOps);
+    }
 
   return (taxisptr);
 }
@@ -6081,7 +6142,7 @@ void taxisInit (void)
 
   if ( taxisInitialized ) return;
 
-  taxisInitialized = 1; 
+  taxisInitialized = 1;
 
   env = getenv("TAXIS_DEBUG");
   if ( env ) TAXIS_Debug = atoi(env);
@@ -6091,9 +6152,7 @@ void taxisInit (void)
 static
 void taxis_copy(taxis_t *taxisptr2, taxis_t *taxisptr1)
 {
-  int taxisID2;
-
-  taxisID2 = taxisptr2->self;
+  int taxisID2 = taxisptr2->self;
   memcpy(taxisptr2, taxisptr1, sizeof(taxis_t));
   taxisptr2->self = taxisID2;
 }
@@ -6139,19 +6198,16 @@ taxisDefRtime(taxisID, 120000);
 */
 int taxisCreate(int taxistype)
 {
-  int taxisID;
-  taxis_t *taxisptr;
-
   if ( CDI_Debug )
     Message("taxistype: %d", taxistype);
 
   taxisInit ();
 
-  taxisptr = taxisNewEntry();
-
-  taxisID = taxisptr->self;
+  taxis_t *taxisptr = taxisNewEntry(CDI_UNDEFID);
   taxisptr->type = taxistype;
 
+  int taxisID = taxisptr->self;
+
   if ( CDI_Debug )
     Message("taxisID: %d", taxisID);
 
@@ -6161,11 +6217,9 @@ int taxisCreate(int taxistype)
 static
 void taxisDestroyKernel( taxis_t * taxisptr )
 {
-  int id;
-
   taxis_check_ptr(__func__, taxisptr);
 
-  id = taxisptr->self;
+  int id = taxisptr->self;
 
   free ( taxisptr );
 
@@ -6184,9 +6238,7 @@ void taxisDestroyKernel( taxis_t * taxisptr )
 */
 void taxisDestroy(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   if ( taxisptr->name     ) free(taxisptr->name);
   if ( taxisptr->longname ) free(taxisptr->longname);
@@ -6203,16 +6255,12 @@ void taxisDestroyP( void * taxisptr )
 
 int taxisDuplicate(int taxisID1)
 {
-  int taxisID2;
-  taxis_t *taxisptr1;
-  taxis_t *taxisptr2;
-
-  taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
+  taxis_t *taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
 
-  taxisptr2 = taxisNewEntry();
+  taxis_t *taxisptr2 = taxisNewEntry(CDI_UNDEFID);
   if ( ! taxisptr2 ) Error("No memory");
 
-  taxisID2 = taxisptr2->self;
+  int taxisID2 = taxisptr2->self;
 
   if ( CDI_Debug )
     Message("taxisID2: %d", taxisID2);
@@ -6229,15 +6277,13 @@ int taxisDuplicate(int taxisID1)
 
 void taxisDefType(int taxisID, int type)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6260,9 +6306,7 @@ The function @func{taxisDefVdate} defines the verification date of a Time axis.
 */
 void taxisDefVdate(int taxisID, int vdate)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6285,9 +6329,7 @@ The function @func{taxisDefVtime} defines the verification time of a Time axis.
 */
 void taxisDefVtime(int taxisID, int vtime)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6304,21 +6346,19 @@ void taxisDefVtime(int taxisID, int vtime)
     @Item  rdate    Reference date (YYYYMMDD)
 
 @Description
-The function @func{taxisDefVdate} defines the reference date of a Time axis.
+The function @func{taxisDefRdate} defines the reference date of a Time axis.
 
 @EndFunction
 */
 void taxisDefRdate(int taxisID, int rdate)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6335,21 +6375,19 @@ void taxisDefRdate(int taxisID, int rdate)
     @Item  rtime    Reference time (hhmmss)
 
 @Description
-The function @func{taxisDefVdate} defines the reference time of a Time axis.
+The function @func{taxisDefRtime} defines the reference time of a Time axis.
 
 @EndFunction
 */
 void taxisDefRtime(int taxisID, int rtime)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6357,6 +6395,64 @@ void taxisDefRtime(int taxisID, int rtime)
 }
 
 /*
+ at Function  taxisDefFdate
+ at Title     Define the forecast reference date
+
+ at Prototype void taxisDefFdate(int taxisID, int fdate)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  fdate    Forecast reference date (YYYYMMDD)
+
+ at Description
+The function @func{taxisDefFdate} defines the forecast reference date of a Time axis.
+
+ at EndFunction
+*/
+void taxisDefFdate(int taxisID, int fdate)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  taxisptr->fdate = fdate;
+}
+
+/*
+ at Function  taxisDefFtime
+ at Title     Define the forecast reference time
+
+ at Prototype void taxisDefFtime(int taxisID, int ftime)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  ftime    Forecast reference time (hhmmss)
+
+ at Description
+The function @func{taxisDefFtime} defines the forecast reference time of a Time axis.
+
+ at EndFunction
+*/
+void taxisDefFtime(int taxisID, int ftime)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  taxisptr->ftime = ftime;
+}
+
+/*
 @Function  taxisDefCalendar
 @Title     Define the calendar
 
@@ -6364,7 +6460,7 @@ void taxisDefRtime(int taxisID, int rtime)
 @Parameter
     @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
     @Item  calendar The type of the calendar, one of the set of predefined CDI calendar types.
-                    The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC}, 
+                    The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC},
                     @func{CALENDAR_360DAYS}, @func{CALENDAR_365DAYS} and @func{CALENDAR_366DAYS}.
 
 @Description
@@ -6374,15 +6470,13 @@ The function @func{taxisDefCalendar} defines the calendar of a Time axis.
 */
 void taxisDefCalendar(int taxisID, int calendar)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6392,15 +6486,13 @@ void taxisDefCalendar(int taxisID, int calendar)
 
 void taxisDefTunit(int taxisID, int unit)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6408,17 +6500,47 @@ void taxisDefTunit(int taxisID, int unit)
 }
 
 
-void taxisDefNumavg(int taxisID, int numavg)
+void taxisDefForecastTunit(int taxisID, int unit)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  taxisptr->fc_unit = unit;
+}
+
+
+void taxisDefForecastPeriod(int taxisID, double fc_period)
 {
-  taxis_t *taxisptr;
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  taxisptr->fc_period = fc_period;
+}
+
 
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+void taxisDefNumavg(int taxisID, int numavg)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6431,9 +6553,7 @@ The valid CDI time types are TAXIS_ABSOLUTE and TAXIS_RELATIVE.
 */
 int taxisInqType(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6443,9 +6563,7 @@ int taxisInqType(int taxisID)
 
 int taxisHasBounds(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6455,15 +6573,13 @@ int taxisHasBounds(int taxisID)
 
 void taxisDeleteBounds(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6473,11 +6589,8 @@ void taxisDeleteBounds(int taxisID)
 
 void taxisCopyTimestep(int taxisID2, int taxisID1)
 {
-  taxis_t *taxisptr1;
-  taxis_t *taxisptr2;
-
-  taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
-  taxisptr2 = ( taxis_t * ) reshGetVal ( taxisID2, &taxisOps );
+  taxis_t *taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
+  taxis_t *taxisptr2 = ( taxis_t * ) reshGetVal ( taxisID2, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr1);
   taxis_check_ptr(__func__, taxisptr2);
@@ -6498,6 +6611,12 @@ void taxisCopyTimestep(int taxisID2, int taxisID1)
       taxisptr2->vtime_ub = taxisptr1->vtime_ub;
     }
 
+  taxisptr2->fdate = taxisptr1->fdate;
+  taxisptr2->ftime = taxisptr1->ftime;
+
+  taxisptr2->fc_unit   = taxisptr1->fc_unit;
+  taxisptr2->fc_period = taxisptr1->fc_period;
+
   reshUnlock ();
 }
 
@@ -6507,7 +6626,7 @@ void taxisCopyTimestep(int taxisID2, int taxisID1)
 
 @Prototype int taxisInqVdate(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqVdate} returns the verification date of a Time axis.
@@ -6519,9 +6638,7 @@ The function @func{taxisInqVdate} returns the verification date of a Time axis.
 */
 int taxisInqVdate(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6531,9 +6648,7 @@ int taxisInqVdate(int taxisID)
 
 void taxisInqVdateBounds(int taxisID, int *vdate_lb, int *vdate_ub)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6544,21 +6659,19 @@ void taxisInqVdateBounds(int taxisID, int *vdate_lb, int *vdate_ub)
 
 void taxisDefVdateBounds(int taxisID, int vdate_lb, int vdate_ub)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
   taxisptr->vdate_lb = vdate_lb;
   taxisptr->vdate_ub = vdate_ub;
- 
+
   taxisptr->has_bounds = TRUE;
 }
 
@@ -6568,7 +6681,7 @@ void taxisDefVdateBounds(int taxisID, int vdate_lb, int vdate_ub)
 
 @Prototype int taxisInqVtime(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqVtime} returns the verification time of a Time axis.
@@ -6580,9 +6693,7 @@ The function @func{taxisInqVtime} returns the verification time of a Time axis.
 */
 int taxisInqVtime(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6592,9 +6703,7 @@ int taxisInqVtime(int taxisID)
 
 void taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6605,15 +6714,13 @@ void taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub)
 
 void taxisDefVtimeBounds(int taxisID, int vtime_lb, int vtime_ub)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6629,21 +6736,19 @@ void taxisDefVtimeBounds(int taxisID, int vtime_lb, int vtime_ub)
 
 @Prototype int taxisInqRdate(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqRdate} returns the reference date of a Time axis.
 
 @Result
- at func{taxisInqVdate} returns the reference date.
+ at func{taxisInqRdate} returns the reference date.
 
 @EndFunction
 */
 int taxisInqRdate(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6662,21 +6767,19 @@ int taxisInqRdate(int taxisID)
 
 @Prototype int taxisInqRtime(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqRtime} returns the reference time of a Time axis.
 
 @Result
- at func{taxisInqVtime} returns the reference time.
+ at func{taxisInqRtime} returns the reference time.
 
 @EndFunction
 */
 int taxisInqRtime(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6690,12 +6793,74 @@ int taxisInqRtime(int taxisID)
 }
 
 /*
+ at Function  taxisInqFdate
+ at Title     Get the forecast reference date
+
+ at Prototype int taxisInqFdate(int taxisID)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
+
+ at Description
+The function @func{taxisInqFdate} returns the forecast reference date of a Time axis.
+
+ at Result
+ at func{taxisInqFdate} returns the forecast reference date.
+
+ at EndFunction
+*/
+int taxisInqFdate(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  if ( taxisptr->fdate == -1 )
+    {
+      taxisptr->fdate = taxisptr->vdate;
+      taxisptr->ftime = taxisptr->vtime;
+    }
+
+  return (taxisptr->fdate);
+}
+
+/*
+ at Function  taxisInqFtime
+ at Title     Get the forecast reference time
+
+ at Prototype int taxisInqFtime(int taxisID)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
+
+ at Description
+The function @func{taxisInqFtime} returns the forecast reference time of a Time axis.
+
+ at Result
+ at func{taxisInqFtime} returns the forecast reference time.
+
+ at EndFunction
+*/
+int taxisInqFtime(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  if ( taxisptr->fdate == -1 )
+    {
+      taxisptr->fdate = taxisptr->vdate;
+      taxisptr->ftime = taxisptr->vtime;
+    }
+
+  return (taxisptr->ftime);
+}
+
+/*
 @Function  taxisInqCalendar
 @Title     Get the calendar
 
 @Prototype int taxisInqCalendar(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqCalendar} returns the calendar of a Time axis.
@@ -6703,16 +6868,14 @@ The function @func{taxisInqCalendar} returns the calendar of a Time axis.
 @Result
 @func{taxisInqCalendar} returns the type of the calendar,
 one of the set of predefined CDI calendar types.
-The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC}, 
+The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC},
 @func{CALENDAR_360DAYS}, @func{CALENDAR_365DAYS} and @func{CALENDAR_366DAYS}.
 
 @EndFunction
 */
 int taxisInqCalendar(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6722,9 +6885,7 @@ int taxisInqCalendar(int taxisID)
 
 int taxisInqTunit(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6732,11 +6893,29 @@ int taxisInqTunit(int taxisID)
 }
 
 
-int taxisInqNumavg(int taxisID)
+int taxisInqForecastTunit(int taxisID)
 {
-  taxis_t *taxisptr;
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_check_ptr(__func__, taxisptr);
+
+  return (taxisptr->fc_unit);
+}
+
+
+double taxisInqForecastPeriod(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  return (taxisptr->fc_period);
+}
+
+
+int taxisInqNumavg(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -6746,9 +6925,7 @@ int taxisInqNumavg(int taxisID)
 
 taxis_t *taxisPtr(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -7083,6 +7260,66 @@ void splitTimevalue(double timevalue, int timeunit, int *date, int *time)
 }
 
 
+void cdiSetForecastPeriod(double timevalue, taxis_t *taxis)
+{
+  int year, month, day, hour, minute, second;
+  int vdate, vtime;
+  int timeunit;
+  int calendar;
+  int julday, secofday, days, secs;
+
+  (*taxis).fc_period = timevalue;
+
+  timeunit = (*taxis).fc_unit;
+  calendar = (*taxis).calendar;
+
+  vdate  = (*taxis).vdate;
+  vtime  = (*taxis).vtime;
+
+  if ( vdate == 0 && vtime == 0 && DBL_IS_EQUAL(timevalue, 0.) ) return;
+
+  cdiDecodeDate(vdate, &year, &month, &day);
+  cdiDecodeTime(vtime, &hour, &minute, &second);
+
+  if ( timeunit == TUNIT_MONTH && calendar == CALENDAR_360DAYS )
+    {
+      timeunit = TUNIT_DAY;
+      timevalue *= 30;
+    }
+
+  if ( timeunit == TUNIT_MONTH || timeunit == TUNIT_YEAR )
+    {
+      int nmon, dpm;
+      double fmon;
+
+      if ( timeunit == TUNIT_YEAR ) timevalue *= 12;
+
+      nmon = (int) timevalue;
+      fmon = timevalue - nmon;
+
+      month -= nmon;
+
+      while ( month > 12 ) { month -= 12; year++; }
+      while ( month <  1 ) { month += 12; year--; }
+
+      dpm = days_per_month(calendar, year, month);
+      timeunit = TUNIT_DAY;
+      timevalue = fmon*dpm;
+    }
+
+  encode_caldaysec(calendar, year, month, day, hour, minute, second, &julday, &secofday);
+
+  cdiDecodeTimevalue(timeunit, timevalue, &days, &secs);
+
+  julday_add(-days, -secs, &julday, &secofday);
+
+  decode_caldaysec(calendar, julday, secofday, &year, &month, &day, &hour, &minute, &second);
+
+  (*taxis).fdate = cdiEncodeDate(year, month, day);
+  (*taxis).ftime = cdiEncodeTime(hour, minute, second);
+}
+
+
 void cdiDecodeTimeval(double timevalue, taxis_t *taxis, int *date, int *time)
 {
   if ( taxis->type == TAXIS_ABSOLUTE )
@@ -7148,21 +7385,26 @@ void ptaxisCopy(taxis_t *dest, taxis_t *source)
   dest->vtime       = source->vtime;
   dest->rdate       = source->rdate;
   dest->rtime       = source->rtime;
+  dest->fdate       = source->fdate;
+  dest->ftime       = source->ftime;
   dest->calendar    = source->calendar;
   dest->unit        = source->unit;
   dest->numavg      = source->numavg;
+  dest->climatology = source->climatology;
   dest->has_bounds  = source->has_bounds;
   dest->vdate_lb    = source->vdate_lb;
   dest->vtime_lb    = source->vtime_lb;
   dest->vdate_ub    = source->vdate_ub;
   dest->vtime_ub    = source->vtime_ub;
-  dest->climatology = source->climatology;
+  dest->fc_unit     = source->fc_unit;
+  dest->fc_period   = source->fc_period;
 
   reshUnlock ();
 }
 
 
-void taxisPrintKernel ( taxis_t * taxisptr, FILE * fp )
+static void
+taxisPrintKernel(taxis_t * taxisptr, FILE * fp)
 {
   int vdate_lb, vdate_ub;
   int vtime_lb, vtime_ub;
@@ -7182,6 +7424,8 @@ void taxisPrintKernel ( taxis_t * taxisptr, FILE * fp )
   fprintf ( fp, "vtime       = %d\n", taxisptr->vtime );
   fprintf ( fp, "rdate       = %d\n", taxisptr->rdate );
   fprintf ( fp, "rtime       = %d\n", taxisptr->rtime );
+  fprintf ( fp, "fdate       = %d\n", taxisptr->fdate );
+  fprintf ( fp, "ftime       = %d\n", taxisptr->ftime );
   fprintf ( fp, "calendar    = %d\n", taxisptr->calendar );
   fprintf ( fp, "unit        = %d\n", taxisptr->unit );
   fprintf ( fp, "numavg      = %d\n", taxisptr->numavg );
@@ -7191,6 +7435,8 @@ void taxisPrintKernel ( taxis_t * taxisptr, FILE * fp )
   fprintf ( fp, "vtime_lb    = %d\n", vtime_lb );
   fprintf ( fp, "vdate_ub    = %d\n", vdate_ub );
   fprintf ( fp, "vtime_ub    = %d\n", vtime_ub );
+  fprintf ( fp, "fc_unit     = %d\n", taxisptr->fc_unit );
+  fprintf ( fp, "fc_period   = %g\n", taxisptr->fc_period );
   fprintf ( fp, "\n");
 }
 
@@ -7202,12 +7448,8 @@ void taxisPrint ( int taxisID )
   taxisPrintKernel ( taxisptr, stdout );
 }
 
-void taxisPrintP ( void * taxisptr, FILE * fp )
-{
-  taxisPrintKernel (( taxis_t * ) taxisptr, fp );
-}
-
-int taxisCompareP ( void *  taxisptr1, void * taxisptr2 )
+static int
+taxisCompareP(void *taxisptr1, void *taxisptr2)
 {
   taxis_t * t1, * t2;
 
@@ -7223,8 +7465,11 @@ int taxisCompareP ( void *  taxisptr1, void * taxisptr2 )
 	     t1->vtime       == t2->vtime       &&
 	     t1->rdate       == t2->rdate       &&
 	     t1->rtime       == t2->rtime       &&
+	     t1->fdate       == t2->fdate       &&
+	     t1->ftime       == t2->ftime       &&
 	     t1->calendar    == t2->calendar    &&
 	     t1->unit        == t2->unit        &&
+	     t1->fc_unit     == t2->fc_unit     &&
 	     t1->numavg      == t2->numavg      &&
 	     t1->climatology == t2->climatology &&
 	     t1->has_bounds  == t2->has_bounds  &&
@@ -7241,12 +7486,12 @@ taxisTxCode ( void )
   return TAXIS;
 }
 
-enum { taxisNint = 18 };
+enum { taxisNint = 21 };
 
 static int
 taxisGetPackSize(void *p, void *context)
 {
-  taxis_t *taxisptr = p;
+  taxis_t *taxisptr = (taxis_t*) p;
   int packBufferSize
     = serializeGetSize(taxisNint, DATATYPE_INT, context)
     + serializeGetSize(1, DATATYPE_UINT32, context)
@@ -7260,11 +7505,12 @@ taxisGetPackSize(void *p, void *context)
 
 int
 taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
-            int nspTarget, void *context, int checkForSameID)
+            int originNamespace, void *context, int force_id)
 {
   taxis_t * taxisP;
   int intBuffer[taxisNint];
   uint32_t d;
+  int idx = 0;
 
   serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                   intBuffer, taxisNint, DATATYPE_INT, context);
@@ -7275,47 +7521,50 @@ taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
 
   taxisInit();
 
-  taxisP = taxisNewEntry();
-  if ( ! taxisP ) Error("No memory");
-
-  xassert(!checkForSameID
-          || namespaceAdaptKey(intBuffer[0], nspTarget) == taxisP->self);
-
-  taxisP->used        = intBuffer[1];
-  taxisP->type        = intBuffer[2];
-  taxisP->vdate       = intBuffer[3];
-  taxisP->vtime       = intBuffer[4];
-  taxisP->rdate       = intBuffer[5];
-  taxisP->rtime       = intBuffer[6];
-  taxisP->calendar    = intBuffer[7];
-  taxisP->unit        = intBuffer[8];
-  taxisP->numavg      = intBuffer[9];
-  taxisP->has_bounds  = intBuffer[10];
-  taxisP->vdate_lb    = intBuffer[11];
-  taxisP->vtime_lb    = intBuffer[12];
-  taxisP->vdate_ub    = intBuffer[13];
-  taxisP->vtime_ub    = intBuffer[14];
-  if (intBuffer[15])
-    {
-      size_t len = intBuffer[15];
-      char *name = xmalloc(len + 1);
+  cdiResH targetID = namespaceAdaptKey(intBuffer[idx++], originNamespace);
+  taxisP = taxisNewEntry(force_id?targetID:CDI_UNDEFID);
+
+  xassert(!force_id || targetID == taxisP->self);
+
+  taxisP->used        = intBuffer[idx++];
+  taxisP->type        = intBuffer[idx++];
+  taxisP->vdate       = intBuffer[idx++];
+  taxisP->vtime       = intBuffer[idx++];
+  taxisP->rdate       = intBuffer[idx++];
+  taxisP->rtime       = intBuffer[idx++];
+  taxisP->fdate       = intBuffer[idx++];
+  taxisP->ftime       = intBuffer[idx++];
+  taxisP->calendar    = intBuffer[idx++];
+  taxisP->unit        = intBuffer[idx++];
+  taxisP->fc_unit     = intBuffer[idx++];
+  taxisP->numavg      = intBuffer[idx++];
+  taxisP->climatology = intBuffer[idx++];
+  taxisP->has_bounds  = intBuffer[idx++];
+  taxisP->vdate_lb    = intBuffer[idx++];
+  taxisP->vtime_lb    = intBuffer[idx++];
+  taxisP->vdate_ub    = intBuffer[idx++];
+  taxisP->vtime_ub    = intBuffer[idx++];
+
+  if (intBuffer[idx])
+    {
+      size_t len = intBuffer[idx];
+      char *name = (char*) xmalloc(len + 1);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       name, len, DATATYPE_TXT, context);
       name[len] = '\0';
       taxisP->name = name;
     }
-  if (intBuffer[16])
+  idx++;
+  if (intBuffer[idx])
     {
-      size_t len = intBuffer[16];
-      char *longname = xmalloc(len + 1);
+      size_t len = intBuffer[idx];
+      char *longname = (char*) xmalloc(len + 1);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       longname, len, DATATYPE_TXT, context);
       longname[len] = '\0';
       taxisP->longname = longname;
     }
 
-  taxisP->climatology = intBuffer[17];
-
   return taxisP->self;
 }
 
@@ -7327,25 +7576,29 @@ taxisPack(void * voidP, void * packBuffer, int packBufferSize, int * packBufferP
   taxis_t *taxisP = (taxis_t *)voidP;
   int intBuffer[taxisNint];
   uint32_t d;
-
-  intBuffer[0]  = taxisP->self;
-  intBuffer[1]  = taxisP->used;
-  intBuffer[2]  = taxisP->type;
-  intBuffer[3]  = taxisP->vdate;
-  intBuffer[4]  = taxisP->vtime;
-  intBuffer[5]  = taxisP->rdate;
-  intBuffer[6]  = taxisP->rtime;
-  intBuffer[7]  = taxisP->calendar;
-  intBuffer[8]  = taxisP->unit;
-  intBuffer[9]  = taxisP->numavg;
-  intBuffer[10] = taxisP->has_bounds;
-  intBuffer[11] = taxisP->vdate_lb;
-  intBuffer[12] = taxisP->vtime_lb;
-  intBuffer[13] = taxisP->vdate_ub;
-  intBuffer[14] = taxisP->vtime_ub;
-  intBuffer[15] = taxisP->name ? strlen(taxisP->name) : 0;
-  intBuffer[16] = taxisP->longname ? strlen(taxisP->longname) : 0;
-  intBuffer[17] = taxisP->climatology;
+  int idx = 0;
+
+  intBuffer[idx++] = taxisP->self;
+  intBuffer[idx++] = taxisP->used;
+  intBuffer[idx++] = taxisP->type;
+  intBuffer[idx++] = taxisP->vdate;
+  intBuffer[idx++] = taxisP->vtime;
+  intBuffer[idx++] = taxisP->rdate;
+  intBuffer[idx++] = taxisP->rtime;
+  intBuffer[idx++] = taxisP->fdate;
+  intBuffer[idx++] = taxisP->ftime;
+  intBuffer[idx++] = taxisP->calendar;
+  intBuffer[idx++] = taxisP->unit;
+  intBuffer[idx++] = taxisP->fc_unit;
+  intBuffer[idx++] = taxisP->numavg;
+  intBuffer[idx++] = taxisP->climatology;
+  intBuffer[idx++] = taxisP->has_bounds;
+  intBuffer[idx++] = taxisP->vdate_lb;
+  intBuffer[idx++] = taxisP->vtime_lb;
+  intBuffer[idx++] = taxisP->vdate_ub;
+  intBuffer[idx++] = taxisP->vtime_ub;
+  intBuffer[idx++] = taxisP->name ? strlen(taxisP->name) : 0;
+  intBuffer[idx++] = taxisP->longname ? strlen(taxisP->longname) : 0;
 
   serializePack(intBuffer, taxisNint, DATATYPE_INT,
                 packBuffer, packBufferSize, packBufferPos, context);
@@ -8071,7 +8324,6 @@ model_t;
 
 
 static int  MODEL_Debug = 0;   /* If set to 1, debugging */
-static int * modelInitializedNsp;
 
 static void modelInit(void);
 
@@ -8084,8 +8336,13 @@ static void   modelPackP    ( void * modelptr, void * buff, int size,
                               int *position, void *context);
 static int    modelTxCode   ( void );
 
-resOps modelOps = { modelCompareP, modelDestroyP, modelPrintP
-                    , modelGetSizeP, modelPackP, modelTxCode
+static const resOps modelOps = {
+  modelCompareP,
+  modelDestroyP,
+  modelPrintP,
+  modelGetSizeP,
+  modelPackP,
+  modelTxCode
 };
 
 static
@@ -8098,27 +8355,33 @@ void modelDefaultValue ( model_t *modelptr )
   modelptr->name        = NULL;
 }
 
-static
-model_t *modelNewEntry ( void )
+static model_t *
+modelNewEntry(cdiResH resH, int instID, int modelgribID, const char *name)
 {
   model_t *modelptr;
 
   modelptr = (model_t *) xmalloc(sizeof(model_t));
   modelDefaultValue ( modelptr );
-  modelptr->self = reshPut (( void * ) modelptr, &modelOps );
+  if (resH == CDI_UNDEFID)
+    modelptr->self = reshPut(modelptr, &modelOps);
+  else
+    {
+      modelptr->self = resH;
+      reshReplace(resH, modelptr, &modelOps);
+    }
   modelptr->used = 1;
+  modelptr->instID = instID;
+  modelptr->modelgribID = modelgribID;
+  if ( name && *name ) modelptr->name = strdupx(name);
 
   return (modelptr);
 }
 
-
-int modelDef(int instID, int modelgribID, const char *name);
-
-static
 void modelDefaultEntries ( void )
 {
   int instID, i;
-  cdiResH resH[10];
+  enum { nDefModels = 10 };
+  cdiResH resH[nDefModels];
 
   instID  = institutInq(  0,   0, "ECMWF", NULL);
   /* (void)    modelDef(instID, 131, "ERA15"); */
@@ -8144,42 +8407,21 @@ void modelDefaultEntries ( void )
 
   instID  = institutInq(  0,   1, "NCEP", NULL);
   resH[9] = modelDef(instID,  80, "T62L28MRF");
-  
-  for ( i = 0; i < 10 ; i++ )
-    reshSetStatus(resH[i], &modelOps, SUSPENDED);
-}
 
-static
-void modelFinalize ( void )
-{
-  free (   modelInitializedNsp );
+  for ( i = 0; i < nDefModels ; i++ )
+    reshSetStatus(resH[i], &modelOps, RESH_PRE_ASSIGNED);
 }
 
 static
 void modelInit(void)
 {
   static int modelInitialized = 0;
-  int nsp, nspc;
-  char *env;
 
-  nspc = namespaceGetNumber ();
-  
-  if ( !modelInitialized )
-    {
-      modelInitialized = 1;
-      modelInitializedNsp = xcalloc ( 1, nspc * sizeof ( int ));
-      atexit ( modelFinalize );
-      env = getenv("MODEL_DEBUG");
-      if ( env ) MODEL_Debug = atoi(env);  
-    }
+  if (modelInitialized) return;
 
-  nsp = namespaceGetActive ();
-  
-  if ( modelInitializedNsp[nsp] ) return;
-  
-  modelInitializedNsp[nsp] = 1;
-  
-  modelDefaultEntries ();
+  modelInitialized = 1;
+  char *env = getenv("MODEL_DEBUG");
+  if ( env ) MODEL_Debug = atoi(env);
 }
 
 int modelSize ( void )
@@ -8196,8 +8438,8 @@ struct modelLoc
 static enum cdiApplyRet
 findModelByID(int resID, void *res, void *data)
 {
-  model_t *modelptr = res;
-  struct modelLoc *ret = data;
+  model_t *modelptr = (model_t*) res;
+  struct modelLoc *ret = (struct modelLoc*) data;
   int instID = ret->instID, modelgribID = ret->modelgribID;
   if (modelptr->used
       && modelptr->instID == instID
@@ -8213,8 +8455,8 @@ findModelByID(int resID, void *res, void *data)
 static enum cdiApplyRet
 findModelByName(int resID, void *res, void *data)
 {
-  model_t *modelptr = res;
-  struct modelLoc *ret = data;
+  model_t *modelptr = (model_t*) res;
+  struct modelLoc *ret = (struct modelLoc*) data;
   int instID = ret->instID, modelgribID = ret->modelgribID;
   const char *name = ret->name;
   if (modelptr->used
@@ -8255,11 +8497,7 @@ int modelDef(int instID, int modelgribID, const char *name)
 
   modelInit ();
 
-  modelptr = modelNewEntry();
-
-  modelptr->instID      = instID;
-  modelptr->modelgribID = modelgribID;
-  if ( name && *name ) modelptr->name = strdupx(name);
+  modelptr = modelNewEntry(CDI_UNDEFID, instID, modelgribID, name);
 
   return modelptr->self;
 }
@@ -8312,12 +8550,16 @@ int  modelCompareP ( void * modelptr1, void * modelptr2 )
 
 void modelDestroyP ( void * modelptr )
 {
+  model_t *mp = (model_t*) modelptr;
+  if (mp->name)
+    free(mp->name);
+  free(mp);
 }
 
 
 void modelPrintP   ( void * modelptr, FILE * fp )
 {
-  model_t * mp = ( model_t * ) modelptr;
+  model_t *mp = (model_t*) modelptr;
 
   if ( !mp ) return;
 
@@ -8345,7 +8587,7 @@ enum {
 
 static int modelGetSizeP(void * modelptr, void *context)
 {
-  model_t *p = modelptr;
+  model_t *p = (model_t*) modelptr;
   int txsize = serializeGetSize(model_nints, DATATYPE_INT, context)
     + serializeGetSize(p->name?strlen(p->name) + 1:0, DATATYPE_TXT, context);
   return txsize;
@@ -8354,7 +8596,7 @@ static int modelGetSizeP(void * modelptr, void *context)
 
 static void modelPackP(void * modelptr, void * buf, int size, int *position, void *context)
 {
-  model_t *p = modelptr;
+  model_t *p = (model_t*) modelptr;
   int tempbuf[model_nints];
   tempbuf[0] = p->self;
   tempbuf[1] = p->instID;
@@ -8366,25 +8608,30 @@ static void modelPackP(void * modelptr, void * buf, int size, int *position, voi
 }
 
 int
-modelUnpack(void *buf, int size, int *position, int nspTarget, void *context)
+modelUnpack(void *buf, int size, int *position, int originNamespace, void *context,
+            int force_id)
 {
   int tempbuf[model_nints];
-  int modelID;
   char *name;
   serializeUnpack(buf, size, position, tempbuf, model_nints, DATATYPE_INT, context);
   if (tempbuf[3] != 0)
     {
-      name = xmalloc(tempbuf[3]);
+      name = (char*) xmalloc(tempbuf[3]);
       serializeUnpack(buf, size, position, name, tempbuf[3], DATATYPE_TXT, context);
     }
   else
     {
       name = "";
     }
-  modelID = modelDef( namespaceAdaptKey ( tempbuf[1], nspTarget ), tempbuf[2], name);
-  // FIXME: this should work, once all types are transferred
-  //assert(modelID == tempbuf[0]);
-  return modelID;
+  int targetID = namespaceAdaptKey(tempbuf[0], originNamespace);
+  model_t *mp = modelNewEntry(force_id?targetID:CDI_UNDEFID,
+                              namespaceAdaptKey(tempbuf[1], originNamespace),
+                              tempbuf[2], name);
+  if (tempbuf[3] != 0)
+    free(name);
+  xassert(!force_id
+          || (mp->self == namespaceAdaptKey(tempbuf[0], originNamespace)));
+  return mp->self;
 }
 
 /*
@@ -8420,18 +8667,21 @@ typedef struct
 institute_t;
 
 
-static int    instituteCompareP ( void * instituteptr1, void * instituteptr2 );
-static void   instituteDestroyP ( void * instituteptr );
-static void   institutePrintP   ( void * instituteptr, FILE * fp );
-static int    instituteGetSizeP ( void * instituteptr, void *context );
+static int instituteCompareKernel(institute_t *ip1, institute_t *ip2);
+static void instituteDestroyP(institute_t *instituteptr);
+static void   institutePrintP(institute_t *instituteptr, FILE * fp);
+static int instituteGetPackSize(institute_t *instituteptr, void *context);
 static void   institutePackP    ( void * instituteptr, void *buf, int size, int *position, void *context );
 static int    instituteTxCode   ( void );
 
-resOps instituteOps = { instituteCompareP, instituteDestroyP, institutePrintP
-                        ,instituteGetSizeP, institutePackP, instituteTxCode
- };
-
-static int * instituteInitializedNsp;
+static const resOps instituteOps = {
+  (int (*)(void *, void *))instituteCompareKernel,
+  (void (*)(void *))instituteDestroyP,
+  (void (*)(void *, FILE *))institutePrintP,
+  (int (*)(void *, void *))instituteGetPackSize,
+  institutePackP,
+  instituteTxCode
+};
 
 static
 void instituteDefaultValue ( institute_t * instituteptr )
@@ -8444,21 +8694,6 @@ void instituteDefaultValue ( institute_t * instituteptr )
   instituteptr->longname   = NULL;
 }
 
-static
-institute_t * instituteNewEntry ( void )
-{
-  institute_t *instituteptr;
-
-  instituteptr = ( institute_t * ) xmalloc ( sizeof ( institute_t ));
-
-  instituteDefaultValue ( instituteptr );
-  instituteptr->self = reshPut (( void * ) instituteptr, &instituteOps );
-  instituteptr->used = 1;
-
-  return  instituteptr;
-}
-
-static
 void instituteDefaultEntries ( void )
 {
   cdiResH resH[64];
@@ -8480,35 +8715,7 @@ void instituteDefaultEntries ( void )
   /*     (void) institutDef(  0,   0, "IPSL", "IPSL (Institut Pierre Simon Laplace, Paris, France)"); */
 
   for ( i = 0; i < n ; i++ )
-    reshSetStatus(resH[i], &instituteOps, SUSPENDED);
-}
-
-static
-void instituteFinalize ( void )
-{
-  free ( instituteInitializedNsp );
-}
-
-static
-void instituteInit (void)
-{
-  static int instituteInitialized = 0;
-  int nsp, nspc;
-
-  nspc = namespaceGetNumber ();
-
-  if ( !instituteInitialized )
-    {
-      instituteInitialized = 1;
-      instituteInitializedNsp = xcalloc ( 1, nspc * sizeof ( int ));
-      atexit ( instituteFinalize );
-    }
-
-  nsp = namespaceGetActive ();
-  if ( instituteInitializedNsp[nsp] ) return;
-  instituteInitializedNsp[nsp] = 1;
-
-  instituteDefaultEntries();
+    reshSetStatus(resH[i], &instituteOps, RESH_PRE_ASSIGNED);
 }
 
 
@@ -8518,7 +8725,8 @@ int instituteCount ( void )
 }
 
 
-int instituteCompareKernel ( institute_t *  ip1, institute_t * ip2 )
+static int
+instituteCompareKernel(institute_t *  ip1, institute_t * ip2)
 {
   int differ = 0;
   size_t len1, len2;
@@ -8557,19 +8765,6 @@ int instituteCompareKernel ( institute_t *  ip1, institute_t * ip2 )
 }
 
 
-static int instituteCompareP ( void *  instituteptr1, void * instituteptr2 )
-{
-  institute_t * i1, * i2;
-
-  i1 = ( institute_t * ) instituteptr1;
-  i2 = ( institute_t * ) instituteptr2;
-
-  xassert(i1);
-  xassert(i2);
-
-  return instituteCompareKernel ( i1, i2 );
-}
-
 struct instLoc
 {
   institute_t *ip;
@@ -8580,7 +8775,7 @@ static enum cdiApplyRet
 findInstitute(int id, void *res, void *data)
 {
   institute_t * ip1 = ((struct instLoc *)data)->ip;
-  institute_t * ip2 = res;
+  institute_t * ip2 = (institute_t*) res;
   if (ip2->used && !instituteCompareKernel(ip1, ip2))
     {
       ((struct instLoc *)data)->id = id;
@@ -8593,9 +8788,7 @@ findInstitute(int id, void *res, void *data)
 
 int institutInq(int center, int subcenter, const char *name, const char *longname)
 {
-  instituteInit ();
-
-  institute_t * ip_ref = xmalloc(sizeof (*ip_ref));
+  institute_t * ip_ref = (institute_t *)xmalloc(sizeof (*ip_ref));
   ip_ref->self       = UNDEFID;
   ip_ref->used       = 0;
   ip_ref->center     = center;
@@ -8611,20 +8804,34 @@ int institutInq(int center, int subcenter, const char *name, const char *longnam
   return state.id;
 }
 
-
-int institutDef(int center, int subcenter, const char *name, const char *longname)
+static
+institute_t *instituteNewEntry(cdiResH resH, int center, int subcenter,
+                               const char *name, const char *longname)
 {
-  institute_t * instituteptr;
-
-  instituteInit ();
-
-  instituteptr = instituteNewEntry();
-
-  instituteptr->center    = center;
+  institute_t *instituteptr = (institute_t*) xmalloc(sizeof(institute_t));
+  instituteDefaultValue(instituteptr);
+  if (resH == CDI_UNDEFID)
+    instituteptr->self = reshPut(instituteptr, &instituteOps);
+  else
+    {
+      instituteptr->self = resH;
+      reshReplace(resH, instituteptr, &instituteOps);
+    }
+  instituteptr->used = 1;
+  instituteptr->center = center;
   instituteptr->subcenter = subcenter;
-  if ( name && *name )         instituteptr->name     = strdupx(name);
-  if ( longname && *longname ) instituteptr->longname = strdupx(longname);
+  if ( name && *name )
+    instituteptr->name = strdupx(name);
+  if (longname && *longname)
+    instituteptr->longname = strdupx(longname);
+  return  instituteptr;
+}
+
 
+int institutDef(int center, int subcenter, const char *name, const char *longname)
+{
+  institute_t * instituteptr
+    = instituteNewEntry(CDI_UNDEFID, center, subcenter, name, longname);
   return instituteptr->self;
 }
 
@@ -8633,8 +8840,6 @@ int institutInqCenter(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -8646,8 +8851,6 @@ int institutInqSubcenter(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -8659,8 +8862,6 @@ char *institutInqNamePtr(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -8672,8 +8873,6 @@ char *institutInqLongnamePtr(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -8692,43 +8891,39 @@ int institutInqNumber(void)
 {
   int instNum = 0;
 
-  instituteInit ();
-
   cdiResHFilterApply(&instituteOps, activeInstitutes, &instNum);
   return instNum;
 }
 
 
-void instituteDestroyP ( void * instituteptr )
+static void
+instituteDestroyP(institute_t *instituteptr)
 {
-  int id;
-  institute_t * i1 = ( institute_t * ) instituteptr;
-
-  xassert ( i1 );
-
-  id = i1->self;
-
-  if ( instituteptr ) free ( instituteptr );
+  xassert(instituteptr);
 
-  reshRemove ( id, &instituteOps );
+  int instituteID = instituteptr->self;
+  free(instituteptr->name);
+  free(instituteptr->longname);
+  reshRemove(instituteID, &instituteOps);
+  free(instituteptr);
 }
 
 
-void institutePrintP   ( void * instituteptr, FILE * fp )
+static void institutePrintP(institute_t *ip, FILE * fp )
 {
-  institute_t * ip = ( institute_t * ) instituteptr;
-
-  if ( !ip ) return;
-
-  fprintf ( fp, "#\n");
-  fprintf ( fp, "# instituteID %d\n", ip->self);
-  fprintf ( fp, "#\n");
-  fprintf ( fp, "self          = %d\n", ip->self );
-  fprintf ( fp, "used          = %d\n", ip->used );
-  fprintf ( fp, "center        = %d\n", ip->center );
-  fprintf ( fp, "subcenter     = %d\n", ip->subcenter );
-  fprintf ( fp, "name          = %s\n", ip->name ? ip->name : "NN" );
-  fprintf ( fp, "longname      = %s\n", ip->longname ? ip->longname : "NN" );
+  if (ip)
+    fprintf(fp, "#\n"
+            "# instituteID %d\n"
+            "#\n"
+            "self          = %d\n"
+            "used          = %d\n"
+            "center        = %d\n"
+            "subcenter     = %d\n"
+            "name          = %s\n"
+            "longname      = %s\n",
+            ip->self, ip->self, ip->used, ip->center, ip->subcenter,
+            ip->name ? ip->name : "NN",
+            ip->longname ? ip->longname : "NN");
 }
 
 
@@ -8742,18 +8937,17 @@ enum {
   institute_nints = 5,
 };
 
-static int instituteGetSizeP ( void * instituteptr, void *context)
+static int instituteGetPackSize(institute_t *ip, void *context)
 {
-  institute_t *p = instituteptr;
   int txsize = serializeGetSize(institute_nints, DATATYPE_INT, context)
-    + serializeGetSize(strlen(p->name) + 1, DATATYPE_TXT, context)
-    + serializeGetSize(strlen(p->longname) + 1, DATATYPE_TXT, context);
+    + serializeGetSize(strlen(ip->name) + 1, DATATYPE_TXT, context)
+    + serializeGetSize(strlen(ip->longname) + 1, DATATYPE_TXT, context);
   return txsize;
 }
 
 static void institutePackP(void * instituteptr, void *buf, int size, int *position, void *context)
 {
-  institute_t *p = instituteptr;
+  institute_t *p = (institute_t*) instituteptr;
   int tempbuf[institute_nints];
   tempbuf[0] = p->self;
   tempbuf[1] = p->center;
@@ -8765,19 +8959,23 @@ static void institutePackP(void * instituteptr, void *buf, int size, int *positi
   serializePack(p->longname, tempbuf[4], DATATYPE_TXT, buf, size, position, context);
 }
 
-int instituteUnpack(void *buf, int size, int *position, int nspTarget, void *context)
+int instituteUnpack(void *buf, int size, int *position, int originNamespace,
+                    void *context, int force_id)
 {
   int tempbuf[institute_nints];
   int instituteID;
   char *name, *longname;
   serializeUnpack(buf, size, position, tempbuf, institute_nints, DATATYPE_INT, context);
-  name = xmalloc(tempbuf[3]);
-  longname = xmalloc(tempbuf[4]);
+  name = (char *)xmalloc(tempbuf[3] + tempbuf[4]);
+  longname = name + tempbuf[3];
   serializeUnpack(buf, size, position, name, tempbuf[3], DATATYPE_TXT, context);
   serializeUnpack(buf, size, position, longname, tempbuf[4], DATATYPE_TXT, context);
-  instituteID = institutDef(tempbuf[1], tempbuf[2], name, longname);
-  // FIXME: this should work, once all types are transferred
-  //xassert(instituteID == tempbuf[0]);
+  int targetID = namespaceAdaptKey(tempbuf[0], originNamespace);
+  institute_t *ip = instituteNewEntry(force_id?targetID:CDI_UNDEFID,
+                                      tempbuf[1], tempbuf[2], name, longname);
+  instituteID = ip->self;
+  xassert(!force_id || instituteID == targetID);
+  free(name);
   return instituteID;
 }
 
@@ -9959,13 +10157,12 @@ void cpledn(int kn, int kodd, double *pfn, double pdx, int kflag,
 }
 
 static
-void gawl(double *pfn, double *pl, double *pw, int kn, int *kiter)
+void gawl(double *pfn, double *pl, double *pw, int kn)
 {
   int iodd;
   double pmod = 0;
   int iflag;
   int itemax;
-  int jter;
   double zw = 0;
   double zdlx;
   double zdlxn = 0;
@@ -9981,9 +10178,8 @@ void gawl(double *pfn, double *pl, double *pw, int kn, int *kiter)
 
   /* 2.0 Newton iteration */
 
-  for (jter = 1; jter <= itemax+1; jter++) 
+  for (int jter = 1; jter <= itemax+1; jter++)
     {
-      *kiter = jter;
       cpledn(kn, iodd, pfn, zdlx, iflag, &zw, &zdlxn, &pmod);
       zdlx = zdlxn;
       if (iflag == 1) break;
@@ -9997,7 +10193,7 @@ void gawl(double *pfn, double *pl, double *pw, int kn, int *kiter)
 }
 
 static
-void gauaw(int kn, double *pl, double *pw)
+void gauaw(int kn, double *restrict pl, double *restrict pw)
 {
   /*
    * 1.0 Initialize Fourier coefficients for ordinary Legendre polynomials
@@ -10009,11 +10205,8 @@ void gauaw(int kn, double *pl, double *pw)
 
   double z, zfnn;
 
-  int *iter;
-
   int ik, ins2, isym, jgl, jglm1, jn, iodd;
 
-  iter   = (int *)    malloc(kn*sizeof(int));
   zfn    = (double *) malloc((kn+1)*(kn+1)*sizeof(double));
   zfnlat = (double *) malloc((kn/2+1+1)*sizeof(double));  
 
@@ -10065,7 +10258,7 @@ void gauaw(int kn, double *pl, double *pw)
   for (jgl = ins2; jgl >= 1 ; jgl--) 
     {
       jglm1 = jgl-1;
-      gawl(zfnlat, &(pl[jglm1]), &(pw[jglm1]), kn, &(iter[jglm1]));
+      gawl(zfnlat, &(pl[jglm1]), &(pw[jglm1]), kn);
     }
 
   /* convert to physical latitude */
@@ -10085,7 +10278,6 @@ void gauaw(int kn, double *pl, double *pw)
 
   free(zfnlat);
   free(zfn);
-  free(iter);
 
   return;
 }
@@ -10183,7 +10375,7 @@ void gauaw_old(double *pa, double *pw, int nlat)
 }
 #endif
 
-void gaussaw(double *pa, double *pw, int nlat)
+void gaussaw(double *restrict pa, double *restrict pw, int nlat)
 {
   //gauaw_old(pa, pw, nlat);
   gauaw(nlat, pa, pw);
@@ -10280,6 +10472,7 @@ typedef struct
   int           lmissval;
   double        missval;
   char         *name;
+  char         *stdname;
   char         *longname;
   char         *units;
   ensinfo_t    *ensdata;
@@ -10330,6 +10523,7 @@ void paramInitEntry(int varID, int param)
   vartable[varID].lmissval       = 0;
   vartable[varID].missval        = 0;
   vartable[varID].name           = NULL;
+  vartable[varID].stdname        = NULL;
   vartable[varID].longname       = NULL;
   vartable[varID].units          = NULL;
   vartable[varID].ensdata        = NULL;
@@ -10371,6 +10565,7 @@ void varFree(void)
 	free(vartable[varID].levelTable);
 
       if ( vartable[varID].name )     free(vartable[varID].name);
+      if ( vartable[varID].stdname )  free(vartable[varID].stdname);
       if ( vartable[varID].longname ) free(vartable[varID].longname);
       if ( vartable[varID].units )    free(vartable[varID].units);
       if ( vartable[varID].ensdata )  free(vartable[varID].ensdata);
@@ -10533,7 +10728,7 @@ int paramNewEntry(int param)
 void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
 		  int level1, int level2, int level_sf, int level_unit, int prec,
 		  int *pvarID, int *plevelID, int tsteptype, int numavg, int ltype,
-		  const char *name, const char *longname, const char *units)
+		  const char *name, const char *stdname, const char *longname, const char *units)
 {
   int varID = UNDEFID;
   int levelID = -1;
@@ -10555,6 +10750,7 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
       if ( numavg ) vartable[varID].timave = 1;
 
       if ( name )     if ( name[0] )     vartable[varID].name     = strdup(name);
+      if ( stdname )  if ( stdname[0] )  vartable[varID].stdname  = strdup(stdname);
       if ( longname ) if ( longname[0] ) vartable[varID].longname = strdup(longname);
       if ( units )    if ( units[0] )    vartable[varID].units    = strdup(units);
     }
@@ -10580,9 +10776,6 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
   levelID = levelNewEntry(varID, level1, level2);
   vartable[varID].levelTable[levelID].recID = recID;
 
-  if ( CDI_Debug )
-    Message("varID = %d  levelID = %d", varID, levelID);
-
   *pvarID   = varID;
   *plevelID = levelID;
 }
@@ -10602,8 +10795,8 @@ static
 int cmpLevelTable(const void* s1, const void* s2)
 {
   int cmp = 0;
-  const leveltable_t* x = s1;
-  const leveltable_t* y = s2;
+  const leveltable_t* x = (const leveltable_t*) s1;
+  const leveltable_t* y = (const leveltable_t*) s2;
   /*
   printf("%g %g  %d %d\n", x->leve11, y->level1, x, y);
   */
@@ -10617,8 +10810,8 @@ static
 int cmpLevelTableInv(const void* s1, const void* s2)
 {
   int cmp = 0;
-  const leveltable_t* x = s1;
-  const leveltable_t* y = s2;
+  const leveltable_t* x = (const leveltable_t*) s1;
+  const leveltable_t* y = (const leveltable_t*) s2;
   /*
   printf("%g %g  %d %d\n", x->leve11, y->level1, x, y);
   */
@@ -10641,26 +10834,11 @@ param_t;
 static
 int cmpparam(const void* s1, const void* s2)
 {
-  int cmp = 0;
-  const param_t* x = s1;
-  const param_t* y = s2;
-
-  if      ( x->param > y->param ) cmp =  1;
-  else if ( x->param < y->param ) cmp = -1;
-
-  return (cmp);
-}
-
-
-static
-int cmpltype(const void* s1, const void* s2)
-{
-  int cmp = 0;
-  const param_t* x = s1;
-  const param_t* y = s2;
+  const param_t* x = (const param_t*) s1;
+  const param_t* y = (const param_t*) s2;
 
-  if      ( x->ltype > y->ltype ) cmp =  1;
-  else if ( x->ltype < y->ltype ) cmp = -1;
+  int cmp = (( x->param > y->param ) - ( x->param < y->param )) * 2
+           + ( x->ltype > y->ltype ) - ( x->ltype < y->ltype );
 
   return (cmp);
 }
@@ -10705,7 +10883,6 @@ void cdi_generate_vars(stream_t *streamptr)
 	  varInfo[varid]->param = vartable[varid].param;
 	  varInfo[varid]->ltype = vartable[varid].ltype;
 	}
-      qsort(varInfo[0], nvars, sizeof(param_t), cmpltype);
       qsort(varInfo[0], nvars, sizeof(param_t), cmpparam);
       for ( varid = 0; varid < nvars; varid++ )
 	{
@@ -10840,6 +11017,7 @@ void cdi_generate_vars(stream_t *streamptr)
       if ( vartable[varid].lmissval ) vlistDefVarMissval(vlistID, varID, vartable[varid].missval);
 
       if ( vartable[varid].name )     vlistDefVarName(vlistID, varID, vartable[varid].name);
+      if ( vartable[varid].stdname )  vlistDefVarStdname(vlistID, varID, vartable[varid].stdname);
       if ( vartable[varid].longname ) vlistDefVarLongname(vlistID, varID, vartable[varid].longname);
       if ( vartable[varid].units )    vlistDefVarUnits(vlistID, varID, vartable[varid].units);
 
@@ -10999,7 +11177,7 @@ int varDefGrid(int vlistID, grid_t grid, int mode)
       ngrids = gridSize();
       if ( ngrids > 0 )
         {
-          gridIndexList = malloc(ngrids*sizeof(int));
+          gridIndexList = (int*) malloc(ngrids*sizeof(int));
           gridGetIndexList ( ngrids, gridIndexList );
           for ( i = 0; i < ngrids; i++ )
             {
@@ -11332,15 +11510,20 @@ static int vlistIsInitialized = 0;
 #endif
 
 
-/* FIXME: implementation incomplete, fix once leaf nodes are complete */
 static int
 vlist_compare(vlist_t *a, vlist_t *b)
 {
   int diff;
-  diff = (a->nvars != b->nvars) || (a->ngrids != b->ngrids)
-    || (a->nzaxis != b->nzaxis) || (a->instID != b->instID)
-    || (a->modelID != b->modelID) || (a->tableID != b->tableID)
-    || (a->ntsteps != b->ntsteps);
+  diff = (a->nvars != b->nvars) | (a->ngrids != b->ngrids)
+    | (a->nzaxis != b->nzaxis) | (a->instID != b->instID)
+    | (a->modelID != b->modelID) | (a->tableID != b->tableID)
+    | (a->ntsteps != b->ntsteps) | (a->atts.nelems != b->atts.nelems);
+  int nvars = a->nvars;
+  for (int varID = 0; varID < nvars; ++varID)
+    diff |= vlistVarCompare(a, varID, b, varID);
+  int natts = a->atts.nelems;
+  for (int attID = 0; attID < natts; ++attID)
+    diff |= vlist_att_compare(a, CDI_GLOBAL, b, CDI_GLOBAL, attID);
   return diff;
 }
 
@@ -11354,6 +11537,9 @@ static void vlistPackP    ( void * vlistptr, void * buff, int size,
                             int *position, void *context);
 static int  vlistTxCode   ( void );
 
+#if !defined(__cplusplus)
+const
+#endif
 resOps vlist_ops = {
   (valCompareFunc)vlist_compare,
   (valDestroyFunc)vlist_delete,
@@ -11367,14 +11553,13 @@ resOps vlist_ops = {
 vlist_t *vlist_to_pointer(int code)
 {
   VLIST_INIT();
-  return reshGetVal(code, &vlist_ops );
+  return (vlist_t*) reshGetVal(code, &vlist_ops );
 }
 
 static
 void vlist_init_entry(vlist_t *vlistptr)
 {
-  vlistptr->self           = reshPut(vlistptr, &vlist_ops);
-
+  vlistptr->self           = CDI_UNDEFID;
   vlistptr->nvars          = 0;
   vlistptr->vars           = NULL;
   vlistptr->ngrids         = 0;
@@ -11390,14 +11575,17 @@ void vlist_init_entry(vlist_t *vlistptr)
 }
 
 static
-vlist_t *vlist_new_entry(void)
+vlist_t *vlist_new_entry(cdiResH resH)
 {
-  vlist_t *vlistptr;
-
-  vlistptr = (vlist_t *)xmalloc(sizeof(vlist_t));
-
+  vlist_t *vlistptr = (vlist_t*) xmalloc(sizeof(vlist_t));
   vlist_init_entry(vlistptr);
-
+  if (resH == CDI_UNDEFID)
+    vlistptr->self = reshPut(vlistptr, &vlist_ops);
+  else
+    {
+      vlistptr->self = resH;
+      reshReplace(resH, vlistptr, &vlist_ops);
+    }
   return (vlistptr);
 }
 
@@ -11479,7 +11667,7 @@ int vlistCreate(void)
 
   VLIST_INIT();
 
-  vlistptr = vlist_new_entry();
+  vlistptr = vlist_new_entry(CDI_UNDEFID);
 
   vlistID = vlistptr->self;
 
@@ -12204,7 +12392,7 @@ void vlistMerge(int vlistID2, int vlistID1)
           */
           if (vlistptr1->vars[varID].levinfo)
             {
-              vlistptr2->vars[varID].levinfo =
+              vlistptr2->vars[varID].levinfo = (levinfo_t*)
                 xrealloc(vlistptr2->vars[varID].levinfo, nlevs*sizeof(levinfo_t));
 
               memcpy(vlistptr2->vars[varID].levinfo+nlevs2,
@@ -12414,7 +12602,7 @@ void vlistDefNtsteps(int vlistID, int nts)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12562,7 +12750,7 @@ void vlistDefTaxis(int vlistID, int taxisID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12607,7 +12795,7 @@ void  vlistDefTable(int vlistID, int tableID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12637,7 +12825,7 @@ void vlistDefInstitut(int vlistID, int instID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12683,7 +12871,7 @@ void vlistDefModel(int vlistID, int modelID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12787,7 +12975,7 @@ void vlistChangeGridIndex(int vlistID, int index, int gridID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12813,7 +13001,7 @@ void vlistChangeGrid(int vlistID, int gridID1, int gridID2)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12880,7 +13068,7 @@ void vlistChangeZaxisIndex(int vlistID, int index, int zaxisID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12920,7 +13108,7 @@ void vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -12945,8 +13133,8 @@ void vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
         if ( vlistptr->vars[varID].levinfo && nlevs2 != nlevs1 )
           {
             vlistptr->vars[varID].levinfo
-              = realloc(vlistptr->vars[varID].levinfo,
-                        nlevs2 * sizeof(levinfo_t));
+              = (levinfo_t*) realloc(vlistptr->vars[varID].levinfo,
+                                     nlevs2 * sizeof(levinfo_t));
 
             for ( levID = 0; levID < nlevs2; levID++ )
               vlistptr->vars[varID].levinfo[levID] = DEFAULT_LEVINFO(levID);
@@ -12990,7 +13178,7 @@ static
 int  vlistGetSizeP ( void * vlistptr, void *context)
 {
   int txsize, varID;
-  vlist_t *p = vlistptr;
+  vlist_t *p = (vlist_t*) vlistptr;
   txsize = serializeGetSize(vlist_nints, DATATYPE_INT, context);
   txsize += vlistAttsGetSize(p, CDI_GLOBAL, context);
   for ( varID = 0; varID <  p->nvars; varID++ )
@@ -13004,7 +13192,7 @@ void vlistPackP ( void * vlistptr, void * buf, int size, int *position,
                   void *context )
 {
   int varID, tempbuf[vlist_nints];
-  vlist_t *p = vlistptr;
+  vlist_t *p = (vlist_t*) vlistptr;
   tempbuf[0] = p->self;
   tempbuf[1] = p->nvars;
   tempbuf[2] = p->ntsteps;
@@ -13020,21 +13208,23 @@ void vlistPackP ( void * vlistptr, void * buf, int size, int *position,
     }
 }
 
-void vlistUnpack(char * buf, int size, int *position, int nspTarget, void *context)
+void vlistUnpack(char * buf, int size, int *position, int originNamespace,
+                 void *context, int force_id)
 {
-  int newvlist;
-  int varID, tempbuf[vlist_nints];
+  int tempbuf[vlist_nints];
   serializeUnpack(buf, size, position, tempbuf, vlist_nints, DATATYPE_INT, context);
-  newvlist = vlistCreate();
-  /* xassert(newvlist == tempbuf[0]); */
-  vlist_t *p = vlist_to_pointer(newvlist);
-  p->taxisID = namespaceAdaptKey(tempbuf[3], nspTarget);
+  int targetID = namespaceAdaptKey(tempbuf[0], originNamespace);
+  vlist_t *p = vlist_new_entry(force_id?targetID:CDI_UNDEFID);
+  xassert(!force_id || p->self == targetID);
+  if (!force_id)
+    targetID = p->self;
+  p->taxisID = namespaceAdaptKey(tempbuf[3], originNamespace);
   p->tableID = tempbuf[4];
-  p->instID = namespaceAdaptKey(tempbuf[5], nspTarget);
-  p->modelID = namespaceAdaptKey(tempbuf[6], nspTarget);
-  vlistAttsUnpack(newvlist, CDI_GLOBAL, buf, size, position, context);
-  for ( varID = 0; varID < tempbuf[1]; varID++ )
-    vlistVarUnpack(newvlist, buf, size, position, nspTarget, context);
+  p->instID = namespaceAdaptKey(tempbuf[5], originNamespace);
+  p->modelID = namespaceAdaptKey(tempbuf[6], originNamespace);
+  vlistAttsUnpack(targetID, CDI_GLOBAL, buf, size, position, context);
+  for (int varID = 0; varID < tempbuf[1]; varID++ )
+    vlistVarUnpack(targetID, buf, size, position, originNamespace, context);
 }
 
 /*
@@ -13514,6 +13704,32 @@ vlistAttTypeLookup(cdi_att_t *attp)
   return type;
 }
 
+
+int vlist_att_compare(vlist_t *a, int varIDA, vlist_t *b, int varIDB,
+                      int attnum)
+{
+  cdi_atts_t *attspa = get_attsp(a, varIDA),
+    *attspb = get_attsp(b, varIDB);
+  if (attspa == NULL && attspb == NULL)
+    return 0;
+  xassert(attnum >= 0 && attnum < (int)attspa->nelems
+          && attnum < (int)attspb->nelems);
+  cdi_att_t *attpa = attspa->value + attnum,
+    *attpb = attspb->value + attnum;
+  size_t len;
+  if ((len = attpa->namesz) != attpb->namesz)
+    return 1;
+  int diff;
+  if ((diff = memcmp(attpa->name, attpb->name, len)))
+    return 1;
+  if (attpa->indtype != attpb->indtype
+      || attpa->exdtype != attpb->exdtype
+      || attpa->nelems != attpb->nelems)
+    return 1;
+  return memcmp(attpa->xvalue, attpb->xvalue, attpa->xsz);
+}
+
+
 static int
 vlistAttGetSize(vlist_t *vlistptr, int varID, int attnum, void *context)
 {
@@ -13585,7 +13801,7 @@ vlistAttUnpack(int vlistID, int varID,
 
   serializeUnpack(buf, size, position,
                   tempbuf, vlist_att_nints, DATATYPE_INT, context);
-  attName = xmalloc(tempbuf[0] + 1);
+  attName = (char*) xmalloc(tempbuf[0] + 1);
   serializeUnpack(buf, size, position, attName, tempbuf[0], DATATYPE_TXT, context);
   attName[tempbuf[0]] = '\0';
   switch (tempbuf[2])
@@ -13641,7 +13857,11 @@ vlistAttsUnpack(int vlistID, int varID,
 #include <limits.h>
 
 
-extern resOps vlist_ops;
+extern
+#if !defined(__cplusplus)
+const
+#endif
+resOps vlist_ops;
 
 static
 void vlistvarInitEntry(int vlistID, int varID)
@@ -13829,7 +14049,7 @@ int vlistDefVar(int vlistID, int gridID, int zaxisID, int tsteptype)
   vlist_t *vlistptr;
 
   vlistptr = vlist_to_pointer(vlistID);
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return CDI_UNDEFID;
@@ -13889,7 +14109,7 @@ cdiVlistCreateVarLevInfo(vlist_t *vlistptr, int varID)
   int zaxisID = vlistptr->vars[varID].zaxisID;
   int nlevs = zaxisInqSize(zaxisID);
 
-  vlistptr->vars[varID].levinfo = malloc(nlevs * sizeof(levinfo_t));
+  vlistptr->vars[varID].levinfo = (levinfo_t*) malloc(nlevs * sizeof(levinfo_t));
 
   for (int levID = 0; levID < nlevs; levID++ )
       vlistptr->vars[varID].levinfo[levID] = DEFAULT_LEVINFO(levID);
@@ -13918,7 +14138,7 @@ void vlistDefVarParam(int vlistID, int varID, int param)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -13951,7 +14171,7 @@ void vlistDefVarCode(int vlistID, int varID, int code)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14087,7 +14307,7 @@ The function @func{vlistInqVarCode} returns the code number of a variable.
 int vlistInqVarCode(int vlistID, int varID)
 {
   vlist_t *vlistptr;
-  int param, code;
+  int param, code = -varID-1;
   int pdis, pcat, pnum;
 
   vlistptr = vlist_to_pointer(vlistID);
@@ -14096,7 +14316,8 @@ int vlistInqVarCode(int vlistID, int varID)
 
   param = vlistptr->vars[varID].param;
   cdiDecodeParam(param, &pnum, &pcat, &pdis);
-  code = pnum;
+
+  if ( pdis == 255 ) code = pnum;
 
   if ( code < 0 && vlistptr->vars[varID].tableID != -1 && vlistptr->vars[varID].name != NULL )
     {
@@ -14465,7 +14686,7 @@ void vlistDefVarDatatype(int vlistID, int varID, int datatype)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14492,7 +14713,7 @@ void vlistDefVarInstitut(int vlistID, int varID, int instID)
 
   vlistptr = vlist_to_pointer(vlistID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14516,7 +14737,7 @@ void vlistDefVarModel(int vlistID, int varID, int modelID)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14542,7 +14763,7 @@ void vlistDefVarTable(int vlistID, int varID, int tableID)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14560,7 +14781,7 @@ void vlistDefVarTable(int vlistID, int varID, int tableID)
     param = vlistptr->vars[varID].param;
 
     cdiDecodeParam(param, &pnum, &pcat, &pdis);
-  
+
     vlistptr->vars[varID].param = cdiEncodeParam(pnum, tablenum, pdis);
   }
 }
@@ -14597,7 +14818,7 @@ void vlistDefVarName(int vlistID, int varID, const char *name)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14638,7 +14859,7 @@ void vlistDefVarLongname(int vlistID, int varID, const char *longname)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14679,7 +14900,7 @@ void vlistDefVarStdname(int vlistID, int varID, const char *stdname)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -14720,7 +14941,7 @@ void vlistDefVarUnits(int vlistID, int varID, const char *units)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14816,7 +15037,7 @@ void vlistDefVarExtra(int vlistID, int varID, const char *extra)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14912,7 +15133,7 @@ double vlistInqVarScalefactor(int vlistID, int varID)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return 1.0;
@@ -14941,7 +15162,7 @@ void vlistDefVarScalefactor(int vlistID, int varID, double scalefactor)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -14959,7 +15180,7 @@ void vlistDefVarAddoffset(int vlistID, int varID, double addoffset)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -14977,7 +15198,7 @@ void vlistDefVarTsteptype(int vlistID, int varID, int tsteptype)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15003,7 +15224,7 @@ void vlistDefVarTimave(int vlistID, int varID, int timave)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15029,7 +15250,7 @@ void vlistDefVarTimaccu(int vlistID, int varID, int timaccu)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15055,7 +15276,7 @@ void vlistDefVarTypeOfGeneratingProcess(int vlistID, int varID, int typeOfGenera
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15147,7 +15368,7 @@ void vlistDefFlag(int vlistID, int varID, int levID, int flag)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15277,7 +15498,7 @@ void vlistDefIndex(int vlistID, int varID, int levelID, int index)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15318,7 +15539,7 @@ void vlistChangeVarZaxis(int vlistID, int varID, int zaxisID)
   int nvars, index;
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15368,7 +15589,7 @@ void vlistChangeVarGrid(int vlistID, int varID, int gridID)
   int nvars, index;
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15416,7 +15637,7 @@ void vlistDefVarCompType(int vlistID, int varID, int comptype)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15442,7 +15663,7 @@ void vlistDefVarCompLevel(int vlistID, int varID, int complevel)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15500,6 +15721,8 @@ void  vlistDefVarXYZ(int vlistID, int varID, int xyz)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
+  if ( xyz == 3 ) xyz = 321;
+
   /* check xyz dimension order */
   {
     int dimorder[3];
@@ -15717,7 +15940,7 @@ void     vlistDefVarIOrank   ( int vlistID, int varID, int iorank )
 
   vlistCheckVarID ( __func__, vlistID, varID );
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -15739,6 +15962,51 @@ int vlistInqVarIOrank(int vlistID, int varID)
 }
 
 
+int vlistVarCompare(vlist_t *a, int varIDA, vlist_t *b, int varIDB)
+{
+  xassert(a && b
+          && varIDA >= 0 && varIDA < a->nvars
+          && varIDB >= 0 && varIDB < b->nvars);
+  var_t *pva = a->vars + varIDA, *pvb = b->vars + varIDB;
+#define FCMP(f) ((pva->f) != (pvb->f))
+#define FCMPSTR(fs) ((pva->fs) != (pvb->fs) && strcmp((pva->fs), (pvb->fs)))
+#define FCMP2(f) (namespaceResHDecode(pva->f).idx       \
+                  != namespaceResHDecode(pvb->f).idx)
+  int diff = FCMP(fvarID) | FCMP(mvarID) | FCMP(flag) | FCMP(param)
+    | FCMP(datatype) | FCMP(tsteptype) | FCMP(timave) | FCMP(timaccu)
+    | FCMP(chunktype) | FCMP(xyz) | FCMP2(gridID) | FCMP2(zaxisID)
+    | FCMP2(instID) | FCMP2(modelID) | FCMP2(tableID) | FCMP(missvalused)
+    | FCMP(missval) | FCMP(addoffset) | FCMP(scalefactor) | FCMPSTR(name)
+    | FCMPSTR(longname) | FCMPSTR(stdname) | FCMPSTR(units) | FCMPSTR(extra)
+    | FCMP(comptype) | FCMP(complevel) | FCMP(lvalidrange)
+    | FCMP(validrange[0]) | FCMP(validrange[1]);
+#undef FCMP
+#undef FCMP2
+  if ((diff |= ((pva->levinfo == NULL) ^ (pvb->levinfo == NULL))))
+    return 1;
+  if (pva->levinfo)
+    {
+      int zaxisID = pva->zaxisID;
+      int nlevs = zaxisInqSize(zaxisID);
+      diff |= (memcmp(pva->levinfo, pvb->levinfo, sizeof (levinfo_t) * nlevs)
+               != 0);
+      if (diff)
+        return 1;
+    }
+  int natts = a->vars[varIDA].atts.nelems;
+  if (natts != b->vars[varIDB].atts.nelems)
+    return 1;
+  for (int attID = 0; attID < natts; ++attID)
+    diff |= vlist_att_compare(a, varIDA, b, varIDB, attID);
+  if ((diff |= ((pva->ensdata == NULL) ^ (pvb->ensdata == NULL))))
+    return 1;
+  if (pva->ensdata)
+    diff = (memcmp(pva->ensdata, pvb->ensdata, sizeof (*(pva->ensdata)))) != 0;
+  return diff;
+}
+
+
+
 enum {
   vlistvar_nints = 20,
   vlistvar_ndbls = 3,
@@ -15833,7 +16101,7 @@ imax(int a, int b)
 
 
 void vlistVarUnpack(int vlistID, char * buf, int size, int *position,
-		    int nspTarget, void *context)
+		    int originNamespace, void *context)
 {
   double dtempbuf[vlistvar_ndbls];
   int tempbuf[vlistvar_nints];
@@ -15846,11 +16114,11 @@ void vlistVarUnpack(int vlistID, char * buf, int size, int *position,
                   dtempbuf, vlistvar_ndbls, DATATYPE_FLT64, context);
 
   newvar = vlistDefVar ( vlistID,
-			 namespaceAdaptKey ( tempbuf[1], nspTarget ),
-			 namespaceAdaptKey ( tempbuf[2], nspTarget ),
+			 namespaceAdaptKey ( tempbuf[1], originNamespace ),
+			 namespaceAdaptKey ( tempbuf[2], originNamespace ),
 			 tempbuf[3]);
   if (tempbuf[4] || tempbuf[5] || tempbuf[6] || tempbuf[7])
-    varname = xmalloc(imax(imax(imax(tempbuf[4],tempbuf[5]),tempbuf[6]),
+    varname = (char*) xmalloc(imax(imax(imax(tempbuf[4],tempbuf[5]),tempbuf[6]),
                            tempbuf[7])+ 1);
   if (tempbuf[4])
   {
@@ -15883,9 +16151,9 @@ void vlistVarUnpack(int vlistID, char * buf, int size, int *position,
   if ( varname ) free ( varname );
   vlistDefVarDatatype(vlistID, newvar, tempbuf[8]);
   vlistDefVarInstitut ( vlistID, newvar,
-			namespaceAdaptKey ( tempbuf[10], nspTarget ));
+			namespaceAdaptKey ( tempbuf[10], originNamespace ));
   vlistDefVarModel ( vlistID, newvar,
-		     namespaceAdaptKey ( tempbuf[11], nspTarget ));
+		     namespaceAdaptKey ( tempbuf[11], originNamespace ));
   vlistDefVarTable(vlistID, newvar, tempbuf[12]);
   /* FIXME: changing the table might change the param code */
   vlistDefVarParam(vlistID, newvar, tempbuf[9]);
@@ -15941,7 +16209,7 @@ void vlistVarUnpack(int vlistID, char * buf, int size, int *position,
 #undef  UNDEFID
 #define UNDEFID  CDI_UNDEFID
 
-void basetimeInit(BaseTime *basetime)
+void basetimeInit(basetime_t *basetime)
 {
   if ( basetime == NULL )
     Error("Internal problem! Basetime not allocated.");
@@ -15949,6 +16217,7 @@ void basetimeInit(BaseTime *basetime)
   (*basetime).ncvarid       = UNDEFID;
   (*basetime).ncdimid       = UNDEFID;
   (*basetime).ncvarboundsid = UNDEFID;
+  (*basetime).leadtimeid    = UNDEFID;
   (*basetime).lwrf          = 0;
 }
 /*
@@ -15987,7 +16256,7 @@ static int srvDefaultDprec = 0;
  */
 
 #undef  LIBVERSION
-#define LIBVERSION      1.3.1
+#define LIBVERSION      1.3.2
 #define XSTRING(x)	#x
 #define STRING(x)	XSTRING(x)
 static const char srv_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
@@ -16049,12 +16318,14 @@ void srvLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    default:
-	      Message("Invalid character in %s: %s", envName, envString);
-	      break;
-	    }
+              {
+                Message("Invalid character in %s: %s", envName, envString);
+                break;
+              }
+            }
 	  pos += 2;
 	}
     }
@@ -16230,7 +16501,7 @@ int srvInqData(srvrec_t *srvp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT32));
-	  }	
+	  }
 	break;
       }
     case DOUBLE_PRECISION:
@@ -16247,7 +16518,7 @@ int srvInqData(srvrec_t *srvp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT64));
-	  }	
+	  }
 	break;
     default:
       {
@@ -16293,7 +16564,7 @@ int srvDefData(srvrec_t *srvp, int prec, const void *data)
   else                   hprec = srvp->hprec;
 
   if ( ! hprec ) hprec = dprec;
-  
+
   srvp->hprec = hprec;
 
   header = srvp->header;
@@ -16416,7 +16687,7 @@ int srvRead(int fileID, srvrec_t *srvp)
       }
     default:
       {
-	Error("unexpected header precision %d", hprec);
+	Error("Unexpected header precision %d", hprec);
         break;
       }
     }
@@ -16425,8 +16696,8 @@ int srvRead(int fileID, srvrec_t *srvp)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("header blocklen differ!");
-      return (-1);
+      Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   srvp->datasize = srvp->header[4]*srvp->header[5];
@@ -16457,7 +16728,7 @@ int srvRead(int fileID, srvrec_t *srvp)
 
   if ( dprec != SINGLE_PRECISION && dprec != DOUBLE_PRECISION )
     {
-      Warning("unexpected data precision %d", dprec);
+      Warning("Unexpected data precision %d", dprec);
       return (-1);
     }
 
@@ -16467,8 +16738,8 @@ int srvRead(int fileID, srvrec_t *srvp)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("data blocklen differ!");
-      return (-1);
+      Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   return (0);
@@ -16521,7 +16792,7 @@ int srvWrite(int fileID, srvrec_t *srvp)
         break;
       }
     }
-  
+
   binWriteF77Block(fileID, byteswap, blocklen);
 
   datasize = header[4]*header[5];
@@ -16592,7 +16863,7 @@ static int extDefaultNumber = EXT_REAL;
  */
 
 #undef  LIBVERSION
-#define LIBVERSION      1.3.1
+#define LIBVERSION      1.3.2
 #define XSTRING(x)	#x
 #define STRING(x)	XSTRING(x)
 static const char ext_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
@@ -16640,7 +16911,7 @@ void extLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    case 'c':
 	      {
@@ -16652,12 +16923,14 @@ void extLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    default:
-	      Message("Invalid character in %s: %s", envName, envString);
-	      break;
-	    }
+              {
+                Message("Invalid character in %s: %s", envName, envString);
+                break;
+              }
+            }
 	}
     }
 
@@ -16775,7 +17048,7 @@ int extInqHeader(void *ext, int *header)
 
   for ( i = 0; i < EXT_HEADER_LEN; i++ )
     header[i] = extp->header[i];
-  
+
   if ( EXT_Debug ) Message("datasize = %lu", extp->datasize);
 
   return (0);
@@ -16789,7 +17062,7 @@ int extDefHeader(void *ext, const int *header)
 
   for ( i = 0; i < EXT_HEADER_LEN; i++ )
     extp->header[i] = header[i];
-  
+
   extp->datasize = header[3];
   if ( extp->number == EXT_COMP ) extp->datasize *= 2;
 
@@ -16830,7 +17103,7 @@ int extInqData(void *ext, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT32));
-	  }	
+	  }
 	break;
       }
     case DOUBLE_PRECISION:
@@ -16847,12 +17120,12 @@ int extInqData(void *ext, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT64));
-	  }	
+	  }
 	break;
     default:
       {
 	Error("unexpected data precision %d", rprec);
-        break;
+	break;
       }
     }
 
@@ -17011,7 +17284,7 @@ int extRead(int fileID, void *ext)
       }
     default:
       {
-	Error("unexpected header precision %d", hprec);
+	Error("Unexpected header precision %d", hprec);
         break;
       }
     }
@@ -17020,8 +17293,8 @@ int extRead(int fileID, void *ext)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("header blocklen differ!");
-      return (-1);
+      Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   extp->datasize = extp->header[3];
@@ -17058,7 +17331,7 @@ int extRead(int fileID, void *ext)
 
   if ( dprec != SINGLE_PRECISION && dprec != DOUBLE_PRECISION )
     {
-      Warning("unexpected data precision %d", dprec);
+      Warning("Unexpected data precision %d", dprec);
       return (-1);
     }
 
@@ -17068,8 +17341,8 @@ int extRead(int fileID, void *ext)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("data blocklen differ!");
-      return (-1);
+      Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   return (0);
@@ -17124,7 +17397,7 @@ int extWrite(int fileID, void *ext)
         break;
       }
     }
-  
+
   binWriteF77Block(fileID, byteswap, blocklen);
 
   datasize = header[3];
@@ -17193,7 +17466,7 @@ static int iegDefaultDprec = 0;
  */
 
 #undef  LIBVERSION
-#define LIBVERSION      1.3.1
+#define LIBVERSION      1.3.2
 #define XSTRING(x)	#x
 #define STRING(x)	XSTRING(x)
 static const char ieg_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
@@ -17236,12 +17509,14 @@ void iegLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    default:
-	      Message("Invalid character in %s: %s", envName, envString);
-	      break;
-	    }
+              {
+                Message("Invalid character in %s: %s", envName, envString);
+                break;
+              }
+            }
 	  pos += 2;
 	}
     }
@@ -17418,7 +17693,7 @@ int iegInqData(iegrec_t *iegp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT32));
-	  }	
+	  }
 	break;
       }
     case DOUBLE_PRECISION:
@@ -17435,7 +17710,7 @@ int iegInqData(iegrec_t *iegp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT64));
-	  }	
+	  }
 	break;
     default:
       {
@@ -17617,13 +17892,13 @@ int iegRead(int fileID, iegrec_t *iegp)
       for ( i = 0; i < 100; i++ )
 	iegp->vct[i] = (double) ((double *) tmpbuf)[i];
     }
-  
+
   /*
   fprintf(stderr, "refval %g\n", iegp->refval);
 
   for ( i = 0; i < 100; i++ )
     fprintf(stderr, "%3d %g\n", i, iegp->vct[i]);
-  
+
   {
     int i;
     for ( i = 0; i < 37; i++ )
@@ -17732,7 +18007,7 @@ int iegWrite(int fileID, iegrec_t *iegp)
     {
       binWriteFlt64(fileID, byteswap, 100, iegp->vct);
     }
-  
+
   binWriteF77Block(fileID, byteswap, blocklen);
 
   datasize = iegp->igdb[4]*iegp->igdb[5];
@@ -17793,7 +18068,9 @@ int iegWrite(int fileID, iegrec_t *iegp)
 #endif
 
 
-char *Grids[] = {
+/* the value in the second pair of brackets must match the length of
+ * the longest string (including terminating NUL) */
+static const char Grids[][17] = {
   /*  0 */  "undefined",
   /*  1 */  "generic",
   /*  2 */  "gaussian",
@@ -17821,8 +18098,13 @@ static void   gridPack        ( void * gridptr, void * buff, int size,
 				int *position, void *context);
 static int    gridTxCode      ( void );
 
-resOps gridOps = { gridCompareP, gridDestroyP, gridPrintP
-                   , gridGetPackSize, gridPack, gridTxCode
+static const resOps gridOps = {
+  gridCompareP,
+  gridDestroyP,
+  gridPrintP,
+  gridGetPackSize,
+  gridPack,
+  gridTxCode
 };
 
 
@@ -17888,6 +18170,7 @@ void grid_init(grid_t *gridptr)
   gridptr->angle        = 0.0;
   gridptr->locked       = FALSE;
   gridptr->lcomplex     = 0;
+  gridptr->hasdims      = TRUE;
   gridptr->xname[0]     = 0;
   gridptr->yname[0]     = 0;
   gridptr->xlongname[0] = 0;
@@ -17917,15 +18200,18 @@ void grid_free(grid_t *gridptr)
   grid_init(gridptr);
 }
 
-static
-grid_t *gridNewEntry ( void )
+static grid_t *
+gridNewEntry(cdiResH resH)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) xmalloc ( sizeof ( grid_t ));
-  grid_init ( gridptr );
-  gridptr->self = reshPut (( void * ) gridptr, &gridOps );
-
+  grid_t *gridptr = (grid_t*) xmalloc(sizeof(grid_t));
+  grid_init(gridptr);
+  if (resH == CDI_UNDEFID)
+    gridptr->self = reshPut(gridptr, &gridOps);
+  else
+    {
+      gridptr->self = resH;
+      reshReplace(resH, gridptr, &gridOps);
+    }
   return gridptr;
 }
 
@@ -17991,21 +18277,19 @@ void gridGenXvals(int xsize, double xfirst, double xlast, double xinc, double *x
 static
 void calc_gaussgrid(double *yvals, int ysize, double yfirst, double ylast)
 {
-  double *yw;
   long yhsize;
-  long i;
 
-  yw = (double *) malloc(ysize*sizeof(double));
+  double *yw = (double *)xmalloc(ysize*sizeof(double));
   gaussaw(yvals, yw, ysize);
   free(yw);
-  for ( i = 0; i < ysize; i++ )
+  for (long i = 0; i < ysize; i++ )
     yvals[i] = asin(yvals[i])/M_PI*180.0;
 
   if ( yfirst < ylast && yfirst > -90.0 && ylast < 90.0 )
     {
       double ytmp;
       yhsize = ysize/2;
-      for ( i = 0; i < yhsize; i++ )
+      for (long i = 0; i < yhsize; i++ )
         {
           ytmp = yvals[i];
           yvals[i] = yvals[ysize-i-1];
@@ -18150,14 +18434,13 @@ int gridCreate(int gridtype, int size)
   int gridID;
   grid_t *gridptr;
 
-  if ( CDI_Debug )
-    Message("gridtype: %d size: %d", gridtype, size);
+  if ( CDI_Debug ) Message("gridtype=%s  size=%d", gridNamePtr(gridtype), size);
 
-  if ( size < 0 || size > INT_MAX ) Error("grid size (%d) out of bounds (0 - %d)!", size, INT_MAX);
+  if ( size < 0 || size > INT_MAX ) Error("Grid size (%d) out of bounds (0 - %d)!", size, INT_MAX);
 
-  gridInit ();
+  gridInit();
 
-  gridptr = gridNewEntry();
+  gridptr = gridNewEntry(CDI_UNDEFID);
   if ( ! gridptr ) Error("No memory");
 
   gridID = gridptr->self;
@@ -18226,10 +18509,12 @@ int gridCreate(int gridtype, int size)
       {
         gridDefXname(gridID, "x");
         gridDefYname(gridID, "y");
+        /*
         strcpy(gridptr->xstdname, "grid_longitude");
         strcpy(gridptr->ystdname, "grid_latitude");
         gridDefXunits(gridID, "degrees");
         gridDefYunits(gridID, "degrees");
+        */
         break;
       }
     case GRID_LCC2:
@@ -18298,9 +18583,9 @@ void gridDestroyP ( void * gridptr )
 }
 
 
-char *gridNamePtr(int gridtype)
+const char *gridNamePtr(int gridtype)
 {
-  char *name;
+  const char *name;
   int size = (int) (sizeof(Grids)/sizeof(char *));
 
   if ( gridtype >= 0 && gridtype < size )
@@ -18335,7 +18620,7 @@ void gridDefXname(int gridID, const char *xname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed." );
       return;
@@ -18367,7 +18652,7 @@ void gridDefXlongname(int gridID, const char *xlongname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed." );
       return;
@@ -18397,7 +18682,7 @@ void gridDefXunits(int gridID, const char *xunits)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -18429,7 +18714,7 @@ void gridDefYname(int gridID, const char *yname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -18461,7 +18746,7 @@ void gridDefYlongname(int gridID, const char *ylongname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -18493,7 +18778,7 @@ void gridDefYunits(int gridID, const char *yunits)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -18830,7 +19115,7 @@ void gridDefTrunc(int gridID, int trunc)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -18861,7 +19146,7 @@ void gridDefXsize(int gridID, int xsize)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -18902,7 +19187,7 @@ void gridDefPrec(int gridID, int prec)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -18981,7 +19266,7 @@ void gridDefYsize(int gridID, int ysize)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19054,7 +19339,7 @@ void gridDefNP(int gridID, int np)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed." );
       return;
@@ -19109,7 +19394,7 @@ void gridDefRowlon(int gridID, int nrowlon, const int *rowlon)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19178,7 +19463,7 @@ void gridDefMask(int gridID, const int *mask)
   long size, i;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19241,7 +19526,7 @@ void gridDefMaskGME(int gridID, const int *mask)
   long size, i;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19302,9 +19587,9 @@ int gridInqXvals(int gridID, double *xvals)
     size = gridptr->xsize;
 
   if ( CDI_Debug && size == 0 )
-    Warning("Size undefined for gridID = %d", gridID);
+    Warning("size undefined for gridID = %d", gridID);
 
-  if ( xvals && gridptr->xvals )
+  if ( size && xvals && gridptr->xvals )
     memcpy(xvals, gridptr->xvals, size*sizeof(double));
 
   if ( gridptr->xvals == NULL ) size = 0;
@@ -19332,7 +19617,7 @@ void gridDefXvals(int gridID, const double *xvals)
   long size;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19354,11 +19639,9 @@ void gridDefXvals(int gridID, const double *xvals)
   if ( size == 0 )
     Error("Size undefined for gridID = %d", gridID);
 
-  if ( gridptr->xvals == NULL )
-    gridptr->xvals = (double *) malloc(size*sizeof(double));
-  else if ( CDI_Debug )
+  if (gridptr->xvals && CDI_Debug)
     Warning("values already defined!");
-
+  gridptr->xvals = (double *)xrealloc(gridptr->xvals, size * sizeof(double));
   memcpy(gridptr->xvals, xvals, size*sizeof(double));
 }
 
@@ -19397,9 +19680,9 @@ int gridInqYvals(int gridID, double *yvals)
     size = gridptr->ysize;
 
   if ( CDI_Debug && size == 0 )
-    Warning("Size undefined for gridID = %d!", gridID);
+    Warning("size undefined for gridID = %d!", gridID);
 
-  if ( yvals && gridptr->yvals )
+  if ( size && yvals && gridptr->yvals )
     memcpy(yvals, gridptr->yvals, size*sizeof(double));
 
   if ( gridptr->yvals == NULL ) size = 0;
@@ -19427,7 +19710,7 @@ void gridDefYvals(int gridID, const double *yvals)
   long size;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19447,11 +19730,10 @@ void gridDefYvals(int gridID, const double *yvals)
   if ( size == 0 )
     Error("Size undefined for gridID = %d!", gridID);
 
-  if ( gridptr->yvals == NULL )
-    gridptr->yvals = (double *) malloc(size*sizeof(double));
-  else if ( CDI_Debug )
+  if (gridptr->yvals && CDI_Debug)
     Warning("Values already defined!");
 
+  gridptr->yvals = (double *)xrealloc(gridptr->yvals, size*sizeof(double));
   memcpy(gridptr->yvals, yvals, size*sizeof(double));
 }
 
@@ -19508,14 +19790,11 @@ double gridInqYval(int gridID, int index)
 */
 double gridInqXinc(int gridID)
 {
-  double xinc;
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t *gridptr = (grid_t *)reshGetVal(gridID, &gridOps);
 
   grid_check_ptr(gridID, gridptr);
 
-  xinc = gridptr->xinc;
+  double xinc = gridptr->xinc;
 
   if ( (! (fabs(xinc) > 0)) && gridptr->xvals )
     {
@@ -19551,14 +19830,11 @@ double gridInqXinc(int gridID)
 */
 double gridInqYinc(int gridID)
 {
-  double yinc;
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t *gridptr = (grid_t *)reshGetVal(gridID, &gridOps);
 
   grid_check_ptr(gridID, gridptr);
 
-  yinc = gridptr->yinc;
+  double yinc = gridptr->yinc;
 
   if ( (! (fabs(yinc) > 0)) && gridptr->yvals )
     {
@@ -19618,7 +19894,7 @@ void gridDefXpole(int gridID, double xpole)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19670,7 +19946,7 @@ void gridDefYpole(int gridID, double ypole)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19722,7 +19998,7 @@ void gridDefAngle(int gridID, double angle)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19771,7 +20047,7 @@ void gridDefGMEnd(int gridID, int nd)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19819,7 +20095,7 @@ void gridDefGMEni(int gridID, int ni)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19867,7 +20143,7 @@ void gridDefGMEni2(int gridID, int ni2)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -19904,7 +20180,7 @@ void gridDefGMEni3(int gridID, int ni3)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -20267,13 +20543,11 @@ int gridCompare(int gridID, grid_t grid)
               char uuidOfHGrid[17];
               gridInqUUID(gridID, uuidOfHGrid);
 
-              if ( !differ && memcmp(uuidOfHGrid, grid.uuid, 16) != 0 ) differ = 1;
-
+              if ( uuidOfHGrid[0] != 0 && grid.uuid[0] != 0 )
+                if ( !differ && memcmp(uuidOfHGrid, grid.uuid, 16) != 0 ) differ = 1;
               if ( !differ && grid.nvertex != gridInqNvertex(gridID) ) differ = 1;
-
               if ( !differ && grid.number != gridInqNumber(gridID) ) differ = 1;
               if ( !differ && grid.position != gridInqPosition(gridID) ) differ = 1;
-
 	      if ( !differ )
 		differ = compareXYvals2(gridID, grid.size, grid.xvals, grid.yvals);
 	    }
@@ -20884,7 +21158,7 @@ void gridDefArea(int gridID, const double *area)
   long size;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -20955,7 +21229,7 @@ void gridDefNvertex(int gridID, int nvertex)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -21000,7 +21274,7 @@ void gridDefXbounds(int gridID, const double *xbounds)
   long nvertex;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed.");
       return;
@@ -21075,7 +21349,7 @@ int gridInqXbounds(int gridID, double *xbounds)
   if ( CDI_Debug && size == 0 )
     Warning("size undefined for gridID = %d", gridID);
 
-  if ( xbounds && gridptr->xbounds )
+  if ( size && xbounds && gridptr->xbounds )
     memcpy(xbounds, gridptr->xbounds, size*sizeof(double));
 
   if ( gridptr->xbounds == NULL ) size = 0;
@@ -21084,7 +21358,7 @@ int gridInqXbounds(int gridID, double *xbounds)
 }
 
 
-double *gridInqXboundsPtr(int gridID)
+const double *gridInqXboundsPtr(int gridID)
 {
   grid_t *gridptr;
 
@@ -21115,7 +21389,7 @@ void gridDefYbounds(int gridID, const double *ybounds)
   long nvertex;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -21190,7 +21464,7 @@ int gridInqYbounds(int gridID, double *ybounds)
   if ( CDI_Debug && size == 0 )
     Warning("size undefined for gridID = %d", gridID);
 
-  if ( ybounds && gridptr->ybounds )
+  if ( size && ybounds && gridptr->ybounds )
     memcpy(ybounds, gridptr->ybounds, size*sizeof(double));
 
   if ( gridptr->ybounds == NULL ) size = 0;
@@ -21199,7 +21473,7 @@ int gridInqYbounds(int gridID, double *ybounds)
 }
 
 
-double *gridInqYboundsPtr(int gridID)
+const double *gridInqYboundsPtr(int gridID)
 {
   grid_t *gridptr;
 
@@ -21677,7 +21951,7 @@ void gridDefLCC(int gridID, double originLon, double originLat, double lonParY,
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -21763,7 +22037,7 @@ void gridDefLcc2(int gridID, double earth_radius, double lon_0, double lat_0, do
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -21816,15 +22090,13 @@ void gridInqLcc2(int gridID, double *earth_radius, double *lon_0, double *lat_0,
 
 void gridDefLaea(int gridID, double earth_radius, double lon_0, double lat_0)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -21843,9 +22115,7 @@ void gridDefLaea(int gridID, double earth_radius, double lon_0, double lat_0)
 
 void gridInqLaea(int gridID, double *earth_radius, double *lon_0, double *lat_0)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -21868,15 +22138,13 @@ void gridInqLaea(int gridID, double *earth_radius, double *lon_0, double *lat_0)
 
 void gridDefComplexPacking(int gridID, int lcomplex)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -21886,16 +22154,37 @@ void gridDefComplexPacking(int gridID, int lcomplex)
 
 int gridInqComplexPacking(int gridID)
 {
-  int lcomplex;
-  grid_t *gridptr;
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_check_ptr(gridID, gridptr);
+
+  return (gridptr->lcomplex);
+}
+
+
+void gridDefHasDims(int gridID, int hasdims)
+{
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
-  lcomplex = gridptr->lcomplex;
+  gridptr->hasdims = hasdims;
+}
+
+
+int gridInqHasDims(int gridID)
+{
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
-  return (lcomplex);
+  grid_check_ptr(gridID, gridptr);
+
+  return (gridptr->hasdims);
 }
 
 /*
@@ -21914,15 +22203,13 @@ The function @func{gridDefNumber} defines the reference number for an unstructur
 */
 void gridDefNumber(int gridID, const int number)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -21946,9 +22233,7 @@ The function @func{gridInqNumber} returns the reference number to an unstructure
 */
 int gridInqNumber(int gridID)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -21971,15 +22256,13 @@ The function @func{gridDefPosition} defines the position of grid in the referenc
 */
 void gridDefPosition(int gridID, int position)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -22003,9 +22286,7 @@ The function @func{gridInqPosition} returns the position of grid in the referenc
 */
 int gridInqPosition(int gridID)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -22028,15 +22309,13 @@ The function @func{gridDefReference} defines the reference URI for an unstructur
 */
 void gridDefReference(int gridID, const char *reference)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -22069,10 +22348,8 @@ The function @func{gridInqReference} returns the reference URI to an unstructure
 */
 int gridInqReference(int gridID, char *reference)
 {
-  grid_t *gridptr;
   int len = 0;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -22103,21 +22380,17 @@ The function @func{gridDefUUID} defines the UUID for an unstructured grid.
 */
 void gridDefUUID(int gridID, const char *uuid)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
   memcpy(gridptr->uuid, uuid, 16);
-
-  return;
 }
 
 /*
@@ -22137,9 +22410,7 @@ The function @func{gridInqUUID} returns the UUID to an unstructured grid.
 */
 void gridInqUUID(int gridID, char *uuid)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -22296,7 +22567,8 @@ gridGetPackSize(void * voidP, void *context)
 
 void
 gridUnpack(char * unpackBuffer, int unpackBufferSize,
-           int * unpackBufferPos, int nspTarget, void *context)
+           int * unpackBufferPos, int originNamespace, void *context,
+           int force_id)
 {
   grid_t * gridP;
   uint32_t d;
@@ -22305,8 +22577,6 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
 
   gridInit();
 
-  gridP = gridNewEntry();
-  xassert(gridP);
   {
     int intBuffer[gridNint];
     serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22315,7 +22585,10 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
                     &d, 1, DATATYPE_UINT32, context);
 
     xassert(cdiCheckSum(DATATYPE_INT, gridNint, intBuffer) == d);
-    xassert(namespaceAdaptKey(intBuffer[0], nspTarget) == gridP->self);
+    int targetID = namespaceAdaptKey(intBuffer[0], originNamespace);
+    gridP = gridNewEntry(force_id?targetID:CDI_UNDEFID);
+
+    xassert(!force_id || targetID == gridP->self);
 
     gridP->type          =   intBuffer[1];
     gridP->prec          =   intBuffer[2];
@@ -22348,7 +22621,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasRowLonFlag)
     {
       xassert(gridP->nrowlon);
-      gridP->rowlon = xmalloc(gridP->nrowlon * sizeof (int));
+      gridP->rowlon = (int*) xmalloc(gridP->nrowlon * sizeof (int));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->rowlon, gridP->nrowlon , DATATYPE_INT, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22397,7 +22670,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
       else
 	size = gridP->xsize;
 
-      gridP->xvals = xmalloc(size * sizeof (double));
+      gridP->xvals = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->xvals, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22412,7 +22685,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
       else
 	size = gridP->ysize;
 
-      gridP->yvals =  xmalloc( size * sizeof (double));
+      gridP->yvals =  (double*) xmalloc( size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->yvals, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22423,7 +22696,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasAreaFlag)
     {
       xassert((size = gridP->size));
-      gridP->area = xmalloc(size * sizeof (double));
+      gridP->area = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->area, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22439,7 +22712,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
 	size = gridP->nvertex * gridP->xsize;
       xassert(size);
 
-      gridP->xbounds = xmalloc(size * sizeof (double));
+      gridP->xbounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->xbounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22455,7 +22728,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
 	size = gridP->nvertex * gridP->ysize;
       xassert(size);
 
-      gridP->ybounds = xmalloc(size * sizeof (double));
+      gridP->ybounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
 			  gridP->ybounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22484,7 +22757,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
       int referenceSize;
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       &referenceSize, 1, DATATYPE_INT, context);
-      gridP->reference = xmalloc(referenceSize);
+      gridP->reference = (char*) xmalloc(referenceSize);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->reference, referenceSize, DATATYPE_TXT, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22495,7 +22768,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasMaskFlag)
     {
       xassert((size = gridP->size));
-      gridP->mask = xmalloc(size * sizeof (mask_t));
+      gridP->mask = (mask_t*) xmalloc(size * sizeof (mask_t));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->mask, gridP->size, DATATYPE_UCHAR, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22506,7 +22779,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasGMEMaskFlag)
     {
       xassert((size = gridP->size));
-      gridP->mask_gme = xmalloc(size * sizeof (mask_t));
+      gridP->mask_gme = (mask_t*) xmalloc(size * sizeof (mask_t));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->mask_gme, gridP->size, DATATYPE_UCHAR, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -22751,7 +23024,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
 #define  LevelDown  2
 
 
-static struct {
+static const struct {
   unsigned char positive;   // 1: up;  2: down
   char *name;
   char *longname;
@@ -22787,7 +23060,9 @@ ZaxistypeEntry[] = {
   { /* 25 */ 0, "height",            "generalized height",     "height",         ""},
 };
 
-static int CDI_MaxZaxistype = sizeof(ZaxistypeEntry) / sizeof(ZaxistypeEntry[0]);
+enum {
+  CDI_NumZaxistype = sizeof(ZaxistypeEntry) / sizeof(ZaxistypeEntry[0]),
+};
 
 
 typedef struct {
@@ -22814,15 +23089,20 @@ typedef struct {
 }
 zaxis_t;
 
-static int    zaxisCompareP    ( void * zaxisptr1, void * zaxisptr2 );
+static int zaxisCompareP(zaxis_t *z1, zaxis_t *z2);
 static void   zaxisDestroyP    ( void * zaxisptr );
 static void   zaxisPrintP      ( void * zaxisptr, FILE * fp );
 static int    zaxisGetPackSize ( void * zaxisptr, void *context);
 static void   zaxisPack        ( void * zaxisptr, void * buffer, int size, int *pos, void *context);
 static int    zaxisTxCode      ( void );
 
-resOps zaxisOps = { zaxisCompareP, zaxisDestroyP, zaxisPrintP
-                    , zaxisGetPackSize, zaxisPack, zaxisTxCode
+static const resOps zaxisOps = {
+  (int (*)(void *, void *))zaxisCompareP,
+  zaxisDestroyP,
+  zaxisPrintP,
+  zaxisGetPackSize,
+  zaxisPack,
+  zaxisTxCode
 };
 
 static int  ZAXIS_Debug = 0;   /* If set to 1, debugging */
@@ -22854,15 +23134,19 @@ void zaxisDefaultValue ( zaxis_t *zaxisptr )
 
 
 static
-zaxis_t *zaxisNewEntry(void)
+zaxis_t *zaxisNewEntry(int id)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = (zaxis_t *) xmalloc(sizeof(zaxis_t));
+  zaxis_t *zaxisptr = (zaxis_t *)xmalloc(sizeof(zaxis_t));
 
   zaxisDefaultValue ( zaxisptr );
 
-  zaxisptr->self = reshPut (( void * ) zaxisptr, &zaxisOps );
+  if (id == CDI_UNDEFID)
+    zaxisptr->self = reshPut(zaxisptr, &zaxisOps);
+  else
+    {
+      zaxisptr->self = id;
+      reshReplace(id, zaxisptr, &zaxisOps);
+    }
 
   return (zaxisptr);
 }
@@ -22884,9 +23168,7 @@ void zaxisInit(void)
 static
 void zaxis_copy(zaxis_t *zaxisptr2, zaxis_t *zaxisptr1)
 {
-  int zaxisID2;
-
-  zaxisID2 = zaxisptr2->self;
+  int zaxisID2 = zaxisptr2->self;
   memcpy(zaxisptr2, zaxisptr1, sizeof(zaxis_t));
   zaxisptr2->self = zaxisID2;
 }
@@ -22905,6 +23187,35 @@ int zaxisSize(void)
   return reshCountType ( &zaxisOps );
 }
 
+static int
+zaxisCreate_(int zaxistype, int size, int id)
+{
+  zaxis_t *zaxisptr = zaxisNewEntry(id);
+
+  zaxisptr->type = zaxistype;
+  zaxisptr->size = size;
+
+  if ( zaxistype >= CDI_NumZaxistype || zaxistype < 0 )
+    Error("Internal problem! zaxistype > CDI_MaxZaxistype");
+
+  int zaxisID = zaxisptr->self;
+  zaxisDefName(zaxisID, ZaxistypeEntry[zaxistype].name);
+  zaxisDefLongname(zaxisID, ZaxistypeEntry[zaxistype].longname);
+  zaxisDefUnits(zaxisID, ZaxistypeEntry[zaxistype].units);
+
+  if ( *ZaxistypeEntry[zaxistype].stdname )
+    strcpy(zaxisptr->stdname, ZaxistypeEntry[zaxistype].stdname);
+
+  zaxisptr->positive = ZaxistypeEntry[zaxistype].positive;
+
+  double *vals = zaxisptr->vals = (double *)xmalloc(size*sizeof(double));
+
+  for ( int ilev = 0; ilev < size; ilev++ )
+    vals[ilev] = 0.0;
+
+  return zaxisID;
+}
+
 
 /*
 @Function  zaxisCreate
@@ -22947,47 +23258,15 @@ zaxisDefLevels(zaxisID, levs);
 */
 int zaxisCreate(int zaxistype, int size)
 {
-  int ilev;
-  int zaxisID;
-  double *vals;
-  zaxis_t *zaxisptr;
-
   if ( CDI_Debug )
     Message("zaxistype: %d size: %d ", zaxistype, size);
 
   zaxisInit ();
-
-  zaxisptr = zaxisNewEntry();
-
-  zaxisID = zaxisptr->self;
-
-  zaxisptr->type = zaxistype;
-  zaxisptr->size = size;
-
-  if ( zaxistype > CDI_MaxZaxistype )
-    Error("Internal problem! zaxistype > CDI_MaxZaxistype");
-
-  zaxisDefName(zaxisID, ZaxistypeEntry[zaxistype].name);
-  zaxisDefLongname(zaxisID, ZaxistypeEntry[zaxistype].longname);
-  zaxisDefUnits(zaxisID, ZaxistypeEntry[zaxistype].units);
-
-  if ( *ZaxistypeEntry[zaxistype].stdname )
-    strcpy(zaxisptr->stdname, ZaxistypeEntry[zaxistype].stdname);
-
-  zaxisptr->positive = ZaxistypeEntry[zaxistype].positive;
-
-  vals = (double *) malloc(size*sizeof(double));
-
-  for ( ilev = 0; ilev < size; ilev++ )
-    vals[ilev] = 0.0;
-
-  zaxisptr->vals = vals;
-
-  return (zaxisID);
+  return zaxisCreate_(zaxistype, size, CDI_UNDEFID);
 }
 
 
-void zaxisDestroyKernel( zaxis_t * zaxisptr )
+static void zaxisDestroyKernel( zaxis_t * zaxisptr )
 {
   int id;
 
@@ -23018,9 +23297,7 @@ void zaxisDestroyKernel( zaxis_t * zaxisptr )
 */
 void zaxisDestroy(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxisDestroyKernel ( zaxisptr );
 }
@@ -23037,7 +23314,7 @@ char *zaxisNamePtr(int zaxistype)
 {
   char *name;
 
-  if ( zaxistype >= 0 && zaxistype < CDI_MaxZaxistype )
+  if ( zaxistype >= 0 && zaxistype < CDI_NumZaxistype )
     name = ZaxistypeEntry[zaxistype].longname;
   else
     name = ZaxistypeEntry[ZAXIS_GENERIC].longname;
@@ -23069,7 +23346,7 @@ void zaxisDefName(int zaxisID, const char *name)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23080,7 +23357,10 @@ void zaxisDefName(int zaxisID, const char *name)
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( name )
-    strcpy(zaxisptr->name, name);
+    {
+      strncpy(zaxisptr->name, name, CDI_MAX_NAME - 1);
+      zaxisptr->name[CDI_MAX_NAME - 1] = '\0';
+    }
 }
 
 /*
@@ -23101,7 +23381,7 @@ void zaxisDefLongname(int zaxisID, const char *longname)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23112,7 +23392,10 @@ void zaxisDefLongname(int zaxisID, const char *longname)
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( longname )
-    strcpy(zaxisptr->longname, longname);
+    {
+      strncpy(zaxisptr->longname, longname, CDI_MAX_NAME - 1);
+      zaxisptr->longname[CDI_MAX_NAME - 1] = '\0';
+    }
 }
 
 /*
@@ -23133,7 +23416,7 @@ void zaxisDefUnits(int zaxisID, const char *units)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23144,7 +23427,10 @@ void zaxisDefUnits(int zaxisID, const char *units)
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( units )
-    strcpy(zaxisptr->units, units);
+    {
+      strncpy(zaxisptr->units, units, CDI_MAX_NAME - 1);
+      zaxisptr->units[CDI_MAX_NAME - 1] = '\0';
+    }
 }
 
 /*
@@ -23168,9 +23454,7 @@ The function @func{zaxisInqName} returns the name of a Z-axis.
 */
 void zaxisInqName(int zaxisID, char *name)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23198,9 +23482,7 @@ The function @func{zaxisInqLongname} returns the longname of a Z-axis.
 */
 void zaxisInqLongname(int zaxisID, char *longname)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23228,9 +23510,7 @@ The function @func{zaxisInqUnits} returns the units of a Z-axis.
 */
 void zaxisInqUnits(int zaxisID, char *units)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23240,9 +23520,7 @@ void zaxisInqUnits(int zaxisID, char *units)
 
 void zaxisInqStdname(int zaxisID, char *stdname)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23254,7 +23532,7 @@ void zaxisDefPrec(int zaxisID, int prec)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23270,9 +23548,7 @@ void zaxisDefPrec(int zaxisID, int prec)
 
 int zaxisInqPrec(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23284,7 +23560,7 @@ void zaxisDefPositive(int zaxisID, int positive)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23300,9 +23576,7 @@ void zaxisDefPositive(int zaxisID, int positive)
 
 int zaxisInqPositive(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23314,7 +23588,7 @@ void zaxisDefLtype(int zaxisID, int ltype)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23330,9 +23604,7 @@ void zaxisDefLtype(int zaxisID, int ltype)
 
 int zaxisInqLtype(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23355,12 +23627,9 @@ The function @func{zaxisDefLevels} defines the levels of a Z-axis.
 */
 void zaxisDefLevels(int zaxisID, const double *levels)
 {
-  int ilev;
-  int size;
-  double *vals;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23370,11 +23639,11 @@ void zaxisDefLevels(int zaxisID, const double *levels)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  int size = zaxisptr->size;
 
-  vals = zaxisptr->vals;
+  double *vals = zaxisptr->vals;
 
-  for ( ilev = 0; ilev < size; ilev++ )
+  for (int ilev = 0; ilev < size; ilev++ )
     vals[ilev] = levels[ilev];
 }
 
@@ -23397,7 +23666,7 @@ void zaxisDefLevel(int zaxisID, int levelID, double level)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23416,7 +23685,7 @@ void zaxisDefNlevRef(int zaxisID, const int nhlev)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23432,16 +23701,11 @@ void zaxisDefNlevRef(int zaxisID, const int nhlev)
 
 int zaxisInqNlevRef(int zaxisID)
 {
-  int nhlev = -1;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  nhlev = zaxisptr->nhlev;
-
-  return (nhlev);
+  return (zaxisptr->nhlev);
 }
 
 /*
@@ -23462,7 +23726,7 @@ void zaxisDefNumber(int zaxisID, const int number)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23492,16 +23756,11 @@ The function @func{zaxisInqNumber} returns the reference number to a generalized
 */
 int zaxisInqNumber(int zaxisID)
 {
-  int number = -1;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  number = zaxisptr->number;
-
-  return (number);
+  return (zaxisptr->number);
 }
 
 /*
@@ -23522,7 +23781,7 @@ void zaxisDefUUID(int zaxisID, const char *uuid)
 {
   zaxis_t *zaxisptr;
 
-    if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+    if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23554,9 +23813,7 @@ The function @func{zaxisInqUUID} returns the UUID to a generalized Z-axis.
 */
 void zaxisInqUUID(int zaxisID, char *uuid)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23582,9 +23839,7 @@ The function @func{zaxisInqLevel} returns one level of a Z-axis.
 double zaxisInqLevel(int zaxisID, int levelID)
 {
   double level = 0;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23597,9 +23852,7 @@ double zaxisInqLevel(int zaxisID, int levelID)
 double zaxisInqLbound(int zaxisID, int index)
 {
   double level = 0;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23614,9 +23867,7 @@ double zaxisInqLbound(int zaxisID, int index)
 double zaxisInqUbound(int zaxisID, int index)
 {
   double level = 0;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23630,9 +23881,7 @@ double zaxisInqUbound(int zaxisID, int index)
 
 const double *zaxisInqLevelsPtr(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23658,16 +23907,12 @@ The function @func{zaxisInqLevels} returns all levels of a Z-axis.
 */
 void zaxisInqLevels(int zaxisID, double *levels)
 {
-  int size;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
-  for ( i = 0; i < size; i++ )
+  int size = zaxisptr->size;
+  for (int i = 0; i < size; i++ )
     levels[i] =  zaxisptr->vals[i];
 }
 
@@ -23675,10 +23920,7 @@ void zaxisInqLevels(int zaxisID, double *levels)
 int zaxisInqLbounds(int zaxisID, double *lbounds)
 {
   int size = 0;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23687,7 +23929,7 @@ int zaxisInqLbounds(int zaxisID, double *lbounds)
       size = zaxisptr->size;
 
       if ( lbounds )
-        for ( i = 0; i < size; i++ )
+        for (int i = 0; i < size; i++ )
           lbounds[i] =  zaxisptr->lbounds[i];
     }
 
@@ -23698,10 +23940,7 @@ int zaxisInqLbounds(int zaxisID, double *lbounds)
 int zaxisInqUbounds(int zaxisID, double *ubounds)
 {
   int size = 0;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23710,7 +23949,7 @@ int zaxisInqUbounds(int zaxisID, double *ubounds)
       size = zaxisptr->size;
 
       if ( ubounds )
-        for ( i = 0; i < size; i++ )
+        for (int i = 0; i < size; i++ )
           ubounds[i] =  zaxisptr->ubounds[i];
     }
 
@@ -23721,10 +23960,7 @@ int zaxisInqUbounds(int zaxisID, double *ubounds)
 int zaxisInqWeights(int zaxisID, double *weights)
 {
   int size = 0;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23733,7 +23969,7 @@ int zaxisInqWeights(int zaxisID, double *weights)
       size = zaxisptr->size;
 
       if ( weights )
-        for ( i = 0; i < size; i++ )
+        for ( int i = 0; i < size; i++ )
           weights[i] =  zaxisptr->weights[i];
     }
 
@@ -23743,20 +23979,18 @@ int zaxisInqWeights(int zaxisID, double *weights)
 
 int zaxisInqLevelID(int zaxisID, double level)
 {
-  int size;
   int levelID = CDI_UNDEFID;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
-  for ( i = 0; i < size; i++ )
-    if ( fabs(level-zaxisptr->vals[i]) < DBL_EPSILON ) break;
-
-  if ( i < size ) levelID = i;
+  int size = zaxisptr->size;
+  for ( int i = 0; i < size; i++ )
+    if ( fabs(level-zaxisptr->vals[i]) < DBL_EPSILON )
+      {
+        levelID = i;
+        break;
+      }
 
   return (levelID);
 }
@@ -23788,9 +24022,7 @@ The valid CDI Z-axis types are @func{ZAXIS_GENERIC}, @func{ZAXIS_SURFACE},
 */
 int zaxisInqType(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23815,14 +24047,11 @@ The function @func{zaxisInqSize} returns the size of a Z-axis.
 */
 int zaxisInqSize(int zaxisID)
 {
-  int size = 1;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  int size = zaxisptr->size;
 
   return (size);
 }
@@ -23830,45 +24059,36 @@ int zaxisInqSize(int zaxisID)
 
 void cdiCheckZaxis(int zaxisID)
 {
-  int size, i, found;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( zaxisInqType(zaxisID) == ZAXIS_GENERIC )
     {
-      size = zaxisptr->size;
+      int size = zaxisptr->size;
       if ( size > 1 )
         {
           /* check direction */
           if ( ! zaxisptr->direction )
             {
-              found = 0;
-              for ( i = 1; i < size; i++ )
-                if ( zaxisptr->vals[i] > zaxisptr->vals[i-1] )
-                  found++;
-              if ( found == size-1 )
+              int ups = 0, downs = 0;
+              for ( int i = 1; i < size; i++ )
+                {
+                  ups += (zaxisptr->vals[i] > zaxisptr->vals[i-1]);
+                  downs += (zaxisptr->vals[i] < zaxisptr->vals[i-1]);
+                }
+              if ( ups == size-1 )
                 {
                   zaxisptr->direction = LevelUp;
                 }
-              else
+              else if ( downs == size-1 )
                 {
-                  found = 0;
-                  for ( i = 1; i < size; i++ )
-                    if ( zaxisptr->vals[i] < zaxisptr->vals[i-1] )
-                      found++;
-                  if ( found == size-1 )
-                    {
-                      zaxisptr->direction = LevelDown;
-                    }
+                  zaxisptr->direction = LevelDown;
+                }
+              else /* !zaxisptr->direction */
+                {
+                  Warning("Direction undefined for zaxisID %d", zaxisID);
                 }
-            }
-          /* check consistent */
-          if ( !zaxisptr->direction )
-            {
-              Warning("Direction undefined for zaxisID %d", zaxisID);
             }
         }
     }
@@ -23879,7 +24099,7 @@ void zaxisDefVct(int zaxisID, int size, const double *vct)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23903,9 +24123,7 @@ void zaxisDefVct(int zaxisID, int size, const double *vct)
 
 void zaxisInqVct(int zaxisID, double *vct)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23915,9 +24133,7 @@ void zaxisInqVct(int zaxisID, double *vct)
 
 int zaxisInqVctSize(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23927,9 +24143,7 @@ int zaxisInqVctSize(int zaxisID)
 
 const double *zaxisInqVctPtr(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -23939,10 +24153,9 @@ const double *zaxisInqVctPtr(int zaxisID)
 
 void zaxisDefLbounds(int zaxisID, const double *lbounds)
 {
-  size_t size;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23952,14 +24165,14 @@ void zaxisDefLbounds(int zaxisID, const double *lbounds)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  size_t size = zaxisptr->size;
 
   if ( CDI_Debug )
     if ( zaxisptr->lbounds != NULL )
       Warning("Lower bounds already defined for zaxisID = %d", zaxisID);
 
   if ( zaxisptr->lbounds == NULL )
-    zaxisptr->lbounds = (double *) malloc(size*sizeof(double));
+    zaxisptr->lbounds = (double *)xmalloc(size*sizeof(double));
 
   memcpy(zaxisptr->lbounds, lbounds, size*sizeof(double));
 }
@@ -23967,10 +24180,9 @@ void zaxisDefLbounds(int zaxisID, const double *lbounds)
 
 void zaxisDefUbounds(int zaxisID, const double *ubounds)
 {
-  size_t size;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -23980,14 +24192,14 @@ void zaxisDefUbounds(int zaxisID, const double *ubounds)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  size_t size = zaxisptr->size;
 
   if ( CDI_Debug )
     if ( zaxisptr->ubounds != NULL )
       Warning("Upper bounds already defined for zaxisID = %d", zaxisID);
 
   if ( zaxisptr->ubounds == NULL )
-    zaxisptr->ubounds = (double *) malloc(size*sizeof(double));
+    zaxisptr->ubounds = (double *)xmalloc(size*sizeof(double));
 
   memcpy(zaxisptr->ubounds, ubounds, size*sizeof(double));
 }
@@ -23995,10 +24207,9 @@ void zaxisDefUbounds(int zaxisID, const double *ubounds)
 
 void zaxisDefWeights(int zaxisID, const double *weights)
 {
-  size_t size;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -24008,14 +24219,14 @@ void zaxisDefWeights(int zaxisID, const double *weights)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  size_t size = zaxisptr->size;
 
   if ( CDI_Debug )
     if ( zaxisptr->weights != NULL )
       Warning("Weights already defined for zaxisID = %d", zaxisID);
 
   if ( zaxisptr->weights == NULL )
-    zaxisptr->weights = (double *) malloc(size*sizeof(double));
+    zaxisptr->weights = (double *)xmalloc(size*sizeof(double));
 
   memcpy(zaxisptr->weights, weights, size*sizeof(double));
 }
@@ -24023,9 +24234,7 @@ void zaxisDefWeights(int zaxisID, const double *weights)
 
 void zaxisChangeType(int zaxisID, int zaxistype)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -24035,16 +24244,14 @@ void zaxisChangeType(int zaxisID, int zaxistype)
 
 void zaxisResize(int zaxisID, int size)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   zaxisptr->size = size;
 
   if ( zaxisptr->vals )
-    zaxisptr->vals = (double *) realloc(zaxisptr->vals, size*sizeof(double));
+    zaxisptr->vals = (double *)xrealloc(zaxisptr->vals, size*sizeof(double));
 }
 
 
@@ -24053,9 +24260,7 @@ int zaxisDuplicate(int zaxisID)
   int zaxisIDnew;
   int zaxistype, zaxissize;
   int size;
-  zaxis_t *zaxisptr, *zaxisptrnew;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -24063,7 +24268,7 @@ int zaxisDuplicate(int zaxisID)
   zaxissize = zaxisInqSize(zaxisID);
 
   zaxisIDnew = zaxisCreate(zaxistype, zaxissize);
-  zaxisptrnew = ( zaxis_t * ) reshGetVal ( zaxisIDnew, &zaxisOps );
+  zaxis_t *zaxisptrnew = reshGetVal(zaxisIDnew, &zaxisOps);
 
   zaxis_copy(zaxisptrnew, zaxisptr);
 
@@ -24075,7 +24280,7 @@ int zaxisDuplicate(int zaxisID)
     {
       size = zaxissize;
 
-      zaxisptrnew->vals = (double *) malloc(size*sizeof(double));
+      zaxisptrnew->vals = (double *)xmalloc(size*sizeof(double));
       memcpy(zaxisptrnew->vals, zaxisptr->vals, size*sizeof(double));
     }
 
@@ -24083,7 +24288,7 @@ int zaxisDuplicate(int zaxisID)
     {
       size = zaxissize;
 
-      zaxisptrnew->lbounds = (double *) malloc(size*sizeof(double));
+      zaxisptrnew->lbounds = (double *)xmalloc(size*sizeof(double));
       memcpy(zaxisptrnew->lbounds, zaxisptr->lbounds, size*sizeof(double));
     }
 
@@ -24091,7 +24296,7 @@ int zaxisDuplicate(int zaxisID)
     {
       size = zaxissize;
 
-      zaxisptrnew->ubounds = (double *) malloc(size*sizeof(double));
+      zaxisptrnew->ubounds = (double *)xmalloc(size*sizeof(double));
       memcpy(zaxisptrnew->ubounds, zaxisptr->ubounds, size*sizeof(double));
     }
 
@@ -24102,7 +24307,7 @@ int zaxisDuplicate(int zaxisID)
       if ( size )
         {
           zaxisptrnew->vctsize = size;
-          zaxisptrnew->vct = (double *) malloc(size*sizeof(double));
+          zaxisptrnew->vct = (double *)xmalloc(size*sizeof(double));
           memcpy(zaxisptrnew->vct, zaxisptr->vct, size*sizeof(double));
         }
     }
@@ -24226,9 +24431,7 @@ void zaxisPrintKernel ( zaxis_t * zaxisptr, FILE * fp )
 
 void zaxisPrint ( int zaxisID )
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxisPrintKernel ( zaxisptr, stdout );
 }
@@ -24245,98 +24448,86 @@ void zaxisPrintP ( void * voidptr, FILE * fp )
 }
 
 
-static
-int  zaxisCompareP ( void * zaxisptr1, void * zaxisptr2 )
+static int
+zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
 {
-  zaxis_t * z1 = ( zaxis_t * ) zaxisptr1 ;
-  zaxis_t * z2 = ( zaxis_t * ) zaxisptr2 ;
-  static int differ = -1;
-  static int equal  =  0;
-  int i;
-
-  xassert ( z1 );
-  xassert ( z2 );
-
-  if ( z1->type      != z2->type )      return differ;
-  if ( z1->ltype     != z2->ltype )     return differ;
-  if ( z1->direction != z2->direction ) return differ;
-  if ( z1->prec      != z2->prec )      return differ;
-  if ( z1->size      != z2->size )      return differ;
-  if ( z1->vctsize   != z2->vctsize )   return differ;
-
-  if ( z1->vals )
+  enum {
+    differ = -1,
+  };
+  int diff = 0;
+  xassert(z1 && z2);
+
+  diff |= (z1->type != z2->type)
+    | (z1->ltype != z2->ltype)
+    | (z1->direction != z2->direction)
+    | (z1->prec != z2->prec)
+    | (z1->size != z2->size)
+    | (z1->vctsize != z2->vctsize)
+    | (z1->positive != z2->positive);
+
+  if (diff)
+    return differ;
+  int size = z1->size;
+  int anyPresent = 0;
+  int present = (z1->vals != NULL);
+  diff |= (present ^ (z2->vals != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->vals ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->vals[i], z2->vals[i]) ) return differ;
+      const double *p = z1->vals, *q = z2->vals;
+      for (int i = 0; i < size; i++)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->vals )
-    return differ;
 
-  if ( z1->lbounds )
+  present = (z1->lbounds != NULL);
+  diff |= (present ^ (z2->lbounds != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->lbounds ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->lbounds[i], z2->lbounds[i]) ) return differ;
+      const double *p = z1->lbounds, *q = z2->lbounds;
+      for (int i = 0; i < size; i++)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->lbounds )
-    return differ;
 
-  if ( z1->ubounds )
+  present = (z1->ubounds != NULL);
+  diff |= (present ^ (z2->ubounds != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->ubounds ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->ubounds[i], z2->ubounds[i]) ) return differ;
+      const double *p = z1->ubounds, *q = z2->ubounds;
+      for (int i = 0; i < size; ++i)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->ubounds )
-    return differ;
 
-  if ( z1->weights )
+  present = (z1->weights != NULL);
+  diff |= (present ^ (z2->weights != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->weights ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->weights[i], z2->weights[i]) ) return differ;
+      const double *p = z1->weights, *q = z2->weights;
+      for (int i = 0; i < size; ++i)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->weights )
-    return differ;
 
- if ( z1->vct )
+  present = (z1->vct != NULL);
+  diff |= (present ^ (z2->vct != NULL));
+  if (!diff && present)
     {
-      xassert ( z1->vctsize );
-
-      if ( !z2->vct ) return differ;
-
-      for ( i = 0; i < z1->vctsize; i++ )
-        if ( IS_NOT_EQUAL(z1->vct[i], z2->vct[i]) ) return differ;
+      int vctsize = z1->vctsize;
+      xassert(vctsize);
+      const double *p = z1->vct, *q = z2->vct;
+      for (int i = 0; i < vctsize; ++i)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->vct )
-    return differ;
 
-  if ( memcmp ( &z1->name    , &z2->name    , CDI_MAX_NAME ))
-    return differ;
-  if ( memcmp ( &z1->longname, &z2->longname, CDI_MAX_NAME ))
-    return differ;
-  if ( memcmp ( &z1->stdname , &z2->stdname , CDI_MAX_NAME ))
-    return differ;
-  if ( memcmp ( &z1->units   , &z2->units   , CDI_MAX_NAME ))
-    return differ;
-
-  if ( z1->positive != z2->positive ) return differ;
+  if (anyPresent)
+    xassert(size);
 
-
-  return equal;
+  diff |= strcmp(z1->name, z2->name)
+    | strcmp(z1->longname, z2->longname)
+    | strcmp(z1->stdname, z2->stdname)
+    | strcmp(z1->units, z2->units);
+  return diff;
 }
 
 
@@ -24412,9 +24603,9 @@ zaxisGetPackSize(void * voidP, void *context)
 
 void
 zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
-            int * unpackBufferPos, int nspTarget, void *context)
+            int * unpackBufferPos, int originNamespace, void *context,
+            int force_id)
 {
-  zaxis_t * zaxisP;
   int intBuffer[zaxisNint], memberMask;
   uint32_t d;
   char charBuffer[zaxisNstrings * CDI_MAX_NAME];
@@ -24426,12 +24617,11 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
 
   xassert(cdiCheckSum(DATATYPE_INT, zaxisNint, intBuffer) == d);
 
-  zaxisInit ();
+  zaxisInit();
 
-  zaxisP = zaxisNewEntry();
-  if ( ! zaxisP ) Error("No memory");
-
-  xassert(namespaceAdaptKey(intBuffer[0], nspTarget) == zaxisP->self);
+  zaxis_t *zaxisP
+    = zaxisNewEntry(force_id ? namespaceAdaptKey(intBuffer[0], originNamespace)
+                    : CDI_UNDEFID);
 
   zaxisP->prec      = intBuffer[1];
   zaxisP->type      = intBuffer[2];
@@ -24446,7 +24636,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->vals = xmalloc(size * sizeof ( double ));
+      zaxisP->vals = (double*) xmalloc(size * sizeof ( double ));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->vals, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -24459,7 +24649,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->lbounds = xmalloc(size * sizeof (double));
+      zaxisP->lbounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->lbounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -24472,7 +24662,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->ubounds = xmalloc(size * sizeof (double));
+      zaxisP->ubounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->ubounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -24485,7 +24675,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->weights = xmalloc(size * sizeof (double));
+      zaxisP->weights = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->weights, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -24498,7 +24688,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->vctsize));
 
-      zaxisP->vct = xmalloc(size * sizeof (double));
+      zaxisP->vct = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->vct, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -24710,7 +24900,7 @@ int cdf_open(const char *path, int omode, int *ncidp)
   size_t chunksizehint = 0;
 
 #if  defined  (HAVE_LIBNC_DAP)
-  if ( memcmp(path, "http:", 5) == 0 ) dapfile = TRUE;
+  if ( strncmp(path, "http:", 5) == 0 || strncmp(path, "https:", 6) == 0 ) dapfile = TRUE;
 #endif
 
   if ( dapfile )
@@ -24774,6 +24964,20 @@ void cdf_enddef(int ncid)
 }
 
 
+void cdf__enddef(const int ncid, const size_t hdr_pad)
+{
+  int status;
+  const size_t v_align   = 4UL; /* [B] Alignment of beginning of data section for fixed variables */
+  const size_t v_minfree = 0UL; /* [B] Pad at end of data section for fixed size variables */
+  const size_t r_align   = 4UL; /* [B] Alignment of beginning of data section for record variables */
+
+  /* nc_enddef(ncid) is equivalent to nc__enddef(ncid, 0, 4, 0, 4) */
+  status = nc__enddef(ncid, hdr_pad, v_align, v_minfree, r_align);
+
+  if ( status != NC_NOERR ) Error("%s", nc_strerror(status));
+}
+
+
 void cdf_sync(int ncid)
 {
   int status;
@@ -25648,13 +25852,14 @@ int cdiIgnoreAttCoordinates = FALSE;
 int cdiIgnoreValidRange     = FALSE;
 int cdiSkipRecords          = 0;
 int cdiInventoryMode        = 1;
+size_t CDI_netcdf_hdr_pad   = 0UL;
 
 char *cdiPartabPath   = NULL;
 int   cdiPartabIntern = 1;
 
 double cdiDefaultMissval = -9.E33;
 
-char *Filetypes[] = {
+const char Filetypes[][9] = {
   "UNKNOWN",
   "GRIB",
   "GRIB2",
@@ -25676,6 +25881,7 @@ int CDI_Debug   = 0;    /* If set to 1, debugging           */
 
 static int  STREAM_Debug = 0;   /* If set to 1, debugging */
 
+int cdiGribApiDebug     = 0;
 int cdiDefaultLeveltype = -1;
 static int cdiDataUnreduced = 0;
 static int cdiSortName = 0;
@@ -25689,10 +25895,13 @@ static int    streamGetPackSize ( void * streamptr, void *context);
 static void   streamPack        ( void * streamptr, void * buff, int size, int * position, void *context );
 static int    streamTxCode      ( void );
 
-resOps streamOps = { streamCompareP, streamDestroyP, streamPrintP,
-                     streamGetPackSize,
-		     streamPack,
-                     streamTxCode
+const resOps streamOps = {
+  streamCompareP,
+  streamDestroyP,
+  streamPrintP,
+  streamGetPackSize,
+  streamPack,
+  streamTxCode
 };
 
 long cdiGetenvInt(char *envName)
@@ -25787,6 +25996,12 @@ void cdiInitialize(void)
       gribSetConst(1); // 1: Don't pack constant fields on regular grids
 #endif
 
+      value = cdiGetenvInt("CDI_DEBUG");
+      if ( value >= 0 ) CDI_Debug = (int) value;
+
+      value = cdiGetenvInt("CDI_GRIBAPI_DEBUG");
+      if ( value >= 0 ) cdiGribApiDebug = (int) value;
+
       value = cdiGetenvInt("CDI_REGULARGRID");
       if ( value >= 0 ) cdiDataUnreduced = (int) value;
 
@@ -25799,6 +26014,9 @@ void cdiInitialize(void)
       value = cdiGetenvInt("CDI_LEVELTYPE");
       if ( value >= 0 ) cdiDefaultLeveltype = (int) value;
 
+      value = cdiGetenvInt("CDI_NETCDF_HDR_PAD");
+      if ( value >= 0 ) CDI_netcdf_hdr_pad = (size_t) value;
+
       envString = getenv("CDI_MISSVAL");
       if ( envString ) cdiDefaultMissval = atof(envString);
       /*
@@ -25827,7 +26045,7 @@ void cdiInitialize(void)
 	  cdiSkipRecords = cdiSkipRecords > 0 ? cdiSkipRecords : 0;
 	}
 
-      envString = getenv("GRIB_INVENTORY_MODE");
+      envString = getenv("CDI_INVENTORY_MODE");
       if ( envString )
 	{
 	  if ( strncmp(envString, "time", 4) == 0 )
@@ -25873,9 +26091,9 @@ void cdiInitialize(void)
 }
 
 
-char *strfiletype(int filetype)
+const char *strfiletype(int filetype)
 {
-  char *name;
+  const char *name;
   int size = (int) (sizeof(Filetypes)/sizeof(char *));
 
   if ( filetype > 0 && filetype < size )
@@ -25997,26 +26215,13 @@ int streamSize(void)
 
 void cdiDefGlobal(const char *string, int val)
 {
-  if ( strcmp(string, "REGULARGRID") == 0 )
-    {
-      cdiDataUnreduced = val;
-    }
-  else if ( strcmp(string, "SORTNAME") == 0 )
-    {
-      cdiSortName = val;
-    }
-  else if ( strcmp(string, "HAVE_MISSVAL") == 0 )
-    {
-      cdiHaveMissval = val;
-    }
-  else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 )
-    {
-      cdiNcChunksizehint = val;
-    }
-  else
-    {
-      Warning("Unsupported global key: %s", string);
-    }
+  if      ( strcmp(string, "REGULARGRID")      == 0 ) cdiDataUnreduced = val;
+  else if ( strcmp(string, "GRIBAPI_DEBUG")    == 0 ) cdiGribApiDebug = val;
+  else if ( strcmp(string, "SORTNAME")         == 0 ) cdiSortName = val;
+  else if ( strcmp(string, "HAVE_MISSVAL")     == 0 ) cdiHaveMissval = val;
+  else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 ) cdiNcChunksizehint = val;
+  else if ( strcmp(string, "NETCDF_HDR_PAD")   == 0 ) CDI_netcdf_hdr_pad = (size_t) val;
+  else Warning("Unsupported global key: %s", string);
 }
 
 
@@ -26210,10 +26415,10 @@ void streamPrintP   ( void * streamptr, FILE * fp )
 
   fprintf ( fp, "#\n");
   fprintf ( fp, "# streamID %d\n", sp->self);
-  fprintf ( fp, "#\n"); 
+  fprintf ( fp, "#\n");
   fprintf ( fp, "self          = %d\n", sp->self );
   fprintf ( fp, "accesstype    = %d\n", sp->accesstype );
-  fprintf ( fp, "accessmode    = %d\n", sp->accessmode ); 
+  fprintf ( fp, "accessmode    = %d\n", sp->accessmode );
   fprintf ( fp, "filetype      = %d\n", sp->filetype );
   fprintf ( fp, "byteorder     = %d\n", sp->byteorder );
   fprintf ( fp, "fileID        = %d\n", sp->fileID );
@@ -26235,7 +26440,7 @@ void streamPrintP   ( void * streamptr, FILE * fp )
   fprintf ( fp, "//  tsteps_t   *tsteps;\n" );
   fprintf ( fp, "tstepsTableSize= %d\n", sp->tstepsTableSize );
   fprintf ( fp, "tstepsNextID  = %d\n", sp->tstepsNextID );
-  fprintf ( fp, "//BaseTime  basetime;\n" );
+  fprintf ( fp, "//basetime_t  basetime;\n" );
   fprintf ( fp, "ncmode        = %d\n", sp->ncmode );
   fprintf ( fp, "vlistID       = %d\n", sp->vlistID );
   fprintf ( fp, "//  int       xdimID[MAX_GRIDS_PS];\n" );
@@ -26360,7 +26565,7 @@ streamPack(void * streamptr, void * packBuffer, int packBufferSize,
 
 struct streamAssoc
 streamUnpack(char * unpackBuffer, int unpackBufferSize,
-             int * unpackBufferPos, int nspTarget, void *context)
+             int * unpackBufferPos, int originNamespace, void *context)
 {
   int intBuffer[streamNint], streamID;
   uint32_t d;
@@ -26381,7 +26586,7 @@ streamUnpack(char * unpackBuffer, int unpackBufferSize,
   xassert(d == cdiCheckSum(DATATYPE_TXT, intBuffer[2], filename));
   streamID = streamOpenWrite ( filename, intBuffer[1] );
   xassert ( streamID >= 0 &&
-            namespaceAdaptKey ( intBuffer[0], nspTarget ) == streamID );
+            namespaceAdaptKey ( intBuffer[0], originNamespace ) == streamID );
   streamDefByteorder(streamID, intBuffer[5]);
   streamDefCompType(streamID, intBuffer[6]);
   streamDefCompLevel(streamID, intBuffer[7]);
@@ -26405,19 +26610,18 @@ streamUnpack(char * unpackBuffer, int unpackBufferSize,
 #if defined (HAVE_CONFIG_H)
 #endif
 
-#include <ctype.h>
-
-
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#endif
 
+#include <ctype.h>
+#include <stdio.h>
 #include <string.h>
 
-#define  MAX_FNAMES  3
 
-extern resOps streamOps;
 
 
-FILE *popen(const char *command, const char *type);
-int pclose(FILE *stream);
+#define  MAX_FNAMES  3
 
 static void
 cdiPrintDefaults(void)
@@ -26545,7 +26749,7 @@ int getFiletype(const char *filename, int *byteorder)
 
   if ( fileID == CDI_UNDEFID )
     {
-      if ( memcmp(filename, "http:", 5) == 0 )
+      if ( strncmp(filename, "http:", 5) == 0 || strncmp(filename, "https:", 6) == 0 )
 	return (FILETYPE_NC);
       else
 	return (CDI_ESYSTEM);
@@ -26780,9 +26984,7 @@ The valid CDI file format types are @func{FILETYPE_GRB}, @func{FILETYPE_GRB2}, @
 */
 int streamInqFiletype(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -26826,13 +27028,11 @@ with the file format type @func{FILETYPE_SRV}, @func{FILETYPE_EXT} or @func{FILE
 void streamDefByteorder(int streamID, int byteorder)
 {
   int filetype;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  if ( reshGetStatus ( streamID, &streamOps ) == CLOSED )
+  if ( reshGetStatus ( streamID, &streamOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -26846,7 +27046,7 @@ void streamDefByteorder(int streamID, int byteorder)
 #if  defined  (HAVE_LIBSERVICE)
     case FILETYPE_SRV:
       {
-	srvrec_t *srvp = streamptr->record->srvp;
+	srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 	srvp->byteswap = getByteswap(byteorder);
 
 	break;
@@ -26855,7 +27055,7 @@ void streamDefByteorder(int streamID, int byteorder)
 #if  defined  (HAVE_LIBEXTRA)
     case FILETYPE_EXT:
       {
-	extrec_t *extp = streamptr->record->extp;
+	extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 	extp->byteswap = getByteswap(byteorder);
 
 	break;
@@ -26864,7 +27064,7 @@ void streamDefByteorder(int streamID, int byteorder)
 #if  defined  (HAVE_LIBIEG)
     case FILETYPE_IEG:
       {
-	iegrec_t *iegp = streamptr->record->iegp;
+	iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 	iegp->byteswap = getByteswap(byteorder);
 
 	break;
@@ -26893,9 +27093,7 @@ The valid CDI byte order types are @func{CDI_BIGENDIAN} and @func{CDI_LITTLEENDI
 */
 int streamInqByteorder(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -26905,7 +27103,8 @@ int streamInqByteorder(int streamID)
 
 char *streamFilesuffix(int filetype)
 {
-  static char *fileSuffix[] = {"", ".grb", ".g2", ".nc", ".nc", ".nc4", ".nc4", ".srv", ".ext", ".ieg"};
+  // static char *fileSuffix[] = {"", ".grb", ".g2", ".nc", ".nc", ".nc4", ".nc4", ".srv", ".ext", ".ieg"};
+  static char *fileSuffix[] = {"", ".grb", ".grb", ".nc", ".nc", ".nc", ".nc", ".srv", ".ext", ".ieg"};
   int size = (int) (sizeof(fileSuffix)/sizeof(char *));
 
   if ( filetype > 0 && filetype < size )
@@ -26917,9 +27116,7 @@ char *streamFilesuffix(int filetype)
 
 char *streamFilename(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -26931,9 +27128,7 @@ int cdiInqTimeSize(int streamID)
 {
   int ntsteps;
   int tsID = 0, nrecs;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -27055,7 +27250,7 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
           {
             streamptr->record = (Record *) malloc(sizeof(Record));
             streamptr->record->buffer = NULL;
-            streamptr->record->srvp   = srvNew();
+            streamptr->record->exsep  = srvNew();
           }
         break;
       }
@@ -27069,7 +27264,7 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
           {
             streamptr->record = (Record *) malloc(sizeof(Record));
             streamptr->record->buffer = NULL;
-            streamptr->record->extp   = extNew();
+            streamptr->record->exsep  = extNew();
           }
         break;
       }
@@ -27083,7 +27278,7 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
           {
             streamptr->record = (Record *) malloc(sizeof(Record));
             streamptr->record->buffer = NULL;
-            streamptr->record->iegp   = iegNew();
+            streamptr->record->exsep   = iegNew();
           }
         break;
       }
@@ -27112,6 +27307,9 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
         return (CDI_ELIBNAVAIL);
       }
     }
+
+  streamptr->filetype = filetype;
+
   return fileID;
 }
 
@@ -27149,7 +27347,6 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
 
       if ( streamID < 0 ) return (CDI_ELIMIT);
 
-      streamptr->filetype = filetype;
       streamptr->filemode = tolower(*filemode);
       streamptr->filename = strdupx(filename);
       streamptr->fileID   = fileID;
@@ -27201,7 +27398,6 @@ static int streamOpenA(const char *filename, const char *filemode, int filetype)
 
   streamID = streamptr->self;
 
-  streamptr->filetype = filetype;
   streamptr->filemode = tolower(*filemode);
   streamptr->filename = strdupx(filename);
   streamptr->fileID   = fileID;
@@ -27332,7 +27528,6 @@ int streamOpenRead(const char *filenames)
   int num_fnames = 0;
   char *fnames[MAX_FNAMES];
   const char *filename;
-  stream_t *streamptr = NULL;
 
   cdiInitialize();
 
@@ -27355,7 +27550,7 @@ int streamOpenRead(const char *filenames)
 
   if ( streamID >= 0 )
     {
-      streamptr = stream_to_pointer(streamID);
+      stream_t *streamptr = stream_to_pointer(streamID);
       streamptr->byteorder = byteorder;
 
       if ( num_fnames > 0 )
@@ -27374,21 +27569,19 @@ int streamOpenRead(const char *filenames)
 
 int streamOpenAppend(const char *filename)
 {
-  int filetype, byteorder;
-  int streamID;
-  stream_t *streamptr;
+  int byteorder;
 
   cdiInitialize();
 
-  filetype = getFiletype(filename, &byteorder);
+  int filetype = getFiletype(filename, &byteorder);
 
   if ( filetype < 0 ) return (filetype);
 
-  streamID = streamOpenA(filename, "a", filetype);
+  int streamID = streamOpenA(filename, "a", filetype);
 
   if ( streamID >= 0 )
     {
-      streamptr = stream_to_pointer(streamID);
+      stream_t *streamptr = stream_to_pointer(streamID);
       streamptr->byteorder = byteorder;
     }
 
@@ -27467,7 +27660,7 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted)
         {
           fileClose(fileID);
           if (recordBufIsToBeDeleted)
-            srvDelete(streamptr->record->srvp);
+            srvDelete(streamptr->record->exsep);
           break;
         }
 #endif
@@ -27476,7 +27669,7 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted)
         {
           fileClose(fileID);
           if (recordBufIsToBeDeleted)
-            extDelete(streamptr->record->extp);
+            extDelete(streamptr->record->exsep);
           break;
         }
 #endif
@@ -27485,7 +27678,7 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted)
         {
           fileClose(fileID);
           if (recordBufIsToBeDeleted)
-            iegDelete(streamptr->record->iegp);
+            iegDelete(streamptr->record->exsep);
           break;
         }
 #endif
@@ -27525,9 +27718,7 @@ void streamClose(int streamID)
 {
   int index;
   int vlistID;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -27649,9 +27840,7 @@ The function @func{streamSync} offers a way to synchronize the disk copy of a da
 */
 void streamSync(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -27663,21 +27852,16 @@ void streamSync(int streamID)
 
 int cdiStreamDefTimestep_(stream_t *streamptr, int tsID)
 {
-  int newtsID;
   int taxisID;
-  int vlistID;
-  int time_is_varying;
-  taxis_t *taxisptr1;
-  taxis_t *taxisptr2;
 
   if ( CDI_Debug )
     Message("streamID = %d  tsID = %d", streamptr->self, tsID);
 
   stream_check_ptr(__func__, streamptr);
 
-  vlistID = streamptr->vlistID;
+  int vlistID = streamptr->vlistID;
 
-  time_is_varying = vlistHasTime(vlistID);
+  int time_is_varying = vlistHasTime(vlistID);
 
   if ( time_is_varying )
     {
@@ -27690,7 +27874,7 @@ int cdiStreamDefTimestep_(stream_t *streamptr, int tsID)
         }
     }
 
-  newtsID = tstepsNewEntry(streamptr);
+  int newtsID = tstepsNewEntry(streamptr);
 
   if ( tsID != newtsID )
     Error("Internal problem: tsID = %d newtsID = %d", tsID, newtsID);
@@ -27699,8 +27883,8 @@ int cdiStreamDefTimestep_(stream_t *streamptr, int tsID)
 
   if ( time_is_varying )
     {
-      taxisptr1 = taxisPtr(taxisID);
-      taxisptr2 = &streamptr->tsteps[tsID].taxis;
+      taxis_t *taxisptr1 = taxisPtr(taxisID);
+      taxis_t *taxisptr2 = &streamptr->tsteps[tsID].taxis;
       ptaxisCopy(taxisptr2, taxisptr1);
       if ( tsID == 0 )
         {
@@ -27782,17 +27966,13 @@ The function @func{streamInqTimestep} returns the time step of a stream.
 */
 int streamInqTimestep(int streamID, int tsID)
 {
-  int filetype;
   int nrecs = 0;
   int taxisID;
-  int vlistID;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  vlistID = streamptr->vlistID;
+  int vlistID = streamptr->vlistID;
 
   if ( tsID < streamptr->rtsteps )
     {
@@ -27812,7 +27992,7 @@ int streamInqTimestep(int streamID, int tsID)
       return (0);
     }
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   if ( CDI_Debug )
     Message("streamID = %d  tsID = %d  filetype = %d", streamID, tsID, filetype);
@@ -27893,19 +28073,16 @@ from an open dataset.
 */
 void streamReadVar(int streamID, int varID, double *data, int *nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d  varID = %d", streamID, varID);
 
   check_parg(data);
   check_parg(nmiss);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   *nmiss = 0;
 
@@ -27989,21 +28166,18 @@ void
 cdiStreamWriteVar_(int streamID, int varID, int memtype, const void *data,
                    int nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d varID = %d", streamID, varID);
 
   check_parg(data);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
   // check taxis
   if ( streamptr->curTsID == CDI_UNDEFID ) streamDefTimestep(streamID, 0);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   switch (filetype)
     {
@@ -28104,19 +28278,16 @@ from an open dataset.
 */
 void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int *nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d  varID = %d", streamID, varID);
 
   check_parg(data);
   check_parg(nmiss);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   *nmiss = 0;
 
@@ -28173,21 +28344,18 @@ void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int
 static
 void stream_write_var_slice(int streamID, int varID, int levelID, int memtype, const void *data, int nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d varID = %d", streamID, varID);
 
   check_parg(data);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
   // check taxis
   if ( streamptr->curTsID == CDI_UNDEFID ) streamDefTimestep(streamID, 0);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   switch (filetype)
     {
@@ -28306,18 +28474,15 @@ void
 cdiStreamwriteVarChunk_(int streamID, int varID, int memtype,
                         const int rect[][2], const void *data, int nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d varID = %d", streamID, varID);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
   // streamDefineTaxis(streamID);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   switch (filetype)
     {
@@ -28357,27 +28522,13 @@ cdiStreamwriteVarChunk_(int streamID, int varID, int memtype,
 
 void streamWriteContents(int streamID, char *cname)
 {
-  FILE *cnp;
-  int tsID, recID, varID, levelID;
-  long recsize;
-  int nrecs, nvars;
-  int code, gridID, zaxisID, tsteptype, datatype;
-  int ngrids;
-  int filetype, gridtype;
-  int xsize, ysize;
-  int date, time;
-  int i;
-  off_t recpos, position;
-  int vlistID;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  vlistID = streamptr->vlistID;
+  int vlistID = streamptr->vlistID;
 
-  cnp = fopen(cname, "w");
+  FILE *cnp = fopen(cname, "w");
 
   if ( cnp == NULL ) SysError(cname);
 
@@ -28385,19 +28536,19 @@ void streamWriteContents(int streamID, char *cname)
   fprintf(cnp, "#\n");
 
   fprintf(cnp, "filename: %s\n", streamptr->filename);
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
   fprintf(cnp, "filetype: %s\n", strfiletype(filetype));
 
   fprintf(cnp, "#\n");
   fprintf(cnp, "#grids:\n");
 
-  ngrids = vlistNgrids(vlistID);
-  for ( i = 0; i < ngrids; i++ )
+  int ngrids = vlistNgrids(vlistID);
+  for ( int i = 0; i < ngrids; i++ )
     {
-      gridID   = vlistGrid(vlistID, i);
-      gridtype = gridInqType(gridID);
-      xsize    = gridInqXsize(gridID);
-      ysize    = gridInqYsize(gridID);
+      int gridID   = vlistGrid(vlistID, i);
+      int gridtype = gridInqType(gridID);
+      int xsize    = gridInqXsize(gridID);
+      int ysize    = gridInqYsize(gridID);
       fprintf(cnp, "%4d:%4d:%4d:%4d\n", i+1, gridtype, xsize, ysize);
     }
 
@@ -28405,14 +28556,14 @@ void streamWriteContents(int streamID, char *cname)
 
   fprintf(cnp, "varID:code:gridID:zaxisID:tsteptype:datatype\n");
 
-  nvars = vlistNvars(vlistID);
-  for ( varID = 0; varID < nvars; varID++ )
+  int nvars = vlistNvars(vlistID);
+  for ( int varID = 0; varID < nvars; varID++ )
     {
-      code      = vlistInqVarCode(vlistID, varID);
-      gridID    = vlistInqVarGrid(vlistID, varID);
-      zaxisID   = vlistInqVarZaxis(vlistID, varID);
-      tsteptype = vlistInqVarTsteptype(vlistID, varID);
-      datatype  = vlistInqVarDatatype(vlistID, varID);
+      int code      = vlistInqVarCode(vlistID, varID);
+      int gridID    = vlistInqVarGrid(vlistID, varID);
+      int zaxisID   = vlistInqVarZaxis(vlistID, varID);
+      int tsteptype = vlistInqVarTsteptype(vlistID, varID);
+      int datatype  = vlistInqVarDatatype(vlistID, varID);
       fprintf(cnp, "%4d:%4d:%4d:%4d:%4d:%4d:\n",
 	      varID+1, code, gridID, zaxisID, tsteptype, datatype);
     }
@@ -28421,13 +28572,13 @@ void streamWriteContents(int streamID, char *cname)
 
   fprintf(cnp, "tsID:nrecs:date:time\n");
 
-  tsID = 0;
+  int tsID = 0;
   while (1)
     {
-      nrecs = streamptr->tsteps[tsID].nallrecs;
-      date  = streamptr->tsteps[tsID].taxis.vdate;
-      time  = streamptr->tsteps[tsID].taxis.vtime;
-      position = streamptr->tsteps[tsID].position;
+      int nrecs      = streamptr->tsteps[tsID].nallrecs;
+      int date       = streamptr->tsteps[tsID].taxis.vdate;
+      int time       = streamptr->tsteps[tsID].taxis.vtime;
+      off_t position = streamptr->tsteps[tsID].position;
 
       fprintf(cnp, "%4d:%4d:%4d:%4d:%ld\n",
 	      tsID, nrecs, date, time, (long) position);
@@ -28445,13 +28596,13 @@ void streamWriteContents(int streamID, char *cname)
   tsID = 0;
   while (1)
     {
-      nrecs = streamptr->tsteps[tsID].nallrecs;
-      for ( recID = 0; recID < nrecs; recID++ )
+      int nrecs = streamptr->tsteps[tsID].nallrecs;
+      for ( int recID = 0; recID < nrecs; recID++ )
 	{
-	  varID   = streamptr->tsteps[tsID].records[recID].varID;
-	  levelID = streamptr->tsteps[tsID].records[recID].levelID;
-	  recpos  = streamptr->tsteps[tsID].records[recID].position;
-	  recsize = (long)streamptr->tsteps[tsID].records[recID].size;
+	  int varID   = streamptr->tsteps[tsID].records[recID].varID;
+	  int levelID = streamptr->tsteps[tsID].records[recID].levelID;
+	  off_t recpos = streamptr->tsteps[tsID].records[recID].position;
+	  long recsize = (long)streamptr->tsteps[tsID].records[recID].size;
 	  fprintf(cnp, "%4d:%4d:%4d:%4d:%4ld:%ld\n",
 		  tsID, recID, varID, levelID, recsize, (long) recpos);
 	}
@@ -28468,15 +28619,9 @@ void streamWriteContents(int streamID, char *cname)
 
 void cdiDefTableID(int tableID)
 {
-  int modelID, instID;
-
   cdiDefaultTableID = tableID;
-
-  modelID = tableInqModel(tableID);
-  cdiDefaultModelID = modelID;
-
-  instID = modelInqInstitut(modelID);
-  cdiDefaultInstID = instID;
+  int modelID = cdiDefaultModelID = tableInqModel(tableID);
+  cdiDefaultInstID = modelInqInstitut(modelID);
 }
 
 
@@ -28510,9 +28655,7 @@ void cdiPrintVersion(void)
 
 int streamNtsteps(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -28522,9 +28665,7 @@ int streamNtsteps(int streamID)
 
 off_t   streamNvals(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -28584,9 +28725,7 @@ The function @func{streamInqVlist} returns the variable list of a stream.
 */
 int streamInqVlist(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -28596,9 +28735,7 @@ int streamInqVlist(int streamID)
 
 int streamInqVlistIDorig(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -28610,7 +28747,7 @@ void streamDefCompType(int streamID, int comptype)
 {
   stream_t *streamptr;
 
-  if ( reshGetStatus ( streamID, &streamOps ) == CLOSED )
+  if ( reshGetStatus ( streamID, &streamOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -28628,7 +28765,7 @@ void streamDefCompLevel(int streamID, int complevel)
 {
   stream_t *streamptr;
 
-  if ( reshGetStatus ( streamID, &streamOps ) == CLOSED )
+  if ( reshGetStatus ( streamID, &streamOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -28644,9 +28781,7 @@ void streamDefCompLevel(int streamID, int complevel)
 
 int streamInqCompType(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -28656,9 +28791,7 @@ int streamInqCompType(int streamID)
 
 int streamInqCompLevel(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -28926,9 +29059,10 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
 	      {
                 int recompinc = TRUE;
 
+                if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
+
 		if ( ISEC2_ResFlag && ISEC2_LonIncr > 0 )
                   {
-                    if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
                     if ( abs(ISEC2_LastLon - (ISEC2_FirstLon+ISEC2_LonIncr*(grid->xsize-1))) <= 2 )
                       {
                         recompinc = FALSE;
@@ -28993,6 +29127,8 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
 	  {
 	    if ( grid->xsize > 1 )
 	      {
+                if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
+
 		if ( ISEC2_ResFlag && ISEC2_LonIncr > 0 )
 		  grid->xinc = ISEC2_LonIncr * 0.001;
 		else
@@ -29081,8 +29217,8 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
   if ( cgribexGetIsRotated(isec2) )
     {
       grid->isRotated = TRUE;
-      grid->ypole     = - ISEC2_LatSP * 0.001;
-      grid->xpole     =   ISEC2_LonSP * 0.001 - 180;
+      grid->ypole     = - ISEC2_LatSP*0.001;
+      grid->xpole     =   ISEC2_LonSP*0.001 - 180;
       grid->angle     = 0;
     }
 
@@ -29147,7 +29283,7 @@ void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, d
   if ( datatype <  0 ) datatype = DATATYPE_PACK;
 
   varAddRecord(recID, param, gridID, zaxistype, lbounds, level1, level2, 0, 0,
-	       datatype, &varID, &levelID, tsteptype, numavg, ISEC1_LevelType, NULL, NULL, NULL);
+	       datatype, &varID, &levelID, tsteptype, numavg, ISEC1_LevelType, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -29197,10 +29333,6 @@ void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, d
 
   streamptr->tsteps[tsID].nallrecs++;
   streamptr->nrecs++;
-
-  if ( CDI_Debug )
-    Message("varID = %d  param = %d  zaxistype = %d  gridID = %d  levelID = %d",
-	    varID, param, zaxistype, gridID, levelID);
 }
 
 static
@@ -29230,7 +29362,7 @@ void MCH_get_undef(int *isec1, double *undef_pds, double *undef_eps)
 
 static
 void cgribexDecodeHeader(int *isec0, int *isec1, int *isec2, double *fsec2,
-			 int *isec3, double *fsec3, int *isec4, double *fsec4, 
+			 int *isec3, double *fsec3, int *isec4, double *fsec4,
 			 int *gribbuffer, int recsize, int *lmv, int *iret)
 {
   int ipunp = 0, iword = 0;
@@ -29282,6 +29414,9 @@ int cgribexVarCompare(compvar_t compVar, record_t record)
 }
 #endif
 
+#define gribWarning(text, nrecs, timestep, paramstr, level1, level2) \
+            Warning("Record %2d (id=%s lev1=%d lev2=%d) timestep %d: %s", nrecs, paramstr, level1, level2, timestep, text)
+
 int cgribexScanTimestep1(stream_t * streamptr)
 {
 #if  defined  (HAVE_LIBCGRIBEX)
@@ -29300,7 +29435,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
   int varID;
   size_t readsize;
   int nrecords, nrecs, recID;
-  int nrecs_scanned;
+  int nrecs_scanned = 0;
   int datatype;
   long recsize = 0;
   int warn_time = TRUE;
@@ -29312,6 +29447,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
   int comptype;
   long unzipsize;
   compvar_t compVar;
+  char paramstr[32];
   extern int cdiSkipRecords;
   int nskip = cdiSkipRecords;
 
@@ -29341,7 +29477,6 @@ int cgribexScanTimestep1(stream_t * streamptr)
       fileSetPos(fileID, recsize, SEEK_CUR);
     }
 
-  nrecs_scanned = 0;
   nrecs = 0;
   while ( TRUE )
     {
@@ -29383,6 +29518,8 @@ int cgribexScanTimestep1(stream_t * streamptr)
 			  (int *) gribbuffer, recsize, &lmv, &iret);
 
       param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
+      cdiParamToString(param, paramstr, sizeof(paramstr));
+
       if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
       if ( ISEC1_LevelType ==  99 ) ISEC1_LevelType = 100;
       level1   = ISEC1_Level1;
@@ -29422,9 +29559,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
 	      if ( warn_time )
 		if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 )
 		  {
-		    char paramstr[32];
-		    cdiParamToString(param, paramstr, sizeof(paramstr));
-		    Warning("Inconsistent verification time (param=%s level=%d)", paramstr, level1);
+                    gribWarning("Inconsistent verification time!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 		    warn_time = FALSE;
 		  }
 	    }
@@ -29434,9 +29569,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
 
 	      if ( recID < nrecs )
 		{
-		  char paramstr[32];
-		  cdiParamToString(param, paramstr, sizeof(paramstr));
-		  Warning("Param=%s level=%d (record %d) already exist, skipped!", paramstr, level1, nrecs_scanned);
+		  gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 		  continue;
 		}
 	    }
@@ -29446,8 +29579,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
 	{
 	  if (  taxis->numavg && warn_numavg && (taxis->numavg != ISEC1_AvgNum) )
 	    {
-	      Warning("Changing numavg from %d to %d not supported!",
-		      taxis->numavg, ISEC1_AvgNum);
+	      Warning("Changing numavg from %d to %d not supported!", taxis->numavg, ISEC1_AvgNum);
 	      warn_numavg = FALSE;
 	    }
 	  else
@@ -29459,7 +29591,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
       nrecs++;
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d  %8d %8d %6d", nrecs, (int)recpos, param, level1, vdate, vtime);
+	Message("Read record %2d (id=%s lev1=%d lev2=%d) %8d %6d", nrecs_scanned, paramstr, level1, level2, vdate, vtime);
 
       cgribexAddRecord(streamptr, param, isec1, isec2, fsec2, fsec3,
 		       isec4, recsize, recpos, datatype, comptype, lmv, iret);
@@ -29555,6 +29687,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
   int varID, gridID;
   size_t readsize;
   int nrecords, nrecs, recID, rindex;
+  int nrecs_scanned = 0;
   long recsize = 0;
   int warn_numavg = TRUE;
   int tsteptype;
@@ -29563,6 +29696,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
   int vlistID;
   long unzipsize;
   compvar_t compVar;
+  char paramstr[32];
 
   streamptr->curTsID = 1;
 
@@ -29602,6 +29736,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
       streamptr->tsteps[tsID].records[recID].size     =	streamptr->tsteps[0].records[recID].size;
     }
 
+  nrecs_scanned = nrecords;
   rindex = 0;
   while ( TRUE )
     {
@@ -29637,7 +29772,11 @@ int cgribexScanTimestep2(stream_t * streamptr)
       cgribexDecodeHeader(isec0, isec1, isec2, fsec2, isec3, fsec3, isec4, fsec4,
 			  (int *) gribbuffer, recsize, &lmv, &iret);
 
+      nrecs_scanned++;
+
       param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
+      cdiParamToString(param, paramstr, sizeof(paramstr));
+
       if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
       if ( ISEC1_LevelType ==  99 ) ISEC1_LevelType = 100;
       level1    = ISEC1_Level1;
@@ -29673,8 +29812,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
         	(taxis->numavg != ISEC1_AvgNum) )
 	    {
 	  /*
-	      Warning("Changing numavg from %d to %d not supported!",
-		      taxis->numavg, ISEC1_AvgNum);
+	      Warning("Changing numavg from %d to %d not supported!", taxis->numavg, ISEC1_AvgNum);
 	  */
 	      warn_numavg = FALSE;
 	    }
@@ -29696,9 +29834,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
 
       if ( recID == nrecords )
 	{
-	  char paramstr[32];
-	  cdiParamToString(param, paramstr, sizeof(paramstr));
-	  Warning("Param=%s level=%d not defined at timestep 1!", paramstr, level1);
+	  gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -29718,12 +29854,9 @@ int cgribexScanTimestep2(stream_t * streamptr)
 	{
 	  if ( streamptr->tsteps[tsID].records[recID].used )
 	    {
-	      char paramstr[32];
-	      cdiParamToString(param, paramstr, sizeof(paramstr));
-
 	      if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
-	      Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+              gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 	      continue;
 	    }
 	  else
@@ -29734,7 +29867,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
 	}
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d %8d %8d %6d", rindex+1, (int)recpos, param, level1, vdate, vtime);
+	Message("Read record %2d (id=%s lev1=%d lev2=%d) %8d %6d", nrecs_scanned, paramstr, level1, level2, vdate, vtime);
 
       streamptr->tsteps[tsID].records[recID].size = recsize;
 
@@ -29821,11 +29954,13 @@ int cgribexScanTimestep(stream_t * streamptr)
   taxis_t *taxis;
   int vlistID;
   int rindex, nrecs = 0;
+  int nrecs_scanned;
   long unzipsize;
   compvar_t compVar;
+  char paramstr[32];
 
   vlistID = streamptr->vlistID;
-
+  /*
   if ( CDI_Debug )
     {
       Message("streamID = %d", streamptr->self);
@@ -29833,7 +29968,7 @@ int cgribexScanTimestep(stream_t * streamptr)
       Message("rts = %d", streamptr->rtsteps);
       Message("nts = %d", streamptr->ntsteps);
     }
-
+  */
   isec0 = streamptr->record->sec0;
   isec1 = streamptr->record->sec1;
   isec2 = streamptr->record->sec2;
@@ -29861,6 +29996,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 
       fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
 
+      nrecs_scanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs*(tsID-1);
       rindex = 0;
       while ( TRUE )
 	{
@@ -29903,7 +30039,11 @@ int cgribexScanTimestep(stream_t * streamptr)
 	  cgribexDecodeHeader(isec0, isec1, isec2, fsec2, isec3, fsec3, isec4, fsec4,
 			      (int *) gribbuffer, recsize, &lmv, &iret);
 
+          nrecs_scanned++;
+
 	  param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
+          cdiParamToString(param, paramstr, sizeof(paramstr));
+
 	  if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
 	  if ( ISEC1_LevelType ==  99 ) ISEC1_LevelType = 100;
 	  level1   = ISEC1_Level1;
@@ -29940,8 +30080,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 		   (taxis->numavg != ISEC1_AvgNum) )
 		{
 	      /*
-	          Warning("Changing numavg from %d to %d not supported!",
-			  streamptr->tsteps[tsID].taxis.numavg, ISEC1_AvgNum);
+	          Warning("Changing numavg from %d to %d not supported!", streamptr->tsteps[tsID].taxis.numavg, ISEC1_AvgNum);
 	      */
 		  warn_numavg = FALSE;
 		}
@@ -29964,9 +30103,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 
 	  if ( vrecID == nrecs )
 	    {
-	      char paramstr[32];
-	      cdiParamToString(param, paramstr, sizeof(paramstr));
-	      Warning("Param=%s level=%d not available at timestep %d!", paramstr, level1, tsID+1);
+	      gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 
 	      if ( cdiInventoryMode == 1 )
 		return (CDI_EUFSTRUCT);
@@ -29989,7 +30126,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 		  if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
 		  if ( CDI_Debug )
-		    Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+                    gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 
 		  continue;
 		}
@@ -30001,7 +30138,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 	    }
 
 	  if ( CDI_Debug )
-	    Message("%4d %8d %4d %8d %8d %6d", rindex+1, (int)recpos, param, level1, vdate, vtime);
+            Message("Read record %2d (id=%s lev1=%d lev2=%d) %8d %6d", nrecs_scanned, paramstr, level1, level2, vdate, vtime);
 
 	  if ( cgribexVarCompare(compVar, streamptr->tsteps[tsID].records[recID]) != 0 )
 	    {
@@ -30015,9 +30152,6 @@ int cgribexScanTimestep(stream_t * streamptr)
 	  streamptr->tsteps[tsID].records[recID].position = recpos;
 	  streamptr->tsteps[tsID].records[recID].size = recsize;
 
-	  if ( CDI_Debug )
-	    Message("%4d %8d %4d %8d %8d %6d", rindex, (int)recpos, param, level1, vdate, vtime);
-
 	  rindex++;
 	}
 
@@ -30029,10 +30163,9 @@ int cgribexScanTimestep(stream_t * streamptr)
 
       if ( vrecID < nrecs )
 	{
-	  char paramstr[32];
 	  cdiParamToString(streamptr->tsteps[tsID].records[recID].param, paramstr, sizeof(paramstr));
-	  Warning("Param=%s level=%d not found at timestep %d!",
-		  paramstr, streamptr->tsteps[tsID].records[recID].ilevel, tsID+1);
+	  gribWarning("Paramameter not found!", nrecs_scanned, tsID+1, paramstr,
+                      streamptr->tsteps[tsID].records[recID].ilevel, streamptr->tsteps[tsID].records[recID].ilevel2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -30067,6 +30200,9 @@ int cgribexScanTimestep(stream_t * streamptr)
   return (rstatus);
 }
 
+#ifdef gribWarning
+#undef gribWarning
+#endif
 
 int cgribexDecode(unsigned char *gribbuffer, int gribsize, double *data, int gridsize,
 		  int unreduced, int *nmiss, int *zip, double missval)
@@ -30193,6 +30329,7 @@ static
 void cgribexDefParam(int *isec1, int param)
 {
   int pdis, pcat, pnum;
+  static bool lwarn_pdis = true, lwarn_pnum = true;
 
   cdiDecodeParam(param, &pnum, &pcat, &pdis);
 
@@ -30202,7 +30339,21 @@ void cgribexDefParam(int *isec1, int param)
     {
       char paramstr[32];
       cdiParamToString(param, paramstr, sizeof(paramstr));
-      Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
+      if ( lwarn_pdis )
+        {
+          Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
+          lwarn_pdis = false;
+        }
+    }
+
+  if ( pnum > 255 )
+    {
+      if ( lwarn_pnum )
+        {
+          Warning("Parameter number %d out of bounds (1-255), set to %d!", pnum, pnum%256);
+          lwarn_pnum = false;
+          pnum = pnum%256;
+        }
     }
 
   ISEC1_CodeTable = pcat;
@@ -30492,19 +30643,19 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
 
 	ISEC2_NumLon   = nlon;
 	ISEC2_NumLat   = nlat;
-	ISEC2_FirstLat = NINT(yfirst*1000);
-	ISEC2_LastLat  = NINT(ylast*1000);
+	ISEC2_FirstLat = lround(yfirst*1000);
+	ISEC2_LastLat  = lround(ylast*1000);
 	if ( gridtype == GRID_GAUSSIAN_REDUCED )
 	  {
 	    ISEC2_FirstLon = 0;
-	    ISEC2_LastLon  = NINT(1000*(360.-360./(nlat*2)));
-	    ISEC2_LonIncr  = NINT(1000*360./(nlat*2));
+	    ISEC2_LastLon  = lround(1000*(360.-360./(nlat*2)));
+	    ISEC2_LonIncr  = lround(1000*360./(nlat*2));
 	  }
 	else
 	  {
-	    ISEC2_FirstLon = NINT(xfirst*1000);
-	    ISEC2_LastLon  = NINT(xlast*1000);
-	    ISEC2_LonIncr  = NINT(xinc*1000);
+	    ISEC2_FirstLon = lround(xfirst*1000);
+	    ISEC2_LastLon  = lround(xlast*1000);
+	    ISEC2_LonIncr  = lround(xinc*1000);
 	  }
 
 	// if ( fabs(xinc*1000 - ISEC2_LonIncr) > FLT_EPSILON ) ISEC2_LonIncr = 0;
@@ -30517,7 +30668,7 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
           }
 	else
 	  {
-	    ISEC2_LatIncr = NINT(yinc*1000);
+	    ISEC2_LatIncr = lround(yinc*1000);
 	    // if ( fabs(yinc*1000 - ISEC2_LatIncr) > FLT_EPSILON ) ISEC2_LatIncr = 0;
 
 	    if ( ISEC2_LatIncr < 0 ) ISEC2_LatIncr = -ISEC2_LatIncr;
@@ -30536,8 +30687,8 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
 
 	if ( gridIsRotated(gridID) )
 	  {
-	    ISEC2_LatSP = - NINT(gridInqYpole(gridID) * 1000);
-	    ISEC2_LonSP =   NINT((gridInqXpole(gridID) + 180) * 1000);
+	    ISEC2_LatSP = - lround(gridInqYpole(gridID) * 1000);
+	    ISEC2_LonSP =   lround((gridInqXpole(gridID) + 180) * 1000);
 	  }
 
 	/* East -> West */
@@ -30563,13 +30714,13 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
 	ISEC2_GridType = GRIB1_GTYPE_LCC;
 	ISEC2_NumLon   = xsize;
 	ISEC2_NumLat   = ysize;
-	ISEC2_FirstLon = NINT(originLon * 1000);
-	ISEC2_FirstLat = NINT(originLat * 1000);
-	ISEC2_Lambert_Lov    = NINT(lonParY * 1000);
-	ISEC2_Lambert_LatS1  = NINT(lat1 * 1000);
-	ISEC2_Lambert_LatS2  = NINT(lat2 * 1000);
-	ISEC2_Lambert_dx     = NINT(xincm);
-	ISEC2_Lambert_dy     = NINT(yincm);
+	ISEC2_FirstLon = lround(originLon * 1000);
+	ISEC2_FirstLat = lround(originLat * 1000);
+	ISEC2_Lambert_Lov    = lround(lonParY * 1000);
+	ISEC2_Lambert_LatS1  = lround(lat1 * 1000);
+	ISEC2_Lambert_LatS2  = lround(lat2 * 1000);
+	ISEC2_Lambert_dx     = lround(xincm);
+	ISEC2_Lambert_dy     = lround(yincm);
 	ISEC2_Lambert_LatSP  = 0;
 	ISEC2_Lambert_LatSP  = 0;
 	ISEC2_Lambert_ProjFlag = projflag;
@@ -31029,8 +31180,6 @@ size_t cgribexEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
 #if  defined  (HAVE_LIBGRIB_API)
 #endif
 
-#define  NINT(x)  ((x) < 0 ? (int)((x)-.5) : (int)((x)+.5))
-
 extern int cdiInventoryMode;
 
 typedef struct {
@@ -31044,6 +31193,33 @@ typedef struct {
 
 #if  defined  (HAVE_LIBGRIB_API)
 static
+int my_grib_set_double(grib_handle* h, const char* key, double val)
+{
+  if ( cdiGribApiDebug )
+    fprintf(stderr, "grib_set_double(\tgrib_handle* h, \"%s\", %f)\n", key, val);
+
+  return grib_set_double(h, key, val);
+}
+
+static
+int my_grib_set_long(grib_handle* h, const char* key, long val)
+{
+  if ( cdiGribApiDebug )
+    fprintf(stderr, "grib_set_long(  \tgrib_handle* h, \"%s\", %ld)\n", key, val);
+
+  return grib_set_long(h, key, val);
+}
+
+static
+int my_grib_set_string(grib_handle* h, const char* key, const char* val, size_t* length)
+{
+  if ( cdiGribApiDebug )
+    fprintf(stderr, "grib_set_string(\tgrib_handle* h, \"%s\", \"%s\")\n", key, val);
+
+  return grib_set_string(h, key, val, length);
+}
+
+static
 int gribapiGetGridType(grib_handle *gh)
 {
   int gridtype = GRID_GENERIC;
@@ -31158,37 +31334,15 @@ double timeunit_factor(int tu1, int tu2)
 static
 int gribapiGetTimeUnits(grib_handle *gh)
 {
+  int status;
   int timeunits = -1;
   long unitsOfTime = -1;
-  int status;
-  // size_t len = 8;
-  //char stepunits[8];
-  //static int lprint = TRUE;
 
   status = grib_get_long(gh, "indicatorOfUnitOfTimeRange", &unitsOfTime);
 
-  timeunits = getTimeunits(unitsOfTime);
-
-  /*
-  GRIB_CHECK(grib_get_string(gh, "stepUnits", stepunits, &len), 0);
-
-  len--;
+  GRIB_CHECK(my_grib_set_long(gh, "stepUnits", unitsOfTime), 0);
 
-  if      ( memcmp(stepunits, "s",   len) == 0 ) timeunits = TUNIT_SECOND;
-  else if ( memcmp(stepunits, "m",   len) == 0 ) timeunits = TUNIT_MINUTE;
-  else if ( memcmp(stepunits, "h",   len) == 0 ) timeunits = TUNIT_HOUR;
-  else if ( memcmp(stepunits, "3h",  len) == 0 ) timeunits = TUNIT_3HOURS;
-  else if ( memcmp(stepunits, "6h",  len) == 0 ) timeunits = TUNIT_6HOURS;
-  else if ( memcmp(stepunits, "12h", len) == 0 ) timeunits = TUNIT_12HOURS;
-  else if ( memcmp(stepunits, "D",   len) == 0 ) timeunits = TUNIT_DAY;
-  else if ( memcmp(stepunits, "M",   len) == 0 ) timeunits = TUNIT_MONTH;
-  else if ( memcmp(stepunits, "Y",   len) == 0 ) timeunits = TUNIT_YEAR;
-  else if ( lprint )
-    {
-      Message("Step units >%s< unsupported!", stepunits);
-      lprint = FALSE;
-    }
-  */
+  timeunits = getTimeunits(unitsOfTime);
 
   return (timeunits);
 }
@@ -31287,8 +31441,8 @@ void gribapiGetDataDateTime(grib_handle *gh, int *datadate, int *datatime)
 static
 void gribapiSetDataDateTime(grib_handle *gh, int datadate, int datatime)
 {
-  GRIB_CHECK(grib_set_long(gh, "dataDate", datadate), 0);
-  GRIB_CHECK(grib_set_long(gh, "dataTime", datatime/100), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "dataDate", datadate), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "dataTime", datatime/100), 0);
 }
 
 static
@@ -31546,33 +31700,43 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
 	  }
 	break;
       }
-      /*
     case GRID_LCC:
       {
-	if ( ISEC4_NumValues != ISEC2_NumLon*ISEC2_NumLat )
-	  Error("numberOfPoints (%d) and gridSize (%d) differ!",
-		ISEC4_NumValues, ISEC2_NumLon*ISEC2_NumLat);
+	int nlon, nlat;
 
-	grid->size  = ISEC4_NumValues;
-	grid->xsize = ISEC2_NumLon;
-	grid->ysize = ISEC2_NumLat;
+	GRIB_CHECK(grib_get_long(gh, "Nx", &lpar), 0);
+	nlon = lpar;
+	GRIB_CHECK(grib_get_long(gh, "Ny", &lpar), 0);
+	nlat = lpar;
 
-	grid->lcc_xinc      = ISEC2_Lambert_dx;
-	grid->lcc_yinc      = ISEC2_Lambert_dy;
-	grid->lcc_originLon = ISEC2_FirstLon * 0.001;
-	grid->lcc_originLat = ISEC2_FirstLat * 0.001;
-	grid->lcc_lonParY   = ISEC2_Lambert_Lov * 0.001;
-	grid->lcc_lat1      = ISEC2_Lambert_LatS1 * 0.001;
-	grid->lcc_lat2      = ISEC2_Lambert_LatS2 * 0.001;
-	grid->lcc_projflag  = ISEC2_Lambert_ProjFlag;
-	grid->lcc_scanflag  = ISEC2_ScanFlag;
+	if ( numberOfPoints != nlon*nlat )
+	  Error("numberOfPoints (%d) and gridSize (%d) differ!", (int)numberOfPoints, nlon*nlat);
+
+	grid->size  = numberOfPoints;
+	grid->xsize = nlon;
+	grid->ysize = nlat;
+
+	GRIB_CHECK(grib_get_double(gh, "DxInMetres", &grid->lcc_xinc), 0);
+	GRIB_CHECK(grib_get_double(gh, "DyInMetres", &grid->lcc_yinc), 0);
+	GRIB_CHECK(grib_get_double(gh, "longitudeOfFirstGridPointInDegrees", &grid->lcc_originLon), 0);
+	GRIB_CHECK(grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &grid->lcc_originLat), 0);
+	GRIB_CHECK(grib_get_double(gh, "LoVInDegrees", &grid->lcc_lonParY), 0);
+	GRIB_CHECK(grib_get_double(gh, "Latin1InDegrees", &grid->lcc_lat1), 0);
+	GRIB_CHECK(grib_get_double(gh, "Latin2InDegrees", &grid->lcc_lat2), 0);
+
+        if ( editionNumber <= 1 )
+          {
+            GRIB_CHECK(grib_get_long(gh, "projectionCenterFlag", &lpar), 0);
+            grid->lcc_projflag  = (int) lpar;
+            GRIB_CHECK(grib_get_long(gh, "scanningMode", &lpar), 0);
+            grid->lcc_scanflag  = (int) lpar;
+          }
 
 	grid->xdef   = 0;
 	grid->ydef   = 0;
 
 	break;
       }
-      */
     case GRID_SPECTRAL:
       {
 	size_t len = 256;
@@ -31725,6 +31889,11 @@ double grib2ScaleFactor(long factor)
   else if ( factor == 2 ) scaleFactor =    0.01;
   else if ( factor == 3 ) scaleFactor =    0.001;
   else if ( factor == 4 ) scaleFactor =    0.0001;
+  else if ( factor == 5 ) scaleFactor =    0.00001;
+  else if ( factor == 6 ) scaleFactor =    0.000001;
+  else if ( factor == 7 ) scaleFactor =    0.0000001;
+  else if ( factor == 8 ) scaleFactor =    0.00000001;
+  else if ( factor == 9 ) scaleFactor =    0.000000001;
 
   return (scaleFactor);
 }
@@ -31768,6 +31937,11 @@ void grib2GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, i
           *level_sf = 1000;
           *level_unit = CDI_UNIT_PA;
         }
+      else if ( *leveltype == GRIB2_LTYPE_SIGMA )
+        {
+          *level_sf = 1000;
+          *level_unit = 0;
+        }
 
       GRIB_CHECK(grib_get_long(gh, "scaleFactorOfFirstFixedSurface", &factor), 0);
       GRIB_CHECK(grib_get_long(gh, "scaledValueOfFirstFixedSurface", &llevel), 0);
@@ -31829,7 +32003,7 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
   int vlistID;
   long lpar;
   int status;
-  char longname[256], units[256];
+  char stdname[CDI_MAX_NAME], longname[CDI_MAX_NAME], units[CDI_MAX_NAME];
   size_t vlen;
   long ens_index = 0, ens_count = 0, ens_forecast_type = 0;
 
@@ -31908,21 +32082,29 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
   // if ( datatype > 32 ) datatype = DATATYPE_PACK32;
   if ( datatype <  0 ) datatype = DATATYPE_PACK;
 
+  stdname[0] = 0;
   longname[0] = 0;
   units[0] = 0;
 
   if ( varname[0] != 0 )
     {
-      vlen = 256;
+      vlen = CDI_MAX_NAME;
       gribapiGetString(gh, "name", longname, vlen);
-      vlen = 256;
+      vlen = CDI_MAX_NAME;
       gribapiGetString(gh, "units", units, vlen);
+
+      {
+        vlen = CDI_MAX_NAME;
+        status = grib_get_string(gh, "cfName", stdname, &vlen);
+        if ( status != 0 || vlen <= 1 ) stdname[0] = 0;
+        else if ( strncmp(stdname, "unknown", 7) == 0 ) stdname[0] = 0;
+      }
     }
   // fprintf(stderr, "param %d name %s %s %s\n", param, name, longname, units);
 
   varAddRecord(recID, param, gridID, zaxistype, lbounds, level1, level2, level_sf, level_unit,
 	       datatype, &varID, &levelID, tsteptype, numavg, leveltype,
-	       varname, longname, units);
+	       varname, stdname, longname, units);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -32083,6 +32265,9 @@ int gribapiVarCompare(compvar2_t compVar, record_t record)
 }
 #endif
 
+#define gribWarning(text, nrecs, timestep, varname, paramstr, level1, level2) \
+            Warning("Record %2d (name=%s id=%s lev1=%d lev2=%d) timestep %d: %s", nrecs, varname, paramstr, level1, level2, timestep, text)
+
 int gribapiScanTimestep1(stream_t * streamptr)
 {
 #if  defined  (HAVE_LIBGRIB_API)
@@ -32101,7 +32286,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
   int varID;
   size_t readsize;
   int nrecords, nrecs, recID;
-  int nrecs_scanned;
+  int nrecs_scanned = 0;
   int datatype;
   long recsize = 0;
   int warn_time = TRUE;
@@ -32135,7 +32320,6 @@ int gribapiScanTimestep1(stream_t * streamptr)
 
   fileID = streamptr->fileID;
 
-  nrecs_scanned = 0;
   nrecs = 0;
   while ( TRUE )
     {
@@ -32175,7 +32359,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
 
       nrecs_scanned++;
       gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-      GRIB_CHECK(grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
+      GRIB_CHECK(my_grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
 
       GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -32278,7 +32462,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
                       }
                     else
                       {
-                        Warning("Inconsistent verification time (param=%s level=%d)", paramstr, level1);
+                        gribWarning("Inconsistent verification time!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
                         warn_time = FALSE;
                       }
                   }
@@ -32289,7 +32473,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
 
 	      if ( recID < nrecs )
 		{
-		  Warning("Param=%s level=%d (record %d) already exist, skipped!", paramstr, level1, nrecs_scanned);
+		  gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 		  continue;
 		}
 	    }
@@ -32312,7 +32496,8 @@ int gribapiScanTimestep1(stream_t * streamptr)
       nrecs++;
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d  %8d %8d %6d", nrecs, (int)recpos, param, level1, vdate, vtime);
+	Message("%4d %8d name=%s id=%s ltype=%d lev1=%d lev2=%d vdate=%d vtime=%d",
+                nrecs, (int)recpos, varname, paramstr, leveltype, level1, level2, vdate, vtime);
 
       gribapiAddRecord(streamptr, param, gh, recsize, recpos, datatype, comptype, len, varname,
                        leveltype, lbounds, level1, level2, level_sf, level_unit);
@@ -32410,6 +32595,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
   // int gridID;
   size_t readsize;
   int nrecords, nrecs, recID, rindex;
+  int nrecs_scanned = 0;
   long recsize = 0;
   //  int warn_numavg = TRUE;
   int tsteptype;
@@ -32460,6 +32646,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
       streamptr->tsteps[tsID].records[recID].size     = streamptr->tsteps[0].records[recID].size;
     }
 
+  nrecs_scanned = nrecords;
   rindex = 0;
   while ( TRUE )
     {
@@ -32492,8 +32679,9 @@ int gribapiScanTimestep2(stream_t * streamptr)
 	    }
 	}
 
+      nrecs_scanned++;
       gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-      GRIB_CHECK(grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
+      GRIB_CHECK(my_grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
 
       GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -32570,7 +32758,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
 
       if ( recID == nrecords )
 	{
-	  Warning("Param=%s (%s) l1=%d l2=%d not defined at timestep 1!", paramstr, varname, level1, level2);
+	  gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -32581,7 +32769,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
 	    {
 	      if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
-	      Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+              gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 	      continue;
 	    }
 	}
@@ -32590,7 +32778,8 @@ int gribapiScanTimestep2(stream_t * streamptr)
       streamptr->tsteps[tsID].recIDs[rindex] = recID;
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d %8d %8d %6d", rindex+1, (int)recpos, param, level1, vdate, vtime);
+	Message("%4d %8d name=%s id=%s ltype=%d lev1=%d lev2=%d vdate=%d vtime=%d",
+                nrecs_scanned, (int)recpos, varname, paramstr, leveltype, level1, level2, vdate, vtime);
 
       streamptr->tsteps[tsID].records[recID].size = recsize;
 
@@ -32680,6 +32869,7 @@ int gribapiScanTimestep(stream_t * streamptr)
   taxis_t *taxis;
   int vlistID;
   int rindex, nrecs = 0;
+  int nrecs_scanned;
   long unzipsize;
   compvar2_t compVar;
   grib_handle *gh = NULL;
@@ -32723,6 +32913,7 @@ int gribapiScanTimestep(stream_t * streamptr)
 
       fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
 
+      nrecs_scanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs*(tsID-1);
       rindex = 0;
       while ( TRUE )
 	{
@@ -32763,8 +32954,9 @@ int gribapiScanTimestep(stream_t * streamptr)
 		}
 	    }
 
+          nrecs_scanned++;
 	  gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-	  GRIB_CHECK(grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
+	  GRIB_CHECK(my_grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
 
 	  GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -32845,7 +33037,7 @@ int gribapiScanTimestep(stream_t * streamptr)
 
 	  if ( vrecID == nrecs )
 	    {
-	      Warning("Param=%s level=%d not available at timestep %d!", paramstr, level1, tsID+1);
+	      gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 
 	      if ( cdiInventoryMode == 1 )
 		return (CDI_EUFSTRUCT);
@@ -32860,7 +33052,7 @@ int gribapiScanTimestep(stream_t * streamptr)
 		  if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
 		  if ( CDI_Debug )
-		    Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+                    gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 
 		  continue;
 		}
@@ -32904,8 +33096,8 @@ int gribapiScanTimestep(stream_t * streamptr)
       if ( vrecID < nrecs )
 	{
 	  cdiParamToString(streamptr->tsteps[tsID].records[recID].param, paramstr, sizeof(paramstr));
-	  Warning("Param %d level %d not found at timestep %d!",
-		  paramstr, streamptr->tsteps[tsID].records[recID].ilevel, tsID+1);
+	  gribWarning("Paramameter not found!", nrecs_scanned, tsID+1, varname, paramstr,
+                      streamptr->tsteps[tsID].records[recID].ilevel, streamptr->tsteps[tsID].records[recID].ilevel2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -32942,6 +33134,9 @@ int gribapiScanTimestep(stream_t * streamptr)
   return (rstatus);
 }
 
+#ifdef gribWarning
+#undef gribWarning
+#endif
 
 int gribapiDecode(unsigned char *gribbuffer, int gribsize, double *data, int gridsize,
 		  int unreduced, int *nmiss, int *zip, double missval, int vlistID, int varID)
@@ -32966,7 +33161,7 @@ int gribapiDecode(unsigned char *gribbuffer, int gribsize, double *data, int gri
 
   recsize = gribsize;
   gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-  GRIB_CHECK(grib_set_double(gh, "missingValue", missval), 0);
+  GRIB_CHECK(my_grib_set_double(gh, "missingValue", missval), 0);
 
   GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -33025,9 +33220,9 @@ void gribapiDefInstitut(grib_handle *gh, int vlistID, int varID)
       GRIB_CHECK(grib_get_long(gh, "subCentre", &subcenter0), 0);
 
       if ( center != center0 )
-	GRIB_CHECK(grib_set_long(gh, "centre", center), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "centre", center), 0);
       if ( subcenter != subcenter0 )
-	GRIB_CHECK(grib_set_long(gh, "subCentre", subcenter), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "subCentre", subcenter), 0);
     }
 }
 
@@ -33042,7 +33237,7 @@ void gribapiDefModel(grib_handle *gh, int vlistID, int varID)
     modelID = vlistInqVarModel(vlistID, varID);
 
   if ( modelID != CDI_UNDEFID )
-    GRIB_CHECK(grib_set_long(gh, "generatingProcessIdentifier", modelInqGribID(modelID)), 0);
+    GRIB_CHECK(my_grib_set_long(gh, "generatingProcessIdentifier", modelInqGribID(modelID)), 0);
 }
 
 static
@@ -33057,7 +33252,7 @@ void gribapiDefParam(int editionNumber, grib_handle *gh, int param, const char *
       size_t len;
       int status;
       len = strlen(name);
-      status = grib_set_string(gh, "shortName", name, &len);
+      status = my_grib_set_string(gh, "shortName", name, &len);
       if ( status != 0 )
 	Warning("grib_api: No match for shortName=%s", name);
     }
@@ -33074,14 +33269,14 @@ void gribapiDefParam(int editionNumber, grib_handle *gh, int param, const char *
 	      Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
 	    }
 
-	  GRIB_CHECK(grib_set_long(gh, "table2Version",        pcat), 0);
-	  GRIB_CHECK(grib_set_long(gh, "indicatorOfParameter", pnum), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "table2Version",        pcat), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "indicatorOfParameter", pnum), 0);
 	}
       else
 	{
-	  GRIB_CHECK(grib_set_long(gh, "discipline",        pdis), 0);
-	  GRIB_CHECK(grib_set_long(gh, "parameterCategory", pcat), 0);
-	  GRIB_CHECK(grib_set_long(gh, "parameterNumber",   pnum), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "discipline",        pdis), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "parameterCategory", pcat), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "parameterNumber",   pnum), 0);
 	}
     }
 
@@ -33089,33 +33284,47 @@ void gribapiDefParam(int editionNumber, grib_handle *gh, int param, const char *
 }
 
 static
-int gribapiDefStepUnits(grib_handle *gh, int timeunit, int gcinit)
+int getTimeunitFactor(int timeunit)
 {
   int factor = 1;
+
+  switch (timeunit)
+    {
+    case TUNIT_SECOND:  factor =     1;  break;
+    case TUNIT_MINUTE:  factor =    60;  break;
+    case TUNIT_HOUR:    factor =  3600;  break;
+    case TUNIT_3HOURS:  factor = 10800;  break;
+    case TUNIT_6HOURS:  factor = 21600;  break;
+    case TUNIT_12HOURS: factor = 43200;  break;
+    case TUNIT_DAY:     factor = 86400;  break;
+    default:            factor =  3600;  break;
+    }
+
+  return (factor);
+}
+
+static
+void gribapiDefStepUnits(grib_handle *gh, int timeunit, int gcinit)
+{
   long unitsOfTime;
-  char stepunits[8];
-  size_t len;
 
   switch (timeunit)
     {
-    case TUNIT_SECOND:  factor =     1;  unitsOfTime = 13;  strcpy(stepunits, "s");   break;
-    case TUNIT_MINUTE:  factor =    60;  unitsOfTime =  0;  strcpy(stepunits, "m");   break;
-    case TUNIT_HOUR:    factor =  3600;  unitsOfTime =  1;  strcpy(stepunits, "h");   break;
-    case TUNIT_3HOURS:  factor = 10800;  unitsOfTime = 10;  strcpy(stepunits, "3h");  break;
-    case TUNIT_6HOURS:  factor = 21600;  unitsOfTime = 11;  strcpy(stepunits, "6h");  break;
-    case TUNIT_12HOURS: factor = 43200;  unitsOfTime = 12;  strcpy(stepunits, "12h"); break;
-    case TUNIT_DAY:     factor = 86400;  unitsOfTime =  2;  strcpy(stepunits, "D");   break;
-    default:            factor =  3600;  unitsOfTime =  1;  strcpy(stepunits, "h");   break;
+    case TUNIT_SECOND:  unitsOfTime = 13;  break;
+    case TUNIT_MINUTE:  unitsOfTime =  0;  break;
+    case TUNIT_HOUR:    unitsOfTime =  1;  break;
+    case TUNIT_3HOURS:  unitsOfTime = 10;  break;
+    case TUNIT_6HOURS:  unitsOfTime = 11;  break;
+    case TUNIT_12HOURS: unitsOfTime = 12;  break;
+    case TUNIT_DAY:     unitsOfTime =  2;  break;
+    default:            unitsOfTime =  1;  break;
     }
 
   if ( !gcinit )
     {
-      len = strlen(stepunits) + 1;
-      GRIB_CHECK(grib_set_long(gh, "indicatorOfUnitOfTimeRange", unitsOfTime), 0);
-      GRIB_CHECK(grib_set_string(gh, "stepUnits", stepunits, &len), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "stepUnits", unitsOfTime), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "indicatorOfUnitOfTimeRange", unitsOfTime), 0);
     }
-
-  return (factor);
 }
 
 static
@@ -33123,7 +33332,7 @@ int gribapiDefSteptype(int editionNumber, grib_handle *gh, int tsteptype, int gc
 {
   long proDefTempNum = 0;
   size_t len = 64;
-  char stepType[64];
+  char stepType[len];
 
   switch ( tsteptype )
     {
@@ -33142,9 +33351,9 @@ int gribapiDefSteptype(int editionNumber, grib_handle *gh, int tsteptype, int gc
 
   if ( !gcinit )
     {
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "productDefinitionTemplateNumber", proDefTempNum), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "productDefinitionTemplateNumber", proDefTempNum), 0);
       len = strlen(stepType);
-      GRIB_CHECK(grib_set_string(gh, "stepType", stepType, &len), 0);
+      GRIB_CHECK(my_grib_set_string(gh, "stepType", stepType, &len), 0);
     }
 
   return ((int)proDefTempNum);
@@ -33153,53 +33362,59 @@ int gribapiDefSteptype(int editionNumber, grib_handle *gh, int tsteptype, int gc
 static
 void gribapiDefDateTimeAbs(int editionNumber, grib_handle *gh, int date, int time, int tsteptype, int gcinit)
 {
-  if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "significanceOfReferenceTime", 0), 0);
-  if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "stepRange", 0), 0);
+  (void ) gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
+
+  if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "significanceOfReferenceTime", 0), 0);
+  if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "stepRange", 0), 0);
 
   if ( date == 0 ) date = 10101;
   gribapiSetDataDateTime(gh, date, time);
-
-  (void ) gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
 }
 
 static
 int gribapiDefDateTimeRel(int editionNumber, grib_handle *gh, int rdate, int rtime, int vdate, int vtime,
-                          int tsteptype, int factor, int calendar, int gcinit)
+                          int tsteptype, int timeunit, int calendar, int gcinit)
 {
   int status = -1;
   int year, month, day, hour, minute, second;
   int julday1, secofday1, julday2, secofday2, days, secs;
+  int factor;
   long startStep = 0, endStep;
-  long proDefTempNum = 0;
 
   cdiDecodeDate(rdate, &year, &month, &day);
   cdiDecodeTime(rtime, &hour, &minute, &second);
   encode_juldaysec(calendar, year, month, day, hour, minute, second, &julday1, &secofday1);
 
+  if ( vdate == 0 && vtime == 0 ) { vdate = rdate; vtime = rtime; }
+
   cdiDecodeDate(vdate, &year, &month, &day);
   cdiDecodeTime(vtime, &hour, &minute, &second);
   encode_juldaysec(calendar, year, month, day, hour, minute, second, &julday2, &secofday2);
 
   (void) julday_sub(julday1, secofday1, julday2, secofday2, &days, &secs);
 
+  factor = getTimeunitFactor(timeunit);
+
   if ( !(int) fmod(days*86400.0 + secs, factor) )
     {
+      int proDefTempNum = gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
+
+      gribapiDefStepUnits(gh, timeunit, gcinit);
+
       endStep = (int) ((days*86400.0 + secs)/factor);
 
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "significanceOfReferenceTime", 1), 0);
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "stepRange", 0), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "significanceOfReferenceTime", 1), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "stepRange", 0), 0);
 
       if ( rdate == 0 ) rdate = 10101;
       gribapiSetDataDateTime(gh, rdate, rtime);
 
       // printf(">>>>> tsteptype %d  startStep %ld  endStep %ld\n", tsteptype, startStep, endStep);
 
-      proDefTempNum = gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
-
       if ( proDefTempNum == 0 ) startStep = endStep;
 
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "forecastTime", startStep), 0);
-      GRIB_CHECK(grib_set_long(gh, "endStep", endStep), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "forecastTime", startStep), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "endStep", endStep), 0);
 
       status = 0;
     }
@@ -33233,10 +33448,9 @@ void gribapiDefTime(int editionNumber, int typeOfGeneratingProcess, grib_handle
       int rdate    = taxisInqRdate(taxisID);
       int rtime    = taxisInqRtime(taxisID);
       int timeunit = taxisInqTunit(taxisID);
-      int factor   = gribapiDefStepUnits(gh, timeunit, gcinit);
 
       status = gribapiDefDateTimeRel(editionNumber, gh, rdate, rtime, vdate, vtime,
-                                     tsteptype, factor, calendar, gcinit);
+                                     tsteptype, timeunit, calendar, gcinit);
 
       if ( status != 0 ) taxistype = TAXIS_ABSOLUTE;
     }
@@ -33312,12 +33526,12 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
           if ( ljpeg )
             {
               mesg = "grid_jpeg"; len = strlen(mesg);
-              GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+              GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
             }
           else
             {
               mesg = "grid_simple"; len = strlen(mesg);
-              GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+              GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
             }
         }
     }
@@ -33339,22 +33553,22 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	if ( gridtype == GRID_GAUSSIAN )
 	  {
 	    mesg = "regular_gg"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 	else if ( gridtype == GRID_GAUSSIAN_REDUCED )
 	  {
 	    mesg = "reduced_gg"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 	else if ( gridtype == GRID_LONLAT && gridIsRotated(gridID) )
 	  {
 	    mesg = "rotated_ll"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 	else
 	  {
 	    mesg = "regular_ll"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 
 	nlon = gridInqXsize(gridID);
@@ -33372,7 +33586,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	    gridInqRowlon(gridID, rowlon);
 	    for ( i = 0; i < nlat; ++i ) pl[i] = rowlon[i];
 
-	    // GRIB_CHECK(grib_set_long_array(gh, "pl", pl, nlat), 0);
+	    // GRIB_CHECK(my_grib_set_long_array(gh, "pl", pl, nlat), 0);
 
 	    free(pl);
 	    free(rowlon);
@@ -33402,18 +33616,18 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	    yinc   = gridInqYinc(gridID);
 	  }
 
-	GRIB_CHECK(grib_set_long(gh, "Ni", nlon), 0);
-	GRIB_CHECK(grib_set_long(gh, "Nj", nlat), 0);
-	GRIB_CHECK(grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", xfirst), 0);
-	GRIB_CHECK(grib_set_double(gh, "longitudeOfLastGridPointInDegrees",  xlast), 0);
-	GRIB_CHECK(grib_set_double(gh, "latitudeOfFirstGridPointInDegrees",  yfirst), 0);
-	GRIB_CHECK(grib_set_double(gh, "latitudeOfLastGridPointInDegrees",   ylast), 0);
-	GRIB_CHECK(grib_set_double(gh, "iDirectionIncrementInDegrees", xinc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Ni", nlon), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Nj", nlat), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", xfirst), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfLastGridPointInDegrees",  xlast), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees",  yfirst), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfLastGridPointInDegrees",   ylast), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "iDirectionIncrementInDegrees", xinc), 0);
 
         {
           long jscan = 0;
           if ( yfirst < ylast ) jscan = 1;
-          GRIB_CHECK(grib_set_long(gh, "jScansPositively", jscan), 0);
+          GRIB_CHECK(my_grib_set_long(gh, "jScansPositively", jscan), 0);
         }
 	/*
 	if ( fabs(xinc*1000 - ISEC2_LonIncr) > FLT_EPSILON )
@@ -33423,23 +33637,23 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
           {
             int np = gridInqNP(gridID);
             if ( np == 0 ) np = nlat/2;
-            GRIB_CHECK(grib_set_long(gh, "numberOfParallelsBetweenAPoleAndTheEquator", np), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "numberOfParallelsBetweenAPoleAndTheEquator", np), 0);
           }
 	else
 	  {
 	    latIncr = yinc;
 	    if ( latIncr < 0 ) latIncr = -latIncr;
-	    GRIB_CHECK(grib_set_double(gh, "jDirectionIncrementInDegrees", latIncr), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "jDirectionIncrementInDegrees", latIncr), 0);
 	    /*
 	    if ( fabs(yinc*1000 - ISEC2_LatIncr) > FLT_EPSILON )
 	      ISEC2_LatIncr = 0;
 	    */
 	  }
 	/*
-	if ( ISEC2_NumLon > 1 && ISEC2_NumLat == 1 ) 
+	if ( ISEC2_NumLon > 1 && ISEC2_NumLat == 1 )
 	  if ( ISEC2_LonIncr != 0 && ISEC2_LatIncr == 0 ) ISEC2_LatIncr = ISEC2_LonIncr;
 
-	if ( ISEC2_NumLon == 1 && ISEC2_NumLat > 1 ) 
+	if ( ISEC2_NumLon == 1 && ISEC2_NumLat > 1 )
 	  if ( ISEC2_LonIncr == 0 && ISEC2_LatIncr != 0 ) ISEC2_LonIncr = ISEC2_LatIncr;
 
 	if ( ISEC2_LatIncr == 0 || ISEC2_LonIncr == 0 )
@@ -33453,12 +33667,12 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	    xpole = gridInqXpole(gridID);
 	    ypole = gridInqYpole(gridID);
 	    angle = gridInqAngle(gridID);
-	    /* change from noth to south pole */
+	    /* change from north to south pole */
 	    ypole = -ypole;
 	    xpole =  xpole + 180;
-	    GRIB_CHECK(grib_set_double(gh, "latitudeOfSouthernPoleInDegrees",  ypole), 0);
-	    GRIB_CHECK(grib_set_double(gh, "longitudeOfSouthernPoleInDegrees", xpole), 0);
-	    GRIB_CHECK(grib_set_double(gh, "angleOfRotation", angle), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "latitudeOfSouthernPoleInDegrees",  ypole), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "longitudeOfSouthernPoleInDegrees", xpole), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "angleOfRotation", angle), 0);
 	  }
 
 	/* East -> West */
@@ -33472,12 +33686,12 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
         if ( lieee )
           {
             mesg = "grid_ieee"; len = strlen(mesg);
-            GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+            GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
 
 	    if ( datatype == DATATYPE_FLT64 )
-	      GRIB_CHECK(grib_set_long(gh, "precision", 2), 0);
+	      GRIB_CHECK(my_grib_set_long(gh, "precision", 2), 0);
 	    else
-	      GRIB_CHECK(grib_set_long(gh, "precision", 1), 0);
+	      GRIB_CHECK(my_grib_set_long(gh, "precision", 1), 0);
           }
         else if ( ljpeg )
 	  {
@@ -33486,23 +33700,22 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
             if ( ljpeg )
               {
                 mesg = "grid_jpeg"; len = strlen(mesg);
-                GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+                GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
               }
             else
               {
                 mesg = "grid_simple"; len = strlen(mesg);
-                GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+                GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
               }
 	  }
 	else
 	  {
 	    mesg = "grid_simple"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
 	  }
 
 	break;
       }
-      /*
     case GRID_LCC:
       {
 	double originLon, originLat, lonParY, lat1, lat2, xincm, yincm;
@@ -33515,83 +33728,89 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	gridInqLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
 		   &projflag, &scanflag);
 
-	ISEC2_GridType = GRIB2_GTYPE_LCC;
-	ISEC2_NumLon   = xsize;
-	ISEC2_NumLat   = ysize;
-	ISEC2_FirstLon = NINT(originLon * 1000);
-	ISEC2_FirstLat = NINT(originLat * 1000);
-	ISEC2_Lambert_Lov    = NINT(lonParY * 1000);
-	ISEC2_Lambert_LatS1  = NINT(lat1 * 1000);
-	ISEC2_Lambert_LatS2  = NINT(lat2 * 1000);
-	ISEC2_Lambert_dx     = NINT(xincm);
-	ISEC2_Lambert_dy     = NINT(yincm);
+        mesg = "lambert"; len = strlen(mesg);
+        GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
+
+	GRIB_CHECK(my_grib_set_long(gh, "Nx", xsize), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Ny", ysize), 0);
+
+	GRIB_CHECK(my_grib_set_double(gh, "DxInMetres", lround(xincm)), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "DyInMetres", lround(yincm)), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", originLon), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", originLat), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "LoVInDegrees", lonParY), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "Latin1InDegrees", lat1), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "Latin2InDegrees", lat2), 0);
+
+        if ( editionNumber <= 1 )
+          {
+            GRIB_CHECK(my_grib_set_long(gh, "projectionCenterFlag", projflag), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "scanningMode", scanflag), 0);
+          }
+        /*
 	ISEC2_Lambert_LatSP  = 0;
 	ISEC2_Lambert_LatSP  = 0;
-	ISEC2_Lambert_ProjFlag = projflag;
-	ISEC2_ScanFlag = scanflag;
-
+        */
 	break;
       }
-      */
     case GRID_SPECTRAL:
       {
 	int trunc = gridInqTrunc(gridID);
 
 	mesg = "sh"; len = strlen(mesg);
-	GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 
-	GRIB_CHECK(grib_set_long(gh, "J", trunc), 0);
-	GRIB_CHECK(grib_set_long(gh, "K", trunc), 0);
-	GRIB_CHECK(grib_set_long(gh, "M", trunc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "J", trunc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "K", trunc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "M", trunc), 0);
 
-	// GRIB_CHECK(grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
+	// GRIB_CHECK(my_grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
         /*
         if ( lieee )
           {
             printf("spectral_ieee\n");
-            if ( editionNumber == 2 ) GRIB_CHECK(grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
+            if ( editionNumber == 2 ) GRIB_CHECK(my_grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
             mesg = "spectral_ieee"; len = strlen(mesg);
-            GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+            GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
           }
         else */ if ( gridInqComplexPacking(gridID) )
 	  {
-	    if ( editionNumber == 2 ) GRIB_CHECK(grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
+	    if ( editionNumber == 2 ) GRIB_CHECK(my_grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
 	    mesg = "spectral_complex"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
-	    /*
-	    GRIB_CHECK(grib_set_long(gh, "JS", 20), 0);
-	    GRIB_CHECK(grib_set_long(gh, "KS", 20), 0);
-	    GRIB_CHECK(grib_set_long(gh, "MS", 20), 0);
-	    */
+	    GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
+
+	    GRIB_CHECK(my_grib_set_long(gh, "JS", 20), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "KS", 20), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "MS", 20), 0);
 	  }
 	else
 	  {
 	    mesg = "spectral_simple"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
 	  }
 
 	break;
       }
     case GRID_GME:
       {
-	GRIB_CHECK(grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_GME), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_GME), 0);
 
-	GRIB_CHECK(grib_set_long(gh, "nd", gridInqGMEnd(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "Ni", gridInqGMEni(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "n2", gridInqGMEni2(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "n3", gridInqGMEni3(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "latitudeOfThePolePoint", 90000000), 0);
-	GRIB_CHECK(grib_set_long(gh, "longitudeOfThePolePoint", 0), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "nd", gridInqGMEnd(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Ni", gridInqGMEni(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "n2", gridInqGMEni2(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "n3", gridInqGMEni3(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "latitudeOfThePolePoint", 90000000), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "longitudeOfThePolePoint", 0), 0);
 
-	GRIB_CHECK(grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "totalNumberOfGridPoints", gridInqSize(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "totalNumberOfGridPoints", gridInqSize(gridID)), 0);
 
 	break;
       }
     case GRID_UNSTRUCTURED:
       {
 	static int warning = 1;
-	status = grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_UNSTRUCTURED);
+	status = my_grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_UNSTRUCTURED);
 	if ( status != 0 && warning )
 	  {
 	    warning = 0;
@@ -33606,8 +33825,8 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
             int number = gridInqNumber(gridID);
             if ( position < 0 ) position = 0;
             if ( number < 0 ) number = 0;
-	    GRIB_CHECK(grib_set_long(gh, "numberOfGridUsed", number), 0);
-	    GRIB_CHECK(grib_set_long(gh, "numberOfGridInReference", position), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "numberOfGridUsed", number), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "numberOfGridInReference", position), 0);
             len = 16;
             gridInqUUID(gridID, uuid);
 	    if (grib_set_bytes(gh, "uuidOfHGrid", (unsigned char *) uuid, &len) != 0)
@@ -33645,7 +33864,7 @@ void getLevelFactor(double level, long *factor, long *out_scaled_value)
 static
 void gribapiDefLevelType(grib_handle *gh, int gcinit, const char *keyname, long leveltype)
 {
-  if ( !gcinit ) GRIB_CHECK(grib_set_long(gh, keyname, leveltype), 0);
+  if ( !gcinit ) GRIB_CHECK(my_grib_set_long(gh, keyname, leveltype), 0);
 }
 
 static
@@ -33660,14 +33879,14 @@ void grib2DefLevel(grib_handle *gh, int gcinit, long leveltype, int lbounds, dou
   if ( !lbounds ) dlevel1 = level;
 
   getLevelFactor(dlevel1, &factor, &scaled_level);
-  GRIB_CHECK(grib_set_long(gh, "scaleFactorOfFirstFixedSurface", factor), 0);
-  GRIB_CHECK(grib_set_long(gh, "scaledValueOfFirstFixedSurface", scaled_level), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "scaleFactorOfFirstFixedSurface", factor), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "scaledValueOfFirstFixedSurface", scaled_level), 0);
 
   if ( lbounds )
     {
       getLevelFactor(dlevel2, &factor, &scaled_level);
-      GRIB_CHECK(grib_set_long(gh, "scaleFactorOfSecondFixedSurface", factor), 0);
-      GRIB_CHECK(grib_set_long(gh, "scaledValueOfSecondFixedSurface", scaled_level), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "scaleFactorOfSecondFixedSurface", factor), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "scaledValueOfSecondFixedSurface", scaled_level), 0);
     }
 }
 
@@ -33723,7 +33942,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
         else
           gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", zaxisTypeToGrib2ltype(zaxistype));
 
-        GRIB_CHECK(grib_set_long(gh, "level", level), 0);
+        GRIB_CHECK(my_grib_set_long(gh, "level", level), 0);
 
 	break;
       }
@@ -33749,8 +33968,8 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
                 gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", zaxisTypeToGrib2ltype(zaxistype));
               }
 
-            GRIB_CHECK(grib_set_long(gh, "topLevel", (long) dlevel1), 0);
-            GRIB_CHECK(grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "topLevel", (long) dlevel1), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
           }
         else
           {
@@ -33759,7 +33978,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
             else
               gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", zaxisTypeToGrib2ltype(zaxistype));
 
-            GRIB_CHECK(grib_set_long(gh, "level", (long) level), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "level", (long) level), 0);
           }
 
         break;
@@ -33777,8 +33996,8 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
 		gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", GRIB2_LTYPE_HYBRID);
 	      }
 
-	    GRIB_CHECK(grib_set_long(gh, "topLevel", (long) dlevel1), 0);
-	    GRIB_CHECK(grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "topLevel", (long) dlevel1), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
 	  }
 	else
 	  {
@@ -33787,7 +34006,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
             else
               gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", GRIB2_LTYPE_HYBRID);
 
-	    GRIB_CHECK(grib_set_long(gh, "level", (long) level), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "level", (long) level), 0);
 	  }
 
         if ( !gcinit )
@@ -33800,7 +34019,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
                 Warning("VCT missing ( param = %s, zaxisID = %d )", paramstr, zaxisID);
                 warning = 0;
               }
-            GRIB_CHECK(grib_set_long(gh, "PVPresent", 1), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "PVPresent", 1), 0);
             GRIB_CHECK(grib_set_double_array(gh, "pv", zaxisInqVctPtr(zaxisID), vctsize), 0);
           }
 
@@ -33831,7 +34050,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
               level /= 100;
 
             gribapiDefLevelType(gh, gcinit, "indicatorOfTypeOfLevel", leveltype);
-            GRIB_CHECK(grib_set_double(gh, "level", level), 0);
+            GRIB_CHECK(my_grib_set_double(gh, "level", level), 0);
 	  }
 	else
 	  {
@@ -33865,7 +34084,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
 	    else                                    scalefactor = 100;
 
 	    gribapiDefLevelType(gh, gcinit, "indicatorOfTypeOfLevel", GRIB1_LTYPE_LANDDEPTH);
-	    GRIB_CHECK(grib_set_double(gh, "level", level*scalefactor), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "level", level*scalefactor), 0);
 	  }
 	else
 	  {
@@ -33889,7 +34108,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
 
         if ( !gcinit )
           {
-            GRIB_CHECK(grib_set_long(gh, "genVertHeightCoords", 1), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "genVertHeightCoords", 1), 0);
           }
 
         if ( lbounds )
@@ -33901,15 +34120,15 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
                 number = zaxisInqNumber(zaxisID);
                 gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", GRIB2_LTYPE_REFERENCE);
                 gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", GRIB2_LTYPE_REFERENCE);
-                GRIB_CHECK(grib_set_long(gh, "NV", 6), 0);
-                GRIB_CHECK(grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
-                GRIB_CHECK(grib_set_long(gh, "numberOfVGridUsed", number), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "NV", 6), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "numberOfVGridUsed", number), 0);
                 len = 16;
                 zaxisInqUUID(zaxisID, uuid);
                 if (grib_set_bytes(gh, "uuidOfVGrid", (unsigned char *) uuid, &len) != 0)
                   Warning("Can't write UUID!");
-                GRIB_CHECK(grib_set_long(gh, "topLevel", (long) dlevel1), 0);
-                GRIB_CHECK(grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "topLevel", (long) dlevel1), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
               }
           }
         else
@@ -33920,14 +34139,14 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
               {
                 number = zaxisInqNumber(zaxisID);
                 gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", GRIB2_LTYPE_REFERENCE);
-                GRIB_CHECK(grib_set_long(gh, "NV", 6), 0);
-                GRIB_CHECK(grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
-                GRIB_CHECK(grib_set_long(gh, "numberOfVGridUsed", number), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "NV", 6), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "numberOfVGridUsed", number), 0);
                 len = 16;
                 zaxisInqUUID(zaxisID, uuid);
                 if (grib_set_bytes(gh, "uuidOfVGrid", (unsigned char *) uuid, &len) != 0)
                   Warning("Can't write UUID!");
-                GRIB_CHECK(grib_set_double(gh, "level", level), 0);
+                GRIB_CHECK(my_grib_set_double(gh, "level", level), 0);
               }
           }
 
@@ -33940,7 +34159,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
         else
           gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", ltype);
 
-	GRIB_CHECK(grib_set_double(gh, "level", level), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "level", level), 0);
 
 	break;
       }
@@ -33991,7 +34210,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
   int datatype;
   int param;
   int lieee = FALSE;
-  int ensID, ensCount, forecast_type; /* Ensemble Data */
+  /*  int ensID, ensCount, forecast_type; *//* Ensemble Data */
   int typeOfGeneratingProcess;
   long bitsPerValue;
   long editionNumber = 2;
@@ -34014,8 +34233,11 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
 
   GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
-  if ( typeOfGeneratingProcess == -1 ) typeOfGeneratingProcess = 0;
-  if ( ! gc->init ) GRIB_CHECK(grib_set_long(gh, "typeOfGeneratingProcess", typeOfGeneratingProcess), 0);
+  if ( editionNumber == 2 )
+    {
+      if ( typeOfGeneratingProcess == -1 ) typeOfGeneratingProcess = 0;
+      if ( ! gc->init ) GRIB_CHECK(my_grib_set_long(gh, "typeOfGeneratingProcess", typeOfGeneratingProcess), 0);
+    }
 
   if ( ! gc->init ) gribapiDefInstitut(gh, vlistID, varID);
   if ( ! gc->init ) gribapiDefModel(gh, vlistID, varID);
@@ -34024,9 +34246,9 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
   /*
   if( vlistInqVarEnsemble( vlistID,  varID, &ensID, &ensCount, &forecast_type ) )
     {
-      GRIB_CHECK(grib_set_long(gh, "typeOfEnsembleForecast", forecast_type ), 0);
-      GRIB_CHECK(grib_set_long(gh, "numberOfForecastsInEnsemble", ensCount ), 0);
-      GRIB_CHECK(grib_set_long(gh, "perturbationNumber", ensID ), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "typeOfEnsembleForecast", forecast_type ), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "numberOfForecastsInEnsemble", ensCount ), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "perturbationNumber", ensID ), 0);
     }
   */
 
@@ -34038,7 +34260,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
   //  if ( lieee == FALSE )
     {
       bitsPerValue = grbBitsPerValue(datatype);
-      GRIB_CHECK(grib_set_long(gh, "bitsPerValue", bitsPerValue), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "bitsPerValue", bitsPerValue), 0);
     }
 
   gribapiDefGrid(editionNumber, gh, gridID, ljpeg, lieee, datatype, nmiss, gc->init);
@@ -34055,7 +34277,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
     int i;
     for (i=0; i<vlistptr->vars[varID].opt_grib_dbl_nentries; i++)
       {
-	int ret = grib_set_double(gh, vlistptr->vars[varID].opt_grib_dbl_keyword[i],
+	int ret = my_grib_set_double(gh, vlistptr->vars[varID].opt_grib_dbl_keyword[i],
                                   vlistptr->vars[varID].opt_grib_dbl_val[i]);
 	if (ret != 0) {
 	    fprintf(stderr, "key \"%s\"  :   value = %g\n",
@@ -34066,7 +34288,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
       }
     for (i=0; i<vlistptr->vars[varID].opt_grib_int_nentries; i++)
       {
-	int ret = grib_set_long(gh, vlistptr->vars[varID].opt_grib_int_keyword[i],
+	int ret = my_grib_set_long(gh, vlistptr->vars[varID].opt_grib_int_keyword[i],
 	                        vlistptr->vars[varID].opt_grib_int_val[i]);
 	if (ret != 0) {
 	    fprintf(stderr, "key \"%s\"  :   value = %d\n",
@@ -34080,8 +34302,8 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
 
   if ( nmiss > 0 )
     {
-      GRIB_CHECK(grib_set_long(gh, "bitmapPresent", 1), 0);
-      GRIB_CHECK(grib_set_double(gh, "missingValue", vlistInqVarMissval(vlistID, varID)), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "bitmapPresent", 1), 0);
+      GRIB_CHECK(my_grib_set_double(gh, "missingValue", vlistInqVarMissval(vlistID, varID)), 0);
     }
 
   GRIB_CHECK(grib_set_double_array(gh, "values", data, datasize), 0);
@@ -34730,7 +34952,7 @@ int grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype
     }
 
   nbytes = grbEncode(filetype, varID, levelID, vlistID, gridID, zaxisID, date, time, tsteptype, numavg, 
-		     datasize, data, nmiss, &gribbuffer, ljpeg, gc);
+		     datasize, (const double*) data, nmiss, &gribbuffer, ljpeg, gc);
 
   if ( streamptr->comptype == COMPRESS_SZIP )
     nbytes = grbSzip(filetype, gribbuffer, nbytes);
@@ -34940,11 +35162,10 @@ int srvInqRecord(stream_t *streamptr, int *varID, int *levelID)
   int zaxisID = -1;
   int header[8];
   int vlistID;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  srvp    = streamptr->record->srvp;
 
   *varID   = -1;
   *levelID = -1;
@@ -34979,7 +35200,7 @@ int srvReadRecord(stream_t *streamptr, double *data, int *nmiss)
   int varID, gridID;
   int i, size;
   double missval;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -34988,7 +35209,6 @@ int srvReadRecord(stream_t *streamptr, double *data, int *nmiss)
   recID   = streamptr->tsteps[tsID].recIDs[vrecID];
   recpos  = streamptr->tsteps[tsID].records[recID].position;
   varID   = streamptr->tsteps[tsID].records[recID].varID;
-  srvp    = streamptr->record->srvp;
 
   fileSetPos(fileID, recpos, SEEK_SET);
 
@@ -35056,10 +35276,9 @@ int srvDefRecord(stream_t *streamptr)
   int xsize, ysize;
   int datatype;
   int pdis, pcat, pnum;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   gridID = streamptr->record->gridID;
-  srvp   = streamptr->record->srvp;
 
   cdiDecodeParam(streamptr->record->param, &pnum, &pcat, &pdis);
   header[0] = pnum;
@@ -35095,12 +35314,9 @@ int srvDefRecord(stream_t *streamptr)
 
 int srvWriteRecord(stream_t *streamptr, const double *data)
 {
-  int fileID;
   int status = 0;
-  srvrec_t *srvp;
-
-  fileID = streamptr->fileID;
-  srvp   = streamptr->record->srvp;
+  int fileID = streamptr->fileID;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   srvDefDataDP(srvp, data);
 
@@ -35149,7 +35365,7 @@ void srv_add_record(stream_t *streamptr, int param, int level, int xsize, int ys
   datatype = srvInqDatatype(prec);
 
   varAddRecord(recID, param, gridID, leveltype, 0, level, 0, 0, 0,
-	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL);
+	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -35209,11 +35425,10 @@ void srvScanTimestep1(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   SRVCOMPVAR compVar, compVar0;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 0;
 
-  srvp  = streamptr->record->srvp;
   tsID  = tstepsNewEntry(streamptr);
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -35344,13 +35559,12 @@ int srvScanTimestep2(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   SRVCOMPVAR compVar, compVar0;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 1;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  srvp    = streamptr->record->srvp;
 
   tsID = streamptr->rtsteps;
   if ( tsID != 1 )
@@ -35519,7 +35733,7 @@ int srvScanTimestep(stream_t *streamptr)
   taxis_t *taxis;
   int rindex, nrecs = 0;
   SRVCOMPVAR compVar, compVar0;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     {
@@ -35532,7 +35746,6 @@ int srvScanTimestep(stream_t *streamptr)
   if ( streamptr->rtsteps == 0 )
     Error("Internal problem! Missing contents.");
 
-  srvp  = streamptr->record->srvp;
   tsID  = streamptr->rtsteps;
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -35671,9 +35884,8 @@ void srvReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int recID;
   int i;
   double missval;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -35719,9 +35931,8 @@ void srvReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
   int recID;
   int i;
   double missval;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -35768,12 +35979,11 @@ void srvWriteVarDP(stream_t *streamptr, int varID, const double *data)
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     Message("streamID = %d  varID = %d", streamptr->self, varID);
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
@@ -35835,9 +36045,8 @@ void srvWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
@@ -35960,11 +36169,10 @@ int extInqRecord(stream_t *streamptr, int *varID, int *levelID)
   int zaxisID = -1;
   int header[4];
   int vlistID;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  extp    = streamptr->record->extp;
 
   *varID   = -1;
   *levelID = -1;
@@ -35999,7 +36207,7 @@ int extReadRecord(stream_t *streamptr, double *data, int *nmiss)
   int varID, gridID;
   int i, size;
   double missval;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -36008,7 +36216,6 @@ int extReadRecord(stream_t *streamptr, double *data, int *nmiss)
   recID   = streamptr->tsteps[tsID].recIDs[vrecID];
   recpos  = streamptr->tsteps[tsID].records[recID].position;
   varID   = streamptr->tsteps[tsID].records[recID].varID;
-  extp    = streamptr->record->extp;
 
   fileSetPos(fileID, recpos, SEEK_SET);
 
@@ -36086,10 +36293,9 @@ int extDefRecord(stream_t *streamptr)
   int header[4];
   int status = 0;
   int pdis, pcat, pnum;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   gridID   = streamptr->record->gridID;
-  extp     = streamptr->record->extp;
 
   cdiDecodeParam(streamptr->record->param, &pnum, &pcat, &pdis);
   header[0] = streamptr->record->date;
@@ -36107,12 +36313,9 @@ int extDefRecord(stream_t *streamptr)
 
 int extWriteRecord(stream_t *streamptr, const double *data)
 {
-  int fileID;
   int status = 0;
-  extrec_t *extp;
-
-  fileID = streamptr->fileID;
-  extp   = streamptr->record->extp;
+  int fileID = streamptr->fileID;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   extDefDataDP(extp, data);
 
@@ -36158,7 +36361,7 @@ void extAddRecord(stream_t *streamptr, int param, int level, int xysize,
   leveltype = ZAXIS_GENERIC;
 
   varAddRecord(recID, param, gridID, leveltype, 0, level, 0, 0, 0,
-	       extInqDatatype(prec, number), &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL);
+	       extInqDatatype(prec, number), &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -36217,11 +36420,10 @@ void extScanTimestep1(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   extcompvar_t compVar, compVar0;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 0;
 
-  extp  = streamptr->record->extp;
   tsID  = tstepsNewEntry(streamptr);
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -36351,13 +36553,12 @@ int extScanTimestep2(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   extcompvar_t compVar, compVar0;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 1;
 
   fileID  = streamptr->fileID;
   vlistID = streamptr->vlistID;
-  extp    = streamptr->record->extp;
 
   tsID = streamptr->rtsteps;
   if ( tsID != 1 )
@@ -36527,7 +36728,7 @@ int extScanTimestep(stream_t *streamptr)
   taxis_t *taxis;
   int rindex, nrecs = 0;
   extcompvar_t compVar, compVar0;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     {
@@ -36540,7 +36741,6 @@ int extScanTimestep(stream_t *streamptr)
   if ( streamptr->rtsteps == 0 )
     Error("Internal problem! Missing contents.");
 
-  extp  = streamptr->record->extp;
   tsID  = streamptr->rtsteps;
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -36678,9 +36878,8 @@ void extReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int recID;
   int i;
   double missval;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -36737,9 +36936,8 @@ void extReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
   int recID;
   int i;
   double missval;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -36795,11 +36993,10 @@ void extWriteVarDP(stream_t *streamptr, int varID, const double *data)
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug ) Message("streamID = %d  varID = %d", streamptr->self, varID);
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
@@ -36841,9 +37038,8 @@ void extWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
@@ -36939,11 +37135,10 @@ int iegInqRecord(stream_t *streamptr, int *varID, int *levelID)
   int icode, ilevel;
   int zaxisID = -1;
   int vlistID;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  iegp    = streamptr->record->iegp;
 
   *varID   = -1;
   *levelID = -1;
@@ -36978,7 +37173,7 @@ int iegReadRecord(stream_t *streamptr, double *data, int *nmiss)
   int varID, gridID;
   int i, size;
   double missval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -36987,7 +37182,6 @@ int iegReadRecord(stream_t *streamptr, double *data, int *nmiss)
   recID   = streamptr->tsteps[tsID].recIDs[vrecID];
   recpos  = streamptr->tsteps[tsID].records[recID].position;
   varID   = streamptr->tsteps[tsID].records[recID].varID;
-  iegp    = streamptr->record->iegp;
 
   fileSetPos(fileID, recpos, SEEK_SET);
 
@@ -37174,11 +37368,11 @@ void iegDefGrid(int *gdb, int gridID)
 
       IEG_G_NumLon(gdb)   = nlon;
       IEG_G_NumLat(gdb)   = nlat;
-      IEG_G_FirstLat(gdb) = NINT(yfirst*1000);
-      IEG_G_LastLat(gdb)  = NINT(ylast*1000);
-      IEG_G_FirstLon(gdb) = NINT(xfirst*1000);
-      IEG_G_LastLon(gdb)  = NINT(xlast*1000);
-      IEG_G_LonIncr(gdb)  = NINT(xinc*1000);
+      IEG_G_FirstLat(gdb) = lround(yfirst*1000);
+      IEG_G_LastLat(gdb)  = lround(ylast*1000);
+      IEG_G_FirstLon(gdb) = lround(xfirst*1000);
+      IEG_G_LastLon(gdb)  = lround(xlast*1000);
+      IEG_G_LonIncr(gdb)  = lround(xinc*1000);
       if ( fabs(xinc*1000 - IEG_G_LonIncr(gdb)) > FLT_EPSILON )
 	IEG_G_LonIncr(gdb) = 0;
 
@@ -37186,17 +37380,17 @@ void iegDefGrid(int *gdb, int gridID)
 	IEG_G_LatIncr(gdb) = nlat/2;
       else
 	{
-	  IEG_G_LatIncr(gdb) = NINT(yinc*1000);
+	  IEG_G_LatIncr(gdb) = lround(yinc*1000);
 	  if ( fabs(yinc*1000 - IEG_G_LatIncr(gdb)) > FLT_EPSILON )
 	    IEG_G_LatIncr(gdb) = 0;
 
 	  if ( IEG_G_LatIncr(gdb) < 0 ) IEG_G_LatIncr(gdb) = -IEG_G_LatIncr(gdb);
 	}
 
-      if ( IEG_G_NumLon(gdb) > 1 && IEG_G_NumLat(gdb) == 1 ) 
+      if ( IEG_G_NumLon(gdb) > 1 && IEG_G_NumLat(gdb) == 1 )
 	if ( IEG_G_LonIncr(gdb) != 0 && IEG_G_LatIncr(gdb) == 0 ) IEG_G_LatIncr(gdb) = IEG_G_LonIncr(gdb);
 
-      if ( IEG_G_NumLon(gdb) == 1 && IEG_G_NumLat(gdb) > 1 ) 
+      if ( IEG_G_NumLon(gdb) == 1 && IEG_G_NumLat(gdb) > 1 )
 	if ( IEG_G_LonIncr(gdb) == 0 && IEG_G_LatIncr(gdb) != 0 ) IEG_G_LonIncr(gdb) = IEG_G_LatIncr(gdb);
 
       if ( IEG_G_LatIncr(gdb) == 0 || IEG_G_LonIncr(gdb) == 0 )
@@ -37206,8 +37400,8 @@ void iegDefGrid(int *gdb, int gridID)
 
       if ( gridIsRotated(gridID) )
 	{
-	  IEG_G_LatSP(gdb) = - NINT(gridInqYpole(gridID) * 1000);
-	  IEG_G_LonSP(gdb) =   NINT((gridInqXpole(gridID) + 180) * 1000);
+	  IEG_G_LatSP(gdb) = - lround(gridInqYpole(gridID) * 1000);
+	  IEG_G_LonSP(gdb) =   lround((gridInqXpole(gridID) + 180) * 1000);
 	  IEG_G_Size(gdb)  = 42;
 	}
       else
@@ -37439,10 +37633,9 @@ int iegDefRecord(stream_t *streamptr)
   int param, pdis, pcat, pnum;
   int varID, levelID, tsID, zaxisID;
   int byteorder;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
-  iegp    = streamptr->record->iegp;
   byteorder = streamptr->byteorder;
 
   varID   = streamptr->record->varID;
@@ -37482,10 +37675,9 @@ int iegWriteRecord(stream_t *streamptr, const double *data)
   int status = 0;
   int i, gridsize, gridID;
   double refval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   fileID = streamptr->fileID;
-  iegp   = streamptr->record->iegp;
   gridID = streamptr->record->gridID;
 
   gridsize = gridInqSize(gridID);
@@ -37640,7 +37832,7 @@ void iegAddRecord(stream_t *streamptr, int param, int *pdb, int *gdb, double *vc
   datatype = iegInqDatatype(prec);
 
   varAddRecord(recID, param, gridID, leveltype, lbounds, level1, level2, 0, 0,
-	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL);
+	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -37719,11 +37911,10 @@ void iegScanTimestep1(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   IEGCOMPVAR compVar, compVar0;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 0;
 
-  iegp  = streamptr->record->iegp;
   tsID  = tstepsNewEntry(streamptr);
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -37856,13 +38047,12 @@ int iegScanTimestep2(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   IEGCOMPVAR compVar, compVar0;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 1;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  iegp    = streamptr->record->iegp;
 
   tsID = streamptr->rtsteps;
   if ( tsID != 1 )
@@ -38036,7 +38226,7 @@ int iegScanTimestep(stream_t *streamptr)
   taxis_t *taxis;
   int rindex, nrecs = 0;
   IEGCOMPVAR compVar, compVar0;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     {
@@ -38049,7 +38239,6 @@ int iegScanTimestep(stream_t *streamptr)
   if ( streamptr->rtsteps == 0 )
     Error("Internal problem! Missing contents.");
 
-  iegp  = streamptr->record->iegp;
   tsID  = streamptr->rtsteps;
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -38187,9 +38376,8 @@ void iegReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int recID;
   int i;
   double missval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
-  iegp     = streamptr->record->iegp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -38232,9 +38420,8 @@ void iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
   int recID;
   int i;
   double missval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
-  iegp     = streamptr->record->iegp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -38279,13 +38466,11 @@ void iegWriteVarDP(stream_t *streamptr, int varID, const double *data)
   int date, time;
   int param, pdis, pcat, pnum;
   double refval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     Message("streamID = %d  varID = %d", streamptr->self, varID);
 
-  iegp     = streamptr->record->iegp;
-
   iegInitMem(iegp);
   for ( i = 0; i < 37; i++ ) iegp->ipdb[i] = -1;
 
@@ -38340,9 +38525,8 @@ void iegWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
   /* int tsID; */
   int vlistID;
   /* int param, date, time, datasize; */
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
-  iegp     = streamptr->record->iegp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   /* tsID     = streamptr->curTsID; */
@@ -38420,6 +38604,9 @@ typedef struct {
 }
 ncdim_t;
 
+#define  MAX_COORDVARS  4
+#define  MAX_AUXVARS    4
+
 typedef struct {
   int      ncid;
   int      ignore;
@@ -38447,7 +38634,9 @@ typedef struct {
   int      zvarid;
   int      tvarid;
   int      ncoordvars;
-  int      coordvarids[4];
+  int      coordvarids[MAX_COORDVARS];
+  int      nauxvars;
+  int      auxvarids[MAX_AUXVARS];
   int      cellarea;
   int      calendar;
   int      tableID;
@@ -38500,7 +38689,7 @@ void strtolower(char *str)
 }
 
 static
-int get_timeunit(int len, char *ptu)
+int get_timeunit(int len, const char *ptu)
 {
   int timeunit = -1;
 
@@ -38525,6 +38714,20 @@ int get_timeunit(int len, char *ptu)
 static
 int isTimeUnits(const char *timeunits)
 {
+  int status = 0;
+
+  if ( strncmp(timeunits, "sec",    3) == 0 ||
+       strncmp(timeunits, "minute", 6) == 0 ||
+       strncmp(timeunits, "hour",   4) == 0 ||
+       strncmp(timeunits, "day",    3) == 0 ||
+       strncmp(timeunits, "month",  5) == 0 ) status = 1;
+
+  return (status);
+}
+
+static
+int isTimeAxisUnits(const char *timeunits)
+{
   int len, i;
   char *ptu, *tu;
   int timetype = -1;
@@ -38562,12 +38765,90 @@ int isTimeUnits(const char *timeunits)
 }
 
 static
-int splitBasetime(const char *timeunits, taxis_t *taxis)
+void scanTimeString(const char *ptu, int *rdate, int *rtime)
 {
-  int len, i;
-  char *ptu, *tu;
   int year, month, day;
   int hour = 0, minute = 0, second = 0;
+  int v1, v2, v3;
+
+  *rdate = 0;
+  *rtime = 0;
+
+  v1 = atoi(ptu);
+  if ( v1 < 0 ) ptu++;
+  while ( isdigit((int) *ptu) ) ptu++;
+  v2 = atoi(++ptu);
+  while ( isdigit((int) *ptu) ) ptu++;
+  v3 = atoi(++ptu);
+  while ( isdigit((int) *ptu) ) ptu++;
+
+  if ( v3 > 999 && v1 < 32 )
+    { year = v3; month = v2; day = v1; }
+  else
+    { year = v1; month = v2; day = v3; }
+
+  while ( isspace((int) *ptu) ) ptu++;
+
+  if ( *ptu )
+    {
+      while ( ! isdigit((int) *ptu) ) ptu++;
+
+      hour = atoi(ptu);
+      while ( isdigit((int) *ptu) ) ptu++;
+      if ( *ptu == ':' )
+        {
+          ptu++;
+          minute = atoi(ptu);
+          while ( isdigit((int) *ptu) ) ptu++;
+          if ( *ptu == ':' )
+            {
+              ptu++;
+              second = atoi(ptu);
+            }
+        }
+    }
+
+  *rdate = cdiEncodeDate(year, month, day);
+  *rtime = cdiEncodeTime(hour, minute, second);
+}
+
+static
+int scanTimeUnit(const char *unitstr)
+{
+  int timeunit = -1;
+  int len;
+
+  len = (int) strlen(unitstr);
+  timeunit = get_timeunit(len, unitstr);
+  if ( timeunit == -1 )
+    Message("Unsupported TIMEUNIT: %s!", unitstr);
+
+  return (timeunit);
+}
+
+static
+void setForecastTime(const char *timestr, taxis_t *taxis)
+{
+  int len;
+
+  (*taxis).fdate = 0;
+  (*taxis).ftime = 0;
+
+  len = (int) strlen(timestr);
+  if ( len == 0 ) return;
+
+  int fdate = 0, ftime = 0;
+  scanTimeString(timestr, &fdate, &ftime);
+
+  (*taxis).fdate = fdate;
+  (*taxis).ftime = ftime;
+}
+
+static
+int setBaseTime(const char *timeunits, taxis_t *taxis)
+{
+  int len, i;
+  char *ptu, *tu;
   int timetype = TAXIS_ABSOLUTE;
   int rdate = -1, rtime = -1;
   int timeunit;
@@ -38616,47 +38897,8 @@ int splitBasetime(const char *timeunits, taxis_t *taxis)
             }
           else if ( timetype == TAXIS_RELATIVE )
             {
-              int v1, v2, v3;
-              v1 = atoi(ptu);
-              if ( v1 < 0 ) ptu++;
-              while ( isdigit((int) *ptu) ) ptu++;
-              v2 = atoi(++ptu);
-              while ( isdigit((int) *ptu) ) ptu++;
-              v3 = atoi(++ptu);
-              while ( isdigit((int) *ptu) ) ptu++;
-
-              if ( v3 > 999 && v1 < 32 )
-                { year = v3; month = v2; day = v1; }
-              else
-                { year = v1; month = v2; day = v3; }
-
-              while ( isspace((int) *ptu) ) ptu++;
-
-              if ( *ptu )
-                {
-                  while ( ! isdigit((int) *ptu) ) ptu++;
+              scanTimeString(ptu, &rdate, &rtime);
 
-                  hour = atoi(ptu);
-                  while ( isdigit((int) *ptu) ) ptu++;
-                  if ( *ptu == ':' )
-                    {
-                      ptu++;
-                      minute = atoi(ptu);
-                      while ( isdigit((int) *ptu) ) ptu++;
-                      if ( *ptu == ':' )
-                        {
-                          ptu++;
-                          second = atoi(ptu);
-                          /*
-                          if ( second != 0 )
-                            Message("Seconds not supported in time units!");
-                          */
-                        }
-                    }
-                }
-
-              rdate = cdiEncodeDate(year, month, day);
-              rtime = cdiEncodeTime(hour, minute, second);
               (*taxis).rdate = rdate;
               (*taxis).rtime = rtime;
 
@@ -38939,6 +39181,8 @@ int cdfDefRecord(stream_t *streamptr)
 {
   int ierr = 0;
 
+  if ( streamptr->fileID < 0 ) ierr = 1;
+
   return (ierr);
 }
 
@@ -39117,10 +39361,10 @@ int cdfReadRecord(stream_t *streamptr, double *data, int *nmiss)
   return (ierr);
 }
 
+#if  defined  (HAVE_LIBNETCDF)
 static
 void cdfDefTimeValue(stream_t *streamptr, int tsID)
 {
-#if  defined  (HAVE_LIBNETCDF)
   int fileID;
   double timevalue;
   int ncvarid;
@@ -39162,28 +39406,148 @@ void cdfDefTimeValue(stream_t *streamptr, int tsID)
       start[0] = tsID; count[0] = 1; start[1] = 1; count[1] = 1;
       cdf_put_vara_double(fileID, ncvarid, start, count, &timevalue);
     }
+
+  ncvarid = streamptr->basetime.leadtimeid;
+  if ( taxis->type == TAXIS_FORECAST && ncvarid != UNDEFID )
+    {
+      timevalue = taxis->fc_period;
+      cdf_put_var1_double(fileID, ncvarid, &index, &timevalue);
+    }
+
   /*
 printf("fileID = %d %d %d %f\n", fileID, time_varid, index, timevalue);
   */
+}
+
+static
+int cdfDefTimeBounds(int fileID, int nctimevarid, int nctimedimid, char* taxis_name, taxis_t* taxis)
+{
+  int time_bndsid = -1;
+  int dims[2];
+  char tmpstr[CDI_MAX_NAME];
+
+  dims[0] = nctimedimid;
+
+  /* fprintf(stderr, "time has bounds\n"); */
+
+  if ( nc_inq_dimid(fileID, "nb2", &dims[1]) != NC_NOERR )
+    cdf_def_dim(fileID, "nb2", 2, &dims[1]);
+
+  if ( taxis->climatology )
+    {
+      strcpy(tmpstr, "climatology");
+      strcat(tmpstr, "_bnds");
+      cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
+
+      cdf_put_att_text(fileID, nctimevarid, "climatology", strlen(tmpstr), tmpstr);
+    }
+  else
+    {
+      strcpy(tmpstr, taxis_name);
+      strcat(tmpstr, "_bnds");
+      cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
+
+      cdf_put_att_text(fileID, nctimevarid, "bounds", strlen(tmpstr), tmpstr);
+    }
+
+  return (time_bndsid);
+}
+
+static
+void cdfDefTimeUnits(char *unitstr, taxis_t* taxis0, taxis_t* taxis)
+{
+  unitstr[0] = 0;
+
+  if ( taxis0->type == TAXIS_ABSOLUTE )
+    {
+      if ( taxis0->unit == TUNIT_YEAR )
+        sprintf(unitstr, "year as %s", "%Y.%f");
+      else if ( taxis0->unit == TUNIT_MONTH )
+        sprintf(unitstr, "month as %s", "%Y%m.%f");
+      else
+        sprintf(unitstr, "day as %s", "%Y%m%d.%f");
+    }
+  else
+    {
+      int year, month, day, hour, minute, second;
+      int rdate, rtime;
+      int timeunit;
+
+      timeunit = taxis->unit;
+      if ( timeunit == -1 ) timeunit = TUNIT_HOUR;
+      rdate    = taxis->rdate;
+      rtime    = taxis->rtime;
+      if ( rdate == -1 )
+        {
+          rdate  = taxis->vdate;
+          rtime  = taxis->vtime;
+        }
+
+      cdiDecodeDate(rdate, &year, &month, &day);
+      cdiDecodeTime(rtime, &hour, &minute, &second);
+
+      if ( timeunit == TUNIT_QUARTER ) timeunit = TUNIT_MINUTE;
+      if ( timeunit == TUNIT_3HOURS  ||
+	   timeunit == TUNIT_6HOURS  ||
+	   timeunit == TUNIT_12HOURS ) timeunit = TUNIT_HOUR;
+
+      sprintf(unitstr, "%s since %d-%02d-%02d %02d:%02d:%02d",
+              tunitNamePtr(timeunit), year, month, day, hour, minute, second);
+    }
+}
+
+static
+void cdfDefForecastTimeUnits(char *unitstr, int timeunit)
+{
+  unitstr[0] = 0;
+
+  if ( timeunit == -1 ) timeunit = TUNIT_HOUR;
+
+  if ( timeunit == TUNIT_QUARTER ) timeunit = TUNIT_MINUTE;
+  if ( timeunit == TUNIT_3HOURS  ||
+       timeunit == TUNIT_6HOURS  ||
+       timeunit == TUNIT_12HOURS ) timeunit = TUNIT_HOUR;
+
+  sprintf(unitstr, "%s", tunitNamePtr(timeunit));
+}
+#endif
+
+static
+void cdfDefCalendar(int fileID, int ncvarid, int calendar)
+{
+  size_t len;
+  char calstr[80];
+
+  calstr[0] = 0;
+
+  if      ( calendar == CALENDAR_STANDARD )  strcpy(calstr, "standard");
+  else if ( calendar == CALENDAR_PROLEPTIC ) strcpy(calstr, "proleptic_gregorian");
+  else if ( calendar == CALENDAR_NONE )      strcpy(calstr, "none");
+  else if ( calendar == CALENDAR_360DAYS )   strcpy(calstr, "360_day");
+  else if ( calendar == CALENDAR_365DAYS )   strcpy(calstr, "365_day");
+  else if ( calendar == CALENDAR_366DAYS )   strcpy(calstr, "366_day");
+
+  len = strlen(calstr);
+
+#if  defined  (HAVE_LIBNETCDF)
+  if ( len ) cdf_put_att_text(fileID, ncvarid, "calendar", len, calstr);
 #endif
 }
 
 static
-void cdfDefTime(stream_t *streamptr)
+void cdfDefTime(stream_t* streamptr)
 {
 #if  defined  (HAVE_LIBNETCDF)
   int fileID;
   int time_varid;
-  int time_bndsid;
-  int dims[2];
-  int year, month, day, hour, minute, second;
-  char unitstr[80];
-  char calstr[80];
+  int time_dimid;
+  int time_bndsid = -1;
+  char unitstr[CDI_MAX_NAME];
   char tmpstr[CDI_MAX_NAME];
   char default_name[] = "time";
-  char *taxis_name = default_name;
+  char* taxis_name = default_name;
   size_t len;
-  taxis_t *taxis;
+  taxis_t* taxis;
 
   if ( streamptr->basetime.ncvarid != UNDEFID ) return;
 
@@ -39197,10 +39561,10 @@ void cdfDefTime(stream_t *streamptr)
 
   if ( taxis->name && taxis->name[0] ) taxis_name = taxis->name;
 
-  cdf_def_dim(fileID, taxis_name, NC_UNLIMITED, &streamptr->basetime.ncdimid);
+  cdf_def_dim(fileID, taxis_name, NC_UNLIMITED, &time_dimid);
+  streamptr->basetime.ncdimid = time_dimid;
 
-  dims[0] = streamptr->basetime.ncdimid;
-  cdf_def_var(fileID, taxis_name, NC_DOUBLE, 1, dims, &time_varid);
+  cdf_def_var(fileID, taxis_name, NC_DOUBLE, 1, &time_dimid, &time_varid);
 
   streamptr->basetime.ncvarid = time_varid;
 
@@ -39212,98 +39576,49 @@ void cdfDefTime(stream_t *streamptr)
 
   if ( taxis->has_bounds )
     {
-      /* fprintf(stderr, "time has bounds\n"); */
-
-      if ( nc_inq_dimid(fileID, "nb2", &dims[1]) != NC_NOERR )
-	cdf_def_dim(fileID, "nb2", 2, &dims[1]);
-
-      if ( taxis->climatology )
-        {
-          strcpy(tmpstr, "climatology");
-          strcat(tmpstr, "_bnds");
-          cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
-
-          streamptr->basetime.ncvarboundsid = time_bndsid;
-
-          cdf_put_att_text(fileID, time_varid, "climatology", strlen(tmpstr), tmpstr);
-        }
-      else
-        {
-          strcpy(tmpstr, taxis_name);
-          strcat(tmpstr, "_bnds");
-          cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
-
-          streamptr->basetime.ncvarboundsid = time_bndsid;
-
-          cdf_put_att_text(fileID, time_varid, "bounds", strlen(tmpstr), tmpstr);
-        }
-    }
-
-  unitstr[0] = 0;
-  if ( streamptr->tsteps[0].taxis.type == TAXIS_ABSOLUTE )
-    {
-      if ( streamptr->tsteps[0].taxis.unit == TUNIT_YEAR )
-        sprintf(unitstr, "year as %s", "%Y.%f");
-      else if ( streamptr->tsteps[0].taxis.unit == TUNIT_MONTH )
-        sprintf(unitstr, "month as %s", "%Y%m.%f");
-      else
-        sprintf(unitstr, "day as %s", "%Y%m%d.%f");
+      time_bndsid = cdfDefTimeBounds(fileID, time_varid, time_dimid, taxis_name, taxis);
+      streamptr->basetime.ncvarboundsid = time_bndsid;
     }
-  else
-    {
-      int rdate, rtime;
-      int timeunit;
-
-      timeunit = taxis->unit;
-      if ( timeunit == -1 ) timeunit = TUNIT_HOUR;
-      rdate    = taxis->rdate;
-      rtime    = taxis->rtime;
-      if ( rdate == -1 )
-        {
-          rdate  = taxis->vdate;
-          rtime  = taxis->vtime;
-        }
-
-      cdiDecodeDate(rdate, &year, &month, &day);
-      cdiDecodeTime(rtime, &hour, &minute, &second);
 
-      if ( timeunit == TUNIT_QUARTER ) timeunit = TUNIT_MINUTE;
-      if ( timeunit == TUNIT_3HOURS  ||
-	   timeunit == TUNIT_6HOURS  ||
-	   timeunit == TUNIT_12HOURS ) timeunit = TUNIT_HOUR;
-
-      sprintf(unitstr, "%s since %d-%02d-%02d %02d:%02d:%02d",
-              tunitNamePtr(timeunit), year, month, day, hour, minute, second);
-    }
+  cdfDefTimeUnits(unitstr, &streamptr->tsteps[0].taxis, taxis);
 
   len = strlen(unitstr);
   if ( len )
     {
       cdf_put_att_text(fileID, time_varid, "units", len, unitstr);
-
+      /*
       if ( taxis->has_bounds )
         cdf_put_att_text(fileID, time_bndsid, "units", len, unitstr);
+      */
     }
 
   if ( taxis->calendar != -1 )
     {
-      calstr[0] = 0;
+      cdfDefCalendar(fileID, time_varid, taxis->calendar);
+      /*
+      if ( taxis->has_bounds )
+        cdfDefCalendar(fileID, time_bndsid, taxis->calendar);
+      */
+    }
 
-      if      ( taxis->calendar == CALENDAR_STANDARD )  strcpy(calstr, "standard");
-      else if ( taxis->calendar == CALENDAR_PROLEPTIC ) strcpy(calstr, "proleptic_gregorian");
-      else if ( taxis->calendar == CALENDAR_NONE )      strcpy(calstr, "none");
-      else if ( taxis->calendar == CALENDAR_360DAYS )   strcpy(calstr, "360_day");
-      else if ( taxis->calendar == CALENDAR_365DAYS )   strcpy(calstr, "365_day");
-      else if ( taxis->calendar == CALENDAR_366DAYS )   strcpy(calstr, "366_day");
+  if ( taxis->type == TAXIS_FORECAST )
+    {
+      int leadtimeid;
 
-      len = strlen(calstr);
-      if ( len )
-        {
-          cdf_put_att_text(fileID, time_varid, "calendar", len, calstr);
+      cdf_def_var(fileID, "leadtime", NC_DOUBLE, 1, &time_dimid, &leadtimeid);
 
-          if ( taxis->has_bounds )
-            cdf_put_att_text(fileID, time_bndsid, "calendar", len, calstr);
-        }
+      streamptr->basetime.leadtimeid = leadtimeid;
+
+      strcpy(tmpstr, "forecast_period");
+      cdf_put_att_text(fileID, leadtimeid, "standard_name", strlen(tmpstr), tmpstr);
+
+      strcpy(tmpstr, "Time elapsed since the start of the forecast");
+      cdf_put_att_text(fileID, leadtimeid, "long_name", strlen(tmpstr), tmpstr);
+
+      cdfDefForecastTimeUnits(unitstr, taxis->fc_unit);
+
+      len = strlen(unitstr);
+      if ( len ) cdf_put_att_text(fileID, leadtimeid, "units", len, unitstr);
     }
 
   if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
@@ -39313,6 +39628,7 @@ void cdfDefTime(stream_t *streamptr)
 
 void cdfDefTimestep(stream_t *streamptr, int tsID)
 {
+#if  defined  (HAVE_LIBNETCDF)
   int vlistID;
 
   vlistID = streamptr->vlistID;
@@ -39320,6 +39636,7 @@ void cdfDefTimestep(stream_t *streamptr, int tsID)
   if ( vlistHasTime(vlistID) ) cdfDefTime(streamptr);
 
   cdfDefTimeValue(streamptr, tsID);
+#endif
 }
 
 #if  defined  (HAVE_LIBNETCDF)
@@ -39670,7 +39987,7 @@ int checkGridName(int type, char *axisname, int fileID, int vlistID, int gridID,
 
 #if  defined  (HAVE_LIBNETCDF)
 static
-void cdfDefXaxis(stream_t *streamptr, int gridID)
+void cdfDefXaxis(stream_t *streamptr, int gridID, int ndims)
 {
   char units[CDI_MAX_NAME];
   char longname[CDI_MAX_NAME];
@@ -39681,7 +39998,7 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
   int gridID0, gridtype0, gridindex;
   int dimID = UNDEFID;
   int dimIDs[2];
-  int ngrids;
+  int ngrids = 0;
   int fileID;
   int dimlen, dimlen0;
   size_t len;
@@ -39695,7 +40012,7 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
 
-  ngrids = vlistNgrids(vlistID);
+  if ( ndims ) ngrids = vlistNgrids(vlistID);
 
   dimlen = gridInqXsize(gridID);
   gridindex = vlistGridIndex(vlistID, gridID);
@@ -39740,22 +40057,25 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
     {
       int status;
       status = checkGridName('V', axisname, fileID, vlistID, gridID, ngrids, 'X');
-      if ( status == 0 )
+      if ( status == 0 && ndims )
         status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
-      cdf_def_dim(fileID, axisname, dimlen, &dimID);
-
-      if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+      if ( ndims )
         {
-          if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
-            cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+          cdf_def_dim(fileID, axisname, dimlen, &dimID);
+
+          if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+            {
+              if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
+                cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+            }
         }
 
       if ( gridInqXvalsPtr(gridID) )
         {
-          cdf_def_var(fileID, axisname, (nc_type) xtype, 1, &dimID, &ncvarid);
+          cdf_def_var(fileID, axisname, (nc_type) xtype, ndims, &dimID, &ncvarid);
 
           if ( (len = strlen(stdname)) )
             cdf_put_att_text(fileID, ncvarid, "standard_name", len, stdname);
@@ -39788,6 +40108,8 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
 
       if ( ncvarid  != UNDEFID ) cdf_put_var_double(fileID, ncvarid, gridInqXvalsPtr(gridID));
       if ( ncbvarid != UNDEFID ) cdf_put_var_double(fileID, ncbvarid, gridInqXboundsPtr(gridID));
+
+      if ( ndims == 0 ) streamptr->ncxvarID[gridindex] = ncvarid;
     }
 
   streamptr->xdimID[gridindex] = dimID;
@@ -39796,7 +40118,7 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
 
 #if  defined  (HAVE_LIBNETCDF)
 static
-void cdfDefYaxis(stream_t *streamptr, int gridID)
+void cdfDefYaxis(stream_t *streamptr, int gridID, int ndims)
 {
   char units[CDI_MAX_NAME];
   char longname[CDI_MAX_NAME];
@@ -39807,7 +40129,7 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
   int gridID0, gridtype0, gridindex;
   int dimID = UNDEFID;
   int dimIDs[2];
-  int ngrids;
+  int ngrids = 0;
   int fileID;
   int dimlen, dimlen0;
   size_t len;
@@ -39821,7 +40143,7 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
 
-  ngrids = vlistNgrids(vlistID);
+  if ( ndims ) ngrids = vlistNgrids(vlistID);
 
   dimlen = gridInqYsize(gridID);
   gridindex = vlistGridIndex(vlistID, gridID);
@@ -39866,22 +40188,25 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
     {
       int status;
       status = checkGridName('V', axisname, fileID, vlistID, gridID, ngrids, 'Y');
-      if ( status == 0 )
+      if ( status == 0 && ndims )
         status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'Y');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
-      cdf_def_dim(fileID, axisname, dimlen, &dimID);
-
-      if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+      if ( ndims )
         {
-          if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
-            cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+          cdf_def_dim(fileID, axisname, dimlen, &dimID);
+
+          if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+            {
+              if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
+                cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+            }
         }
 
       if ( gridInqYvalsPtr(gridID) )
         {
-          cdf_def_var(fileID, axisname, (nc_type) xtype, 1, &dimID, &ncvarid);
+          cdf_def_var(fileID, axisname, (nc_type) xtype, ndims, &dimID, &ncvarid);
 
           if ( (len = strlen(stdname)) )
             cdf_put_att_text(fileID, ncvarid, "standard_name", len, stdname);
@@ -39914,6 +40239,8 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
 
       if ( ncvarid  != UNDEFID ) cdf_put_var_double(fileID, ncvarid, gridInqYvalsPtr(gridID));
       if ( ncbvarid != UNDEFID ) cdf_put_var_double(fileID, ncbvarid, gridInqYboundsPtr(gridID));
+
+      if ( ndims == 0 ) streamptr->ncyvarID[gridindex] = ncvarid;
     }
 
   streamptr->ydimID[gridindex] = dimID;
@@ -40000,6 +40327,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
                      IS_EQUAL(gridInqXval(gridID0, xdimlen-1), gridInqXval(gridID, xdimlen-1)) )
                   {
                     xdimID = streamptr->xdimID[index];
+                    ncxvarid = streamptr->ncxvarID[index];
                     break;
                   }
               dimlen0 = gridInqYsize(gridID0);
@@ -40008,6 +40336,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
                      IS_EQUAL(gridInqYval(gridID0, xdimlen-1), gridInqYval(gridID, xdimlen-1)) )
                   {
                     ydimID = streamptr->ydimID[index];
+                    ncyvarid = streamptr->ncyvarID[index];
                     break;
                   }
             }
@@ -40016,11 +40345,10 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
 
   if ( xdimID == UNDEFID || ydimID == UNDEFID )
     {
-      int status;
-      status = checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
-      status = checkGridName('D', xdimname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('D', ydimname, fileID, vlistID, gridID, ngrids, 'Y');
+      checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
+      checkGridName('D', xdimname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('D', ydimname, fileID, vlistID, gridID, ngrids, 'Y');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
@@ -40051,8 +40379,6 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
           /* attribute for Panoply */
           cdf_put_att_text(fileID, ncxvarid, "_CoordinateAxisType", 3, "Lon");
 
-          streamptr->ncxvarID[gridindex] = ncxvarid;
-
           if ( gridInqXboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               strcat(xaxisname, "_bnds");
@@ -40081,8 +40407,6 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
           /* attribute for Panoply */
           cdf_put_att_text(fileID, ncyvarid, "_CoordinateAxisType", 3, "Lat");
 
-          streamptr->ncyvarID[gridindex] = ncyvarid;
-
           if ( gridInqYboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               strcat(yaxisname, "_bnds");
@@ -40108,8 +40432,6 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
           cdf_put_att_text(fileID, ncavarid, "standard_name", strlen(stdname), stdname);
           cdf_put_att_text(fileID, ncavarid, "long_name", strlen(longname), longname);
           cdf_put_att_text(fileID, ncavarid, "units", strlen(units), units);
-
-          streamptr->ncavarID[gridindex] = ncavarid;
         }
 
       cdf_enddef(fileID);
@@ -40124,6 +40446,9 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
 
   streamptr->xdimID[gridindex] = xdimID;
   streamptr->ydimID[gridindex] = ydimID;
+  streamptr->ncxvarID[gridindex] = ncxvarid;
+  streamptr->ncyvarID[gridindex] = ncyvarid;
+  streamptr->ncavarID[gridindex] = ncavarid;
 }
 #endif
 
@@ -40257,11 +40582,10 @@ void cdfDefGdim(stream_t *streamptr, int gridID)
 
   if ( dimID == UNDEFID )
     {
-      int status;
       char axisname[CDI_MAX_NAME];
       strcpy(axisname, "gsize");
 
-      status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
       /*
       if ( iz == 0 ) axisname[5] = '\0';
       else           sprintf(&axisname[5], "%1d", iz+1);
@@ -40400,6 +40724,9 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
                      IS_EQUAL(gridInqXval(gridID0, dimlen-1), gridInqXval(gridID, dimlen-1)) )
 		  {
 		    dimID = streamptr->xdimID[index];
+                    ncxvarid = streamptr->ncxvarID[index];
+                    ncyvarid = streamptr->ncyvarID[index];
+                    ncavarid = streamptr->ncavarID[index];
 		    break;
 		  }
             }
@@ -40408,16 +40735,15 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
 
   if ( dimID == UNDEFID )
     {
-      int status;
       char axisname[CDI_MAX_NAME];
       char vertname[CDI_MAX_NAME];
       strcpy(axisname, "ncells");
       strcpy(vertname, "nv");
 
-      status = checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
-      status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('D', vertname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
+      checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('D', vertname, fileID, vlistID, gridID, ngrids, 'X');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
@@ -40442,8 +40768,6 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
           if ( (len = strlen(xunits)) )
             cdf_put_att_text(fileID, ncxvarid, "units", len, xunits);
 
-          streamptr->ncxvarID[gridindex] = ncxvarid;
-
           if ( gridInqXboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               int dimIDs[2];
@@ -40469,8 +40793,6 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
           if ( (len = strlen(yunits)) )
             cdf_put_att_text(fileID, ncyvarid, "units", len, yunits);
 
-          streamptr->ncyvarID[gridindex] = ncyvarid;
-
           if ( gridInqYboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               int dimIDs[2];
@@ -40496,8 +40818,6 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
           cdf_put_att_text(fileID, ncavarid, "standard_name", strlen(stdname), stdname);
           cdf_put_att_text(fileID, ncavarid, "long_name", strlen(longname), longname);
           cdf_put_att_text(fileID, ncavarid, "units", strlen(units), units);
-
-          streamptr->ncavarID[gridindex] = ncavarid;
         }
 
       cdf_enddef(fileID);
@@ -40511,6 +40831,9 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
     }
 
   streamptr->xdimID[gridindex] = dimID;
+  streamptr->ncxvarID[gridindex] = ncxvarid;
+  streamptr->ncyvarID[gridindex] = ncyvarid;
+  streamptr->ncavarID[gridindex] = ncavarid;
 }
 #endif
 
@@ -40677,7 +41000,7 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
       checkname = TRUE;
       ilevel = 0;
 
-      while ( checkname ) 
+      while ( checkname )
         {
           strcpy(axisname2, axisname);
           if ( ilevel ) sprintf(&axisname2[strlen(axisname2)], "_%d", ilevel+1);
@@ -41023,13 +41346,13 @@ void cdfDefGrid(stream_t *streamptr, int gridID)
               int lx = 0, ly = 0;
               if ( gridInqXsize(gridID) > 0 /*&& gridInqXvals(gridID, NULL) > 0*/ )
                 {
-                  cdfDefXaxis(streamptr, gridID);
+                  cdfDefXaxis(streamptr, gridID, 1);
                   lx = 1;
                 }
 
               if ( gridInqYsize(gridID) > 0 /*&& gridInqYvals(gridID, NULL) > 0*/ )
                 {
-                  cdfDefYaxis(streamptr, gridID);
+                  cdfDefYaxis(streamptr, gridID, 1);
                   ly = 1;
                 }
 
@@ -41038,8 +41361,12 @@ void cdfDefGrid(stream_t *streamptr, int gridID)
         }
       else
         {
-          if ( gridInqXsize(gridID) > 0 ) cdfDefXaxis(streamptr, gridID);
-          if ( gridInqYsize(gridID) > 0 ) cdfDefYaxis(streamptr, gridID);
+          int ndims = 1;
+          if ( gridtype == GRID_LONLAT && size == 1 && gridInqHasDims(gridID) == FALSE )
+            ndims = 0;
+
+          if ( gridInqXsize(gridID) > 0 ) cdfDefXaxis(streamptr, gridID, ndims);
+          if ( gridInqYsize(gridID) > 0 ) cdfDefYaxis(streamptr, gridID, ndims);
         }
 
       if ( gridIsRotated(gridID) ) cdfDefPole(streamptr, gridID);
@@ -41073,8 +41400,8 @@ void cdfDefGrid(stream_t *streamptr, int gridID)
     }
   else if ( gridtype == GRID_SINUSOIDAL || gridtype == GRID_LAEA || gridtype == GRID_LCC2 )
     {
-      cdfDefXaxis(streamptr, gridID);
-      cdfDefYaxis(streamptr, gridID);
+      cdfDefXaxis(streamptr, gridID, 1);
+      cdfDefYaxis(streamptr, gridID, 1);
 
       cdfDefMapping(streamptr, gridID);
     }
@@ -41399,8 +41726,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
         cdf_put_att_int(fileID, ncvarid, "table", NC_INT, 1, &tablenum);
     }
 
-  if ( gridtype != GRID_GENERIC && gridtype != GRID_LONLAT  &&
-       gridtype != GRID_CURVILINEAR )
+  if ( gridtype != GRID_GENERIC && gridtype != GRID_LONLAT  && gridtype != GRID_CURVILINEAR )
     {
       len = strlen(gridNamePtr(gridtype));
       if ( len > 0 )
@@ -41432,6 +41758,28 @@ int cdfDefVar(stream_t *streamptr, int varID)
     {
       cdf_put_att_text(fileID, ncvarid, "coordinates", 9, "tlon tlat" );
     }
+  else if ( gridtype == GRID_LONLAT && xid == UNDEFID && yid == UNDEFID && gridsize == 1 )
+    {
+      char coordinates[CDI_MAX_NAME] = "";
+      int ncxvarID, ncyvarID;
+      int gridindex;
+      size_t len;
+
+      gridindex = vlistGridIndex(vlistID, gridID);
+      ncxvarID = streamptr->ncxvarID[gridindex];
+      ncyvarID = streamptr->ncyvarID[gridindex];
+      if ( ncxvarID != CDI_UNDEFID )
+        cdf_inq_varname(fileID, ncxvarID, coordinates);
+      len = strlen(coordinates);
+      if ( ncyvarID != CDI_UNDEFID )
+        {
+          if ( len ) coordinates[len++] = ' ';
+          cdf_inq_varname(fileID, ncyvarID, coordinates+len);
+        }
+      len = strlen(coordinates);
+      if ( len )
+        cdf_put_att_text(fileID, ncvarid, "coordinates", len, coordinates);
+    }
   else if ( gridtype == GRID_UNSTRUCTURED || gridtype == GRID_CURVILINEAR )
     {
       char coordinates[CDI_MAX_NAME] = "";
@@ -41595,8 +41943,8 @@ void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int ncvarid;
   int tsID;
   size_t size;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   int ndims = 0;
   int idim;
   int tsteptype;
@@ -41804,7 +42152,7 @@ int cdf_write_var_data(int fileID, int vlistID, int varID, int ncvarid, int dtyp
                   pdata_sp = mdata_sp;
                 }
 
-              for ( i = 0; i < nvals; i++ ) mdata_sp[i] = NINT(mdata_sp[i]);
+              for ( i = 0; i < nvals; i++ ) mdata_sp[i] = roundf(mdata_sp[i]);
 
               if ( dtype == DATATYPE_UINT8 )
                 {
@@ -41826,7 +42174,7 @@ int cdf_write_var_data(int fileID, int vlistID, int varID, int ncvarid, int dtyp
                   pdata_dp = mdata_dp;
                 }
 
-              for ( i = 0; i < nvals; i++ ) mdata_dp[i] = NINT(mdata_dp[i]);
+              for ( i = 0; i < nvals; i++ ) mdata_dp[i] = round(mdata_dp[i]);
 
               if ( dtype == DATATYPE_UINT8 )
                 {
@@ -41904,8 +42252,8 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
   int ntsteps;
   size_t xsize = 0, ysize = 0;
   size_t size;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   long nvals;
   int swapxy = FALSE;
   int ndims = 0;
@@ -42006,8 +42354,8 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
   int ncvarid;
   int ntsteps;
   size_t xsize = 0, ysize = 0;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   long nvals;
   int swapxy = FALSE;
   int ndims = 0;
@@ -42059,8 +42407,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
   if ( zid != UNDEFID )
     {
       int size = zaxisInqSize(zaxisID);
-      xassert(rect[2][0] >= 0 && rect[2][0] <= rect[2][1]
-              && rect[2][1] <= size);
+      xassert(rect[2][0] >= 0 && rect[2][0] <= rect[2][1] && rect[2][1] <= size);
       start[ndims] = rect[2][0];
       count[ndims] = rect[2][1] - rect[2][0] + 1;
       ndims++;
@@ -42069,8 +42416,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
     {
       size_t size;
       cdf_inq_dimlen(fileID, yid, &size);
-      xassert(rect[1][0] >= 0 && rect[1][0] <= rect[1][1]
-              && rect[1][1] <= size);
+      xassert(rect[1][0] >= 0 && rect[1][0] <= rect[1][1] && rect[1][1] <= (int)size);
       start[ndims] = rect[1][0];
       count[ndims] = rect[1][1] - rect[1][0] + 1;
       ndims++;
@@ -42079,8 +42425,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
     {
       size_t size;
       cdf_inq_dimlen(fileID, xid, &size);
-      xassert(rect[0][0] >= 0 && rect[0][0] <= rect[0][1]
-              && rect[0][1] <= size);
+      xassert(rect[0][0] >= 0 && rect[0][0] <= rect[0][1] && rect[0][1] <= (int)size);
       start[ndims] = rect[0][0];
       count[ndims] = rect[0][1] - rect[0][0] + 1;
       ndims++;
@@ -42168,9 +42513,10 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
   int tsID;
   int gridsize, xsize, ysize;
   size_t size;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   int ndims = 0;
+  int nvdims;
   int idim;
   int tsteptype;
   int gridindex;
@@ -42196,6 +42542,7 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
   if ( CDI_Debug ) Message("tsID = %d", tsID);
 
   ncvarid = streamptr->vars[varID].ncvarid;
+  cdf_inq_varndims(fileID, ncvarid, &nvdims);
 
   gridID    = vlistInqVarGrid(vlistID, varID);
   zaxisID   = vlistInqVarZaxis(vlistID, varID);
@@ -42226,6 +42573,24 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
 
   zaxisindex = vlistZaxisIndex(vlistID, zaxisID);
   zid = streamptr->zaxisID[zaxisindex];
+
+  int skipdim = 0;
+  if ( xid == -1 && yid == -1 && nvdims == 3 )
+    {
+      int dimids[3];
+      cdf_inq_vardimid(fileID, ncvarid, dimids);
+      size = 0;
+      if ( zid == dimids[2] )
+        {
+          cdf_inq_dimlen(fileID, dimids[1], &size);
+          if ( size == 1 ) skipdim = 1;
+        }
+      else if ( zid == dimids[1] )
+        {
+          cdf_inq_dimlen(fileID, dimids[2], &size);
+          if ( size == 1 ) skipdim = 2;
+        }
+    }
   /*
   printf("2 %p %d %d %s\n", streamptr, zaxisindex, streamptr->zaxisID[zaxisindex], vlistInqVarNamePtr(vlistID, varID));
   */
@@ -42247,6 +42612,13 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
       ndims++;
     }
 
+  if ( skipdim == 1 )
+    {
+      start[ndims] = 0;
+      count[ndims] = 1;
+      ndims++;
+    }
+
   for ( int id = 0; id < 3; ++id )
     {
       if ( dimorder[id] == 3 && zid != UNDEFID )
@@ -42271,10 +42643,20 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
         }
     }
 
+  if ( skipdim == 2 )
+    {
+      start[ndims] = 0;
+      count[ndims] = 1;
+      ndims++;
+    }
+
   if ( CDI_Debug )
     for (idim = 0; idim < ndims; idim++)
       Message("dim = %d  start = %d  count = %d", idim, start[idim], count[idim]);
 
+  if ( nvdims != ndims )
+    Error("Internal error, variable %s has an unsupported array structure!", vlistInqVarNamePtr(vlistID, varID));
+
   if ( vlistInqVarDatatype(vlistID, varID) == DATATYPE_FLT32 )
     {
       float *data_fp = (float *) data;
@@ -42320,7 +42702,7 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
         }
       else
         {
-          double *data_ptr = data; 
+          double *data_ptr = data;
           for ( i = 0; i < gridsize; i++, data_ptr++ )
             if ( DBL_IS_EQUAL((*data_ptr), missval) ) (*nmiss)++;
         }
@@ -42372,8 +42754,8 @@ int cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype
   int ntsteps;
   long nvals;
   size_t xsize = 0, ysize = 0;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   int ndims = 0;
   int idim;
   int tsteptype;
@@ -42602,7 +42984,8 @@ void cdfCreateRecords(stream_t *streamptr, int tsID)
 static
 int cdfTimeDimID(int fileID, int ndims, int nvars)
 {
-  int dimid = 0;
+  int dimid = UNDEFID;
+  int timedimid = UNDEFID;
   char dimname[80];
   char timeunits[CDI_MAX_NAME];
   char attname[CDI_MAX_NAME];
@@ -42615,41 +42998,40 @@ int cdfTimeDimID(int fileID, int ndims, int nvars)
   for ( dimid = 0; dimid < ndims; dimid++ )
     {
       cdf_inq_dimname(fileID, dimid, dimname);
-      if ( memcmp(dimname, "time", 4) == 0 ) break;
+      if ( memcmp(dimname, "time", 4) == 0 )
+        {
+          timedimid = dimid;
+          break;
+        }
     }
 
-  if ( dimid == ndims ) dimid = UNDEFID;
-
-  for ( varid = 0; varid < nvars; varid++ )
+  if ( timedimid == UNDEFID )
     {
-      if ( dimid != UNDEFID ) break;
-
-      cdf_inq_var(fileID, varid, name, &xtype, &nvdims, dimids, &nvatts);
-      if ( nvdims == 1 )
+      for ( varid = 0; varid < nvars; varid++ )
         {
-          for ( iatt = 0; iatt < nvatts; iatt++ )
+          cdf_inq_var(fileID, varid, name, &xtype, &nvdims, dimids, &nvatts);
+          if ( nvdims == 1 )
             {
-              cdf_inq_attname(fileID, varid, iatt, attname);
-              if ( memcmp(attname, "units", 5) == 0 )
+              for ( iatt = 0; iatt < nvatts; iatt++ )
                 {
-                  cdfGetAttText(fileID, varid, "units", sizeof(timeunits), timeunits);
-                  strtolower(timeunits);
-
-                  if ( memcmp(timeunits, "sec",    3) == 0 ||
-                       memcmp(timeunits, "minute", 6) == 0 ||
-                       memcmp(timeunits, "hour",   4) == 0 ||
-                       memcmp(timeunits, "day",    3) == 0 ||
-                       memcmp(timeunits, "month",  5) == 0 )
+                  cdf_inq_attname(fileID, varid, iatt, attname);
+                  if ( strncmp(attname, "units", 5) == 0 )
                     {
-                      dimid = dimids[0];
-                      break;
+                      cdfGetAttText(fileID, varid, "units", sizeof(timeunits), timeunits);
+                      strtolower(timeunits);
+
+                      if ( isTimeUnits(timeunits) )
+                        {
+                          timedimid = dimids[0];
+                          break;
+                        }
                     }
                 }
             }
         }
     }
 
-  return (dimid);
+  return (timedimid);
 }
 
 static
@@ -42700,10 +43082,11 @@ void init_ncvars(long nvars, ncvar_t *ncvars)
       ncvars[ncvarid].zvarid          = UNDEFID;
       ncvars[ncvarid].tvarid          = UNDEFID;
       ncvars[ncvarid].ncoordvars      = 0;
-      ncvars[ncvarid].coordvarids[0]  = UNDEFID;
-      ncvars[ncvarid].coordvarids[1]  = UNDEFID;
-      ncvars[ncvarid].coordvarids[2]  = UNDEFID;
-      ncvars[ncvarid].coordvarids[3]  = UNDEFID;
+      for ( int i = 0; i < MAX_COORDVARS; ++i )
+        ncvars[ncvarid].coordvarids[i]  = UNDEFID;
+      ncvars[ncvarid].nauxvars      = 0;
+      for ( int i = 0; i < MAX_AUXVARS; ++i )
+        ncvars[ncvarid].auxvarids[i]  = UNDEFID;
       ncvars[ncvarid].cellarea        = UNDEFID;
       ncvars[ncvarid].tableID         = UNDEFID;
       ncvars[ncvarid].xtype           = 0;
@@ -42756,7 +43139,7 @@ int isLonAxis(const char *units, const char *stdname)
       if ( degree_units[ioff] == 'e' ) status = TRUE;
     }
 
-  if ( status == TRUE ||
+  if ( status == FALSE &&
        ((memcmp(units, "degree", 6) == 0 ||memcmp(units, "radian", 6) == 0) &&
         (memcmp(stdname, "grid_longitude", 14) == 0 || memcmp(stdname, "longitude", 9) == 0)) )
     {
@@ -42784,7 +43167,7 @@ int isLatAxis(const char *units, const char *stdname)
       if ( degree_units[ioff] == 'n' ) status = TRUE;
     }
 
-  if ( status == TRUE ||
+  if ( status == FALSE &&
        ((memcmp(units, "degree", 6) == 0 || memcmp(units, "radian", 6) == 0) &&
         (memcmp(stdname, "grid_latitude", 13) == 0 || memcmp(stdname, "latitude", 8) == 0)) )
     {
@@ -42795,7 +43178,7 @@ int isLatAxis(const char *units, const char *stdname)
 }
 
 static
-int isDBLAxis(const char *units, const char *longname)
+int isDBLAxis(/*const char *units,*/ const char *longname)
 {
   int status = FALSE;
 
@@ -42820,7 +43203,7 @@ int isDepthAxis(const char *stdname, const char *longname)
   int status = FALSE;
 
   if ( strcmp(stdname, "depth") == 0 ) status = TRUE;
- 
+
   if ( status == FALSE )
     if ( strcmp(longname, "depth_below_sea") == 0 ||
          strcmp(longname, "depth below sea") == 0 )
@@ -43359,8 +43742,7 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
               cdfSetVar(ncvars, ncvarid, TRUE);
             }
           */
-          else if ( (strcmp(attname, "associate")  == 0 || strcmp(attname, "coordinates") == 0) &&
-		    atttype == NC_CHAR )
+          else if ( (strcmp(attname, "associate")  == 0 || strcmp(attname, "coordinates") == 0) && atttype == NC_CHAR )
             {
               int status;
               char *pstring, *varname = NULL;
@@ -43371,7 +43753,7 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
               cdfGetAttText(ncid, ncvarid, attname, attstringlen-1, attstring);
               pstring = attstring;
 
-              for ( i = 0; i < 4; i++ )
+              for ( i = 0; i < MAX_COORDVARS; i++ )
                 {
                   while ( isspace((int) *pstring) ) pstring++;
                   if ( *pstring == 0 ) break;
@@ -43398,6 +43780,44 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
 
               cdfSetVar(ncvars, ncvarid, TRUE);
             }
+          else if ( (strcmp(attname, "auxiliary_variable") == 0) && atttype == NC_CHAR )
+            {
+              int status;
+              char *pstring, *varname = NULL;
+              int lstop = FALSE;
+              int dimvarid;
+              extern int cdiIgnoreAttCoordinates;
+
+              cdfGetAttText(ncid, ncvarid, attname, attstringlen-1, attstring);
+              pstring = attstring;
+
+              for ( i = 0; i < MAX_AUXVARS; i++ )
+                {
+                  while ( isspace((int) *pstring) ) pstring++;
+                  if ( *pstring == 0 ) break;
+                  varname = pstring;
+                  while ( !isspace((int) *pstring) && *pstring != 0 ) pstring++;
+                  if ( *pstring == 0 ) lstop = TRUE;
+                  *pstring++ = 0;
+
+                  status = nc_inq_varid(ncid, varname, &dimvarid);
+                  if ( status == NC_NOERR )
+                    {
+                      cdfSetVar(ncvars, dimvarid, FALSE);
+                      //  if ( cdiIgnoreAttCoordinates == FALSE )
+                        {
+                          ncvars[ncvarid].auxvarids[i] = dimvarid;
+                          ncvars[ncvarid].nauxvars++;
+                        }
+                    }
+                  else
+                    Warning("%s - %s", nc_strerror(status), varname);
+
+                  if ( lstop ) break;
+                }
+
+              cdfSetVar(ncvars, ncvarid, TRUE);
+            }
           else if ( strcmp(attname, "grid_mapping") == 0 && atttype == NC_CHAR )
             {
               int status;
@@ -43678,7 +44098,7 @@ void setDimType(int nvars, ncvar_t *ncvars, ncdim_t *ncdims)
 	    {
 	      Message("var %d %s", ncvarid, ncvars[ncvarid].name);
 	      for ( i = 0; i < ndims; i++ )
-		printf("  dim %d type %d  ", i, ncvars[ncvarid].dimtype[i]);
+		printf("  dim%d type=%d  ", i, ncvars[ncvarid].dimtype[i]);
 	      printf("\n");
 	    }
 
@@ -43690,6 +44110,16 @@ void setDimType(int nvars, ncvar_t *ncvars, ncdim_t *ncdims)
 	      /* else if ( ncvars[ncvarid].dimtype[i] == T_AXIS ) ltdim = TRUE; */
 	    }
 
+          if ( lxdim == FALSE && ncvars[ncvarid].xvarid != UNDEFID )
+            {
+              if (  ncvars[ncvars[ncvarid].xvarid].ndims == 0 ) lxdim = TRUE;
+            }
+
+          if ( lydim == FALSE && ncvars[ncvarid].yvarid != UNDEFID )
+            {
+              if (  ncvars[ncvars[ncvarid].yvarid].ndims == 0 ) lydim = TRUE;
+            }
+
           //   if ( ndims > 1 )
             for ( i = ndims-1; i >= 0; i-- )
               {
@@ -43734,26 +44164,6 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
 	      continue;
 	    }
 
-	  if ( ncvars[ncvarid].longname[0] != 0 && ncvars[ncvarid].longname[1] != 0 )
-	    {
-	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
-		{
-		  ncvars[ncvarid].islon = TRUE;
-		  cdfSetVar(ncvars, ncvarid, FALSE);
-		  cdfSetDim(ncvars, ncvarid, 0, X_AXIS);
-		  ncdims[ncdimid].dimtype = X_AXIS;
-		  continue;
-		}
-	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
-		{
-		  ncvars[ncvarid].islat = TRUE;
-		  cdfSetVar(ncvars, ncvarid, FALSE);
-		  cdfSetDim(ncvars, ncvarid, 0, Y_AXIS);
-		  ncdims[ncdimid].dimtype = Y_AXIS;
-		  continue;
-		}
-	    }
-
 	  if ( ncvars[ncvarid].units[0] != 0 )
 	    {
 	      if ( isLonAxis(ncvars[ncvarid].units, ncvars[ncvarid].stdname) )
@@ -43787,7 +44197,7 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
 		  else if ( strcmp(ncvars[ncvarid].units, "level") == 0 )
 		    ncvars[ncvarid].zaxistype = ZAXIS_GENERIC;
 		}
-	      else if ( isDBLAxis(ncvars[ncvarid].units, ncvars[ncvarid].longname) )
+	      else if ( isDBLAxis(ncvars[ncvarid].longname) )
                 {
                   ncvars[ncvarid].zaxistype = ZAXIS_DEPTH_BELOW_LAND;
 		}
@@ -43800,6 +44210,27 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
 		}
 	    }
 
+	  if ( ncvars[ncvarid].islon == FALSE && ncvars[ncvarid].longname[0] != 0 &&
+               ncvars[ncvarid].islat == FALSE && ncvars[ncvarid].longname[1] != 0 )
+	    {
+	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
+		{
+		  ncvars[ncvarid].islon = TRUE;
+		  cdfSetVar(ncvars, ncvarid, FALSE);
+		  cdfSetDim(ncvars, ncvarid, 0, X_AXIS);
+		  ncdims[ncdimid].dimtype = X_AXIS;
+		  continue;
+		}
+	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
+		{
+		  ncvars[ncvarid].islat = TRUE;
+		  cdfSetVar(ncvars, ncvarid, FALSE);
+		  cdfSetDim(ncvars, ncvarid, 0, Y_AXIS);
+		  ncdims[ncdimid].dimtype = Y_AXIS;
+		  continue;
+		}
+	    }
+
 	  if ( ncvars[ncvarid].zaxistype != UNDEFID )
 	    {
               ncvars[ncvarid].islev = TRUE;
@@ -43821,21 +44252,6 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
     {
       if ( ncvars[ncvarid].isvar == 0 )
 	{
-	  /* not needed anymore for rotated grids */
-	  if ( ncvars[ncvarid].longname[0] != 0 && ncvars[ncvarid].longname[1] != 0 )
-	    {
-	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
-		{
-		  ncvars[ncvarid].islon = TRUE;
-		  continue;
-		}
-	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
-		{
-		  ncvars[ncvarid].islat = TRUE;
-		  continue;
-		}
-	    }
-
 	  if ( ncvars[ncvarid].units[0] != 0 )
 	    {
 	      if ( isLonAxis(ncvars[ncvarid].units, ncvars[ncvarid].stdname) )
@@ -43867,7 +44283,7 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
 		    ncvars[ncvarid].zaxistype = ZAXIS_GENERIC;
 		  continue;
 		}
-	      else if ( isDBLAxis(ncvars[ncvarid].units, ncvars[ncvarid].longname) )
+	      else if ( isDBLAxis(ncvars[ncvarid].longname) )
 		{
                   ncvars[ncvarid].zaxistype = ZAXIS_DEPTH_BELOW_LAND;
 		  continue;
@@ -43880,6 +44296,22 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
 		    ncvars[ncvarid].zaxistype = ZAXIS_HEIGHT;
 		  continue;
 		}
+            }
+
+	  /* not needed anymore for rotated grids */
+	  if ( ncvars[ncvarid].islon == FALSE && ncvars[ncvarid].longname[0] != 0 &&
+               ncvars[ncvarid].islat == FALSE && ncvars[ncvarid].longname[1] != 0 )
+	    {
+	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
+		{
+		  ncvars[ncvarid].islon = TRUE;
+		  continue;
+		}
+	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
+		{
+		  ncvars[ncvarid].islat = TRUE;
+		  continue;
+		}
 	    }
 	}
     }
@@ -43917,6 +44349,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
   int nbdims;
   int i;
   int nvatts;
+  int skipvar;
   size_t nvertex;
   grid_t grid;
   grid_t proj;
@@ -44011,7 +44444,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 	    }
 
 	  if ( ncvars[ncvarid].gridtype == UNDEFID || ncvars[ncvarid].gridtype == GRID_GENERIC )
-	    if ( ydimid == xdimid ) ncvars[ncvarid].gridtype = GRID_UNSTRUCTURED;
+	    if ( xdimid != UNDEFID && xdimid == ydimid ) ncvars[ncvarid].gridtype = GRID_UNSTRUCTURED;
 
 	  grid_init(&grid);
 	  grid_init(&proj);
@@ -44067,6 +44500,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 
 	      if ( xvarid != UNDEFID )
 		{
+                  skipvar = TRUE;
 		  islon = ncvars[xvarid].islon;
 		  ndims = ncvars[xvarid].ndims;
 		  if ( ndims == 2 || ndims == 3 )
@@ -44081,15 +44515,10 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			dimsize1 = ncdims[dimid].len;
 			dimid = ncvars[xvarid].dimids[ndims-1];
 			dimsize2 = ncdims[dimid].len;
-			if ( dimsize1*dimsize2 != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize1*dimsize2 == size ) skipvar = FALSE;
 		      }
 		    }
-		  else
+		  else if ( ndims == 1 )
 		    {
 		      size = xsize;
 		      /* Check size of 1 dimensional coordinate variables */
@@ -44098,14 +44527,22 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			size_t dimsize;
 			dimid = ncvars[xvarid].dimids[0];
 			dimsize = ncdims[dimid].len;
-			if ( dimsize != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize == size ) skipvar = FALSE;
 		      }
 		    }
+		  else if ( ndims == 0 && xsize == 0 )
+		    {
+                      xsize = 1;
+		      size = xsize;
+                      skipvar = FALSE;
+		    }
+
+                  if ( skipvar )
+                    {
+                      Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
+                      ncvars[ncvarid].isvar = -1;
+                      continue;
+                    }
 
 		  if ( ncvars[xvarid].xtype == NC_FLOAT ) grid.prec = DATATYPE_FLT32;
 		  grid.xvals = (double *) malloc(size*sizeof(double));
@@ -44138,6 +44575,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 
 	      if ( yvarid != UNDEFID )
 		{
+                  skipvar = TRUE;
 		  islat = ncvars[yvarid].islat;
 		  ndims = ncvars[yvarid].ndims;
 		  if ( ndims == 2 || ndims == 3 )
@@ -44152,15 +44590,10 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			dimsize1 = ncdims[dimid].len;
 			dimid = ncvars[yvarid].dimids[ndims-1];
 			dimsize2 = ncdims[dimid].len;
-			if ( dimsize1*dimsize2 != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize1*dimsize2 == size ) skipvar = FALSE;
 		      }
 		    }
-		  else
+		  else if ( ndims == 1 )
 		    {
 		      if ( (int) ysize == 0 ) size = xsize;
 		      else                    size = ysize;
@@ -44171,14 +44604,22 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			size_t dimsize;
 			dimid = ncvars[yvarid].dimids[0];
 			dimsize = ncdims[dimid].len;
-			if ( dimsize != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize == size ) skipvar = FALSE;
 		      }
 		    }
+		  else if ( ndims == 0 && ysize == 0 )
+		    {
+                      ysize = 1;
+		      size = ysize;
+                      skipvar = FALSE;
+		    }
+
+                  if ( skipvar )
+                    {
+                      Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
+                      ncvars[ncvarid].isvar = -1;
+                      continue;
+                    }
 
 		  if ( ncvars[yvarid].xtype == NC_FLOAT ) grid.prec = DATATYPE_FLT32;
 		  grid.yvals = (double *) malloc(size*sizeof(double));
@@ -44463,6 +44904,9 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
                   ncvars[ncvarid].isvar = -1;
                   continue;
                 }
+
+              if ( ncvars[ncvarid].position > 0 ) grid.position = ncvars[ncvarid].position;
+              if ( uuidOfHGrid[0] != 0 ) memcpy(grid.uuid, uuidOfHGrid, 16);
             }
 
 #if defined (PROJECTION_TEST)
@@ -44504,17 +44948,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 
           if ( grid.type == GRID_UNSTRUCTURED )
             {
-              if ( CDI_Debug)
-                {
-                  if ( grid.number != UNDEFID ) printf("number : %d\n", grid.number);
-                  if ( ncvars[ncvarid].position > 0 ) printf("position : %d\n", ncvars[ncvarid].position);
-                  if ( gridfile[0] != 0 ) printf("gridfile: %s\n", gridfile);
-                  if ( uuidOfHGrid[0] != 0 ) printf("uuidOfHGrid: defined\n");
-                }
-
-              if ( ncvars[ncvarid].position > 0 ) gridDefPosition(ncvars[ncvarid].gridID, ncvars[ncvarid].position);
               if ( gridfile[0] != 0 ) gridDefReference(ncvars[ncvarid].gridID, gridfile);
-              if ( uuidOfHGrid[0] != 0 ) gridDefUUID(ncvars[ncvarid].gridID, uuidOfHGrid);
             }
 
           if ( ncvars[ncvarid].chunked )
@@ -44544,6 +44978,8 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 	  gridindex = vlistGridIndex(vlistID, ncvars[ncvarid].gridID);
 	  streamptr->xdimID[gridindex] = xdimid;
 	  streamptr->ydimID[gridindex] = ydimid;
+          if ( xdimid == -1 && ydimid == -1 && grid.size == 1 )
+            gridDefHasDims(ncvars[ncvarid].gridID, FALSE);
 
 	  if ( CDI_Debug )
 	    Message("gridID %d %d %s", ncvars[ncvarid].gridID, ncvarid, ncvars[ncvarid].name);
@@ -44835,9 +45271,9 @@ void define_all_vars(stream_t *streamptr, int vlistID, int instID, int modelID,
 	  param = cdiEncodeParam(ncvars[ncvarid].code, ncvars[ncvarid].tabnum, 255);
 	  vlistDefVarParam(vlistID, varID, param);
 	}
-      if ( ncvars[ncvarid].longname[0] )      vlistDefVarLongname(vlistID, varID, ncvars[ncvarid].longname);
-      if ( ncvars[ncvarid].stdname[0] )       vlistDefVarStdname(vlistID, varID, ncvars[ncvarid].stdname);
-      if ( ncvars[ncvarid].units[0] )         vlistDefVarUnits(vlistID, varID, ncvars[ncvarid].units);
+      if ( ncvars[ncvarid].longname[0] )  vlistDefVarLongname(vlistID, varID, ncvars[ncvarid].longname);
+      if ( ncvars[ncvarid].stdname[0] )   vlistDefVarStdname(vlistID, varID, ncvars[ncvarid].stdname);
+      if ( ncvars[ncvarid].units[0] )     vlistDefVarUnits(vlistID, varID, ncvars[ncvarid].units);
 
       if ( ncvars[ncvarid].lvalidrange )
         vlistDefVarValidrange(vlistID, varID, ncvars[ncvarid].validrange);
@@ -45075,7 +45511,8 @@ void define_all_vars(stream_t *streamptr, int vlistID, int instID, int modelID,
 
 static
 void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ngatts,
-                            int *instID, int *modelID, int *ucla_les, char *uuidOfHGrid, char *gridfile, int *number_of_grid_used)
+                            int *instID, int *modelID, int *ucla_les, char *uuidOfHGrid,
+                            char *gridfile, int *number_of_grid_used, char *fcreftime)
 {
   nc_type xtype;
   size_t attlen;
@@ -45093,6 +45530,8 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 	{
 	  cdfGetAttText(fileID, NC_GLOBAL, attname, attstringlen-1, attstring);
 
+          size_t attstrlen = strlen(attstring);
+
 	  if ( attlen > 0 && attstring[0] != 0 )
 	    {
 	      if ( strcmp(attname, "history") == 0 )
@@ -45127,11 +45566,17 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 	      else if ( strcmp(attname, "CDO") == 0 )
 		{
 		}
+              /*
+	      else if ( strcmp(attname, "forecast_reference_time") == 0 )
+		{
+                  memcpy(fcreftime, attstring, attstrlen+1);
+		}
+              */
 	      else if ( strcmp(attname, "grid_file_uri") == 0 )
 		{
-                  memcpy(gridfile, attstring, attlen+1);
+                  memcpy(gridfile, attstring, attstrlen+1);
 		}
-	      else if ( strcmp(attname, "uuidOfHGrid") == 0 && attlen == 36 )
+	      else if ( strcmp(attname, "uuidOfHGrid") == 0 && attstrlen == 36 )
 		{
                   attstring[36] = 0;
                   str2uuid(attstring, uuidOfHGrid);
@@ -45141,10 +45586,10 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 		{
                   if ( strcmp(attname, "ICON_grid_file_uri") == 0 && gridfile[0] == 0 )
                     {
-                      memcpy(gridfile, attstring, attlen+1);
+                      memcpy(gridfile, attstring, attstrlen+1);
                     }
 
-		  vlistDefAttTxt(vlistID, CDI_GLOBAL, attname, (int)attlen, attstring);
+		  vlistDefAttTxt(vlistID, CDI_GLOBAL, attname, (int)attstrlen, attstring);
 		}
 	    }
 	}
@@ -45180,6 +45625,135 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 	}
     }
 }
+
+static
+int find_leadtime(int nvars, ncvar_t *ncvars)
+{
+  int leadtime_id = UNDEFID;
+  int ncvarid;
+
+  for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+    {
+      if ( ncvars[ncvarid].stdname[0] )
+        {
+          if ( strcmp(ncvars[ncvarid].stdname, "forecast_period") == 0 )
+            {
+              leadtime_id = ncvarid;
+              break;
+            }
+        }
+    }
+
+  return (leadtime_id);
+}
+
+static
+void find_time_vars(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimid, stream_t *streamptr,
+                    int *time_has_units, int *time_has_bounds, int *time_climatology)
+{
+  int ncvarid;
+
+  if ( timedimid == UNDEFID )
+    {
+      char timeunits[CDI_MAX_NAME];
+
+      for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+        {
+          if ( ncvars[ncvarid].ndims == 0 && strcmp(ncvars[ncvarid].name, "time") == 0 )
+            {
+              if ( ncvars[ncvarid].units[0] )
+                {
+                  strcpy(timeunits, ncvars[ncvarid].units);
+                  strtolower(timeunits);
+
+                  if ( isTimeUnits(timeunits) )
+                    {
+                      streamptr->basetime.ncvarid = ncvarid;
+                      break;
+                    }
+                }
+            }
+        }
+    }
+  else
+    {
+      int ltimevar = FALSE;
+
+      if ( ncdims[timedimid].ncvarid != UNDEFID )
+        {
+          streamptr->basetime.ncvarid = ncdims[timedimid].ncvarid;
+          ltimevar = TRUE;
+        }
+
+      for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+        if ( ncvarid != streamptr->basetime.ncvarid &&
+             ncvars[ncvarid].ndims == 1 &&
+             timedimid == ncvars[ncvarid].dimids[0] &&
+             ncvars[ncvarid].xtype != NC_CHAR &&
+             isTimeAxisUnits(ncvars[ncvarid].units) )
+          {
+            ncvars[ncvarid].isvar = FALSE;
+
+            if ( !ltimevar )
+              {
+                streamptr->basetime.ncvarid = ncvarid;
+                ltimevar = TRUE;
+                if ( CDI_Debug )
+                  fprintf(stderr, "timevar %s\n", ncvars[ncvarid].name);
+              }
+            else
+              {
+                Warning("Found more than one time variable, skipped variable %s!", ncvars[ncvarid].name);
+              }
+          }
+
+      if ( ltimevar == FALSE ) /* search for WRF time description */
+        {
+          for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+            if ( ncvarid != streamptr->basetime.ncvarid &&
+                 ncvars[ncvarid].ndims == 2 &&
+                 timedimid == ncvars[ncvarid].dimids[0] &&
+                 ncvars[ncvarid].xtype == NC_CHAR &&
+                 ncdims[ncvars[ncvarid].dimids[1]].len == 19 )
+              {
+                streamptr->basetime.ncvarid = ncvarid;
+                streamptr->basetime.lwrf    = TRUE;
+                break;
+              }
+        }
+
+      /* time varID */
+      ncvarid = streamptr->basetime.ncvarid;
+
+      if ( ncvarid == UNDEFID )
+        {
+          Warning("Time variable >%s< not found!", ncdims[timedimid].name);
+        }
+    }
+
+  /* time varID */
+  ncvarid = streamptr->basetime.ncvarid;
+
+  if ( ncvarid != UNDEFID && streamptr->basetime.lwrf == FALSE )
+    {
+      if ( ncvars[ncvarid].units[0] != 0 ) *time_has_units = TRUE;
+
+      if ( ncvars[ncvarid].bounds != UNDEFID )
+        {
+          int nbdims = ncvars[ncvars[ncvarid].bounds].ndims;
+          if ( nbdims == 2 )
+            {
+              int len = (int) ncdims[ncvars[ncvars[ncvarid].bounds].dimids[nbdims-1]].len;
+              if ( len == 2 && timedimid == ncvars[ncvars[ncvarid].bounds].dimids[0] )
+                {
+                  *time_has_bounds = TRUE;
+                  streamptr->basetime.ncvarboundsid = ncvars[ncvarid].bounds;
+                  if ( ncvars[ncvarid].climatology ) *time_climatology = TRUE;
+                }
+            }
+        }
+    }
+}
 #endif
 
 int cdfInqContents(stream_t *streamptr)
@@ -45197,7 +45771,7 @@ int cdfInqContents(stream_t *streamptr)
   int time_has_units = FALSE;
   int time_has_bounds = FALSE;
   int time_climatology = FALSE;
-  size_t len;
+  int leadtime_id = UNDEFID;
   int nvars_data;
   int nvcth_id = UNDEFID, vcta_id = UNDEFID, vctb_id = UNDEFID;
   size_t vctsize = 0;
@@ -45206,7 +45780,6 @@ int cdfInqContents(stream_t *streamptr)
   int modelID = UNDEFID;
   int taxisID;
   int i;
-  int nbdims;
   int calendar = UNDEFID;
   ncdim_t *ncdims;
   ncvar_t *ncvars = NULL;
@@ -45215,10 +45788,12 @@ int cdfInqContents(stream_t *streamptr)
   int ucla_les = FALSE;
   char uuidOfHGrid[17];
   char gridfile[8912];
+  char fcreftime[CDI_MAX_NAME];
   int number_of_grid_used = UNDEFID;
 
   uuidOfHGrid[0] = 0;
-  gridfile[0] = 0;
+  gridfile[0]    = 0;
+  fcreftime[0]   = 0;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -45288,7 +45863,7 @@ int cdfInqContents(stream_t *streamptr)
     }
 
   /* scan global attributes */
-  scan_global_attributes(fileID, vlistID, streamptr, ngatts, &instID, &modelID, &ucla_les, uuidOfHGrid, gridfile, &number_of_grid_used);
+  scan_global_attributes(fileID, vlistID, streamptr, ngatts, &instID, &modelID, &ucla_les, uuidOfHGrid, gridfile, &number_of_grid_used, fcreftime);
 
   /* find time dim */
   if ( unlimdimid >= 0 )
@@ -45351,81 +45926,10 @@ int cdfInqContents(stream_t *streamptr)
     }
 
   /* find time vars */
-  if ( timedimid != UNDEFID )
-    {
-      int ltimevar = FALSE;
+  find_time_vars(nvars, ncvars, ncdims, timedimid, streamptr, &time_has_units, &time_has_bounds, &time_climatology);
 
-      if ( ncdims[timedimid].ncvarid != UNDEFID )
-	{
-	  streamptr->basetime.ncvarid = ncdims[timedimid].ncvarid;
-	  ltimevar = TRUE;
-	}
-
-      for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
-	if ( ncvarid != streamptr->basetime.ncvarid &&
-	     ncvars[ncvarid].ndims == 1 &&
-	     timedimid == ncvars[ncvarid].dimids[0] &&
-	     ncvars[ncvarid].xtype != NC_CHAR &&
-	     isTimeUnits(ncvars[ncvarid].units) )
-	  {
-	    ncvars[ncvarid].isvar = FALSE;
-
-	    if ( !ltimevar )
-	      {
-		streamptr->basetime.ncvarid = ncvarid;
-		ltimevar = TRUE;
-		if ( CDI_Debug )
-		  fprintf(stderr, "timevar %s\n", ncvars[ncvarid].name);
-	      }
-	    else
-	      {
-		if ( CDI_Debug )
-		  fprintf(stderr, "skipped timevar %s\n", ncvars[ncvarid].name);
-	      }
-	  }
-
-      if ( ltimevar == FALSE ) /* search for WRF time description */
-	{
-	  for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
-	    if ( ncvarid != streamptr->basetime.ncvarid &&
-		 ncvars[ncvarid].ndims == 2 &&
-		 timedimid == ncvars[ncvarid].dimids[0] &&
-		 ncvars[ncvarid].xtype == NC_CHAR &&
-		 ncdims[ncvars[ncvarid].dimids[1]].len == 19 )
-	      {
-		streamptr->basetime.ncvarid = ncvarid;
-		streamptr->basetime.lwrf    = TRUE;
-		break;
-	      }
-	}
-
-      /* time varID */
-      ncvarid = streamptr->basetime.ncvarid;
-
-      if ( ncvarid == UNDEFID )
-	Warning("Variable >time< not found!");
-      else if ( streamptr->basetime.lwrf == FALSE )
-	{
-	  if ( ncvars[ncvarid].units[0] != 0 )
-	    time_has_units = TRUE;
-
-	  if ( ncvars[ncvarid].bounds != UNDEFID )
-	    {
-	      nbdims = ncvars[ncvars[ncvarid].bounds].ndims;
-	      if ( nbdims == 2 )
-		{
-		  len = ncdims[ncvars[ncvars[ncvarid].bounds].dimids[nbdims-1]].len;
-		  if ( (int)len == 2 && timedimid == ncvars[ncvars[ncvarid].bounds].dimids[0] )
-		    {
-
-		      time_has_bounds = TRUE;
-		      streamptr->basetime.ncvarboundsid = ncvars[ncvarid].bounds;
-                      if ( ncvars[ncvarid].climatology ) time_climatology = TRUE;
-		    }
-		}
-	    }
-	}
-    }
+  leadtime_id = find_leadtime(nvars, ncvars);
+  if ( leadtime_id != UNDEFID ) ncvars[leadtime_id].isvar = FALSE;
 
   /* check ncvars */
   for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
@@ -45490,7 +45994,6 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
 
-
   /* verify coordinate vars - first scan (dimname == varname) */
   verify_coordinate_vars_1(ndims, ncdims, ncvars, timedimid);
 
@@ -45540,8 +46043,6 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
   */
-  /* set dim type */
-  setDimType(nvars, ncvars, ncdims);
 
   /* Set coordinate varids (att: associate)  */
   for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
@@ -45562,6 +46063,9 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
 
+  /* set dim type */
+  setDimType(nvars, ncvars, ncdims);
+
   /* find VCT */
   for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
     {
@@ -45630,6 +46134,9 @@ int cdfInqContents(stream_t *streamptr)
       return (CDI_EUFSTRUCT);
     }
 
+  if ( ntsteps == 0 && streamptr->basetime.ncdimid == UNDEFID && streamptr->basetime.ncvarid != UNDEFID )
+    ntsteps = 1;
+
   streamptr->ntsteps = ntsteps;
 
   /* define all data variables */
@@ -45643,12 +46150,26 @@ int cdfInqContents(stream_t *streamptr)
 
   if ( time_has_units )
     {
-      taxis_t *taxis;
-      taxis = &streamptr->tsteps[0].taxis;
+      taxis_t *taxis = &streamptr->tsteps[0].taxis;
 
-      cdfGetAttText(fileID, ncvarid, "units", attstringlen-1, attstring);
-      if ( splitBasetime(attstring, taxis) == 1 )
-	streamptr->basetime.ncvarid = UNDEFID;
+      if ( setBaseTime(ncvars[ncvarid].units, taxis) == 1 )
+        {
+          ncvarid = UNDEFID;
+          streamptr->basetime.ncvarid = UNDEFID;
+        }
+
+      if ( leadtime_id != UNDEFID && taxis->type == TAXIS_RELATIVE )
+        {
+          streamptr->basetime.leadtimeid = leadtime_id;
+          taxis->type = TAXIS_FORECAST;
+
+          int timeunit = -1;
+          if ( ncvars[leadtime_id].units[0] != 0 ) timeunit = scanTimeUnit(ncvars[leadtime_id].units);
+          if ( timeunit == -1 ) timeunit = taxis->unit;
+          taxis->fc_unit = timeunit;
+
+          setForecastTime(fcreftime, taxis);
+        }
     }
 
   if ( time_has_bounds )
@@ -45657,17 +46178,16 @@ int cdfInqContents(stream_t *streamptr)
       if ( time_climatology ) streamptr->tsteps[0].taxis.climatology = TRUE;
     }
 
-  if ( ncvarid != -1 )
+  if ( ncvarid != UNDEFID )
     {
-      taxis_t *taxis;
-      taxis = &streamptr->tsteps[0].taxis;
+      taxis_t *taxis = &streamptr->tsteps[0].taxis;
 
       taxis->name = strdup(ncvars[ncvarid].name);
       if ( ncvars[ncvarid].longname[0] )
         taxis->longname = strdup(ncvars[ncvarid].longname);
     }
 
-  if ( ncvarid != -1 )
+  if ( ncvarid != UNDEFID )
     if ( ncvars[ncvarid].calendar == TRUE )
       {
 	cdfGetAttText(fileID, ncvarid, "calendar", attstringlen-1, attstring);
@@ -45692,8 +46212,14 @@ int cdfInqContents(stream_t *streamptr)
 	  Warning("calendar >%s< unsupported!", attstring);
       }
 
-  if ( streamptr->tsteps[0].taxis.type == TAXIS_RELATIVE )
-    taxisID = taxisCreate(TAXIS_RELATIVE);
+  if ( streamptr->tsteps[0].taxis.type == TAXIS_FORECAST )
+    {
+      taxisID = taxisCreate(TAXIS_FORECAST);
+    }
+  else if ( streamptr->tsteps[0].taxis.type == TAXIS_RELATIVE )
+    {
+      taxisID = taxisCreate(TAXIS_RELATIVE);
+    }
   else
     {
       taxisID = taxisCreate(TAXIS_ABSOLUTE);
@@ -45704,22 +46230,15 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
 
-  if ( calendar != UNDEFID )
-    {
-      taxis_t *taxis;
-      taxis = &streamptr->tsteps[0].taxis;
 
-      taxis->calendar = calendar;
-      taxisDefCalendar(taxisID, calendar);
-    }
-  else if ( streamptr->tsteps[0].taxis.type == TAXIS_RELATIVE )
+  if ( calendar == UNDEFID && streamptr->tsteps[0].taxis.type != TAXIS_ABSOLUTE )
     {
-      taxis_t *taxis;
-
       calendar = CALENDAR_STANDARD;
+    }
 
-      taxis = &streamptr->tsteps[0].taxis;
-
+  if ( calendar != UNDEFID )
+    {
+      taxis_t *taxis = &streamptr->tsteps[0].taxis;
       taxis->calendar = calendar;
       taxisDefCalendar(taxisID, calendar);
     }
@@ -45750,8 +46269,6 @@ int cdfInqTimestep(stream_t * streamptr, int tsID)
   long nrecs = 0;
 #if  defined  (HAVE_LIBNETCDF)
   double timevalue;
-  int nctimevarid;
-  int nctimeboundsid;
   int fileID;
   size_t index;
   taxis_t *taxis;
@@ -45770,7 +46287,7 @@ int cdfInqTimestep(stream_t * streamptr, int tsID)
 
       timevalue = tsID;
 
-      nctimevarid = streamptr->basetime.ncvarid;
+      int nctimevarid = streamptr->basetime.ncvarid;
       if ( nctimevarid != UNDEFID )
 	{
 	  fileID = streamptr->fileID;
@@ -45802,22 +46319,29 @@ int cdfInqTimestep(stream_t * streamptr, int tsID)
 	      cdiDecodeTimeval(timevalue, taxis, &taxis->vdate, &taxis->vtime);
 	    }
 
-	  nctimeboundsid = streamptr->basetime.ncvarboundsid;
+	  int nctimeboundsid = streamptr->basetime.ncvarboundsid;
 	  if ( nctimeboundsid != UNDEFID )
 	    {
 	      size_t start[2], count[2];
-	      start[0] = tsID; count[0] = 1; start[1] = 0; count[1] = 1;
+	      start[0] = index; count[0] = 1; start[1] = 0; count[1] = 1;
 	      cdf_get_vara_double(fileID, nctimeboundsid, start, count, &timevalue);
               if ( timevalue >= NC_FILL_DOUBLE || timevalue < -NC_FILL_DOUBLE ) timevalue = 0;
 
 	      cdiDecodeTimeval(timevalue, taxis, &taxis->vdate_lb, &taxis->vtime_lb);
 
-	      start[0] = tsID; count[0] = 1; start[1] = 1; count[1] = 1;
+	      start[0] = index; count[0] = 1; start[1] = 1; count[1] = 1;
 	      cdf_get_vara_double(fileID, nctimeboundsid, start, count, &timevalue);
               if ( timevalue >= NC_FILL_DOUBLE || timevalue < -NC_FILL_DOUBLE ) timevalue = 0;
 
 	      cdiDecodeTimeval(timevalue, taxis, &taxis->vdate_ub, &taxis->vtime_ub);
 	    }
+
+          int leadtimeid = streamptr->basetime.leadtimeid;
+          if ( leadtimeid != UNDEFID )
+            {
+	      cdf_get_var1_double(fileID, leadtimeid, &index, &timevalue);
+              cdiSetForecastPeriod(timevalue, taxis);
+            }
 	}
     }
 
@@ -45840,6 +46364,7 @@ void cdfEndDef(stream_t *streamptr)
 
   cdfDefGlobalAtts(streamptr);
   cdfDefLocalAtts(streamptr);
+
   if ( streamptr->accessmode == 0 )
     {
       nvars =  streamptr->nvars;
@@ -45849,7 +46374,15 @@ void cdfEndDef(stream_t *streamptr)
       for ( varID = 0; varID < nvars; varID++ )
 	cdfDefVar(streamptr, varID);
 
-      if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
+      if ( streamptr->ncmode == 2 )
+        {
+          extern size_t CDI_netcdf_hdr_pad;
+
+          if ( CDI_netcdf_hdr_pad == 0UL )
+            cdf_enddef(fileID);
+          else
+            cdf__enddef(fileID, CDI_netcdf_hdr_pad);
+        }
 
       streamptr->accessmode = 1;
     }
@@ -46108,7 +46641,8 @@ int streamvar_new_entry(stream_t *streamptr)
       int i;
 
       streamvarSize = 2;
-      streamvar = (svarinfo_t *) malloc(streamvarSize*sizeof(svarinfo_t));
+      streamvar
+        = (svarinfo_t *)xmalloc((size_t)streamvarSize * sizeof(svarinfo_t));
       if ( streamvar == NULL )
 	{
           Message("streamvarSize = %d", streamvarSize);
@@ -46134,7 +46668,9 @@ int streamvar_new_entry(stream_t *streamptr)
       int i;
 
       streamvarSize = 2*streamvarSize;
-      streamvar = (svarinfo_t *) realloc(streamvar, streamvarSize*sizeof(svarinfo_t));
+      streamvar
+        = (svarinfo_t *)xrealloc(streamvar,
+                                 (size_t)streamvarSize * sizeof (svarinfo_t));
       if ( streamvar == NULL )
 	{
           Message("streamvarSize = %d", streamvarSize);
@@ -46177,8 +46713,8 @@ int stream_new_var(stream_t *streamptr, int gridID, int zaxisID)
 
   nlevs = zaxisInqSize(zaxisID);
 
-  level  = (int *) malloc(nlevs*sizeof(int));
-  lindex = (int *) malloc(nlevs*sizeof(int));
+  level  = (int *)xmalloc((size_t)nlevs * sizeof (int));
+  lindex = (int *)xmalloc((size_t)nlevs * sizeof (int));
 
   for ( levID = 0; levID < nlevs; levID++ )
     level[levID] = CDI_UNDEFID;
@@ -46584,7 +47120,7 @@ void stream_write_record(int streamID, int memtype, const void *data, int nmiss)
     case FILETYPE_SRV:
       {
         if ( memtype == MEMTYPE_FLOAT ) Error("srvWriteRecord not implemented for memtype float!");
-        status = srvWriteRecord(streamptr, data);
+        status = srvWriteRecord(streamptr, (const double*) data);
 	break;
       }
 #endif
@@ -46592,7 +47128,7 @@ void stream_write_record(int streamID, int memtype, const void *data, int nmiss)
     case FILETYPE_EXT:
       {
         if ( memtype == MEMTYPE_FLOAT ) Error("extWriteRecord not implemented for memtype float!");
-        status = extWriteRecord(streamptr, data);
+        status = extWriteRecord(streamptr, (const double*) data);
 	break;
       }
 #endif
@@ -46600,7 +47136,7 @@ void stream_write_record(int streamID, int memtype, const void *data, int nmiss)
     case FILETYPE_IEG:
       {
         if ( memtype == MEMTYPE_FLOAT ) Error("iegWriteRecord not implemented for memtype float!");
-        status = iegWriteRecord(streamptr, data);
+        status = iegWriteRecord(streamptr, (const double*) data);
 	break;
       }
 #endif
@@ -47820,7 +48356,6 @@ int file_fill_buffer(bfile_t *fileptr)
 {
   long nread;
   int fd;
-  int ret;
   long offset = 0;
   off_t retseek;
 
@@ -47850,19 +48385,17 @@ int file_fill_buffer(bfile_t *fileptr)
 
 	  if ( fileptr->buffer )
 	    {
+              int ret;
 	      ret = munmap(fileptr->buffer, fileptr->mappedSize);
-	      if ( ret == -1 )
-		SysError("munmap error for read %s", fileptr->name);
+	      if ( ret == -1 ) SysError("munmap error for read %s", fileptr->name);
 	      fileptr->buffer = NULL;
 	    }
 
 	  fileptr->mappedSize = (size_t) nread;
 
-	  fileptr->buffer =
-            (char *) mmap(0, (size_t) nread, PROT_READ, MAP_SHARED, fd, fileptr->bufferPos);
+	  fileptr->buffer = (char*) mmap(NULL, (size_t) nread, PROT_READ, MAP_PRIVATE, fd, fileptr->bufferPos);
 
-	  if ( fileptr->buffer == (void *)-1 )
-	    SysError("mmap error for read %s", fileptr->name);
+	  if ( fileptr->buffer == MAP_FAILED ) SysError("mmap error for read %s", fileptr->name);
 
 	  offset = fileptr->position - fileptr->bufferPos;
 	}
@@ -47952,10 +48485,10 @@ size_t file_read_from_buffer(bfile_t *fileptr, void *ptr, size_t size)
   size_t offset = 0;
 
   if ( FILE_Debug )
-    Message("size = %ld  Cnt = %d", size, (int) fileptr->bufferCnt);
+    Message("size = %ld  Cnt = %ld", size, (long) fileptr->bufferCnt);
 
-  if ( ((int)fileptr->bufferCnt) < 0 )
-    Error("Internal problem. bufferCnt = %d", (int) fileptr->bufferCnt);
+  if ( ((long)fileptr->bufferCnt) < 0L )
+    Error("Internal problem. bufferCnt = %ld", (long) fileptr->bufferCnt);
 
   rsize = size;
 
@@ -48194,8 +48727,7 @@ int fileClose_serial(int fileID)
       if ( fileptr->buffer && fileptr->mappedSize )
 	{
 	  ret = munmap(fileptr->buffer, fileptr->mappedSize);
-	  if ( ret == -1 )
-	    SysError("munmap error for close %s", fileptr->name);
+	  if ( ret == -1 ) SysError("munmap error for close %s", fileptr->name);
 	  fileptr->buffer = NULL;
 	}
 #endif
@@ -48376,9 +48908,9 @@ size_t fileWrite(int fileID, const void *restrict ptr, size_t size)
  * End:
  */
 
-/* Automatically generated by m214003 at 2014-01-08, do not edit */
+/* Automatically generated by m214003 at 2014-06-27, do not edit */
 
-/* CGRIBEXLIB_VERSION="1.6.3" */
+/* CGRIBEXLIB_VERSION="1.6.4" */
 
 #ifdef _ARCH_PWR6
 #pragma options nostrict
@@ -48542,9 +49074,9 @@ long   packInt32(unsigned INT32 *up, unsigned char *cp, long bc, long tc);
 #endif
 long   packInt64(unsigned INT64 *up, unsigned char *cp, long bc, long tc);
 #if  defined  (INT32)
-long   unpackInt32(unsigned char *cp, unsigned INT32 *up, long bc, long tc);
+long   unpackInt32(const unsigned char *cp, unsigned INT32 *up, long bc, long tc);
 #endif
-long   unpackInt64(unsigned char *cp, unsigned INT64 *up, long bc, long tc);
+long   unpackInt64(const unsigned char *cp, unsigned INT64 *up, long bc, long tc);
 
 void  gribEncode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
 		 double *fsec3, int *isec4, double *fsec4, int klenp, int *kgrib,
@@ -49007,14 +49539,16 @@ gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL minmax_val.c
   orig    : fmin: -500000  fmax: 499999  time:   4.84s
   sse2    : fmin: -500000  fmax: 499999  time:   4.82s
 
-gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL minmax_val.c
+gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL -fopenmp -DOMP_SIMD minmax_val.c
  result on thunder5 (gcc 4.7.2):
   orig    : fmin: -500000  fmax: 499999  time:   3.10s
+  simd    : fmin: -500000  fmax: 499999  time:   3.23s # omp simd in gcc 4.9
   avx     : fmin: -500000  fmax: 499999  time:   2.84s
 
-icc -g -Wall -O3 -march=native -std=c99 -vec-report=1 -DTEST_MINMAXVAL minmax_val.c
- result on thunder5 (icc 13.1.2):
+icc -g -Wall -O3 -march=native -std=c99 -vec-report=1 -DTEST_MINMAXVAL -openmp -DOMP_SIMD minmax_val.c
+ result on thunder5 (icc 14.0.2):
   orig    : fmin: -500000  fmax: 499999  time:   2.83s
+  simd    : fmin: -500000  fmax: 499999  time:   2.83s
   avx     : fmin: -500000  fmax: 499999  time:   2.92s
 
 xlc_r -g -O3 -qhot -q64 -qarch=auto -qtune=auto -qreport -DTEST_MINMAXVAL minmax_val.c
@@ -49345,6 +49879,43 @@ void minmax_val_orig(const double *restrict data, long idatasize, double *fmin,
 #pragma GCC pop_options
 #endif
 
+// TEST
+#if defined(OMP_SIMD)
+
+//#pragma omp declare reduction(xmin : double : omp_out = omp:in > omp_out ? omp_out : omp_in)
+// initializer( omp_priv = { largenumber })
+//#pragma omp declare reduction(xmax : double : omp_out = omp:in < omp_out ? omp_out : omp_in)
+// initializer( omp_priv = { -largenumber })
+
+#if defined(GNUC_PUSH_POP)
+#pragma GCC push_options
+#pragma GCC optimize ("O3", "fast-math")
+#endif
+static
+void minmax_val_simd(const double *restrict data, long idatasize, double *fmin, double *fmax)
+{
+  size_t i;
+  size_t datasize = idatasize;
+  double dmin = *fmin, dmax = *fmax;
+
+#if defined(_OPENMP)
+  //#pragma omp simd reduction(xmin:dmin) reduction(xmax:dmax)
+#pragma omp simd
+#endif
+  for ( i = 0; i < datasize; ++i )
+    {
+      dmin = dmin < data[i] ? dmin : data[i];
+      dmax = dmax > data[i] ? dmax : data[i];
+    }
+
+  *fmin = dmin;
+  *fmax = dmax;
+}
+#if defined(GNUC_PUSH_POP)
+#pragma GCC pop_options
+#endif
+#endif
+
 static
 void minmax_val(const double *restrict data, long idatasize, double *fmin, double *fmax)
 {
@@ -49450,6 +50021,10 @@ int main(void)
   double fmin, fmax;
   double t_begin, t_end;
 
+#if   defined(_OPENMP)
+  printf("_OPENMP=%d\n", _OPENMP);
+#endif
+
 #if   defined(__ICC)
   printf("icc\n");
 #elif defined(__clang__)
@@ -49458,9 +50033,12 @@ int main(void)
   printf("gcc\n");
 #endif
 
-  data = (double *) malloc(datasize*sizeof(double));
+  data = (double*) malloc(datasize*sizeof(double));
 
-  for ( long i = datasize-1; i >= 0; i-- ) data[i] = (double) (-datasize/2 + i);
+  // for ( long i = datasize-1; i >= 0; i-- ) data[i] = (double) (-datasize/2 + i);
+  for ( long i = 0; i < datasize/2; i++ )        data[i] = (double) (i);
+  for ( long i = datasize/2; i < datasize; i++ ) data[i] = (double) (-datasize + i);
+  // for ( long i = 0; i < datasize; i++ )    printf("%d %g\n", i, data[i]);
 
   t_begin = dtime();
   for ( int i = 0; i < NRUN; ++i )
@@ -49480,6 +50058,17 @@ int main(void)
   t_end = dtime();
   printf("orig      : fmin: %ld  fmax: %ld  time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin);
 
+#if defined(OMP_SIMD)
+  t_begin = dtime();
+  for ( int i = 0; i < NRUN; ++i )
+    {
+      fmin = fmax = data[0];
+      minmax_val_simd(data, datasize, &fmin, &fmax);
+    }
+  t_end = dtime();
+  printf("simd      : fmin: %ld  fmax: %ld  time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin);
+#endif
+
 #if defined(_ENABLE_AVX)
   t_begin = dtime();
   for ( int i = 0; i < NRUN; ++i )
@@ -49729,7 +50318,7 @@ void sse41_encode_double_array_2byte(size_t datasize,
 
   for (i = 0; i < (datasize-residual); i += 16)
     {
-      (void) _mm_prefetch(dval+8, _MM_HINT_NTA);
+      (void) _mm_prefetch((const char*)(dval+8), _MM_HINT_NTA);
       //_____________________________________________________________________________
 
       d0 = _mm_loadu_pd (dval);
@@ -49770,7 +50359,7 @@ void sse41_encode_double_array_2byte(size_t datasize,
 
       //_____________________________________________________________________________
 
-      (void) _mm_prefetch(dval+16, _MM_HINT_NTA);
+      (void) _mm_prefetch((const char*)(dval+16), _MM_HINT_NTA);
 
       //_____________________________________________________________________________
       
@@ -50318,8 +50907,8 @@ int main(void)
   double t_begin, t_end;
   unsigned char *lgrib;
 
-  data = (double *) malloc(datasize*sizeof(double));
-  lgrib = (unsigned char *)  malloc(2*datasize*sizeof(unsigned char));
+  data  = (double*) malloc(datasize*sizeof(double));
+  lgrib = (unsigned char*) malloc(2*datasize*sizeof(unsigned char));
 
   for ( long i = 0; i < datasize; ++i ) data[i] = (double) (-datasize/2 + i);
 
@@ -50686,8 +51275,8 @@ void decode_double_array_common2(const unsigned char * restrict igrib, long jlen
 } 
 
 static 
-void decode_double_array_byte(const unsigned char * restrict igrib, long jlend, int numBits, 
-			      double fmin, double zscale, double * restrict fpdata)
+void decode_double_array_byte(const unsigned char *restrict igrib, long jlend, int numBits, 
+			      double fmin, double zscale, double *restrict fpdata)
 {
 #if defined _GET_X86_COUNTER || defined _GET_MACH_COUNTER 
   uint64_t start_decode, end_decode;
@@ -50703,7 +51292,7 @@ void decode_double_array_byte(const unsigned char * restrict igrib, long jlend,
       long jlenc = jlend * numBits / 8;
       if ( jlenc > 0 ) 
 	{
-	  lgrib = (GRIBPACK *) malloc(jlenc*sizeof(GRIBPACK));
+	  lgrib = (GRIBPACK*) malloc(jlenc*sizeof(GRIBPACK));
 	  if ( lgrib == NULL ) SysError("No Memory!");
 
 	  (void) UNPACK_GRIB(igrib, lgrib, jlenc, -1L);
@@ -50851,8 +51440,6 @@ void decode_double_array_unrolled(const unsigned char * restrict igrib, long jle
 #undef _ENABLE_AVX
 #undef _ENABLE_SSE4_1
 
-#define  NINT(x)  ((x) < 0 ? (int)((x)-.5) : (int)((x)+.5))
-
 
 void confp3(double pval, int *kexp, int *kmant, int kbits, int kround)
 {
@@ -51004,14 +51591,14 @@ void confp3(double pval, int *kexp, int *kmant, int kbits, int kround)
       if ( isign == 0 )
 	*kmant = (int) rpowref;
       else
-	*kmant = NINT(rpowref + 0.5);
+	*kmant = lround(rpowref + 0.5);
     }
   else
     {
       /*  Closest number in GRIB format to the original number   */
       /*  (equal to, greater than or less than original number). */
 
-      *kmant = NINT(rpowref);
+      *kmant = lround(rpowref);
     }
 
   /*  Check that mantissa value does not exceed 24 bits. */
@@ -51061,14 +51648,14 @@ void confp3(double pval, int *kexp, int *kmant, int kbits, int kround)
 	  if ( isign == 0 )
 	    *kmant = (int) rpowref;
 	  else
-	    *kmant = NINT(rpowref + 0.5);
+	    *kmant = lround(rpowref + 0.5);
 	}
       else
 	{
 	  /*  Closest number in GRIB format to the original number */
 	  /*  (equal to, greater or less than original number). */
 
-	  *kmant = NINT(rpowref);
+	  *kmant = lround(rpowref);
 	}
 
       /*  Repeat calculation (with modified exponent) if still have */
@@ -51451,7 +52038,7 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
       fsec3dp[1] = fsec3sp[1];
 
       inum = isec4[0];
-      fsec4dp = (double *) malloc(inum*sizeof(double));
+      fsec4dp = (double*) malloc(inum*sizeof(double));
       if ( fsec4dp == NULL ) SysError("No Memory!");
 
       for ( j = 0; j < inum; j++ ) fsec4dp[j] = fsec4sp[j];
@@ -51464,8 +52051,11 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
     }
   else if ( yfunc == 'D' || yfunc == 'J' || yfunc == 'R' )
     {
-      fsec4dp = (double *) malloc(klenp*sizeof(double));
-      if ( fsec4dp == NULL ) SysError("No Memory!");
+      if ( yfunc == 'D' || yfunc == 'R' )
+	{
+	  fsec4dp = (double*) malloc(klenp*sizeof(double));
+	  if ( fsec4dp == NULL ) SysError("No Memory!");
+	}
 
       for ( j = 0; j < 10; j++ ) fsec2dp[j] = 0.0;
       for ( j = 0; j <  2; j++ ) fsec3dp[j] = 0.0;
@@ -51480,20 +52070,23 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
       fsec3sp[0] = fsec3dp[0];
       fsec3sp[1] = fsec3dp[1];
 
-      inum = isec4[0];
-      for ( j = 0; j < inum; j++ )
+      if ( yfunc == 'D' || yfunc == 'R' )
 	{
-	  if ( fsec4dp[j] > -FLT_MIN && fsec4dp[j] < FLT_MIN )
-	    fsec4sp[j] = 0;
-	  else if ( fsec4dp[j] > FLT_MAX )
-	    fsec4sp[j] = FLT_MAX;
-	  else if ( fsec4dp[j] < -FLT_MAX )
-	    fsec4sp[j] = -FLT_MAX;
-	  else
-	    fsec4sp[j] = fsec4dp[j];
-	}
+	  inum = isec4[0];
+	  for ( j = 0; j < inum; j++ )
+	    {
+	      if ( fsec4dp[j] > -FLT_MIN && fsec4dp[j] < FLT_MIN )
+		fsec4sp[j] = 0;
+	      else if ( fsec4dp[j] > FLT_MAX )
+		fsec4sp[j] = FLT_MAX;
+	      else if ( fsec4dp[j] < -FLT_MAX )
+		fsec4sp[j] = -FLT_MAX;
+	      else
+		fsec4sp[j] = fsec4dp[j];
+	    }
 
-      free(fsec4dp);
+	  free(fsec4dp);
+	}
     }
   else if ( yfunc == 'V' )
     fprintf(stderr, " c-gribex: Version is %s\n", cgribexLibraryVersion());
@@ -52782,7 +53375,7 @@ void gribPrintSec2SP(int *isec0, int *isec2, float  *fsec2sp)
 
   inum = 10 + isec2[11];
 
-  fsec2 = (double *) malloc(inum*sizeof(double));
+  fsec2 = (double*) malloc(inum*sizeof(double));
   if ( fsec2 == NULL ) SysError("No Memory!");
 
   for ( j = 0; j < inum; j++ )
@@ -53545,7 +54138,7 @@ void encodeBMS(GRIBPACK *lGrib, long *gribLen, double *fsec3, int *isec4, double
   fsec4size = 0;
 
 #if defined (VECTORCODE)
-  imask = (unsigned int *) malloc(imaskSize*sizeof(int));
+  imask = (unsigned int*) malloc(imaskSize*sizeof(unsigned int));
   memset(imask, 0, imaskSize*sizeof(int));
 
 #if defined (CRAY)
@@ -53821,19 +54414,18 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
 	}
     }
 
-  max_nbpv_pow2 = (unsigned int) (intpow2(nbpv) - 1);
+  //max_nbpv_pow2 = (unsigned) (intpow2(nbpv) - 1);
+  max_nbpv_pow2 = (unsigned) ((1ULL << nbpv) - 1);
 
   if ( binscale != 0 )
     {
       if ( binscale < 0 )
 	{
-	  if ( (unsigned int)(range*intpow2(-binscale)+0.5) > max_nbpv_pow2 )
-	    binscale++;
+	  if ( (unsigned)(range*intpow2(-binscale)+0.5) > max_nbpv_pow2 ) binscale++;
 	}
       else
 	{
-	  if ( (unsigned int)(range/intpow2(binscale)+0.5) > max_nbpv_pow2 )
-	    binscale--;
+	  if ( (unsigned)(range/intpow2(binscale)+0.5) > max_nbpv_pow2 ) binscale--;
 	}
 
       if ( binscale < 0 ) factor =     intpow2(-binscale);
@@ -53919,7 +54511,7 @@ void gribEncode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
   if ( bmsIncluded ) len += (klenp+7)>>3;
 
 #if defined (VECTORCODE)
-  lGrib = (GRIBPACK *) malloc(len*sizeof(GRIBPACK));
+  lGrib = (GRIBPACK*) malloc(len*sizeof(GRIBPACK));
   if ( lGrib == NULL ) SysError("No Memory!");
 #else
   lGrib = CGrib;
@@ -54483,7 +55075,7 @@ int decodeGDS(unsigned char  *gds, int *isec0, int *isec2, double *fsec2, int *n
 	}
 #if defined (SX)
       lGribLen = 4*ISEC2_NumVCP;	      
-      lgrib    = (GRIBPACK *) malloc(lGribLen*sizeof(GRIBPACK));
+      lgrib    = (GRIBPACK*) malloc(lGribLen*sizeof(GRIBPACK));
 
       igrib = &gds[locnv];
       if ( ISEC2_NumVCP > 0 ) (void) UNPACK_GRIB(igrib, lgrib, lGribLen, -1L);
@@ -55027,7 +55619,7 @@ void gribDecode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
 	    }
 	  */
 
-	  imask = (GRIBPACK *) malloc(imaskSize*sizeof(GRIBPACK));
+	  imask = (GRIBPACK*) malloc(imaskSize*sizeof(GRIBPACK));
 
 #if defined (VECTORCODE)
 	  (void) UNPACK_GRIB(BMS_Bitmap, imask, imaskSize/8, -1L);
@@ -55791,7 +56383,7 @@ double calculate_pfactor(const double* spectralField, long fieldTruncation, long
 void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv)
 {
   double power;
-  double *scale = (double *) malloc((trunc+1)*sizeof(double));
+  double *scale = (double*) malloc((trunc+1)*sizeof(double));
   int  n, m;
   int  index;
 
@@ -55850,7 +56442,7 @@ void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv)
 
 void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp)
 {
-  double *fphelp = (double *) malloc(nsp*sizeof(double));
+  double *fphelp = (double*) malloc(nsp*sizeof(double));
   int  m, n;
   int  index, inext;
 
@@ -55889,7 +56481,7 @@ void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp)
 
 void gatherComplex(double *fpdata, int pcStart, int trunc, int nsp)
 {
-  double *fphelp = (double *) malloc(nsp*sizeof(double));
+  double *fphelp = (double*) malloc(nsp*sizeof(double));
   int  m, n;
   int  index, inext;
 
@@ -56399,10 +56991,10 @@ int qu2reg2(double *pfield, int *kpoint, int klat, int klon,
    int iregno, iquano, j210, j220, j230, j240, j225;
 
 
-   zline = (double *) malloc(2*klon*sizeof(double));
+   zline = (double*) malloc(2*klon*sizeof(double));
    if ( zline == NULL ) SysError("No Memory!");
 
-   zwork = (double *) malloc(3*(2*klon+3)*sizeof(double));
+   zwork = (double*) malloc(3*(2*klon+3)*sizeof(double));
    if ( zwork == NULL ) SysError("No Memory!");
 
    /* Parameter adjustments */
@@ -56656,13 +57248,13 @@ C
    double *zwork = NULL;
    int iregno, iquano, j210, j220, j230, j240, j225;
 
-   ztemp = (double *) malloc(klon*klat*sizeof(double));
+   ztemp = (double*) malloc(klon*klat*sizeof(double));
    if ( ztemp == NULL ) SysError("No Memory!");
 
-   zline = (double *) malloc(2*klon*sizeof(double));
+   zline = (double*) malloc(2*klon*sizeof(double));
    if ( zline == NULL ) SysError("No Memory!");
 
-   zwork = (double *) malloc(3*(2*klon+3)*sizeof(double));
+   zwork = (double*) malloc(3*(2*klon+3)*sizeof(double));
    if ( zwork == NULL ) SysError("No Memory!");
 
    /* Parameter adjustments */
@@ -57148,10 +57740,10 @@ long packInt64(unsigned INT64 *up, unsigned char *cp, long bc, long tc)
 /* unpack 8-bit bytes from a packed buffer with 64-bit words */
 /* same as : for ( int i = 0; i < bc; ++i ) up[i] = (INT64) cp[i]; */
 
-long unpackInt64(unsigned char *cp, unsigned INT64 *up, long bc, long tc)
+long unpackInt64(const unsigned char *cp, unsigned INT64 *up, long bc, long tc)
 {
   U_BYTEORDER;
-  unsigned char *cp0;
+  const unsigned char *cp0;
   unsigned INT64 *up0;
   unsigned INT64 *ip0, *ip1, *ip2, *ip3, *ip4, *ip5, *ip6, *ip7;
   long head, trail, inner, i, j;
@@ -57350,10 +57942,10 @@ long packInt32(unsigned INT32 *up, unsigned char *cp, long bc, long tc)
 /* same as : for ( int i = 0; i < bc; ++i ) up[i] = (INT32) cp[i]; */
 
 #if  defined  (INT32)
-long unpackInt32(unsigned char *cp, unsigned INT32 *up, long bc, long tc)
+long unpackInt32(const unsigned char *cp, unsigned INT32 *up, long bc, long tc)
 {
   U_BYTEORDER;
-  unsigned char *cp0;
+  const unsigned char *cp0;
   unsigned INT32 *up0;
   unsigned INT32 *ip0, *ip1, *ip2, *ip3;
   long head, trail, inner, i, j;
@@ -58524,7 +59116,7 @@ void repair1(unsigned char *gbuf, long gbufsize)
       long nelem;
       unsigned char *pbuf;
       nelem = sourceLen/3;
-      pbuf = (unsigned char *) malloc(sourceLen);
+      pbuf = (unsigned char*) malloc(sourceLen);
       for ( i = 0; i < nelem; i++ )
 	{
 	  pbuf[3*i  ] = source[        i];
@@ -58784,7 +59376,7 @@ int  gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
       {
 	long nelem;
 	nelem = sourceLen/3;
-	pbuf = (unsigned char *) malloc(sourceLen);
+	pbuf = (unsigned char*) malloc(sourceLen);
 	for ( i = 0; i < nelem; i++ )
 	  {
 	    pbuf[        i] = source[3*i  ];
@@ -59123,7 +59715,7 @@ int  gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
 	long nelem;
 	unsigned char *pbuf;
 	nelem = tmpLen/3;
-	pbuf = (unsigned char *) malloc(tmpLen);
+	pbuf = (unsigned char*) malloc(tmpLen);
 	for ( i = 0; i < nelem; i++ )
 	  {
 	    pbuf[3*i  ] = dest[        i];
@@ -59204,7 +59796,7 @@ int  gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
 
   return (gribLen);
 }
-static const char grb_libvers[] = "1.6.3" " of ""Jan  8 2014"" ""19:55:18";
+static const char grb_libvers[] = "1.6.4" " of ""Jun 27 2014"" ""14:00:04";
 const char *
 cgribexLibraryVersion(void)
 {
@@ -59959,7 +60551,7 @@ static const union namespaceSwitchValue defaultSwitches[NUM_NAMESPACE_SWITCH] =
     }
 #endif
 
-struct namespace
+struct Namespace
 {
   statusCode resStage;
   union namespaceSwitchValue switches[NUM_NAMESPACE_SWITCH];
@@ -59991,7 +60583,7 @@ struct namespace
 #endif
 };
 
-struct namespace *namespaces = &initialNamespace;
+struct Namespace *namespaces = &initialNamespace;
 
 static int namespacesSize = 1;
 
@@ -60082,8 +60674,7 @@ namespaceNew()
   else if (namespacesSize == 1)
     {
       /* make room for additional namespace */
-      struct namespace *newNameSpaces
-        = xmalloc((namespacesSize + 1) * sizeof (namespaces[0]));
+      struct Namespace *newNameSpaces = (struct Namespace*) xmalloc((namespacesSize + 1) * sizeof (namespaces[0]));
       memcpy(newNameSpaces, namespaces, sizeof (namespaces[0]));
       namespaces = newNameSpaces;
       ++namespacesSize;
@@ -60093,8 +60684,7 @@ namespaceNew()
     {
       /* make room for additional namespace */
       newNamespaceID = namespacesSize;
-      namespaces
-        = xrealloc(namespaces, (namespacesSize + 1) * sizeof (namespaces[0]));
+      namespaces = (struct Namespace*) xrealloc(namespaces, (namespacesSize + 1) * sizeof (namespaces[0]));
       ++namespacesSize;
     }
   else /* implicit: namespacesSize >= NUM_NAMESPACES */
@@ -60149,17 +60739,17 @@ int namespaceGetActive ()
   return activeNamespace;
 }
 
-int namespaceAdaptKey ( int key, int nspTarget )
+int namespaceAdaptKey ( int originResH, int originNamespace )
 {
   namespaceTuple_t tin;
   int nsp;
 
-  if ( key == CDI_UNDEFID ) return CDI_UNDEFID;
+  if ( originResH == CDI_UNDEFID ) return CDI_UNDEFID;
 
-  tin.idx = key & idxmask;
-  tin.nsp = (int)(((unsigned)( key & nspmask )) >> idxbits);
+  tin.idx = originResH & idxmask;
+  tin.nsp = (int)(((unsigned)( originResH & nspmask )) >> idxbits);
 
-  xassert ( tin.nsp == nspTarget );
+  xassert ( tin.nsp == originNamespace );
 
   nsp = namespaceGetActive ();
 
@@ -60167,15 +60757,15 @@ int namespaceAdaptKey ( int key, int nspTarget )
 }
 
 
-int namespaceAdaptKey2 ( int key )
+int namespaceAdaptKey2 ( int originResH )
 {
   namespaceTuple_t tin;
   int nsp;
 
-  if ( key == CDI_UNDEFID ) return CDI_UNDEFID;
+  if ( originResH == CDI_UNDEFID ) return CDI_UNDEFID;
 
-  tin.idx = key & idxmask;
-  tin.nsp = (int)(((unsigned)( key & nspmask )) >> idxbits);
+  tin.idx = originResH & idxmask;
+  tin.nsp = (int)(((unsigned)( originResH & nspmask )) >> idxbits);
 
   nsp = namespaceGetActive ();
 
@@ -60341,7 +60931,33 @@ enum { MIN_LIST_SIZE = 128 };
 
 static void listInitialize(void);
 
-// ATTENTION: not thread safe yet, namespaces are set in model!
+typedef struct listElem {
+  union
+  {
+    /* free-list management data */
+    struct
+    {
+      int next, prev;
+    } free;
+    /* holding an actual value */
+    struct
+    {
+      const resOps *ops;
+      void         *val;//ptr
+    } v;
+  } res;
+  int           status;
+} listElem_t;
+
+struct resHList_t
+{
+  int size, freeHead, hasDefaultRes;
+  listElem_t *resources;
+};
+
+static struct resHList_t *resHList;
+
+static int resHListSize = 0;
 
 #if  defined  (HAVE_LIBPTHREAD)
 #  include <pthread.h>
@@ -60351,7 +60967,15 @@ static pthread_mutex_t listMutex;
 
 #  define LIST_LOCK()         pthread_mutex_lock(&listMutex)
 #  define LIST_UNLOCK()       pthread_mutex_unlock(&listMutex)
-#  define LIST_INIT()         pthread_once(&listInitThread, listInitialize)
+#  define LIST_INIT(init0)         do {                         \
+    pthread_once(&listInitThread, listInitialize);              \
+    pthread_mutex_lock(&listMutex);                             \
+    if ((init0) && (!resHList || !resHList[0].resources))       \
+      reshListCreate(0);                                        \
+    pthread_mutex_unlock(&listMutex);                           \
+  } while (0)
+
+
 
 #else
 
@@ -60359,33 +60983,18 @@ static int listInit = 0;
 
 #  define LIST_LOCK()
 #  define LIST_UNLOCK()
-#  define LIST_INIT()        do {                               \
+#  define LIST_INIT(init0)        do {                          \
   if ( !listInit )                                              \
     {                                                           \
       listInitialize();                                         \
+      if ((init0) && (!resHList || !resHList[0].resources))     \
+        reshListCreate(0);                                      \
       listInit = 1;                                             \
     }                                                           \
   } while(0)
 
 #endif
 
-
-typedef struct listElem {
-  cdiResH       resH;//idx
-  int next;
-  resOps      * ops;
-  void        * val;//ptr
-  int           status;
-} listElem_t;
-
-static struct
-{
-  int size, freeHead;
-  listElem_t *resources;
-} *resHList;
-
-static int resHListSize = 0;
-
 /**************************************************************/
 
 static void
@@ -60394,20 +61003,23 @@ listInitResources(int nsp)
   xassert(nsp < resHListSize && nsp >= 0);
   int size = resHList[nsp].size = MIN_LIST_SIZE;
   xassert(resHList[nsp].resources == NULL);
-  resHList[nsp].resources = xcalloc(MIN_LIST_SIZE, sizeof (listElem_t));
+  resHList[nsp].resources = (listElem_t*) xcalloc(MIN_LIST_SIZE, sizeof(listElem_t));
   listElem_t *p = resHList[nsp].resources;
 
   for (int i = 0; i < size; i++ )
     {
-      p[i].resH   = namespaceIdxEncode2(nsp, i);
-      p[i].next   = i + 1;
-      p[i].ops    = NULL;
-      p[i].val    = NULL;
-      p[i].status = RESH_UNDEFID;
+      p[i].res.free.next = i + 1;
+      p[i].res.free.prev = i - 1;
+      p[i].status = RESH_UNUSED;
     }
 
-  p[resHList[nsp].size-1].next = -1;
+  p[size-1].res.free.next = -1;
   resHList[nsp].freeHead = 0;
+  int oldNsp = namespaceGetActive();
+  namespaceSetActive(nsp);
+  instituteDefaultEntries();
+  modelDefaultEntries();
+  namespaceSetActive(oldNsp);
 }
 
 static inline void
@@ -60421,10 +61033,11 @@ reshListClearEntry(int i)
 void
 reshListCreate(int namespaceID)
 {
+  LIST_INIT(namespaceID != 0);
   LIST_LOCK();
   if (resHListSize <= namespaceID)
     {
-      resHList = xrealloc(resHList, (namespaceID + 1) * sizeof (resHList[0]));
+      resHList = (struct resHList_t*) xrealloc(resHList, (namespaceID + 1) * sizeof (resHList[0]));
       for (int i = resHListSize; i <= namespaceID; ++i)
         reshListClearEntry(i);
       resHListSize = namespaceID + 1;
@@ -60439,7 +61052,6 @@ reshListCreate(int namespaceID)
 void
 reshListDestruct(int namespaceID)
 {
-  LIST_INIT();
   LIST_LOCK();
   xassert(resHList && namespaceID >= 0 && namespaceID < resHListSize);
   int callerNamespaceID = namespaceGetActive();
@@ -60449,8 +61061,8 @@ reshListDestruct(int namespaceID)
       for ( int j = 0; j < resHList[namespaceID].size; j++ )
         {
           listElem_t *listElem = resHList[namespaceID].resources + j;
-          if (listElem->val)
-            listElem->ops->valDestroy(listElem->val);
+          if (listElem->status != RESH_UNUSED)
+            listElem->res.v.ops->valDestroy(listElem->res.v.val);
         }
       free(resHList[namespaceID].resources);
       reshListClearEntry(namespaceID);
@@ -60464,9 +61076,9 @@ reshListDestruct(int namespaceID)
 static void listDestroy ( void )
 {
   LIST_LOCK();
-  for (int i = 0; i < resHListSize; ++i)
-    if (resHList[i].resources)
-      namespaceDelete(i);
+  for (int i = resHListSize; i > 0; --i)
+    if (resHList[i-1].resources)
+      namespaceDelete(i-1);
   free(resHList);
   resHList = NULL;
   cdiReset();
@@ -60486,8 +61098,6 @@ void listInitialize ( void )
   pthread_mutex_init ( &listMutex, &ma);
   pthread_mutexattr_destroy(&ma);
 #endif
-  // create default namespace
-  reshListCreate(0);
   /* file is special and has its own table, which needs to be
    * created, before we register the listDestroy exit handler */
   {
@@ -60497,7 +61107,6 @@ void listInitialize ( void )
       fileClose_serial(null_id);
   }
   atexit ( listDestroy );
-
 }
 
 /**************************************************************/
@@ -60509,47 +61118,55 @@ void listSizeExtend()
   int oldSize = resHList[nsp].size;
   int newListSize = oldSize + MIN_LIST_SIZE;
 
-  resHList[nsp].resources =
-    xrealloc(resHList[nsp].resources,
-             newListSize * sizeof (resHList[0].resources[0]));
+  resHList[nsp].resources = (listElem_t*) xrealloc(resHList[nsp].resources,
+                                                   newListSize * sizeof(listElem_t));
 
+  listElem_t *r = resHList[nsp].resources;
   for (int i = oldSize; i < newListSize; ++i)
     {
-      resHList[nsp].resources[i].resH   = namespaceIdxEncode2 ( nsp, i );
-      resHList[nsp].resources[i].next   = i + 1;
-      resHList[nsp].resources[i].ops    = NULL;
-      resHList[nsp].resources[i].val    = NULL;
-      resHList[nsp].resources[i].status = RESH_UNDEFID;
+      r[i].res.free.next = i + 1;
+      r[i].res.free.prev = i - 1;
+      r[i].status = RESH_UNUSED;
     }
 
-  resHList[nsp].resources[newListSize-1].next = resHList[nsp].freeHead;
+  if (resHList[nsp].freeHead != -1)
+    r[resHList[nsp].freeHead].res.free.next
+      = newListSize - 1;
+  r[newListSize-1].res.free.next = resHList[nsp].freeHead;
+  r[oldSize].res.free.prev = -1;
   resHList[nsp].freeHead = oldSize;
   resHList[nsp].size = newListSize;
 }
 
 /**************************************************************/
 
-int reshPut ( void *p, resOps *ops )
+static void
+reshPut_(int nsp, int entry, void *p, const resOps *ops)
 {
-  cdiResH resH = -1, nsp;
-  listElem_t * newListElem;
+  listElem_t *newListElem = resHList[nsp].resources + entry;
+  int next = newListElem->res.free.next;
+  if (next != -1)
+    resHList[nsp].resources[next].res.free.prev = -1;
+  resHList[nsp].freeHead = next;
+  newListElem->res.v.val = p;
+  newListElem->res.v.ops = ops;
+  newListElem->status = RESH_ASSIGNED;
+}
 
+int reshPut ( void *p, const resOps *ops )
+{
   xassert ( p && ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
-  nsp = namespaceGetActive ();
+  int nsp = namespaceGetActive ();
 
   if ( resHList[nsp].freeHead == -1) listSizeExtend();
-  newListElem               = resHList[nsp].resources + resHList[nsp].freeHead;
-  resHList[nsp].freeHead    = newListElem->next;
-  newListElem->next         = -1;
-  resH                      = newListElem->resH;
-  newListElem->val          = p;
-  newListElem->ops          = ops;
-  newListElem->status       = ASSIGNED;
+  int entry = resHList[nsp].freeHead;
+  cdiResH resH = namespaceIdxEncode2(nsp, entry);
+  reshPut_(nsp, entry, p, ops);
 
   LIST_UNLOCK();
 
@@ -60558,12 +61175,24 @@ int reshPut ( void *p, resOps *ops )
 
 /**************************************************************/
 
-void reshRemove ( cdiResH resH, resOps * ops )
+static void
+reshRemove_(int nsp, int idx)
+{
+  int curFree = resHList[nsp].freeHead;
+  listElem_t *r = resHList[nsp].resources;
+  r[idx].res.free.next = curFree;
+  if (curFree != -1)
+    r[curFree].res.free.prev = idx;
+  r[idx].status = RESH_UNUSED;
+  resHList[nsp].freeHead = idx;
+}
+
+void reshRemove ( cdiResH resH, const resOps * ops )
 {
   int nsp;
   namespaceTuple_t nspT;
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -60571,32 +61200,49 @@ void reshRemove ( cdiResH resH, resOps * ops )
 
   nspT = namespaceResHDecode ( resH );
 
-  xassert ( nspT.nsp == nsp &&
-            nspT.idx >= 0 &&
-            nspT.idx < resHList[nsp].size &&
-            resHList[nsp].resources[nspT.idx].ops &&
-            resHList[nsp].resources[nspT.idx].ops == ops );
+  xassert ( nspT.nsp == nsp
+            && nspT.idx >= 0
+            && nspT.idx < resHList[nsp].size
+            && resHList[nsp].resources[nspT.idx].status != RESH_UNUSED
+            && resHList[nsp].resources[nspT.idx].res.v.ops
+            && resHList[nsp].resources[nspT.idx].res.v.ops == ops );
 
-  resHList[nsp].resources[nspT.idx].next   = resHList[nsp].freeHead;
-  resHList[nsp].resources[nspT.idx].ops    = NULL;
-  resHList[nsp].resources[nspT.idx].val    = NULL;
-  resHList[nsp].resources[nspT.idx].status = RESH_UNDEFID;
-  resHList[nsp].freeHead                   = nspT.idx;
+  reshRemove_(nsp, nspT.idx);
 
   LIST_UNLOCK();
 }
 
 /**************************************************************/
 
+void reshReplace(cdiResH resH, void *p, const resOps *ops)
+{
+  xassert(p && ops);
+  LIST_INIT(1);
+  LIST_LOCK();
+  int nsp = namespaceGetActive();
+  namespaceTuple_t nspT = namespaceResHDecode(resH);
+  while (resHList[nsp].size <= nspT.idx)
+    listSizeExtend();
+  listElem_t *q = resHList[nsp].resources + nspT.idx;
+  if (q->status != RESH_UNUSED)
+    {
+      q->res.v.ops->valDestroy(q->res.v.val);
+      reshRemove_(nsp, nspT.idx);
+    }
+  reshPut_(nsp, nspT.idx, p, ops);
+  LIST_UNLOCK();
+}
+
+
 static listElem_t *
-reshGetElem(const char *caller, cdiResH resH, resOps *ops)
+reshGetElem(const char *caller, cdiResH resH, const resOps *ops)
 {
   listElem_t *listElem;
   int nsp;
   namespaceTuple_t nspT;
   xassert ( ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -60618,39 +61264,36 @@ reshGetElem(const char *caller, cdiResH resH, resOps *ops)
               nspT.nsp, nspT.idx, (int)resH, nsp, resHList[nsp].size);
     }
 
-  if ( !(listElem && listElem->ops == ops) )
+  if ( !(listElem && listElem->res.v.ops == ops) )
     xabortC(caller, "Invalid resource handle %d, list element not found!",
             (int)resH);
   return listElem;
 }
 
 
-void *reshGetValue(const char * caller, cdiResH resH, resOps * ops)
+void *reshGetValue(const char * caller, cdiResH resH, const resOps * ops)
 {
-  return reshGetElem(caller, resH, ops)->val;
+  return reshGetElem(caller, resH, ops)->res.v.val;
 }
 
 /**************************************************************/
 
-void reshGetResHListOfType ( int c, int * resHs, resOps * ops )
+void reshGetResHListOfType ( int c, int * resHs, const resOps * ops )
 {
   int i, j = 0, nsp;
 
   xassert ( resHs && ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   nsp = namespaceGetActive ();
 
-  for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val && resHList[nsp].resources[i].ops )
-      if ( resHList[nsp].resources[i].ops == ops )
-        {
-          resHs[j++] = namespaceIdxEncode2 ( nsp, i );
-          if ( j == c ) break;
-        }
+  for ( i = 0; i < resHList[nsp].size && j < c; i++ )
+    if (resHList[nsp].resources[i].status != RESH_UNUSED
+        && resHList[nsp].resources[i].res.v.ops == ops)
+      resHs[j++] = namespaceIdxEncode2(nsp, i);
 
   LIST_UNLOCK();
 }
@@ -60661,16 +61304,17 @@ cdiResHApply(enum cdiApplyRet (*func)(int id, void *res, const resOps *p,
 {
   xassert(func);
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   int nsp = namespaceGetActive ();
   enum cdiApplyRet ret = CDI_APPLY_GO_ON;
   for (int i = 0; i < resHList[nsp].size && ret > 0; ++i)
-    if (resHList[nsp].resources[i].val && resHList[nsp].resources[i].ops)
-      ret = func(namespaceIdxEncode2(nsp, i), resHList[nsp].resources[i].val,
-                 resHList[nsp].resources[i].ops, data);
+    if (resHList[nsp].resources[i].status != RESH_UNUSED)
+      ret = func(namespaceIdxEncode2(nsp, i),
+                 resHList[nsp].resources[i].res.v.val,
+                 resHList[nsp].resources[i].res.v.ops, data);
   LIST_UNLOCK();
   return ret;
 }
@@ -60683,16 +61327,16 @@ cdiResHFilterApply(const resOps *p,
 {
   xassert(p && func);
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   int nsp = namespaceGetActive ();
   enum cdiApplyRet ret = CDI_APPLY_GO_ON;
+  listElem_t *r = resHList[nsp].resources;
   for (int i = 0; i < resHList[nsp].size && ret > 0; ++i)
-    if (resHList[nsp].resources[i].val && resHList[nsp].resources[i].ops
-        && resHList[nsp].resources[i].ops == p)
-      ret = func(namespaceIdxEncode2(nsp, i), resHList[nsp].resources[i].val,
+    if (r[i].status != RESH_UNUSED && r[i].res.v.ops == p)
+      ret = func(namespaceIdxEncode2(nsp, i), r[i].res.v.val,
                  data);
   LIST_UNLOCK();
   return ret;
@@ -60703,22 +61347,21 @@ cdiResHFilterApply(const resOps *p,
 
 /**************************************************************/
 
-int reshCountType ( resOps * ops )
+int reshCountType ( const resOps * ops )
 {
   int i, nsp, countType = 0;
 
   xassert ( ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   nsp = namespaceGetActive ();
 
+  listElem_t *r = resHList[nsp].resources;
   for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val )
-      if ( resHList[nsp].resources[i].ops == ops )
-        countType++;
+    countType += (r[i].status != RESH_UNUSED && r[i].res.v.ops == ops);
 
   LIST_UNLOCK();
 
@@ -60728,18 +61371,18 @@ int reshCountType ( resOps * ops )
 /**************************************************************/
 
 int
-reshResourceGetPackSize(int resH, resOps *ops, void *context)
+reshResourceGetPackSize(int resH, const resOps *ops, void *context)
 {
   listElem_t *curr = reshGetElem(__func__, resH, ops);
-  return curr->ops->valGetPackSize(curr->val, context);
+  return curr->res.v.ops->valGetPackSize(curr->res.v.val, context);
 }
 
 void
-reshPackResource(int resH, resOps *ops,
+reshPackResource(int resH, const resOps *ops,
                  void *buf, int buf_size, int *position, void *context)
 {
   listElem_t *curr = reshGetElem(__func__, resH, ops);
-  curr->ops->valPack(curr->val, buf, buf_size, position, context);
+  curr->res.v.ops->valPack(curr->res.v.val, buf, buf_size, position, context);
 }
 
 
@@ -60747,26 +61390,24 @@ static int getPackBufferSize(void *context)
 {
   int nsp, i;
   int intpacksize, packBufferSize = 0;
-  listElem_t * curr;
 
   nsp = namespaceGetActive ();
 
   /* pack start marker, namespace and sererator marker */
-  packBufferSize += (intpacksize = serializeGetSize(3, DATATYPE_INT, context));
+  packBufferSize += 3 * (intpacksize = serializeGetSize(1, DATATYPE_INT, context));
 
   /* pack resources, type marker and seperator marker */
-  for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val )
-      if ( resHList[nsp].resources[i].status == ASSIGNED )
-        {
-          curr = resHList[nsp].resources + i;
-          xassert ( curr->ops );
-
-          /* message plus frame of 2 ints */
-          packBufferSize += curr->ops->valGetPackSize(curr->val, context)
-            + 2 * intpacksize;
-        }
+  listElem_t *r = resHList[nsp].resources;
+  for ( i = 0; i < resHList[nsp].size; i++)
+    if (r[i].status == RESH_ASSIGNED)
+      {
+        xassert ( r[i].res.v.ops );
 
+        /* message plus frame of 2 ints */
+        packBufferSize +=
+          r[i].res.v.ops->valGetPackSize(r[i].res.v.val, context)
+          + 2 * intpacksize;
+      }
   /* end marker */
   packBufferSize += intpacksize;
 
@@ -60786,7 +61427,6 @@ void reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
 {
   int i, packBufferPos = 0;
   int start = START, end = END, sep = SEPARATOR, type;
-  listElem_t * curr;
 
   xassert ( packBuffer );
 
@@ -60795,33 +61435,34 @@ void reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
   int nsp = namespaceGetActive ();
 
   int pBSize = *packBufferSize = getPackBufferSize(context);
-  char *pB = *packBuffer = xcalloc(1, *packBufferSize);
+  char *pB = *packBuffer = (char*) xcalloc(1, *packBufferSize);
 
   {
     int header[3] = { start, nsp, sep };
     serializePack(header, 3,  DATATYPE_INT, pB, pBSize, &packBufferPos, context);
   }
 
+  listElem_t *r = resHList[nsp].resources;
   for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val )
-      if ( resHList[nsp].resources[i].status == ASSIGNED )
-        {
-          curr = resHList[nsp].resources + i;
-          xassert ( curr->ops );
+    if ( r[i].status == RESH_ASSIGNED)
+      {
+        listElem_t * curr = r + i;
+        xassert ( curr->res.v.ops );
 
-          type = curr->ops->valTxCode ();
+        type = curr->res.v.ops->valTxCode ();
 
-          if ( ! type ) continue;
+        if ( ! type ) continue;
 
-          serializePack( &type, 1, DATATYPE_INT, * packBuffer,
-			    * packBufferSize, &packBufferPos, context);
+        serializePack( &type, 1, DATATYPE_INT, * packBuffer,
+                       * packBufferSize, &packBufferPos, context);
 
-          curr->ops->valPack(curr->val, pB, pBSize, &packBufferPos, context);
+        curr->res.v.ops->valPack(curr->res.v.val,
+                                 pB, pBSize, &packBufferPos, context);
 
-          serializePack(&sep, 1, DATATYPE_INT, pB, pBSize, &packBufferPos, context);
+        serializePack(&sep, 1, DATATYPE_INT, pB, pBSize, &packBufferPos, context);
 
-          curr->status = CLOSED;
-        }
+        curr->status = RESH_CLOSED;
+      }
 
   LIST_UNLOCK();
 
@@ -60832,15 +61473,15 @@ void reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
 
 /* for thread safety this feature would have to be integrated in reshPut */
 
-void reshSetStatus ( cdiResH resH, resOps * ops, int status )
+void reshSetStatus ( cdiResH resH, const resOps * ops, int status )
 {
   int nsp;
   namespaceTuple_t nspT;
   listElem_t * listElem;
 
-  xassert ( ops );
+  xassert(ops && status != RESH_UNUSED);
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -60855,7 +61496,7 @@ void reshSetStatus ( cdiResH resH, resOps * ops, int status )
   listElem = resHList[nsp].resources + nspT.idx;
 
   xassert ( listElem &&
-            listElem->ops == ops );
+            listElem->res.v.ops == ops );
 
   listElem->status = status;
 
@@ -60864,15 +61505,14 @@ void reshSetStatus ( cdiResH resH, resOps * ops, int status )
 
 /**************************************************************/
 
-int reshGetStatus ( cdiResH resH, resOps * ops )
+int reshGetStatus ( cdiResH resH, const resOps * ops )
 {
   int nsp;
   namespaceTuple_t nspT;
-  listElem_t * listElem;
 
   xassert ( ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -60884,12 +61524,13 @@ int reshGetStatus ( cdiResH resH, resOps * ops )
             nspT.idx >= 0 &&
             nspT.idx < resHList[nsp].size );
 
-  listElem = resHList[nsp].resources + nspT.idx;
+  listElem_t *listElem = resHList[nsp].resources + nspT.idx;
+
+  const resOps *elemOps = listElem->res.v.ops;
 
   LIST_UNLOCK();
 
-  xassert ( listElem &&
-            listElem->ops == ops );
+  xassert(listElem && elemOps == ops);
 
   return listElem->status;
 }
@@ -60912,7 +61553,7 @@ void reshUnlock ()
 
 int reshListCompare ( int nsp0, int nsp1 )
 {
-  LIST_INIT();
+  LIST_INIT(1);
   LIST_LOCK();
 
   xassert(resHListSize > nsp0 && resHListSize > nsp1 &&
@@ -60925,33 +61566,34 @@ int reshListCompare ( int nsp0, int nsp1 )
     *resources1 = resHList[nsp1].resources;
   for (i = 0; i < listSizeMin; i++)
     {
-      int occupied0 = resources0[i].val != NULL,
-        occupied1 = resources1[i].val != NULL;
+      int occupied0 = resources0[i].status != RESH_UNUSED,
+        occupied1 = resources1[i].status != RESH_UNUSED;
       /* occupation mismatch ? */
       int diff = occupied0 ^ occupied1;
       valCompare |= (diff << cdiResHListOccupationMismatch);
       if (!diff && occupied0)
         {
           /* both occupied, do resource types match? */
-          diff = (resources0[i].ops != resources1[i].ops
-                  || resources0[i].ops == NULL);
+          diff = (resources0[i].res.v.ops != resources1[i].res.v.ops
+                  || resources0[i].res.v.ops == NULL);
           valCompare |= (diff << cdiResHListResourceTypeMismatch);
           if (!diff)
             {
               /* types match, does content match also? */
-              diff = resources0[i].ops->valCompare(resources0[i].val,
-                                                   resources1[i].val);
+              diff
+                = resources0[i].res.v.ops->valCompare(resources0[i].res.v.val,
+                                                      resources1[i].res.v.val);
               valCompare |= (diff << cdiResHListResourceContentMismatch);
             }
         }
     }
   /* find resources in nsp 0 beyond end of nsp 1 */
   for (int j = listSizeMin; j < resHList[nsp0].size; ++j)
-    valCompare |= ((resources0[j].val != NULL)
+    valCompare |= ((resources0[j].status != RESH_UNUSED)
                    << cdiResHListOccupationMismatch);
   /* find resources in nsp 1 beyond end of nsp 0 */
   for (; i < resHList[nsp1].size; ++i)
-    valCompare |= ((resources1[i].val != NULL)
+    valCompare |= ((resources1[i].status != RESH_UNUSED)
                    << cdiResHListOccupationMismatch);
 
   LIST_UNLOCK();
@@ -60966,7 +61608,7 @@ void reshListPrint(FILE *fp)
   int i, j, temp;
   listElem_t * curr;
 
-  LIST_INIT();
+  LIST_INIT(1);
 
 
   temp = namespaceGetActive ();
@@ -60990,9 +61632,9 @@ void reshListPrint(FILE *fp)
       for ( j = 0; j < resHList[i].size; j++ )
         {
           curr = resHList[i].resources + j;
-          if ( curr->ops && curr->val )
+          if (curr->status != RESH_UNUSED)
             {
-              curr->ops->valPrint (( void * ) curr->val, fp );
+              curr->res.v.ops->valPrint(curr->res.v.val, fp);
               fprintf ( fp, "\n" );
             }
         }
@@ -61013,8 +61655,7 @@ void reshListPrint(FILE *fp)
  * require-trailing-newline: t
  * End:
  */
-   static char cdi_libvers[] = "1.6.3" " of ""Feb 12 2014"" ""10:17:39";
-char *cdiLibraryVersion(void);
+   static char cdi_libvers[] = "1.6.4" " of ""Jun 27 2014"" ""14:11:36";
 char *cdiLibraryVersion(void)
 {
   return (cdi_libvers);
@@ -61501,7 +62142,13 @@ for (i=0; i<sizeofcstr/elem_len; i++) {
 } return cstr; }
 
 /* kill the trailing char t's in string s. */
-#if defined (__GNUC__)
+#if !defined(GNUC_PUSH_POP) && defined(__GNUC__) && !defined(__ICC) && !defined(__clang__)
+#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 4)
+#define GNUC_PUSH_POP
+#endif
+#endif
+
+#if defined(GNUC_PUSH_POP)
 #pragma GCC push_options
 #pragma GCC optimize ("O2")
 #endif
@@ -61516,7 +62163,7 @@ if (e>s) {                           /* Need this to handle NULL string.*/
   while (e>s && *--e==t);            /* Don't follow t's past beginning. */
   e[*e==t?0:1] = '\0';               /* Handle s[0]=t correctly.       */
 } return s; }
-#if defined (__GNUC__)
+#if defined(GNUC_PUSH_POP)
 #pragma GCC pop_options
 #endif
 
@@ -62516,7 +63163,7 @@ do{VVCF(T1,A1,B1)  VVCF(T2,A2,B2)  VVCF(T3,A3,B3)  VVCF(T4,A4,B4)  VVCF(T5,A5,B5
 /* VOID breaks U into U and UU. */
 #define       INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
 #define      VOID_cfUU(T,A)             /* Needed for FORTRAN calls C sub.s.  */
-#define    STRING_cfUU(T,A) char *A 
+#define    STRING_cfUU(T,A) const char *A
 
 
 #define      BYTE_cfPU(A)   CFextern INTEGER_BYTE      FCALLSC_QUALIFIER A
@@ -63874,6 +64521,8 @@ FCALLSCSUB2 (taxisDefVdate, TAXISDEFVDATE, taxisdefvdate, INT, INT)
 FCALLSCSUB2 (taxisDefVtime, TAXISDEFVTIME, taxisdefvtime, INT, INT)
 FCALLSCSUB2 (taxisDefRdate, TAXISDEFRDATE, taxisdefrdate, INT, INT)
 FCALLSCSUB2 (taxisDefRtime, TAXISDEFRTIME, taxisdefrtime, INT, INT)
+FCALLSCSUB2 (taxisDefFdate, TAXISDEFFDATE, taxisdeffdate, INT, INT)
+FCALLSCSUB2 (taxisDefFtime, TAXISDEFFTIME, taxisdefftime, INT, INT)
 FCALLSCFUN1 (INT, taxisHasBounds, TAXISHASBOUNDS, taxishasbounds, INT)
 FCALLSCSUB1 (taxisDeleteBounds, TAXISDELETEBOUNDS, taxisdeletebounds, INT)
 FCALLSCSUB3 (taxisDefVdateBounds, TAXISDEFVDATEBOUNDS, taxisdefvdatebounds, INT, INT, INT)
@@ -63888,6 +64537,8 @@ FCALLSCFUN1 (INT, taxisInqVdate, TAXISINQVDATE, taxisinqvdate, INT)
 FCALLSCFUN1 (INT, taxisInqVtime, TAXISINQVTIME, taxisinqvtime, INT)
 FCALLSCFUN1 (INT, taxisInqRdate, TAXISINQRDATE, taxisinqrdate, INT)
 FCALLSCFUN1 (INT, taxisInqRtime, TAXISINQRTIME, taxisinqrtime, INT)
+FCALLSCFUN1 (INT, taxisInqFdate, TAXISINQFDATE, taxisinqfdate, INT)
+FCALLSCFUN1 (INT, taxisInqFtime, TAXISINQFTIME, taxisinqftime, INT)
 FCALLSCFUN1 (INT, taxisInqCalendar, TAXISINQCALENDAR, taxisinqcalendar, INT)
 FCALLSCFUN1 (INT, taxisInqTunit, TAXISINQTUNIT, taxisinqtunit, INT)
 FCALLSCFUN1 (INT, taxisInqNumavg, TAXISINQNUMAVG, taxisinqnumavg, INT)
diff --git a/libcdi/src/cdipioFortran.c b/libcdi/src/cdipioFortran.c
index ee16cb8..ffc8f14 100644
--- a/libcdi/src/cdipioFortran.c
+++ b/libcdi/src/cdipioFortran.c
@@ -14,10 +14,6 @@
 #  include "cfortran.h"
 #endif
 
-#if ! defined (_CDIFORTRAN_H)
-#  include "cdiFortran.h"
-#endif
-
 
 /*  parallel IO IOMode  */
 
@@ -29,8 +25,8 @@ FCALLSCSUB0 (pioEndTimestepping, PIOENDTIMESTEPPING, pioendtimestepping)
 FCALLSCSUB0 (pioFinalize, PIOFINALIZE, piofinalize)
 FCALLSCSUB0 (cdiPioNoPostCommSetup, CDIPIONOPOSTCOMMSETUP, cdipionopostcommsetup)
 
-#undef ROUTINE_5
-#define ROUTINE_5 (void (*)(void))
+#undef ROUTINE_6
+#define ROUTINE_6 (void (*)(void))
 static int pioInit_fwrap(int commSuper, int nProcsIO, int IOMode, int *pioNamespace, float partInflate, void (*postCommSetupActions)(void))
 {
   MPI_Comm v;
diff --git a/libcdi/src/cfortran.h b/libcdi/src/cfortran.h
index 03f3299..59a26d3 100644
--- a/libcdi/src/cfortran.h
+++ b/libcdi/src/cfortran.h
@@ -474,7 +474,13 @@ for (i=0; i<sizeofcstr/elem_len; i++) {
 } return cstr; }
 
 /* kill the trailing char t's in string s. */
-#if defined (__GNUC__)
+#if !defined(GNUC_PUSH_POP) && defined(__GNUC__) && !defined(__ICC) && !defined(__clang__)
+#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 4)
+#define GNUC_PUSH_POP
+#endif
+#endif
+
+#if defined(GNUC_PUSH_POP)
 #pragma GCC push_options
 #pragma GCC optimize ("O2")
 #endif
@@ -489,7 +495,7 @@ if (e>s) {                           /* Need this to handle NULL string.*/
   while (e>s && *--e==t);            /* Don't follow t's past beginning. */
   e[*e==t?0:1] = '\0';               /* Handle s[0]=t correctly.       */
 } return s; }
-#if defined (__GNUC__)
+#if defined(GNUC_PUSH_POP)
 #pragma GCC pop_options
 #endif
 
@@ -1489,7 +1495,7 @@ do{VVCF(T1,A1,B1)  VVCF(T2,A2,B2)  VVCF(T3,A3,B3)  VVCF(T4,A4,B4)  VVCF(T5,A5,B5
 /* VOID breaks U into U and UU. */
 #define       INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
 #define      VOID_cfUU(T,A)             /* Needed for FORTRAN calls C sub.s.  */
-#define    STRING_cfUU(T,A) char *A 
+#define    STRING_cfUU(T,A) const char *A
 
 
 #define      BYTE_cfPU(A)   CFextern INTEGER_BYTE      FCALLSC_QUALIFIER A
diff --git a/libcdi/src/cgribexlib.c b/libcdi/src/cgribexlib.c
index b062405..6e968f8 100644
--- a/libcdi/src/cgribexlib.c
+++ b/libcdi/src/cgribexlib.c
@@ -1,7 +1,7 @@
 
-/* Automatically generated by m214003 at 2014-01-08, do not edit */
+/* Automatically generated by m214003 at 2014-06-27, do not edit */
 
-/* CGRIBEXLIB_VERSION="1.6.3" */
+/* CGRIBEXLIB_VERSION="1.6.4" */
 
 #ifdef _ARCH_PWR6
 #pragma options nostrict
@@ -175,9 +175,9 @@ long   packInt32(unsigned INT32 *up, unsigned char *cp, long bc, long tc);
 #endif
 long   packInt64(unsigned INT64 *up, unsigned char *cp, long bc, long tc);
 #if  defined  (INT32)
-long   unpackInt32(unsigned char *cp, unsigned INT32 *up, long bc, long tc);
+long   unpackInt32(const unsigned char *cp, unsigned INT32 *up, long bc, long tc);
 #endif
-long   unpackInt64(unsigned char *cp, unsigned INT64 *up, long bc, long tc);
+long   unpackInt64(const unsigned char *cp, unsigned INT64 *up, long bc, long tc);
 
 void  gribEncode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
 		 double *fsec3, int *isec4, double *fsec4, int klenp, int *kgrib,
@@ -640,14 +640,16 @@ gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL minmax_val.c
   orig    : fmin: -500000  fmax: 499999  time:   4.84s
   sse2    : fmin: -500000  fmax: 499999  time:   4.82s
 
-gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL minmax_val.c
+gcc -g -Wall -O3 -march=native -std=c99 -DTEST_MINMAXVAL -fopenmp -DOMP_SIMD minmax_val.c
  result on thunder5 (gcc 4.7.2):
   orig    : fmin: -500000  fmax: 499999  time:   3.10s
+  simd    : fmin: -500000  fmax: 499999  time:   3.23s # omp simd in gcc 4.9
   avx     : fmin: -500000  fmax: 499999  time:   2.84s
 
-icc -g -Wall -O3 -march=native -std=c99 -vec-report=1 -DTEST_MINMAXVAL minmax_val.c
- result on thunder5 (icc 13.1.2):
+icc -g -Wall -O3 -march=native -std=c99 -vec-report=1 -DTEST_MINMAXVAL -openmp -DOMP_SIMD minmax_val.c
+ result on thunder5 (icc 14.0.2):
   orig    : fmin: -500000  fmax: 499999  time:   2.83s
+  simd    : fmin: -500000  fmax: 499999  time:   2.83s
   avx     : fmin: -500000  fmax: 499999  time:   2.92s
 
 xlc_r -g -O3 -qhot -q64 -qarch=auto -qtune=auto -qreport -DTEST_MINMAXVAL minmax_val.c
@@ -978,6 +980,43 @@ void minmax_val_orig(const double *restrict data, long idatasize, double *fmin,
 #pragma GCC pop_options
 #endif
 
+// TEST
+#if defined(OMP_SIMD)
+
+//#pragma omp declare reduction(xmin : double : omp_out = omp:in > omp_out ? omp_out : omp_in)
+// initializer( omp_priv = { largenumber })
+//#pragma omp declare reduction(xmax : double : omp_out = omp:in < omp_out ? omp_out : omp_in)
+// initializer( omp_priv = { -largenumber })
+
+#if defined(GNUC_PUSH_POP)
+#pragma GCC push_options
+#pragma GCC optimize ("O3", "fast-math")
+#endif
+static
+void minmax_val_simd(const double *restrict data, long idatasize, double *fmin, double *fmax)
+{
+  size_t i;
+  size_t datasize = idatasize;
+  double dmin = *fmin, dmax = *fmax;
+
+#if defined(_OPENMP)
+  //#pragma omp simd reduction(xmin:dmin) reduction(xmax:dmax)
+#pragma omp simd
+#endif
+  for ( i = 0; i < datasize; ++i )
+    {
+      dmin = dmin < data[i] ? dmin : data[i];
+      dmax = dmax > data[i] ? dmax : data[i];
+    }
+
+  *fmin = dmin;
+  *fmax = dmax;
+}
+#if defined(GNUC_PUSH_POP)
+#pragma GCC pop_options
+#endif
+#endif
+
 static
 void minmax_val(const double *restrict data, long idatasize, double *fmin, double *fmax)
 {
@@ -1083,6 +1122,10 @@ int main(void)
   double fmin, fmax;
   double t_begin, t_end;
 
+#if   defined(_OPENMP)
+  printf("_OPENMP=%d\n", _OPENMP);
+#endif
+
 #if   defined(__ICC)
   printf("icc\n");
 #elif defined(__clang__)
@@ -1091,9 +1134,12 @@ int main(void)
   printf("gcc\n");
 #endif
 
-  data = (double *) malloc(datasize*sizeof(double));
+  data = (double*) malloc(datasize*sizeof(double));
 
-  for ( long i = datasize-1; i >= 0; i-- ) data[i] = (double) (-datasize/2 + i);
+  // for ( long i = datasize-1; i >= 0; i-- ) data[i] = (double) (-datasize/2 + i);
+  for ( long i = 0; i < datasize/2; i++ )        data[i] = (double) (i);
+  for ( long i = datasize/2; i < datasize; i++ ) data[i] = (double) (-datasize + i);
+  // for ( long i = 0; i < datasize; i++ )    printf("%d %g\n", i, data[i]);
 
   t_begin = dtime();
   for ( int i = 0; i < NRUN; ++i )
@@ -1113,6 +1159,17 @@ int main(void)
   t_end = dtime();
   printf("orig      : fmin: %ld  fmax: %ld  time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin);
 
+#if defined(OMP_SIMD)
+  t_begin = dtime();
+  for ( int i = 0; i < NRUN; ++i )
+    {
+      fmin = fmax = data[0];
+      minmax_val_simd(data, datasize, &fmin, &fmax);
+    }
+  t_end = dtime();
+  printf("simd      : fmin: %ld  fmax: %ld  time: %6.2fs\n", (long)fmin, (long) fmax, t_end-t_begin);
+#endif
+
 #if defined(_ENABLE_AVX)
   t_begin = dtime();
   for ( int i = 0; i < NRUN; ++i )
@@ -1362,7 +1419,7 @@ void sse41_encode_double_array_2byte(size_t datasize,
 
   for (i = 0; i < (datasize-residual); i += 16)
     {
-      (void) _mm_prefetch(dval+8, _MM_HINT_NTA);
+      (void) _mm_prefetch((const char*)(dval+8), _MM_HINT_NTA);
       //_____________________________________________________________________________
 
       d0 = _mm_loadu_pd (dval);
@@ -1403,7 +1460,7 @@ void sse41_encode_double_array_2byte(size_t datasize,
 
       //_____________________________________________________________________________
 
-      (void) _mm_prefetch(dval+16, _MM_HINT_NTA);
+      (void) _mm_prefetch((const char*)(dval+16), _MM_HINT_NTA);
 
       //_____________________________________________________________________________
       
@@ -1951,8 +2008,8 @@ int main(void)
   double t_begin, t_end;
   unsigned char *lgrib;
 
-  data = (double *) malloc(datasize*sizeof(double));
-  lgrib = (unsigned char *)  malloc(2*datasize*sizeof(unsigned char));
+  data  = (double*) malloc(datasize*sizeof(double));
+  lgrib = (unsigned char*) malloc(2*datasize*sizeof(unsigned char));
 
   for ( long i = 0; i < datasize; ++i ) data[i] = (double) (-datasize/2 + i);
 
@@ -2319,8 +2376,8 @@ void decode_double_array_common2(const unsigned char * restrict igrib, long jlen
 } 
 
 static 
-void decode_double_array_byte(const unsigned char * restrict igrib, long jlend, int numBits, 
-			      double fmin, double zscale, double * restrict fpdata)
+void decode_double_array_byte(const unsigned char *restrict igrib, long jlend, int numBits, 
+			      double fmin, double zscale, double *restrict fpdata)
 {
 #if defined _GET_X86_COUNTER || defined _GET_MACH_COUNTER 
   uint64_t start_decode, end_decode;
@@ -2336,7 +2393,7 @@ void decode_double_array_byte(const unsigned char * restrict igrib, long jlend,
       long jlenc = jlend * numBits / 8;
       if ( jlenc > 0 ) 
 	{
-	  lgrib = (GRIBPACK *) malloc(jlenc*sizeof(GRIBPACK));
+	  lgrib = (GRIBPACK*) malloc(jlenc*sizeof(GRIBPACK));
 	  if ( lgrib == NULL ) SysError("No Memory!");
 
 	  (void) UNPACK_GRIB(igrib, lgrib, jlenc, -1L);
@@ -2484,8 +2541,6 @@ void decode_double_array_unrolled(const unsigned char * restrict igrib, long jle
 #undef _ENABLE_AVX
 #undef _ENABLE_SSE4_1
 
-#define  NINT(x)  ((x) < 0 ? (int)((x)-.5) : (int)((x)+.5))
-
 
 void confp3(double pval, int *kexp, int *kmant, int kbits, int kround)
 {
@@ -2637,14 +2692,14 @@ void confp3(double pval, int *kexp, int *kmant, int kbits, int kround)
       if ( isign == 0 )
 	*kmant = (int) rpowref;
       else
-	*kmant = NINT(rpowref + 0.5);
+	*kmant = lround(rpowref + 0.5);
     }
   else
     {
       /*  Closest number in GRIB format to the original number   */
       /*  (equal to, greater than or less than original number). */
 
-      *kmant = NINT(rpowref);
+      *kmant = lround(rpowref);
     }
 
   /*  Check that mantissa value does not exceed 24 bits. */
@@ -2694,14 +2749,14 @@ void confp3(double pval, int *kexp, int *kmant, int kbits, int kround)
 	  if ( isign == 0 )
 	    *kmant = (int) rpowref;
 	  else
-	    *kmant = NINT(rpowref + 0.5);
+	    *kmant = lround(rpowref + 0.5);
 	}
       else
 	{
 	  /*  Closest number in GRIB format to the original number */
 	  /*  (equal to, greater or less than original number). */
 
-	  *kmant = NINT(rpowref);
+	  *kmant = lround(rpowref);
 	}
 
       /*  Repeat calculation (with modified exponent) if still have */
@@ -3084,7 +3139,7 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
       fsec3dp[1] = fsec3sp[1];
 
       inum = isec4[0];
-      fsec4dp = (double *) malloc(inum*sizeof(double));
+      fsec4dp = (double*) malloc(inum*sizeof(double));
       if ( fsec4dp == NULL ) SysError("No Memory!");
 
       for ( j = 0; j < inum; j++ ) fsec4dp[j] = fsec4sp[j];
@@ -3097,8 +3152,11 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
     }
   else if ( yfunc == 'D' || yfunc == 'J' || yfunc == 'R' )
     {
-      fsec4dp = (double *) malloc(klenp*sizeof(double));
-      if ( fsec4dp == NULL ) SysError("No Memory!");
+      if ( yfunc == 'D' || yfunc == 'R' )
+	{
+	  fsec4dp = (double*) malloc(klenp*sizeof(double));
+	  if ( fsec4dp == NULL ) SysError("No Memory!");
+	}
 
       for ( j = 0; j < 10; j++ ) fsec2dp[j] = 0.0;
       for ( j = 0; j <  2; j++ ) fsec3dp[j] = 0.0;
@@ -3113,20 +3171,23 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
       fsec3sp[0] = fsec3dp[0];
       fsec3sp[1] = fsec3dp[1];
 
-      inum = isec4[0];
-      for ( j = 0; j < inum; j++ )
+      if ( yfunc == 'D' || yfunc == 'R' )
 	{
-	  if ( fsec4dp[j] > -FLT_MIN && fsec4dp[j] < FLT_MIN )
-	    fsec4sp[j] = 0;
-	  else if ( fsec4dp[j] > FLT_MAX )
-	    fsec4sp[j] = FLT_MAX;
-	  else if ( fsec4dp[j] < -FLT_MAX )
-	    fsec4sp[j] = -FLT_MAX;
-	  else
-	    fsec4sp[j] = fsec4dp[j];
-	}
+	  inum = isec4[0];
+	  for ( j = 0; j < inum; j++ )
+	    {
+	      if ( fsec4dp[j] > -FLT_MIN && fsec4dp[j] < FLT_MIN )
+		fsec4sp[j] = 0;
+	      else if ( fsec4dp[j] > FLT_MAX )
+		fsec4sp[j] = FLT_MAX;
+	      else if ( fsec4dp[j] < -FLT_MAX )
+		fsec4sp[j] = -FLT_MAX;
+	      else
+		fsec4sp[j] = fsec4dp[j];
+	    }
 
-      free(fsec4dp);
+	  free(fsec4dp);
+	}
     }
   else if ( yfunc == 'V' )
     fprintf(stderr, " c-gribex: Version is %s\n", cgribexLibraryVersion());
@@ -4415,7 +4476,7 @@ void gribPrintSec2SP(int *isec0, int *isec2, float  *fsec2sp)
 
   inum = 10 + isec2[11];
 
-  fsec2 = (double *) malloc(inum*sizeof(double));
+  fsec2 = (double*) malloc(inum*sizeof(double));
   if ( fsec2 == NULL ) SysError("No Memory!");
 
   for ( j = 0; j < inum; j++ )
@@ -5178,7 +5239,7 @@ void encodeBMS(GRIBPACK *lGrib, long *gribLen, double *fsec3, int *isec4, double
   fsec4size = 0;
 
 #if defined (VECTORCODE)
-  imask = (unsigned int *) malloc(imaskSize*sizeof(int));
+  imask = (unsigned int*) malloc(imaskSize*sizeof(unsigned int));
   memset(imask, 0, imaskSize*sizeof(int));
 
 #if defined (CRAY)
@@ -5454,19 +5515,18 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
 	}
     }
 
-  max_nbpv_pow2 = (unsigned int) (intpow2(nbpv) - 1);
+  //max_nbpv_pow2 = (unsigned) (intpow2(nbpv) - 1);
+  max_nbpv_pow2 = (unsigned) ((1ULL << nbpv) - 1);
 
   if ( binscale != 0 )
     {
       if ( binscale < 0 )
 	{
-	  if ( (unsigned int)(range*intpow2(-binscale)+0.5) > max_nbpv_pow2 )
-	    binscale++;
+	  if ( (unsigned)(range*intpow2(-binscale)+0.5) > max_nbpv_pow2 ) binscale++;
 	}
       else
 	{
-	  if ( (unsigned int)(range/intpow2(binscale)+0.5) > max_nbpv_pow2 )
-	    binscale--;
+	  if ( (unsigned)(range/intpow2(binscale)+0.5) > max_nbpv_pow2 ) binscale--;
 	}
 
       if ( binscale < 0 ) factor =     intpow2(-binscale);
@@ -5552,7 +5612,7 @@ void gribEncode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
   if ( bmsIncluded ) len += (klenp+7)>>3;
 
 #if defined (VECTORCODE)
-  lGrib = (GRIBPACK *) malloc(len*sizeof(GRIBPACK));
+  lGrib = (GRIBPACK*) malloc(len*sizeof(GRIBPACK));
   if ( lGrib == NULL ) SysError("No Memory!");
 #else
   lGrib = CGrib;
@@ -6116,7 +6176,7 @@ int decodeGDS(unsigned char  *gds, int *isec0, int *isec2, double *fsec2, int *n
 	}
 #if defined (SX)
       lGribLen = 4*ISEC2_NumVCP;	      
-      lgrib    = (GRIBPACK *) malloc(lGribLen*sizeof(GRIBPACK));
+      lgrib    = (GRIBPACK*) malloc(lGribLen*sizeof(GRIBPACK));
 
       igrib = &gds[locnv];
       if ( ISEC2_NumVCP > 0 ) (void) UNPACK_GRIB(igrib, lgrib, lGribLen, -1L);
@@ -6660,7 +6720,7 @@ void gribDecode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
 	    }
 	  */
 
-	  imask = (GRIBPACK *) malloc(imaskSize*sizeof(GRIBPACK));
+	  imask = (GRIBPACK*) malloc(imaskSize*sizeof(GRIBPACK));
 
 #if defined (VECTORCODE)
 	  (void) UNPACK_GRIB(BMS_Bitmap, imask, imaskSize/8, -1L);
@@ -7425,7 +7485,7 @@ double calculate_pfactor(const double* spectralField, long fieldTruncation, long
 void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv)
 {
   double power;
-  double *scale = (double *) malloc((trunc+1)*sizeof(double));
+  double *scale = (double*) malloc((trunc+1)*sizeof(double));
   int  n, m;
   int  index;
 
@@ -7484,7 +7544,7 @@ void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv)
 
 void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp)
 {
-  double *fphelp = (double *) malloc(nsp*sizeof(double));
+  double *fphelp = (double*) malloc(nsp*sizeof(double));
   int  m, n;
   int  index, inext;
 
@@ -7523,7 +7583,7 @@ void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp)
 
 void gatherComplex(double *fpdata, int pcStart, int trunc, int nsp)
 {
-  double *fphelp = (double *) malloc(nsp*sizeof(double));
+  double *fphelp = (double*) malloc(nsp*sizeof(double));
   int  m, n;
   int  index, inext;
 
@@ -8033,10 +8093,10 @@ int qu2reg2(double *pfield, int *kpoint, int klat, int klon,
    int iregno, iquano, j210, j220, j230, j240, j225;
 
 
-   zline = (double *) malloc(2*klon*sizeof(double));
+   zline = (double*) malloc(2*klon*sizeof(double));
    if ( zline == NULL ) SysError("No Memory!");
 
-   zwork = (double *) malloc(3*(2*klon+3)*sizeof(double));
+   zwork = (double*) malloc(3*(2*klon+3)*sizeof(double));
    if ( zwork == NULL ) SysError("No Memory!");
 
    /* Parameter adjustments */
@@ -8290,13 +8350,13 @@ C
    double *zwork = NULL;
    int iregno, iquano, j210, j220, j230, j240, j225;
 
-   ztemp = (double *) malloc(klon*klat*sizeof(double));
+   ztemp = (double*) malloc(klon*klat*sizeof(double));
    if ( ztemp == NULL ) SysError("No Memory!");
 
-   zline = (double *) malloc(2*klon*sizeof(double));
+   zline = (double*) malloc(2*klon*sizeof(double));
    if ( zline == NULL ) SysError("No Memory!");
 
-   zwork = (double *) malloc(3*(2*klon+3)*sizeof(double));
+   zwork = (double*) malloc(3*(2*klon+3)*sizeof(double));
    if ( zwork == NULL ) SysError("No Memory!");
 
    /* Parameter adjustments */
@@ -8782,10 +8842,10 @@ long packInt64(unsigned INT64 *up, unsigned char *cp, long bc, long tc)
 /* unpack 8-bit bytes from a packed buffer with 64-bit words */
 /* same as : for ( int i = 0; i < bc; ++i ) up[i] = (INT64) cp[i]; */
 
-long unpackInt64(unsigned char *cp, unsigned INT64 *up, long bc, long tc)
+long unpackInt64(const unsigned char *cp, unsigned INT64 *up, long bc, long tc)
 {
   U_BYTEORDER;
-  unsigned char *cp0;
+  const unsigned char *cp0;
   unsigned INT64 *up0;
   unsigned INT64 *ip0, *ip1, *ip2, *ip3, *ip4, *ip5, *ip6, *ip7;
   long head, trail, inner, i, j;
@@ -8984,10 +9044,10 @@ long packInt32(unsigned INT32 *up, unsigned char *cp, long bc, long tc)
 /* same as : for ( int i = 0; i < bc; ++i ) up[i] = (INT32) cp[i]; */
 
 #if  defined  (INT32)
-long unpackInt32(unsigned char *cp, unsigned INT32 *up, long bc, long tc)
+long unpackInt32(const unsigned char *cp, unsigned INT32 *up, long bc, long tc)
 {
   U_BYTEORDER;
-  unsigned char *cp0;
+  const unsigned char *cp0;
   unsigned INT32 *up0;
   unsigned INT32 *ip0, *ip1, *ip2, *ip3;
   long head, trail, inner, i, j;
@@ -10158,7 +10218,7 @@ void repair1(unsigned char *gbuf, long gbufsize)
       long nelem;
       unsigned char *pbuf;
       nelem = sourceLen/3;
-      pbuf = (unsigned char *) malloc(sourceLen);
+      pbuf = (unsigned char*) malloc(sourceLen);
       for ( i = 0; i < nelem; i++ )
 	{
 	  pbuf[3*i  ] = source[        i];
@@ -10419,7 +10479,7 @@ int  gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
       {
 	long nelem;
 	nelem = sourceLen/3;
-	pbuf = (unsigned char *) malloc(sourceLen);
+	pbuf = (unsigned char*) malloc(sourceLen);
 	for ( i = 0; i < nelem; i++ )
 	  {
 	    pbuf[        i] = source[3*i  ];
@@ -10758,7 +10818,7 @@ int  gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
 	long nelem;
 	unsigned char *pbuf;
 	nelem = tmpLen/3;
-	pbuf = (unsigned char *) malloc(tmpLen);
+	pbuf = (unsigned char*) malloc(tmpLen);
 	for ( i = 0; i < nelem; i++ )
 	  {
 	    pbuf[3*i  ] = dest[        i];
@@ -10839,7 +10899,7 @@ int  gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
 
   return (gribLen);
 }
-static const char grb_libvers[] = "1.6.3" " of ""Jan  8 2014"" ""19:55:18";
+static const char grb_libvers[] = "1.6.4" " of ""Jun 27 2014"" ""14:00:04";
 const char *
 cgribexLibraryVersion(void)
 {
diff --git a/libcdi/src/cksum.c b/libcdi/src/cksum.c
index 2629cfb..77a2c60 100644
--- a/libcdi/src/cksum.c
+++ b/libcdi/src/cksum.c
@@ -1,4 +1,8 @@
 #include <inttypes.h>
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <sys/types.h>
 
@@ -108,18 +112,19 @@ memcrc_r(uint32_t *state, const unsigned char *block, size_t block_len)
   *state = s;
 }
 
-#define SWAP_CSUM(BITWIDTH,BYTEWIDTH)                             \
-  do {                                                            \
-  for (size_t i = num_elems; i > 0; --i) {                        \
-    {                                                             \
-      uint##BITWIDTH##_t accum = *(uint##BITWIDTH##_t *)b++;      \
-      for (j = 0; j < BYTEWIDTH; ++j)                             \
-      {                                                           \
-        uint32_t c = (uint32_t)(accum & UCHAR_MAX);               \
-        s = (s << 8) ^ crctab[(s >> 24) ^ c];                     \
-        accum >>= 8;                                              \
-      }                                                           \
-    }                                                             \
+#define SWAP_CSUM(BITWIDTH,BYTEWIDTH,NACC)                              \
+  do {                                                                  \
+    register const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *)elems; \
+    for (size_t i = 0; i < num_elems; ++i) {                            \
+      for(size_t aofs = NACC; aofs > 0; --aofs) {                       \
+        uint##BITWIDTH##_t accum = b[i + aofs - 1];                     \
+        for (size_t j = 0; j < BYTEWIDTH; ++j) {                        \
+          uint32_t c = (uint32_t)(accum & UCHAR_MAX);                   \
+          s = (s << 8) ^ crctab[(s >> 24) ^ c];                         \
+          accum >>= 8;                                                  \
+        }                                                               \
+      }                                                                 \
+    }                                                                   \
   } while (0)
 
 
@@ -136,25 +141,24 @@ memcrc_r_eswap(uint32_t *state, const unsigned char *elems, size_t num_elems,
                size_t elem_size)
 {
 #ifdef WORDS_BIGENDIAN
-  register uint32_t c, s = *state;
-  register size_t n = block_len;
-  register unsigned char *b = elems;
+  register uint32_t s = *state;
 
   switch (elem_size)
   {
   case 1:
-    return memcrc_r(state, elems, num_elems, elem_size);
+    memcrc_r(state, elems, num_elems * elem_size);
+    return;
   case 2:
-    SWAP_CSUM(16,2);
+    SWAP_CSUM(16,2,1);
     break;
   case 4:
-    SWAP_CSUM(32,4);
+    SWAP_CSUM(32,4,1);
     break;
   case 8:
-    SWAP_CSUM(64,8);
+    SWAP_CSUM(64,8,1);
     break;
   case 16:
-    SWAP_CSUM(64,8);
+    SWAP_CSUM(64,8,2);
     break;
   }
   *state = s;
@@ -179,3 +183,13 @@ memcrc_finish(uint32_t *state, off_t total_size)
 
   return ~s;
 }
+
+/*
+ * Local Variables:
+ * c-file-style: "Java"
+ * c-basic-offset: 2
+ * indent-tabs-mode: nil
+ * show-trailing-whitespace: t
+ * require-trailing-newline: t
+ * End:
+ */
diff --git a/libcdi/src/config.h.in b/libcdi/src/config.h.in
index 1d6c981..fd911e3 100644
--- a/libcdi/src/config.h.in
+++ b/libcdi/src/config.h.in
@@ -177,9 +177,6 @@
    */
 #undef LT_OBJDIR
 
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
 /* Name of package */
 #undef PACKAGE
 
diff --git a/libcdi/src/dmemory.c b/libcdi/src/dmemory.c
index 90785e1..c5d3a54 100644
--- a/libcdi/src/dmemory.c
+++ b/libcdi/src/dmemory.c
@@ -47,9 +47,9 @@ typedef struct
   char      file[MAXNAME];
   char      caller[MAXNAME];
 }
-MemTable;
+MemTable_t;
 
-static MemTable *memTable;
+static MemTable_t* memTable;
 static int     memTableSize  = 0;
 static long    memAccess     = 0;
 
@@ -69,7 +69,7 @@ static
 void memInternalProblem(const char *caller, const char *fmt, ...)
 {
   va_list args;
-	
+
   va_start(args, fmt);
 
   printf("\n");
@@ -86,12 +86,11 @@ static
 void memError(const char *caller, const char *file, int line, size_t size)
 {
   printf("\n");
-  fprintf(stderr, "Error (%s) : Allocation of %lu bytes failed. [ line %d file %s ]\n",
-	  caller, (unsigned long) size, line, file);
+  fprintf(stderr, "Error (%s) : Allocation of %zu bytes failed. [ line %d file %s ]\n",
+	  caller, size, line, file);
+
+  if ( errno ) perror("System error message ");
 
-  if ( errno )
-    perror("System error message ");
-	
   exit(EXIT_FAILURE);
 }
 
@@ -116,15 +115,15 @@ void memListPrintEntry(int mtype, int item, size_t size, void *ptr,
     }
 
    fprintf(stderr, "memory item %3d ", item);
-   fprintf(stderr, "(%6lu byte) ", (unsigned long) size);
+   fprintf(stderr, "(%6zu byte) ", size);
    fprintf(stderr, "at %p", ptr);
    if ( file != NULL )
      {
        fprintf(stderr, " line %4d", line);
        fprintf(stderr, " file %s", file);
-     }    
+     }
    if ( caller != NULL )
-     fprintf(stderr, " (%s)", caller);     
+     fprintf(stderr, " (%s)", caller);
    fprintf(stderr, "]\n");
 }
 
@@ -213,7 +212,7 @@ void memInit(void)
     {
       memGetDebugLevel();
       initDebugLevel = 1;
-    }  
+    }
 }
 
 static
@@ -271,8 +270,8 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
   if ( memTableSize == 0 )
     {
       memTableSize = 8;
-      memSize  = memTableSize*sizeof(MemTable);
-      memTable = (MemTable *) malloc(memSize);
+      memSize  = memTableSize*sizeof(MemTable_t);
+      memTable = (MemTable_t*) malloc(memSize);
       if( memTable == NULL ) memError(__func__, __FILE__, __LINE__, memSize);
 
       for( i = 0; i < memTableSize; i++ )
@@ -292,8 +291,8 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
   if ( memID == memTableSize )
     {
       memTableSize = 2*memTableSize;
-      memSize  = memTableSize*sizeof(MemTable);
-      memTable = (MemTable *) realloc(memTable, memSize);
+      memSize  = memTableSize*sizeof(MemTable_t);
+      memTable = (MemTable_t*) realloc(memTable, memSize);
       if( memTable == NULL ) memError(__func__, __FILE__, __LINE__, memSize);
 
       for( i = memID; i < memTableSize; i++ )
@@ -311,7 +310,7 @@ int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
     {
       len = strlen(file);
       if ( len > MAXNAME-1 ) len = MAXNAME-1;
-    
+
       (void) memcpy(memTable[memID].file, file, len);
       memTable[memID].file[len] = '\0';
     }
@@ -367,7 +366,7 @@ int memListChangeEntry(void *ptrold, void *ptr, size_t size,
       item = memTable[memID].item;
 
       sizeold = memTable[memID].size*memTable[memID].nobj;
-      
+
       memTable[memID].ptr   = ptr;
       memTable[memID].size  = size;
       memTable[memID].nobj  = 1;
@@ -424,8 +423,7 @@ void *Calloc(const char *caller, const char *file, int line, size_t nobjs, size_
 	{
 	  memAccess++;
 
-	  if ( ptr )
-	    item = memListNewEntry(CALLOC_FUNC, ptr, size, nobjs, caller, file, line);
+	  if ( ptr ) item = memListNewEntry(CALLOC_FUNC, ptr, size, nobjs, caller, file, line);
 
 	  memListPrintEntry(CALLOC_FUNC, item, size*nobjs, ptr, caller, file, line);
 	}
@@ -455,8 +453,7 @@ void *Malloc(const char *caller, const char *file, int line, size_t size)
 	{
 	  memAccess++;
 
-	  if ( ptr )
-	    item = memListNewEntry(MALLOC_FUNC, ptr, size, 1, caller, file, line);
+	  if ( ptr ) item = memListNewEntry(MALLOC_FUNC, ptr, size, 1, caller, file, line);
 
 	  memListPrintEntry(MALLOC_FUNC, item, size, ptr, caller, file, line);
 	}
@@ -490,8 +487,7 @@ void *Realloc(const char *caller, const char *file, int line, void *ptrold, size
 	    {
 	      item = memListChangeEntry(ptrold, ptr, size, caller, file, line);
 
-	      if ( item == UNDEFID )
-		item = memListNewEntry(REALLOC_FUNC, ptr, size, 1, caller, file, line);
+	      if ( item == UNDEFID ) item = memListNewEntry(REALLOC_FUNC, ptr, size, 1, caller, file, line);
 	    }
 
 	  memListPrintEntry(REALLOC_FUNC, item, size, ptr, caller, file, line);
diff --git a/libcdi/src/dmemory.h b/libcdi/src/dmemory.h
index 73dfaa5..52795f4 100644
--- a/libcdi/src/dmemory.h
+++ b/libcdi/src/dmemory.h
@@ -29,15 +29,15 @@ extern void    Free   (const char *caller, const char *file, int line, void *ptr
 #endif
 
 #if  defined  WITH_CALLER_NAME
-#  define  realloc(p, s)  Realloc(__func__, __FILE__, __LINE__, p, (size_t)s)
-#  define   calloc(n, s)   Calloc(__func__, __FILE__, __LINE__, n, (size_t)s)
-#  define   malloc(s)      Malloc(__func__, __FILE__, __LINE__, (size_t)s)
-#  define     free(p)        Free(__func__, __FILE__, __LINE__, p)
+#  define  realloc(p, s)  Realloc(__func__, __FILE__, __LINE__, (p), (s))
+#  define   calloc(n, s)   Calloc(__func__, __FILE__, __LINE__, (n), (s))
+#  define   malloc(s)      Malloc(__func__, __FILE__, __LINE__, (s))
+#  define     free(p)        Free(__func__, __FILE__, __LINE__, (p))
 #else
-#  define  realloc(p, s)  Realloc((void *) NULL, __FILE__, __LINE__, p, (size_t)s)
-#  define   calloc(n, s)   Calloc((void *) NULL, __FILE__, __LINE__, n, (size_t)s)
-#  define   malloc(s)      Malloc((void *) NULL, __FILE__, __LINE__, (size_t)s)
-#  define     free(p)        Free((void *) NULL, __FILE__, __LINE__, p)
+#  define  realloc(p, s)  Realloc((void *) NULL, __FILE__, __LINE__, (p), (s))
+#  define   calloc(n, s)   Calloc((void *) NULL, __FILE__, __LINE__, (n), (s))
+#  define   malloc(s)      Malloc((void *) NULL, __FILE__, __LINE__, (s))
+#  define     free(p)        Free((void *) NULL, __FILE__, __LINE__, (p))
 #endif
 
 #endif /* DEBUG_MEMORY */
@@ -46,12 +46,10 @@ void *cdiXmalloc(size_t, const char *, const char *, int);
 #define xmalloc(size) cdiXmalloc((size), __FILE__, __func__,  __LINE__ )
 
 void *cdiXcalloc(size_t, size_t, const char *, const char *, int);
-#define xcalloc(nmemb,size) cdiXcalloc((nmemb), (size),        \
-                                        __FILE__, __func__, __LINE__)
+#define xcalloc(nmemb,size) cdiXcalloc((nmemb), (size), __FILE__, __func__, __LINE__)
 
 void *cdiXrealloc(void *, size_t, const char *, const char *, int);
-#define xrealloc(p,size) cdiXrealloc((p), (size),              \
-                                      __FILE__, __func__, __LINE__)
+#define xrealloc(p,size) cdiXrealloc((p), (size), __FILE__, __func__, __LINE__)
 
 #endif /* _DMEMORY_H */
 /*
diff --git a/libcdi/src/extralib.c b/libcdi/src/extralib.c
index 613bbf2..1530317 100644
--- a/libcdi/src/extralib.c
+++ b/libcdi/src/extralib.c
@@ -32,7 +32,7 @@ static int extDefaultNumber = EXT_REAL;
  */
 
 #undef  LIBVERSION
-#define LIBVERSION      1.3.1
+#define LIBVERSION      1.3.2
 #define XSTRING(x)	#x
 #define STRING(x)	XSTRING(x)
 static const char ext_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
@@ -80,7 +80,7 @@ void extLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    case 'c':
 	      {
@@ -92,12 +92,14 @@ void extLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    default:
-	      Message("Invalid character in %s: %s", envName, envString);
-	      break;
-	    }
+              {
+                Message("Invalid character in %s: %s", envName, envString);
+                break;
+              }
+            }
 	}
     }
 
@@ -215,7 +217,7 @@ int extInqHeader(void *ext, int *header)
 
   for ( i = 0; i < EXT_HEADER_LEN; i++ )
     header[i] = extp->header[i];
-  
+
   if ( EXT_Debug ) Message("datasize = %lu", extp->datasize);
 
   return (0);
@@ -229,7 +231,7 @@ int extDefHeader(void *ext, const int *header)
 
   for ( i = 0; i < EXT_HEADER_LEN; i++ )
     extp->header[i] = header[i];
-  
+
   extp->datasize = header[3];
   if ( extp->number == EXT_COMP ) extp->datasize *= 2;
 
@@ -270,7 +272,7 @@ int extInqData(void *ext, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT32));
-	  }	
+	  }
 	break;
       }
     case DOUBLE_PRECISION:
@@ -287,12 +289,12 @@ int extInqData(void *ext, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT64));
-	  }	
+	  }
 	break;
     default:
       {
 	Error("unexpected data precision %d", rprec);
-        break;
+	break;
       }
     }
 
@@ -451,7 +453,7 @@ int extRead(int fileID, void *ext)
       }
     default:
       {
-	Error("unexpected header precision %d", hprec);
+	Error("Unexpected header precision %d", hprec);
         break;
       }
     }
@@ -460,8 +462,8 @@ int extRead(int fileID, void *ext)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("header blocklen differ!");
-      return (-1);
+      Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   extp->datasize = extp->header[3];
@@ -498,7 +500,7 @@ int extRead(int fileID, void *ext)
 
   if ( dprec != SINGLE_PRECISION && dprec != DOUBLE_PRECISION )
     {
-      Warning("unexpected data precision %d", dprec);
+      Warning("Unexpected data precision %d", dprec);
       return (-1);
     }
 
@@ -508,8 +510,8 @@ int extRead(int fileID, void *ext)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("data blocklen differ!");
-      return (-1);
+      Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   return (0);
@@ -564,7 +566,7 @@ int extWrite(int fileID, void *ext)
         break;
       }
     }
-  
+
   binWriteF77Block(fileID, byteswap, blocklen);
 
   datasize = header[3];
diff --git a/libcdi/src/file.c b/libcdi/src/file.c
index 56a879d..0d7d074 100644
--- a/libcdi/src/file.c
+++ b/libcdi/src/file.c
@@ -918,7 +918,6 @@ int file_fill_buffer(bfile_t *fileptr)
 {
   long nread;
   int fd;
-  int ret;
   long offset = 0;
   off_t retseek;
 
@@ -948,19 +947,17 @@ int file_fill_buffer(bfile_t *fileptr)
 
 	  if ( fileptr->buffer )
 	    {
+              int ret;
 	      ret = munmap(fileptr->buffer, fileptr->mappedSize);
-	      if ( ret == -1 )
-		SysError("munmap error for read %s", fileptr->name);
+	      if ( ret == -1 ) SysError("munmap error for read %s", fileptr->name);
 	      fileptr->buffer = NULL;
 	    }
 
 	  fileptr->mappedSize = (size_t) nread;
 
-	  fileptr->buffer =
-            (char *) mmap(0, (size_t) nread, PROT_READ, MAP_SHARED, fd, fileptr->bufferPos);
+	  fileptr->buffer = (char*) mmap(NULL, (size_t) nread, PROT_READ, MAP_PRIVATE, fd, fileptr->bufferPos);
 
-	  if ( fileptr->buffer == (void *)-1 )
-	    SysError("mmap error for read %s", fileptr->name);
+	  if ( fileptr->buffer == MAP_FAILED ) SysError("mmap error for read %s", fileptr->name);
 
 	  offset = fileptr->position - fileptr->bufferPos;
 	}
@@ -1050,10 +1047,10 @@ size_t file_read_from_buffer(bfile_t *fileptr, void *ptr, size_t size)
   size_t offset = 0;
 
   if ( FILE_Debug )
-    Message("size = %ld  Cnt = %d", size, (int) fileptr->bufferCnt);
+    Message("size = %ld  Cnt = %ld", size, (long) fileptr->bufferCnt);
 
-  if ( ((int)fileptr->bufferCnt) < 0 )
-    Error("Internal problem. bufferCnt = %d", (int) fileptr->bufferCnt);
+  if ( ((long)fileptr->bufferCnt) < 0L )
+    Error("Internal problem. bufferCnt = %ld", (long) fileptr->bufferCnt);
 
   rsize = size;
 
@@ -1292,8 +1289,7 @@ int fileClose_serial(int fileID)
       if ( fileptr->buffer && fileptr->mappedSize )
 	{
 	  ret = munmap(fileptr->buffer, fileptr->mappedSize);
-	  if ( ret == -1 )
-	    SysError("munmap error for close %s", fileptr->name);
+	  if ( ret == -1 ) SysError("munmap error for close %s", fileptr->name);
 	  fileptr->buffer = NULL;
 	}
 #endif
diff --git a/libcdi/src/gaussgrid.c b/libcdi/src/gaussgrid.c
index 485a848..619d84f 100644
--- a/libcdi/src/gaussgrid.c
+++ b/libcdi/src/gaussgrid.c
@@ -73,13 +73,12 @@ void cpledn(int kn, int kodd, double *pfn, double pdx, int kflag,
 }
 
 static
-void gawl(double *pfn, double *pl, double *pw, int kn, int *kiter)
+void gawl(double *pfn, double *pl, double *pw, int kn)
 {
   int iodd;
   double pmod = 0;
   int iflag;
   int itemax;
-  int jter;
   double zw = 0;
   double zdlx;
   double zdlxn = 0;
@@ -95,9 +94,8 @@ void gawl(double *pfn, double *pl, double *pw, int kn, int *kiter)
 
   /* 2.0 Newton iteration */
 
-  for (jter = 1; jter <= itemax+1; jter++) 
+  for (int jter = 1; jter <= itemax+1; jter++)
     {
-      *kiter = jter;
       cpledn(kn, iodd, pfn, zdlx, iflag, &zw, &zdlxn, &pmod);
       zdlx = zdlxn;
       if (iflag == 1) break;
@@ -111,7 +109,7 @@ void gawl(double *pfn, double *pl, double *pw, int kn, int *kiter)
 }
 
 static
-void gauaw(int kn, double *pl, double *pw)
+void gauaw(int kn, double *restrict pl, double *restrict pw)
 {
   /*
    * 1.0 Initialize Fourier coefficients for ordinary Legendre polynomials
@@ -123,11 +121,8 @@ void gauaw(int kn, double *pl, double *pw)
 
   double z, zfnn;
 
-  int *iter;
-
   int ik, ins2, isym, jgl, jglm1, jn, iodd;
 
-  iter   = (int *)    malloc(kn*sizeof(int));
   zfn    = (double *) malloc((kn+1)*(kn+1)*sizeof(double));
   zfnlat = (double *) malloc((kn/2+1+1)*sizeof(double));  
 
@@ -179,7 +174,7 @@ void gauaw(int kn, double *pl, double *pw)
   for (jgl = ins2; jgl >= 1 ; jgl--) 
     {
       jglm1 = jgl-1;
-      gawl(zfnlat, &(pl[jglm1]), &(pw[jglm1]), kn, &(iter[jglm1]));
+      gawl(zfnlat, &(pl[jglm1]), &(pw[jglm1]), kn);
     }
 
   /* convert to physical latitude */
@@ -199,7 +194,6 @@ void gauaw(int kn, double *pl, double *pw)
 
   free(zfnlat);
   free(zfn);
-  free(iter);
 
   return;
 }
@@ -297,7 +291,7 @@ void gauaw_old(double *pa, double *pw, int nlat)
 }
 #endif
 
-void gaussaw(double *pa, double *pw, int nlat)
+void gaussaw(double *restrict pa, double *restrict pw, int nlat)
 {
   //gauaw_old(pa, pw, nlat);
   gauaw(nlat, pa, pw);
diff --git a/libcdi/src/gaussgrid.h b/libcdi/src/gaussgrid.h
index b0a0c47..06168f7 100644
--- a/libcdi/src/gaussgrid.h
+++ b/libcdi/src/gaussgrid.h
@@ -1,7 +1,7 @@
 #ifndef _GAUSSGRID_H
 #define _GAUSSGRID_H
 
-void   gaussaw(double *pa, double *pw, int nlat);
+void   gaussaw(double *restrict pa, double *restrict pw, int nlat);
 
 #endif  /* _GAUSSGRID_H */
 /*
diff --git a/libcdi/src/grid.c b/libcdi/src/grid.c
index 34ebfa1..c88b8c9 100644
--- a/libcdi/src/grid.c
+++ b/libcdi/src/grid.c
@@ -26,7 +26,9 @@
 #endif
 
 
-char *Grids[] = {
+/* the value in the second pair of brackets must match the length of
+ * the longest string (including terminating NUL) */
+static const char Grids[][17] = {
   /*  0 */  "undefined",
   /*  1 */  "generic",
   /*  2 */  "gaussian",
@@ -54,8 +56,13 @@ static void   gridPack        ( void * gridptr, void * buff, int size,
 				int *position, void *context);
 static int    gridTxCode      ( void );
 
-resOps gridOps = { gridCompareP, gridDestroyP, gridPrintP
-                   , gridGetPackSize, gridPack, gridTxCode
+static const resOps gridOps = {
+  gridCompareP,
+  gridDestroyP,
+  gridPrintP,
+  gridGetPackSize,
+  gridPack,
+  gridTxCode
 };
 
 
@@ -121,6 +128,7 @@ void grid_init(grid_t *gridptr)
   gridptr->angle        = 0.0;
   gridptr->locked       = FALSE;
   gridptr->lcomplex     = 0;
+  gridptr->hasdims      = TRUE;
   gridptr->xname[0]     = 0;
   gridptr->yname[0]     = 0;
   gridptr->xlongname[0] = 0;
@@ -150,15 +158,18 @@ void grid_free(grid_t *gridptr)
   grid_init(gridptr);
 }
 
-static
-grid_t *gridNewEntry ( void )
+static grid_t *
+gridNewEntry(cdiResH resH)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) xmalloc ( sizeof ( grid_t ));
-  grid_init ( gridptr );
-  gridptr->self = reshPut (( void * ) gridptr, &gridOps );
-
+  grid_t *gridptr = (grid_t*) xmalloc(sizeof(grid_t));
+  grid_init(gridptr);
+  if (resH == CDI_UNDEFID)
+    gridptr->self = reshPut(gridptr, &gridOps);
+  else
+    {
+      gridptr->self = resH;
+      reshReplace(resH, gridptr, &gridOps);
+    }
   return gridptr;
 }
 
@@ -224,21 +235,19 @@ void gridGenXvals(int xsize, double xfirst, double xlast, double xinc, double *x
 static
 void calc_gaussgrid(double *yvals, int ysize, double yfirst, double ylast)
 {
-  double *yw;
   long yhsize;
-  long i;
 
-  yw = (double *) malloc(ysize*sizeof(double));
+  double *yw = (double *)xmalloc(ysize*sizeof(double));
   gaussaw(yvals, yw, ysize);
   free(yw);
-  for ( i = 0; i < ysize; i++ )
+  for (long i = 0; i < ysize; i++ )
     yvals[i] = asin(yvals[i])/M_PI*180.0;
 
   if ( yfirst < ylast && yfirst > -90.0 && ylast < 90.0 )
     {
       double ytmp;
       yhsize = ysize/2;
-      for ( i = 0; i < yhsize; i++ )
+      for (long i = 0; i < yhsize; i++ )
         {
           ytmp = yvals[i];
           yvals[i] = yvals[ysize-i-1];
@@ -384,14 +393,13 @@ int gridCreate(int gridtype, int size)
   int gridID;
   grid_t *gridptr;
 
-  if ( CDI_Debug )
-    Message("gridtype: %d size: %d", gridtype, size);
+  if ( CDI_Debug ) Message("gridtype=%s  size=%d", gridNamePtr(gridtype), size);
 
-  if ( size < 0 || size > INT_MAX ) Error("grid size (%d) out of bounds (0 - %d)!", size, INT_MAX);
+  if ( size < 0 || size > INT_MAX ) Error("Grid size (%d) out of bounds (0 - %d)!", size, INT_MAX);
 
-  gridInit ();
+  gridInit();
 
-  gridptr = gridNewEntry();
+  gridptr = gridNewEntry(CDI_UNDEFID);
   if ( ! gridptr ) Error("No memory");
 
   gridID = gridptr->self;
@@ -460,10 +468,12 @@ int gridCreate(int gridtype, int size)
       {
         gridDefXname(gridID, "x");
         gridDefYname(gridID, "y");
+        /*
         strcpy(gridptr->xstdname, "grid_longitude");
         strcpy(gridptr->ystdname, "grid_latitude");
         gridDefXunits(gridID, "degrees");
         gridDefYunits(gridID, "degrees");
+        */
         break;
       }
     case GRID_LCC2:
@@ -532,9 +542,9 @@ void gridDestroyP ( void * gridptr )
 }
 
 
-char *gridNamePtr(int gridtype)
+const char *gridNamePtr(int gridtype)
 {
-  char *name;
+  const char *name;
   int size = (int) (sizeof(Grids)/sizeof(char *));
 
   if ( gridtype >= 0 && gridtype < size )
@@ -569,7 +579,7 @@ void gridDefXname(int gridID, const char *xname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed." );
       return;
@@ -601,7 +611,7 @@ void gridDefXlongname(int gridID, const char *xlongname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed." );
       return;
@@ -631,7 +641,7 @@ void gridDefXunits(int gridID, const char *xunits)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -663,7 +673,7 @@ void gridDefYname(int gridID, const char *yname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -695,7 +705,7 @@ void gridDefYlongname(int gridID, const char *ylongname)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -727,7 +737,7 @@ void gridDefYunits(int gridID, const char *yunits)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1064,7 +1074,7 @@ void gridDefTrunc(int gridID, int trunc)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1095,7 +1105,7 @@ void gridDefXsize(int gridID, int xsize)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1136,7 +1146,7 @@ void gridDefPrec(int gridID, int prec)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1215,7 +1225,7 @@ void gridDefYsize(int gridID, int ysize)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1288,7 +1298,7 @@ void gridDefNP(int gridID, int np)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed." );
       return;
@@ -1343,7 +1353,7 @@ void gridDefRowlon(int gridID, int nrowlon, const int *rowlon)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1412,7 +1422,7 @@ void gridDefMask(int gridID, const int *mask)
   long size, i;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1475,7 +1485,7 @@ void gridDefMaskGME(int gridID, const int *mask)
   long size, i;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1536,9 +1546,9 @@ int gridInqXvals(int gridID, double *xvals)
     size = gridptr->xsize;
 
   if ( CDI_Debug && size == 0 )
-    Warning("Size undefined for gridID = %d", gridID);
+    Warning("size undefined for gridID = %d", gridID);
 
-  if ( xvals && gridptr->xvals )
+  if ( size && xvals && gridptr->xvals )
     memcpy(xvals, gridptr->xvals, size*sizeof(double));
 
   if ( gridptr->xvals == NULL ) size = 0;
@@ -1566,7 +1576,7 @@ void gridDefXvals(int gridID, const double *xvals)
   long size;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1588,11 +1598,9 @@ void gridDefXvals(int gridID, const double *xvals)
   if ( size == 0 )
     Error("Size undefined for gridID = %d", gridID);
 
-  if ( gridptr->xvals == NULL )
-    gridptr->xvals = (double *) malloc(size*sizeof(double));
-  else if ( CDI_Debug )
+  if (gridptr->xvals && CDI_Debug)
     Warning("values already defined!");
-
+  gridptr->xvals = (double *)xrealloc(gridptr->xvals, size * sizeof(double));
   memcpy(gridptr->xvals, xvals, size*sizeof(double));
 }
 
@@ -1631,9 +1639,9 @@ int gridInqYvals(int gridID, double *yvals)
     size = gridptr->ysize;
 
   if ( CDI_Debug && size == 0 )
-    Warning("Size undefined for gridID = %d!", gridID);
+    Warning("size undefined for gridID = %d!", gridID);
 
-  if ( yvals && gridptr->yvals )
+  if ( size && yvals && gridptr->yvals )
     memcpy(yvals, gridptr->yvals, size*sizeof(double));
 
   if ( gridptr->yvals == NULL ) size = 0;
@@ -1661,7 +1669,7 @@ void gridDefYvals(int gridID, const double *yvals)
   long size;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1681,11 +1689,10 @@ void gridDefYvals(int gridID, const double *yvals)
   if ( size == 0 )
     Error("Size undefined for gridID = %d!", gridID);
 
-  if ( gridptr->yvals == NULL )
-    gridptr->yvals = (double *) malloc(size*sizeof(double));
-  else if ( CDI_Debug )
+  if (gridptr->yvals && CDI_Debug)
     Warning("Values already defined!");
 
+  gridptr->yvals = (double *)xrealloc(gridptr->yvals, size*sizeof(double));
   memcpy(gridptr->yvals, yvals, size*sizeof(double));
 }
 
@@ -1742,14 +1749,11 @@ double gridInqYval(int gridID, int index)
 */
 double gridInqXinc(int gridID)
 {
-  double xinc;
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t *gridptr = (grid_t *)reshGetVal(gridID, &gridOps);
 
   grid_check_ptr(gridID, gridptr);
 
-  xinc = gridptr->xinc;
+  double xinc = gridptr->xinc;
 
   if ( (! (fabs(xinc) > 0)) && gridptr->xvals )
     {
@@ -1785,14 +1789,11 @@ double gridInqXinc(int gridID)
 */
 double gridInqYinc(int gridID)
 {
-  double yinc;
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t *gridptr = (grid_t *)reshGetVal(gridID, &gridOps);
 
   grid_check_ptr(gridID, gridptr);
 
-  yinc = gridptr->yinc;
+  double yinc = gridptr->yinc;
 
   if ( (! (fabs(yinc) > 0)) && gridptr->yvals )
     {
@@ -1852,7 +1853,7 @@ void gridDefXpole(int gridID, double xpole)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1904,7 +1905,7 @@ void gridDefYpole(int gridID, double ypole)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1956,7 +1957,7 @@ void gridDefAngle(int gridID, double angle)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2005,7 +2006,7 @@ void gridDefGMEnd(int gridID, int nd)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2053,7 +2054,7 @@ void gridDefGMEni(int gridID, int ni)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2101,7 +2102,7 @@ void gridDefGMEni2(int gridID, int ni2)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2138,7 +2139,7 @@ void gridDefGMEni3(int gridID, int ni3)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2501,13 +2502,11 @@ int gridCompare(int gridID, grid_t grid)
               char uuidOfHGrid[17];
               gridInqUUID(gridID, uuidOfHGrid);
 
-              if ( !differ && memcmp(uuidOfHGrid, grid.uuid, 16) != 0 ) differ = 1;
-
+              if ( uuidOfHGrid[0] != 0 && grid.uuid[0] != 0 )
+                if ( !differ && memcmp(uuidOfHGrid, grid.uuid, 16) != 0 ) differ = 1;
               if ( !differ && grid.nvertex != gridInqNvertex(gridID) ) differ = 1;
-
               if ( !differ && grid.number != gridInqNumber(gridID) ) differ = 1;
               if ( !differ && grid.position != gridInqPosition(gridID) ) differ = 1;
-
 	      if ( !differ )
 		differ = compareXYvals2(gridID, grid.size, grid.xvals, grid.yvals);
 	    }
@@ -3118,7 +3117,7 @@ void gridDefArea(int gridID, const double *area)
   long size;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -3189,7 +3188,7 @@ void gridDefNvertex(int gridID, int nvertex)
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -3234,7 +3233,7 @@ void gridDefXbounds(int gridID, const double *xbounds)
   long nvertex;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning ("%s", "Operation not executed.");
       return;
@@ -3309,7 +3308,7 @@ int gridInqXbounds(int gridID, double *xbounds)
   if ( CDI_Debug && size == 0 )
     Warning("size undefined for gridID = %d", gridID);
 
-  if ( xbounds && gridptr->xbounds )
+  if ( size && xbounds && gridptr->xbounds )
     memcpy(xbounds, gridptr->xbounds, size*sizeof(double));
 
   if ( gridptr->xbounds == NULL ) size = 0;
@@ -3318,7 +3317,7 @@ int gridInqXbounds(int gridID, double *xbounds)
 }
 
 
-double *gridInqXboundsPtr(int gridID)
+const double *gridInqXboundsPtr(int gridID)
 {
   grid_t *gridptr;
 
@@ -3349,7 +3348,7 @@ void gridDefYbounds(int gridID, const double *ybounds)
   long nvertex;
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -3424,7 +3423,7 @@ int gridInqYbounds(int gridID, double *ybounds)
   if ( CDI_Debug && size == 0 )
     Warning("size undefined for gridID = %d", gridID);
 
-  if ( ybounds && gridptr->ybounds )
+  if ( size && ybounds && gridptr->ybounds )
     memcpy(ybounds, gridptr->ybounds, size*sizeof(double));
 
   if ( gridptr->ybounds == NULL ) size = 0;
@@ -3433,7 +3432,7 @@ int gridInqYbounds(int gridID, double *ybounds)
 }
 
 
-double *gridInqYboundsPtr(int gridID)
+const double *gridInqYboundsPtr(int gridID)
 {
   grid_t *gridptr;
 
@@ -3911,7 +3910,7 @@ void gridDefLCC(int gridID, double originLon, double originLat, double lonParY,
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -3997,7 +3996,7 @@ void gridDefLcc2(int gridID, double earth_radius, double lon_0, double lat_0, do
 {
   grid_t *gridptr;
 
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -4050,15 +4049,13 @@ void gridInqLcc2(int gridID, double *earth_radius, double *lon_0, double *lat_0,
 
 void gridDefLaea(int gridID, double earth_radius, double lon_0, double lat_0)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4077,9 +4074,7 @@ void gridDefLaea(int gridID, double earth_radius, double lon_0, double lat_0)
 
 void gridInqLaea(int gridID, double *earth_radius, double *lon_0, double *lat_0)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4102,15 +4097,13 @@ void gridInqLaea(int gridID, double *earth_radius, double *lon_0, double *lat_0)
 
 void gridDefComplexPacking(int gridID, int lcomplex)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4120,16 +4113,37 @@ void gridDefComplexPacking(int gridID, int lcomplex)
 
 int gridInqComplexPacking(int gridID)
 {
-  int lcomplex;
-  grid_t *gridptr;
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_check_ptr(gridID, gridptr);
+
+  return (gridptr->lcomplex);
+}
+
+
+void gridDefHasDims(int gridID, int hasdims)
+{
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
-  lcomplex = gridptr->lcomplex;
+  gridptr->hasdims = hasdims;
+}
+
 
-  return (lcomplex);
+int gridInqHasDims(int gridID)
+{
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+
+  grid_check_ptr(gridID, gridptr);
+
+  return (gridptr->hasdims);
 }
 
 /*
@@ -4148,15 +4162,13 @@ The function @func{gridDefNumber} defines the reference number for an unstructur
 */
 void gridDefNumber(int gridID, const int number)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4180,9 +4192,7 @@ The function @func{gridInqNumber} returns the reference number to an unstructure
 */
 int gridInqNumber(int gridID)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4205,15 +4215,13 @@ The function @func{gridDefPosition} defines the position of grid in the referenc
 */
 void gridDefPosition(int gridID, int position)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4237,9 +4245,7 @@ The function @func{gridInqPosition} returns the position of grid in the referenc
 */
 int gridInqPosition(int gridID)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4262,15 +4268,13 @@ The function @func{gridDefReference} defines the reference URI for an unstructur
 */
 void gridDefReference(int gridID, const char *reference)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4303,10 +4307,8 @@ The function @func{gridInqReference} returns the reference URI to an unstructure
 */
 int gridInqReference(int gridID, char *reference)
 {
-  grid_t *gridptr;
   int len = 0;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4337,21 +4339,17 @@ The function @func{gridDefUUID} defines the UUID for an unstructured grid.
 */
 void gridDefUUID(int gridID, const char *uuid)
 {
-  grid_t *gridptr;
-
-  if ( reshGetStatus ( gridID, &gridOps ) == CLOSED )
+  if ( reshGetStatus ( gridID, &gridOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
   memcpy(gridptr->uuid, uuid, 16);
-
-  return;
 }
 
 /*
@@ -4371,9 +4369,7 @@ The function @func{gridInqUUID} returns the UUID to an unstructured grid.
 */
 void gridInqUUID(int gridID, char *uuid)
 {
-  grid_t *gridptr;
-
-  gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
+  grid_t* gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps );
 
   grid_check_ptr(gridID, gridptr);
 
@@ -4530,7 +4526,8 @@ gridGetPackSize(void * voidP, void *context)
 
 void
 gridUnpack(char * unpackBuffer, int unpackBufferSize,
-           int * unpackBufferPos, int nspTarget, void *context)
+           int * unpackBufferPos, int originNamespace, void *context,
+           int force_id)
 {
   grid_t * gridP;
   uint32_t d;
@@ -4539,8 +4536,6 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
 
   gridInit();
 
-  gridP = gridNewEntry();
-  xassert(gridP);
   {
     int intBuffer[gridNint];
     serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4549,7 +4544,10 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
                     &d, 1, DATATYPE_UINT32, context);
 
     xassert(cdiCheckSum(DATATYPE_INT, gridNint, intBuffer) == d);
-    xassert(namespaceAdaptKey(intBuffer[0], nspTarget) == gridP->self);
+    int targetID = namespaceAdaptKey(intBuffer[0], originNamespace);
+    gridP = gridNewEntry(force_id?targetID:CDI_UNDEFID);
+
+    xassert(!force_id || targetID == gridP->self);
 
     gridP->type          =   intBuffer[1];
     gridP->prec          =   intBuffer[2];
@@ -4582,7 +4580,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasRowLonFlag)
     {
       xassert(gridP->nrowlon);
-      gridP->rowlon = xmalloc(gridP->nrowlon * sizeof (int));
+      gridP->rowlon = (int*) xmalloc(gridP->nrowlon * sizeof (int));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->rowlon, gridP->nrowlon , DATATYPE_INT, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4631,7 +4629,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
       else
 	size = gridP->xsize;
 
-      gridP->xvals = xmalloc(size * sizeof (double));
+      gridP->xvals = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->xvals, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4646,7 +4644,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
       else
 	size = gridP->ysize;
 
-      gridP->yvals =  xmalloc( size * sizeof (double));
+      gridP->yvals =  (double*) xmalloc( size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->yvals, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4657,7 +4655,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasAreaFlag)
     {
       xassert((size = gridP->size));
-      gridP->area = xmalloc(size * sizeof (double));
+      gridP->area = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->area, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4673,7 +4671,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
 	size = gridP->nvertex * gridP->xsize;
       xassert(size);
 
-      gridP->xbounds = xmalloc(size * sizeof (double));
+      gridP->xbounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->xbounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4689,7 +4687,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
 	size = gridP->nvertex * gridP->ysize;
       xassert(size);
 
-      gridP->ybounds = xmalloc(size * sizeof (double));
+      gridP->ybounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
 			  gridP->ybounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4718,7 +4716,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
       int referenceSize;
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       &referenceSize, 1, DATATYPE_INT, context);
-      gridP->reference = xmalloc(referenceSize);
+      gridP->reference = (char*) xmalloc(referenceSize);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->reference, referenceSize, DATATYPE_TXT, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4729,7 +4727,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasMaskFlag)
     {
       xassert((size = gridP->size));
-      gridP->mask = xmalloc(size * sizeof (mask_t));
+      gridP->mask = (mask_t*) xmalloc(size * sizeof (mask_t));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->mask, gridP->size, DATATYPE_UCHAR, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -4740,7 +4738,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
   if (memberMask & gridHasGMEMaskFlag)
     {
       xassert((size = gridP->size));
-      gridP->mask_gme = xmalloc(size * sizeof (mask_t));
+      gridP->mask_gme = (mask_t*) xmalloc(size * sizeof (mask_t));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       gridP->mask_gme, gridP->size, DATATYPE_UCHAR, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
diff --git a/libcdi/src/grid.h b/libcdi/src/grid.h
index f44a984..70a31d8 100644
--- a/libcdi/src/grid.h
+++ b/libcdi/src/grid.h
@@ -57,6 +57,7 @@ typedef struct {
   int     np;                     /* number of parallels between a pole and the equator */
   int     locked;
   int     lcomplex;
+  int     hasdims;
   char    xname[CDI_MAX_NAME];
   char    yname[CDI_MAX_NAME];
   char    xlongname[CDI_MAX_NAME];
@@ -78,8 +79,8 @@ int gridSize(void);
 const double *gridInqXvalsPtr(int gridID);
 const double *gridInqYvalsPtr(int gridID);
 
-double *gridInqXboundsPtr(int gridID);
-double *gridInqYboundsPtr(int gridID);
+const double *gridInqXboundsPtr(int gridID);
+const double *gridInqYboundsPtr(int gridID);
 const double *gridInqAreaPtr(int gridID);
 
 int gridCompare(int gridID, grid_t grid);
@@ -87,6 +88,11 @@ int gridGenerate(grid_t grid);
 
 void gridGetIndexList( int, int * );
 
+void
+gridUnpack(char * unpackBuffer, int unpackBufferSize,
+           int * unpackBufferPos, int originNamespace, void *context,
+           int force_id);
+
 #endif
 /*
  * Local Variables:
diff --git a/libcdi/src/ieglib.c b/libcdi/src/ieglib.c
index 5962468..d1c6d7e 100644
--- a/libcdi/src/ieglib.c
+++ b/libcdi/src/ieglib.c
@@ -29,7 +29,7 @@ static int iegDefaultDprec = 0;
  */
 
 #undef  LIBVERSION
-#define LIBVERSION      1.3.1
+#define LIBVERSION      1.3.2
 #define XSTRING(x)	#x
 #define STRING(x)	XSTRING(x)
 static const char ieg_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
@@ -72,12 +72,14 @@ void iegLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    default:
-	      Message("Invalid character in %s: %s", envName, envString);
-	      break;
-	    }
+              {
+                Message("Invalid character in %s: %s", envName, envString);
+                break;
+              }
+            }
 	  pos += 2;
 	}
     }
@@ -254,7 +256,7 @@ int iegInqData(iegrec_t *iegp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT32));
-	  }	
+	  }
 	break;
       }
     case DOUBLE_PRECISION:
@@ -271,7 +273,7 @@ int iegInqData(iegrec_t *iegp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT64));
-	  }	
+	  }
 	break;
     default:
       {
@@ -453,13 +455,13 @@ int iegRead(int fileID, iegrec_t *iegp)
       for ( i = 0; i < 100; i++ )
 	iegp->vct[i] = (double) ((double *) tmpbuf)[i];
     }
-  
+
   /*
   fprintf(stderr, "refval %g\n", iegp->refval);
 
   for ( i = 0; i < 100; i++ )
     fprintf(stderr, "%3d %g\n", i, iegp->vct[i]);
-  
+
   {
     int i;
     for ( i = 0; i < 37; i++ )
@@ -568,7 +570,7 @@ int iegWrite(int fileID, iegrec_t *iegp)
     {
       binWriteFlt64(fileID, byteswap, 100, iegp->vct);
     }
-  
+
   binWriteF77Block(fileID, byteswap, blocklen);
 
   datasize = iegp->igdb[4]*iegp->igdb[5];
diff --git a/libcdi/src/institution.c b/libcdi/src/institution.c
index ec2f505..50ca01c 100644
--- a/libcdi/src/institution.c
+++ b/libcdi/src/institution.c
@@ -10,6 +10,7 @@
 #include "resource_unpack.h"
 #include "namespace.h"
 #include "serialize.h"
+#include "institution.h"
 
 #undef  UNDEFID
 #define UNDEFID  -1
@@ -31,18 +32,21 @@ typedef struct
 institute_t;
 
 
-static int    instituteCompareP ( void * instituteptr1, void * instituteptr2 );
-static void   instituteDestroyP ( void * instituteptr );
-static void   institutePrintP   ( void * instituteptr, FILE * fp );
-static int    instituteGetSizeP ( void * instituteptr, void *context );
+static int instituteCompareKernel(institute_t *ip1, institute_t *ip2);
+static void instituteDestroyP(institute_t *instituteptr);
+static void   institutePrintP(institute_t *instituteptr, FILE * fp);
+static int instituteGetPackSize(institute_t *instituteptr, void *context);
 static void   institutePackP    ( void * instituteptr, void *buf, int size, int *position, void *context );
 static int    instituteTxCode   ( void );
 
-resOps instituteOps = { instituteCompareP, instituteDestroyP, institutePrintP
-                        ,instituteGetSizeP, institutePackP, instituteTxCode
- };
-
-static int * instituteInitializedNsp;
+static const resOps instituteOps = {
+  (int (*)(void *, void *))instituteCompareKernel,
+  (void (*)(void *))instituteDestroyP,
+  (void (*)(void *, FILE *))institutePrintP,
+  (int (*)(void *, void *))instituteGetPackSize,
+  institutePackP,
+  instituteTxCode
+};
 
 static
 void instituteDefaultValue ( institute_t * instituteptr )
@@ -55,21 +59,6 @@ void instituteDefaultValue ( institute_t * instituteptr )
   instituteptr->longname   = NULL;
 }
 
-static
-institute_t * instituteNewEntry ( void )
-{
-  institute_t *instituteptr;
-
-  instituteptr = ( institute_t * ) xmalloc ( sizeof ( institute_t ));
-
-  instituteDefaultValue ( instituteptr );
-  instituteptr->self = reshPut (( void * ) instituteptr, &instituteOps );
-  instituteptr->used = 1;
-
-  return  instituteptr;
-}
-
-static
 void instituteDefaultEntries ( void )
 {
   cdiResH resH[64];
@@ -91,35 +80,7 @@ void instituteDefaultEntries ( void )
   /*     (void) institutDef(  0,   0, "IPSL", "IPSL (Institut Pierre Simon Laplace, Paris, France)"); */
 
   for ( i = 0; i < n ; i++ )
-    reshSetStatus(resH[i], &instituteOps, SUSPENDED);
-}
-
-static
-void instituteFinalize ( void )
-{
-  free ( instituteInitializedNsp );
-}
-
-static
-void instituteInit (void)
-{
-  static int instituteInitialized = 0;
-  int nsp, nspc;
-
-  nspc = namespaceGetNumber ();
-
-  if ( !instituteInitialized )
-    {
-      instituteInitialized = 1;
-      instituteInitializedNsp = xcalloc ( 1, nspc * sizeof ( int ));
-      atexit ( instituteFinalize );
-    }
-
-  nsp = namespaceGetActive ();
-  if ( instituteInitializedNsp[nsp] ) return;
-  instituteInitializedNsp[nsp] = 1;
-
-  instituteDefaultEntries();
+    reshSetStatus(resH[i], &instituteOps, RESH_PRE_ASSIGNED);
 }
 
 
@@ -129,7 +90,8 @@ int instituteCount ( void )
 }
 
 
-int instituteCompareKernel ( institute_t *  ip1, institute_t * ip2 )
+static int
+instituteCompareKernel(institute_t *  ip1, institute_t * ip2)
 {
   int differ = 0;
   size_t len1, len2;
@@ -168,19 +130,6 @@ int instituteCompareKernel ( institute_t *  ip1, institute_t * ip2 )
 }
 
 
-static int instituteCompareP ( void *  instituteptr1, void * instituteptr2 )
-{
-  institute_t * i1, * i2;
-
-  i1 = ( institute_t * ) instituteptr1;
-  i2 = ( institute_t * ) instituteptr2;
-
-  xassert(i1);
-  xassert(i2);
-
-  return instituteCompareKernel ( i1, i2 );
-}
-
 struct instLoc
 {
   institute_t *ip;
@@ -191,7 +140,7 @@ static enum cdiApplyRet
 findInstitute(int id, void *res, void *data)
 {
   institute_t * ip1 = ((struct instLoc *)data)->ip;
-  institute_t * ip2 = res;
+  institute_t * ip2 = (institute_t*) res;
   if (ip2->used && !instituteCompareKernel(ip1, ip2))
     {
       ((struct instLoc *)data)->id = id;
@@ -204,9 +153,7 @@ findInstitute(int id, void *res, void *data)
 
 int institutInq(int center, int subcenter, const char *name, const char *longname)
 {
-  instituteInit ();
-
-  institute_t * ip_ref = xmalloc(sizeof (*ip_ref));
+  institute_t * ip_ref = (institute_t *)xmalloc(sizeof (*ip_ref));
   ip_ref->self       = UNDEFID;
   ip_ref->used       = 0;
   ip_ref->center     = center;
@@ -222,20 +169,34 @@ int institutInq(int center, int subcenter, const char *name, const char *longnam
   return state.id;
 }
 
-
-int institutDef(int center, int subcenter, const char *name, const char *longname)
+static
+institute_t *instituteNewEntry(cdiResH resH, int center, int subcenter,
+                               const char *name, const char *longname)
 {
-  institute_t * instituteptr;
-
-  instituteInit ();
-
-  instituteptr = instituteNewEntry();
-
-  instituteptr->center    = center;
+  institute_t *instituteptr = (institute_t*) xmalloc(sizeof(institute_t));
+  instituteDefaultValue(instituteptr);
+  if (resH == CDI_UNDEFID)
+    instituteptr->self = reshPut(instituteptr, &instituteOps);
+  else
+    {
+      instituteptr->self = resH;
+      reshReplace(resH, instituteptr, &instituteOps);
+    }
+  instituteptr->used = 1;
+  instituteptr->center = center;
   instituteptr->subcenter = subcenter;
-  if ( name && *name )         instituteptr->name     = strdupx(name);
-  if ( longname && *longname ) instituteptr->longname = strdupx(longname);
+  if ( name && *name )
+    instituteptr->name = strdupx(name);
+  if (longname && *longname)
+    instituteptr->longname = strdupx(longname);
+  return  instituteptr;
+}
 
+
+int institutDef(int center, int subcenter, const char *name, const char *longname)
+{
+  institute_t * instituteptr
+    = instituteNewEntry(CDI_UNDEFID, center, subcenter, name, longname);
   return instituteptr->self;
 }
 
@@ -244,8 +205,6 @@ int institutInqCenter(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -257,8 +216,6 @@ int institutInqSubcenter(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -270,8 +227,6 @@ char *institutInqNamePtr(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -283,8 +238,6 @@ char *institutInqLongnamePtr(int instID)
 {
   institute_t * instituteptr = NULL;
 
-  instituteInit ();
-
   if ( instID != UNDEFID )
     instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
 
@@ -303,43 +256,39 @@ int institutInqNumber(void)
 {
   int instNum = 0;
 
-  instituteInit ();
-
   cdiResHFilterApply(&instituteOps, activeInstitutes, &instNum);
   return instNum;
 }
 
 
-void instituteDestroyP ( void * instituteptr )
+static void
+instituteDestroyP(institute_t *instituteptr)
 {
-  int id;
-  institute_t * i1 = ( institute_t * ) instituteptr;
-
-  xassert ( i1 );
-
-  id = i1->self;
-
-  if ( instituteptr ) free ( instituteptr );
+  xassert(instituteptr);
 
-  reshRemove ( id, &instituteOps );
+  int instituteID = instituteptr->self;
+  free(instituteptr->name);
+  free(instituteptr->longname);
+  reshRemove(instituteID, &instituteOps);
+  free(instituteptr);
 }
 
 
-void institutePrintP   ( void * instituteptr, FILE * fp )
+static void institutePrintP(institute_t *ip, FILE * fp )
 {
-  institute_t * ip = ( institute_t * ) instituteptr;
-
-  if ( !ip ) return;
-
-  fprintf ( fp, "#\n");
-  fprintf ( fp, "# instituteID %d\n", ip->self);
-  fprintf ( fp, "#\n");
-  fprintf ( fp, "self          = %d\n", ip->self );
-  fprintf ( fp, "used          = %d\n", ip->used );
-  fprintf ( fp, "center        = %d\n", ip->center );
-  fprintf ( fp, "subcenter     = %d\n", ip->subcenter );
-  fprintf ( fp, "name          = %s\n", ip->name ? ip->name : "NN" );
-  fprintf ( fp, "longname      = %s\n", ip->longname ? ip->longname : "NN" );
+  if (ip)
+    fprintf(fp, "#\n"
+            "# instituteID %d\n"
+            "#\n"
+            "self          = %d\n"
+            "used          = %d\n"
+            "center        = %d\n"
+            "subcenter     = %d\n"
+            "name          = %s\n"
+            "longname      = %s\n",
+            ip->self, ip->self, ip->used, ip->center, ip->subcenter,
+            ip->name ? ip->name : "NN",
+            ip->longname ? ip->longname : "NN");
 }
 
 
@@ -353,18 +302,17 @@ enum {
   institute_nints = 5,
 };
 
-static int instituteGetSizeP ( void * instituteptr, void *context)
+static int instituteGetPackSize(institute_t *ip, void *context)
 {
-  institute_t *p = instituteptr;
   int txsize = serializeGetSize(institute_nints, DATATYPE_INT, context)
-    + serializeGetSize(strlen(p->name) + 1, DATATYPE_TXT, context)
-    + serializeGetSize(strlen(p->longname) + 1, DATATYPE_TXT, context);
+    + serializeGetSize(strlen(ip->name) + 1, DATATYPE_TXT, context)
+    + serializeGetSize(strlen(ip->longname) + 1, DATATYPE_TXT, context);
   return txsize;
 }
 
 static void institutePackP(void * instituteptr, void *buf, int size, int *position, void *context)
 {
-  institute_t *p = instituteptr;
+  institute_t *p = (institute_t*) instituteptr;
   int tempbuf[institute_nints];
   tempbuf[0] = p->self;
   tempbuf[1] = p->center;
@@ -376,19 +324,23 @@ static void institutePackP(void * instituteptr, void *buf, int size, int *positi
   serializePack(p->longname, tempbuf[4], DATATYPE_TXT, buf, size, position, context);
 }
 
-int instituteUnpack(void *buf, int size, int *position, int nspTarget, void *context)
+int instituteUnpack(void *buf, int size, int *position, int originNamespace,
+                    void *context, int force_id)
 {
   int tempbuf[institute_nints];
   int instituteID;
   char *name, *longname;
   serializeUnpack(buf, size, position, tempbuf, institute_nints, DATATYPE_INT, context);
-  name = xmalloc(tempbuf[3]);
-  longname = xmalloc(tempbuf[4]);
+  name = (char *)xmalloc(tempbuf[3] + tempbuf[4]);
+  longname = name + tempbuf[3];
   serializeUnpack(buf, size, position, name, tempbuf[3], DATATYPE_TXT, context);
   serializeUnpack(buf, size, position, longname, tempbuf[4], DATATYPE_TXT, context);
-  instituteID = institutDef(tempbuf[1], tempbuf[2], name, longname);
-  // FIXME: this should work, once all types are transferred
-  //xassert(instituteID == tempbuf[0]);
+  int targetID = namespaceAdaptKey(tempbuf[0], originNamespace);
+  institute_t *ip = instituteNewEntry(force_id?targetID:CDI_UNDEFID,
+                                      tempbuf[1], tempbuf[2], name, longname);
+  instituteID = ip->self;
+  xassert(!force_id || instituteID == targetID);
+  free(name);
   return instituteID;
 }
 
diff --git a/libcdi/src/institution.h b/libcdi/src/institution.h
index 536695b..7df81c0 100644
--- a/libcdi/src/institution.h
+++ b/libcdi/src/institution.h
@@ -2,8 +2,10 @@
 #define INSTITUTION_H
 
 int
-instituteUnpack(void *buf, int size, int *position, int,
-                void *context);
+instituteUnpack(void *buf, int size, int *position, int originNamespace,
+                void *context, int force_id);
+
+void instituteDefaultEntries(void);
 
 #endif
 
diff --git a/libcdi/src/mo_cdi.f90 b/libcdi/src/mo_cdi.f90
index 4283635..ac377d8 100644
--- a/libcdi/src/mo_cdi.f90
+++ b/libcdi/src/mo_cdi.f90
@@ -146,6 +146,7 @@ module mo_cdi
       integer :: TSTEP_INSTANT3 = 13
       integer :: TAXIS_ABSOLUTE = 1
       integer :: TAXIS_RELATIVE = 2
+      integer :: TAXIS_FORECAST = 3
       integer :: TUNIT_SECOND = 1
       integer :: TUNIT_MINUTE = 2
       integer :: TUNIT_HOUR = 3
@@ -396,18 +397,18 @@ module mo_cdi
       end interface
   
       interface
-        subroutine streamDefCompLevel(streamID,complevel) bind(c,name='streamDefCompLevel')
+        integer(c_int) function streamInqCompType(streamID) bind(c,name='streamInqCompType')
           import :: c_int
           integer(c_int), value :: streamID
-          integer(c_int), value :: complevel
-       end subroutine streamDefCompLevel
+       end function streamInqCompType
       end interface
   
       interface
-        integer(c_int) function streamInqCompType(streamID) bind(c,name='streamInqCompType')
+        subroutine streamDefCompLevel(streamID,complevel) bind(c,name='streamDefCompLevel')
           import :: c_int
           integer(c_int), value :: streamID
-       end function streamInqCompType
+          integer(c_int), value :: complevel
+       end subroutine streamDefCompLevel
       end interface
   
       interface
@@ -426,18 +427,18 @@ module mo_cdi
       end interface
   
       interface
-        integer(c_int) function streamInqCurTimestepID(streamID) bind(c,name='streamInqCurTimestepID')
+        integer(c_int) function streamInqTimestep(streamID,tsID) bind(c,name='streamInqTimestep')
           import :: c_int
           integer(c_int), value :: streamID
-       end function streamInqCurTimestepID
+          integer(c_int), value :: tsID
+       end function streamInqTimestep
       end interface
   
       interface
-        integer(c_int) function streamInqTimestep(streamID,tsID) bind(c,name='streamInqTimestep')
+        integer(c_int) function streamInqCurTimestepID(streamID) bind(c,name='streamInqCurTimestepID')
           import :: c_int
           integer(c_int), value :: streamID
-          integer(c_int), value :: tsID
-       end function streamInqTimestep
+       end function streamInqCurTimestepID
       end interface
   
       interface
@@ -462,16 +463,6 @@ module mo_cdi
       end interface
   
       interface
-        subroutine streamReadVar(streamID,varID,data_vec,nmiss) bind(c,name='streamReadVar')
-          import :: c_int,c_double
-          integer(c_int), value :: streamID
-          integer(c_int), value :: varID
-          real(c_double), intent(out),dimension(*) :: data_vec
-          integer(c_int), intent(out) :: nmiss
-       end subroutine streamReadVar
-      end interface
-  
-      interface
         subroutine streamWriteVar(streamID,varID,data_vec,nmiss) bind(c,name='streamWriteVar')
           import :: c_int,c_double
           integer(c_int), value :: streamID
@@ -492,14 +483,13 @@ module mo_cdi
       end interface
   
       interface
-        subroutine streamReadVarSlice(streamID,varID,levelID,data_vec,nmiss) bind(c,name='streamReadVarSlice')
+        subroutine streamReadVar(streamID,varID,data_vec,nmiss) bind(c,name='streamReadVar')
           import :: c_int,c_double
           integer(c_int), value :: streamID
           integer(c_int), value :: varID
-          integer(c_int), value :: levelID
           real(c_double), intent(out),dimension(*) :: data_vec
           integer(c_int), intent(out) :: nmiss
-       end subroutine streamReadVarSlice
+       end subroutine streamReadVar
       end interface
   
       interface
@@ -525,12 +515,14 @@ module mo_cdi
       end interface
   
       interface
-        subroutine streamInqRecord(streamID,varID,levelID) bind(c,name='streamInqRecord')
-          import :: c_int
+        subroutine streamReadVarSlice(streamID,varID,levelID,data_vec,nmiss) bind(c,name='streamReadVarSlice')
+          import :: c_int,c_double
           integer(c_int), value :: streamID
-          integer(c_int), intent(out) :: varID
-          integer(c_int), intent(out) :: levelID
-       end subroutine streamInqRecord
+          integer(c_int), value :: varID
+          integer(c_int), value :: levelID
+          real(c_double), intent(out),dimension(*) :: data_vec
+          integer(c_int), intent(out) :: nmiss
+       end subroutine streamReadVarSlice
       end interface
   
       interface
@@ -543,12 +535,12 @@ module mo_cdi
       end interface
   
       interface
-        subroutine streamReadRecord(streamID,data_vec,nmiss) bind(c,name='streamReadRecord')
-          import :: c_int,c_double
+        subroutine streamInqRecord(streamID,varID,levelID) bind(c,name='streamInqRecord')
+          import :: c_int
           integer(c_int), value :: streamID
-          real(c_double), intent(out),dimension(*) :: data_vec
-          integer(c_int), intent(out) :: nmiss
-       end subroutine streamReadRecord
+          integer(c_int), intent(out) :: varID
+          integer(c_int), intent(out) :: levelID
+       end subroutine streamInqRecord
       end interface
   
       interface
@@ -570,6 +562,15 @@ module mo_cdi
       end interface
   
       interface
+        subroutine streamReadRecord(streamID,data_vec,nmiss) bind(c,name='streamReadRecord')
+          import :: c_int,c_double
+          integer(c_int), value :: streamID
+          real(c_double), intent(out),dimension(*) :: data_vec
+          integer(c_int), intent(out) :: nmiss
+       end subroutine streamReadRecord
+      end interface
+  
+      interface
         subroutine streamCopyRecord(streamIDdest,streamIDsrc) bind(c,name='streamCopyRecord')
           import :: c_int
           integer(c_int), value :: streamIDdest
@@ -892,20 +893,20 @@ module mo_cdi
       end interface
   
       interface
-        integer(c_int) function vlistInqVarTsteptype(vlistID,varID) bind(c,name='vlistInqVarTsteptype')
+        subroutine vlistDefVarTsteptype(vlistID,varID,tsteptype) bind(c,name='vlistDefVarTsteptype')
           import :: c_int
           integer(c_int), value :: vlistID
           integer(c_int), value :: varID
-       end function vlistInqVarTsteptype
+          integer(c_int), value :: tsteptype
+       end subroutine vlistDefVarTsteptype
       end interface
   
       interface
-        subroutine vlistDefVarTsteptype(vlistID,varID,tsteptype) bind(c,name='vlistDefVarTsteptype')
+        integer(c_int) function vlistInqVarTsteptype(vlistID,varID) bind(c,name='vlistInqVarTsteptype')
           import :: c_int
           integer(c_int), value :: vlistID
           integer(c_int), value :: varID
-          integer(c_int), value :: tsteptype
-       end subroutine vlistDefVarTsteptype
+       end function vlistInqVarTsteptype
       end interface
   
       interface
@@ -1722,6 +1723,14 @@ module mo_cdi
       end interface
   
       interface
+        subroutine gridInqXname(gridID,xname) bind(c,name='gridInqXname')
+          import :: c_int,c_char
+          integer(c_int), value :: gridID
+          character(c_char), dimension(*) :: xname
+       end subroutine gridInqXname
+      end interface
+  
+      interface
         subroutine gridDefXlongname(gridID,xlongname) bind(c,name='gridDefXlongname')
           import :: c_int,c_char
           integer(c_int), value :: gridID
@@ -1730,83 +1739,83 @@ module mo_cdi
       end interface
   
       interface
-        subroutine gridDefXunits(gridID,xunits) bind(c,name='gridDefXunits')
+        subroutine gridInqXlongname(gridID,xlongname) bind(c,name='gridInqXlongname')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: xunits
-       end subroutine gridDefXunits
+          character(c_char), dimension(*) :: xlongname
+       end subroutine gridInqXlongname
       end interface
   
       interface
-        subroutine gridDefYname(gridID,yname) bind(c,name='gridDefYname')
+        subroutine gridDefXunits(gridID,xunits) bind(c,name='gridDefXunits')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: yname
-       end subroutine gridDefYname
+          character(c_char), dimension(*) :: xunits
+       end subroutine gridDefXunits
       end interface
   
       interface
-        subroutine gridDefYlongname(gridID,ylongname) bind(c,name='gridDefYlongname')
+        subroutine gridInqXunits(gridID,xunits) bind(c,name='gridInqXunits')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: ylongname
-       end subroutine gridDefYlongname
+          character(c_char), dimension(*) :: xunits
+       end subroutine gridInqXunits
       end interface
   
       interface
-        subroutine gridDefYunits(gridID,yunits) bind(c,name='gridDefYunits')
+        subroutine gridDefYname(gridID,yname) bind(c,name='gridDefYname')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: yunits
-       end subroutine gridDefYunits
+          character(c_char), dimension(*) :: yname
+       end subroutine gridDefYname
       end interface
   
       interface
-        subroutine gridInqXname(gridID,xname) bind(c,name='gridInqXname')
+        subroutine gridInqYname(gridID,yname) bind(c,name='gridInqYname')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: xname
-       end subroutine gridInqXname
+          character(c_char), dimension(*) :: yname
+       end subroutine gridInqYname
       end interface
   
       interface
-        subroutine gridInqXlongname(gridID,xlongname) bind(c,name='gridInqXlongname')
+        subroutine gridDefYlongname(gridID,ylongname) bind(c,name='gridDefYlongname')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: xlongname
-       end subroutine gridInqXlongname
+          character(c_char), dimension(*) :: ylongname
+       end subroutine gridDefYlongname
       end interface
   
       interface
-        subroutine gridInqXstdname(gridID,xstdname) bind(c,name='gridInqXstdname')
+        subroutine gridInqYlongname(gridID,ylongname) bind(c,name='gridInqYlongname')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: xstdname
-       end subroutine gridInqXstdname
+          character(c_char), dimension(*) :: ylongname
+       end subroutine gridInqYlongname
       end interface
   
       interface
-        subroutine gridInqXunits(gridID,xunits) bind(c,name='gridInqXunits')
+        subroutine gridDefYunits(gridID,yunits) bind(c,name='gridDefYunits')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: xunits
-       end subroutine gridInqXunits
+          character(c_char), dimension(*) :: yunits
+       end subroutine gridDefYunits
       end interface
   
       interface
-        subroutine gridInqYname(gridID,yname) bind(c,name='gridInqYname')
+        subroutine gridInqYunits(gridID,yunits) bind(c,name='gridInqYunits')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: yname
-       end subroutine gridInqYname
+          character(c_char), dimension(*) :: yunits
+       end subroutine gridInqYunits
       end interface
   
       interface
-        subroutine gridInqYlongname(gridID,ylongname) bind(c,name='gridInqYlongname')
+        subroutine gridInqXstdname(gridID,xstdname) bind(c,name='gridInqXstdname')
           import :: c_int,c_char
           integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: ylongname
-       end subroutine gridInqYlongname
+          character(c_char), dimension(*) :: xstdname
+       end subroutine gridInqXstdname
       end interface
   
       interface
@@ -1818,14 +1827,6 @@ module mo_cdi
       end interface
   
       interface
-        subroutine gridInqYunits(gridID,yunits) bind(c,name='gridInqYunits')
-          import :: c_int,c_char
-          integer(c_int), value :: gridID
-          character(c_char), dimension(*) :: yunits
-       end subroutine gridInqYunits
-      end interface
-  
-      interface
         subroutine gridDefPrec(gridID,prec) bind(c,name='gridDefPrec')
           import :: c_int
           integer(c_int), value :: gridID
@@ -1885,13 +1886,6 @@ module mo_cdi
       end interface
   
       interface
-        real(c_double) function gridInqXpole(gridID) bind(c,name='gridInqXpole')
-          import :: c_int,c_double
-          integer(c_int), value :: gridID
-       end function gridInqXpole
-      end interface
-  
-      interface
         subroutine gridDefXpole(gridID,xpole) bind(c,name='gridDefXpole')
           import :: c_int,c_double
           integer(c_int), value :: gridID
@@ -1900,10 +1894,10 @@ module mo_cdi
       end interface
   
       interface
-        real(c_double) function gridInqYpole(gridID) bind(c,name='gridInqYpole')
+        real(c_double) function gridInqXpole(gridID) bind(c,name='gridInqXpole')
           import :: c_int,c_double
           integer(c_int), value :: gridID
-       end function gridInqYpole
+       end function gridInqXpole
       end interface
   
       interface
@@ -1915,10 +1909,10 @@ module mo_cdi
       end interface
   
       interface
-        real(c_double) function gridInqAngle(gridID) bind(c,name='gridInqAngle')
+        real(c_double) function gridInqYpole(gridID) bind(c,name='gridInqYpole')
           import :: c_int,c_double
           integer(c_int), value :: gridID
-       end function gridInqAngle
+       end function gridInqYpole
       end interface
   
       interface
@@ -1930,11 +1924,10 @@ module mo_cdi
       end interface
   
       interface
-        subroutine gridDefTrunc(gridID,trunc) bind(c,name='gridDefTrunc')
-          import :: c_int
+        real(c_double) function gridInqAngle(gridID) bind(c,name='gridInqAngle')
+          import :: c_int,c_double
           integer(c_int), value :: gridID
-          integer(c_int), value :: trunc
-       end subroutine gridDefTrunc
+       end function gridInqAngle
       end interface
   
       interface
@@ -1945,10 +1938,11 @@ module mo_cdi
       end interface
   
       interface
-        integer(c_int) function gridInqGMEnd(gridID) bind(c,name='gridInqGMEnd')
+        subroutine gridDefTrunc(gridID,trunc) bind(c,name='gridDefTrunc')
           import :: c_int
           integer(c_int), value :: gridID
-       end function gridInqGMEnd
+          integer(c_int), value :: trunc
+       end subroutine gridDefTrunc
       end interface
   
       interface
@@ -1960,10 +1954,10 @@ module mo_cdi
       end interface
   
       interface
-        integer(c_int) function gridInqGMEni(gridID) bind(c,name='gridInqGMEni')
+        integer(c_int) function gridInqGMEnd(gridID) bind(c,name='gridInqGMEnd')
           import :: c_int
           integer(c_int), value :: gridID
-       end function gridInqGMEni
+       end function gridInqGMEnd
       end interface
   
       interface
@@ -1975,10 +1969,10 @@ module mo_cdi
       end interface
   
       interface
-        integer(c_int) function gridInqGMEni2(gridID) bind(c,name='gridInqGMEni2')
+        integer(c_int) function gridInqGMEni(gridID) bind(c,name='gridInqGMEni')
           import :: c_int
           integer(c_int), value :: gridID
-       end function gridInqGMEni2
+       end function gridInqGMEni
       end interface
   
       interface
@@ -1990,10 +1984,10 @@ module mo_cdi
       end interface
   
       interface
-        integer(c_int) function gridInqGMEni3(gridID) bind(c,name='gridInqGMEni3')
+        integer(c_int) function gridInqGMEni2(gridID) bind(c,name='gridInqGMEni2')
           import :: c_int
           integer(c_int), value :: gridID
-       end function gridInqGMEni3
+       end function gridInqGMEni2
       end interface
   
       interface
@@ -2005,6 +1999,13 @@ module mo_cdi
       end interface
   
       interface
+        integer(c_int) function gridInqGMEni3(gridID) bind(c,name='gridInqGMEni3')
+          import :: c_int
+          integer(c_int), value :: gridID
+       end function gridInqGMEni3
+      end interface
+  
+      interface
         subroutine gridDefNumber(gridID,number) bind(c,name='gridDefNumber')
           import :: c_int
           integer(c_int), value :: gridID
@@ -2399,27 +2400,19 @@ module mo_cdi
       end interface
   
       interface
-        subroutine zaxisDefLongname(zaxisID,longname) bind(c,name='zaxisDefLongname')
-          import :: c_int,c_char
-          integer(c_int), value :: zaxisID
-          character(c_char), dimension(*) :: longname
-       end subroutine zaxisDefLongname
-      end interface
-  
-      interface
-        subroutine zaxisDefUnits(zaxisID,units) bind(c,name='zaxisDefUnits')
+        subroutine zaxisInqName(zaxisID,name) bind(c,name='zaxisInqName')
           import :: c_int,c_char
           integer(c_int), value :: zaxisID
-          character(c_char), dimension(*) :: units
-       end subroutine zaxisDefUnits
+          character(c_char), dimension(*) :: name
+       end subroutine zaxisInqName
       end interface
   
       interface
-        subroutine zaxisInqName(zaxisID,name) bind(c,name='zaxisInqName')
+        subroutine zaxisDefLongname(zaxisID,longname) bind(c,name='zaxisDefLongname')
           import :: c_int,c_char
           integer(c_int), value :: zaxisID
-          character(c_char), dimension(*) :: name
-       end subroutine zaxisInqName
+          character(c_char), dimension(*) :: longname
+       end subroutine zaxisDefLongname
       end interface
   
       interface
@@ -2431,11 +2424,11 @@ module mo_cdi
       end interface
   
       interface
-        subroutine zaxisInqStdname(zaxisID,stdname) bind(c,name='zaxisInqStdname')
+        subroutine zaxisDefUnits(zaxisID,units) bind(c,name='zaxisDefUnits')
           import :: c_int,c_char
           integer(c_int), value :: zaxisID
-          character(c_char), dimension(*) :: stdname
-       end subroutine zaxisInqStdname
+          character(c_char), dimension(*) :: units
+       end subroutine zaxisDefUnits
       end interface
   
       interface
@@ -2447,6 +2440,14 @@ module mo_cdi
       end interface
   
       interface
+        subroutine zaxisInqStdname(zaxisID,stdname) bind(c,name='zaxisInqStdname')
+          import :: c_int,c_char
+          integer(c_int), value :: zaxisID
+          character(c_char), dimension(*) :: stdname
+       end subroutine zaxisInqStdname
+      end interface
+  
+      interface
         subroutine zaxisDefPrec(zaxisID,prec) bind(c,name='zaxisDefPrec')
           import :: c_int
           integer(c_int), value :: zaxisID
@@ -2530,27 +2531,19 @@ module mo_cdi
       end interface
   
       interface
-        integer(c_int) function zaxisInqLbounds(zaxisID,lbounds_vec) bind(c,name='zaxisInqLbounds')
-          import :: c_int,c_double
-          integer(c_int), value :: zaxisID
-          real(c_double), intent(out),dimension(*) :: lbounds_vec
-       end function zaxisInqLbounds
-      end interface
-  
-      interface
-        integer(c_int) function zaxisInqUbounds(zaxisID,ubounds_vec) bind(c,name='zaxisInqUbounds')
+        subroutine zaxisDefLbounds(zaxisID,lbounds_vec) bind(c,name='zaxisDefLbounds')
           import :: c_int,c_double
           integer(c_int), value :: zaxisID
-          real(c_double), intent(out),dimension(*) :: ubounds_vec
-       end function zaxisInqUbounds
+          real(c_double), intent(in),dimension(*) :: lbounds_vec
+       end subroutine zaxisDefLbounds
       end interface
   
       interface
-        integer(c_int) function zaxisInqWeights(zaxisID,weights_vec) bind(c,name='zaxisInqWeights')
+        integer(c_int) function zaxisInqLbounds(zaxisID,lbounds_vec) bind(c,name='zaxisInqLbounds')
           import :: c_int,c_double
           integer(c_int), value :: zaxisID
-          real(c_double), intent(out),dimension(*) :: weights_vec
-       end function zaxisInqWeights
+          real(c_double), intent(out),dimension(*) :: lbounds_vec
+       end function zaxisInqLbounds
       end interface
   
       interface
@@ -2562,27 +2555,27 @@ module mo_cdi
       end interface
   
       interface
-        real(c_double) function zaxisInqUbound(zaxisID,index) bind(c,name='zaxisInqUbound')
+        subroutine zaxisDefUbounds(zaxisID,ubounds_vec) bind(c,name='zaxisDefUbounds')
           import :: c_int,c_double
           integer(c_int), value :: zaxisID
-          integer(c_int), value :: index
-       end function zaxisInqUbound
+          real(c_double), intent(in),dimension(*) :: ubounds_vec
+       end subroutine zaxisDefUbounds
       end interface
   
       interface
-        subroutine zaxisDefLbounds(zaxisID,lbounds_vec) bind(c,name='zaxisDefLbounds')
+        integer(c_int) function zaxisInqUbounds(zaxisID,ubounds_vec) bind(c,name='zaxisInqUbounds')
           import :: c_int,c_double
           integer(c_int), value :: zaxisID
-          real(c_double), intent(in),dimension(*) :: lbounds_vec
-       end subroutine zaxisDefLbounds
+          real(c_double), intent(out),dimension(*) :: ubounds_vec
+       end function zaxisInqUbounds
       end interface
   
       interface
-        subroutine zaxisDefUbounds(zaxisID,ubounds_vec) bind(c,name='zaxisDefUbounds')
+        real(c_double) function zaxisInqUbound(zaxisID,index) bind(c,name='zaxisInqUbound')
           import :: c_int,c_double
           integer(c_int), value :: zaxisID
-          real(c_double), intent(in),dimension(*) :: ubounds_vec
-       end subroutine zaxisDefUbounds
+          integer(c_int), value :: index
+       end function zaxisInqUbound
       end interface
   
       interface
@@ -2594,6 +2587,14 @@ module mo_cdi
       end interface
   
       interface
+        integer(c_int) function zaxisInqWeights(zaxisID,weights_vec) bind(c,name='zaxisInqWeights')
+          import :: c_int,c_double
+          integer(c_int), value :: zaxisID
+          real(c_double), intent(out),dimension(*) :: weights_vec
+       end function zaxisInqWeights
+      end interface
+  
+      interface
         subroutine zaxisChangeType(zaxisID,zaxistype) bind(c,name='zaxisChangeType')
           import :: c_int
           integer(c_int), value :: zaxisID
@@ -2655,6 +2656,20 @@ module mo_cdi
       end interface
   
       interface
+        integer(c_int) function taxisInqVdate(taxisID) bind(c,name='taxisInqVdate')
+          import :: c_int
+          integer(c_int), value :: taxisID
+       end function taxisInqVdate
+      end interface
+  
+      interface
+        integer(c_int) function taxisInqVtime(taxisID) bind(c,name='taxisInqVtime')
+          import :: c_int
+          integer(c_int), value :: taxisID
+       end function taxisInqVtime
+      end interface
+  
+      interface
         subroutine taxisDefRdate(taxisID,date) bind(c,name='taxisDefRdate')
           import :: c_int
           integer(c_int), value :: taxisID
@@ -2671,6 +2686,50 @@ module mo_cdi
       end interface
   
       interface
+        integer(c_int) function taxisInqRdate(taxisID) bind(c,name='taxisInqRdate')
+          import :: c_int
+          integer(c_int), value :: taxisID
+       end function taxisInqRdate
+      end interface
+  
+      interface
+        integer(c_int) function taxisInqRtime(taxisID) bind(c,name='taxisInqRtime')
+          import :: c_int
+          integer(c_int), value :: taxisID
+       end function taxisInqRtime
+      end interface
+  
+      interface
+        subroutine taxisDefFdate(taxisID,date) bind(c,name='taxisDefFdate')
+          import :: c_int
+          integer(c_int), value :: taxisID
+          integer(c_int), value :: date
+       end subroutine taxisDefFdate
+      end interface
+  
+      interface
+        subroutine taxisDefFtime(taxisID,time) bind(c,name='taxisDefFtime')
+          import :: c_int
+          integer(c_int), value :: taxisID
+          integer(c_int), value :: time
+       end subroutine taxisDefFtime
+      end interface
+  
+      interface
+        integer(c_int) function taxisInqFdate(taxisID) bind(c,name='taxisInqFdate')
+          import :: c_int
+          integer(c_int), value :: taxisID
+       end function taxisInqFdate
+      end interface
+  
+      interface
+        integer(c_int) function taxisInqFtime(taxisID) bind(c,name='taxisInqFtime')
+          import :: c_int
+          integer(c_int), value :: taxisID
+       end function taxisInqFtime
+      end interface
+  
+      interface
         integer(c_int) function taxisHasBounds(taxisID) bind(c,name='taxisHasBounds')
           import :: c_int
           integer(c_int), value :: taxisID
@@ -2729,68 +2788,70 @@ module mo_cdi
       end interface
   
       interface
-        subroutine taxisDefTunit(taxisID,tunit) bind(c,name='taxisDefTunit')
+        integer(c_int) function taxisInqCalendar(taxisID) bind(c,name='taxisInqCalendar')
           import :: c_int
           integer(c_int), value :: taxisID
-          integer(c_int), value :: tunit
-       end subroutine taxisDefTunit
+       end function taxisInqCalendar
       end interface
   
       interface
-        subroutine taxisDefNumavg(taxisID,numavg) bind(c,name='taxisDefNumavg')
+        subroutine taxisDefTunit(taxisID,tunit) bind(c,name='taxisDefTunit')
           import :: c_int
           integer(c_int), value :: taxisID
-          integer(c_int), value :: numavg
-       end subroutine taxisDefNumavg
+          integer(c_int), value :: tunit
+       end subroutine taxisDefTunit
       end interface
   
       interface
-        integer(c_int) function taxisInqType(taxisID) bind(c,name='taxisInqType')
+        integer(c_int) function taxisInqTunit(taxisID) bind(c,name='taxisInqTunit')
           import :: c_int
           integer(c_int), value :: taxisID
-       end function taxisInqType
+       end function taxisInqTunit
       end interface
   
       interface
-        integer(c_int) function taxisInqVdate(taxisID) bind(c,name='taxisInqVdate')
+        subroutine taxisDefForecastTunit(taxisID,tunit) bind(c,name='taxisDefForecastTunit')
           import :: c_int
           integer(c_int), value :: taxisID
-       end function taxisInqVdate
+          integer(c_int), value :: tunit
+       end subroutine taxisDefForecastTunit
       end interface
   
       interface
-        integer(c_int) function taxisInqVtime(taxisID) bind(c,name='taxisInqVtime')
+        integer(c_int) function taxisInqForecastTunit(taxisID) bind(c,name='taxisInqForecastTunit')
           import :: c_int
           integer(c_int), value :: taxisID
-       end function taxisInqVtime
+       end function taxisInqForecastTunit
       end interface
   
       interface
-        integer(c_int) function taxisInqRdate(taxisID) bind(c,name='taxisInqRdate')
-          import :: c_int
+        subroutine taxisDefForecastPeriod(taxisID,fc_period) bind(c,name='taxisDefForecastPeriod')
+          import :: c_int,c_double
           integer(c_int), value :: taxisID
-       end function taxisInqRdate
+          real(c_double), value :: fc_period
+       end subroutine taxisDefForecastPeriod
       end interface
   
       interface
-        integer(c_int) function taxisInqRtime(taxisID) bind(c,name='taxisInqRtime')
-          import :: c_int
+        real(c_double) function taxisInqForecastPeriod(taxisID) bind(c,name='taxisInqForecastPeriod')
+          import :: c_int,c_double
           integer(c_int), value :: taxisID
-       end function taxisInqRtime
+       end function taxisInqForecastPeriod
       end interface
   
       interface
-        integer(c_int) function taxisInqCalendar(taxisID) bind(c,name='taxisInqCalendar')
+        subroutine taxisDefNumavg(taxisID,numavg) bind(c,name='taxisDefNumavg')
           import :: c_int
           integer(c_int), value :: taxisID
-       end function taxisInqCalendar
+          integer(c_int), value :: numavg
+       end subroutine taxisDefNumavg
       end interface
   
       interface
-        integer(c_int) function taxisInqTunit(taxisID) bind(c,name='taxisInqTunit')
+        integer(c_int) function taxisInqType(taxisID) bind(c,name='taxisInqType')
           import :: c_int
           integer(c_int), value :: taxisID
-       end function taxisInqTunit
+       end function taxisInqType
       end interface
   
       interface
@@ -3105,26 +3166,26 @@ module mo_cdi
       public :: streamDefByteorder
       public :: streamInqByteorder
       public :: streamDefCompType
-      public :: streamDefCompLevel
       public :: streamInqCompType
+      public :: streamDefCompLevel
       public :: streamInqCompLevel
       public :: streamDefTimestep
-      public :: streamInqCurTimestepID
       public :: streamInqTimestep
+      public :: streamInqCurTimestepID
       public :: streamFilename
       public :: streamFilesuffix
       public :: streamNtsteps
-      public :: streamReadVar
       public :: streamWriteVar
       public :: streamWriteVarF
-      public :: streamReadVarSlice
+      public :: streamReadVar
       public :: streamWriteVarSlice
       public :: streamWriteVarSliceF
-      public :: streamInqRecord
+      public :: streamReadVarSlice
       public :: streamDefRecord
-      public :: streamReadRecord
+      public :: streamInqRecord
       public :: streamWriteRecord
       public :: streamWriteRecordF
+      public :: streamReadRecord
       public :: streamCopyRecord
       public :: vlistCreate
       public :: vlistDestroy
@@ -3166,8 +3227,8 @@ module mo_cdi
       public :: vlistInqVarGrid
       public :: vlistInqVarZaxis
       public :: vlistInqVarID
-      public :: vlistInqVarTsteptype
       public :: vlistDefVarTsteptype
+      public :: vlistInqVarTsteptype
       public :: vlistDefVarCompType
       public :: vlistInqVarCompType
       public :: vlistDefVarCompLevel
@@ -3262,19 +3323,19 @@ module mo_cdi
       public :: gridDefYvals
       public :: gridInqYvals
       public :: gridDefXname
+      public :: gridInqXname
       public :: gridDefXlongname
+      public :: gridInqXlongname
       public :: gridDefXunits
+      public :: gridInqXunits
       public :: gridDefYname
+      public :: gridInqYname
       public :: gridDefYlongname
+      public :: gridInqYlongname
       public :: gridDefYunits
-      public :: gridInqXname
-      public :: gridInqXlongname
+      public :: gridInqYunits
       public :: gridInqXstdname
-      public :: gridInqXunits
-      public :: gridInqYname
-      public :: gridInqYlongname
       public :: gridInqYstdname
-      public :: gridInqYunits
       public :: gridDefPrec
       public :: gridInqPrec
       public :: gridInqXval
@@ -3283,22 +3344,22 @@ module mo_cdi
       public :: gridInqYinc
       public :: gridIsCircular
       public :: gridIsRotated
-      public :: gridInqXpole
       public :: gridDefXpole
-      public :: gridInqYpole
+      public :: gridInqXpole
       public :: gridDefYpole
-      public :: gridInqAngle
+      public :: gridInqYpole
       public :: gridDefAngle
-      public :: gridDefTrunc
+      public :: gridInqAngle
       public :: gridInqTrunc
-      public :: gridInqGMEnd
+      public :: gridDefTrunc
       public :: gridDefGMEnd
-      public :: gridInqGMEni
+      public :: gridInqGMEnd
       public :: gridDefGMEni
-      public :: gridInqGMEni2
+      public :: gridInqGMEni
       public :: gridDefGMEni2
-      public :: gridInqGMEni3
+      public :: gridInqGMEni2
       public :: gridDefGMEni3
+      public :: gridInqGMEni3
       public :: gridDefNumber
       public :: gridInqNumber
       public :: gridDefPosition
@@ -3346,12 +3407,12 @@ module mo_cdi
       public :: zaxisDefUUID
       public :: zaxisInqUUID
       public :: zaxisDefName
-      public :: zaxisDefLongname
-      public :: zaxisDefUnits
       public :: zaxisInqName
+      public :: zaxisDefLongname
       public :: zaxisInqLongname
-      public :: zaxisInqStdname
+      public :: zaxisDefUnits
       public :: zaxisInqUnits
+      public :: zaxisInqStdname
       public :: zaxisDefPrec
       public :: zaxisInqPrec
       public :: zaxisDefPositive
@@ -3363,14 +3424,14 @@ module mo_cdi
       public :: zaxisInqVct
       public :: zaxisInqVctSize
       public :: zaxisInqVctPtr
+      public :: zaxisDefLbounds
       public :: zaxisInqLbounds
-      public :: zaxisInqUbounds
-      public :: zaxisInqWeights
       public :: zaxisInqLbound
-      public :: zaxisInqUbound
-      public :: zaxisDefLbounds
       public :: zaxisDefUbounds
+      public :: zaxisInqUbounds
+      public :: zaxisInqUbound
       public :: zaxisDefWeights
+      public :: zaxisInqWeights
       public :: zaxisChangeType
       public :: taxisCreate
       public :: taxisDestroy
@@ -3379,8 +3440,16 @@ module mo_cdi
       public :: taxisDefType
       public :: taxisDefVdate
       public :: taxisDefVtime
+      public :: taxisInqVdate
+      public :: taxisInqVtime
       public :: taxisDefRdate
       public :: taxisDefRtime
+      public :: taxisInqRdate
+      public :: taxisInqRtime
+      public :: taxisDefFdate
+      public :: taxisDefFtime
+      public :: taxisInqFdate
+      public :: taxisInqFtime
       public :: taxisHasBounds
       public :: taxisDeleteBounds
       public :: taxisDefVdateBounds
@@ -3388,15 +3457,15 @@ module mo_cdi
       public :: taxisInqVdateBounds
       public :: taxisInqVtimeBounds
       public :: taxisDefCalendar
+      public :: taxisInqCalendar
       public :: taxisDefTunit
+      public :: taxisInqTunit
+      public :: taxisDefForecastTunit
+      public :: taxisInqForecastTunit
+      public :: taxisDefForecastPeriod
+      public :: taxisInqForecastPeriod
       public :: taxisDefNumavg
       public :: taxisInqType
-      public :: taxisInqVdate
-      public :: taxisInqVtime
-      public :: taxisInqRdate
-      public :: taxisInqRtime
-      public :: taxisInqCalendar
-      public :: taxisInqTunit
       public :: taxisInqNumavg
       public :: tunitNamePtr
       public :: institutDef
@@ -3574,6 +3643,7 @@ module mo_cdi
       public :: TSTEP_INSTANT3
       public :: TAXIS_ABSOLUTE
       public :: TAXIS_RELATIVE
+      public :: TAXIS_FORECAST
       public :: TUNIT_SECOND
       public :: TUNIT_MINUTE
       public :: TUNIT_HOUR
diff --git a/libcdi/src/model.c b/libcdi/src/model.c
index a907195..1b101d8 100644
--- a/libcdi/src/model.c
+++ b/libcdi/src/model.c
@@ -29,7 +29,6 @@ model_t;
 
 
 static int  MODEL_Debug = 0;   /* If set to 1, debugging */
-static int * modelInitializedNsp;
 
 static void modelInit(void);
 
@@ -42,8 +41,13 @@ static void   modelPackP    ( void * modelptr, void * buff, int size,
                               int *position, void *context);
 static int    modelTxCode   ( void );
 
-resOps modelOps = { modelCompareP, modelDestroyP, modelPrintP
-                    , modelGetSizeP, modelPackP, modelTxCode
+static const resOps modelOps = {
+  modelCompareP,
+  modelDestroyP,
+  modelPrintP,
+  modelGetSizeP,
+  modelPackP,
+  modelTxCode
 };
 
 static
@@ -56,27 +60,33 @@ void modelDefaultValue ( model_t *modelptr )
   modelptr->name        = NULL;
 }
 
-static
-model_t *modelNewEntry ( void )
+static model_t *
+modelNewEntry(cdiResH resH, int instID, int modelgribID, const char *name)
 {
   model_t *modelptr;
 
   modelptr = (model_t *) xmalloc(sizeof(model_t));
   modelDefaultValue ( modelptr );
-  modelptr->self = reshPut (( void * ) modelptr, &modelOps );
+  if (resH == CDI_UNDEFID)
+    modelptr->self = reshPut(modelptr, &modelOps);
+  else
+    {
+      modelptr->self = resH;
+      reshReplace(resH, modelptr, &modelOps);
+    }
   modelptr->used = 1;
+  modelptr->instID = instID;
+  modelptr->modelgribID = modelgribID;
+  if ( name && *name ) modelptr->name = strdupx(name);
 
   return (modelptr);
 }
 
-
-int modelDef(int instID, int modelgribID, const char *name);
-
-static
 void modelDefaultEntries ( void )
 {
   int instID, i;
-  cdiResH resH[10];
+  enum { nDefModels = 10 };
+  cdiResH resH[nDefModels];
 
   instID  = institutInq(  0,   0, "ECMWF", NULL);
   /* (void)    modelDef(instID, 131, "ERA15"); */
@@ -102,42 +112,21 @@ void modelDefaultEntries ( void )
 
   instID  = institutInq(  0,   1, "NCEP", NULL);
   resH[9] = modelDef(instID,  80, "T62L28MRF");
-  
-  for ( i = 0; i < 10 ; i++ )
-    reshSetStatus(resH[i], &modelOps, SUSPENDED);
-}
 
-static
-void modelFinalize ( void )
-{
-  free (   modelInitializedNsp );
+  for ( i = 0; i < nDefModels ; i++ )
+    reshSetStatus(resH[i], &modelOps, RESH_PRE_ASSIGNED);
 }
 
 static
 void modelInit(void)
 {
   static int modelInitialized = 0;
-  int nsp, nspc;
-  char *env;
 
-  nspc = namespaceGetNumber ();
-  
-  if ( !modelInitialized )
-    {
-      modelInitialized = 1;
-      modelInitializedNsp = xcalloc ( 1, nspc * sizeof ( int ));
-      atexit ( modelFinalize );
-      env = getenv("MODEL_DEBUG");
-      if ( env ) MODEL_Debug = atoi(env);  
-    }
+  if (modelInitialized) return;
 
-  nsp = namespaceGetActive ();
-  
-  if ( modelInitializedNsp[nsp] ) return;
-  
-  modelInitializedNsp[nsp] = 1;
-  
-  modelDefaultEntries ();
+  modelInitialized = 1;
+  char *env = getenv("MODEL_DEBUG");
+  if ( env ) MODEL_Debug = atoi(env);
 }
 
 int modelSize ( void )
@@ -154,8 +143,8 @@ struct modelLoc
 static enum cdiApplyRet
 findModelByID(int resID, void *res, void *data)
 {
-  model_t *modelptr = res;
-  struct modelLoc *ret = data;
+  model_t *modelptr = (model_t*) res;
+  struct modelLoc *ret = (struct modelLoc*) data;
   int instID = ret->instID, modelgribID = ret->modelgribID;
   if (modelptr->used
       && modelptr->instID == instID
@@ -171,8 +160,8 @@ findModelByID(int resID, void *res, void *data)
 static enum cdiApplyRet
 findModelByName(int resID, void *res, void *data)
 {
-  model_t *modelptr = res;
-  struct modelLoc *ret = data;
+  model_t *modelptr = (model_t*) res;
+  struct modelLoc *ret = (struct modelLoc*) data;
   int instID = ret->instID, modelgribID = ret->modelgribID;
   const char *name = ret->name;
   if (modelptr->used
@@ -213,11 +202,7 @@ int modelDef(int instID, int modelgribID, const char *name)
 
   modelInit ();
 
-  modelptr = modelNewEntry();
-
-  modelptr->instID      = instID;
-  modelptr->modelgribID = modelgribID;
-  if ( name && *name ) modelptr->name = strdupx(name);
+  modelptr = modelNewEntry(CDI_UNDEFID, instID, modelgribID, name);
 
   return modelptr->self;
 }
@@ -270,12 +255,16 @@ int  modelCompareP ( void * modelptr1, void * modelptr2 )
 
 void modelDestroyP ( void * modelptr )
 {
+  model_t *mp = (model_t*) modelptr;
+  if (mp->name)
+    free(mp->name);
+  free(mp);
 }
 
 
 void modelPrintP   ( void * modelptr, FILE * fp )
 {
-  model_t * mp = ( model_t * ) modelptr;
+  model_t *mp = (model_t*) modelptr;
 
   if ( !mp ) return;
 
@@ -303,7 +292,7 @@ enum {
 
 static int modelGetSizeP(void * modelptr, void *context)
 {
-  model_t *p = modelptr;
+  model_t *p = (model_t*) modelptr;
   int txsize = serializeGetSize(model_nints, DATATYPE_INT, context)
     + serializeGetSize(p->name?strlen(p->name) + 1:0, DATATYPE_TXT, context);
   return txsize;
@@ -312,7 +301,7 @@ static int modelGetSizeP(void * modelptr, void *context)
 
 static void modelPackP(void * modelptr, void * buf, int size, int *position, void *context)
 {
-  model_t *p = modelptr;
+  model_t *p = (model_t*) modelptr;
   int tempbuf[model_nints];
   tempbuf[0] = p->self;
   tempbuf[1] = p->instID;
@@ -324,25 +313,30 @@ static void modelPackP(void * modelptr, void * buf, int size, int *position, voi
 }
 
 int
-modelUnpack(void *buf, int size, int *position, int nspTarget, void *context)
+modelUnpack(void *buf, int size, int *position, int originNamespace, void *context,
+            int force_id)
 {
   int tempbuf[model_nints];
-  int modelID;
   char *name;
   serializeUnpack(buf, size, position, tempbuf, model_nints, DATATYPE_INT, context);
   if (tempbuf[3] != 0)
     {
-      name = xmalloc(tempbuf[3]);
+      name = (char*) xmalloc(tempbuf[3]);
       serializeUnpack(buf, size, position, name, tempbuf[3], DATATYPE_TXT, context);
     }
   else
     {
       name = "";
     }
-  modelID = modelDef( namespaceAdaptKey ( tempbuf[1], nspTarget ), tempbuf[2], name);
-  // FIXME: this should work, once all types are transferred
-  //assert(modelID == tempbuf[0]);
-  return modelID;
+  int targetID = namespaceAdaptKey(tempbuf[0], originNamespace);
+  model_t *mp = modelNewEntry(force_id?targetID:CDI_UNDEFID,
+                              namespaceAdaptKey(tempbuf[1], originNamespace),
+                              tempbuf[2], name);
+  if (tempbuf[3] != 0)
+    free(name);
+  xassert(!force_id
+          || (mp->self == namespaceAdaptKey(tempbuf[0], originNamespace)));
+  return mp->self;
 }
 
 /*
diff --git a/libcdi/src/model.h b/libcdi/src/model.h
index ebee758..461830b 100644
--- a/libcdi/src/model.h
+++ b/libcdi/src/model.h
@@ -3,7 +3,9 @@
 
 int
 modelUnpack(void *buf, int size, int *position,
-            int, void *context);
+            int originNamespace, void *context, int force_id);
+
+void modelDefaultEntries(void);
 
 #endif
 /*
diff --git a/libcdi/src/namespace.c b/libcdi/src/namespace.c
index bd62c22..387dce2 100644
--- a/libcdi/src/namespace.c
+++ b/libcdi/src/namespace.c
@@ -79,7 +79,7 @@ static const union namespaceSwitchValue defaultSwitches[NUM_NAMESPACE_SWITCH] =
     }
 #endif
 
-struct namespace
+struct Namespace
 {
   statusCode resStage;
   union namespaceSwitchValue switches[NUM_NAMESPACE_SWITCH];
@@ -111,7 +111,7 @@ struct namespace
 #endif
 };
 
-struct namespace *namespaces = &initialNamespace;
+struct Namespace *namespaces = &initialNamespace;
 
 static int namespacesSize = 1;
 
@@ -202,8 +202,7 @@ namespaceNew()
   else if (namespacesSize == 1)
     {
       /* make room for additional namespace */
-      struct namespace *newNameSpaces
-        = xmalloc((namespacesSize + 1) * sizeof (namespaces[0]));
+      struct Namespace *newNameSpaces = (struct Namespace*) xmalloc((namespacesSize + 1) * sizeof (namespaces[0]));
       memcpy(newNameSpaces, namespaces, sizeof (namespaces[0]));
       namespaces = newNameSpaces;
       ++namespacesSize;
@@ -213,8 +212,7 @@ namespaceNew()
     {
       /* make room for additional namespace */
       newNamespaceID = namespacesSize;
-      namespaces
-        = xrealloc(namespaces, (namespacesSize + 1) * sizeof (namespaces[0]));
+      namespaces = (struct Namespace*) xrealloc(namespaces, (namespacesSize + 1) * sizeof (namespaces[0]));
       ++namespacesSize;
     }
   else /* implicit: namespacesSize >= NUM_NAMESPACES */
@@ -269,17 +267,17 @@ int namespaceGetActive ()
   return activeNamespace;
 }
 
-int namespaceAdaptKey ( int key, int nspTarget )
+int namespaceAdaptKey ( int originResH, int originNamespace )
 {
   namespaceTuple_t tin;
   int nsp;
 
-  if ( key == CDI_UNDEFID ) return CDI_UNDEFID;
+  if ( originResH == CDI_UNDEFID ) return CDI_UNDEFID;
 
-  tin.idx = key & idxmask;
-  tin.nsp = (int)(((unsigned)( key & nspmask )) >> idxbits);
+  tin.idx = originResH & idxmask;
+  tin.nsp = (int)(((unsigned)( originResH & nspmask )) >> idxbits);
 
-  xassert ( tin.nsp == nspTarget );
+  xassert ( tin.nsp == originNamespace );
 
   nsp = namespaceGetActive ();
 
@@ -287,15 +285,15 @@ int namespaceAdaptKey ( int key, int nspTarget )
 }
 
 
-int namespaceAdaptKey2 ( int key )
+int namespaceAdaptKey2 ( int originResH )
 {
   namespaceTuple_t tin;
   int nsp;
 
-  if ( key == CDI_UNDEFID ) return CDI_UNDEFID;
+  if ( originResH == CDI_UNDEFID ) return CDI_UNDEFID;
 
-  tin.idx = key & idxmask;
-  tin.nsp = (int)(((unsigned)( key & nspmask )) >> idxbits);
+  tin.idx = originResH & idxmask;
+  tin.nsp = (int)(((unsigned)( originResH & nspmask )) >> idxbits);
 
   nsp = namespaceGetActive ();
 
diff --git a/libcdi/src/namespace.h b/libcdi/src/namespace.h
index 3834bdd..79847ce 100644
--- a/libcdi/src/namespace.h
+++ b/libcdi/src/namespace.h
@@ -65,7 +65,7 @@ int              namespaceGetActive    ( void );
 int              namespaceIdxEncode    ( namespaceTuple_t );
 int              namespaceIdxEncode2   ( int, int );
 namespaceTuple_t namespaceResHDecode   ( int );
-int              namespaceAdaptKey     ( int, int );
+int              namespaceAdaptKey     ( int originResH, int originNamespace);
 int              namespaceAdaptKey2    ( int );
 void             namespaceDefResStatus ( statusCode );
 statusCode       namespaceInqResStatus ( void );
diff --git a/libcdi/src/pio.c b/libcdi/src/pio.c
index 3dfc3b0..92e65fb 100644
--- a/libcdi/src/pio.c
+++ b/libcdi/src/pio.c
@@ -3,8 +3,6 @@
 #endif
 
 
-#ifdef USE_MPI
-
 #include <ctype.h>
 #include <yaxt.h>
 
@@ -31,10 +29,6 @@ long initial_buffersize = 16 * 1024 * 1024;
 /* 16 * 1024; */
 /* 4 * 1024; */
 
-enum {
-  tagKey = 100,
-};
-
 double accumProbe   = 0.0;
 double accumRecv    = 0.0;
 double accumSend    = 0.0;
@@ -46,25 +40,6 @@ char *token = "%";
 
 /***************************************************************/
 
-int encodeFileOpTag(int ID, int sc)
-{
-  return ID * tagKey + sc;
-}
-
-/***************************************************************/
-
-struct fileOpTag decodeFileOpTag(int tag)
-{
-  struct fileOpTag rtag;
-
-  rtag.id = tag / tagKey;
-  rtag.command = tag % tagKey;
-
-  return rtag;
-}
-
-/***************************************************************/
-
 size_t
 cdiPioFileWrite(int fileID, const void *restrict buffer, size_t len, int tsID)
 {
@@ -143,7 +118,7 @@ int pioFileOpen(const char *filename, const char *mode)
 
 /***************************************************************/
 
-void backendInit(void (*postCommSetupActions)(void))
+void cdiPioFileWritingInit(void (*postCommSetupActions)(void))
 {
   int IOMode = commInqIOMode ();
 
@@ -176,7 +151,7 @@ void backendInit(void (*postCommSetupActions)(void))
 
 /***************************************************************/
 
-void backendCleanup ( void )
+void cdiPioFileWritingFinalize(void)
 {
   int IOMode = commInqIOMode ();
   switch ( IOMode )
@@ -202,7 +177,6 @@ void backendCleanup ( void )
 
 /***************************************************************/
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio.h b/libcdi/src/pio.h
index 71dafbc..b317ed1 100644
--- a/libcdi/src/pio.h
+++ b/libcdi/src/pio.h
@@ -5,21 +5,17 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
 #include <stdlib.h>
 #include <mpi.h>
 
 #include "cdi_int.h"
 
-void   backendCleanup  ( void );
-void backendInit(void (*postCommSetupActions)(void));
+void cdiPioFileWritingInit(void (*postCommSetupActions)(void));
+void cdiPioFileWritingFinalize(void);
 int pioFileOpen(const char *filename, const char *mode);
 int    pioFileClose    ( int );
 size_t cdiPioFileWrite(int fileID, const void *restrict buffer, size_t len,
                        int tsID);
-#else
-typedef int MPI_Comm;
-#endif
 
 #endif
 /*
diff --git a/libcdi/src/pio_cdf_int.c b/libcdi/src/pio_cdf_int.c
index 2ea90e6..4215629 100644
--- a/libcdi/src/pio_cdf_int.c
+++ b/libcdi/src/pio_cdf_int.c
@@ -2,7 +2,7 @@
 #  include "config.h"
 #endif
 
-#if defined USE_MPI && defined (HAVE_NETCDF4) && defined (HAVE_PARALLEL_NC4)
+#if defined (HAVE_NETCDF4) && defined (HAVE_PARALLEL_NC4)
 
 #include <netcdf.h>
 #ifdef HAVE_NETCDF_PAR_H
@@ -63,7 +63,6 @@ cdiPioEnableNetCDFParAccess()
   namespaceSwitchSet(NSSWITCH_CDF_DEF_VAR, NSSW_FUNC(cdiPioCdfDefVar));
 }
 
-
 #endif
 /*
  * Local Variables:
diff --git a/libcdi/src/pio_client.c b/libcdi/src/pio_client.c
index b654d0a..3d221ea 100644
--- a/libcdi/src/pio_client.c
+++ b/libcdi/src/pio_client.c
@@ -2,7 +2,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
 #include <ctype.h>
 
 #include <yaxt.h>
@@ -38,6 +37,7 @@ cdiPioClientStreamOpen(const char *filename, const char *filemode,
       switch ( nspStatus )
         {
         case STAGE_DEFINITION:
+          streamptr->filetype = filetype;
           break;
         case STAGE_TIMELOOP:
           filename_len = strlen(filename);
@@ -54,6 +54,7 @@ cdiPioClientStreamOpen(const char *filename, const char *filemode,
                  " filename=%s, filetype=%d",
                  funcMap[(-1 - STREAMOPEN)], filename_len + 1, filename,
                  filetype);
+          streamptr->filetype = filetype;
           break;
         case STAGE_CLEANUP:
           xabort ( "TRANSITION TO IO PROCESSES ALREADY FINISHED." );
@@ -249,7 +250,7 @@ cdiPioClientSetup(int *pioNamespace_, int *pioNamespace)
   *pioNamespace_ = *pioNamespace = namespaceNew();
   int callerCDINamespace = namespaceGetActive();
   namespaceSetActive(*pioNamespace_);
-  serializeSetMPI();
+  cdiPioSerializeSetMPI();
   namespaceSwitchSet(NSSWITCH_STREAM_OPEN_BACKEND,
                      NSSW_FUNC(cdiPioClientStreamOpen));
   namespaceSwitchSet(NSSWITCH_STREAM_DEF_VLIST_,
@@ -278,7 +279,6 @@ cdiPioClientSetup(int *pioNamespace_, int *pioNamespace)
 }
 
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_comm.c b/libcdi/src/pio_comm.c
index accdfa1..5073c84 100644
--- a/libcdi/src/pio_comm.c
+++ b/libcdi/src/pio_comm.c
@@ -10,8 +10,6 @@
 #include "dmemory.h"
 #include "pio_util.h"
 
-#ifdef USE_MPI
-
 #include "cdipio.h"
 
 typedef struct {
@@ -99,7 +97,7 @@ void pioInfoInit ( pioInfo_t * p )
 void commInit ( void )
 {
   xassert ( info == 0 );
-  info = xmalloc ( sizeof ( pioInfo_t ));
+  info = (pioInfo_t*) xmalloc ( sizeof ( pioInfo_t ));
   pioInfoInit ( info );
 }
 
@@ -384,7 +382,7 @@ void commDefCommNode ( void )
 
   size = info->sizePio;
 
-  myHost = xmalloc(MPI_MAX_PROCESSOR_NAME);
+  myHost = (char*) xmalloc(MPI_MAX_PROCESSOR_NAME);
   {
     int len;
     xmpi ( MPI_Get_processor_name ( myHost, &len ));
@@ -512,7 +510,7 @@ void     commRecvNodeMap    ( void )
 
   xdebug ( "info->nProcsColl=%d", info->nProcsColl );
 
-  info->nodeMap = xmalloc ( info->nProcsColl * 
+  info->nodeMap = (int*) xmalloc ( info->nProcsColl * 
                                 sizeof ( info->nodeMap[0] )); 
 
   xmpi ( MPI_Recv ( info->nodeMap, info->nProcsColl, MPI_INTEGER, 
@@ -552,7 +550,7 @@ void     commEvalPhysNodes  ( void )
 
   size = info->nProcsIO * sizeNodeInfo;
 
-  nodeInfo = xmalloc ( size * sizeof ( int ));
+  nodeInfo = (nodeInfo_t*) xmalloc ( size * sizeof ( int ));
 
   if ( info->rankGlob == info->root )
     {
@@ -592,12 +590,12 @@ void     commEvalPhysNodes  ( void )
 
   xassert ( info->nProcsColl <= info->nProcsModel );
 
-  info->procsCollMap = xmalloc ( info->nProcsColl * 
+  info->procsCollMap = (int*) xmalloc ( info->nProcsColl * 
                                  sizeof ( info->procsCollMap[0] )); 
 
   // define nodeSizes
   info->nodeInfo.nNodes = nNodes; 
-  info->nodeSizes = xmalloc ( info->nodeInfo.nNodes * 
+  info->nodeSizes = (int*) xmalloc ( info->nodeInfo.nNodes * 
                                   sizeof ( info->nodeSizes[0] ));
   collID = 0;
   for ( IOID = 0; IOID < info->nProcsIO; IOID++ )
@@ -608,11 +606,11 @@ void     commEvalPhysNodes  ( void )
       }
 
   // define nodeMap
-  info->nodeMap   = xmalloc ( info->nProcsColl * 
+  info->nodeMap   = (int*) xmalloc ( info->nProcsColl * 
                                   sizeof ( info->nodeMap[0] ));
   // helpers
-  p1 = xmalloc ( info->nodeInfo.nNodes * sizeof ( p1[0] ));
-  p2 = xmalloc ( info->nodeInfo.nNodes * sizeof ( p2[0] ));
+  p1 = (int**) xmalloc ( info->nodeInfo.nNodes * sizeof ( p1[0] ));
+  p2 = (int**) xmalloc ( info->nodeInfo.nNodes * sizeof ( p2[0] ));
   idx = 0;
   for ( i = 0; i < info->nodeInfo.nNodes; i++ )
     {
@@ -694,7 +692,7 @@ void     commDefCommsIO     ( void )
            info->nProcsModel != CDI_UNDEFID &&
            info->commGlob != MPI_COMM_NULL );
 
-  info->commsIO = xmalloc ( info->nProcsColl * 
+  info->commsIO = (MPI_Comm*) xmalloc ( info->nProcsColl * 
                                 sizeof ( info->commsIO[0] ));
   for ( collID = 0; collID < info->nProcsColl; collID++ )
     info->commsIO[collID] = MPI_COMM_NULL;
@@ -702,7 +700,7 @@ void     commDefCommsIO     ( void )
   strncpy ( name, "COMMSIO_", 8 ); 
   name[MAXCOMMIONAME - 1] = '\0';
   
-  ranks = xmalloc (( info->nProcsModel + 1 ) * sizeof ( ranks[0] ));
+  ranks = (int*) xmalloc (( info->nProcsModel + 1 ) * sizeof ( ranks[0] ));
   for ( i = 0; i < info->nProcsModel; i++ )
     ranks[i] = i;
   
@@ -860,9 +858,6 @@ void commPrint ( FILE * fp )
   fprintf ( fp, "\n" );
 }
 
-#endif
-
-
 /************************************************************************/
 /*
  * Local Variables:
diff --git a/libcdi/src/pio_comm.h b/libcdi/src/pio_comm.h
index 9fdfc2f..76bf45c 100644
--- a/libcdi/src/pio_comm.h
+++ b/libcdi/src/pio_comm.h
@@ -5,8 +5,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <mpi.h>
 #include <stdio.h>
 #include "cdi.h"
@@ -72,7 +70,6 @@ int      commInqNProcsColl      ( void );
 void     commPrint              ( FILE * );
 
 #endif
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_dbuffer.c b/libcdi/src/pio_dbuffer.c
index a329d70..3338b12 100644
--- a/libcdi/src/pio_dbuffer.c
+++ b/libcdi/src/pio_dbuffer.c
@@ -13,7 +13,6 @@
 #include <unistd.h>
 #include <string.h>
 
-#ifdef USE_MPI
 #include "pio_impl.h"
 #include "pio_util.h"
 
@@ -162,7 +161,6 @@ dbuffer_push(struct dBuffer *dbuffer, const void *buffer, size_t len)
   return 0;
 }
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_impl.h b/libcdi/src/pio_impl.h
index 0a5e008..30e5306 100644
--- a/libcdi/src/pio_impl.h
+++ b/libcdi/src/pio_impl.h
@@ -7,18 +7,19 @@
 
 #include <stdbool.h>
 
-#ifdef USE_MPI
-#include "mpi.h"
+#include <mpi.h>
 
-typedef enum 
+enum IO_Server_command
 {
   IO_Open_file,
   IO_Close_file,
   IO_Get_fp,
   IO_Set_fp,
   IO_Send_buffer,
-  IO_Finalize
-} IO_Server_command;
+  IO_Finalize,
+  tagKey = 8,                   /* should be power of 2, must be
+                                 * larger than IO_Finalize */
+};
 
 struct dBuffer
 {
@@ -39,8 +40,20 @@ struct fileOpTag
 };
 
 /* pio.c */
-int encodeFileOpTag(int fileID, int command);
-struct fileOpTag decodeFileOpTag(int);
+static inline int
+encodeFileOpTag(int fileID, int command)
+{
+  return fileID * tagKey + command;
+}
+
+static inline struct fileOpTag
+decodeFileOpTag(int tag)
+{
+  struct fileOpTag rtag = { .id = tag / tagKey,
+                            .command = tag % tagKey };
+  return rtag;
+}
+
 
 /* pio_dbuffer.c */
 int       dbuffer_init ( struct dBuffer **, size_t );
@@ -94,7 +107,6 @@ void      finalizePOSIXFPGUARDSENDRECV ( void );
 void pioWriterStdIO(void);
 
 #endif
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_interface.c b/libcdi/src/pio_interface.c
index 7f1bb61..2227e48 100644
--- a/libcdi/src/pio_interface.c
+++ b/libcdi/src/pio_interface.c
@@ -7,31 +7,25 @@
 #include <stdio.h>
 #include <stdarg.h>
 
-#ifdef USE_MPI
 #include <mpi.h>
 #include <yaxt.h>
-#endif
 
 #include "cdi.h"
 #include "cdipio.h"
+#include "cdi_int.h"
 #include "dmemory.h"
-#include "pio_util.h"
-#include "vlist_var.h"
-
-#ifdef USE_MPI
 #include "namespace.h"
 #include "pio.h"
+#include "pio_client.h"
 #include "pio_serialize.h"
 #include "pio_interface.h"
 #include "pio_comm.h"
 #include "pio_rpc.h"
-#include "pio_client.h"
 #include "pio_server.h"
+#include "pio_util.h"
 #include "resource_handle.h"
-#include "cdi_int.h"
 #include "vlist.h"
-
-extern resOps streamOps;
+#include "vlist_var.h"
 
 
 static struct rdmaWin
@@ -184,7 +178,7 @@ varMapGen(int *vSizes, int *sSizes, int *varMapping,
 	weightsStreams[i] += * ( vSizes + offset++ );
     }
 
-  w = ( double * ) xmalloc ( nNodes * sizeof ( double ));
+  w = ( double * ) xmalloc( nNodes * sizeof ( double ));
   for ( j = 0; j < nNodes; j++ )
     nPEs += * ( nodeSizes + j );
 
@@ -201,9 +195,9 @@ varMapGen(int *vSizes, int *sSizes, int *varMapping,
 	if ( * ( streamMapping + j ) == i )
 	  nVarsNode += * ( sSizes + j );
 
-      weightsVarsNode = ( int * ) xmalloc ( nVarsNode * sizeof ( int ));
-      varMappingNode = ( int * ) xmalloc ( nVarsNode * sizeof ( int ));
-      w = ( double * ) xmalloc ( * ( nodeSizes + i ) * sizeof ( double ));
+      weightsVarsNode = ( int * ) xmalloc( nVarsNode * sizeof ( int ));
+      varMappingNode = ( int * ) xmalloc( nVarsNode * sizeof ( int ));
+      w = ( double * ) xmalloc( * ( nodeSizes + i ) * sizeof ( double ));
       offset = 0;
       offsetN = 0;
 
@@ -264,17 +258,17 @@ varsMapNDeco(int nNodes, int *nodeSizes)
 
   nStreams = streamSize ();
 
-  resHs       = xmalloc ( nStreams * sizeof ( resHs[0] ));
-  streamSizes = xmalloc ( nStreams * sizeof ( streamSizes[0] ));
-  collectsData = xmalloc ( nProcsColl * sizeof ( collectsData[0] ));
+  resHs       = (int*) xmalloc( nStreams * sizeof ( resHs[0] ));
+  streamSizes = (int*) xmalloc( nStreams * sizeof ( streamSizes[0] ));
+  collectsData = (int*) xmalloc( nProcsColl * sizeof ( collectsData[0] ));
   streamGetIndexList ( nStreams, resHs );
 
   for ( i = 0; i < nStreams; i++ )
     streamSizes[i] = streamInqNvars ( * ( resHs + i ));
 
   nVars = sum_int(nStreams, streamSizes);
-  varSizes   = xmalloc ( nVars * sizeof ( varSizes[0] ));
-  varMapping = xmalloc ( nVars * sizeof ( varMapping[0] ));
+  varSizes   = (int*) xmalloc( nVars * sizeof ( varSizes[0] ));
+  varMapping = (int*) xmalloc( nVars * sizeof ( varMapping[0] ));
 
   for ( i = 0; i < nStreams; i++ )
     for ( j = 0; j < * ( streamSizes + i ); j++ )
@@ -357,8 +351,8 @@ modelWinDefBufferSizes(void)
   xassert(txWin != NULL);
 
   nstreams = reshCountType ( &streamOps );
-  streamIndexList = xmalloc ( nstreams * sizeof ( streamIndexList[0] ));
-  collIndex = xcalloc(nProcsColl, sizeof (collIndex[0]));
+  streamIndexList = (int*) xmalloc( nstreams * sizeof ( streamIndexList[0] ));
+  collIndex = (struct collDesc*) xcalloc(nProcsColl, sizeof (collIndex[0]));
   reshGetResHListOfType ( nstreams, streamIndexList, &streamOps );
   for ( streamNo = 0; streamNo < nstreams; streamNo++ )
     {
@@ -458,7 +452,7 @@ void modelWinCreate ( void )
   int nProcsColl = commInqNProcsColl ();
 
   xdebug("%s", "START");
-  txWin = xmalloc(nProcsColl * sizeof (txWin[0]));
+  txWin = (struct rdmaWin*) xmalloc(nProcsColl * sizeof (txWin[0]));
 
   modelWinDefBufferSizes ();
   ranks[0] = commInqNProcsModel ();
@@ -732,8 +726,6 @@ void pioBufferFuncCall(struct winHeaderEntry header,
   xdebug("%s", "RETURN");
 }
 
-#endif
-
 
 void
 cdiPioNoPostCommSetup(void)
@@ -743,9 +735,6 @@ cdiPioNoPostCommSetup(void)
 /*****************************************************************************/
 
 /* pioInit definition must currently compile even in non-MPI configurations */
-#ifndef MPI_VERSION
-#  define MPI_Comm int
-#endif
 /**
    @brief initializes the MPI_Communicators needed for the
   communication between the calculator PEs and the I/O PEs and within the
@@ -771,17 +760,14 @@ cdiPioNoPostCommSetup(void)
   @return int indicating wether the calling PE is a calcutator (1) or not (0)
 */
 
-#ifdef USE_MPI
 static int pioNamespace_ = -1;
 static int xtInitByCDI = 0;
-#endif
 
 MPI_Comm
 pioInit(MPI_Comm commGlob, int nProcsIO, int IOMode,
         int *pioNamespace, float partInflate,
         void (*postCommSetupActions)(void))
 {
-#ifdef USE_MPI
   int sizeGlob;
 
   namespaceSwitchSet(NSSWITCH_WARNING, NSSW_FUNC(cdiPioWarning));
@@ -821,12 +807,11 @@ pioInit(MPI_Comm commGlob, int nProcsIO, int IOMode,
 
   if ( commInqIsProcIO ())
     {
-      serializeSetMPI();
+      cdiPioSerializeSetMPI();
       namespaceSwitchSet(NSSWITCH_ABORT, NSSW_FUNC(cdiAbortC_MPI));
       namespaceSwitchSet(NSSWITCH_FILE_OPEN, NSSW_FUNC(pioFileOpen));
       namespaceSwitchSet(NSSWITCH_FILE_CLOSE, NSSW_FUNC(pioFileClose));
-      IOServer(postCommSetupActions);
-      namespaceDelete(0);
+      cdiPioServer(postCommSetupActions);
       namespaceNew();
       commDestroy ();
       if (xtInitByCDI)
@@ -838,20 +823,12 @@ pioInit(MPI_Comm commGlob, int nProcsIO, int IOMode,
 
   xdebug ( "nProcsGlob=%d, RETURN", sizeGlob );
   return commInqCommModel ();
-#else
-  abort();
-#endif
 }
 
-#ifndef MPI_VERSION
-#  undef MPI_Comm
-#endif
-
 /*****************************************************************************/
 
 void  pioEndDef ( void )
 {
-#ifdef USE_MPI
   char   * buffer;
   int bufferSize;
   int rankGlob = commInqRankGlob ();
@@ -876,18 +853,15 @@ void  pioEndDef ( void )
   modelWinCreate ();
   namespaceDefResStatus ( STAGE_TIMELOOP );
   xdebug("%s", "RETURN");
-#endif
 }
 
 /************************************************************************/
 
 void  pioEndTimestepping ( void )
 {
-#ifdef USE_MPI
   xdebug("%s", "START");
   namespaceDefResStatus ( STAGE_CLEANUP );
   xdebug("%s", "RETURN");
-#endif
 }
 
 
@@ -905,7 +879,6 @@ void  pioEndTimestepping ( void )
 
 void pioFinalize ( void )
 {
-#ifdef USE_MPI
   int collID, ibuffer = 1111;
   xdebug("%s", "START");
 
@@ -924,14 +897,12 @@ void pioFinalize ( void )
   if (xtInitByCDI)
     xt_finalize();
   xdebug("%s", "RETURN");
-#endif
 }
 
  /************************************************************************/
 
 void pioWriteTimestep()
 {
-#ifdef USE_MPI
   int collID, iAssert = MPI_MODE_NOPUT;
   /* int tokenEnd = END; */
   int rankGlob = commInqRankGlob ();
@@ -966,11 +937,8 @@ void pioWriteTimestep()
     }
 
   xdebug("%s", "RETURN. messages sent, windows posted");
-
-#endif
 }
 
-#if defined USE_MPI
 void
 streamWriteVarPart(int streamID, int varID, const void *data,
                    int nmiss, Xt_idxlist partDesc)
@@ -1018,8 +986,6 @@ streamWriteScatteredVarPart(int streamID, int varID, const void *data,
                                 numBlocks, blocklengths, displacements,
                                 nmiss, partDesc);
 }
-#endif
-
 
 /*
  * Local Variables:
diff --git a/libcdi/src/pio_interface.h b/libcdi/src/pio_interface.h
index 8801e32..7ba5120 100644
--- a/libcdi/src/pio_interface.h
+++ b/libcdi/src/pio_interface.h
@@ -5,8 +5,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <mpi.h>
 #include <yaxt.h>
 
@@ -37,8 +35,6 @@ void memcpyPackFunc(void *dataDesc, void *buf, int size, int *pos, void *context
 extern float cdiPIOpartInflate_;
 
 #endif
-
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_list_set.c b/libcdi/src/pio_list_set.c
index eb52fe0..40d5def 100644
--- a/libcdi/src/pio_list_set.c
+++ b/libcdi/src/pio_list_set.c
@@ -11,7 +11,6 @@
 #include "cdi.h"
 #include "dmemory.h"
 
-#ifdef USE_MPI
 #include "pio_impl.h"
 #include "pio_util.h"
 
@@ -32,7 +31,7 @@ listSet *listSetNew( valDestroyFunction vD, eqPredicate kC )
 {
   listSet *myq;
 
-  myq = xmalloc ( sizeof ( listSet ));
+  myq = (listSet*) xmalloc( sizeof ( listSet ));
 
   myq->head = NULL;
   myq->tail = NULL;
@@ -79,7 +78,7 @@ listSetAdd(listSet *q, void *v)
         return -1;
   }
 
-  if ((newCons = malloc(sizeof(struct cons))) == NULL)
+  if ((newCons = (struct cons*) malloc(sizeof(struct cons))) == NULL)
     {
       perror ( "pio_listSet: listSetAdd (): Not enough memory" );
       /* FIXME: why not abort? */
@@ -145,8 +144,6 @@ listSetForeach(listSet *q, void (*func)(void *elem, void *data), void *data)
     func(p->val, data);
 }
 
-
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_mpinonb.c b/libcdi/src/pio_mpinonb.c
index 3bb63f4..dd1f1d0 100644
--- a/libcdi/src/pio_mpinonb.c
+++ b/libcdi/src/pio_mpinonb.c
@@ -2,8 +2,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <inttypes.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -17,8 +15,6 @@
 #include "pio_impl.h"
 #include "pio_util.h"
 
-extern char * command2charP[6];
-
 extern long initial_buffersize;
 
 extern double accumWait;
@@ -54,7 +50,7 @@ static aFiledataM *initAFiledataMPINONB ( const char *filename, size_t bs )
   int iret;
   MPI_Comm commNode = commInqCommNode ();
 
-  of = xmalloc(sizeof (*of) + strlen(filename) + 1);
+  of = (aFiledataM*) xmalloc(sizeof (*of) + strlen(filename) + 1);
 
   strcpy(of->name, filename);
   of->size = bs;
@@ -83,7 +79,8 @@ static aFiledataM *initAFiledataMPINONB ( const char *filename, size_t bs )
 
 /***************************************************************/
 
-int destroyAFiledataMPINONB ( void *v )
+static int
+destroyAFiledataMPINONB(void *v)
 {
   int iret = 0;
   aFiledataM *of;
@@ -131,7 +128,8 @@ compareNamesMPINONB(void *v1, void *v2)
 
 /***************************************************************/
 
-void writeMPINONB(aFiledataM *of)
+static void
+writeMPINONB(aFiledataM *of)
 {
   int amount;
   MPI_Status status;
@@ -338,7 +336,6 @@ initMPINONB(void (*postCommSetupActions)(void))
     xabort ( "listSetNew did not succeed" );   
 }
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_posixasynch.c b/libcdi/src/pio_posixasynch.c
index 18a1a73..aa7333e 100644
--- a/libcdi/src/pio_posixasynch.c
+++ b/libcdi/src/pio_posixasynch.c
@@ -7,7 +7,6 @@
 #endif
 
 
-#ifdef USE_MPI
 #ifndef _SX
 
 #include <aio.h>
@@ -68,7 +67,7 @@ initBFiledataPA(char *filename, size_t bs, int nc)
   xdebug ( "filename=%s, buffersize=%zu, ncollectors=%d, nPrefetchStreams=%d",
            filename, bs, nc, nPrefStreams );
 
-  bfd = xmalloc( sizeof (*bfd) + strlen(filename) + 1);
+  bfd = (bFiledataPA*) xmalloc( sizeof (*bfd) + strlen(filename) + 1);
   strcpy(bfd->name, filename);
 
   if (( bfd->handle = open ( bfd->name, O_CREAT | O_WRONLY, 0666 )) == -1 )
@@ -76,7 +75,7 @@ initBFiledataPA(char *filename, size_t bs, int nc)
 
   dbuffer_init(&(bfd->fb), (size_t)(nPrefStreams * bs));
 
-  bfd->ctrlBlks = xcalloc(nPrefStreams, sizeof (bfd->ctrlBlks[0]));
+  bfd->ctrlBlks = (struct aiocb *) xcalloc(nPrefStreams, sizeof (bfd->ctrlBlks[0]));
 
   for ( i = 0; i < nPrefStreams; i++ )
     {
@@ -260,7 +259,7 @@ void pioWriterAIO(void)
   xdebug ( "nProcsCollNode=%d on this node", nProcsCollNode );
  
   bibBFiledataPA = listSetNew(destroyBFiledataPA, compareNamesBPA);
-  sentFinalize = xmalloc ( nProcsCollNode * sizeof ( sentFinalize ));
+  sentFinalize = (bool*) xmalloc ( nProcsCollNode * sizeof ( sentFinalize ));
   
   for ( ;; )
     {   
@@ -410,11 +409,8 @@ void pioWriterAIO(void)
 
 /***************************************************************/
 
-/***************************************************************/
-
 
 #endif
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_posixfpguardsendrecv.c b/libcdi/src/pio_posixfpguardsendrecv.c
index 87913de..579c73d 100644
--- a/libcdi/src/pio_posixfpguardsendrecv.c
+++ b/libcdi/src/pio_posixfpguardsendrecv.c
@@ -8,8 +8,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdbool.h>
@@ -33,7 +31,7 @@ typedef struct
   struct dBuffer *db2;
   struct dBuffer *db;
   FILE *fp;
-  IO_Server_command command;
+  enum IO_Server_command command;
   int tsID, fileID;
   char name[];
 } aFiledataPF;
@@ -538,7 +536,6 @@ initPOSIXFPGUARDSENDRECV(void (*postCommSetupActions)(void))
     bibAFiledataPF = listSetNew( destroyAFiledataPF, compareNamesAPF );
 }
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_posixnonb.c b/libcdi/src/pio_posixnonb.c
index 7ccbc65..435ffa6 100644
--- a/libcdi/src/pio_posixnonb.c
+++ b/libcdi/src/pio_posixnonb.c
@@ -2,8 +2,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
@@ -290,7 +288,6 @@ pioWriterStdIO(void)
     }
 }
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_record_send.c b/libcdi/src/pio_record_send.c
index d633bed..fa0910c 100644
--- a/libcdi/src/pio_record_send.c
+++ b/libcdi/src/pio_record_send.c
@@ -2,8 +2,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <inttypes.h>
 #include <stdlib.h>
 
@@ -24,7 +22,7 @@ typedef struct
   struct dBuffer *db1;
   struct dBuffer *db2;
   struct dBuffer *db;
-  IO_Server_command command;
+  enum IO_Server_command command;
   MPI_Request request;
   int tsID, fileID;
   char name[];
@@ -347,7 +345,6 @@ pioSendInitialize(void (*postCommSetupActions)(void))
     bibRemoteFileBuf = listSetNew(destroyRemoteFileBuf, compareNames);
 }
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_rpc.h b/libcdi/src/pio_rpc.h
index 69c6c63..9e66c4a 100644
--- a/libcdi/src/pio_rpc.h
+++ b/libcdi/src/pio_rpc.h
@@ -5,8 +5,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <mpi.h>
 #include <yaxt.h>
 
@@ -96,7 +94,6 @@ enum
 
 #endif
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_serialize.c b/libcdi/src/pio_serialize.c
index 4f13678..e855687 100644
--- a/libcdi/src/pio_serialize.c
+++ b/libcdi/src/pio_serialize.c
@@ -2,8 +2,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <inttypes.h>
 
 #include <mpi.h>
@@ -72,7 +70,8 @@ setupDtDict()
 }
 #endif
 
-int serializeGetSizeMPI(int count, int datatype, void *context)
+static int
+serializeGetSizeMPI(int count, int datatype, void *context)
 {
   int size;
   xmpi(MPI_Pack_size(count, dtDict[lookupDt(datatype)].mpidt,
@@ -81,21 +80,23 @@ int serializeGetSizeMPI(int count, int datatype, void *context)
 }
 
 
-void serializePackMPI(void *data, int count, int datatype,
-                      void *buf, int buf_size, int *position, void *context)
+static void
+serializePackMPI(void *data, int count, int datatype,
+                 void *buf, int buf_size, int *position, void *context)
 {
   xmpi(MPI_Pack(data, count, dtDict[lookupDt(datatype)].mpidt,
                 buf, buf_size, position, *(MPI_Comm *)context));
 }
 
-void serializeUnpackMPI(void *buf, int buf_size, int *position,
-                        void *data, int count, int datatype, void *context)
+static void
+serializeUnpackMPI(void *buf, int buf_size, int *position,
+                   void *data, int count, int datatype, void *context)
 {
   xmpi(MPI_Unpack(buf, buf_size, position, data, count,
                   dtDict[lookupDt(datatype)].mpidt, *(MPI_Comm *)context));
 }
 
-void serializeSetMPI()
+void cdiPioSerializeSetMPI()
 {
 #if CDI_DT_MATCH_NEEDED
   if (!dtDictMatchComplete)
@@ -110,7 +111,6 @@ void serializeSetMPI()
 }
 
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_serialize.h b/libcdi/src/pio_serialize.h
index 97a349b..74d6a87 100644
--- a/libcdi/src/pio_serialize.h
+++ b/libcdi/src/pio_serialize.h
@@ -1,14 +1,6 @@
 #ifndef SERIALIZE_PIO_H
 #define SERIALIZE_PIO_H
-/*
- * Interfaces for marshalling via MPI
- */
-int serializeGetSizeMPI(int count, int datatype, void *context);
-void serializePackMPI(void *data, int count, int datatype,
-                          void *buf, int buf_size, int *position, void *context);
-void serializeUnpackMPI(void *buf, int buf_size, int *position,
-                        void *data, int count, int datatype, void *context);
 /* switch current namespace to use MPI serialization */
-void serializeSetMPI();
+void cdiPioSerializeSetMPI();
 
 #endif
diff --git a/libcdi/src/pio_server.c b/libcdi/src/pio_server.c
index 3487109..b0f734d 100644
--- a/libcdi/src/pio_server.c
+++ b/libcdi/src/pio_server.c
@@ -4,8 +4,6 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include "pio_server.h"
 
 
@@ -41,7 +39,6 @@
 #include "vlist_var.h"
 
 
-extern resOps streamOps;
 extern void arrayDestroy ( void );
 
 static struct
@@ -91,7 +88,7 @@ collDefBufferSizes()
   xassert(rxWin != NULL);
 
   nstreams = reshCountType ( &streamOps );
-  streamIndexList = xmalloc ( nstreams * sizeof ( streamIndexList[0] ));
+  streamIndexList = (int*) xmalloc( nstreams * sizeof ( streamIndexList[0] ));
   reshGetResHListOfType ( nstreams, streamIndexList, &streamOps );
   for ( streamNo = 0; streamNo < nstreams; streamNo++ )
     {
@@ -173,7 +170,7 @@ serverWinCreate(void)
 
   rxWin = xcalloc(nProcsModel, sizeof (rxWin[0]));
   size_t totalBufferSize = collDefBufferSizes();
-  rxWin[0].buffer = xmalloc(totalBufferSize);
+  rxWin[0].buffer = (unsigned char*) xmalloc(totalBufferSize);
   size_t ofs = 0;
   for ( modelID = 1; modelID < nProcsModel; modelID++ )
     {
@@ -239,14 +236,14 @@ readFuncCall(struct winHeaderEntry *header)
       {
         MPI_Comm commCalc = commInqCommCalc ();
         int streamID = funcArgs->streamNewTimestep.streamID;
-        int nspTarget = namespaceResHDecode(streamID).nsp;
+        int originNamespace = namespaceResHDecode(streamID).nsp;
         streamID = namespaceAdaptKey2(streamID);
         int oldTaxisID
           = vlistInqTaxis(streamInqVlist(streamID));
         int position = header->offset;
         int changedTaxisID
           = taxisUnpack((char *)rxWin[root].buffer, (int)rxWin[root].size,
-                        &position, nspTarget, &commCalc, 0);
+                        &position, originNamespace, &commCalc, 0);
         taxis_t *oldTaxisPtr = taxisPtr(oldTaxisID);
         taxis_t *changedTaxisPtr = taxisPtr(changedTaxisID);
         ptaxisCopy(oldTaxisPtr, changedTaxisPtr);
@@ -266,7 +263,7 @@ resizeVarGatherBuf(int vlistID, int varID, double **buf, int *bufSize)
 {
   int size = vlistInqVarSize(vlistID, varID);
   if (size <= *bufSize) ; else
-    *buf = xrealloc(*buf, (*bufSize = size) * sizeof (buf[0][0]));
+    *buf = (double*) xrealloc(*buf, (*bufSize = size) * sizeof (buf[0][0]));
 }
 
 static void
@@ -285,9 +282,8 @@ gatherArray(int root, int nProcsModel, int headerIdx,
   for (unsigned i = 0; i < 3; ++i)
     varShapeXt[i] = varShape[i];
   int varSize = varShape[0] * varShape[1] * varShape[2];
-  struct Xt_offset_ext *partExts
-    = xmalloc(nProcsModel * sizeof (partExts[0]));
-  Xt_idxlist *part = xmalloc(nProcsModel * sizeof (part[0]));
+  struct Xt_offset_ext *partExts = (struct Xt_offset_ext*) xmalloc(nProcsModel * sizeof (partExts[0]));
+  Xt_idxlist *part = (Xt_idxlist*) xmalloc(nProcsModel * sizeof (part[0]));
   MPI_Comm commCalc = commInqCommCalc();
   {
     int nmiss_ = 0;
@@ -497,9 +493,9 @@ inventorizeStream(struct streamMapping *streamMap, int numStreamIDs,
   int sizeStreamMap = *sizeStreamMap_;
   if (numStreamIDs < sizeStreamMap) ; else
     {
-      streamMap = xrealloc(streamMap,
-                           (sizeStreamMap *= 2)
-                           * sizeof (streamMap[0]));
+      streamMap = (struct streamMapping*) xrealloc(streamMap,
+                                                   (sizeStreamMap *= 2)
+                                                   * sizeof (streamMap[0]));
       *sizeStreamMap_ = sizeStreamMap;
     }
   streamMap[numStreamIDs].streamID = streamID;
@@ -514,9 +510,7 @@ inventorizeStream(struct streamMapping *streamMap, int numStreamIDs,
       int vlistID = streamInqVlist(streamID);
       int nvars = vlistNvars(vlistID);
       streamMap[numStreamIDs].numVars = nvars;
-      streamMap[numStreamIDs].varMap
-        = xmalloc(sizeof (streamMap[numStreamIDs].varMap[0])
-                  * nvars);
+      streamMap[numStreamIDs].varMap = (int*) xmalloc(sizeof (streamMap[numStreamIDs].varMap[0]) * nvars);
       for (int i = 0; i < nvars; ++i)
         streamMap[numStreamIDs].varMap[i] = -1;
     }
@@ -540,8 +534,7 @@ buildStreamMap(struct winHeaderEntry *winDict)
   int oldStreamIdx = CDI_UNDEFID;
   int filetype = CDI_UNDEFID;
   int sizeStreamMap = 16;
-  struct streamMapping *streamMap
-    = xmalloc(sizeStreamMap * sizeof (streamMap[0]));
+  struct streamMapping *streamMap = (struct streamMapping *) xmalloc(sizeStreamMap * sizeof (streamMap[0]));
   int numDataEntries = winDict[0].specific.headerSize.numDataEntries;
   int numStreamIDs = 0;
   /* find streams written on this process */
@@ -578,7 +571,7 @@ buildStreamMap(struct winHeaderEntry *winDict)
   {
     int *streamIDs, *streamIsWritten;
     int numTotalStreamIDs = streamSize();
-    streamIDs = xmalloc(2 * sizeof (streamIDs[0]) * (size_t)numTotalStreamIDs);
+    streamIDs = (int*) xmalloc(2 * sizeof (streamIDs[0]) * (size_t)numTotalStreamIDs);
     streamGetIndexList(numTotalStreamIDs, streamIDs);
     streamIsWritten = streamIDs + numTotalStreamIDs;
     for (int i = 0; i < numTotalStreamIDs; ++i)
@@ -597,7 +590,7 @@ buildStreamMap(struct winHeaderEntry *winDict)
     free(streamIDs);
   }
   /* sort written streams by streamID */
-  streamMap = xrealloc(streamMap, sizeof (streamMap[0]) * numStreamIDs);
+  streamMap = (struct streamMapping*) xrealloc(streamMap, sizeof (streamMap[0]) * numStreamIDs);
   qsort(streamMap, numStreamIDs, sizeof (streamMap[0]), smCmpStreamID);
   return (struct streamMap){ .entries = streamMap, .numEntries = numStreamIDs };
 }
@@ -647,8 +640,7 @@ buildWrittenVars(struct streamMapping *mapping, int **varIsWritten_,
 {
   int nvars = mapping->numVars;
   int *varMap = mapping->varMap;
-  int *varIsWritten = *varIsWritten_
-    = xrealloc(*varIsWritten_, sizeof (*varIsWritten) * nvars);
+  int *varIsWritten = *varIsWritten_ = (int*) xrealloc(*varIsWritten_, sizeof (*varIsWritten) * nvars);
   for (int varID = 0; varID < nvars; ++varID)
     varIsWritten[varID] = ((varMap[varID] != -1)
                            ?myCollRank+1 : 0);
@@ -795,9 +787,9 @@ static void readGetBuffers()
                       xt_idxlist_delete(preRedistChunk);
                       xt_idxlist_delete(preWriteChunk);
                       xt_xmap_delete(xmap);
-                      writeBuf = xrealloc(writeBuf,
-                                          sizeof (double)
-                                          * PPM_extents_size(3, varChunk));
+                      writeBuf = (double*) xrealloc(writeBuf,
+                                                    sizeof (double)
+                                                    * PPM_extents_size(3, varChunk));
                       xt_redist_s_exchange1(redist, data, writeBuf);
                       xt_redist_delete(redist);
                     }
@@ -987,6 +979,8 @@ cdiPioStreamCDFOpenWrap(const char *filename, const char *filemode,
           fileID = cdiStreamOpenDefaultDelegate(filename, filemode, filetype,
                                                 streamptr,
                                                 recordBufIsToBeCreated);
+        else
+          streamptr->filetype = filetype;
         if (ioMode != PIO_NONE)
           xmpi(MPI_Bcast(&fileID, 1, MPI_INT, rank, commInqCommColl()));
         streamptr->ownerRank = rank;
@@ -1045,7 +1039,7 @@ cdiPioCdfDefTimestep(stream_t *streamptr, int tsID)
   @return
 */
 
-void IOServer(void (*postCommSetupActions)(void))
+void cdiPioServer(void (*postCommSetupActions)(void))
 {
   int source, tag, size, nProcsModel=commInqNProcsModel();
   static int nfinished = 0;
@@ -1055,7 +1049,7 @@ void IOServer(void (*postCommSetupActions)(void))
 
   xdebug("%s", "START");
 
-  backendInit(postCommSetupActions);
+  cdiPioFileWritingInit(postCommSetupActions);
   if (commInqRankNode() == commInqSpecialRankNode())
     return;
   commCalc = commInqCommCalc ();
@@ -1064,7 +1058,7 @@ void IOServer(void (*postCommSetupActions)(void))
   numPioPrimes = PPM_prime_factorization_32((uint32_t)commInqSizeColl(),
                                             &pioPrimes);
 #elif defined (HAVE_LIBNETCDF)
-  cdiSerialOpenFileCount = xcalloc(sizeof (cdiSerialOpenFileCount[0]),
+  cdiSerialOpenFileCount = (int*) xcalloc(sizeof (cdiSerialOpenFileCount[0]),
                                    commInqSizeColl());
   namespaceSwitchSet(NSSWITCH_STREAM_OPEN_BACKEND,
                      NSSW_FUNC(cdiPioStreamCDFOpenWrap));
@@ -1107,14 +1101,14 @@ void IOServer(void (*postCommSetupActions)(void))
                     int streamNo;
                     int * resHs;
 
-                    resHs       = xmalloc ( nStreams * sizeof ( resHs[0] ));
+                    resHs       = (int*) xmalloc ( nStreams * sizeof ( resHs[0] ));
                     streamGetIndexList ( nStreams, resHs );
                     for ( streamNo = 0; streamNo < nStreams; streamNo++ )
                       streamClose ( resHs[streamNo] );
                     free ( resHs );
                   }
               }
-              backendCleanup();
+              cdiPioFileWritingFinalize();
               serverWinCleanup();
 #ifdef HAVE_PARALLEL_NC4
               free(pioPrimes);
@@ -1129,7 +1123,7 @@ void IOServer(void (*postCommSetupActions)(void))
 	case RESOURCES:
 	  xdebugMsg (  tag, source, nfinished );
 	  xmpi ( MPI_Get_count ( &status, MPI_CHAR, &size ));
-	  buffer = xmalloc(size);
+	  buffer = (char*) xmalloc(size);
 	  xmpi ( MPI_Recv ( buffer, size, MPI_PACKED, source,
                             tag, commCalc, &status ));
           xdebug("%s", "RECEIVED MESSAGE WITH TAG \"RESOURCES\"");
@@ -1172,7 +1166,6 @@ void IOServer(void (*postCommSetupActions)(void))
     }
 }
 
-#endif
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/libcdi/src/pio_server.h b/libcdi/src/pio_server.h
index e7bf111..2adcba2 100644
--- a/libcdi/src/pio_server.h
+++ b/libcdi/src/pio_server.h
@@ -5,13 +5,9 @@
 #  include "config.h"
 #endif
 
-#ifdef USE_MPI
-
 #include <mpi.h>
 
-void IOServer(void (*postCommSetupActions)(void));
-
-#endif
+void cdiPioServer(void (*postCommSetupActions)(void));
 
 #endif
 /*
diff --git a/libcdi/src/pio_util.c b/libcdi/src/pio_util.c
index 36ad8f2..16f8870 100644
--- a/libcdi/src/pio_util.c
+++ b/libcdi/src/pio_util.c
@@ -12,17 +12,13 @@
 #include "cdi.h"
 #include "dmemory.h"
 
-#ifdef USE_MPI
 static
 char commands[][13] = { "FINALIZE\0",
                         "RESOURCES\0",
                         "WINCREATE\0",
                         "WRITETS\0"};
-#endif
-
 
 /*****************************************************************************/
-#ifdef USE_MPI
 void
 cdiAbortC_MPI(const char *caller, const char *filename,
               const char *functionname, int line,
@@ -52,13 +48,10 @@ void cdiPioWarning(const char *caller, const char *fmt, va_list ap)
   fputc('\n', stderr);
 }
 
-#endif
-
 /*****************************************************************************/
 
 /***************************************************************/
 
-#ifdef USE_MPI
 void pcdiXMPI(int iret, const char *filename, int line)
 {
   char errorString[2][MPI_MAX_ERROR_STRING + 1];
@@ -108,11 +101,9 @@ void pcdiXMPIStat ( int iret, const char *filename, int line, MPI_Status *status
 
   return;
 }
-#endif
 
 /****************************************************/
 
-#ifdef USE_MPI
 void pcdiDebugComm ( const char *filename, const char *functionname, int line, MPI_Comm *comm )
 {
   int rank = -1, size, len, rankGlob = -1;
@@ -138,11 +129,9 @@ void pcdiDebugComm ( const char *filename, const char *functionname, int line, M
   free ( name );
 
 }
-#endif
 
 /****************************************************/
 
-#ifdef USE_MPI
 void pcdiDebugMsg ( const char * cdiPioDebugString, const char *filename,
                     const char *functionname, int line, int tag, int source,
                     int nfinished )
@@ -154,10 +143,9 @@ void pcdiDebugMsg ( const char * cdiPioDebugString, const char *filename,
             cdiPioDebugString, rank, functionname, filename, line,
             &commands[tag][0], source, nfinished );
 }
-#endif
+
 /****************************************************/
 
-#ifdef USE_MPI
 void pcdiDebugMsg2 ( const char *filename, const char *functionname, int line,
                    int tag, int source, char * text )
 {
@@ -168,8 +156,6 @@ void pcdiDebugMsg2 ( const char *filename, const char *functionname, int line,
             rank, functionname, filename, line,
             &commands[tag][0], source, text );
 }
-#endif
-
 
 /****************************************************/
 
@@ -180,16 +166,11 @@ void printArray ( const char * cdiPioDebugString, char * ps, const void * array,
   int * iArray;
   double * dArray;
 
-#ifdef USE_MPI
   {
     int rank = getMPICommWorldRank();
     fprintf ( stdout, "%s pe%d in %s, %s, line %d: %s = ",
               cdiPioDebugString, rank, funname, filename, line, ps );
   }
-#else
-  fprintf ( stdout, "%s %s, %s, line %d: %s = ",
-	    cdiPioDebugString, funname, filename, line, ps );
-#endif
 
   switch ( datatype )
     {
diff --git a/libcdi/src/pio_util.h b/libcdi/src/pio_util.h
index c06f5b3..6b47354 100644
--- a/libcdi/src/pio_util.h
+++ b/libcdi/src/pio_util.h
@@ -6,9 +6,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#ifdef USE_MPI
-#include "mpi.h"
-#endif
+#include <mpi.h>
 
 #ifndef _ERROR_H
 #include "error.h"
@@ -20,7 +18,6 @@
 
 #define debugString "#####"
 
-#ifdef USE_MPI
 void
 cdiAbortC_MPI(const char * caller, const char * filename,
               const char *functionname, int line,
@@ -29,9 +26,6 @@ cdiAbortC_MPI(const char * caller, const char * filename,
 
 void cdiPioWarning(const char *caller, const char *fmt, va_list ap);
 
-#endif
-
-#ifdef USE_MPI
 static inline int
 callsToMPIAreAllowed()
 {
@@ -48,9 +42,7 @@ getMPICommWorldRank()
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
   return rank;
 }
-#endif
 
-#ifdef USE_MPI
 #define xdebug(fmt, ...)                                                \
   if ( ddebug ){                                                        \
     int rank = getMPICommWorldRank();                                   \
@@ -59,17 +51,6 @@ getMPICommWorldRank()
               __VA_ARGS__ );                                            \
   }
 
-#else
-#define xdebug(fmt, ...)                                           \
-  if ( ddebug ){                                                   \
-    fprintf ( stderr, "%s %s, %s, line %d: " fmt "\n",             \
-              debugString, __func__, __FILE__,  __LINE__,          \
-              __VA_ARGS__ );                                       \
-  }
-#endif
-
-
-#ifdef USE_MPI
 #define xdebug3(fmt, ...)                                               \
   if ( ddebug == MAXDEBUG ){                                            \
     int rank = getMPICommWorldRank();                                   \
@@ -78,15 +59,6 @@ getMPICommWorldRank()
               __VA_ARGS__ );                                            \
   }
 
-#else
-#define xdebug3(fmt, ...)					\
-  if ( ddebug == MAXDEBUG ){                                    \
-    fprintf ( stderr, "%s, %s, line %d: " fmt "\n",             \
-              __func__, __FILE__,  __LINE__,                    \
-              __VA_ARGS__ );                                 \
-  }
-#endif
-
 void pcdiXMPI(int iret, const char *, int);
 #define xmpi(ret) do {                                  \
     int tmpIRet = (ret);                                   \
@@ -94,7 +66,6 @@ void pcdiXMPI(int iret, const char *, int);
       pcdiXMPI(tmpIRet, __FILE__, __LINE__ );              \
   } while(0)
 
-#ifdef USE_MPI
 void pcdiXMPIStat ( int, const char *, int, MPI_Status * );
 #define xmpiStat(ret,stat) pcdiXMPIStat ( ret, __FILE__, __LINE__, stat )
 
@@ -102,7 +73,6 @@ void pcdiDebugComm ( const char *filename, const char *functionname, int line, \
                      MPI_Comm *comm );
 #define xdebugComm(comm)\
   if ( ddebug ) pcdiDebugComm (  __FILE__, __func__, __LINE__, comm )
-#endif
 
 void pcdiDebugMsg ( const char * cdiDebugString, const char *filename, const char *functionname, int line, \
                     int tag, int source, int nfinished );
diff --git a/libcdi/src/resource_handle.c b/libcdi/src/resource_handle.c
index 9771253..52ffb31 100644
--- a/libcdi/src/resource_handle.c
+++ b/libcdi/src/resource_handle.c
@@ -17,12 +17,40 @@
 #include "error.h"
 #include "file.h"
 #include "resource_unpack.h"
+#include "institution.h"
+#include "model.h"
 
 enum { MIN_LIST_SIZE = 128 };
 
 static void listInitialize(void);
 
-// ATTENTION: not thread safe yet, namespaces are set in model!
+typedef struct listElem {
+  union
+  {
+    /* free-list management data */
+    struct
+    {
+      int next, prev;
+    } free;
+    /* holding an actual value */
+    struct
+    {
+      const resOps *ops;
+      void         *val;//ptr
+    } v;
+  } res;
+  int           status;
+} listElem_t;
+
+struct resHList_t
+{
+  int size, freeHead, hasDefaultRes;
+  listElem_t *resources;
+};
+
+static struct resHList_t *resHList;
+
+static int resHListSize = 0;
 
 #if  defined  (HAVE_LIBPTHREAD)
 #  include <pthread.h>
@@ -32,7 +60,15 @@ static pthread_mutex_t listMutex;
 
 #  define LIST_LOCK()         pthread_mutex_lock(&listMutex)
 #  define LIST_UNLOCK()       pthread_mutex_unlock(&listMutex)
-#  define LIST_INIT()         pthread_once(&listInitThread, listInitialize)
+#  define LIST_INIT(init0)         do {                         \
+    pthread_once(&listInitThread, listInitialize);              \
+    pthread_mutex_lock(&listMutex);                             \
+    if ((init0) && (!resHList || !resHList[0].resources))       \
+      reshListCreate(0);                                        \
+    pthread_mutex_unlock(&listMutex);                           \
+  } while (0)
+
+
 
 #else
 
@@ -40,33 +76,18 @@ static int listInit = 0;
 
 #  define LIST_LOCK()
 #  define LIST_UNLOCK()
-#  define LIST_INIT()        do {                               \
+#  define LIST_INIT(init0)        do {                          \
   if ( !listInit )                                              \
     {                                                           \
       listInitialize();                                         \
+      if ((init0) && (!resHList || !resHList[0].resources))     \
+        reshListCreate(0);                                      \
       listInit = 1;                                             \
     }                                                           \
   } while(0)
 
 #endif
 
-
-typedef struct listElem {
-  cdiResH       resH;//idx
-  int next;
-  resOps      * ops;
-  void        * val;//ptr
-  int           status;
-} listElem_t;
-
-static struct
-{
-  int size, freeHead;
-  listElem_t *resources;
-} *resHList;
-
-static int resHListSize = 0;
-
 /**************************************************************/
 
 static void
@@ -75,20 +96,23 @@ listInitResources(int nsp)
   xassert(nsp < resHListSize && nsp >= 0);
   int size = resHList[nsp].size = MIN_LIST_SIZE;
   xassert(resHList[nsp].resources == NULL);
-  resHList[nsp].resources = xcalloc(MIN_LIST_SIZE, sizeof (listElem_t));
+  resHList[nsp].resources = (listElem_t*) xcalloc(MIN_LIST_SIZE, sizeof(listElem_t));
   listElem_t *p = resHList[nsp].resources;
 
   for (int i = 0; i < size; i++ )
     {
-      p[i].resH   = namespaceIdxEncode2(nsp, i);
-      p[i].next   = i + 1;
-      p[i].ops    = NULL;
-      p[i].val    = NULL;
-      p[i].status = RESH_UNDEFID;
+      p[i].res.free.next = i + 1;
+      p[i].res.free.prev = i - 1;
+      p[i].status = RESH_UNUSED;
     }
 
-  p[resHList[nsp].size-1].next = -1;
+  p[size-1].res.free.next = -1;
   resHList[nsp].freeHead = 0;
+  int oldNsp = namespaceGetActive();
+  namespaceSetActive(nsp);
+  instituteDefaultEntries();
+  modelDefaultEntries();
+  namespaceSetActive(oldNsp);
 }
 
 static inline void
@@ -102,10 +126,11 @@ reshListClearEntry(int i)
 void
 reshListCreate(int namespaceID)
 {
+  LIST_INIT(namespaceID != 0);
   LIST_LOCK();
   if (resHListSize <= namespaceID)
     {
-      resHList = xrealloc(resHList, (namespaceID + 1) * sizeof (resHList[0]));
+      resHList = (struct resHList_t*) xrealloc(resHList, (namespaceID + 1) * sizeof (resHList[0]));
       for (int i = resHListSize; i <= namespaceID; ++i)
         reshListClearEntry(i);
       resHListSize = namespaceID + 1;
@@ -120,7 +145,6 @@ reshListCreate(int namespaceID)
 void
 reshListDestruct(int namespaceID)
 {
-  LIST_INIT();
   LIST_LOCK();
   xassert(resHList && namespaceID >= 0 && namespaceID < resHListSize);
   int callerNamespaceID = namespaceGetActive();
@@ -130,8 +154,8 @@ reshListDestruct(int namespaceID)
       for ( int j = 0; j < resHList[namespaceID].size; j++ )
         {
           listElem_t *listElem = resHList[namespaceID].resources + j;
-          if (listElem->val)
-            listElem->ops->valDestroy(listElem->val);
+          if (listElem->status != RESH_UNUSED)
+            listElem->res.v.ops->valDestroy(listElem->res.v.val);
         }
       free(resHList[namespaceID].resources);
       reshListClearEntry(namespaceID);
@@ -145,9 +169,9 @@ reshListDestruct(int namespaceID)
 static void listDestroy ( void )
 {
   LIST_LOCK();
-  for (int i = 0; i < resHListSize; ++i)
-    if (resHList[i].resources)
-      namespaceDelete(i);
+  for (int i = resHListSize; i > 0; --i)
+    if (resHList[i-1].resources)
+      namespaceDelete(i-1);
   free(resHList);
   resHList = NULL;
   cdiReset();
@@ -167,8 +191,6 @@ void listInitialize ( void )
   pthread_mutex_init ( &listMutex, &ma);
   pthread_mutexattr_destroy(&ma);
 #endif
-  // create default namespace
-  reshListCreate(0);
   /* file is special and has its own table, which needs to be
    * created, before we register the listDestroy exit handler */
   {
@@ -178,7 +200,6 @@ void listInitialize ( void )
       fileClose_serial(null_id);
   }
   atexit ( listDestroy );
-
 }
 
 /**************************************************************/
@@ -190,47 +211,55 @@ void listSizeExtend()
   int oldSize = resHList[nsp].size;
   int newListSize = oldSize + MIN_LIST_SIZE;
 
-  resHList[nsp].resources =
-    xrealloc(resHList[nsp].resources,
-             newListSize * sizeof (resHList[0].resources[0]));
+  resHList[nsp].resources = (listElem_t*) xrealloc(resHList[nsp].resources,
+                                                   newListSize * sizeof(listElem_t));
 
+  listElem_t *r = resHList[nsp].resources;
   for (int i = oldSize; i < newListSize; ++i)
     {
-      resHList[nsp].resources[i].resH   = namespaceIdxEncode2 ( nsp, i );
-      resHList[nsp].resources[i].next   = i + 1;
-      resHList[nsp].resources[i].ops    = NULL;
-      resHList[nsp].resources[i].val    = NULL;
-      resHList[nsp].resources[i].status = RESH_UNDEFID;
+      r[i].res.free.next = i + 1;
+      r[i].res.free.prev = i - 1;
+      r[i].status = RESH_UNUSED;
     }
 
-  resHList[nsp].resources[newListSize-1].next = resHList[nsp].freeHead;
+  if (resHList[nsp].freeHead != -1)
+    r[resHList[nsp].freeHead].res.free.next
+      = newListSize - 1;
+  r[newListSize-1].res.free.next = resHList[nsp].freeHead;
+  r[oldSize].res.free.prev = -1;
   resHList[nsp].freeHead = oldSize;
   resHList[nsp].size = newListSize;
 }
 
 /**************************************************************/
 
-int reshPut ( void *p, resOps *ops )
+static void
+reshPut_(int nsp, int entry, void *p, const resOps *ops)
 {
-  cdiResH resH = -1, nsp;
-  listElem_t * newListElem;
+  listElem_t *newListElem = resHList[nsp].resources + entry;
+  int next = newListElem->res.free.next;
+  if (next != -1)
+    resHList[nsp].resources[next].res.free.prev = -1;
+  resHList[nsp].freeHead = next;
+  newListElem->res.v.val = p;
+  newListElem->res.v.ops = ops;
+  newListElem->status = RESH_ASSIGNED;
+}
 
+int reshPut ( void *p, const resOps *ops )
+{
   xassert ( p && ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
-  nsp = namespaceGetActive ();
+  int nsp = namespaceGetActive ();
 
   if ( resHList[nsp].freeHead == -1) listSizeExtend();
-  newListElem               = resHList[nsp].resources + resHList[nsp].freeHead;
-  resHList[nsp].freeHead    = newListElem->next;
-  newListElem->next         = -1;
-  resH                      = newListElem->resH;
-  newListElem->val          = p;
-  newListElem->ops          = ops;
-  newListElem->status       = ASSIGNED;
+  int entry = resHList[nsp].freeHead;
+  cdiResH resH = namespaceIdxEncode2(nsp, entry);
+  reshPut_(nsp, entry, p, ops);
 
   LIST_UNLOCK();
 
@@ -239,12 +268,24 @@ int reshPut ( void *p, resOps *ops )
 
 /**************************************************************/
 
-void reshRemove ( cdiResH resH, resOps * ops )
+static void
+reshRemove_(int nsp, int idx)
+{
+  int curFree = resHList[nsp].freeHead;
+  listElem_t *r = resHList[nsp].resources;
+  r[idx].res.free.next = curFree;
+  if (curFree != -1)
+    r[curFree].res.free.prev = idx;
+  r[idx].status = RESH_UNUSED;
+  resHList[nsp].freeHead = idx;
+}
+
+void reshRemove ( cdiResH resH, const resOps * ops )
 {
   int nsp;
   namespaceTuple_t nspT;
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -252,32 +293,49 @@ void reshRemove ( cdiResH resH, resOps * ops )
 
   nspT = namespaceResHDecode ( resH );
 
-  xassert ( nspT.nsp == nsp &&
-            nspT.idx >= 0 &&
-            nspT.idx < resHList[nsp].size &&
-            resHList[nsp].resources[nspT.idx].ops &&
-            resHList[nsp].resources[nspT.idx].ops == ops );
+  xassert ( nspT.nsp == nsp
+            && nspT.idx >= 0
+            && nspT.idx < resHList[nsp].size
+            && resHList[nsp].resources[nspT.idx].status != RESH_UNUSED
+            && resHList[nsp].resources[nspT.idx].res.v.ops
+            && resHList[nsp].resources[nspT.idx].res.v.ops == ops );
 
-  resHList[nsp].resources[nspT.idx].next   = resHList[nsp].freeHead;
-  resHList[nsp].resources[nspT.idx].ops    = NULL;
-  resHList[nsp].resources[nspT.idx].val    = NULL;
-  resHList[nsp].resources[nspT.idx].status = RESH_UNDEFID;
-  resHList[nsp].freeHead                   = nspT.idx;
+  reshRemove_(nsp, nspT.idx);
 
   LIST_UNLOCK();
 }
 
 /**************************************************************/
 
+void reshReplace(cdiResH resH, void *p, const resOps *ops)
+{
+  xassert(p && ops);
+  LIST_INIT(1);
+  LIST_LOCK();
+  int nsp = namespaceGetActive();
+  namespaceTuple_t nspT = namespaceResHDecode(resH);
+  while (resHList[nsp].size <= nspT.idx)
+    listSizeExtend();
+  listElem_t *q = resHList[nsp].resources + nspT.idx;
+  if (q->status != RESH_UNUSED)
+    {
+      q->res.v.ops->valDestroy(q->res.v.val);
+      reshRemove_(nsp, nspT.idx);
+    }
+  reshPut_(nsp, nspT.idx, p, ops);
+  LIST_UNLOCK();
+}
+
+
 static listElem_t *
-reshGetElem(const char *caller, cdiResH resH, resOps *ops)
+reshGetElem(const char *caller, cdiResH resH, const resOps *ops)
 {
   listElem_t *listElem;
   int nsp;
   namespaceTuple_t nspT;
   xassert ( ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -299,39 +357,36 @@ reshGetElem(const char *caller, cdiResH resH, resOps *ops)
               nspT.nsp, nspT.idx, (int)resH, nsp, resHList[nsp].size);
     }
 
-  if ( !(listElem && listElem->ops == ops) )
+  if ( !(listElem && listElem->res.v.ops == ops) )
     xabortC(caller, "Invalid resource handle %d, list element not found!",
             (int)resH);
   return listElem;
 }
 
 
-void *reshGetValue(const char * caller, cdiResH resH, resOps * ops)
+void *reshGetValue(const char * caller, cdiResH resH, const resOps * ops)
 {
-  return reshGetElem(caller, resH, ops)->val;
+  return reshGetElem(caller, resH, ops)->res.v.val;
 }
 
 /**************************************************************/
 
-void reshGetResHListOfType ( int c, int * resHs, resOps * ops )
+void reshGetResHListOfType ( int c, int * resHs, const resOps * ops )
 {
   int i, j = 0, nsp;
 
   xassert ( resHs && ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   nsp = namespaceGetActive ();
 
-  for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val && resHList[nsp].resources[i].ops )
-      if ( resHList[nsp].resources[i].ops == ops )
-        {
-          resHs[j++] = namespaceIdxEncode2 ( nsp, i );
-          if ( j == c ) break;
-        }
+  for ( i = 0; i < resHList[nsp].size && j < c; i++ )
+    if (resHList[nsp].resources[i].status != RESH_UNUSED
+        && resHList[nsp].resources[i].res.v.ops == ops)
+      resHs[j++] = namespaceIdxEncode2(nsp, i);
 
   LIST_UNLOCK();
 }
@@ -342,16 +397,17 @@ cdiResHApply(enum cdiApplyRet (*func)(int id, void *res, const resOps *p,
 {
   xassert(func);
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   int nsp = namespaceGetActive ();
   enum cdiApplyRet ret = CDI_APPLY_GO_ON;
   for (int i = 0; i < resHList[nsp].size && ret > 0; ++i)
-    if (resHList[nsp].resources[i].val && resHList[nsp].resources[i].ops)
-      ret = func(namespaceIdxEncode2(nsp, i), resHList[nsp].resources[i].val,
-                 resHList[nsp].resources[i].ops, data);
+    if (resHList[nsp].resources[i].status != RESH_UNUSED)
+      ret = func(namespaceIdxEncode2(nsp, i),
+                 resHList[nsp].resources[i].res.v.val,
+                 resHList[nsp].resources[i].res.v.ops, data);
   LIST_UNLOCK();
   return ret;
 }
@@ -364,16 +420,16 @@ cdiResHFilterApply(const resOps *p,
 {
   xassert(p && func);
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   int nsp = namespaceGetActive ();
   enum cdiApplyRet ret = CDI_APPLY_GO_ON;
+  listElem_t *r = resHList[nsp].resources;
   for (int i = 0; i < resHList[nsp].size && ret > 0; ++i)
-    if (resHList[nsp].resources[i].val && resHList[nsp].resources[i].ops
-        && resHList[nsp].resources[i].ops == p)
-      ret = func(namespaceIdxEncode2(nsp, i), resHList[nsp].resources[i].val,
+    if (r[i].status != RESH_UNUSED && r[i].res.v.ops == p)
+      ret = func(namespaceIdxEncode2(nsp, i), r[i].res.v.val,
                  data);
   LIST_UNLOCK();
   return ret;
@@ -384,22 +440,21 @@ cdiResHFilterApply(const resOps *p,
 
 /**************************************************************/
 
-int reshCountType ( resOps * ops )
+int reshCountType ( const resOps * ops )
 {
   int i, nsp, countType = 0;
 
   xassert ( ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
   nsp = namespaceGetActive ();
 
+  listElem_t *r = resHList[nsp].resources;
   for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val )
-      if ( resHList[nsp].resources[i].ops == ops )
-        countType++;
+    countType += (r[i].status != RESH_UNUSED && r[i].res.v.ops == ops);
 
   LIST_UNLOCK();
 
@@ -409,18 +464,18 @@ int reshCountType ( resOps * ops )
 /**************************************************************/
 
 int
-reshResourceGetPackSize(int resH, resOps *ops, void *context)
+reshResourceGetPackSize(int resH, const resOps *ops, void *context)
 {
   listElem_t *curr = reshGetElem(__func__, resH, ops);
-  return curr->ops->valGetPackSize(curr->val, context);
+  return curr->res.v.ops->valGetPackSize(curr->res.v.val, context);
 }
 
 void
-reshPackResource(int resH, resOps *ops,
+reshPackResource(int resH, const resOps *ops,
                  void *buf, int buf_size, int *position, void *context)
 {
   listElem_t *curr = reshGetElem(__func__, resH, ops);
-  curr->ops->valPack(curr->val, buf, buf_size, position, context);
+  curr->res.v.ops->valPack(curr->res.v.val, buf, buf_size, position, context);
 }
 
 
@@ -428,26 +483,24 @@ static int getPackBufferSize(void *context)
 {
   int nsp, i;
   int intpacksize, packBufferSize = 0;
-  listElem_t * curr;
 
   nsp = namespaceGetActive ();
 
   /* pack start marker, namespace and sererator marker */
-  packBufferSize += (intpacksize = serializeGetSize(3, DATATYPE_INT, context));
+  packBufferSize += 3 * (intpacksize = serializeGetSize(1, DATATYPE_INT, context));
 
   /* pack resources, type marker and seperator marker */
-  for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val )
-      if ( resHList[nsp].resources[i].status == ASSIGNED )
-        {
-          curr = resHList[nsp].resources + i;
-          xassert ( curr->ops );
-
-          /* message plus frame of 2 ints */
-          packBufferSize += curr->ops->valGetPackSize(curr->val, context)
-            + 2 * intpacksize;
-        }
-
+  listElem_t *r = resHList[nsp].resources;
+  for ( i = 0; i < resHList[nsp].size; i++)
+    if (r[i].status == RESH_ASSIGNED)
+      {
+        xassert ( r[i].res.v.ops );
+
+        /* message plus frame of 2 ints */
+        packBufferSize +=
+          r[i].res.v.ops->valGetPackSize(r[i].res.v.val, context)
+          + 2 * intpacksize;
+      }
   /* end marker */
   packBufferSize += intpacksize;
 
@@ -467,7 +520,6 @@ void reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
 {
   int i, packBufferPos = 0;
   int start = START, end = END, sep = SEPARATOR, type;
-  listElem_t * curr;
 
   xassert ( packBuffer );
 
@@ -476,33 +528,34 @@ void reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
   int nsp = namespaceGetActive ();
 
   int pBSize = *packBufferSize = getPackBufferSize(context);
-  char *pB = *packBuffer = xcalloc(1, *packBufferSize);
+  char *pB = *packBuffer = (char*) xcalloc(1, *packBufferSize);
 
   {
     int header[3] = { start, nsp, sep };
     serializePack(header, 3,  DATATYPE_INT, pB, pBSize, &packBufferPos, context);
   }
 
+  listElem_t *r = resHList[nsp].resources;
   for ( i = 0; i < resHList[nsp].size; i++ )
-    if ( resHList[nsp].resources[i].val )
-      if ( resHList[nsp].resources[i].status == ASSIGNED )
-        {
-          curr = resHList[nsp].resources + i;
-          xassert ( curr->ops );
+    if ( r[i].status == RESH_ASSIGNED)
+      {
+        listElem_t * curr = r + i;
+        xassert ( curr->res.v.ops );
 
-          type = curr->ops->valTxCode ();
+        type = curr->res.v.ops->valTxCode ();
 
-          if ( ! type ) continue;
+        if ( ! type ) continue;
 
-          serializePack( &type, 1, DATATYPE_INT, * packBuffer,
-			    * packBufferSize, &packBufferPos, context);
+        serializePack( &type, 1, DATATYPE_INT, * packBuffer,
+                       * packBufferSize, &packBufferPos, context);
 
-          curr->ops->valPack(curr->val, pB, pBSize, &packBufferPos, context);
+        curr->res.v.ops->valPack(curr->res.v.val,
+                                 pB, pBSize, &packBufferPos, context);
 
-          serializePack(&sep, 1, DATATYPE_INT, pB, pBSize, &packBufferPos, context);
+        serializePack(&sep, 1, DATATYPE_INT, pB, pBSize, &packBufferPos, context);
 
-          curr->status = CLOSED;
-        }
+        curr->status = RESH_CLOSED;
+      }
 
   LIST_UNLOCK();
 
@@ -513,15 +566,15 @@ void reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
 
 /* for thread safety this feature would have to be integrated in reshPut */
 
-void reshSetStatus ( cdiResH resH, resOps * ops, int status )
+void reshSetStatus ( cdiResH resH, const resOps * ops, int status )
 {
   int nsp;
   namespaceTuple_t nspT;
   listElem_t * listElem;
 
-  xassert ( ops );
+  xassert(ops && status != RESH_UNUSED);
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -536,7 +589,7 @@ void reshSetStatus ( cdiResH resH, resOps * ops, int status )
   listElem = resHList[nsp].resources + nspT.idx;
 
   xassert ( listElem &&
-            listElem->ops == ops );
+            listElem->res.v.ops == ops );
 
   listElem->status = status;
 
@@ -545,15 +598,14 @@ void reshSetStatus ( cdiResH resH, resOps * ops, int status )
 
 /**************************************************************/
 
-int reshGetStatus ( cdiResH resH, resOps * ops )
+int reshGetStatus ( cdiResH resH, const resOps * ops )
 {
   int nsp;
   namespaceTuple_t nspT;
-  listElem_t * listElem;
 
   xassert ( ops );
 
-  LIST_INIT();
+  LIST_INIT(1);
 
   LIST_LOCK();
 
@@ -565,12 +617,13 @@ int reshGetStatus ( cdiResH resH, resOps * ops )
             nspT.idx >= 0 &&
             nspT.idx < resHList[nsp].size );
 
-  listElem = resHList[nsp].resources + nspT.idx;
+  listElem_t *listElem = resHList[nsp].resources + nspT.idx;
+
+  const resOps *elemOps = listElem->res.v.ops;
 
   LIST_UNLOCK();
 
-  xassert ( listElem &&
-            listElem->ops == ops );
+  xassert(listElem && elemOps == ops);
 
   return listElem->status;
 }
@@ -593,7 +646,7 @@ void reshUnlock ()
 
 int reshListCompare ( int nsp0, int nsp1 )
 {
-  LIST_INIT();
+  LIST_INIT(1);
   LIST_LOCK();
 
   xassert(resHListSize > nsp0 && resHListSize > nsp1 &&
@@ -606,33 +659,34 @@ int reshListCompare ( int nsp0, int nsp1 )
     *resources1 = resHList[nsp1].resources;
   for (i = 0; i < listSizeMin; i++)
     {
-      int occupied0 = resources0[i].val != NULL,
-        occupied1 = resources1[i].val != NULL;
+      int occupied0 = resources0[i].status != RESH_UNUSED,
+        occupied1 = resources1[i].status != RESH_UNUSED;
       /* occupation mismatch ? */
       int diff = occupied0 ^ occupied1;
       valCompare |= (diff << cdiResHListOccupationMismatch);
       if (!diff && occupied0)
         {
           /* both occupied, do resource types match? */
-          diff = (resources0[i].ops != resources1[i].ops
-                  || resources0[i].ops == NULL);
+          diff = (resources0[i].res.v.ops != resources1[i].res.v.ops
+                  || resources0[i].res.v.ops == NULL);
           valCompare |= (diff << cdiResHListResourceTypeMismatch);
           if (!diff)
             {
               /* types match, does content match also? */
-              diff = resources0[i].ops->valCompare(resources0[i].val,
-                                                   resources1[i].val);
+              diff
+                = resources0[i].res.v.ops->valCompare(resources0[i].res.v.val,
+                                                      resources1[i].res.v.val);
               valCompare |= (diff << cdiResHListResourceContentMismatch);
             }
         }
     }
   /* find resources in nsp 0 beyond end of nsp 1 */
   for (int j = listSizeMin; j < resHList[nsp0].size; ++j)
-    valCompare |= ((resources0[j].val != NULL)
+    valCompare |= ((resources0[j].status != RESH_UNUSED)
                    << cdiResHListOccupationMismatch);
   /* find resources in nsp 1 beyond end of nsp 0 */
   for (; i < resHList[nsp1].size; ++i)
-    valCompare |= ((resources1[i].val != NULL)
+    valCompare |= ((resources1[i].status != RESH_UNUSED)
                    << cdiResHListOccupationMismatch);
 
   LIST_UNLOCK();
@@ -647,7 +701,7 @@ void reshListPrint(FILE *fp)
   int i, j, temp;
   listElem_t * curr;
 
-  LIST_INIT();
+  LIST_INIT(1);
 
 
   temp = namespaceGetActive ();
@@ -671,9 +725,9 @@ void reshListPrint(FILE *fp)
       for ( j = 0; j < resHList[i].size; j++ )
         {
           curr = resHList[i].resources + j;
-          if ( curr->ops && curr->val )
+          if (curr->status != RESH_UNUSED)
             {
-              curr->ops->valPrint (( void * ) curr->val, fp );
+              curr->res.v.ops->valPrint(curr->res.v.val, fp);
               fprintf ( fp, "\n" );
             }
         }
diff --git a/libcdi/src/resource_handle.h b/libcdi/src/resource_handle.h
index 9ac3e7a..78846fb 100644
--- a/libcdi/src/resource_handle.h
+++ b/libcdi/src/resource_handle.h
@@ -33,19 +33,25 @@ typedef struct {
   valTxCodeFunc      valTxCode;
 }resOps;
 
-enum { RESH_UNDEFID, ASSIGNED, SUSPENDED, CLOSED };
+enum {
+  RESH_UNUSED,             /* resource holds no value */
+  RESH_ASSIGNED,           /* resource is user-assigned */
+  RESH_PRE_ASSIGNED,       /* resource is pre-assigned by library */
+  RESH_CLOSED,             /* resource is marked immutable */
+};
 
 void   reshListCreate(int namespaceID);
 void   reshListDestruct(int namespaceID);
-int    reshPut ( void *, resOps * );
-void   reshRemove ( cdiResH, resOps * );
+int    reshPut ( void *, const resOps * );
+void reshReplace(cdiResH resH, void *p, const resOps *ops);
+void   reshRemove ( cdiResH, const resOps * );
 
-int    reshCountType ( resOps * );
+int    reshCountType ( const resOps * );
 
-void * reshGetValue(const char *, cdiResH, resOps * );
+void * reshGetValue(const char *, cdiResH, const resOps * );
 #define reshGetVal(resH, ops)  reshGetValue(__func__, resH, ops)
 
-void   reshGetResHListOfType ( int, int *, resOps * );
+void   reshGetResHListOfType ( int, int *, const resOps * );
 
 enum cdiApplyRet {
   CDI_APPLY_ERROR = -1,
@@ -63,11 +69,11 @@ cdiResHFilterApply(const resOps *p,
 
 void   reshPackBufferCreate ( char **, int *, void *context );
 void   reshPackBufferDestroy ( char ** );
-int    reshResourceGetPackSize(int resh, resOps *ops, void *context);
-void   reshPackResource(int resh, resOps *ops,
+int    reshResourceGetPackSize(int resh, const resOps *ops, void *context);
+void   reshPackResource(int resh, const resOps *ops,
                         void *buf, int buf_size, int *position, void *context);
-void   reshSetStatus ( cdiResH, resOps *, int );
-int    reshGetStatus ( cdiResH, resOps * );
+void   reshSetStatus ( cdiResH, const resOps *, int );
+int    reshGetStatus ( cdiResH, const resOps * );
 
 void   reshLock   ( void );
 void   reshUnlock ( void );
diff --git a/libcdi/src/resource_unpack.c b/libcdi/src/resource_unpack.c
index f054eaa..72210c1 100644
--- a/libcdi/src/resource_unpack.c
+++ b/libcdi/src/resource_unpack.c
@@ -4,6 +4,7 @@
 
 #include "cdi.h"
 #include "dmemory.h"
+#include "grid.h"
 #include "institution.h"
 #include "model.h"
 #include "cdi_int.h"
@@ -12,20 +13,14 @@
 #include "serialize.h"
 #include "resource_unpack.h"
 #include "taxis.h"
-
-extern void   gridUnpack ( char *, int, int *, int, void *context);
-extern void  zaxisUnpack ( char *, int, int *, int, void *context);
-extern int streamNint;
-
+#include "zaxis.h"
 
 /*****************************************************************************/
 
-
-
 void reshUnpackResources(char * unpackBuffer, int unpackBufferSize,
                          void *context)
 {
-  int token1, token2, nspTarget;
+  int token1, token2, originNamespace;
   int unpackBufferPos = 0;
   int numAssociations = 0, sizeAssociations = 16;
   struct streamAssoc *associations
@@ -42,27 +37,27 @@ void reshUnpackResources(char * unpackBuffer, int unpackBufferSize,
 	{
 	case START:
 	  serializeUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                          &nspTarget, 1, DATATYPE_INT, context);
+                          &originNamespace, 1, DATATYPE_INT, context);
 	  break;
 	case GRID:
 	  gridUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                     nspTarget, context );
+                     originNamespace, context, 1);
 	  break;
 	case ZAXIS:
 	  zaxisUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                      nspTarget, context);
+                      originNamespace, context, 1);
 	  break;
 	case TAXIS:
 	  taxisUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                      nspTarget, context, 1);
+                      originNamespace, context, 1);
 	  break;
 	case INSTITUTE:
           instituteUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                          nspTarget, context);
+                          originNamespace, context, 1);
 	  break;
 	case MODEL:
           modelUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                      nspTarget, context);
+                      originNamespace, context, 1);
 	  break;
 	case STREAM:
           if (sizeAssociations == numAssociations)
@@ -71,12 +66,12 @@ void reshUnpackResources(char * unpackBuffer, int unpackBufferSize,
                          sizeof (associations[0]) * (sizeAssociations *= 2));
 	  associations[numAssociations]
             = streamUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                           nspTarget, context);
+                           originNamespace, context);
           ++numAssociations;
 	  break;
 	case VLIST:
           vlistUnpack(unpackBuffer, unpackBufferSize, &unpackBufferPos,
-                      nspTarget, context);
+                      originNamespace, context, 1);
 	  break;
 	default:
 	  xabort ( "TOKEN MAPS NO VALID DATATYPE" );
@@ -90,9 +85,9 @@ void reshUnpackResources(char * unpackBuffer, int unpackBufferSize,
     {
       cdiStreamSetupVlist(stream_to_pointer(associations[i].streamID),
                           namespaceAdaptKey(associations[i].vlistID,
-                                            nspTarget),
+                                            originNamespace),
                           namespaceAdaptKey(associations[i].vlistIDorig,
-                                            nspTarget));
+                                            originNamespace));
     }
   free(associations);
 }
diff --git a/libcdi/src/resource_unpack.h b/libcdi/src/resource_unpack.h
index 87ddb59..53e2c59 100644
--- a/libcdi/src/resource_unpack.h
+++ b/libcdi/src/resource_unpack.h
@@ -15,8 +15,6 @@ enum
   VLIST     = 7,
   START     = 55555555,
   SEPARATOR = 66666666,
-  DATATOKEN = 77777777,
-  FUNCCALL  = 88888888,
   END       = 99999999
 };
 
diff --git a/libcdi/src/servicelib.c b/libcdi/src/servicelib.c
index f38ed9d..bcfcee1 100644
--- a/libcdi/src/servicelib.c
+++ b/libcdi/src/servicelib.c
@@ -32,7 +32,7 @@ static int srvDefaultDprec = 0;
  */
 
 #undef  LIBVERSION
-#define LIBVERSION      1.3.1
+#define LIBVERSION      1.3.2
 #define XSTRING(x)	#x
 #define STRING(x)	XSTRING(x)
 static const char srv_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
@@ -94,12 +94,14 @@ void srvLibInit()
 		  default:
 		    Message("Invalid digit in %s: %s", envName, envString);
 		  }
-		break;		
+		break;
 	      }
 	    default:
-	      Message("Invalid character in %s: %s", envName, envString);
-	      break;
-	    }
+              {
+                Message("Invalid character in %s: %s", envName, envString);
+                break;
+              }
+            }
 	  pos += 2;
 	}
     }
@@ -275,7 +277,7 @@ int srvInqData(srvrec_t *srvp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT32));
-	  }	
+	  }
 	break;
       }
     case DOUBLE_PRECISION:
@@ -292,7 +294,7 @@ int srvInqData(srvrec_t *srvp, int prec, void *data)
 	else
 	  {
 	    Error("not implemented for %d byte float", sizeof(FLT64));
-	  }	
+	  }
 	break;
     default:
       {
@@ -338,7 +340,7 @@ int srvDefData(srvrec_t *srvp, int prec, const void *data)
   else                   hprec = srvp->hprec;
 
   if ( ! hprec ) hprec = dprec;
-  
+
   srvp->hprec = hprec;
 
   header = srvp->header;
@@ -461,7 +463,7 @@ int srvRead(int fileID, srvrec_t *srvp)
       }
     default:
       {
-	Error("unexpected header precision %d", hprec);
+	Error("Unexpected header precision %d", hprec);
         break;
       }
     }
@@ -470,8 +472,8 @@ int srvRead(int fileID, srvrec_t *srvp)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("header blocklen differ!");
-      return (-1);
+      Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   srvp->datasize = srvp->header[4]*srvp->header[5];
@@ -502,7 +504,7 @@ int srvRead(int fileID, srvrec_t *srvp)
 
   if ( dprec != SINGLE_PRECISION && dprec != DOUBLE_PRECISION )
     {
-      Warning("unexpected data precision %d", dprec);
+      Warning("Unexpected data precision %d", dprec);
       return (-1);
     }
 
@@ -512,8 +514,8 @@ int srvRead(int fileID, srvrec_t *srvp)
 
   if ( blocklen2 != blocklen )
     {
-      Warning("data blocklen differ!");
-      return (-1);
+      Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
+      if ( blocklen2 != 0 ) return (-1);
     }
 
   return (0);
@@ -566,7 +568,7 @@ int srvWrite(int fileID, srvrec_t *srvp)
         break;
       }
     }
-  
+
   binWriteF77Block(fileID, byteswap, blocklen);
 
   datasize = header[4]*header[5];
diff --git a/libcdi/src/stream.c b/libcdi/src/stream.c
index 7b3609d..1631d96 100644
--- a/libcdi/src/stream.c
+++ b/libcdi/src/stream.c
@@ -2,7 +2,13 @@
 #  include "config.h"
 #endif
 
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#endif
+
 #include <ctype.h>
+#include <stdio.h>
+#include <string.h>
 
 #include "cdi.h"
 #include "cdi_int.h"
@@ -26,16 +32,9 @@
 
 #include "namespace.h"
 
-#include <string.h>
 
 #define  MAX_FNAMES  3
 
-extern resOps streamOps;
-
-
-FILE *popen(const char *command, const char *type);
-int pclose(FILE *stream);
-
 static void
 cdiPrintDefaults(void)
 {
@@ -162,7 +161,7 @@ int getFiletype(const char *filename, int *byteorder)
 
   if ( fileID == CDI_UNDEFID )
     {
-      if ( memcmp(filename, "http:", 5) == 0 )
+      if ( strncmp(filename, "http:", 5) == 0 || strncmp(filename, "https:", 6) == 0 )
 	return (FILETYPE_NC);
       else
 	return (CDI_ESYSTEM);
@@ -397,9 +396,7 @@ The valid CDI file format types are @func{FILETYPE_GRB}, @func{FILETYPE_GRB2}, @
 */
 int streamInqFiletype(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -443,13 +440,11 @@ with the file format type @func{FILETYPE_SRV}, @func{FILETYPE_EXT} or @func{FILE
 void streamDefByteorder(int streamID, int byteorder)
 {
   int filetype;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  if ( reshGetStatus ( streamID, &streamOps ) == CLOSED )
+  if ( reshGetStatus ( streamID, &streamOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -463,7 +458,7 @@ void streamDefByteorder(int streamID, int byteorder)
 #if  defined  (HAVE_LIBSERVICE)
     case FILETYPE_SRV:
       {
-	srvrec_t *srvp = streamptr->record->srvp;
+	srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 	srvp->byteswap = getByteswap(byteorder);
 
 	break;
@@ -472,7 +467,7 @@ void streamDefByteorder(int streamID, int byteorder)
 #if  defined  (HAVE_LIBEXTRA)
     case FILETYPE_EXT:
       {
-	extrec_t *extp = streamptr->record->extp;
+	extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 	extp->byteswap = getByteswap(byteorder);
 
 	break;
@@ -481,7 +476,7 @@ void streamDefByteorder(int streamID, int byteorder)
 #if  defined  (HAVE_LIBIEG)
     case FILETYPE_IEG:
       {
-	iegrec_t *iegp = streamptr->record->iegp;
+	iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 	iegp->byteswap = getByteswap(byteorder);
 
 	break;
@@ -510,9 +505,7 @@ The valid CDI byte order types are @func{CDI_BIGENDIAN} and @func{CDI_LITTLEENDI
 */
 int streamInqByteorder(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -522,7 +515,8 @@ int streamInqByteorder(int streamID)
 
 char *streamFilesuffix(int filetype)
 {
-  static char *fileSuffix[] = {"", ".grb", ".g2", ".nc", ".nc", ".nc4", ".nc4", ".srv", ".ext", ".ieg"};
+  // static char *fileSuffix[] = {"", ".grb", ".g2", ".nc", ".nc", ".nc4", ".nc4", ".srv", ".ext", ".ieg"};
+  static char *fileSuffix[] = {"", ".grb", ".grb", ".nc", ".nc", ".nc", ".nc", ".srv", ".ext", ".ieg"};
   int size = (int) (sizeof(fileSuffix)/sizeof(char *));
 
   if ( filetype > 0 && filetype < size )
@@ -534,9 +528,7 @@ char *streamFilesuffix(int filetype)
 
 char *streamFilename(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -548,9 +540,7 @@ int cdiInqTimeSize(int streamID)
 {
   int ntsteps;
   int tsID = 0, nrecs;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -672,7 +662,7 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
           {
             streamptr->record = (Record *) malloc(sizeof(Record));
             streamptr->record->buffer = NULL;
-            streamptr->record->srvp   = srvNew();
+            streamptr->record->exsep  = srvNew();
           }
         break;
       }
@@ -686,7 +676,7 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
           {
             streamptr->record = (Record *) malloc(sizeof(Record));
             streamptr->record->buffer = NULL;
-            streamptr->record->extp   = extNew();
+            streamptr->record->exsep  = extNew();
           }
         break;
       }
@@ -700,7 +690,7 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
           {
             streamptr->record = (Record *) malloc(sizeof(Record));
             streamptr->record->buffer = NULL;
-            streamptr->record->iegp   = iegNew();
+            streamptr->record->exsep   = iegNew();
           }
         break;
       }
@@ -729,6 +719,9 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
         return (CDI_ELIBNAVAIL);
       }
     }
+
+  streamptr->filetype = filetype;
+
   return fileID;
 }
 
@@ -766,7 +759,6 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
 
       if ( streamID < 0 ) return (CDI_ELIMIT);
 
-      streamptr->filetype = filetype;
       streamptr->filemode = tolower(*filemode);
       streamptr->filename = strdupx(filename);
       streamptr->fileID   = fileID;
@@ -818,7 +810,6 @@ static int streamOpenA(const char *filename, const char *filemode, int filetype)
 
   streamID = streamptr->self;
 
-  streamptr->filetype = filetype;
   streamptr->filemode = tolower(*filemode);
   streamptr->filename = strdupx(filename);
   streamptr->fileID   = fileID;
@@ -950,7 +941,6 @@ int streamOpenRead(const char *filenames)
   int num_fnames = 0;
   char *fnames[MAX_FNAMES];
   const char *filename;
-  stream_t *streamptr = NULL;
 
   cdiInitialize();
 
@@ -973,7 +963,7 @@ int streamOpenRead(const char *filenames)
 
   if ( streamID >= 0 )
     {
-      streamptr = stream_to_pointer(streamID);
+      stream_t *streamptr = stream_to_pointer(streamID);
       streamptr->byteorder = byteorder;
 
       if ( num_fnames > 0 )
@@ -992,21 +982,19 @@ int streamOpenRead(const char *filenames)
 
 int streamOpenAppend(const char *filename)
 {
-  int filetype, byteorder;
-  int streamID;
-  stream_t *streamptr;
+  int byteorder;
 
   cdiInitialize();
 
-  filetype = getFiletype(filename, &byteorder);
+  int filetype = getFiletype(filename, &byteorder);
 
   if ( filetype < 0 ) return (filetype);
 
-  streamID = streamOpenA(filename, "a", filetype);
+  int streamID = streamOpenA(filename, "a", filetype);
 
   if ( streamID >= 0 )
     {
-      streamptr = stream_to_pointer(streamID);
+      stream_t *streamptr = stream_to_pointer(streamID);
       streamptr->byteorder = byteorder;
     }
 
@@ -1086,7 +1074,7 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted)
         {
           fileClose(fileID);
           if (recordBufIsToBeDeleted)
-            srvDelete(streamptr->record->srvp);
+            srvDelete(streamptr->record->exsep);
           break;
         }
 #endif
@@ -1095,7 +1083,7 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted)
         {
           fileClose(fileID);
           if (recordBufIsToBeDeleted)
-            extDelete(streamptr->record->extp);
+            extDelete(streamptr->record->exsep);
           break;
         }
 #endif
@@ -1104,7 +1092,7 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted)
         {
           fileClose(fileID);
           if (recordBufIsToBeDeleted)
-            iegDelete(streamptr->record->iegp);
+            iegDelete(streamptr->record->exsep);
           break;
         }
 #endif
@@ -1144,9 +1132,7 @@ void streamClose(int streamID)
 {
   int index;
   int vlistID;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -1268,9 +1254,7 @@ The function @func{streamSync} offers a way to synchronize the disk copy of a da
 */
 void streamSync(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -1282,21 +1266,16 @@ void streamSync(int streamID)
 
 int cdiStreamDefTimestep_(stream_t *streamptr, int tsID)
 {
-  int newtsID;
   int taxisID;
-  int vlistID;
-  int time_is_varying;
-  taxis_t *taxisptr1;
-  taxis_t *taxisptr2;
 
   if ( CDI_Debug )
     Message("streamID = %d  tsID = %d", streamptr->self, tsID);
 
   stream_check_ptr(__func__, streamptr);
 
-  vlistID = streamptr->vlistID;
+  int vlistID = streamptr->vlistID;
 
-  time_is_varying = vlistHasTime(vlistID);
+  int time_is_varying = vlistHasTime(vlistID);
 
   if ( time_is_varying )
     {
@@ -1309,7 +1288,7 @@ int cdiStreamDefTimestep_(stream_t *streamptr, int tsID)
         }
     }
 
-  newtsID = tstepsNewEntry(streamptr);
+  int newtsID = tstepsNewEntry(streamptr);
 
   if ( tsID != newtsID )
     Error("Internal problem: tsID = %d newtsID = %d", tsID, newtsID);
@@ -1318,8 +1297,8 @@ int cdiStreamDefTimestep_(stream_t *streamptr, int tsID)
 
   if ( time_is_varying )
     {
-      taxisptr1 = taxisPtr(taxisID);
-      taxisptr2 = &streamptr->tsteps[tsID].taxis;
+      taxis_t *taxisptr1 = taxisPtr(taxisID);
+      taxis_t *taxisptr2 = &streamptr->tsteps[tsID].taxis;
       ptaxisCopy(taxisptr2, taxisptr1);
       if ( tsID == 0 )
         {
@@ -1401,17 +1380,13 @@ The function @func{streamInqTimestep} returns the time step of a stream.
 */
 int streamInqTimestep(int streamID, int tsID)
 {
-  int filetype;
   int nrecs = 0;
   int taxisID;
-  int vlistID;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  vlistID = streamptr->vlistID;
+  int vlistID = streamptr->vlistID;
 
   if ( tsID < streamptr->rtsteps )
     {
@@ -1431,7 +1406,7 @@ int streamInqTimestep(int streamID, int tsID)
       return (0);
     }
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   if ( CDI_Debug )
     Message("streamID = %d  tsID = %d  filetype = %d", streamID, tsID, filetype);
@@ -1512,19 +1487,16 @@ from an open dataset.
 */
 void streamReadVar(int streamID, int varID, double *data, int *nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d  varID = %d", streamID, varID);
 
   check_parg(data);
   check_parg(nmiss);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   *nmiss = 0;
 
@@ -1608,21 +1580,18 @@ void
 cdiStreamWriteVar_(int streamID, int varID, int memtype, const void *data,
                    int nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d varID = %d", streamID, varID);
 
   check_parg(data);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
   // check taxis
   if ( streamptr->curTsID == CDI_UNDEFID ) streamDefTimestep(streamID, 0);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   switch (filetype)
     {
@@ -1723,19 +1692,16 @@ from an open dataset.
 */
 void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int *nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d  varID = %d", streamID, varID);
 
   check_parg(data);
   check_parg(nmiss);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   *nmiss = 0;
 
@@ -1792,21 +1758,18 @@ void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int
 static
 void stream_write_var_slice(int streamID, int varID, int levelID, int memtype, const void *data, int nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d varID = %d", streamID, varID);
 
   check_parg(data);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
   // check taxis
   if ( streamptr->curTsID == CDI_UNDEFID ) streamDefTimestep(streamID, 0);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   switch (filetype)
     {
@@ -1925,18 +1888,15 @@ void
 cdiStreamwriteVarChunk_(int streamID, int varID, int memtype,
                         const int rect[][2], const void *data, int nmiss)
 {
-  int filetype;
-  stream_t *streamptr;
-
   if ( CDI_Debug ) Message("streamID = %d varID = %d", streamID, varID);
 
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
   // streamDefineTaxis(streamID);
 
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
 
   switch (filetype)
     {
@@ -1976,27 +1936,13 @@ cdiStreamwriteVarChunk_(int streamID, int varID, int memtype,
 
 void streamWriteContents(int streamID, char *cname)
 {
-  FILE *cnp;
-  int tsID, recID, varID, levelID;
-  long recsize;
-  int nrecs, nvars;
-  int code, gridID, zaxisID, tsteptype, datatype;
-  int ngrids;
-  int filetype, gridtype;
-  int xsize, ysize;
-  int date, time;
-  int i;
-  off_t recpos, position;
-  int vlistID;
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
-  vlistID = streamptr->vlistID;
+  int vlistID = streamptr->vlistID;
 
-  cnp = fopen(cname, "w");
+  FILE *cnp = fopen(cname, "w");
 
   if ( cnp == NULL ) SysError(cname);
 
@@ -2004,19 +1950,19 @@ void streamWriteContents(int streamID, char *cname)
   fprintf(cnp, "#\n");
 
   fprintf(cnp, "filename: %s\n", streamptr->filename);
-  filetype = streamptr->filetype;
+  int filetype = streamptr->filetype;
   fprintf(cnp, "filetype: %s\n", strfiletype(filetype));
 
   fprintf(cnp, "#\n");
   fprintf(cnp, "#grids:\n");
 
-  ngrids = vlistNgrids(vlistID);
-  for ( i = 0; i < ngrids; i++ )
+  int ngrids = vlistNgrids(vlistID);
+  for ( int i = 0; i < ngrids; i++ )
     {
-      gridID   = vlistGrid(vlistID, i);
-      gridtype = gridInqType(gridID);
-      xsize    = gridInqXsize(gridID);
-      ysize    = gridInqYsize(gridID);
+      int gridID   = vlistGrid(vlistID, i);
+      int gridtype = gridInqType(gridID);
+      int xsize    = gridInqXsize(gridID);
+      int ysize    = gridInqYsize(gridID);
       fprintf(cnp, "%4d:%4d:%4d:%4d\n", i+1, gridtype, xsize, ysize);
     }
 
@@ -2024,14 +1970,14 @@ void streamWriteContents(int streamID, char *cname)
 
   fprintf(cnp, "varID:code:gridID:zaxisID:tsteptype:datatype\n");
 
-  nvars = vlistNvars(vlistID);
-  for ( varID = 0; varID < nvars; varID++ )
+  int nvars = vlistNvars(vlistID);
+  for ( int varID = 0; varID < nvars; varID++ )
     {
-      code      = vlistInqVarCode(vlistID, varID);
-      gridID    = vlistInqVarGrid(vlistID, varID);
-      zaxisID   = vlistInqVarZaxis(vlistID, varID);
-      tsteptype = vlistInqVarTsteptype(vlistID, varID);
-      datatype  = vlistInqVarDatatype(vlistID, varID);
+      int code      = vlistInqVarCode(vlistID, varID);
+      int gridID    = vlistInqVarGrid(vlistID, varID);
+      int zaxisID   = vlistInqVarZaxis(vlistID, varID);
+      int tsteptype = vlistInqVarTsteptype(vlistID, varID);
+      int datatype  = vlistInqVarDatatype(vlistID, varID);
       fprintf(cnp, "%4d:%4d:%4d:%4d:%4d:%4d:\n",
 	      varID+1, code, gridID, zaxisID, tsteptype, datatype);
     }
@@ -2040,13 +1986,13 @@ void streamWriteContents(int streamID, char *cname)
 
   fprintf(cnp, "tsID:nrecs:date:time\n");
 
-  tsID = 0;
+  int tsID = 0;
   while (1)
     {
-      nrecs = streamptr->tsteps[tsID].nallrecs;
-      date  = streamptr->tsteps[tsID].taxis.vdate;
-      time  = streamptr->tsteps[tsID].taxis.vtime;
-      position = streamptr->tsteps[tsID].position;
+      int nrecs      = streamptr->tsteps[tsID].nallrecs;
+      int date       = streamptr->tsteps[tsID].taxis.vdate;
+      int time       = streamptr->tsteps[tsID].taxis.vtime;
+      off_t position = streamptr->tsteps[tsID].position;
 
       fprintf(cnp, "%4d:%4d:%4d:%4d:%ld\n",
 	      tsID, nrecs, date, time, (long) position);
@@ -2064,13 +2010,13 @@ void streamWriteContents(int streamID, char *cname)
   tsID = 0;
   while (1)
     {
-      nrecs = streamptr->tsteps[tsID].nallrecs;
-      for ( recID = 0; recID < nrecs; recID++ )
+      int nrecs = streamptr->tsteps[tsID].nallrecs;
+      for ( int recID = 0; recID < nrecs; recID++ )
 	{
-	  varID   = streamptr->tsteps[tsID].records[recID].varID;
-	  levelID = streamptr->tsteps[tsID].records[recID].levelID;
-	  recpos  = streamptr->tsteps[tsID].records[recID].position;
-	  recsize = (long)streamptr->tsteps[tsID].records[recID].size;
+	  int varID   = streamptr->tsteps[tsID].records[recID].varID;
+	  int levelID = streamptr->tsteps[tsID].records[recID].levelID;
+	  off_t recpos = streamptr->tsteps[tsID].records[recID].position;
+	  long recsize = (long)streamptr->tsteps[tsID].records[recID].size;
 	  fprintf(cnp, "%4d:%4d:%4d:%4d:%4ld:%ld\n",
 		  tsID, recID, varID, levelID, recsize, (long) recpos);
 	}
@@ -2087,15 +2033,9 @@ void streamWriteContents(int streamID, char *cname)
 
 void cdiDefTableID(int tableID)
 {
-  int modelID, instID;
-
   cdiDefaultTableID = tableID;
-
-  modelID = tableInqModel(tableID);
-  cdiDefaultModelID = modelID;
-
-  instID = modelInqInstitut(modelID);
-  cdiDefaultInstID = instID;
+  int modelID = cdiDefaultModelID = tableInqModel(tableID);
+  cdiDefaultInstID = modelInqInstitut(modelID);
 }
 
 
@@ -2129,9 +2069,7 @@ void cdiPrintVersion(void)
 
 int streamNtsteps(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -2141,9 +2079,7 @@ int streamNtsteps(int streamID)
 
 off_t   streamNvals(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -2203,9 +2139,7 @@ The function @func{streamInqVlist} returns the variable list of a stream.
 */
 int streamInqVlist(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -2215,9 +2149,7 @@ int streamInqVlist(int streamID)
 
 int streamInqVlistIDorig(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -2229,7 +2161,7 @@ void streamDefCompType(int streamID, int comptype)
 {
   stream_t *streamptr;
 
-  if ( reshGetStatus ( streamID, &streamOps ) == CLOSED )
+  if ( reshGetStatus ( streamID, &streamOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2247,7 +2179,7 @@ void streamDefCompLevel(int streamID, int complevel)
 {
   stream_t *streamptr;
 
-  if ( reshGetStatus ( streamID, &streamOps ) == CLOSED )
+  if ( reshGetStatus ( streamID, &streamOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2263,9 +2195,7 @@ void streamDefCompLevel(int streamID, int complevel)
 
 int streamInqCompType(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
@@ -2275,9 +2205,7 @@ int streamInqCompType(int streamID)
 
 int streamInqCompLevel(int streamID)
 {
-  stream_t *streamptr;
-
-  streamptr = stream_to_pointer(streamID);
+  stream_t *streamptr = stream_to_pointer(streamID);
 
   stream_check_ptr(__func__, streamptr);
 
diff --git a/libcdi/src/stream_cdf.c b/libcdi/src/stream_cdf.c
index 43d23c4..58bc0bb 100644
--- a/libcdi/src/stream_cdf.c
+++ b/libcdi/src/stream_cdf.c
@@ -52,6 +52,9 @@ typedef struct {
 }
 ncdim_t;
 
+#define  MAX_COORDVARS  4
+#define  MAX_AUXVARS    4
+
 typedef struct {
   int      ncid;
   int      ignore;
@@ -79,7 +82,9 @@ typedef struct {
   int      zvarid;
   int      tvarid;
   int      ncoordvars;
-  int      coordvarids[4];
+  int      coordvarids[MAX_COORDVARS];
+  int      nauxvars;
+  int      auxvarids[MAX_AUXVARS];
   int      cellarea;
   int      calendar;
   int      tableID;
@@ -132,7 +137,7 @@ void strtolower(char *str)
 }
 
 static
-int get_timeunit(int len, char *ptu)
+int get_timeunit(int len, const char *ptu)
 {
   int timeunit = -1;
 
@@ -157,6 +162,20 @@ int get_timeunit(int len, char *ptu)
 static
 int isTimeUnits(const char *timeunits)
 {
+  int status = 0;
+
+  if ( strncmp(timeunits, "sec",    3) == 0 ||
+       strncmp(timeunits, "minute", 6) == 0 ||
+       strncmp(timeunits, "hour",   4) == 0 ||
+       strncmp(timeunits, "day",    3) == 0 ||
+       strncmp(timeunits, "month",  5) == 0 ) status = 1;
+
+  return (status);
+}
+
+static
+int isTimeAxisUnits(const char *timeunits)
+{
   int len, i;
   char *ptu, *tu;
   int timetype = -1;
@@ -194,12 +213,90 @@ int isTimeUnits(const char *timeunits)
 }
 
 static
-int splitBasetime(const char *timeunits, taxis_t *taxis)
+void scanTimeString(const char *ptu, int *rdate, int *rtime)
 {
-  int len, i;
-  char *ptu, *tu;
   int year, month, day;
   int hour = 0, minute = 0, second = 0;
+  int v1, v2, v3;
+
+  *rdate = 0;
+  *rtime = 0;
+
+  v1 = atoi(ptu);
+  if ( v1 < 0 ) ptu++;
+  while ( isdigit((int) *ptu) ) ptu++;
+  v2 = atoi(++ptu);
+  while ( isdigit((int) *ptu) ) ptu++;
+  v3 = atoi(++ptu);
+  while ( isdigit((int) *ptu) ) ptu++;
+
+  if ( v3 > 999 && v1 < 32 )
+    { year = v3; month = v2; day = v1; }
+  else
+    { year = v1; month = v2; day = v3; }
+
+  while ( isspace((int) *ptu) ) ptu++;
+
+  if ( *ptu )
+    {
+      while ( ! isdigit((int) *ptu) ) ptu++;
+
+      hour = atoi(ptu);
+      while ( isdigit((int) *ptu) ) ptu++;
+      if ( *ptu == ':' )
+        {
+          ptu++;
+          minute = atoi(ptu);
+          while ( isdigit((int) *ptu) ) ptu++;
+          if ( *ptu == ':' )
+            {
+              ptu++;
+              second = atoi(ptu);
+            }
+        }
+    }
+
+  *rdate = cdiEncodeDate(year, month, day);
+  *rtime = cdiEncodeTime(hour, minute, second);
+}
+
+static
+int scanTimeUnit(const char *unitstr)
+{
+  int timeunit = -1;
+  int len;
+
+  len = (int) strlen(unitstr);
+  timeunit = get_timeunit(len, unitstr);
+  if ( timeunit == -1 )
+    Message("Unsupported TIMEUNIT: %s!", unitstr);
+
+  return (timeunit);
+}
+
+static
+void setForecastTime(const char *timestr, taxis_t *taxis)
+{
+  int len;
+
+  (*taxis).fdate = 0;
+  (*taxis).ftime = 0;
+
+  len = (int) strlen(timestr);
+  if ( len == 0 ) return;
+
+  int fdate = 0, ftime = 0;
+  scanTimeString(timestr, &fdate, &ftime);
+
+  (*taxis).fdate = fdate;
+  (*taxis).ftime = ftime;
+}
+
+static
+int setBaseTime(const char *timeunits, taxis_t *taxis)
+{
+  int len, i;
+  char *ptu, *tu;
   int timetype = TAXIS_ABSOLUTE;
   int rdate = -1, rtime = -1;
   int timeunit;
@@ -248,47 +345,8 @@ int splitBasetime(const char *timeunits, taxis_t *taxis)
             }
           else if ( timetype == TAXIS_RELATIVE )
             {
-              int v1, v2, v3;
-              v1 = atoi(ptu);
-              if ( v1 < 0 ) ptu++;
-              while ( isdigit((int) *ptu) ) ptu++;
-              v2 = atoi(++ptu);
-              while ( isdigit((int) *ptu) ) ptu++;
-              v3 = atoi(++ptu);
-              while ( isdigit((int) *ptu) ) ptu++;
-
-              if ( v3 > 999 && v1 < 32 )
-                { year = v3; month = v2; day = v1; }
-              else
-                { year = v1; month = v2; day = v3; }
-
-              while ( isspace((int) *ptu) ) ptu++;
-
-              if ( *ptu )
-                {
-                  while ( ! isdigit((int) *ptu) ) ptu++;
-
-                  hour = atoi(ptu);
-                  while ( isdigit((int) *ptu) ) ptu++;
-                  if ( *ptu == ':' )
-                    {
-                      ptu++;
-                      minute = atoi(ptu);
-                      while ( isdigit((int) *ptu) ) ptu++;
-                      if ( *ptu == ':' )
-                        {
-                          ptu++;
-                          second = atoi(ptu);
-                          /*
-                          if ( second != 0 )
-                            Message("Seconds not supported in time units!");
-                          */
-                        }
-                    }
-                }
+              scanTimeString(ptu, &rdate, &rtime);
 
-              rdate = cdiEncodeDate(year, month, day);
-              rtime = cdiEncodeTime(hour, minute, second);
               (*taxis).rdate = rdate;
               (*taxis).rtime = rtime;
 
@@ -571,6 +629,8 @@ int cdfDefRecord(stream_t *streamptr)
 {
   int ierr = 0;
 
+  if ( streamptr->fileID < 0 ) ierr = 1;
+
   return (ierr);
 }
 
@@ -749,10 +809,10 @@ int cdfReadRecord(stream_t *streamptr, double *data, int *nmiss)
   return (ierr);
 }
 
+#if  defined  (HAVE_LIBNETCDF)
 static
 void cdfDefTimeValue(stream_t *streamptr, int tsID)
 {
-#if  defined  (HAVE_LIBNETCDF)
   int fileID;
   double timevalue;
   int ncvarid;
@@ -794,95 +854,70 @@ void cdfDefTimeValue(stream_t *streamptr, int tsID)
       start[0] = tsID; count[0] = 1; start[1] = 1; count[1] = 1;
       cdf_put_vara_double(fileID, ncvarid, start, count, &timevalue);
     }
+
+  ncvarid = streamptr->basetime.leadtimeid;
+  if ( taxis->type == TAXIS_FORECAST && ncvarid != UNDEFID )
+    {
+      timevalue = taxis->fc_period;
+      cdf_put_var1_double(fileID, ncvarid, &index, &timevalue);
+    }
+
   /*
 printf("fileID = %d %d %d %f\n", fileID, time_varid, index, timevalue);
   */
-#endif
 }
 
 static
-void cdfDefTime(stream_t *streamptr)
+int cdfDefTimeBounds(int fileID, int nctimevarid, int nctimedimid, char* taxis_name, taxis_t* taxis)
 {
-#if  defined  (HAVE_LIBNETCDF)
-  int fileID;
-  int time_varid;
-  int time_bndsid;
+  int time_bndsid = -1;
   int dims[2];
-  int year, month, day, hour, minute, second;
-  char unitstr[80];
-  char calstr[80];
   char tmpstr[CDI_MAX_NAME];
-  char default_name[] = "time";
-  char *taxis_name = default_name;
-  size_t len;
-  taxis_t *taxis;
-
-  if ( streamptr->basetime.ncvarid != UNDEFID ) return;
-
-  fileID = streamptr->fileID;
-
-  if ( streamptr->ncmode == 0 ) streamptr->ncmode = 1;
-
-  if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
-
-  taxis = &streamptr->tsteps[0].taxis;
-
-  if ( taxis->name && taxis->name[0] ) taxis_name = taxis->name;
-
-  cdf_def_dim(fileID, taxis_name, NC_UNLIMITED, &streamptr->basetime.ncdimid);
 
-  dims[0] = streamptr->basetime.ncdimid;
-  cdf_def_var(fileID, taxis_name, NC_DOUBLE, 1, dims, &time_varid);
+  dims[0] = nctimedimid;
 
-  streamptr->basetime.ncvarid = time_varid;
-
-  strcpy(tmpstr, "time");
-  cdf_put_att_text(fileID, time_varid, "standard_name", strlen(tmpstr), tmpstr);
+  /* fprintf(stderr, "time has bounds\n"); */
 
-  if ( taxis->longname && taxis->longname[0] )
-    cdf_put_att_text(fileID, time_varid, "long_name", strlen(taxis->longname), taxis->longname);
+  if ( nc_inq_dimid(fileID, "nb2", &dims[1]) != NC_NOERR )
+    cdf_def_dim(fileID, "nb2", 2, &dims[1]);
 
-  if ( taxis->has_bounds )
+  if ( taxis->climatology )
     {
-      /* fprintf(stderr, "time has bounds\n"); */
-
-      if ( nc_inq_dimid(fileID, "nb2", &dims[1]) != NC_NOERR )
-	cdf_def_dim(fileID, "nb2", 2, &dims[1]);
+      strcpy(tmpstr, "climatology");
+      strcat(tmpstr, "_bnds");
+      cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
 
-      if ( taxis->climatology )
-        {
-          strcpy(tmpstr, "climatology");
-          strcat(tmpstr, "_bnds");
-          cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
-
-          streamptr->basetime.ncvarboundsid = time_bndsid;
-
-          cdf_put_att_text(fileID, time_varid, "climatology", strlen(tmpstr), tmpstr);
-        }
-      else
-        {
-          strcpy(tmpstr, taxis_name);
-          strcat(tmpstr, "_bnds");
-          cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
-
-          streamptr->basetime.ncvarboundsid = time_bndsid;
+      cdf_put_att_text(fileID, nctimevarid, "climatology", strlen(tmpstr), tmpstr);
+    }
+  else
+    {
+      strcpy(tmpstr, taxis_name);
+      strcat(tmpstr, "_bnds");
+      cdf_def_var(fileID, tmpstr, NC_DOUBLE, 2, dims, &time_bndsid);
 
-          cdf_put_att_text(fileID, time_varid, "bounds", strlen(tmpstr), tmpstr);
-        }
+      cdf_put_att_text(fileID, nctimevarid, "bounds", strlen(tmpstr), tmpstr);
     }
 
+  return (time_bndsid);
+}
+
+static
+void cdfDefTimeUnits(char *unitstr, taxis_t* taxis0, taxis_t* taxis)
+{
   unitstr[0] = 0;
-  if ( streamptr->tsteps[0].taxis.type == TAXIS_ABSOLUTE )
+
+  if ( taxis0->type == TAXIS_ABSOLUTE )
     {
-      if ( streamptr->tsteps[0].taxis.unit == TUNIT_YEAR )
+      if ( taxis0->unit == TUNIT_YEAR )
         sprintf(unitstr, "year as %s", "%Y.%f");
-      else if ( streamptr->tsteps[0].taxis.unit == TUNIT_MONTH )
+      else if ( taxis0->unit == TUNIT_MONTH )
         sprintf(unitstr, "month as %s", "%Y%m.%f");
       else
         sprintf(unitstr, "day as %s", "%Y%m%d.%f");
     }
   else
     {
+      int year, month, day, hour, minute, second;
       int rdate, rtime;
       int timeunit;
 
@@ -907,35 +942,131 @@ void cdfDefTime(stream_t *streamptr)
       sprintf(unitstr, "%s since %d-%02d-%02d %02d:%02d:%02d",
               tunitNamePtr(timeunit), year, month, day, hour, minute, second);
     }
+}
+
+static
+void cdfDefForecastTimeUnits(char *unitstr, int timeunit)
+{
+  unitstr[0] = 0;
+
+  if ( timeunit == -1 ) timeunit = TUNIT_HOUR;
+
+  if ( timeunit == TUNIT_QUARTER ) timeunit = TUNIT_MINUTE;
+  if ( timeunit == TUNIT_3HOURS  ||
+       timeunit == TUNIT_6HOURS  ||
+       timeunit == TUNIT_12HOURS ) timeunit = TUNIT_HOUR;
+
+  sprintf(unitstr, "%s", tunitNamePtr(timeunit));
+}
+#endif
+
+static
+void cdfDefCalendar(int fileID, int ncvarid, int calendar)
+{
+  size_t len;
+  char calstr[80];
+
+  calstr[0] = 0;
+
+  if      ( calendar == CALENDAR_STANDARD )  strcpy(calstr, "standard");
+  else if ( calendar == CALENDAR_PROLEPTIC ) strcpy(calstr, "proleptic_gregorian");
+  else if ( calendar == CALENDAR_NONE )      strcpy(calstr, "none");
+  else if ( calendar == CALENDAR_360DAYS )   strcpy(calstr, "360_day");
+  else if ( calendar == CALENDAR_365DAYS )   strcpy(calstr, "365_day");
+  else if ( calendar == CALENDAR_366DAYS )   strcpy(calstr, "366_day");
+
+  len = strlen(calstr);
+
+#if  defined  (HAVE_LIBNETCDF)
+  if ( len ) cdf_put_att_text(fileID, ncvarid, "calendar", len, calstr);
+#endif
+}
+
+static
+void cdfDefTime(stream_t* streamptr)
+{
+#if  defined  (HAVE_LIBNETCDF)
+  int fileID;
+  int time_varid;
+  int time_dimid;
+  int time_bndsid = -1;
+  char unitstr[CDI_MAX_NAME];
+  char tmpstr[CDI_MAX_NAME];
+  char default_name[] = "time";
+  char* taxis_name = default_name;
+  size_t len;
+  taxis_t* taxis;
+
+  if ( streamptr->basetime.ncvarid != UNDEFID ) return;
+
+  fileID = streamptr->fileID;
+
+  if ( streamptr->ncmode == 0 ) streamptr->ncmode = 1;
+
+  if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
+
+  taxis = &streamptr->tsteps[0].taxis;
+
+  if ( taxis->name && taxis->name[0] ) taxis_name = taxis->name;
+
+  cdf_def_dim(fileID, taxis_name, NC_UNLIMITED, &time_dimid);
+  streamptr->basetime.ncdimid = time_dimid;
+
+  cdf_def_var(fileID, taxis_name, NC_DOUBLE, 1, &time_dimid, &time_varid);
+
+  streamptr->basetime.ncvarid = time_varid;
+
+  strcpy(tmpstr, "time");
+  cdf_put_att_text(fileID, time_varid, "standard_name", strlen(tmpstr), tmpstr);
+
+  if ( taxis->longname && taxis->longname[0] )
+    cdf_put_att_text(fileID, time_varid, "long_name", strlen(taxis->longname), taxis->longname);
+
+  if ( taxis->has_bounds )
+    {
+      time_bndsid = cdfDefTimeBounds(fileID, time_varid, time_dimid, taxis_name, taxis);
+      streamptr->basetime.ncvarboundsid = time_bndsid;
+    }
+
+  cdfDefTimeUnits(unitstr, &streamptr->tsteps[0].taxis, taxis);
 
   len = strlen(unitstr);
   if ( len )
     {
       cdf_put_att_text(fileID, time_varid, "units", len, unitstr);
-
+      /*
       if ( taxis->has_bounds )
         cdf_put_att_text(fileID, time_bndsid, "units", len, unitstr);
+      */
     }
 
   if ( taxis->calendar != -1 )
     {
-      calstr[0] = 0;
+      cdfDefCalendar(fileID, time_varid, taxis->calendar);
+      /*
+      if ( taxis->has_bounds )
+        cdfDefCalendar(fileID, time_bndsid, taxis->calendar);
+      */
+    }
+
+  if ( taxis->type == TAXIS_FORECAST )
+    {
+      int leadtimeid;
 
-      if      ( taxis->calendar == CALENDAR_STANDARD )  strcpy(calstr, "standard");
-      else if ( taxis->calendar == CALENDAR_PROLEPTIC ) strcpy(calstr, "proleptic_gregorian");
-      else if ( taxis->calendar == CALENDAR_NONE )      strcpy(calstr, "none");
-      else if ( taxis->calendar == CALENDAR_360DAYS )   strcpy(calstr, "360_day");
-      else if ( taxis->calendar == CALENDAR_365DAYS )   strcpy(calstr, "365_day");
-      else if ( taxis->calendar == CALENDAR_366DAYS )   strcpy(calstr, "366_day");
+      cdf_def_var(fileID, "leadtime", NC_DOUBLE, 1, &time_dimid, &leadtimeid);
 
-      len = strlen(calstr);
-      if ( len )
-        {
-          cdf_put_att_text(fileID, time_varid, "calendar", len, calstr);
+      streamptr->basetime.leadtimeid = leadtimeid;
 
-          if ( taxis->has_bounds )
-            cdf_put_att_text(fileID, time_bndsid, "calendar", len, calstr);
-        }
+      strcpy(tmpstr, "forecast_period");
+      cdf_put_att_text(fileID, leadtimeid, "standard_name", strlen(tmpstr), tmpstr);
+
+      strcpy(tmpstr, "Time elapsed since the start of the forecast");
+      cdf_put_att_text(fileID, leadtimeid, "long_name", strlen(tmpstr), tmpstr);
+
+      cdfDefForecastTimeUnits(unitstr, taxis->fc_unit);
+
+      len = strlen(unitstr);
+      if ( len ) cdf_put_att_text(fileID, leadtimeid, "units", len, unitstr);
     }
 
   if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
@@ -945,6 +1076,7 @@ void cdfDefTime(stream_t *streamptr)
 
 void cdfDefTimestep(stream_t *streamptr, int tsID)
 {
+#if  defined  (HAVE_LIBNETCDF)
   int vlistID;
 
   vlistID = streamptr->vlistID;
@@ -952,6 +1084,7 @@ void cdfDefTimestep(stream_t *streamptr, int tsID)
   if ( vlistHasTime(vlistID) ) cdfDefTime(streamptr);
 
   cdfDefTimeValue(streamptr, tsID);
+#endif
 }
 
 #if  defined  (HAVE_LIBNETCDF)
@@ -1302,7 +1435,7 @@ int checkGridName(int type, char *axisname, int fileID, int vlistID, int gridID,
 
 #if  defined  (HAVE_LIBNETCDF)
 static
-void cdfDefXaxis(stream_t *streamptr, int gridID)
+void cdfDefXaxis(stream_t *streamptr, int gridID, int ndims)
 {
   char units[CDI_MAX_NAME];
   char longname[CDI_MAX_NAME];
@@ -1313,7 +1446,7 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
   int gridID0, gridtype0, gridindex;
   int dimID = UNDEFID;
   int dimIDs[2];
-  int ngrids;
+  int ngrids = 0;
   int fileID;
   int dimlen, dimlen0;
   size_t len;
@@ -1327,7 +1460,7 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
 
-  ngrids = vlistNgrids(vlistID);
+  if ( ndims ) ngrids = vlistNgrids(vlistID);
 
   dimlen = gridInqXsize(gridID);
   gridindex = vlistGridIndex(vlistID, gridID);
@@ -1372,22 +1505,25 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
     {
       int status;
       status = checkGridName('V', axisname, fileID, vlistID, gridID, ngrids, 'X');
-      if ( status == 0 )
+      if ( status == 0 && ndims )
         status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
-      cdf_def_dim(fileID, axisname, dimlen, &dimID);
-
-      if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+      if ( ndims )
         {
-          if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
-            cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+          cdf_def_dim(fileID, axisname, dimlen, &dimID);
+
+          if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+            {
+              if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
+                cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+            }
         }
 
       if ( gridInqXvalsPtr(gridID) )
         {
-          cdf_def_var(fileID, axisname, (nc_type) xtype, 1, &dimID, &ncvarid);
+          cdf_def_var(fileID, axisname, (nc_type) xtype, ndims, &dimID, &ncvarid);
 
           if ( (len = strlen(stdname)) )
             cdf_put_att_text(fileID, ncvarid, "standard_name", len, stdname);
@@ -1420,6 +1556,8 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
 
       if ( ncvarid  != UNDEFID ) cdf_put_var_double(fileID, ncvarid, gridInqXvalsPtr(gridID));
       if ( ncbvarid != UNDEFID ) cdf_put_var_double(fileID, ncbvarid, gridInqXboundsPtr(gridID));
+
+      if ( ndims == 0 ) streamptr->ncxvarID[gridindex] = ncvarid;
     }
 
   streamptr->xdimID[gridindex] = dimID;
@@ -1428,7 +1566,7 @@ void cdfDefXaxis(stream_t *streamptr, int gridID)
 
 #if  defined  (HAVE_LIBNETCDF)
 static
-void cdfDefYaxis(stream_t *streamptr, int gridID)
+void cdfDefYaxis(stream_t *streamptr, int gridID, int ndims)
 {
   char units[CDI_MAX_NAME];
   char longname[CDI_MAX_NAME];
@@ -1439,7 +1577,7 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
   int gridID0, gridtype0, gridindex;
   int dimID = UNDEFID;
   int dimIDs[2];
-  int ngrids;
+  int ngrids = 0;
   int fileID;
   int dimlen, dimlen0;
   size_t len;
@@ -1453,7 +1591,7 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
 
-  ngrids = vlistNgrids(vlistID);
+  if ( ndims ) ngrids = vlistNgrids(vlistID);
 
   dimlen = gridInqYsize(gridID);
   gridindex = vlistGridIndex(vlistID, gridID);
@@ -1498,22 +1636,25 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
     {
       int status;
       status = checkGridName('V', axisname, fileID, vlistID, gridID, ngrids, 'Y');
-      if ( status == 0 )
+      if ( status == 0 && ndims )
         status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'Y');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
-      cdf_def_dim(fileID, axisname, dimlen, &dimID);
-
-      if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+      if ( ndims )
         {
-          if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
-            cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+          cdf_def_dim(fileID, axisname, dimlen, &dimID);
+
+          if ( gridInqXboundsPtr(gridID) || gridInqYboundsPtr(gridID) )
+            {
+              if ( nc_inq_dimid(fileID, "nb2", &nvdimID) != NC_NOERR )
+                cdf_def_dim(fileID, "nb2", nvertex, &nvdimID);
+            }
         }
 
       if ( gridInqYvalsPtr(gridID) )
         {
-          cdf_def_var(fileID, axisname, (nc_type) xtype, 1, &dimID, &ncvarid);
+          cdf_def_var(fileID, axisname, (nc_type) xtype, ndims, &dimID, &ncvarid);
 
           if ( (len = strlen(stdname)) )
             cdf_put_att_text(fileID, ncvarid, "standard_name", len, stdname);
@@ -1546,6 +1687,8 @@ void cdfDefYaxis(stream_t *streamptr, int gridID)
 
       if ( ncvarid  != UNDEFID ) cdf_put_var_double(fileID, ncvarid, gridInqYvalsPtr(gridID));
       if ( ncbvarid != UNDEFID ) cdf_put_var_double(fileID, ncbvarid, gridInqYboundsPtr(gridID));
+
+      if ( ndims == 0 ) streamptr->ncyvarID[gridindex] = ncvarid;
     }
 
   streamptr->ydimID[gridindex] = dimID;
@@ -1632,6 +1775,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
                      IS_EQUAL(gridInqXval(gridID0, xdimlen-1), gridInqXval(gridID, xdimlen-1)) )
                   {
                     xdimID = streamptr->xdimID[index];
+                    ncxvarid = streamptr->ncxvarID[index];
                     break;
                   }
               dimlen0 = gridInqYsize(gridID0);
@@ -1640,6 +1784,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
                      IS_EQUAL(gridInqYval(gridID0, xdimlen-1), gridInqYval(gridID, xdimlen-1)) )
                   {
                     ydimID = streamptr->ydimID[index];
+                    ncyvarid = streamptr->ncyvarID[index];
                     break;
                   }
             }
@@ -1648,11 +1793,10 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
 
   if ( xdimID == UNDEFID || ydimID == UNDEFID )
     {
-      int status;
-      status = checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
-      status = checkGridName('D', xdimname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('D', ydimname, fileID, vlistID, gridID, ngrids, 'Y');
+      checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
+      checkGridName('D', xdimname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('D', ydimname, fileID, vlistID, gridID, ngrids, 'Y');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
@@ -1683,8 +1827,6 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
           /* attribute for Panoply */
           cdf_put_att_text(fileID, ncxvarid, "_CoordinateAxisType", 3, "Lon");
 
-          streamptr->ncxvarID[gridindex] = ncxvarid;
-
           if ( gridInqXboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               strcat(xaxisname, "_bnds");
@@ -1713,8 +1855,6 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
           /* attribute for Panoply */
           cdf_put_att_text(fileID, ncyvarid, "_CoordinateAxisType", 3, "Lat");
 
-          streamptr->ncyvarID[gridindex] = ncyvarid;
-
           if ( gridInqYboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               strcat(yaxisname, "_bnds");
@@ -1740,8 +1880,6 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
           cdf_put_att_text(fileID, ncavarid, "standard_name", strlen(stdname), stdname);
           cdf_put_att_text(fileID, ncavarid, "long_name", strlen(longname), longname);
           cdf_put_att_text(fileID, ncavarid, "units", strlen(units), units);
-
-          streamptr->ncavarID[gridindex] = ncavarid;
         }
 
       cdf_enddef(fileID);
@@ -1756,6 +1894,9 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID)
 
   streamptr->xdimID[gridindex] = xdimID;
   streamptr->ydimID[gridindex] = ydimID;
+  streamptr->ncxvarID[gridindex] = ncxvarid;
+  streamptr->ncyvarID[gridindex] = ncyvarid;
+  streamptr->ncavarID[gridindex] = ncavarid;
 }
 #endif
 
@@ -1889,11 +2030,10 @@ void cdfDefGdim(stream_t *streamptr, int gridID)
 
   if ( dimID == UNDEFID )
     {
-      int status;
       char axisname[CDI_MAX_NAME];
       strcpy(axisname, "gsize");
 
-      status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
       /*
       if ( iz == 0 ) axisname[5] = '\0';
       else           sprintf(&axisname[5], "%1d", iz+1);
@@ -2032,6 +2172,9 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
                      IS_EQUAL(gridInqXval(gridID0, dimlen-1), gridInqXval(gridID, dimlen-1)) )
 		  {
 		    dimID = streamptr->xdimID[index];
+                    ncxvarid = streamptr->ncxvarID[index];
+                    ncyvarid = streamptr->ncyvarID[index];
+                    ncavarid = streamptr->ncavarID[index];
 		    break;
 		  }
             }
@@ -2040,16 +2183,15 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
 
   if ( dimID == UNDEFID )
     {
-      int status;
       char axisname[CDI_MAX_NAME];
       char vertname[CDI_MAX_NAME];
       strcpy(axisname, "ncells");
       strcpy(vertname, "nv");
 
-      status = checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
-      status = checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
-      status = checkGridName('D', vertname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('V', xaxisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('V', yaxisname, fileID, vlistID, gridID, ngrids, 'Y');
+      checkGridName('D', axisname, fileID, vlistID, gridID, ngrids, 'X');
+      checkGridName('D', vertname, fileID, vlistID, gridID, ngrids, 'X');
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
@@ -2074,8 +2216,6 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
           if ( (len = strlen(xunits)) )
             cdf_put_att_text(fileID, ncxvarid, "units", len, xunits);
 
-          streamptr->ncxvarID[gridindex] = ncxvarid;
-
           if ( gridInqXboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               int dimIDs[2];
@@ -2101,8 +2241,6 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
           if ( (len = strlen(yunits)) )
             cdf_put_att_text(fileID, ncyvarid, "units", len, yunits);
 
-          streamptr->ncyvarID[gridindex] = ncyvarid;
-
           if ( gridInqYboundsPtr(gridID) && nvdimID != UNDEFID )
             {
               int dimIDs[2];
@@ -2128,8 +2266,6 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
           cdf_put_att_text(fileID, ncavarid, "standard_name", strlen(stdname), stdname);
           cdf_put_att_text(fileID, ncavarid, "long_name", strlen(longname), longname);
           cdf_put_att_text(fileID, ncavarid, "units", strlen(units), units);
-
-          streamptr->ncavarID[gridindex] = ncavarid;
         }
 
       cdf_enddef(fileID);
@@ -2143,6 +2279,9 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID)
     }
 
   streamptr->xdimID[gridindex] = dimID;
+  streamptr->ncxvarID[gridindex] = ncxvarid;
+  streamptr->ncyvarID[gridindex] = ncyvarid;
+  streamptr->ncavarID[gridindex] = ncavarid;
 }
 #endif
 
@@ -2309,7 +2448,7 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
       checkname = TRUE;
       ilevel = 0;
 
-      while ( checkname ) 
+      while ( checkname )
         {
           strcpy(axisname2, axisname);
           if ( ilevel ) sprintf(&axisname2[strlen(axisname2)], "_%d", ilevel+1);
@@ -2655,13 +2794,13 @@ void cdfDefGrid(stream_t *streamptr, int gridID)
               int lx = 0, ly = 0;
               if ( gridInqXsize(gridID) > 0 /*&& gridInqXvals(gridID, NULL) > 0*/ )
                 {
-                  cdfDefXaxis(streamptr, gridID);
+                  cdfDefXaxis(streamptr, gridID, 1);
                   lx = 1;
                 }
 
               if ( gridInqYsize(gridID) > 0 /*&& gridInqYvals(gridID, NULL) > 0*/ )
                 {
-                  cdfDefYaxis(streamptr, gridID);
+                  cdfDefYaxis(streamptr, gridID, 1);
                   ly = 1;
                 }
 
@@ -2670,8 +2809,12 @@ void cdfDefGrid(stream_t *streamptr, int gridID)
         }
       else
         {
-          if ( gridInqXsize(gridID) > 0 ) cdfDefXaxis(streamptr, gridID);
-          if ( gridInqYsize(gridID) > 0 ) cdfDefYaxis(streamptr, gridID);
+          int ndims = 1;
+          if ( gridtype == GRID_LONLAT && size == 1 && gridInqHasDims(gridID) == FALSE )
+            ndims = 0;
+
+          if ( gridInqXsize(gridID) > 0 ) cdfDefXaxis(streamptr, gridID, ndims);
+          if ( gridInqYsize(gridID) > 0 ) cdfDefYaxis(streamptr, gridID, ndims);
         }
 
       if ( gridIsRotated(gridID) ) cdfDefPole(streamptr, gridID);
@@ -2705,8 +2848,8 @@ void cdfDefGrid(stream_t *streamptr, int gridID)
     }
   else if ( gridtype == GRID_SINUSOIDAL || gridtype == GRID_LAEA || gridtype == GRID_LCC2 )
     {
-      cdfDefXaxis(streamptr, gridID);
-      cdfDefYaxis(streamptr, gridID);
+      cdfDefXaxis(streamptr, gridID, 1);
+      cdfDefYaxis(streamptr, gridID, 1);
 
       cdfDefMapping(streamptr, gridID);
     }
@@ -3031,8 +3174,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
         cdf_put_att_int(fileID, ncvarid, "table", NC_INT, 1, &tablenum);
     }
 
-  if ( gridtype != GRID_GENERIC && gridtype != GRID_LONLAT  &&
-       gridtype != GRID_CURVILINEAR )
+  if ( gridtype != GRID_GENERIC && gridtype != GRID_LONLAT  && gridtype != GRID_CURVILINEAR )
     {
       len = strlen(gridNamePtr(gridtype));
       if ( len > 0 )
@@ -3064,6 +3206,28 @@ int cdfDefVar(stream_t *streamptr, int varID)
     {
       cdf_put_att_text(fileID, ncvarid, "coordinates", 9, "tlon tlat" );
     }
+  else if ( gridtype == GRID_LONLAT && xid == UNDEFID && yid == UNDEFID && gridsize == 1 )
+    {
+      char coordinates[CDI_MAX_NAME] = "";
+      int ncxvarID, ncyvarID;
+      int gridindex;
+      size_t len;
+
+      gridindex = vlistGridIndex(vlistID, gridID);
+      ncxvarID = streamptr->ncxvarID[gridindex];
+      ncyvarID = streamptr->ncyvarID[gridindex];
+      if ( ncxvarID != CDI_UNDEFID )
+        cdf_inq_varname(fileID, ncxvarID, coordinates);
+      len = strlen(coordinates);
+      if ( ncyvarID != CDI_UNDEFID )
+        {
+          if ( len ) coordinates[len++] = ' ';
+          cdf_inq_varname(fileID, ncyvarID, coordinates+len);
+        }
+      len = strlen(coordinates);
+      if ( len )
+        cdf_put_att_text(fileID, ncvarid, "coordinates", len, coordinates);
+    }
   else if ( gridtype == GRID_UNSTRUCTURED || gridtype == GRID_CURVILINEAR )
     {
       char coordinates[CDI_MAX_NAME] = "";
@@ -3227,8 +3391,8 @@ void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int ncvarid;
   int tsID;
   size_t size;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   int ndims = 0;
   int idim;
   int tsteptype;
@@ -3436,7 +3600,7 @@ int cdf_write_var_data(int fileID, int vlistID, int varID, int ncvarid, int dtyp
                   pdata_sp = mdata_sp;
                 }
 
-              for ( i = 0; i < nvals; i++ ) mdata_sp[i] = NINT(mdata_sp[i]);
+              for ( i = 0; i < nvals; i++ ) mdata_sp[i] = roundf(mdata_sp[i]);
 
               if ( dtype == DATATYPE_UINT8 )
                 {
@@ -3458,7 +3622,7 @@ int cdf_write_var_data(int fileID, int vlistID, int varID, int ncvarid, int dtyp
                   pdata_dp = mdata_dp;
                 }
 
-              for ( i = 0; i < nvals; i++ ) mdata_dp[i] = NINT(mdata_dp[i]);
+              for ( i = 0; i < nvals; i++ ) mdata_dp[i] = round(mdata_dp[i]);
 
               if ( dtype == DATATYPE_UINT8 )
                 {
@@ -3536,8 +3700,8 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
   int ntsteps;
   size_t xsize = 0, ysize = 0;
   size_t size;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   long nvals;
   int swapxy = FALSE;
   int ndims = 0;
@@ -3638,8 +3802,8 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
   int ncvarid;
   int ntsteps;
   size_t xsize = 0, ysize = 0;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   long nvals;
   int swapxy = FALSE;
   int ndims = 0;
@@ -3691,8 +3855,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
   if ( zid != UNDEFID )
     {
       int size = zaxisInqSize(zaxisID);
-      xassert(rect[2][0] >= 0 && rect[2][0] <= rect[2][1]
-              && rect[2][1] <= size);
+      xassert(rect[2][0] >= 0 && rect[2][0] <= rect[2][1] && rect[2][1] <= size);
       start[ndims] = rect[2][0];
       count[ndims] = rect[2][1] - rect[2][0] + 1;
       ndims++;
@@ -3701,8 +3864,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
     {
       size_t size;
       cdf_inq_dimlen(fileID, yid, &size);
-      xassert(rect[1][0] >= 0 && rect[1][0] <= rect[1][1]
-              && rect[1][1] <= size);
+      xassert(rect[1][0] >= 0 && rect[1][0] <= rect[1][1] && rect[1][1] <= (int)size);
       start[ndims] = rect[1][0];
       count[ndims] = rect[1][1] - rect[1][0] + 1;
       ndims++;
@@ -3711,8 +3873,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
     {
       size_t size;
       cdf_inq_dimlen(fileID, xid, &size);
-      xassert(rect[0][0] >= 0 && rect[0][0] <= rect[0][1]
-              && rect[0][1] <= size);
+      xassert(rect[0][0] >= 0 && rect[0][0] <= rect[0][1] && rect[0][1] <= (int)size);
       start[ndims] = rect[0][0];
       count[ndims] = rect[0][1] - rect[0][0] + 1;
       ndims++;
@@ -3800,9 +3961,10 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
   int tsID;
   int gridsize, xsize, ysize;
   size_t size;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   int ndims = 0;
+  int nvdims;
   int idim;
   int tsteptype;
   int gridindex;
@@ -3828,6 +3990,7 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
   if ( CDI_Debug ) Message("tsID = %d", tsID);
 
   ncvarid = streamptr->vars[varID].ncvarid;
+  cdf_inq_varndims(fileID, ncvarid, &nvdims);
 
   gridID    = vlistInqVarGrid(vlistID, varID);
   zaxisID   = vlistInqVarZaxis(vlistID, varID);
@@ -3858,6 +4021,24 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
 
   zaxisindex = vlistZaxisIndex(vlistID, zaxisID);
   zid = streamptr->zaxisID[zaxisindex];
+
+  int skipdim = 0;
+  if ( xid == -1 && yid == -1 && nvdims == 3 )
+    {
+      int dimids[3];
+      cdf_inq_vardimid(fileID, ncvarid, dimids);
+      size = 0;
+      if ( zid == dimids[2] )
+        {
+          cdf_inq_dimlen(fileID, dimids[1], &size);
+          if ( size == 1 ) skipdim = 1;
+        }
+      else if ( zid == dimids[1] )
+        {
+          cdf_inq_dimlen(fileID, dimids[2], &size);
+          if ( size == 1 ) skipdim = 2;
+        }
+    }
   /*
   printf("2 %p %d %d %s\n", streamptr, zaxisindex, streamptr->zaxisID[zaxisindex], vlistInqVarNamePtr(vlistID, varID));
   */
@@ -3879,6 +4060,13 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
       ndims++;
     }
 
+  if ( skipdim == 1 )
+    {
+      start[ndims] = 0;
+      count[ndims] = 1;
+      ndims++;
+    }
+
   for ( int id = 0; id < 3; ++id )
     {
       if ( dimorder[id] == 3 && zid != UNDEFID )
@@ -3903,9 +4091,19 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
         }
     }
 
-  if ( CDI_Debug )
-    for (idim = 0; idim < ndims; idim++)
-      Message("dim = %d  start = %d  count = %d", idim, start[idim], count[idim]);
+  if ( skipdim == 2 )
+    {
+      start[ndims] = 0;
+      count[ndims] = 1;
+      ndims++;
+    }
+
+  if ( CDI_Debug )
+    for (idim = 0; idim < ndims; idim++)
+      Message("dim = %d  start = %d  count = %d", idim, start[idim], count[idim]);
+
+  if ( nvdims != ndims )
+    Error("Internal error, variable %s has an unsupported array structure!", vlistInqVarNamePtr(vlistID, varID));
 
   if ( vlistInqVarDatatype(vlistID, varID) == DATATYPE_FLT32 )
     {
@@ -3952,7 +4150,7 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
         }
       else
         {
-          double *data_ptr = data; 
+          double *data_ptr = data;
           for ( i = 0; i < gridsize; i++, data_ptr++ )
             if ( DBL_IS_EQUAL((*data_ptr), missval) ) (*nmiss)++;
         }
@@ -4004,8 +4202,8 @@ int cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype
   int ntsteps;
   long nvals;
   size_t xsize = 0, ysize = 0;
-  size_t start[4];
-  size_t count[4];
+  size_t start[5];
+  size_t count[5];
   int ndims = 0;
   int idim;
   int tsteptype;
@@ -4234,7 +4432,8 @@ void cdfCreateRecords(stream_t *streamptr, int tsID)
 static
 int cdfTimeDimID(int fileID, int ndims, int nvars)
 {
-  int dimid = 0;
+  int dimid = UNDEFID;
+  int timedimid = UNDEFID;
   char dimname[80];
   char timeunits[CDI_MAX_NAME];
   char attname[CDI_MAX_NAME];
@@ -4247,41 +4446,40 @@ int cdfTimeDimID(int fileID, int ndims, int nvars)
   for ( dimid = 0; dimid < ndims; dimid++ )
     {
       cdf_inq_dimname(fileID, dimid, dimname);
-      if ( memcmp(dimname, "time", 4) == 0 ) break;
+      if ( memcmp(dimname, "time", 4) == 0 )
+        {
+          timedimid = dimid;
+          break;
+        }
     }
 
-  if ( dimid == ndims ) dimid = UNDEFID;
-
-  for ( varid = 0; varid < nvars; varid++ )
+  if ( timedimid == UNDEFID )
     {
-      if ( dimid != UNDEFID ) break;
-
-      cdf_inq_var(fileID, varid, name, &xtype, &nvdims, dimids, &nvatts);
-      if ( nvdims == 1 )
+      for ( varid = 0; varid < nvars; varid++ )
         {
-          for ( iatt = 0; iatt < nvatts; iatt++ )
+          cdf_inq_var(fileID, varid, name, &xtype, &nvdims, dimids, &nvatts);
+          if ( nvdims == 1 )
             {
-              cdf_inq_attname(fileID, varid, iatt, attname);
-              if ( memcmp(attname, "units", 5) == 0 )
+              for ( iatt = 0; iatt < nvatts; iatt++ )
                 {
-                  cdfGetAttText(fileID, varid, "units", sizeof(timeunits), timeunits);
-                  strtolower(timeunits);
-
-                  if ( memcmp(timeunits, "sec",    3) == 0 ||
-                       memcmp(timeunits, "minute", 6) == 0 ||
-                       memcmp(timeunits, "hour",   4) == 0 ||
-                       memcmp(timeunits, "day",    3) == 0 ||
-                       memcmp(timeunits, "month",  5) == 0 )
+                  cdf_inq_attname(fileID, varid, iatt, attname);
+                  if ( strncmp(attname, "units", 5) == 0 )
                     {
-                      dimid = dimids[0];
-                      break;
+                      cdfGetAttText(fileID, varid, "units", sizeof(timeunits), timeunits);
+                      strtolower(timeunits);
+
+                      if ( isTimeUnits(timeunits) )
+                        {
+                          timedimid = dimids[0];
+                          break;
+                        }
                     }
                 }
             }
         }
     }
 
-  return (dimid);
+  return (timedimid);
 }
 
 static
@@ -4332,10 +4530,11 @@ void init_ncvars(long nvars, ncvar_t *ncvars)
       ncvars[ncvarid].zvarid          = UNDEFID;
       ncvars[ncvarid].tvarid          = UNDEFID;
       ncvars[ncvarid].ncoordvars      = 0;
-      ncvars[ncvarid].coordvarids[0]  = UNDEFID;
-      ncvars[ncvarid].coordvarids[1]  = UNDEFID;
-      ncvars[ncvarid].coordvarids[2]  = UNDEFID;
-      ncvars[ncvarid].coordvarids[3]  = UNDEFID;
+      for ( int i = 0; i < MAX_COORDVARS; ++i )
+        ncvars[ncvarid].coordvarids[i]  = UNDEFID;
+      ncvars[ncvarid].nauxvars      = 0;
+      for ( int i = 0; i < MAX_AUXVARS; ++i )
+        ncvars[ncvarid].auxvarids[i]  = UNDEFID;
       ncvars[ncvarid].cellarea        = UNDEFID;
       ncvars[ncvarid].tableID         = UNDEFID;
       ncvars[ncvarid].xtype           = 0;
@@ -4388,7 +4587,7 @@ int isLonAxis(const char *units, const char *stdname)
       if ( degree_units[ioff] == 'e' ) status = TRUE;
     }
 
-  if ( status == TRUE ||
+  if ( status == FALSE &&
        ((memcmp(units, "degree", 6) == 0 ||memcmp(units, "radian", 6) == 0) &&
         (memcmp(stdname, "grid_longitude", 14) == 0 || memcmp(stdname, "longitude", 9) == 0)) )
     {
@@ -4416,7 +4615,7 @@ int isLatAxis(const char *units, const char *stdname)
       if ( degree_units[ioff] == 'n' ) status = TRUE;
     }
 
-  if ( status == TRUE ||
+  if ( status == FALSE &&
        ((memcmp(units, "degree", 6) == 0 || memcmp(units, "radian", 6) == 0) &&
         (memcmp(stdname, "grid_latitude", 13) == 0 || memcmp(stdname, "latitude", 8) == 0)) )
     {
@@ -4427,7 +4626,7 @@ int isLatAxis(const char *units, const char *stdname)
 }
 
 static
-int isDBLAxis(const char *units, const char *longname)
+int isDBLAxis(/*const char *units,*/ const char *longname)
 {
   int status = FALSE;
 
@@ -4452,7 +4651,7 @@ int isDepthAxis(const char *stdname, const char *longname)
   int status = FALSE;
 
   if ( strcmp(stdname, "depth") == 0 ) status = TRUE;
- 
+
   if ( status == FALSE )
     if ( strcmp(longname, "depth_below_sea") == 0 ||
          strcmp(longname, "depth below sea") == 0 )
@@ -4991,8 +5190,7 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
               cdfSetVar(ncvars, ncvarid, TRUE);
             }
           */
-          else if ( (strcmp(attname, "associate")  == 0 || strcmp(attname, "coordinates") == 0) &&
-		    atttype == NC_CHAR )
+          else if ( (strcmp(attname, "associate")  == 0 || strcmp(attname, "coordinates") == 0) && atttype == NC_CHAR )
             {
               int status;
               char *pstring, *varname = NULL;
@@ -5003,7 +5201,7 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
               cdfGetAttText(ncid, ncvarid, attname, attstringlen-1, attstring);
               pstring = attstring;
 
-              for ( i = 0; i < 4; i++ )
+              for ( i = 0; i < MAX_COORDVARS; i++ )
                 {
                   while ( isspace((int) *pstring) ) pstring++;
                   if ( *pstring == 0 ) break;
@@ -5030,6 +5228,44 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
 
               cdfSetVar(ncvars, ncvarid, TRUE);
             }
+          else if ( (strcmp(attname, "auxiliary_variable") == 0) && atttype == NC_CHAR )
+            {
+              int status;
+              char *pstring, *varname = NULL;
+              int lstop = FALSE;
+              int dimvarid;
+              extern int cdiIgnoreAttCoordinates;
+
+              cdfGetAttText(ncid, ncvarid, attname, attstringlen-1, attstring);
+              pstring = attstring;
+
+              for ( i = 0; i < MAX_AUXVARS; i++ )
+                {
+                  while ( isspace((int) *pstring) ) pstring++;
+                  if ( *pstring == 0 ) break;
+                  varname = pstring;
+                  while ( !isspace((int) *pstring) && *pstring != 0 ) pstring++;
+                  if ( *pstring == 0 ) lstop = TRUE;
+                  *pstring++ = 0;
+
+                  status = nc_inq_varid(ncid, varname, &dimvarid);
+                  if ( status == NC_NOERR )
+                    {
+                      cdfSetVar(ncvars, dimvarid, FALSE);
+                      //  if ( cdiIgnoreAttCoordinates == FALSE )
+                        {
+                          ncvars[ncvarid].auxvarids[i] = dimvarid;
+                          ncvars[ncvarid].nauxvars++;
+                        }
+                    }
+                  else
+                    Warning("%s - %s", nc_strerror(status), varname);
+
+                  if ( lstop ) break;
+                }
+
+              cdfSetVar(ncvars, ncvarid, TRUE);
+            }
           else if ( strcmp(attname, "grid_mapping") == 0 && atttype == NC_CHAR )
             {
               int status;
@@ -5310,7 +5546,7 @@ void setDimType(int nvars, ncvar_t *ncvars, ncdim_t *ncdims)
 	    {
 	      Message("var %d %s", ncvarid, ncvars[ncvarid].name);
 	      for ( i = 0; i < ndims; i++ )
-		printf("  dim %d type %d  ", i, ncvars[ncvarid].dimtype[i]);
+		printf("  dim%d type=%d  ", i, ncvars[ncvarid].dimtype[i]);
 	      printf("\n");
 	    }
 
@@ -5322,6 +5558,16 @@ void setDimType(int nvars, ncvar_t *ncvars, ncdim_t *ncdims)
 	      /* else if ( ncvars[ncvarid].dimtype[i] == T_AXIS ) ltdim = TRUE; */
 	    }
 
+          if ( lxdim == FALSE && ncvars[ncvarid].xvarid != UNDEFID )
+            {
+              if (  ncvars[ncvars[ncvarid].xvarid].ndims == 0 ) lxdim = TRUE;
+            }
+
+          if ( lydim == FALSE && ncvars[ncvarid].yvarid != UNDEFID )
+            {
+              if (  ncvars[ncvars[ncvarid].yvarid].ndims == 0 ) lydim = TRUE;
+            }
+
           //   if ( ndims > 1 )
             for ( i = ndims-1; i >= 0; i-- )
               {
@@ -5366,26 +5612,6 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
 	      continue;
 	    }
 
-	  if ( ncvars[ncvarid].longname[0] != 0 && ncvars[ncvarid].longname[1] != 0 )
-	    {
-	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
-		{
-		  ncvars[ncvarid].islon = TRUE;
-		  cdfSetVar(ncvars, ncvarid, FALSE);
-		  cdfSetDim(ncvars, ncvarid, 0, X_AXIS);
-		  ncdims[ncdimid].dimtype = X_AXIS;
-		  continue;
-		}
-	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
-		{
-		  ncvars[ncvarid].islat = TRUE;
-		  cdfSetVar(ncvars, ncvarid, FALSE);
-		  cdfSetDim(ncvars, ncvarid, 0, Y_AXIS);
-		  ncdims[ncdimid].dimtype = Y_AXIS;
-		  continue;
-		}
-	    }
-
 	  if ( ncvars[ncvarid].units[0] != 0 )
 	    {
 	      if ( isLonAxis(ncvars[ncvarid].units, ncvars[ncvarid].stdname) )
@@ -5419,7 +5645,7 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
 		  else if ( strcmp(ncvars[ncvarid].units, "level") == 0 )
 		    ncvars[ncvarid].zaxistype = ZAXIS_GENERIC;
 		}
-	      else if ( isDBLAxis(ncvars[ncvarid].units, ncvars[ncvarid].longname) )
+	      else if ( isDBLAxis(ncvars[ncvarid].longname) )
                 {
                   ncvars[ncvarid].zaxistype = ZAXIS_DEPTH_BELOW_LAND;
 		}
@@ -5432,6 +5658,27 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
 		}
 	    }
 
+	  if ( ncvars[ncvarid].islon == FALSE && ncvars[ncvarid].longname[0] != 0 &&
+               ncvars[ncvarid].islat == FALSE && ncvars[ncvarid].longname[1] != 0 )
+	    {
+	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
+		{
+		  ncvars[ncvarid].islon = TRUE;
+		  cdfSetVar(ncvars, ncvarid, FALSE);
+		  cdfSetDim(ncvars, ncvarid, 0, X_AXIS);
+		  ncdims[ncdimid].dimtype = X_AXIS;
+		  continue;
+		}
+	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
+		{
+		  ncvars[ncvarid].islat = TRUE;
+		  cdfSetVar(ncvars, ncvarid, FALSE);
+		  cdfSetDim(ncvars, ncvarid, 0, Y_AXIS);
+		  ncdims[ncdimid].dimtype = Y_AXIS;
+		  continue;
+		}
+	    }
+
 	  if ( ncvars[ncvarid].zaxistype != UNDEFID )
 	    {
               ncvars[ncvarid].islev = TRUE;
@@ -5453,21 +5700,6 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
     {
       if ( ncvars[ncvarid].isvar == 0 )
 	{
-	  /* not needed anymore for rotated grids */
-	  if ( ncvars[ncvarid].longname[0] != 0 && ncvars[ncvarid].longname[1] != 0 )
-	    {
-	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
-		{
-		  ncvars[ncvarid].islon = TRUE;
-		  continue;
-		}
-	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
-		{
-		  ncvars[ncvarid].islat = TRUE;
-		  continue;
-		}
-	    }
-
 	  if ( ncvars[ncvarid].units[0] != 0 )
 	    {
 	      if ( isLonAxis(ncvars[ncvarid].units, ncvars[ncvarid].stdname) )
@@ -5499,7 +5731,7 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
 		    ncvars[ncvarid].zaxistype = ZAXIS_GENERIC;
 		  continue;
 		}
-	      else if ( isDBLAxis(ncvars[ncvarid].units, ncvars[ncvarid].longname) )
+	      else if ( isDBLAxis(ncvars[ncvarid].longname) )
 		{
                   ncvars[ncvarid].zaxistype = ZAXIS_DEPTH_BELOW_LAND;
 		  continue;
@@ -5512,6 +5744,22 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
 		    ncvars[ncvarid].zaxistype = ZAXIS_HEIGHT;
 		  continue;
 		}
+            }
+
+	  /* not needed anymore for rotated grids */
+	  if ( ncvars[ncvarid].islon == FALSE && ncvars[ncvarid].longname[0] != 0 &&
+               ncvars[ncvarid].islat == FALSE && ncvars[ncvarid].longname[1] != 0 )
+	    {
+	      if ( memcmp(ncvars[ncvarid].longname+1, "ongitude", 8) == 0 )
+		{
+		  ncvars[ncvarid].islon = TRUE;
+		  continue;
+		}
+	      else if ( memcmp(ncvars[ncvarid].longname+1, "atitude", 7) == 0 )
+		{
+		  ncvars[ncvarid].islat = TRUE;
+		  continue;
+		}
 	    }
 	}
     }
@@ -5549,6 +5797,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
   int nbdims;
   int i;
   int nvatts;
+  int skipvar;
   size_t nvertex;
   grid_t grid;
   grid_t proj;
@@ -5643,7 +5892,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 	    }
 
 	  if ( ncvars[ncvarid].gridtype == UNDEFID || ncvars[ncvarid].gridtype == GRID_GENERIC )
-	    if ( ydimid == xdimid ) ncvars[ncvarid].gridtype = GRID_UNSTRUCTURED;
+	    if ( xdimid != UNDEFID && xdimid == ydimid ) ncvars[ncvarid].gridtype = GRID_UNSTRUCTURED;
 
 	  grid_init(&grid);
 	  grid_init(&proj);
@@ -5699,6 +5948,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 
 	      if ( xvarid != UNDEFID )
 		{
+                  skipvar = TRUE;
 		  islon = ncvars[xvarid].islon;
 		  ndims = ncvars[xvarid].ndims;
 		  if ( ndims == 2 || ndims == 3 )
@@ -5713,15 +5963,10 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			dimsize1 = ncdims[dimid].len;
 			dimid = ncvars[xvarid].dimids[ndims-1];
 			dimsize2 = ncdims[dimid].len;
-			if ( dimsize1*dimsize2 != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize1*dimsize2 == size ) skipvar = FALSE;
 		      }
 		    }
-		  else
+		  else if ( ndims == 1 )
 		    {
 		      size = xsize;
 		      /* Check size of 1 dimensional coordinate variables */
@@ -5730,14 +5975,22 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			size_t dimsize;
 			dimid = ncvars[xvarid].dimids[0];
 			dimsize = ncdims[dimid].len;
-			if ( dimsize != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize == size ) skipvar = FALSE;
 		      }
 		    }
+		  else if ( ndims == 0 && xsize == 0 )
+		    {
+                      xsize = 1;
+		      size = xsize;
+                      skipvar = FALSE;
+		    }
+
+                  if ( skipvar )
+                    {
+                      Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
+                      ncvars[ncvarid].isvar = -1;
+                      continue;
+                    }
 
 		  if ( ncvars[xvarid].xtype == NC_FLOAT ) grid.prec = DATATYPE_FLT32;
 		  grid.xvals = (double *) malloc(size*sizeof(double));
@@ -5770,6 +6023,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 
 	      if ( yvarid != UNDEFID )
 		{
+                  skipvar = TRUE;
 		  islat = ncvars[yvarid].islat;
 		  ndims = ncvars[yvarid].ndims;
 		  if ( ndims == 2 || ndims == 3 )
@@ -5784,15 +6038,10 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			dimsize1 = ncdims[dimid].len;
 			dimid = ncvars[yvarid].dimids[ndims-1];
 			dimsize2 = ncdims[dimid].len;
-			if ( dimsize1*dimsize2 != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize1*dimsize2 == size ) skipvar = FALSE;
 		      }
 		    }
-		  else
+		  else if ( ndims == 1 )
 		    {
 		      if ( (int) ysize == 0 ) size = xsize;
 		      else                    size = ysize;
@@ -5803,14 +6052,22 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 			size_t dimsize;
 			dimid = ncvars[yvarid].dimids[0];
 			dimsize = ncdims[dimid].len;
-			if ( dimsize != size )
-			  {
-			    Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
-			    ncvars[ncvarid].isvar = -1;
-			    continue;
-			  }
+			if ( dimsize == size ) skipvar = FALSE;
 		      }
 		    }
+		  else if ( ndims == 0 && ysize == 0 )
+		    {
+                      ysize = 1;
+		      size = ysize;
+                      skipvar = FALSE;
+		    }
+
+                  if ( skipvar )
+                    {
+                      Warning("Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
+                      ncvars[ncvarid].isvar = -1;
+                      continue;
+                    }
 
 		  if ( ncvars[yvarid].xtype == NC_FLOAT ) grid.prec = DATATYPE_FLT32;
 		  grid.yvals = (double *) malloc(size*sizeof(double));
@@ -6095,6 +6352,9 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
                   ncvars[ncvarid].isvar = -1;
                   continue;
                 }
+
+              if ( ncvars[ncvarid].position > 0 ) grid.position = ncvars[ncvarid].position;
+              if ( uuidOfHGrid[0] != 0 ) memcpy(grid.uuid, uuidOfHGrid, 16);
             }
 
 #if defined (PROJECTION_TEST)
@@ -6136,17 +6396,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 
           if ( grid.type == GRID_UNSTRUCTURED )
             {
-              if ( CDI_Debug)
-                {
-                  if ( grid.number != UNDEFID ) printf("number : %d\n", grid.number);
-                  if ( ncvars[ncvarid].position > 0 ) printf("position : %d\n", ncvars[ncvarid].position);
-                  if ( gridfile[0] != 0 ) printf("gridfile: %s\n", gridfile);
-                  if ( uuidOfHGrid[0] != 0 ) printf("uuidOfHGrid: defined\n");
-                }
-
-              if ( ncvars[ncvarid].position > 0 ) gridDefPosition(ncvars[ncvarid].gridID, ncvars[ncvarid].position);
               if ( gridfile[0] != 0 ) gridDefReference(ncvars[ncvarid].gridID, gridfile);
-              if ( uuidOfHGrid[0] != 0 ) gridDefUUID(ncvars[ncvarid].gridID, uuidOfHGrid);
             }
 
           if ( ncvars[ncvarid].chunked )
@@ -6176,6 +6426,8 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
 	  gridindex = vlistGridIndex(vlistID, ncvars[ncvarid].gridID);
 	  streamptr->xdimID[gridindex] = xdimid;
 	  streamptr->ydimID[gridindex] = ydimid;
+          if ( xdimid == -1 && ydimid == -1 && grid.size == 1 )
+            gridDefHasDims(ncvars[ncvarid].gridID, FALSE);
 
 	  if ( CDI_Debug )
 	    Message("gridID %d %d %s", ncvars[ncvarid].gridID, ncvarid, ncvars[ncvarid].name);
@@ -6467,9 +6719,9 @@ void define_all_vars(stream_t *streamptr, int vlistID, int instID, int modelID,
 	  param = cdiEncodeParam(ncvars[ncvarid].code, ncvars[ncvarid].tabnum, 255);
 	  vlistDefVarParam(vlistID, varID, param);
 	}
-      if ( ncvars[ncvarid].longname[0] )      vlistDefVarLongname(vlistID, varID, ncvars[ncvarid].longname);
-      if ( ncvars[ncvarid].stdname[0] )       vlistDefVarStdname(vlistID, varID, ncvars[ncvarid].stdname);
-      if ( ncvars[ncvarid].units[0] )         vlistDefVarUnits(vlistID, varID, ncvars[ncvarid].units);
+      if ( ncvars[ncvarid].longname[0] )  vlistDefVarLongname(vlistID, varID, ncvars[ncvarid].longname);
+      if ( ncvars[ncvarid].stdname[0] )   vlistDefVarStdname(vlistID, varID, ncvars[ncvarid].stdname);
+      if ( ncvars[ncvarid].units[0] )     vlistDefVarUnits(vlistID, varID, ncvars[ncvarid].units);
 
       if ( ncvars[ncvarid].lvalidrange )
         vlistDefVarValidrange(vlistID, varID, ncvars[ncvarid].validrange);
@@ -6707,7 +6959,8 @@ void define_all_vars(stream_t *streamptr, int vlistID, int instID, int modelID,
 
 static
 void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ngatts,
-                            int *instID, int *modelID, int *ucla_les, char *uuidOfHGrid, char *gridfile, int *number_of_grid_used)
+                            int *instID, int *modelID, int *ucla_les, char *uuidOfHGrid,
+                            char *gridfile, int *number_of_grid_used, char *fcreftime)
 {
   nc_type xtype;
   size_t attlen;
@@ -6725,6 +6978,8 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 	{
 	  cdfGetAttText(fileID, NC_GLOBAL, attname, attstringlen-1, attstring);
 
+          size_t attstrlen = strlen(attstring);
+
 	  if ( attlen > 0 && attstring[0] != 0 )
 	    {
 	      if ( strcmp(attname, "history") == 0 )
@@ -6759,11 +7014,17 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 	      else if ( strcmp(attname, "CDO") == 0 )
 		{
 		}
+              /*
+	      else if ( strcmp(attname, "forecast_reference_time") == 0 )
+		{
+                  memcpy(fcreftime, attstring, attstrlen+1);
+		}
+              */
 	      else if ( strcmp(attname, "grid_file_uri") == 0 )
 		{
-                  memcpy(gridfile, attstring, attlen+1);
+                  memcpy(gridfile, attstring, attstrlen+1);
 		}
-	      else if ( strcmp(attname, "uuidOfHGrid") == 0 && attlen == 36 )
+	      else if ( strcmp(attname, "uuidOfHGrid") == 0 && attstrlen == 36 )
 		{
                   attstring[36] = 0;
                   str2uuid(attstring, uuidOfHGrid);
@@ -6773,10 +7034,10 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 		{
                   if ( strcmp(attname, "ICON_grid_file_uri") == 0 && gridfile[0] == 0 )
                     {
-                      memcpy(gridfile, attstring, attlen+1);
+                      memcpy(gridfile, attstring, attstrlen+1);
                     }
 
-		  vlistDefAttTxt(vlistID, CDI_GLOBAL, attname, (int)attlen, attstring);
+		  vlistDefAttTxt(vlistID, CDI_GLOBAL, attname, (int)attstrlen, attstring);
 		}
 	    }
 	}
@@ -6812,6 +7073,135 @@ void scan_global_attributes(int fileID, int vlistID, stream_t *streamptr, int ng
 	}
     }
 }
+
+static
+int find_leadtime(int nvars, ncvar_t *ncvars)
+{
+  int leadtime_id = UNDEFID;
+  int ncvarid;
+
+  for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+    {
+      if ( ncvars[ncvarid].stdname[0] )
+        {
+          if ( strcmp(ncvars[ncvarid].stdname, "forecast_period") == 0 )
+            {
+              leadtime_id = ncvarid;
+              break;
+            }
+        }
+    }
+
+  return (leadtime_id);
+}
+
+static
+void find_time_vars(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimid, stream_t *streamptr,
+                    int *time_has_units, int *time_has_bounds, int *time_climatology)
+{
+  int ncvarid;
+
+  if ( timedimid == UNDEFID )
+    {
+      char timeunits[CDI_MAX_NAME];
+
+      for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+        {
+          if ( ncvars[ncvarid].ndims == 0 && strcmp(ncvars[ncvarid].name, "time") == 0 )
+            {
+              if ( ncvars[ncvarid].units[0] )
+                {
+                  strcpy(timeunits, ncvars[ncvarid].units);
+                  strtolower(timeunits);
+
+                  if ( isTimeUnits(timeunits) )
+                    {
+                      streamptr->basetime.ncvarid = ncvarid;
+                      break;
+                    }
+                }
+            }
+        }
+    }
+  else
+    {
+      int ltimevar = FALSE;
+
+      if ( ncdims[timedimid].ncvarid != UNDEFID )
+        {
+          streamptr->basetime.ncvarid = ncdims[timedimid].ncvarid;
+          ltimevar = TRUE;
+        }
+
+      for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+        if ( ncvarid != streamptr->basetime.ncvarid &&
+             ncvars[ncvarid].ndims == 1 &&
+             timedimid == ncvars[ncvarid].dimids[0] &&
+             ncvars[ncvarid].xtype != NC_CHAR &&
+             isTimeAxisUnits(ncvars[ncvarid].units) )
+          {
+            ncvars[ncvarid].isvar = FALSE;
+
+            if ( !ltimevar )
+              {
+                streamptr->basetime.ncvarid = ncvarid;
+                ltimevar = TRUE;
+                if ( CDI_Debug )
+                  fprintf(stderr, "timevar %s\n", ncvars[ncvarid].name);
+              }
+            else
+              {
+                Warning("Found more than one time variable, skipped variable %s!", ncvars[ncvarid].name);
+              }
+          }
+
+      if ( ltimevar == FALSE ) /* search for WRF time description */
+        {
+          for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
+            if ( ncvarid != streamptr->basetime.ncvarid &&
+                 ncvars[ncvarid].ndims == 2 &&
+                 timedimid == ncvars[ncvarid].dimids[0] &&
+                 ncvars[ncvarid].xtype == NC_CHAR &&
+                 ncdims[ncvars[ncvarid].dimids[1]].len == 19 )
+              {
+                streamptr->basetime.ncvarid = ncvarid;
+                streamptr->basetime.lwrf    = TRUE;
+                break;
+              }
+        }
+
+      /* time varID */
+      ncvarid = streamptr->basetime.ncvarid;
+
+      if ( ncvarid == UNDEFID )
+        {
+          Warning("Time variable >%s< not found!", ncdims[timedimid].name);
+        }
+    }
+
+  /* time varID */
+  ncvarid = streamptr->basetime.ncvarid;
+
+  if ( ncvarid != UNDEFID && streamptr->basetime.lwrf == FALSE )
+    {
+      if ( ncvars[ncvarid].units[0] != 0 ) *time_has_units = TRUE;
+
+      if ( ncvars[ncvarid].bounds != UNDEFID )
+        {
+          int nbdims = ncvars[ncvars[ncvarid].bounds].ndims;
+          if ( nbdims == 2 )
+            {
+              int len = (int) ncdims[ncvars[ncvars[ncvarid].bounds].dimids[nbdims-1]].len;
+              if ( len == 2 && timedimid == ncvars[ncvars[ncvarid].bounds].dimids[0] )
+                {
+                  *time_has_bounds = TRUE;
+                  streamptr->basetime.ncvarboundsid = ncvars[ncvarid].bounds;
+                  if ( ncvars[ncvarid].climatology ) *time_climatology = TRUE;
+                }
+            }
+        }
+    }
+}
 #endif
 
 int cdfInqContents(stream_t *streamptr)
@@ -6829,7 +7219,7 @@ int cdfInqContents(stream_t *streamptr)
   int time_has_units = FALSE;
   int time_has_bounds = FALSE;
   int time_climatology = FALSE;
-  size_t len;
+  int leadtime_id = UNDEFID;
   int nvars_data;
   int nvcth_id = UNDEFID, vcta_id = UNDEFID, vctb_id = UNDEFID;
   size_t vctsize = 0;
@@ -6838,7 +7228,6 @@ int cdfInqContents(stream_t *streamptr)
   int modelID = UNDEFID;
   int taxisID;
   int i;
-  int nbdims;
   int calendar = UNDEFID;
   ncdim_t *ncdims;
   ncvar_t *ncvars = NULL;
@@ -6847,10 +7236,12 @@ int cdfInqContents(stream_t *streamptr)
   int ucla_les = FALSE;
   char uuidOfHGrid[17];
   char gridfile[8912];
+  char fcreftime[CDI_MAX_NAME];
   int number_of_grid_used = UNDEFID;
 
   uuidOfHGrid[0] = 0;
-  gridfile[0] = 0;
+  gridfile[0]    = 0;
+  fcreftime[0]   = 0;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -6920,7 +7311,7 @@ int cdfInqContents(stream_t *streamptr)
     }
 
   /* scan global attributes */
-  scan_global_attributes(fileID, vlistID, streamptr, ngatts, &instID, &modelID, &ucla_les, uuidOfHGrid, gridfile, &number_of_grid_used);
+  scan_global_attributes(fileID, vlistID, streamptr, ngatts, &instID, &modelID, &ucla_les, uuidOfHGrid, gridfile, &number_of_grid_used, fcreftime);
 
   /* find time dim */
   if ( unlimdimid >= 0 )
@@ -6983,81 +7374,10 @@ int cdfInqContents(stream_t *streamptr)
     }
 
   /* find time vars */
-  if ( timedimid != UNDEFID )
-    {
-      int ltimevar = FALSE;
-
-      if ( ncdims[timedimid].ncvarid != UNDEFID )
-	{
-	  streamptr->basetime.ncvarid = ncdims[timedimid].ncvarid;
-	  ltimevar = TRUE;
-	}
-
-      for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
-	if ( ncvarid != streamptr->basetime.ncvarid &&
-	     ncvars[ncvarid].ndims == 1 &&
-	     timedimid == ncvars[ncvarid].dimids[0] &&
-	     ncvars[ncvarid].xtype != NC_CHAR &&
-	     isTimeUnits(ncvars[ncvarid].units) )
-	  {
-	    ncvars[ncvarid].isvar = FALSE;
-
-	    if ( !ltimevar )
-	      {
-		streamptr->basetime.ncvarid = ncvarid;
-		ltimevar = TRUE;
-		if ( CDI_Debug )
-		  fprintf(stderr, "timevar %s\n", ncvars[ncvarid].name);
-	      }
-	    else
-	      {
-		if ( CDI_Debug )
-		  fprintf(stderr, "skipped timevar %s\n", ncvars[ncvarid].name);
-	      }
-	  }
+  find_time_vars(nvars, ncvars, ncdims, timedimid, streamptr, &time_has_units, &time_has_bounds, &time_climatology);
 
-      if ( ltimevar == FALSE ) /* search for WRF time description */
-	{
-	  for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
-	    if ( ncvarid != streamptr->basetime.ncvarid &&
-		 ncvars[ncvarid].ndims == 2 &&
-		 timedimid == ncvars[ncvarid].dimids[0] &&
-		 ncvars[ncvarid].xtype == NC_CHAR &&
-		 ncdims[ncvars[ncvarid].dimids[1]].len == 19 )
-	      {
-		streamptr->basetime.ncvarid = ncvarid;
-		streamptr->basetime.lwrf    = TRUE;
-		break;
-	      }
-	}
-
-      /* time varID */
-      ncvarid = streamptr->basetime.ncvarid;
-
-      if ( ncvarid == UNDEFID )
-	Warning("Variable >time< not found!");
-      else if ( streamptr->basetime.lwrf == FALSE )
-	{
-	  if ( ncvars[ncvarid].units[0] != 0 )
-	    time_has_units = TRUE;
-
-	  if ( ncvars[ncvarid].bounds != UNDEFID )
-	    {
-	      nbdims = ncvars[ncvars[ncvarid].bounds].ndims;
-	      if ( nbdims == 2 )
-		{
-		  len = ncdims[ncvars[ncvars[ncvarid].bounds].dimids[nbdims-1]].len;
-		  if ( (int)len == 2 && timedimid == ncvars[ncvars[ncvarid].bounds].dimids[0] )
-		    {
-
-		      time_has_bounds = TRUE;
-		      streamptr->basetime.ncvarboundsid = ncvars[ncvarid].bounds;
-                      if ( ncvars[ncvarid].climatology ) time_climatology = TRUE;
-		    }
-		}
-	    }
-	}
-    }
+  leadtime_id = find_leadtime(nvars, ncvars);
+  if ( leadtime_id != UNDEFID ) ncvars[leadtime_id].isvar = FALSE;
 
   /* check ncvars */
   for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
@@ -7122,7 +7442,6 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
 
-
   /* verify coordinate vars - first scan (dimname == varname) */
   verify_coordinate_vars_1(ndims, ncdims, ncvars, timedimid);
 
@@ -7172,8 +7491,6 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
   */
-  /* set dim type */
-  setDimType(nvars, ncvars, ncdims);
 
   /* Set coordinate varids (att: associate)  */
   for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
@@ -7194,6 +7511,9 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
 
+  /* set dim type */
+  setDimType(nvars, ncvars, ncdims);
+
   /* find VCT */
   for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
     {
@@ -7262,6 +7582,9 @@ int cdfInqContents(stream_t *streamptr)
       return (CDI_EUFSTRUCT);
     }
 
+  if ( ntsteps == 0 && streamptr->basetime.ncdimid == UNDEFID && streamptr->basetime.ncvarid != UNDEFID )
+    ntsteps = 1;
+
   streamptr->ntsteps = ntsteps;
 
   /* define all data variables */
@@ -7275,12 +7598,26 @@ int cdfInqContents(stream_t *streamptr)
 
   if ( time_has_units )
     {
-      taxis_t *taxis;
-      taxis = &streamptr->tsteps[0].taxis;
+      taxis_t *taxis = &streamptr->tsteps[0].taxis;
+
+      if ( setBaseTime(ncvars[ncvarid].units, taxis) == 1 )
+        {
+          ncvarid = UNDEFID;
+          streamptr->basetime.ncvarid = UNDEFID;
+        }
+
+      if ( leadtime_id != UNDEFID && taxis->type == TAXIS_RELATIVE )
+        {
+          streamptr->basetime.leadtimeid = leadtime_id;
+          taxis->type = TAXIS_FORECAST;
 
-      cdfGetAttText(fileID, ncvarid, "units", attstringlen-1, attstring);
-      if ( splitBasetime(attstring, taxis) == 1 )
-	streamptr->basetime.ncvarid = UNDEFID;
+          int timeunit = -1;
+          if ( ncvars[leadtime_id].units[0] != 0 ) timeunit = scanTimeUnit(ncvars[leadtime_id].units);
+          if ( timeunit == -1 ) timeunit = taxis->unit;
+          taxis->fc_unit = timeunit;
+
+          setForecastTime(fcreftime, taxis);
+        }
     }
 
   if ( time_has_bounds )
@@ -7289,17 +7626,16 @@ int cdfInqContents(stream_t *streamptr)
       if ( time_climatology ) streamptr->tsteps[0].taxis.climatology = TRUE;
     }
 
-  if ( ncvarid != -1 )
+  if ( ncvarid != UNDEFID )
     {
-      taxis_t *taxis;
-      taxis = &streamptr->tsteps[0].taxis;
+      taxis_t *taxis = &streamptr->tsteps[0].taxis;
 
       taxis->name = strdup(ncvars[ncvarid].name);
       if ( ncvars[ncvarid].longname[0] )
         taxis->longname = strdup(ncvars[ncvarid].longname);
     }
 
-  if ( ncvarid != -1 )
+  if ( ncvarid != UNDEFID )
     if ( ncvars[ncvarid].calendar == TRUE )
       {
 	cdfGetAttText(fileID, ncvarid, "calendar", attstringlen-1, attstring);
@@ -7324,8 +7660,14 @@ int cdfInqContents(stream_t *streamptr)
 	  Warning("calendar >%s< unsupported!", attstring);
       }
 
-  if ( streamptr->tsteps[0].taxis.type == TAXIS_RELATIVE )
-    taxisID = taxisCreate(TAXIS_RELATIVE);
+  if ( streamptr->tsteps[0].taxis.type == TAXIS_FORECAST )
+    {
+      taxisID = taxisCreate(TAXIS_FORECAST);
+    }
+  else if ( streamptr->tsteps[0].taxis.type == TAXIS_RELATIVE )
+    {
+      taxisID = taxisCreate(TAXIS_RELATIVE);
+    }
   else
     {
       taxisID = taxisCreate(TAXIS_ABSOLUTE);
@@ -7336,22 +7678,15 @@ int cdfInqContents(stream_t *streamptr)
 	}
     }
 
-  if ( calendar != UNDEFID )
-    {
-      taxis_t *taxis;
-      taxis = &streamptr->tsteps[0].taxis;
 
-      taxis->calendar = calendar;
-      taxisDefCalendar(taxisID, calendar);
-    }
-  else if ( streamptr->tsteps[0].taxis.type == TAXIS_RELATIVE )
+  if ( calendar == UNDEFID && streamptr->tsteps[0].taxis.type != TAXIS_ABSOLUTE )
     {
-      taxis_t *taxis;
-
       calendar = CALENDAR_STANDARD;
+    }
 
-      taxis = &streamptr->tsteps[0].taxis;
-
+  if ( calendar != UNDEFID )
+    {
+      taxis_t *taxis = &streamptr->tsteps[0].taxis;
       taxis->calendar = calendar;
       taxisDefCalendar(taxisID, calendar);
     }
@@ -7382,8 +7717,6 @@ int cdfInqTimestep(stream_t * streamptr, int tsID)
   long nrecs = 0;
 #if  defined  (HAVE_LIBNETCDF)
   double timevalue;
-  int nctimevarid;
-  int nctimeboundsid;
   int fileID;
   size_t index;
   taxis_t *taxis;
@@ -7402,7 +7735,7 @@ int cdfInqTimestep(stream_t * streamptr, int tsID)
 
       timevalue = tsID;
 
-      nctimevarid = streamptr->basetime.ncvarid;
+      int nctimevarid = streamptr->basetime.ncvarid;
       if ( nctimevarid != UNDEFID )
 	{
 	  fileID = streamptr->fileID;
@@ -7434,22 +7767,29 @@ int cdfInqTimestep(stream_t * streamptr, int tsID)
 	      cdiDecodeTimeval(timevalue, taxis, &taxis->vdate, &taxis->vtime);
 	    }
 
-	  nctimeboundsid = streamptr->basetime.ncvarboundsid;
+	  int nctimeboundsid = streamptr->basetime.ncvarboundsid;
 	  if ( nctimeboundsid != UNDEFID )
 	    {
 	      size_t start[2], count[2];
-	      start[0] = tsID; count[0] = 1; start[1] = 0; count[1] = 1;
+	      start[0] = index; count[0] = 1; start[1] = 0; count[1] = 1;
 	      cdf_get_vara_double(fileID, nctimeboundsid, start, count, &timevalue);
               if ( timevalue >= NC_FILL_DOUBLE || timevalue < -NC_FILL_DOUBLE ) timevalue = 0;
 
 	      cdiDecodeTimeval(timevalue, taxis, &taxis->vdate_lb, &taxis->vtime_lb);
 
-	      start[0] = tsID; count[0] = 1; start[1] = 1; count[1] = 1;
+	      start[0] = index; count[0] = 1; start[1] = 1; count[1] = 1;
 	      cdf_get_vara_double(fileID, nctimeboundsid, start, count, &timevalue);
               if ( timevalue >= NC_FILL_DOUBLE || timevalue < -NC_FILL_DOUBLE ) timevalue = 0;
 
 	      cdiDecodeTimeval(timevalue, taxis, &taxis->vdate_ub, &taxis->vtime_ub);
 	    }
+
+          int leadtimeid = streamptr->basetime.leadtimeid;
+          if ( leadtimeid != UNDEFID )
+            {
+	      cdf_get_var1_double(fileID, leadtimeid, &index, &timevalue);
+              cdiSetForecastPeriod(timevalue, taxis);
+            }
 	}
     }
 
@@ -7472,6 +7812,7 @@ void cdfEndDef(stream_t *streamptr)
 
   cdfDefGlobalAtts(streamptr);
   cdfDefLocalAtts(streamptr);
+
   if ( streamptr->accessmode == 0 )
     {
       nvars =  streamptr->nvars;
@@ -7481,7 +7822,15 @@ void cdfEndDef(stream_t *streamptr)
       for ( varID = 0; varID < nvars; varID++ )
 	cdfDefVar(streamptr, varID);
 
-      if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
+      if ( streamptr->ncmode == 2 )
+        {
+          extern size_t CDI_netcdf_hdr_pad;
+
+          if ( CDI_netcdf_hdr_pad == 0UL )
+            cdf_enddef(fileID);
+          else
+            cdf__enddef(fileID, CDI_netcdf_hdr_pad);
+        }
 
       streamptr->accessmode = 1;
     }
diff --git a/libcdi/src/stream_cgribex.c b/libcdi/src/stream_cgribex.c
index b252d6f..16b1c29 100644
--- a/libcdi/src/stream_cgribex.c
+++ b/libcdi/src/stream_cgribex.c
@@ -187,9 +187,10 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
 	      {
                 int recompinc = TRUE;
 
+                if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
+
 		if ( ISEC2_ResFlag && ISEC2_LonIncr > 0 )
                   {
-                    if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
                     if ( abs(ISEC2_LastLon - (ISEC2_FirstLon+ISEC2_LonIncr*(grid->xsize-1))) <= 2 )
                       {
                         recompinc = FALSE;
@@ -254,6 +255,8 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
 	  {
 	    if ( grid->xsize > 1 )
 	      {
+                if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
+
 		if ( ISEC2_ResFlag && ISEC2_LonIncr > 0 )
 		  grid->xinc = ISEC2_LonIncr * 0.001;
 		else
@@ -342,8 +345,8 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
   if ( cgribexGetIsRotated(isec2) )
     {
       grid->isRotated = TRUE;
-      grid->ypole     = - ISEC2_LatSP * 0.001;
-      grid->xpole     =   ISEC2_LonSP * 0.001 - 180;
+      grid->ypole     = - ISEC2_LatSP*0.001;
+      grid->xpole     =   ISEC2_LonSP*0.001 - 180;
       grid->angle     = 0;
     }
 
@@ -408,7 +411,7 @@ void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, d
   if ( datatype <  0 ) datatype = DATATYPE_PACK;
 
   varAddRecord(recID, param, gridID, zaxistype, lbounds, level1, level2, 0, 0,
-	       datatype, &varID, &levelID, tsteptype, numavg, ISEC1_LevelType, NULL, NULL, NULL);
+	       datatype, &varID, &levelID, tsteptype, numavg, ISEC1_LevelType, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -458,10 +461,6 @@ void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, d
 
   streamptr->tsteps[tsID].nallrecs++;
   streamptr->nrecs++;
-
-  if ( CDI_Debug )
-    Message("varID = %d  param = %d  zaxistype = %d  gridID = %d  levelID = %d",
-	    varID, param, zaxistype, gridID, levelID);
 }
 
 static
@@ -491,7 +490,7 @@ void MCH_get_undef(int *isec1, double *undef_pds, double *undef_eps)
 
 static
 void cgribexDecodeHeader(int *isec0, int *isec1, int *isec2, double *fsec2,
-			 int *isec3, double *fsec3, int *isec4, double *fsec4, 
+			 int *isec3, double *fsec3, int *isec4, double *fsec4,
 			 int *gribbuffer, int recsize, int *lmv, int *iret)
 {
   int ipunp = 0, iword = 0;
@@ -543,6 +542,9 @@ int cgribexVarCompare(compvar_t compVar, record_t record)
 }
 #endif
 
+#define gribWarning(text, nrecs, timestep, paramstr, level1, level2) \
+            Warning("Record %2d (id=%s lev1=%d lev2=%d) timestep %d: %s", nrecs, paramstr, level1, level2, timestep, text)
+
 int cgribexScanTimestep1(stream_t * streamptr)
 {
 #if  defined  (HAVE_LIBCGRIBEX)
@@ -561,7 +563,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
   int varID;
   size_t readsize;
   int nrecords, nrecs, recID;
-  int nrecs_scanned;
+  int nrecs_scanned = 0;
   int datatype;
   long recsize = 0;
   int warn_time = TRUE;
@@ -573,6 +575,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
   int comptype;
   long unzipsize;
   compvar_t compVar;
+  char paramstr[32];
   extern int cdiSkipRecords;
   int nskip = cdiSkipRecords;
 
@@ -602,7 +605,6 @@ int cgribexScanTimestep1(stream_t * streamptr)
       fileSetPos(fileID, recsize, SEEK_CUR);
     }
 
-  nrecs_scanned = 0;
   nrecs = 0;
   while ( TRUE )
     {
@@ -644,6 +646,8 @@ int cgribexScanTimestep1(stream_t * streamptr)
 			  (int *) gribbuffer, recsize, &lmv, &iret);
 
       param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
+      cdiParamToString(param, paramstr, sizeof(paramstr));
+
       if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
       if ( ISEC1_LevelType ==  99 ) ISEC1_LevelType = 100;
       level1   = ISEC1_Level1;
@@ -683,9 +687,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
 	      if ( warn_time )
 		if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 )
 		  {
-		    char paramstr[32];
-		    cdiParamToString(param, paramstr, sizeof(paramstr));
-		    Warning("Inconsistent verification time (param=%s level=%d)", paramstr, level1);
+                    gribWarning("Inconsistent verification time!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 		    warn_time = FALSE;
 		  }
 	    }
@@ -695,9 +697,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
 
 	      if ( recID < nrecs )
 		{
-		  char paramstr[32];
-		  cdiParamToString(param, paramstr, sizeof(paramstr));
-		  Warning("Param=%s level=%d (record %d) already exist, skipped!", paramstr, level1, nrecs_scanned);
+		  gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 		  continue;
 		}
 	    }
@@ -707,8 +707,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
 	{
 	  if (  taxis->numavg && warn_numavg && (taxis->numavg != ISEC1_AvgNum) )
 	    {
-	      Warning("Changing numavg from %d to %d not supported!",
-		      taxis->numavg, ISEC1_AvgNum);
+	      Warning("Changing numavg from %d to %d not supported!", taxis->numavg, ISEC1_AvgNum);
 	      warn_numavg = FALSE;
 	    }
 	  else
@@ -720,7 +719,7 @@ int cgribexScanTimestep1(stream_t * streamptr)
       nrecs++;
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d  %8d %8d %6d", nrecs, (int)recpos, param, level1, vdate, vtime);
+	Message("Read record %2d (id=%s lev1=%d lev2=%d) %8d %6d", nrecs_scanned, paramstr, level1, level2, vdate, vtime);
 
       cgribexAddRecord(streamptr, param, isec1, isec2, fsec2, fsec3,
 		       isec4, recsize, recpos, datatype, comptype, lmv, iret);
@@ -816,6 +815,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
   int varID, gridID;
   size_t readsize;
   int nrecords, nrecs, recID, rindex;
+  int nrecs_scanned = 0;
   long recsize = 0;
   int warn_numavg = TRUE;
   int tsteptype;
@@ -824,6 +824,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
   int vlistID;
   long unzipsize;
   compvar_t compVar;
+  char paramstr[32];
 
   streamptr->curTsID = 1;
 
@@ -863,6 +864,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
       streamptr->tsteps[tsID].records[recID].size     =	streamptr->tsteps[0].records[recID].size;
     }
 
+  nrecs_scanned = nrecords;
   rindex = 0;
   while ( TRUE )
     {
@@ -898,7 +900,11 @@ int cgribexScanTimestep2(stream_t * streamptr)
       cgribexDecodeHeader(isec0, isec1, isec2, fsec2, isec3, fsec3, isec4, fsec4,
 			  (int *) gribbuffer, recsize, &lmv, &iret);
 
+      nrecs_scanned++;
+
       param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
+      cdiParamToString(param, paramstr, sizeof(paramstr));
+
       if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
       if ( ISEC1_LevelType ==  99 ) ISEC1_LevelType = 100;
       level1    = ISEC1_Level1;
@@ -934,8 +940,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
         	(taxis->numavg != ISEC1_AvgNum) )
 	    {
 	  /*
-	      Warning("Changing numavg from %d to %d not supported!",
-		      taxis->numavg, ISEC1_AvgNum);
+	      Warning("Changing numavg from %d to %d not supported!", taxis->numavg, ISEC1_AvgNum);
 	  */
 	      warn_numavg = FALSE;
 	    }
@@ -957,9 +962,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
 
       if ( recID == nrecords )
 	{
-	  char paramstr[32];
-	  cdiParamToString(param, paramstr, sizeof(paramstr));
-	  Warning("Param=%s level=%d not defined at timestep 1!", paramstr, level1);
+	  gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -979,12 +982,9 @@ int cgribexScanTimestep2(stream_t * streamptr)
 	{
 	  if ( streamptr->tsteps[tsID].records[recID].used )
 	    {
-	      char paramstr[32];
-	      cdiParamToString(param, paramstr, sizeof(paramstr));
-
 	      if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
-	      Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+              gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 	      continue;
 	    }
 	  else
@@ -995,7 +995,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
 	}
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d %8d %8d %6d", rindex+1, (int)recpos, param, level1, vdate, vtime);
+	Message("Read record %2d (id=%s lev1=%d lev2=%d) %8d %6d", nrecs_scanned, paramstr, level1, level2, vdate, vtime);
 
       streamptr->tsteps[tsID].records[recID].size = recsize;
 
@@ -1082,11 +1082,13 @@ int cgribexScanTimestep(stream_t * streamptr)
   taxis_t *taxis;
   int vlistID;
   int rindex, nrecs = 0;
+  int nrecs_scanned;
   long unzipsize;
   compvar_t compVar;
+  char paramstr[32];
 
   vlistID = streamptr->vlistID;
-
+  /*
   if ( CDI_Debug )
     {
       Message("streamID = %d", streamptr->self);
@@ -1094,7 +1096,7 @@ int cgribexScanTimestep(stream_t * streamptr)
       Message("rts = %d", streamptr->rtsteps);
       Message("nts = %d", streamptr->ntsteps);
     }
-
+  */
   isec0 = streamptr->record->sec0;
   isec1 = streamptr->record->sec1;
   isec2 = streamptr->record->sec2;
@@ -1122,6 +1124,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 
       fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
 
+      nrecs_scanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs*(tsID-1);
       rindex = 0;
       while ( TRUE )
 	{
@@ -1164,7 +1167,11 @@ int cgribexScanTimestep(stream_t * streamptr)
 	  cgribexDecodeHeader(isec0, isec1, isec2, fsec2, isec3, fsec3, isec4, fsec4,
 			      (int *) gribbuffer, recsize, &lmv, &iret);
 
+          nrecs_scanned++;
+
 	  param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
+          cdiParamToString(param, paramstr, sizeof(paramstr));
+
 	  if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
 	  if ( ISEC1_LevelType ==  99 ) ISEC1_LevelType = 100;
 	  level1   = ISEC1_Level1;
@@ -1201,8 +1208,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 		   (taxis->numavg != ISEC1_AvgNum) )
 		{
 	      /*
-	          Warning("Changing numavg from %d to %d not supported!",
-			  streamptr->tsteps[tsID].taxis.numavg, ISEC1_AvgNum);
+	          Warning("Changing numavg from %d to %d not supported!", streamptr->tsteps[tsID].taxis.numavg, ISEC1_AvgNum);
 	      */
 		  warn_numavg = FALSE;
 		}
@@ -1225,9 +1231,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 
 	  if ( vrecID == nrecs )
 	    {
-	      char paramstr[32];
-	      cdiParamToString(param, paramstr, sizeof(paramstr));
-	      Warning("Param=%s level=%d not available at timestep %d!", paramstr, level1, tsID+1);
+	      gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 
 	      if ( cdiInventoryMode == 1 )
 		return (CDI_EUFSTRUCT);
@@ -1250,7 +1254,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 		  if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
 		  if ( CDI_Debug )
-		    Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+                    gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, paramstr, level1, level2);
 
 		  continue;
 		}
@@ -1262,7 +1266,7 @@ int cgribexScanTimestep(stream_t * streamptr)
 	    }
 
 	  if ( CDI_Debug )
-	    Message("%4d %8d %4d %8d %8d %6d", rindex+1, (int)recpos, param, level1, vdate, vtime);
+            Message("Read record %2d (id=%s lev1=%d lev2=%d) %8d %6d", nrecs_scanned, paramstr, level1, level2, vdate, vtime);
 
 	  if ( cgribexVarCompare(compVar, streamptr->tsteps[tsID].records[recID]) != 0 )
 	    {
@@ -1276,9 +1280,6 @@ int cgribexScanTimestep(stream_t * streamptr)
 	  streamptr->tsteps[tsID].records[recID].position = recpos;
 	  streamptr->tsteps[tsID].records[recID].size = recsize;
 
-	  if ( CDI_Debug )
-	    Message("%4d %8d %4d %8d %8d %6d", rindex, (int)recpos, param, level1, vdate, vtime);
-
 	  rindex++;
 	}
 
@@ -1290,10 +1291,9 @@ int cgribexScanTimestep(stream_t * streamptr)
 
       if ( vrecID < nrecs )
 	{
-	  char paramstr[32];
 	  cdiParamToString(streamptr->tsteps[tsID].records[recID].param, paramstr, sizeof(paramstr));
-	  Warning("Param=%s level=%d not found at timestep %d!",
-		  paramstr, streamptr->tsteps[tsID].records[recID].ilevel, tsID+1);
+	  gribWarning("Paramameter not found!", nrecs_scanned, tsID+1, paramstr,
+                      streamptr->tsteps[tsID].records[recID].ilevel, streamptr->tsteps[tsID].records[recID].ilevel2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -1328,6 +1328,9 @@ int cgribexScanTimestep(stream_t * streamptr)
   return (rstatus);
 }
 
+#ifdef gribWarning
+#undef gribWarning
+#endif
 
 int cgribexDecode(unsigned char *gribbuffer, int gribsize, double *data, int gridsize,
 		  int unreduced, int *nmiss, int *zip, double missval)
@@ -1454,6 +1457,7 @@ static
 void cgribexDefParam(int *isec1, int param)
 {
   int pdis, pcat, pnum;
+  static bool lwarn_pdis = true, lwarn_pnum = true;
 
   cdiDecodeParam(param, &pnum, &pcat, &pdis);
 
@@ -1463,7 +1467,21 @@ void cgribexDefParam(int *isec1, int param)
     {
       char paramstr[32];
       cdiParamToString(param, paramstr, sizeof(paramstr));
-      Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
+      if ( lwarn_pdis )
+        {
+          Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
+          lwarn_pdis = false;
+        }
+    }
+
+  if ( pnum > 255 )
+    {
+      if ( lwarn_pnum )
+        {
+          Warning("Parameter number %d out of bounds (1-255), set to %d!", pnum, pnum%256);
+          lwarn_pnum = false;
+          pnum = pnum%256;
+        }
     }
 
   ISEC1_CodeTable = pcat;
@@ -1753,19 +1771,19 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
 
 	ISEC2_NumLon   = nlon;
 	ISEC2_NumLat   = nlat;
-	ISEC2_FirstLat = NINT(yfirst*1000);
-	ISEC2_LastLat  = NINT(ylast*1000);
+	ISEC2_FirstLat = lround(yfirst*1000);
+	ISEC2_LastLat  = lround(ylast*1000);
 	if ( gridtype == GRID_GAUSSIAN_REDUCED )
 	  {
 	    ISEC2_FirstLon = 0;
-	    ISEC2_LastLon  = NINT(1000*(360.-360./(nlat*2)));
-	    ISEC2_LonIncr  = NINT(1000*360./(nlat*2));
+	    ISEC2_LastLon  = lround(1000*(360.-360./(nlat*2)));
+	    ISEC2_LonIncr  = lround(1000*360./(nlat*2));
 	  }
 	else
 	  {
-	    ISEC2_FirstLon = NINT(xfirst*1000);
-	    ISEC2_LastLon  = NINT(xlast*1000);
-	    ISEC2_LonIncr  = NINT(xinc*1000);
+	    ISEC2_FirstLon = lround(xfirst*1000);
+	    ISEC2_LastLon  = lround(xlast*1000);
+	    ISEC2_LonIncr  = lround(xinc*1000);
 	  }
 
 	// if ( fabs(xinc*1000 - ISEC2_LonIncr) > FLT_EPSILON ) ISEC2_LonIncr = 0;
@@ -1778,7 +1796,7 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
           }
 	else
 	  {
-	    ISEC2_LatIncr = NINT(yinc*1000);
+	    ISEC2_LatIncr = lround(yinc*1000);
 	    // if ( fabs(yinc*1000 - ISEC2_LatIncr) > FLT_EPSILON ) ISEC2_LatIncr = 0;
 
 	    if ( ISEC2_LatIncr < 0 ) ISEC2_LatIncr = -ISEC2_LatIncr;
@@ -1797,8 +1815,8 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
 
 	if ( gridIsRotated(gridID) )
 	  {
-	    ISEC2_LatSP = - NINT(gridInqYpole(gridID) * 1000);
-	    ISEC2_LonSP =   NINT((gridInqXpole(gridID) + 180) * 1000);
+	    ISEC2_LatSP = - lround(gridInqYpole(gridID) * 1000);
+	    ISEC2_LonSP =   lround((gridInqXpole(gridID) + 180) * 1000);
 	  }
 
 	/* East -> West */
@@ -1824,13 +1842,13 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
 	ISEC2_GridType = GRIB1_GTYPE_LCC;
 	ISEC2_NumLon   = xsize;
 	ISEC2_NumLat   = ysize;
-	ISEC2_FirstLon = NINT(originLon * 1000);
-	ISEC2_FirstLat = NINT(originLat * 1000);
-	ISEC2_Lambert_Lov    = NINT(lonParY * 1000);
-	ISEC2_Lambert_LatS1  = NINT(lat1 * 1000);
-	ISEC2_Lambert_LatS2  = NINT(lat2 * 1000);
-	ISEC2_Lambert_dx     = NINT(xincm);
-	ISEC2_Lambert_dy     = NINT(yincm);
+	ISEC2_FirstLon = lround(originLon * 1000);
+	ISEC2_FirstLat = lround(originLat * 1000);
+	ISEC2_Lambert_Lov    = lround(lonParY * 1000);
+	ISEC2_Lambert_LatS1  = lround(lat1 * 1000);
+	ISEC2_Lambert_LatS2  = lround(lat2 * 1000);
+	ISEC2_Lambert_dx     = lround(xincm);
+	ISEC2_Lambert_dy     = lround(yincm);
 	ISEC2_Lambert_LatSP  = 0;
 	ISEC2_Lambert_LatSP  = 0;
 	ISEC2_Lambert_ProjFlag = projflag;
diff --git a/libcdi/src/stream_ext.c b/libcdi/src/stream_ext.c
index 289aa44..02a55b6 100644
--- a/libcdi/src/stream_ext.c
+++ b/libcdi/src/stream_ext.c
@@ -78,11 +78,10 @@ int extInqRecord(stream_t *streamptr, int *varID, int *levelID)
   int zaxisID = -1;
   int header[4];
   int vlistID;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  extp    = streamptr->record->extp;
 
   *varID   = -1;
   *levelID = -1;
@@ -117,7 +116,7 @@ int extReadRecord(stream_t *streamptr, double *data, int *nmiss)
   int varID, gridID;
   int i, size;
   double missval;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -126,7 +125,6 @@ int extReadRecord(stream_t *streamptr, double *data, int *nmiss)
   recID   = streamptr->tsteps[tsID].recIDs[vrecID];
   recpos  = streamptr->tsteps[tsID].records[recID].position;
   varID   = streamptr->tsteps[tsID].records[recID].varID;
-  extp    = streamptr->record->extp;
 
   fileSetPos(fileID, recpos, SEEK_SET);
 
@@ -204,10 +202,9 @@ int extDefRecord(stream_t *streamptr)
   int header[4];
   int status = 0;
   int pdis, pcat, pnum;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   gridID   = streamptr->record->gridID;
-  extp     = streamptr->record->extp;
 
   cdiDecodeParam(streamptr->record->param, &pnum, &pcat, &pdis);
   header[0] = streamptr->record->date;
@@ -225,12 +222,9 @@ int extDefRecord(stream_t *streamptr)
 
 int extWriteRecord(stream_t *streamptr, const double *data)
 {
-  int fileID;
   int status = 0;
-  extrec_t *extp;
-
-  fileID = streamptr->fileID;
-  extp   = streamptr->record->extp;
+  int fileID = streamptr->fileID;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   extDefDataDP(extp, data);
 
@@ -276,7 +270,7 @@ void extAddRecord(stream_t *streamptr, int param, int level, int xysize,
   leveltype = ZAXIS_GENERIC;
 
   varAddRecord(recID, param, gridID, leveltype, 0, level, 0, 0, 0,
-	       extInqDatatype(prec, number), &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL);
+	       extInqDatatype(prec, number), &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -335,11 +329,10 @@ void extScanTimestep1(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   extcompvar_t compVar, compVar0;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 0;
 
-  extp  = streamptr->record->extp;
   tsID  = tstepsNewEntry(streamptr);
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -469,13 +462,12 @@ int extScanTimestep2(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   extcompvar_t compVar, compVar0;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 1;
 
   fileID  = streamptr->fileID;
   vlistID = streamptr->vlistID;
-  extp    = streamptr->record->extp;
 
   tsID = streamptr->rtsteps;
   if ( tsID != 1 )
@@ -645,7 +637,7 @@ int extScanTimestep(stream_t *streamptr)
   taxis_t *taxis;
   int rindex, nrecs = 0;
   extcompvar_t compVar, compVar0;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     {
@@ -658,7 +650,6 @@ int extScanTimestep(stream_t *streamptr)
   if ( streamptr->rtsteps == 0 )
     Error("Internal problem! Missing contents.");
 
-  extp  = streamptr->record->extp;
   tsID  = streamptr->rtsteps;
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -796,9 +787,8 @@ void extReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int recID;
   int i;
   double missval;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -855,9 +845,8 @@ void extReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
   int recID;
   int i;
   double missval;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -913,11 +902,10 @@ void extWriteVarDP(stream_t *streamptr, int varID, const double *data)
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug ) Message("streamID = %d  varID = %d", streamptr->self, varID);
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
@@ -959,9 +947,8 @@ void extWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  extrec_t *extp;
+  extrec_t *extp = (extrec_t*) streamptr->record->exsep;
 
-  extp     = streamptr->record->extp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
diff --git a/libcdi/src/stream_grb.c b/libcdi/src/stream_grb.c
index 5af130d..76e24a6 100644
--- a/libcdi/src/stream_grb.c
+++ b/libcdi/src/stream_grb.c
@@ -620,7 +620,7 @@ int grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype
     }
 
   nbytes = grbEncode(filetype, varID, levelID, vlistID, gridID, zaxisID, date, time, tsteptype, numavg, 
-		     datasize, data, nmiss, &gribbuffer, ljpeg, gc);
+		     datasize, (const double*) data, nmiss, &gribbuffer, ljpeg, gc);
 
   if ( streamptr->comptype == COMPRESS_SZIP )
     nbytes = grbSzip(filetype, gribbuffer, nbytes);
diff --git a/libcdi/src/stream_gribapi.c b/libcdi/src/stream_gribapi.c
index 8065d70..af78517 100644
--- a/libcdi/src/stream_gribapi.c
+++ b/libcdi/src/stream_gribapi.c
@@ -21,8 +21,6 @@
 #  include "grib_api.h"
 #endif
 
-#define  NINT(x)  ((x) < 0 ? (int)((x)-.5) : (int)((x)+.5))
-
 extern int cdiInventoryMode;
 
 typedef struct {
@@ -36,6 +34,33 @@ typedef struct {
 
 #if  defined  (HAVE_LIBGRIB_API)
 static
+int my_grib_set_double(grib_handle* h, const char* key, double val)
+{
+  if ( cdiGribApiDebug )
+    fprintf(stderr, "grib_set_double(\tgrib_handle* h, \"%s\", %f)\n", key, val);
+
+  return grib_set_double(h, key, val);
+}
+
+static
+int my_grib_set_long(grib_handle* h, const char* key, long val)
+{
+  if ( cdiGribApiDebug )
+    fprintf(stderr, "grib_set_long(  \tgrib_handle* h, \"%s\", %ld)\n", key, val);
+
+  return grib_set_long(h, key, val);
+}
+
+static
+int my_grib_set_string(grib_handle* h, const char* key, const char* val, size_t* length)
+{
+  if ( cdiGribApiDebug )
+    fprintf(stderr, "grib_set_string(\tgrib_handle* h, \"%s\", \"%s\")\n", key, val);
+
+  return grib_set_string(h, key, val, length);
+}
+
+static
 int gribapiGetGridType(grib_handle *gh)
 {
   int gridtype = GRID_GENERIC;
@@ -150,37 +175,15 @@ double timeunit_factor(int tu1, int tu2)
 static
 int gribapiGetTimeUnits(grib_handle *gh)
 {
+  int status;
   int timeunits = -1;
   long unitsOfTime = -1;
-  int status;
-  // size_t len = 8;
-  //char stepunits[8];
-  //static int lprint = TRUE;
 
   status = grib_get_long(gh, "indicatorOfUnitOfTimeRange", &unitsOfTime);
 
-  timeunits = getTimeunits(unitsOfTime);
-
-  /*
-  GRIB_CHECK(grib_get_string(gh, "stepUnits", stepunits, &len), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "stepUnits", unitsOfTime), 0);
 
-  len--;
-
-  if      ( memcmp(stepunits, "s",   len) == 0 ) timeunits = TUNIT_SECOND;
-  else if ( memcmp(stepunits, "m",   len) == 0 ) timeunits = TUNIT_MINUTE;
-  else if ( memcmp(stepunits, "h",   len) == 0 ) timeunits = TUNIT_HOUR;
-  else if ( memcmp(stepunits, "3h",  len) == 0 ) timeunits = TUNIT_3HOURS;
-  else if ( memcmp(stepunits, "6h",  len) == 0 ) timeunits = TUNIT_6HOURS;
-  else if ( memcmp(stepunits, "12h", len) == 0 ) timeunits = TUNIT_12HOURS;
-  else if ( memcmp(stepunits, "D",   len) == 0 ) timeunits = TUNIT_DAY;
-  else if ( memcmp(stepunits, "M",   len) == 0 ) timeunits = TUNIT_MONTH;
-  else if ( memcmp(stepunits, "Y",   len) == 0 ) timeunits = TUNIT_YEAR;
-  else if ( lprint )
-    {
-      Message("Step units >%s< unsupported!", stepunits);
-      lprint = FALSE;
-    }
-  */
+  timeunits = getTimeunits(unitsOfTime);
 
   return (timeunits);
 }
@@ -279,8 +282,8 @@ void gribapiGetDataDateTime(grib_handle *gh, int *datadate, int *datatime)
 static
 void gribapiSetDataDateTime(grib_handle *gh, int datadate, int datatime)
 {
-  GRIB_CHECK(grib_set_long(gh, "dataDate", datadate), 0);
-  GRIB_CHECK(grib_set_long(gh, "dataTime", datatime/100), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "dataDate", datadate), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "dataTime", datatime/100), 0);
 }
 
 static
@@ -538,33 +541,43 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
 	  }
 	break;
       }
-      /*
     case GRID_LCC:
       {
-	if ( ISEC4_NumValues != ISEC2_NumLon*ISEC2_NumLat )
-	  Error("numberOfPoints (%d) and gridSize (%d) differ!",
-		ISEC4_NumValues, ISEC2_NumLon*ISEC2_NumLat);
-
-	grid->size  = ISEC4_NumValues;
-	grid->xsize = ISEC2_NumLon;
-	grid->ysize = ISEC2_NumLat;
-
-	grid->lcc_xinc      = ISEC2_Lambert_dx;
-	grid->lcc_yinc      = ISEC2_Lambert_dy;
-	grid->lcc_originLon = ISEC2_FirstLon * 0.001;
-	grid->lcc_originLat = ISEC2_FirstLat * 0.001;
-	grid->lcc_lonParY   = ISEC2_Lambert_Lov * 0.001;
-	grid->lcc_lat1      = ISEC2_Lambert_LatS1 * 0.001;
-	grid->lcc_lat2      = ISEC2_Lambert_LatS2 * 0.001;
-	grid->lcc_projflag  = ISEC2_Lambert_ProjFlag;
-	grid->lcc_scanflag  = ISEC2_ScanFlag;
+	int nlon, nlat;
+
+	GRIB_CHECK(grib_get_long(gh, "Nx", &lpar), 0);
+	nlon = lpar;
+	GRIB_CHECK(grib_get_long(gh, "Ny", &lpar), 0);
+	nlat = lpar;
+
+	if ( numberOfPoints != nlon*nlat )
+	  Error("numberOfPoints (%d) and gridSize (%d) differ!", (int)numberOfPoints, nlon*nlat);
+
+	grid->size  = numberOfPoints;
+	grid->xsize = nlon;
+	grid->ysize = nlat;
+
+	GRIB_CHECK(grib_get_double(gh, "DxInMetres", &grid->lcc_xinc), 0);
+	GRIB_CHECK(grib_get_double(gh, "DyInMetres", &grid->lcc_yinc), 0);
+	GRIB_CHECK(grib_get_double(gh, "longitudeOfFirstGridPointInDegrees", &grid->lcc_originLon), 0);
+	GRIB_CHECK(grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &grid->lcc_originLat), 0);
+	GRIB_CHECK(grib_get_double(gh, "LoVInDegrees", &grid->lcc_lonParY), 0);
+	GRIB_CHECK(grib_get_double(gh, "Latin1InDegrees", &grid->lcc_lat1), 0);
+	GRIB_CHECK(grib_get_double(gh, "Latin2InDegrees", &grid->lcc_lat2), 0);
+
+        if ( editionNumber <= 1 )
+          {
+            GRIB_CHECK(grib_get_long(gh, "projectionCenterFlag", &lpar), 0);
+            grid->lcc_projflag  = (int) lpar;
+            GRIB_CHECK(grib_get_long(gh, "scanningMode", &lpar), 0);
+            grid->lcc_scanflag  = (int) lpar;
+          }
 
 	grid->xdef   = 0;
 	grid->ydef   = 0;
 
 	break;
       }
-      */
     case GRID_SPECTRAL:
       {
 	size_t len = 256;
@@ -717,6 +730,11 @@ double grib2ScaleFactor(long factor)
   else if ( factor == 2 ) scaleFactor =    0.01;
   else if ( factor == 3 ) scaleFactor =    0.001;
   else if ( factor == 4 ) scaleFactor =    0.0001;
+  else if ( factor == 5 ) scaleFactor =    0.00001;
+  else if ( factor == 6 ) scaleFactor =    0.000001;
+  else if ( factor == 7 ) scaleFactor =    0.0000001;
+  else if ( factor == 8 ) scaleFactor =    0.00000001;
+  else if ( factor == 9 ) scaleFactor =    0.000000001;
 
   return (scaleFactor);
 }
@@ -760,6 +778,11 @@ void grib2GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, i
           *level_sf = 1000;
           *level_unit = CDI_UNIT_PA;
         }
+      else if ( *leveltype == GRIB2_LTYPE_SIGMA )
+        {
+          *level_sf = 1000;
+          *level_unit = 0;
+        }
 
       GRIB_CHECK(grib_get_long(gh, "scaleFactorOfFirstFixedSurface", &factor), 0);
       GRIB_CHECK(grib_get_long(gh, "scaledValueOfFirstFixedSurface", &llevel), 0);
@@ -821,7 +844,7 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
   int vlistID;
   long lpar;
   int status;
-  char longname[256], units[256];
+  char stdname[CDI_MAX_NAME], longname[CDI_MAX_NAME], units[CDI_MAX_NAME];
   size_t vlen;
   long ens_index = 0, ens_count = 0, ens_forecast_type = 0;
 
@@ -900,21 +923,29 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
   // if ( datatype > 32 ) datatype = DATATYPE_PACK32;
   if ( datatype <  0 ) datatype = DATATYPE_PACK;
 
+  stdname[0] = 0;
   longname[0] = 0;
   units[0] = 0;
 
   if ( varname[0] != 0 )
     {
-      vlen = 256;
+      vlen = CDI_MAX_NAME;
       gribapiGetString(gh, "name", longname, vlen);
-      vlen = 256;
+      vlen = CDI_MAX_NAME;
       gribapiGetString(gh, "units", units, vlen);
+
+      {
+        vlen = CDI_MAX_NAME;
+        status = grib_get_string(gh, "cfName", stdname, &vlen);
+        if ( status != 0 || vlen <= 1 ) stdname[0] = 0;
+        else if ( strncmp(stdname, "unknown", 7) == 0 ) stdname[0] = 0;
+      }
     }
   // fprintf(stderr, "param %d name %s %s %s\n", param, name, longname, units);
 
   varAddRecord(recID, param, gridID, zaxistype, lbounds, level1, level2, level_sf, level_unit,
 	       datatype, &varID, &levelID, tsteptype, numavg, leveltype,
-	       varname, longname, units);
+	       varname, stdname, longname, units);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -1075,6 +1106,9 @@ int gribapiVarCompare(compvar2_t compVar, record_t record)
 }
 #endif
 
+#define gribWarning(text, nrecs, timestep, varname, paramstr, level1, level2) \
+            Warning("Record %2d (name=%s id=%s lev1=%d lev2=%d) timestep %d: %s", nrecs, varname, paramstr, level1, level2, timestep, text)
+
 int gribapiScanTimestep1(stream_t * streamptr)
 {
 #if  defined  (HAVE_LIBGRIB_API)
@@ -1093,7 +1127,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
   int varID;
   size_t readsize;
   int nrecords, nrecs, recID;
-  int nrecs_scanned;
+  int nrecs_scanned = 0;
   int datatype;
   long recsize = 0;
   int warn_time = TRUE;
@@ -1127,7 +1161,6 @@ int gribapiScanTimestep1(stream_t * streamptr)
 
   fileID = streamptr->fileID;
 
-  nrecs_scanned = 0;
   nrecs = 0;
   while ( TRUE )
     {
@@ -1167,7 +1200,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
 
       nrecs_scanned++;
       gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-      GRIB_CHECK(grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
+      GRIB_CHECK(my_grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
 
       GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -1270,7 +1303,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
                       }
                     else
                       {
-                        Warning("Inconsistent verification time (param=%s level=%d)", paramstr, level1);
+                        gribWarning("Inconsistent verification time!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
                         warn_time = FALSE;
                       }
                   }
@@ -1281,7 +1314,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
 
 	      if ( recID < nrecs )
 		{
-		  Warning("Param=%s level=%d (record %d) already exist, skipped!", paramstr, level1, nrecs_scanned);
+		  gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 		  continue;
 		}
 	    }
@@ -1304,7 +1337,8 @@ int gribapiScanTimestep1(stream_t * streamptr)
       nrecs++;
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d  %8d %8d %6d", nrecs, (int)recpos, param, level1, vdate, vtime);
+	Message("%4d %8d name=%s id=%s ltype=%d lev1=%d lev2=%d vdate=%d vtime=%d",
+                nrecs, (int)recpos, varname, paramstr, leveltype, level1, level2, vdate, vtime);
 
       gribapiAddRecord(streamptr, param, gh, recsize, recpos, datatype, comptype, len, varname,
                        leveltype, lbounds, level1, level2, level_sf, level_unit);
@@ -1402,6 +1436,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
   // int gridID;
   size_t readsize;
   int nrecords, nrecs, recID, rindex;
+  int nrecs_scanned = 0;
   long recsize = 0;
   //  int warn_numavg = TRUE;
   int tsteptype;
@@ -1452,6 +1487,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
       streamptr->tsteps[tsID].records[recID].size     = streamptr->tsteps[0].records[recID].size;
     }
 
+  nrecs_scanned = nrecords;
   rindex = 0;
   while ( TRUE )
     {
@@ -1484,8 +1520,9 @@ int gribapiScanTimestep2(stream_t * streamptr)
 	    }
 	}
 
+      nrecs_scanned++;
       gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-      GRIB_CHECK(grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
+      GRIB_CHECK(my_grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
 
       GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -1562,7 +1599,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
 
       if ( recID == nrecords )
 	{
-	  Warning("Param=%s (%s) l1=%d l2=%d not defined at timestep 1!", paramstr, varname, level1, level2);
+	  gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -1573,7 +1610,7 @@ int gribapiScanTimestep2(stream_t * streamptr)
 	    {
 	      if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
-	      Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+              gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 	      continue;
 	    }
 	}
@@ -1582,7 +1619,8 @@ int gribapiScanTimestep2(stream_t * streamptr)
       streamptr->tsteps[tsID].recIDs[rindex] = recID;
 
       if ( CDI_Debug )
-	Message("%4d %8d %4d %8d %8d %6d", rindex+1, (int)recpos, param, level1, vdate, vtime);
+	Message("%4d %8d name=%s id=%s ltype=%d lev1=%d lev2=%d vdate=%d vtime=%d",
+                nrecs_scanned, (int)recpos, varname, paramstr, leveltype, level1, level2, vdate, vtime);
 
       streamptr->tsteps[tsID].records[recID].size = recsize;
 
@@ -1672,6 +1710,7 @@ int gribapiScanTimestep(stream_t * streamptr)
   taxis_t *taxis;
   int vlistID;
   int rindex, nrecs = 0;
+  int nrecs_scanned;
   long unzipsize;
   compvar2_t compVar;
   grib_handle *gh = NULL;
@@ -1715,6 +1754,7 @@ int gribapiScanTimestep(stream_t * streamptr)
 
       fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
 
+      nrecs_scanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs*(tsID-1);
       rindex = 0;
       while ( TRUE )
 	{
@@ -1755,8 +1795,9 @@ int gribapiScanTimestep(stream_t * streamptr)
 		}
 	    }
 
+          nrecs_scanned++;
 	  gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-	  GRIB_CHECK(grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
+	  GRIB_CHECK(my_grib_set_double(gh, "missingValue", cdiDefaultMissval), 0);
 
 	  GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -1837,7 +1878,7 @@ int gribapiScanTimestep(stream_t * streamptr)
 
 	  if ( vrecID == nrecs )
 	    {
-	      Warning("Param=%s level=%d not available at timestep %d!", paramstr, level1, tsID+1);
+	      gribWarning("Parameter not defined at timestep 1!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 
 	      if ( cdiInventoryMode == 1 )
 		return (CDI_EUFSTRUCT);
@@ -1852,7 +1893,7 @@ int gribapiScanTimestep(stream_t * streamptr)
 		  if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) != 0 ) break;
 
 		  if ( CDI_Debug )
-		    Warning("Param=%s level=%d already exist, skipped!", paramstr, level1);
+                    gribWarning("Parameter already exist, skipped!", nrecs_scanned, tsID+1, varname, paramstr, level1, level2);
 
 		  continue;
 		}
@@ -1896,8 +1937,8 @@ int gribapiScanTimestep(stream_t * streamptr)
       if ( vrecID < nrecs )
 	{
 	  cdiParamToString(streamptr->tsteps[tsID].records[recID].param, paramstr, sizeof(paramstr));
-	  Warning("Param %d level %d not found at timestep %d!",
-		  paramstr, streamptr->tsteps[tsID].records[recID].ilevel, tsID+1);
+	  gribWarning("Paramameter not found!", nrecs_scanned, tsID+1, varname, paramstr,
+                      streamptr->tsteps[tsID].records[recID].ilevel, streamptr->tsteps[tsID].records[recID].ilevel2);
 	  return (CDI_EUFSTRUCT);
 	}
 
@@ -1934,6 +1975,9 @@ int gribapiScanTimestep(stream_t * streamptr)
   return (rstatus);
 }
 
+#ifdef gribWarning
+#undef gribWarning
+#endif
 
 int gribapiDecode(unsigned char *gribbuffer, int gribsize, double *data, int gridsize,
 		  int unreduced, int *nmiss, int *zip, double missval, int vlistID, int varID)
@@ -1958,7 +2002,7 @@ int gribapiDecode(unsigned char *gribbuffer, int gribsize, double *data, int gri
 
   recsize = gribsize;
   gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
-  GRIB_CHECK(grib_set_double(gh, "missingValue", missval), 0);
+  GRIB_CHECK(my_grib_set_double(gh, "missingValue", missval), 0);
 
   GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
@@ -2017,9 +2061,9 @@ void gribapiDefInstitut(grib_handle *gh, int vlistID, int varID)
       GRIB_CHECK(grib_get_long(gh, "subCentre", &subcenter0), 0);
 
       if ( center != center0 )
-	GRIB_CHECK(grib_set_long(gh, "centre", center), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "centre", center), 0);
       if ( subcenter != subcenter0 )
-	GRIB_CHECK(grib_set_long(gh, "subCentre", subcenter), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "subCentre", subcenter), 0);
     }
 }
 
@@ -2034,7 +2078,7 @@ void gribapiDefModel(grib_handle *gh, int vlistID, int varID)
     modelID = vlistInqVarModel(vlistID, varID);
 
   if ( modelID != CDI_UNDEFID )
-    GRIB_CHECK(grib_set_long(gh, "generatingProcessIdentifier", modelInqGribID(modelID)), 0);
+    GRIB_CHECK(my_grib_set_long(gh, "generatingProcessIdentifier", modelInqGribID(modelID)), 0);
 }
 
 static
@@ -2049,7 +2093,7 @@ void gribapiDefParam(int editionNumber, grib_handle *gh, int param, const char *
       size_t len;
       int status;
       len = strlen(name);
-      status = grib_set_string(gh, "shortName", name, &len);
+      status = my_grib_set_string(gh, "shortName", name, &len);
       if ( status != 0 )
 	Warning("grib_api: No match for shortName=%s", name);
     }
@@ -2066,14 +2110,14 @@ void gribapiDefParam(int editionNumber, grib_handle *gh, int param, const char *
 	      Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
 	    }
 
-	  GRIB_CHECK(grib_set_long(gh, "table2Version",        pcat), 0);
-	  GRIB_CHECK(grib_set_long(gh, "indicatorOfParameter", pnum), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "table2Version",        pcat), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "indicatorOfParameter", pnum), 0);
 	}
       else
 	{
-	  GRIB_CHECK(grib_set_long(gh, "discipline",        pdis), 0);
-	  GRIB_CHECK(grib_set_long(gh, "parameterCategory", pcat), 0);
-	  GRIB_CHECK(grib_set_long(gh, "parameterNumber",   pnum), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "discipline",        pdis), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "parameterCategory", pcat), 0);
+	  GRIB_CHECK(my_grib_set_long(gh, "parameterNumber",   pnum), 0);
 	}
     }
 
@@ -2081,33 +2125,47 @@ void gribapiDefParam(int editionNumber, grib_handle *gh, int param, const char *
 }
 
 static
-int gribapiDefStepUnits(grib_handle *gh, int timeunit, int gcinit)
+int getTimeunitFactor(int timeunit)
 {
   int factor = 1;
+
+  switch (timeunit)
+    {
+    case TUNIT_SECOND:  factor =     1;  break;
+    case TUNIT_MINUTE:  factor =    60;  break;
+    case TUNIT_HOUR:    factor =  3600;  break;
+    case TUNIT_3HOURS:  factor = 10800;  break;
+    case TUNIT_6HOURS:  factor = 21600;  break;
+    case TUNIT_12HOURS: factor = 43200;  break;
+    case TUNIT_DAY:     factor = 86400;  break;
+    default:            factor =  3600;  break;
+    }
+
+  return (factor);
+}
+
+static
+void gribapiDefStepUnits(grib_handle *gh, int timeunit, int gcinit)
+{
   long unitsOfTime;
-  char stepunits[8];
-  size_t len;
 
   switch (timeunit)
     {
-    case TUNIT_SECOND:  factor =     1;  unitsOfTime = 13;  strcpy(stepunits, "s");   break;
-    case TUNIT_MINUTE:  factor =    60;  unitsOfTime =  0;  strcpy(stepunits, "m");   break;
-    case TUNIT_HOUR:    factor =  3600;  unitsOfTime =  1;  strcpy(stepunits, "h");   break;
-    case TUNIT_3HOURS:  factor = 10800;  unitsOfTime = 10;  strcpy(stepunits, "3h");  break;
-    case TUNIT_6HOURS:  factor = 21600;  unitsOfTime = 11;  strcpy(stepunits, "6h");  break;
-    case TUNIT_12HOURS: factor = 43200;  unitsOfTime = 12;  strcpy(stepunits, "12h"); break;
-    case TUNIT_DAY:     factor = 86400;  unitsOfTime =  2;  strcpy(stepunits, "D");   break;
-    default:            factor =  3600;  unitsOfTime =  1;  strcpy(stepunits, "h");   break;
+    case TUNIT_SECOND:  unitsOfTime = 13;  break;
+    case TUNIT_MINUTE:  unitsOfTime =  0;  break;
+    case TUNIT_HOUR:    unitsOfTime =  1;  break;
+    case TUNIT_3HOURS:  unitsOfTime = 10;  break;
+    case TUNIT_6HOURS:  unitsOfTime = 11;  break;
+    case TUNIT_12HOURS: unitsOfTime = 12;  break;
+    case TUNIT_DAY:     unitsOfTime =  2;  break;
+    default:            unitsOfTime =  1;  break;
     }
 
   if ( !gcinit )
     {
-      len = strlen(stepunits) + 1;
-      GRIB_CHECK(grib_set_long(gh, "indicatorOfUnitOfTimeRange", unitsOfTime), 0);
-      GRIB_CHECK(grib_set_string(gh, "stepUnits", stepunits, &len), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "stepUnits", unitsOfTime), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "indicatorOfUnitOfTimeRange", unitsOfTime), 0);
     }
-
-  return (factor);
 }
 
 static
@@ -2115,7 +2173,7 @@ int gribapiDefSteptype(int editionNumber, grib_handle *gh, int tsteptype, int gc
 {
   long proDefTempNum = 0;
   size_t len = 64;
-  char stepType[64];
+  char stepType[len];
 
   switch ( tsteptype )
     {
@@ -2134,9 +2192,9 @@ int gribapiDefSteptype(int editionNumber, grib_handle *gh, int tsteptype, int gc
 
   if ( !gcinit )
     {
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "productDefinitionTemplateNumber", proDefTempNum), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "productDefinitionTemplateNumber", proDefTempNum), 0);
       len = strlen(stepType);
-      GRIB_CHECK(grib_set_string(gh, "stepType", stepType, &len), 0);
+      GRIB_CHECK(my_grib_set_string(gh, "stepType", stepType, &len), 0);
     }
 
   return ((int)proDefTempNum);
@@ -2145,53 +2203,59 @@ int gribapiDefSteptype(int editionNumber, grib_handle *gh, int tsteptype, int gc
 static
 void gribapiDefDateTimeAbs(int editionNumber, grib_handle *gh, int date, int time, int tsteptype, int gcinit)
 {
-  if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "significanceOfReferenceTime", 0), 0);
-  if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "stepRange", 0), 0);
+  (void ) gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
+
+  if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "significanceOfReferenceTime", 0), 0);
+  if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "stepRange", 0), 0);
 
   if ( date == 0 ) date = 10101;
   gribapiSetDataDateTime(gh, date, time);
-
-  (void ) gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
 }
 
 static
 int gribapiDefDateTimeRel(int editionNumber, grib_handle *gh, int rdate, int rtime, int vdate, int vtime,
-                          int tsteptype, int factor, int calendar, int gcinit)
+                          int tsteptype, int timeunit, int calendar, int gcinit)
 {
   int status = -1;
   int year, month, day, hour, minute, second;
   int julday1, secofday1, julday2, secofday2, days, secs;
+  int factor;
   long startStep = 0, endStep;
-  long proDefTempNum = 0;
 
   cdiDecodeDate(rdate, &year, &month, &day);
   cdiDecodeTime(rtime, &hour, &minute, &second);
   encode_juldaysec(calendar, year, month, day, hour, minute, second, &julday1, &secofday1);
 
+  if ( vdate == 0 && vtime == 0 ) { vdate = rdate; vtime = rtime; }
+
   cdiDecodeDate(vdate, &year, &month, &day);
   cdiDecodeTime(vtime, &hour, &minute, &second);
   encode_juldaysec(calendar, year, month, day, hour, minute, second, &julday2, &secofday2);
 
   (void) julday_sub(julday1, secofday1, julday2, secofday2, &days, &secs);
 
+  factor = getTimeunitFactor(timeunit);
+
   if ( !(int) fmod(days*86400.0 + secs, factor) )
     {
+      int proDefTempNum = gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
+
+      gribapiDefStepUnits(gh, timeunit, gcinit);
+
       endStep = (int) ((days*86400.0 + secs)/factor);
 
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "significanceOfReferenceTime", 1), 0);
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "stepRange", 0), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "significanceOfReferenceTime", 1), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "stepRange", 0), 0);
 
       if ( rdate == 0 ) rdate = 10101;
       gribapiSetDataDateTime(gh, rdate, rtime);
 
       // printf(">>>>> tsteptype %d  startStep %ld  endStep %ld\n", tsteptype, startStep, endStep);
 
-      proDefTempNum = gribapiDefSteptype(editionNumber, gh, tsteptype, gcinit);
-
       if ( proDefTempNum == 0 ) startStep = endStep;
 
-      if ( editionNumber > 1 ) GRIB_CHECK(grib_set_long(gh, "forecastTime", startStep), 0);
-      GRIB_CHECK(grib_set_long(gh, "endStep", endStep), 0);
+      if ( editionNumber > 1 ) GRIB_CHECK(my_grib_set_long(gh, "forecastTime", startStep), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "endStep", endStep), 0);
 
       status = 0;
     }
@@ -2225,10 +2289,9 @@ void gribapiDefTime(int editionNumber, int typeOfGeneratingProcess, grib_handle
       int rdate    = taxisInqRdate(taxisID);
       int rtime    = taxisInqRtime(taxisID);
       int timeunit = taxisInqTunit(taxisID);
-      int factor   = gribapiDefStepUnits(gh, timeunit, gcinit);
 
       status = gribapiDefDateTimeRel(editionNumber, gh, rdate, rtime, vdate, vtime,
-                                     tsteptype, factor, calendar, gcinit);
+                                     tsteptype, timeunit, calendar, gcinit);
 
       if ( status != 0 ) taxistype = TAXIS_ABSOLUTE;
     }
@@ -2304,12 +2367,12 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
           if ( ljpeg )
             {
               mesg = "grid_jpeg"; len = strlen(mesg);
-              GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+              GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
             }
           else
             {
               mesg = "grid_simple"; len = strlen(mesg);
-              GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+              GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
             }
         }
     }
@@ -2331,22 +2394,22 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	if ( gridtype == GRID_GAUSSIAN )
 	  {
 	    mesg = "regular_gg"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 	else if ( gridtype == GRID_GAUSSIAN_REDUCED )
 	  {
 	    mesg = "reduced_gg"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 	else if ( gridtype == GRID_LONLAT && gridIsRotated(gridID) )
 	  {
 	    mesg = "rotated_ll"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 	else
 	  {
 	    mesg = "regular_ll"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 	  }
 
 	nlon = gridInqXsize(gridID);
@@ -2364,7 +2427,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	    gridInqRowlon(gridID, rowlon);
 	    for ( i = 0; i < nlat; ++i ) pl[i] = rowlon[i];
 
-	    // GRIB_CHECK(grib_set_long_array(gh, "pl", pl, nlat), 0);
+	    // GRIB_CHECK(my_grib_set_long_array(gh, "pl", pl, nlat), 0);
 
 	    free(pl);
 	    free(rowlon);
@@ -2394,18 +2457,18 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	    yinc   = gridInqYinc(gridID);
 	  }
 
-	GRIB_CHECK(grib_set_long(gh, "Ni", nlon), 0);
-	GRIB_CHECK(grib_set_long(gh, "Nj", nlat), 0);
-	GRIB_CHECK(grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", xfirst), 0);
-	GRIB_CHECK(grib_set_double(gh, "longitudeOfLastGridPointInDegrees",  xlast), 0);
-	GRIB_CHECK(grib_set_double(gh, "latitudeOfFirstGridPointInDegrees",  yfirst), 0);
-	GRIB_CHECK(grib_set_double(gh, "latitudeOfLastGridPointInDegrees",   ylast), 0);
-	GRIB_CHECK(grib_set_double(gh, "iDirectionIncrementInDegrees", xinc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Ni", nlon), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Nj", nlat), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", xfirst), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfLastGridPointInDegrees",  xlast), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees",  yfirst), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfLastGridPointInDegrees",   ylast), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "iDirectionIncrementInDegrees", xinc), 0);
 
         {
           long jscan = 0;
           if ( yfirst < ylast ) jscan = 1;
-          GRIB_CHECK(grib_set_long(gh, "jScansPositively", jscan), 0);
+          GRIB_CHECK(my_grib_set_long(gh, "jScansPositively", jscan), 0);
         }
 	/*
 	if ( fabs(xinc*1000 - ISEC2_LonIncr) > FLT_EPSILON )
@@ -2415,23 +2478,23 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
           {
             int np = gridInqNP(gridID);
             if ( np == 0 ) np = nlat/2;
-            GRIB_CHECK(grib_set_long(gh, "numberOfParallelsBetweenAPoleAndTheEquator", np), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "numberOfParallelsBetweenAPoleAndTheEquator", np), 0);
           }
 	else
 	  {
 	    latIncr = yinc;
 	    if ( latIncr < 0 ) latIncr = -latIncr;
-	    GRIB_CHECK(grib_set_double(gh, "jDirectionIncrementInDegrees", latIncr), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "jDirectionIncrementInDegrees", latIncr), 0);
 	    /*
 	    if ( fabs(yinc*1000 - ISEC2_LatIncr) > FLT_EPSILON )
 	      ISEC2_LatIncr = 0;
 	    */
 	  }
 	/*
-	if ( ISEC2_NumLon > 1 && ISEC2_NumLat == 1 ) 
+	if ( ISEC2_NumLon > 1 && ISEC2_NumLat == 1 )
 	  if ( ISEC2_LonIncr != 0 && ISEC2_LatIncr == 0 ) ISEC2_LatIncr = ISEC2_LonIncr;
 
-	if ( ISEC2_NumLon == 1 && ISEC2_NumLat > 1 ) 
+	if ( ISEC2_NumLon == 1 && ISEC2_NumLat > 1 )
 	  if ( ISEC2_LonIncr == 0 && ISEC2_LatIncr != 0 ) ISEC2_LonIncr = ISEC2_LatIncr;
 
 	if ( ISEC2_LatIncr == 0 || ISEC2_LonIncr == 0 )
@@ -2445,12 +2508,12 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	    xpole = gridInqXpole(gridID);
 	    ypole = gridInqYpole(gridID);
 	    angle = gridInqAngle(gridID);
-	    /* change from noth to south pole */
+	    /* change from north to south pole */
 	    ypole = -ypole;
 	    xpole =  xpole + 180;
-	    GRIB_CHECK(grib_set_double(gh, "latitudeOfSouthernPoleInDegrees",  ypole), 0);
-	    GRIB_CHECK(grib_set_double(gh, "longitudeOfSouthernPoleInDegrees", xpole), 0);
-	    GRIB_CHECK(grib_set_double(gh, "angleOfRotation", angle), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "latitudeOfSouthernPoleInDegrees",  ypole), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "longitudeOfSouthernPoleInDegrees", xpole), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "angleOfRotation", angle), 0);
 	  }
 
 	/* East -> West */
@@ -2464,12 +2527,12 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
         if ( lieee )
           {
             mesg = "grid_ieee"; len = strlen(mesg);
-            GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+            GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
 
 	    if ( datatype == DATATYPE_FLT64 )
-	      GRIB_CHECK(grib_set_long(gh, "precision", 2), 0);
+	      GRIB_CHECK(my_grib_set_long(gh, "precision", 2), 0);
 	    else
-	      GRIB_CHECK(grib_set_long(gh, "precision", 1), 0);
+	      GRIB_CHECK(my_grib_set_long(gh, "precision", 1), 0);
           }
         else if ( ljpeg )
 	  {
@@ -2478,23 +2541,22 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
             if ( ljpeg )
               {
                 mesg = "grid_jpeg"; len = strlen(mesg);
-                GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+                GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
               }
             else
               {
                 mesg = "grid_simple"; len = strlen(mesg);
-                GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+                GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
               }
 	  }
 	else
 	  {
 	    mesg = "grid_simple"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
 	  }
 
 	break;
       }
-      /*
     case GRID_LCC:
       {
 	double originLon, originLat, lonParY, lat1, lat2, xincm, yincm;
@@ -2507,83 +2569,89 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
 	gridInqLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
 		   &projflag, &scanflag);
 
-	ISEC2_GridType = GRIB2_GTYPE_LCC;
-	ISEC2_NumLon   = xsize;
-	ISEC2_NumLat   = ysize;
-	ISEC2_FirstLon = NINT(originLon * 1000);
-	ISEC2_FirstLat = NINT(originLat * 1000);
-	ISEC2_Lambert_Lov    = NINT(lonParY * 1000);
-	ISEC2_Lambert_LatS1  = NINT(lat1 * 1000);
-	ISEC2_Lambert_LatS2  = NINT(lat2 * 1000);
-	ISEC2_Lambert_dx     = NINT(xincm);
-	ISEC2_Lambert_dy     = NINT(yincm);
+        mesg = "lambert"; len = strlen(mesg);
+        GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
+
+	GRIB_CHECK(my_grib_set_long(gh, "Nx", xsize), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Ny", ysize), 0);
+
+	GRIB_CHECK(my_grib_set_double(gh, "DxInMetres", lround(xincm)), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "DyInMetres", lround(yincm)), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", originLon), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", originLat), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "LoVInDegrees", lonParY), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "Latin1InDegrees", lat1), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "Latin2InDegrees", lat2), 0);
+
+        if ( editionNumber <= 1 )
+          {
+            GRIB_CHECK(my_grib_set_long(gh, "projectionCenterFlag", projflag), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "scanningMode", scanflag), 0);
+          }
+        /*
 	ISEC2_Lambert_LatSP  = 0;
 	ISEC2_Lambert_LatSP  = 0;
-	ISEC2_Lambert_ProjFlag = projflag;
-	ISEC2_ScanFlag = scanflag;
-
+        */
 	break;
       }
-      */
     case GRID_SPECTRAL:
       {
 	int trunc = gridInqTrunc(gridID);
 
 	mesg = "sh"; len = strlen(mesg);
-	GRIB_CHECK(grib_set_string(gh, "gridType", mesg, &len), 0);
+	GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 
-	GRIB_CHECK(grib_set_long(gh, "J", trunc), 0);
-	GRIB_CHECK(grib_set_long(gh, "K", trunc), 0);
-	GRIB_CHECK(grib_set_long(gh, "M", trunc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "J", trunc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "K", trunc), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "M", trunc), 0);
 
-	// GRIB_CHECK(grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
+	// GRIB_CHECK(my_grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
         /*
         if ( lieee )
           {
             printf("spectral_ieee\n");
-            if ( editionNumber == 2 ) GRIB_CHECK(grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
+            if ( editionNumber == 2 ) GRIB_CHECK(my_grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
             mesg = "spectral_ieee"; len = strlen(mesg);
-            GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+            GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
           }
         else */ if ( gridInqComplexPacking(gridID) )
 	  {
-	    if ( editionNumber == 2 ) GRIB_CHECK(grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
+	    if ( editionNumber == 2 ) GRIB_CHECK(my_grib_set_long(gh, "numberOfValues", gridInqSize(gridID)), 0);
 	    mesg = "spectral_complex"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
-	    /*
-	    GRIB_CHECK(grib_set_long(gh, "JS", 20), 0);
-	    GRIB_CHECK(grib_set_long(gh, "KS", 20), 0);
-	    GRIB_CHECK(grib_set_long(gh, "MS", 20), 0);
-	    */
+	    GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
+
+	    GRIB_CHECK(my_grib_set_long(gh, "JS", 20), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "KS", 20), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "MS", 20), 0);
 	  }
 	else
 	  {
 	    mesg = "spectral_simple"; len = strlen(mesg);
-	    GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
+	    GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
 	  }
 
 	break;
       }
     case GRID_GME:
       {
-	GRIB_CHECK(grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_GME), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_GME), 0);
 
-	GRIB_CHECK(grib_set_long(gh, "nd", gridInqGMEnd(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "Ni", gridInqGMEni(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "n2", gridInqGMEni2(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "n3", gridInqGMEni3(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "latitudeOfThePolePoint", 90000000), 0);
-	GRIB_CHECK(grib_set_long(gh, "longitudeOfThePolePoint", 0), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "nd", gridInqGMEnd(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "Ni", gridInqGMEni(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "n2", gridInqGMEni2(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "n3", gridInqGMEni3(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "latitudeOfThePolePoint", 90000000), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "longitudeOfThePolePoint", 0), 0);
 
-	GRIB_CHECK(grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
-	GRIB_CHECK(grib_set_long(gh, "totalNumberOfGridPoints", gridInqSize(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "numberOfDataPoints", gridInqSize(gridID)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "totalNumberOfGridPoints", gridInqSize(gridID)), 0);
 
 	break;
       }
     case GRID_UNSTRUCTURED:
       {
 	static int warning = 1;
-	status = grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_UNSTRUCTURED);
+	status = my_grib_set_long(gh, "gridDefinitionTemplateNumber", GRIB2_GTYPE_UNSTRUCTURED);
 	if ( status != 0 && warning )
 	  {
 	    warning = 0;
@@ -2598,8 +2666,8 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int ljpeg, i
             int number = gridInqNumber(gridID);
             if ( position < 0 ) position = 0;
             if ( number < 0 ) number = 0;
-	    GRIB_CHECK(grib_set_long(gh, "numberOfGridUsed", number), 0);
-	    GRIB_CHECK(grib_set_long(gh, "numberOfGridInReference", position), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "numberOfGridUsed", number), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "numberOfGridInReference", position), 0);
             len = 16;
             gridInqUUID(gridID, uuid);
 	    if (grib_set_bytes(gh, "uuidOfHGrid", (unsigned char *) uuid, &len) != 0)
@@ -2637,7 +2705,7 @@ void getLevelFactor(double level, long *factor, long *out_scaled_value)
 static
 void gribapiDefLevelType(grib_handle *gh, int gcinit, const char *keyname, long leveltype)
 {
-  if ( !gcinit ) GRIB_CHECK(grib_set_long(gh, keyname, leveltype), 0);
+  if ( !gcinit ) GRIB_CHECK(my_grib_set_long(gh, keyname, leveltype), 0);
 }
 
 static
@@ -2652,14 +2720,14 @@ void grib2DefLevel(grib_handle *gh, int gcinit, long leveltype, int lbounds, dou
   if ( !lbounds ) dlevel1 = level;
 
   getLevelFactor(dlevel1, &factor, &scaled_level);
-  GRIB_CHECK(grib_set_long(gh, "scaleFactorOfFirstFixedSurface", factor), 0);
-  GRIB_CHECK(grib_set_long(gh, "scaledValueOfFirstFixedSurface", scaled_level), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "scaleFactorOfFirstFixedSurface", factor), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "scaledValueOfFirstFixedSurface", scaled_level), 0);
 
   if ( lbounds )
     {
       getLevelFactor(dlevel2, &factor, &scaled_level);
-      GRIB_CHECK(grib_set_long(gh, "scaleFactorOfSecondFixedSurface", factor), 0);
-      GRIB_CHECK(grib_set_long(gh, "scaledValueOfSecondFixedSurface", scaled_level), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "scaleFactorOfSecondFixedSurface", factor), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "scaledValueOfSecondFixedSurface", scaled_level), 0);
     }
 }
 
@@ -2715,7 +2783,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
         else
           gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", zaxisTypeToGrib2ltype(zaxistype));
 
-        GRIB_CHECK(grib_set_long(gh, "level", level), 0);
+        GRIB_CHECK(my_grib_set_long(gh, "level", level), 0);
 
 	break;
       }
@@ -2741,8 +2809,8 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
                 gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", zaxisTypeToGrib2ltype(zaxistype));
               }
 
-            GRIB_CHECK(grib_set_long(gh, "topLevel", (long) dlevel1), 0);
-            GRIB_CHECK(grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "topLevel", (long) dlevel1), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
           }
         else
           {
@@ -2751,7 +2819,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
             else
               gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", zaxisTypeToGrib2ltype(zaxistype));
 
-            GRIB_CHECK(grib_set_long(gh, "level", (long) level), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "level", (long) level), 0);
           }
 
         break;
@@ -2769,8 +2837,8 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
 		gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", GRIB2_LTYPE_HYBRID);
 	      }
 
-	    GRIB_CHECK(grib_set_long(gh, "topLevel", (long) dlevel1), 0);
-	    GRIB_CHECK(grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "topLevel", (long) dlevel1), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
 	  }
 	else
 	  {
@@ -2779,7 +2847,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
             else
               gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", GRIB2_LTYPE_HYBRID);
 
-	    GRIB_CHECK(grib_set_long(gh, "level", (long) level), 0);
+	    GRIB_CHECK(my_grib_set_long(gh, "level", (long) level), 0);
 	  }
 
         if ( !gcinit )
@@ -2792,7 +2860,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
                 Warning("VCT missing ( param = %s, zaxisID = %d )", paramstr, zaxisID);
                 warning = 0;
               }
-            GRIB_CHECK(grib_set_long(gh, "PVPresent", 1), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "PVPresent", 1), 0);
             GRIB_CHECK(grib_set_double_array(gh, "pv", zaxisInqVctPtr(zaxisID), vctsize), 0);
           }
 
@@ -2823,7 +2891,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
               level /= 100;
 
             gribapiDefLevelType(gh, gcinit, "indicatorOfTypeOfLevel", leveltype);
-            GRIB_CHECK(grib_set_double(gh, "level", level), 0);
+            GRIB_CHECK(my_grib_set_double(gh, "level", level), 0);
 	  }
 	else
 	  {
@@ -2857,7 +2925,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
 	    else                                    scalefactor = 100;
 
 	    gribapiDefLevelType(gh, gcinit, "indicatorOfTypeOfLevel", GRIB1_LTYPE_LANDDEPTH);
-	    GRIB_CHECK(grib_set_double(gh, "level", level*scalefactor), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "level", level*scalefactor), 0);
 	  }
 	else
 	  {
@@ -2881,7 +2949,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
 
         if ( !gcinit )
           {
-            GRIB_CHECK(grib_set_long(gh, "genVertHeightCoords", 1), 0);
+            GRIB_CHECK(my_grib_set_long(gh, "genVertHeightCoords", 1), 0);
           }
 
         if ( lbounds )
@@ -2893,15 +2961,15 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
                 number = zaxisInqNumber(zaxisID);
                 gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", GRIB2_LTYPE_REFERENCE);
                 gribapiDefLevelType(gh, gcinit, "typeOfSecondFixedSurface", GRIB2_LTYPE_REFERENCE);
-                GRIB_CHECK(grib_set_long(gh, "NV", 6), 0);
-                GRIB_CHECK(grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
-                GRIB_CHECK(grib_set_long(gh, "numberOfVGridUsed", number), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "NV", 6), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "numberOfVGridUsed", number), 0);
                 len = 16;
                 zaxisInqUUID(zaxisID, uuid);
                 if (grib_set_bytes(gh, "uuidOfVGrid", (unsigned char *) uuid, &len) != 0)
                   Warning("Can't write UUID!");
-                GRIB_CHECK(grib_set_long(gh, "topLevel", (long) dlevel1), 0);
-                GRIB_CHECK(grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "topLevel", (long) dlevel1), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "bottomLevel", (long) dlevel2), 0);
               }
           }
         else
@@ -2912,14 +2980,14 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
               {
                 number = zaxisInqNumber(zaxisID);
                 gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", GRIB2_LTYPE_REFERENCE);
-                GRIB_CHECK(grib_set_long(gh, "NV", 6), 0);
-                GRIB_CHECK(grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
-                GRIB_CHECK(grib_set_long(gh, "numberOfVGridUsed", number), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "NV", 6), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "nlev", zaxisInqNlevRef(zaxisID)), 0);
+                GRIB_CHECK(my_grib_set_long(gh, "numberOfVGridUsed", number), 0);
                 len = 16;
                 zaxisInqUUID(zaxisID, uuid);
                 if (grib_set_bytes(gh, "uuidOfVGrid", (unsigned char *) uuid, &len) != 0)
                   Warning("Can't write UUID!");
-                GRIB_CHECK(grib_set_double(gh, "level", level), 0);
+                GRIB_CHECK(my_grib_set_double(gh, "level", level), 0);
               }
           }
 
@@ -2932,7 +3000,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
         else
           gribapiDefLevelType(gh, gcinit, "typeOfFirstFixedSurface", ltype);
 
-	GRIB_CHECK(grib_set_double(gh, "level", level), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "level", level), 0);
 
 	break;
       }
@@ -2983,7 +3051,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
   int datatype;
   int param;
   int lieee = FALSE;
-  int ensID, ensCount, forecast_type; /* Ensemble Data */
+  /*  int ensID, ensCount, forecast_type; *//* Ensemble Data */
   int typeOfGeneratingProcess;
   long bitsPerValue;
   long editionNumber = 2;
@@ -3006,8 +3074,11 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
 
   GRIB_CHECK(grib_get_long(gh, "editionNumber", &editionNumber), 0);
 
-  if ( typeOfGeneratingProcess == -1 ) typeOfGeneratingProcess = 0;
-  if ( ! gc->init ) GRIB_CHECK(grib_set_long(gh, "typeOfGeneratingProcess", typeOfGeneratingProcess), 0);
+  if ( editionNumber == 2 )
+    {
+      if ( typeOfGeneratingProcess == -1 ) typeOfGeneratingProcess = 0;
+      if ( ! gc->init ) GRIB_CHECK(my_grib_set_long(gh, "typeOfGeneratingProcess", typeOfGeneratingProcess), 0);
+    }
 
   if ( ! gc->init ) gribapiDefInstitut(gh, vlistID, varID);
   if ( ! gc->init ) gribapiDefModel(gh, vlistID, varID);
@@ -3016,9 +3087,9 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
   /*
   if( vlistInqVarEnsemble( vlistID,  varID, &ensID, &ensCount, &forecast_type ) )
     {
-      GRIB_CHECK(grib_set_long(gh, "typeOfEnsembleForecast", forecast_type ), 0);
-      GRIB_CHECK(grib_set_long(gh, "numberOfForecastsInEnsemble", ensCount ), 0);
-      GRIB_CHECK(grib_set_long(gh, "perturbationNumber", ensID ), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "typeOfEnsembleForecast", forecast_type ), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "numberOfForecastsInEnsemble", ensCount ), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "perturbationNumber", ensID ), 0);
     }
   */
 
@@ -3030,7 +3101,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
   //  if ( lieee == FALSE )
     {
       bitsPerValue = grbBitsPerValue(datatype);
-      GRIB_CHECK(grib_set_long(gh, "bitsPerValue", bitsPerValue), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "bitsPerValue", bitsPerValue), 0);
     }
 
   gribapiDefGrid(editionNumber, gh, gridID, ljpeg, lieee, datatype, nmiss, gc->init);
@@ -3047,7 +3118,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
     int i;
     for (i=0; i<vlistptr->vars[varID].opt_grib_dbl_nentries; i++)
       {
-	int ret = grib_set_double(gh, vlistptr->vars[varID].opt_grib_dbl_keyword[i],
+	int ret = my_grib_set_double(gh, vlistptr->vars[varID].opt_grib_dbl_keyword[i],
                                   vlistptr->vars[varID].opt_grib_dbl_val[i]);
 	if (ret != 0) {
 	    fprintf(stderr, "key \"%s\"  :   value = %g\n",
@@ -3058,7 +3129,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
       }
     for (i=0; i<vlistptr->vars[varID].opt_grib_int_nentries; i++)
       {
-	int ret = grib_set_long(gh, vlistptr->vars[varID].opt_grib_int_keyword[i],
+	int ret = my_grib_set_long(gh, vlistptr->vars[varID].opt_grib_int_keyword[i],
 	                        vlistptr->vars[varID].opt_grib_int_val[i]);
 	if (ret != 0) {
 	    fprintf(stderr, "key \"%s\"  :   value = %d\n",
@@ -3072,8 +3143,8 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
 
   if ( nmiss > 0 )
     {
-      GRIB_CHECK(grib_set_long(gh, "bitmapPresent", 1), 0);
-      GRIB_CHECK(grib_set_double(gh, "missingValue", vlistInqVarMissval(vlistID, varID)), 0);
+      GRIB_CHECK(my_grib_set_long(gh, "bitmapPresent", 1), 0);
+      GRIB_CHECK(my_grib_set_double(gh, "missingValue", vlistInqVarMissval(vlistID, varID)), 0);
     }
 
   GRIB_CHECK(grib_set_double_array(gh, "values", data, datasize), 0);
diff --git a/libcdi/src/stream_ieg.c b/libcdi/src/stream_ieg.c
index 33c2484..f08214e 100644
--- a/libcdi/src/stream_ieg.c
+++ b/libcdi/src/stream_ieg.c
@@ -69,11 +69,10 @@ int iegInqRecord(stream_t *streamptr, int *varID, int *levelID)
   int icode, ilevel;
   int zaxisID = -1;
   int vlistID;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  iegp    = streamptr->record->iegp;
 
   *varID   = -1;
   *levelID = -1;
@@ -108,7 +107,7 @@ int iegReadRecord(stream_t *streamptr, double *data, int *nmiss)
   int varID, gridID;
   int i, size;
   double missval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -117,7 +116,6 @@ int iegReadRecord(stream_t *streamptr, double *data, int *nmiss)
   recID   = streamptr->tsteps[tsID].recIDs[vrecID];
   recpos  = streamptr->tsteps[tsID].records[recID].position;
   varID   = streamptr->tsteps[tsID].records[recID].varID;
-  iegp    = streamptr->record->iegp;
 
   fileSetPos(fileID, recpos, SEEK_SET);
 
@@ -304,11 +302,11 @@ void iegDefGrid(int *gdb, int gridID)
 
       IEG_G_NumLon(gdb)   = nlon;
       IEG_G_NumLat(gdb)   = nlat;
-      IEG_G_FirstLat(gdb) = NINT(yfirst*1000);
-      IEG_G_LastLat(gdb)  = NINT(ylast*1000);
-      IEG_G_FirstLon(gdb) = NINT(xfirst*1000);
-      IEG_G_LastLon(gdb)  = NINT(xlast*1000);
-      IEG_G_LonIncr(gdb)  = NINT(xinc*1000);
+      IEG_G_FirstLat(gdb) = lround(yfirst*1000);
+      IEG_G_LastLat(gdb)  = lround(ylast*1000);
+      IEG_G_FirstLon(gdb) = lround(xfirst*1000);
+      IEG_G_LastLon(gdb)  = lround(xlast*1000);
+      IEG_G_LonIncr(gdb)  = lround(xinc*1000);
       if ( fabs(xinc*1000 - IEG_G_LonIncr(gdb)) > FLT_EPSILON )
 	IEG_G_LonIncr(gdb) = 0;
 
@@ -316,17 +314,17 @@ void iegDefGrid(int *gdb, int gridID)
 	IEG_G_LatIncr(gdb) = nlat/2;
       else
 	{
-	  IEG_G_LatIncr(gdb) = NINT(yinc*1000);
+	  IEG_G_LatIncr(gdb) = lround(yinc*1000);
 	  if ( fabs(yinc*1000 - IEG_G_LatIncr(gdb)) > FLT_EPSILON )
 	    IEG_G_LatIncr(gdb) = 0;
 
 	  if ( IEG_G_LatIncr(gdb) < 0 ) IEG_G_LatIncr(gdb) = -IEG_G_LatIncr(gdb);
 	}
 
-      if ( IEG_G_NumLon(gdb) > 1 && IEG_G_NumLat(gdb) == 1 ) 
+      if ( IEG_G_NumLon(gdb) > 1 && IEG_G_NumLat(gdb) == 1 )
 	if ( IEG_G_LonIncr(gdb) != 0 && IEG_G_LatIncr(gdb) == 0 ) IEG_G_LatIncr(gdb) = IEG_G_LonIncr(gdb);
 
-      if ( IEG_G_NumLon(gdb) == 1 && IEG_G_NumLat(gdb) > 1 ) 
+      if ( IEG_G_NumLon(gdb) == 1 && IEG_G_NumLat(gdb) > 1 )
 	if ( IEG_G_LonIncr(gdb) == 0 && IEG_G_LatIncr(gdb) != 0 ) IEG_G_LonIncr(gdb) = IEG_G_LatIncr(gdb);
 
       if ( IEG_G_LatIncr(gdb) == 0 || IEG_G_LonIncr(gdb) == 0 )
@@ -336,8 +334,8 @@ void iegDefGrid(int *gdb, int gridID)
 
       if ( gridIsRotated(gridID) )
 	{
-	  IEG_G_LatSP(gdb) = - NINT(gridInqYpole(gridID) * 1000);
-	  IEG_G_LonSP(gdb) =   NINT((gridInqXpole(gridID) + 180) * 1000);
+	  IEG_G_LatSP(gdb) = - lround(gridInqYpole(gridID) * 1000);
+	  IEG_G_LonSP(gdb) =   lround((gridInqXpole(gridID) + 180) * 1000);
 	  IEG_G_Size(gdb)  = 42;
 	}
       else
@@ -569,10 +567,9 @@ int iegDefRecord(stream_t *streamptr)
   int param, pdis, pcat, pnum;
   int varID, levelID, tsID, zaxisID;
   int byteorder;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
-  iegp    = streamptr->record->iegp;
   byteorder = streamptr->byteorder;
 
   varID   = streamptr->record->varID;
@@ -612,10 +609,9 @@ int iegWriteRecord(stream_t *streamptr, const double *data)
   int status = 0;
   int i, gridsize, gridID;
   double refval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   fileID = streamptr->fileID;
-  iegp   = streamptr->record->iegp;
   gridID = streamptr->record->gridID;
 
   gridsize = gridInqSize(gridID);
@@ -770,7 +766,7 @@ void iegAddRecord(stream_t *streamptr, int param, int *pdb, int *gdb, double *vc
   datatype = iegInqDatatype(prec);
 
   varAddRecord(recID, param, gridID, leveltype, lbounds, level1, level2, 0, 0,
-	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL);
+	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -849,11 +845,10 @@ void iegScanTimestep1(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   IEGCOMPVAR compVar, compVar0;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 0;
 
-  iegp  = streamptr->record->iegp;
   tsID  = tstepsNewEntry(streamptr);
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -986,13 +981,12 @@ int iegScanTimestep2(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   IEGCOMPVAR compVar, compVar0;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 1;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  iegp    = streamptr->record->iegp;
 
   tsID = streamptr->rtsteps;
   if ( tsID != 1 )
@@ -1166,7 +1160,7 @@ int iegScanTimestep(stream_t *streamptr)
   taxis_t *taxis;
   int rindex, nrecs = 0;
   IEGCOMPVAR compVar, compVar0;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     {
@@ -1179,7 +1173,6 @@ int iegScanTimestep(stream_t *streamptr)
   if ( streamptr->rtsteps == 0 )
     Error("Internal problem! Missing contents.");
 
-  iegp  = streamptr->record->iegp;
   tsID  = streamptr->rtsteps;
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -1317,9 +1310,8 @@ void iegReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int recID;
   int i;
   double missval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
-  iegp     = streamptr->record->iegp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -1362,9 +1354,8 @@ void iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
   int recID;
   int i;
   double missval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
-  iegp     = streamptr->record->iegp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -1409,13 +1400,11 @@ void iegWriteVarDP(stream_t *streamptr, int varID, const double *data)
   int date, time;
   int param, pdis, pcat, pnum;
   double refval;
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     Message("streamID = %d  varID = %d", streamptr->self, varID);
 
-  iegp     = streamptr->record->iegp;
-
   iegInitMem(iegp);
   for ( i = 0; i < 37; i++ ) iegp->ipdb[i] = -1;
 
@@ -1470,9 +1459,8 @@ void iegWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
   /* int tsID; */
   int vlistID;
   /* int param, date, time, datasize; */
-  iegrec_t *iegp;
+  iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
 
-  iegp     = streamptr->record->iegp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   /* tsID     = streamptr->curTsID; */
diff --git a/libcdi/src/stream_record.c b/libcdi/src/stream_record.c
index 9424ffb..1e86e8e 100644
--- a/libcdi/src/stream_record.c
+++ b/libcdi/src/stream_record.c
@@ -391,7 +391,7 @@ void stream_write_record(int streamID, int memtype, const void *data, int nmiss)
     case FILETYPE_SRV:
       {
         if ( memtype == MEMTYPE_FLOAT ) Error("srvWriteRecord not implemented for memtype float!");
-        status = srvWriteRecord(streamptr, data);
+        status = srvWriteRecord(streamptr, (const double*) data);
 	break;
       }
 #endif
@@ -399,7 +399,7 @@ void stream_write_record(int streamID, int memtype, const void *data, int nmiss)
     case FILETYPE_EXT:
       {
         if ( memtype == MEMTYPE_FLOAT ) Error("extWriteRecord not implemented for memtype float!");
-        status = extWriteRecord(streamptr, data);
+        status = extWriteRecord(streamptr, (const double*) data);
 	break;
       }
 #endif
@@ -407,7 +407,7 @@ void stream_write_record(int streamID, int memtype, const void *data, int nmiss)
     case FILETYPE_IEG:
       {
         if ( memtype == MEMTYPE_FLOAT ) Error("iegWriteRecord not implemented for memtype float!");
-        status = iegWriteRecord(streamptr, data);
+        status = iegWriteRecord(streamptr, (const double*) data);
 	break;
       }
 #endif
diff --git a/libcdi/src/stream_srv.c b/libcdi/src/stream_srv.c
index 5132b5e..801fca6 100644
--- a/libcdi/src/stream_srv.c
+++ b/libcdi/src/stream_srv.c
@@ -68,11 +68,10 @@ int srvInqRecord(stream_t *streamptr, int *varID, int *levelID)
   int zaxisID = -1;
   int header[8];
   int vlistID;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  srvp    = streamptr->record->srvp;
 
   *varID   = -1;
   *levelID = -1;
@@ -107,7 +106,7 @@ int srvReadRecord(stream_t *streamptr, double *data, int *nmiss)
   int varID, gridID;
   int i, size;
   double missval;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
@@ -116,7 +115,6 @@ int srvReadRecord(stream_t *streamptr, double *data, int *nmiss)
   recID   = streamptr->tsteps[tsID].recIDs[vrecID];
   recpos  = streamptr->tsteps[tsID].records[recID].position;
   varID   = streamptr->tsteps[tsID].records[recID].varID;
-  srvp    = streamptr->record->srvp;
 
   fileSetPos(fileID, recpos, SEEK_SET);
 
@@ -184,10 +182,9 @@ int srvDefRecord(stream_t *streamptr)
   int xsize, ysize;
   int datatype;
   int pdis, pcat, pnum;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   gridID = streamptr->record->gridID;
-  srvp   = streamptr->record->srvp;
 
   cdiDecodeParam(streamptr->record->param, &pnum, &pcat, &pdis);
   header[0] = pnum;
@@ -223,12 +220,9 @@ int srvDefRecord(stream_t *streamptr)
 
 int srvWriteRecord(stream_t *streamptr, const double *data)
 {
-  int fileID;
   int status = 0;
-  srvrec_t *srvp;
-
-  fileID = streamptr->fileID;
-  srvp   = streamptr->record->srvp;
+  int fileID = streamptr->fileID;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   srvDefDataDP(srvp, data);
 
@@ -277,7 +271,7 @@ void srv_add_record(stream_t *streamptr, int param, int level, int xsize, int ys
   datatype = srvInqDatatype(prec);
 
   varAddRecord(recID, param, gridID, leveltype, 0, level, 0, 0, 0,
-	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL);
+	       datatype, &varID, &levelID, UNDEFID, 0, 0, NULL, NULL, NULL, NULL);
 
   (*record).varID   = varID;
   (*record).levelID = levelID;
@@ -337,11 +331,10 @@ void srvScanTimestep1(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   SRVCOMPVAR compVar, compVar0;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 0;
 
-  srvp  = streamptr->record->srvp;
   tsID  = tstepsNewEntry(streamptr);
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -472,13 +465,12 @@ int srvScanTimestep2(stream_t *streamptr)
   taxis_t *taxis;
   int vlistID;
   SRVCOMPVAR compVar, compVar0;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   streamptr->curTsID = 1;
 
   vlistID = streamptr->vlistID;
   fileID  = streamptr->fileID;
-  srvp    = streamptr->record->srvp;
 
   tsID = streamptr->rtsteps;
   if ( tsID != 1 )
@@ -647,7 +639,7 @@ int srvScanTimestep(stream_t *streamptr)
   taxis_t *taxis;
   int rindex, nrecs = 0;
   SRVCOMPVAR compVar, compVar0;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     {
@@ -660,7 +652,6 @@ int srvScanTimestep(stream_t *streamptr)
   if ( streamptr->rtsteps == 0 )
     Error("Internal problem! Missing contents.");
 
-  srvp  = streamptr->record->srvp;
   tsID  = streamptr->rtsteps;
   taxis = &streamptr->tsteps[tsID].taxis;
 
@@ -799,9 +790,8 @@ void srvReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
   int recID;
   int i;
   double missval;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -847,9 +837,8 @@ void srvReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
   int recID;
   int i;
   double missval;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   nlevs    = streamptr->vars[varID].nlevs;
@@ -896,12 +885,11 @@ void srvWriteVarDP(stream_t *streamptr, int varID, const double *data)
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
   if ( CDI_Debug )
     Message("streamID = %d  varID = %d", streamptr->self, varID);
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
@@ -963,9 +951,8 @@ void srvWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
   int tsID;
   int vlistID;
   int pdis, pcat, pnum;
-  srvrec_t *srvp;
+  srvrec_t *srvp = (srvrec_t*) streamptr->record->exsep;
 
-  srvp     = streamptr->record->srvp;
   vlistID  = streamptr->vlistID;
   fileID   = streamptr->fileID;
   tsID     = streamptr->curTsID;
diff --git a/libcdi/src/stream_var.c b/libcdi/src/stream_var.c
index 8f9fd9a..ca6f959 100644
--- a/libcdi/src/stream_var.c
+++ b/libcdi/src/stream_var.c
@@ -43,7 +43,8 @@ int streamvar_new_entry(stream_t *streamptr)
       int i;
 
       streamvarSize = 2;
-      streamvar = (svarinfo_t *) malloc(streamvarSize*sizeof(svarinfo_t));
+      streamvar
+        = (svarinfo_t *)xmalloc((size_t)streamvarSize * sizeof(svarinfo_t));
       if ( streamvar == NULL )
 	{
           Message("streamvarSize = %d", streamvarSize);
@@ -69,7 +70,9 @@ int streamvar_new_entry(stream_t *streamptr)
       int i;
 
       streamvarSize = 2*streamvarSize;
-      streamvar = (svarinfo_t *) realloc(streamvar, streamvarSize*sizeof(svarinfo_t));
+      streamvar
+        = (svarinfo_t *)xrealloc(streamvar,
+                                 (size_t)streamvarSize * sizeof (svarinfo_t));
       if ( streamvar == NULL )
 	{
           Message("streamvarSize = %d", streamvarSize);
@@ -112,8 +115,8 @@ int stream_new_var(stream_t *streamptr, int gridID, int zaxisID)
 
   nlevs = zaxisInqSize(zaxisID);
 
-  level  = (int *) malloc(nlevs*sizeof(int));
-  lindex = (int *) malloc(nlevs*sizeof(int));
+  level  = (int *)xmalloc((size_t)nlevs * sizeof (int));
+  lindex = (int *)xmalloc((size_t)nlevs * sizeof (int));
 
   for ( levID = 0; levID < nlevs; levID++ )
     level[levID] = CDI_UNDEFID;
diff --git a/libcdi/src/taxis.c b/libcdi/src/taxis.c
index aca5593..508d98d 100644
--- a/libcdi/src/taxis.c
+++ b/libcdi/src/taxis.c
@@ -40,14 +40,19 @@ char *Timeunits[] = {
 
 static int    taxisCompareP    ( void * taxisptr1, void * taxisptr2 );
 static void   taxisDestroyP    ( void * taxisptr );
-static void   taxisPrintP      ( void * taxisptr, FILE * fp );
+static void   taxisPrintKernel(taxis_t *taxisptr, FILE * fp);
 static int    taxisGetPackSize ( void * taxisptr, void *context );
 static void   taxisPack        ( void * taxisptr, void *buf, int size,
 				 int *position, void *context );
 static int    taxisTxCode      ( void );
 
-resOps taxisOps = { taxisCompareP, taxisDestroyP, taxisPrintP
-                    , taxisGetPackSize, taxisPack, taxisTxCode
+const resOps taxisOps = {
+  taxisCompareP,
+  taxisDestroyP,
+  (void (*)(void *, FILE *))taxisPrintKernel,
+  taxisGetPackSize,
+  taxisPack,
+  taxisTxCode
 };
 
 
@@ -99,7 +104,7 @@ void taxis_defaults(void)
 #endif
 
 static
-void taxisDefaultValue ( taxis_t *taxisptr )
+void taxisDefaultValue(taxis_t* taxisptr)
 {
   taxisptr->self        = CDI_UNDEFID;
   taxisptr->used        = FALSE;
@@ -108,28 +113,36 @@ void taxisDefaultValue ( taxis_t *taxisptr )
   taxisptr->vtime       = 0;
   taxisptr->rdate       = CDI_UNDEFID;
   taxisptr->rtime       = 0;
+  taxisptr->fdate       = CDI_UNDEFID;
+  taxisptr->ftime       = 0;
   taxisptr->calendar    = cdiDefaultCalendar;
   taxisptr->unit        = DefaultTimeUnit;
   taxisptr->numavg      = 0;
+  taxisptr->climatology = FALSE;
   taxisptr->has_bounds  = FALSE;
   taxisptr->vdate_lb    = 0;
   taxisptr->vtime_lb    = 0;
   taxisptr->vdate_ub    = 0;
   taxisptr->vtime_ub    = 0;
+  taxisptr->fc_unit     = DefaultTimeUnit;
+  taxisptr->fc_period   = 0;
   taxisptr->name        = NULL;
   taxisptr->longname    = NULL;
-  taxisptr->climatology = FALSE;
 }
 
-static
-taxis_t *taxisNewEntry(void)
+static taxis_t *
+taxisNewEntry(cdiResH resH)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = (taxis_t *) xmalloc ( sizeof ( taxis_t ));
+  taxis_t *taxisptr = (taxis_t*) xmalloc(sizeof(taxis_t));
 
-  taxisDefaultValue ( taxisptr );
-  taxisptr->self = reshPut (( void * ) taxisptr, &taxisOps );
+  taxisDefaultValue(taxisptr);
+  if (resH == CDI_UNDEFID)
+    taxisptr->self = reshPut(taxisptr, &taxisOps);
+  else
+    {
+      taxisptr->self = resH;
+      reshReplace(resH, taxisptr, &taxisOps);
+    }
 
   return (taxisptr);
 }
@@ -142,7 +155,7 @@ void taxisInit (void)
 
   if ( taxisInitialized ) return;
 
-  taxisInitialized = 1; 
+  taxisInitialized = 1;
 
   env = getenv("TAXIS_DEBUG");
   if ( env ) TAXIS_Debug = atoi(env);
@@ -152,9 +165,7 @@ void taxisInit (void)
 static
 void taxis_copy(taxis_t *taxisptr2, taxis_t *taxisptr1)
 {
-  int taxisID2;
-
-  taxisID2 = taxisptr2->self;
+  int taxisID2 = taxisptr2->self;
   memcpy(taxisptr2, taxisptr1, sizeof(taxis_t));
   taxisptr2->self = taxisID2;
 }
@@ -201,19 +212,16 @@ taxisDefRtime(taxisID, 120000);
 */
 int taxisCreate(int taxistype)
 {
-  int taxisID;
-  taxis_t *taxisptr;
-
   if ( CDI_Debug )
     Message("taxistype: %d", taxistype);
 
   taxisInit ();
 
-  taxisptr = taxisNewEntry();
-
-  taxisID = taxisptr->self;
+  taxis_t *taxisptr = taxisNewEntry(CDI_UNDEFID);
   taxisptr->type = taxistype;
 
+  int taxisID = taxisptr->self;
+
   if ( CDI_Debug )
     Message("taxisID: %d", taxisID);
 
@@ -223,11 +231,9 @@ int taxisCreate(int taxistype)
 static
 void taxisDestroyKernel( taxis_t * taxisptr )
 {
-  int id;
-
   taxis_check_ptr(__func__, taxisptr);
 
-  id = taxisptr->self;
+  int id = taxisptr->self;
 
   free ( taxisptr );
 
@@ -246,9 +252,7 @@ void taxisDestroyKernel( taxis_t * taxisptr )
 */
 void taxisDestroy(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   if ( taxisptr->name     ) free(taxisptr->name);
   if ( taxisptr->longname ) free(taxisptr->longname);
@@ -265,16 +269,12 @@ void taxisDestroyP( void * taxisptr )
 
 int taxisDuplicate(int taxisID1)
 {
-  int taxisID2;
-  taxis_t *taxisptr1;
-  taxis_t *taxisptr2;
-
-  taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
+  taxis_t *taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
 
-  taxisptr2 = taxisNewEntry();
+  taxis_t *taxisptr2 = taxisNewEntry(CDI_UNDEFID);
   if ( ! taxisptr2 ) Error("No memory");
 
-  taxisID2 = taxisptr2->self;
+  int taxisID2 = taxisptr2->self;
 
   if ( CDI_Debug )
     Message("taxisID2: %d", taxisID2);
@@ -291,15 +291,13 @@ int taxisDuplicate(int taxisID1)
 
 void taxisDefType(int taxisID, int type)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -322,9 +320,7 @@ The function @func{taxisDefVdate} defines the verification date of a Time axis.
 */
 void taxisDefVdate(int taxisID, int vdate)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -347,9 +343,7 @@ The function @func{taxisDefVtime} defines the verification time of a Time axis.
 */
 void taxisDefVtime(int taxisID, int vtime)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -366,21 +360,19 @@ void taxisDefVtime(int taxisID, int vtime)
     @Item  rdate    Reference date (YYYYMMDD)
 
 @Description
-The function @func{taxisDefVdate} defines the reference date of a Time axis.
+The function @func{taxisDefRdate} defines the reference date of a Time axis.
 
 @EndFunction
 */
 void taxisDefRdate(int taxisID, int rdate)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -397,21 +389,19 @@ void taxisDefRdate(int taxisID, int rdate)
     @Item  rtime    Reference time (hhmmss)
 
 @Description
-The function @func{taxisDefVdate} defines the reference time of a Time axis.
+The function @func{taxisDefRtime} defines the reference time of a Time axis.
 
 @EndFunction
 */
 void taxisDefRtime(int taxisID, int rtime)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -419,6 +409,64 @@ void taxisDefRtime(int taxisID, int rtime)
 }
 
 /*
+ at Function  taxisDefFdate
+ at Title     Define the forecast reference date
+
+ at Prototype void taxisDefFdate(int taxisID, int fdate)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  fdate    Forecast reference date (YYYYMMDD)
+
+ at Description
+The function @func{taxisDefFdate} defines the forecast reference date of a Time axis.
+
+ at EndFunction
+*/
+void taxisDefFdate(int taxisID, int fdate)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  taxisptr->fdate = fdate;
+}
+
+/*
+ at Function  taxisDefFtime
+ at Title     Define the forecast reference time
+
+ at Prototype void taxisDefFtime(int taxisID, int ftime)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  ftime    Forecast reference time (hhmmss)
+
+ at Description
+The function @func{taxisDefFtime} defines the forecast reference time of a Time axis.
+
+ at EndFunction
+*/
+void taxisDefFtime(int taxisID, int ftime)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  taxisptr->ftime = ftime;
+}
+
+/*
 @Function  taxisDefCalendar
 @Title     Define the calendar
 
@@ -426,7 +474,7 @@ void taxisDefRtime(int taxisID, int rtime)
 @Parameter
     @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
     @Item  calendar The type of the calendar, one of the set of predefined CDI calendar types.
-                    The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC}, 
+                    The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC},
                     @func{CALENDAR_360DAYS}, @func{CALENDAR_365DAYS} and @func{CALENDAR_366DAYS}.
 
 @Description
@@ -436,15 +484,13 @@ The function @func{taxisDefCalendar} defines the calendar of a Time axis.
 */
 void taxisDefCalendar(int taxisID, int calendar)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -454,15 +500,13 @@ void taxisDefCalendar(int taxisID, int calendar)
 
 void taxisDefTunit(int taxisID, int unit)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -470,17 +514,47 @@ void taxisDefTunit(int taxisID, int unit)
 }
 
 
-void taxisDefNumavg(int taxisID, int numavg)
+void taxisDefForecastTunit(int taxisID, int unit)
 {
-  taxis_t *taxisptr;
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
 
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  taxisptr->fc_unit = unit;
+}
+
+
+void taxisDefForecastPeriod(int taxisID, double fc_period)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  taxisptr->fc_period = fc_period;
+}
+
+
+void taxisDefNumavg(int taxisID, int numavg)
+{
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
+    {
+      Warning("%s", "Operation not executed.");
+      return;
+    }
+
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -493,9 +567,7 @@ The valid CDI time types are TAXIS_ABSOLUTE and TAXIS_RELATIVE.
 */
 int taxisInqType(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -505,9 +577,7 @@ int taxisInqType(int taxisID)
 
 int taxisHasBounds(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -517,15 +587,13 @@ int taxisHasBounds(int taxisID)
 
 void taxisDeleteBounds(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -535,11 +603,8 @@ void taxisDeleteBounds(int taxisID)
 
 void taxisCopyTimestep(int taxisID2, int taxisID1)
 {
-  taxis_t *taxisptr1;
-  taxis_t *taxisptr2;
-
-  taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
-  taxisptr2 = ( taxis_t * ) reshGetVal ( taxisID2, &taxisOps );
+  taxis_t *taxisptr1 = ( taxis_t * ) reshGetVal ( taxisID1, &taxisOps );
+  taxis_t *taxisptr2 = ( taxis_t * ) reshGetVal ( taxisID2, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr1);
   taxis_check_ptr(__func__, taxisptr2);
@@ -560,6 +625,12 @@ void taxisCopyTimestep(int taxisID2, int taxisID1)
       taxisptr2->vtime_ub = taxisptr1->vtime_ub;
     }
 
+  taxisptr2->fdate = taxisptr1->fdate;
+  taxisptr2->ftime = taxisptr1->ftime;
+
+  taxisptr2->fc_unit   = taxisptr1->fc_unit;
+  taxisptr2->fc_period = taxisptr1->fc_period;
+
   reshUnlock ();
 }
 
@@ -569,7 +640,7 @@ void taxisCopyTimestep(int taxisID2, int taxisID1)
 
 @Prototype int taxisInqVdate(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqVdate} returns the verification date of a Time axis.
@@ -581,9 +652,7 @@ The function @func{taxisInqVdate} returns the verification date of a Time axis.
 */
 int taxisInqVdate(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -593,9 +662,7 @@ int taxisInqVdate(int taxisID)
 
 void taxisInqVdateBounds(int taxisID, int *vdate_lb, int *vdate_ub)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -606,21 +673,19 @@ void taxisInqVdateBounds(int taxisID, int *vdate_lb, int *vdate_ub)
 
 void taxisDefVdateBounds(int taxisID, int vdate_lb, int vdate_ub)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
   taxisptr->vdate_lb = vdate_lb;
   taxisptr->vdate_ub = vdate_ub;
- 
+
   taxisptr->has_bounds = TRUE;
 }
 
@@ -630,7 +695,7 @@ void taxisDefVdateBounds(int taxisID, int vdate_lb, int vdate_ub)
 
 @Prototype int taxisInqVtime(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqVtime} returns the verification time of a Time axis.
@@ -642,9 +707,7 @@ The function @func{taxisInqVtime} returns the verification time of a Time axis.
 */
 int taxisInqVtime(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -654,9 +717,7 @@ int taxisInqVtime(int taxisID)
 
 void taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -667,15 +728,13 @@ void taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub)
 
 void taxisDefVtimeBounds(int taxisID, int vtime_lb, int vtime_ub)
 {
-  taxis_t *taxisptr;
-
-  if ( reshGetStatus ( taxisID, &taxisOps ) == CLOSED )
+  if ( reshGetStatus ( taxisID, &taxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
     }
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -691,21 +750,19 @@ void taxisDefVtimeBounds(int taxisID, int vtime_lb, int vtime_ub)
 
 @Prototype int taxisInqRdate(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqRdate} returns the reference date of a Time axis.
 
 @Result
- at func{taxisInqVdate} returns the reference date.
+ at func{taxisInqRdate} returns the reference date.
 
 @EndFunction
 */
 int taxisInqRdate(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -724,21 +781,19 @@ int taxisInqRdate(int taxisID)
 
 @Prototype int taxisInqRtime(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqRtime} returns the reference time of a Time axis.
 
 @Result
- at func{taxisInqVtime} returns the reference time.
+ at func{taxisInqRtime} returns the reference time.
 
 @EndFunction
 */
 int taxisInqRtime(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -752,12 +807,74 @@ int taxisInqRtime(int taxisID)
 }
 
 /*
+ at Function  taxisInqFdate
+ at Title     Get the forecast reference date
+
+ at Prototype int taxisInqFdate(int taxisID)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
+
+ at Description
+The function @func{taxisInqFdate} returns the forecast reference date of a Time axis.
+
+ at Result
+ at func{taxisInqFdate} returns the forecast reference date.
+
+ at EndFunction
+*/
+int taxisInqFdate(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  if ( taxisptr->fdate == -1 )
+    {
+      taxisptr->fdate = taxisptr->vdate;
+      taxisptr->ftime = taxisptr->vtime;
+    }
+
+  return (taxisptr->fdate);
+}
+
+/*
+ at Function  taxisInqFtime
+ at Title     Get the forecast reference time
+
+ at Prototype int taxisInqFtime(int taxisID)
+ at Parameter
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
+
+ at Description
+The function @func{taxisInqFtime} returns the forecast reference time of a Time axis.
+
+ at Result
+ at func{taxisInqFtime} returns the forecast reference time.
+
+ at EndFunction
+*/
+int taxisInqFtime(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  if ( taxisptr->fdate == -1 )
+    {
+      taxisptr->fdate = taxisptr->vdate;
+      taxisptr->ftime = taxisptr->vtime;
+    }
+
+  return (taxisptr->ftime);
+}
+
+/*
 @Function  taxisInqCalendar
 @Title     Get the calendar
 
 @Prototype int taxisInqCalendar(int taxisID)
 @Parameter
-    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate}
+    @Item  taxisID  Time axis ID, from a previous call to @fref{taxisCreate} or @fref{vlistInqTaxis}
 
 @Description
 The function @func{taxisInqCalendar} returns the calendar of a Time axis.
@@ -765,16 +882,14 @@ The function @func{taxisInqCalendar} returns the calendar of a Time axis.
 @Result
 @func{taxisInqCalendar} returns the type of the calendar,
 one of the set of predefined CDI calendar types.
-The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC}, 
+The valid CDI calendar types are @func{CALENDAR_STANDARD}, @func{CALENDAR_PROLEPTIC},
 @func{CALENDAR_360DAYS}, @func{CALENDAR_365DAYS} and @func{CALENDAR_366DAYS}.
 
 @EndFunction
 */
 int taxisInqCalendar(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -784,9 +899,7 @@ int taxisInqCalendar(int taxisID)
 
 int taxisInqTunit(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -794,11 +907,29 @@ int taxisInqTunit(int taxisID)
 }
 
 
-int taxisInqNumavg(int taxisID)
+int taxisInqForecastTunit(int taxisID)
 {
-  taxis_t *taxisptr;
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_check_ptr(__func__, taxisptr);
+
+  return (taxisptr->fc_unit);
+}
+
+
+double taxisInqForecastPeriod(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+
+  taxis_check_ptr(__func__, taxisptr);
+
+  return (taxisptr->fc_period);
+}
+
+
+int taxisInqNumavg(int taxisID)
+{
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -808,9 +939,7 @@ int taxisInqNumavg(int taxisID)
 
 taxis_t *taxisPtr(int taxisID)
 {
-  taxis_t *taxisptr;
-
-  taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
 
   taxis_check_ptr(__func__, taxisptr);
 
@@ -1145,6 +1274,66 @@ void splitTimevalue(double timevalue, int timeunit, int *date, int *time)
 }
 
 
+void cdiSetForecastPeriod(double timevalue, taxis_t *taxis)
+{
+  int year, month, day, hour, minute, second;
+  int vdate, vtime;
+  int timeunit;
+  int calendar;
+  int julday, secofday, days, secs;
+
+  (*taxis).fc_period = timevalue;
+
+  timeunit = (*taxis).fc_unit;
+  calendar = (*taxis).calendar;
+
+  vdate  = (*taxis).vdate;
+  vtime  = (*taxis).vtime;
+
+  if ( vdate == 0 && vtime == 0 && DBL_IS_EQUAL(timevalue, 0.) ) return;
+
+  cdiDecodeDate(vdate, &year, &month, &day);
+  cdiDecodeTime(vtime, &hour, &minute, &second);
+
+  if ( timeunit == TUNIT_MONTH && calendar == CALENDAR_360DAYS )
+    {
+      timeunit = TUNIT_DAY;
+      timevalue *= 30;
+    }
+
+  if ( timeunit == TUNIT_MONTH || timeunit == TUNIT_YEAR )
+    {
+      int nmon, dpm;
+      double fmon;
+
+      if ( timeunit == TUNIT_YEAR ) timevalue *= 12;
+
+      nmon = (int) timevalue;
+      fmon = timevalue - nmon;
+
+      month -= nmon;
+
+      while ( month > 12 ) { month -= 12; year++; }
+      while ( month <  1 ) { month += 12; year--; }
+
+      dpm = days_per_month(calendar, year, month);
+      timeunit = TUNIT_DAY;
+      timevalue = fmon*dpm;
+    }
+
+  encode_caldaysec(calendar, year, month, day, hour, minute, second, &julday, &secofday);
+
+  cdiDecodeTimevalue(timeunit, timevalue, &days, &secs);
+
+  julday_add(-days, -secs, &julday, &secofday);
+
+  decode_caldaysec(calendar, julday, secofday, &year, &month, &day, &hour, &minute, &second);
+
+  (*taxis).fdate = cdiEncodeDate(year, month, day);
+  (*taxis).ftime = cdiEncodeTime(hour, minute, second);
+}
+
+
 void cdiDecodeTimeval(double timevalue, taxis_t *taxis, int *date, int *time)
 {
   if ( taxis->type == TAXIS_ABSOLUTE )
@@ -1210,21 +1399,26 @@ void ptaxisCopy(taxis_t *dest, taxis_t *source)
   dest->vtime       = source->vtime;
   dest->rdate       = source->rdate;
   dest->rtime       = source->rtime;
+  dest->fdate       = source->fdate;
+  dest->ftime       = source->ftime;
   dest->calendar    = source->calendar;
   dest->unit        = source->unit;
   dest->numavg      = source->numavg;
+  dest->climatology = source->climatology;
   dest->has_bounds  = source->has_bounds;
   dest->vdate_lb    = source->vdate_lb;
   dest->vtime_lb    = source->vtime_lb;
   dest->vdate_ub    = source->vdate_ub;
   dest->vtime_ub    = source->vtime_ub;
-  dest->climatology = source->climatology;
+  dest->fc_unit     = source->fc_unit;
+  dest->fc_period   = source->fc_period;
 
   reshUnlock ();
 }
 
 
-void taxisPrintKernel ( taxis_t * taxisptr, FILE * fp )
+static void
+taxisPrintKernel(taxis_t * taxisptr, FILE * fp)
 {
   int vdate_lb, vdate_ub;
   int vtime_lb, vtime_ub;
@@ -1244,6 +1438,8 @@ void taxisPrintKernel ( taxis_t * taxisptr, FILE * fp )
   fprintf ( fp, "vtime       = %d\n", taxisptr->vtime );
   fprintf ( fp, "rdate       = %d\n", taxisptr->rdate );
   fprintf ( fp, "rtime       = %d\n", taxisptr->rtime );
+  fprintf ( fp, "fdate       = %d\n", taxisptr->fdate );
+  fprintf ( fp, "ftime       = %d\n", taxisptr->ftime );
   fprintf ( fp, "calendar    = %d\n", taxisptr->calendar );
   fprintf ( fp, "unit        = %d\n", taxisptr->unit );
   fprintf ( fp, "numavg      = %d\n", taxisptr->numavg );
@@ -1253,6 +1449,8 @@ void taxisPrintKernel ( taxis_t * taxisptr, FILE * fp )
   fprintf ( fp, "vtime_lb    = %d\n", vtime_lb );
   fprintf ( fp, "vdate_ub    = %d\n", vdate_ub );
   fprintf ( fp, "vtime_ub    = %d\n", vtime_ub );
+  fprintf ( fp, "fc_unit     = %d\n", taxisptr->fc_unit );
+  fprintf ( fp, "fc_period   = %g\n", taxisptr->fc_period );
   fprintf ( fp, "\n");
 }
 
@@ -1264,12 +1462,8 @@ void taxisPrint ( int taxisID )
   taxisPrintKernel ( taxisptr, stdout );
 }
 
-void taxisPrintP ( void * taxisptr, FILE * fp )
-{
-  taxisPrintKernel (( taxis_t * ) taxisptr, fp );
-}
-
-int taxisCompareP ( void *  taxisptr1, void * taxisptr2 )
+static int
+taxisCompareP(void *taxisptr1, void *taxisptr2)
 {
   taxis_t * t1, * t2;
 
@@ -1285,8 +1479,11 @@ int taxisCompareP ( void *  taxisptr1, void * taxisptr2 )
 	     t1->vtime       == t2->vtime       &&
 	     t1->rdate       == t2->rdate       &&
 	     t1->rtime       == t2->rtime       &&
+	     t1->fdate       == t2->fdate       &&
+	     t1->ftime       == t2->ftime       &&
 	     t1->calendar    == t2->calendar    &&
 	     t1->unit        == t2->unit        &&
+	     t1->fc_unit     == t2->fc_unit     &&
 	     t1->numavg      == t2->numavg      &&
 	     t1->climatology == t2->climatology &&
 	     t1->has_bounds  == t2->has_bounds  &&
@@ -1303,12 +1500,12 @@ taxisTxCode ( void )
   return TAXIS;
 }
 
-enum { taxisNint = 18 };
+enum { taxisNint = 21 };
 
 static int
 taxisGetPackSize(void *p, void *context)
 {
-  taxis_t *taxisptr = p;
+  taxis_t *taxisptr = (taxis_t*) p;
   int packBufferSize
     = serializeGetSize(taxisNint, DATATYPE_INT, context)
     + serializeGetSize(1, DATATYPE_UINT32, context)
@@ -1322,11 +1519,12 @@ taxisGetPackSize(void *p, void *context)
 
 int
 taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
-            int nspTarget, void *context, int checkForSameID)
+            int originNamespace, void *context, int force_id)
 {
   taxis_t * taxisP;
   int intBuffer[taxisNint];
   uint32_t d;
+  int idx = 0;
 
   serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                   intBuffer, taxisNint, DATATYPE_INT, context);
@@ -1337,47 +1535,50 @@ taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
 
   taxisInit();
 
-  taxisP = taxisNewEntry();
-  if ( ! taxisP ) Error("No memory");
-
-  xassert(!checkForSameID
-          || namespaceAdaptKey(intBuffer[0], nspTarget) == taxisP->self);
-
-  taxisP->used        = intBuffer[1];
-  taxisP->type        = intBuffer[2];
-  taxisP->vdate       = intBuffer[3];
-  taxisP->vtime       = intBuffer[4];
-  taxisP->rdate       = intBuffer[5];
-  taxisP->rtime       = intBuffer[6];
-  taxisP->calendar    = intBuffer[7];
-  taxisP->unit        = intBuffer[8];
-  taxisP->numavg      = intBuffer[9];
-  taxisP->has_bounds  = intBuffer[10];
-  taxisP->vdate_lb    = intBuffer[11];
-  taxisP->vtime_lb    = intBuffer[12];
-  taxisP->vdate_ub    = intBuffer[13];
-  taxisP->vtime_ub    = intBuffer[14];
-  if (intBuffer[15])
+  cdiResH targetID = namespaceAdaptKey(intBuffer[idx++], originNamespace);
+  taxisP = taxisNewEntry(force_id?targetID:CDI_UNDEFID);
+
+  xassert(!force_id || targetID == taxisP->self);
+
+  taxisP->used        = intBuffer[idx++];
+  taxisP->type        = intBuffer[idx++];
+  taxisP->vdate       = intBuffer[idx++];
+  taxisP->vtime       = intBuffer[idx++];
+  taxisP->rdate       = intBuffer[idx++];
+  taxisP->rtime       = intBuffer[idx++];
+  taxisP->fdate       = intBuffer[idx++];
+  taxisP->ftime       = intBuffer[idx++];
+  taxisP->calendar    = intBuffer[idx++];
+  taxisP->unit        = intBuffer[idx++];
+  taxisP->fc_unit     = intBuffer[idx++];
+  taxisP->numavg      = intBuffer[idx++];
+  taxisP->climatology = intBuffer[idx++];
+  taxisP->has_bounds  = intBuffer[idx++];
+  taxisP->vdate_lb    = intBuffer[idx++];
+  taxisP->vtime_lb    = intBuffer[idx++];
+  taxisP->vdate_ub    = intBuffer[idx++];
+  taxisP->vtime_ub    = intBuffer[idx++];
+
+  if (intBuffer[idx])
     {
-      size_t len = intBuffer[15];
-      char *name = xmalloc(len + 1);
+      size_t len = intBuffer[idx];
+      char *name = (char*) xmalloc(len + 1);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       name, len, DATATYPE_TXT, context);
       name[len] = '\0';
       taxisP->name = name;
     }
-  if (intBuffer[16])
+  idx++;
+  if (intBuffer[idx])
     {
-      size_t len = intBuffer[16];
-      char *longname = xmalloc(len + 1);
+      size_t len = intBuffer[idx];
+      char *longname = (char*) xmalloc(len + 1);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       longname, len, DATATYPE_TXT, context);
       longname[len] = '\0';
       taxisP->longname = longname;
     }
 
-  taxisP->climatology = intBuffer[17];
-
   return taxisP->self;
 }
 
@@ -1389,25 +1590,29 @@ taxisPack(void * voidP, void * packBuffer, int packBufferSize, int * packBufferP
   taxis_t *taxisP = (taxis_t *)voidP;
   int intBuffer[taxisNint];
   uint32_t d;
-
-  intBuffer[0]  = taxisP->self;
-  intBuffer[1]  = taxisP->used;
-  intBuffer[2]  = taxisP->type;
-  intBuffer[3]  = taxisP->vdate;
-  intBuffer[4]  = taxisP->vtime;
-  intBuffer[5]  = taxisP->rdate;
-  intBuffer[6]  = taxisP->rtime;
-  intBuffer[7]  = taxisP->calendar;
-  intBuffer[8]  = taxisP->unit;
-  intBuffer[9]  = taxisP->numavg;
-  intBuffer[10] = taxisP->has_bounds;
-  intBuffer[11] = taxisP->vdate_lb;
-  intBuffer[12] = taxisP->vtime_lb;
-  intBuffer[13] = taxisP->vdate_ub;
-  intBuffer[14] = taxisP->vtime_ub;
-  intBuffer[15] = taxisP->name ? strlen(taxisP->name) : 0;
-  intBuffer[16] = taxisP->longname ? strlen(taxisP->longname) : 0;
-  intBuffer[17] = taxisP->climatology;
+  int idx = 0;
+
+  intBuffer[idx++] = taxisP->self;
+  intBuffer[idx++] = taxisP->used;
+  intBuffer[idx++] = taxisP->type;
+  intBuffer[idx++] = taxisP->vdate;
+  intBuffer[idx++] = taxisP->vtime;
+  intBuffer[idx++] = taxisP->rdate;
+  intBuffer[idx++] = taxisP->rtime;
+  intBuffer[idx++] = taxisP->fdate;
+  intBuffer[idx++] = taxisP->ftime;
+  intBuffer[idx++] = taxisP->calendar;
+  intBuffer[idx++] = taxisP->unit;
+  intBuffer[idx++] = taxisP->fc_unit;
+  intBuffer[idx++] = taxisP->numavg;
+  intBuffer[idx++] = taxisP->climatology;
+  intBuffer[idx++] = taxisP->has_bounds;
+  intBuffer[idx++] = taxisP->vdate_lb;
+  intBuffer[idx++] = taxisP->vtime_lb;
+  intBuffer[idx++] = taxisP->vdate_ub;
+  intBuffer[idx++] = taxisP->vtime_ub;
+  intBuffer[idx++] = taxisP->name ? strlen(taxisP->name) : 0;
+  intBuffer[idx++] = taxisP->longname ? strlen(taxisP->longname) : 0;
 
   serializePack(intBuffer, taxisNint, DATATYPE_INT,
                 packBuffer, packBufferSize, packBufferPos, context);
diff --git a/libcdi/src/taxis.h b/libcdi/src/taxis.h
index 1018782..8ccc14d 100644
--- a/libcdi/src/taxis.h
+++ b/libcdi/src/taxis.h
@@ -10,40 +10,45 @@ typedef struct {
   /* Time format    hhmmss */
   int     self;
   int     used;
-  int     type;           /* time type             */
-  int     vdate;          /* verification date     */
-  int     vtime;          /* verification time     */
-  int     rdate;          /* reference date        */
-  int     rtime;          /* reference time        */
+  int     type;           // time type
+  int     vdate;          // verification date
+  int     vtime;          // verification time
+  int     rdate;          // reference date
+  int     rtime;          // reference time
+  int     fdate;          // forecast reference date
+  int     ftime;          // forecast reference time
   int     calendar;
-  int     unit;           /* time unit             */
+  int     unit;           // time unit
   int     numavg;
   int     climatology;
   int     has_bounds;
-  int     vdate_lb;       /* lower bounds of vdate */
-  int     vtime_lb;       /* lower bounds of vtime */
-  int     vdate_ub;       /* upper bounds of vdate */
-  int     vtime_ub;       /* upper bounds of vtime */
-  char   *name;
-  char   *longname;
+  int     vdate_lb;       // lower bounds of vdate
+  int     vtime_lb;       // lower bounds of vtime
+  int     vdate_ub;       // upper bounds of vdate
+  int     vtime_ub;       // upper bounds of vtime
+  int     fc_unit;        // forecast time unit
+  double  fc_period;      // forecast time period
+  char*   name;
+  char*   longname;
 }
 taxis_t;
 
-void    ptaxisInit(taxis_t *taxis);
-void    ptaxisCopy(taxis_t *dest, taxis_t *source);
-taxis_t  *taxisPtr(int taxisID);
-void    cdiDecodeTimeval(double timevalue, taxis_t *taxis, int *date, int *time);
-double  cdiEncodeTimeval(int date, int time, taxis_t *taxis);
-void    timeval2vtime(double timevalue, taxis_t *taxis, int *vdate, int *vtime);
-double  vtime2timeval(int vdate, int vtime, taxis_t *taxis);
+void     ptaxisInit(taxis_t* taxis);
+void     ptaxisCopy(taxis_t* dest, taxis_t* source);
+taxis_t* taxisPtr(int taxisID);
+void     cdiSetForecastPeriod(double timevalue, taxis_t *taxis);
+void     cdiDecodeTimeval(double timevalue, taxis_t* taxis, int* date, int* time);
+double   cdiEncodeTimeval(int date, int time, taxis_t* taxis);
+void     timeval2vtime(double timevalue, taxis_t* taxis, int* vdate, int* vtime);
+double   vtime2timeval(int vdate, int vtime, taxis_t *taxis);
 
 #if !defined (SX)
-extern resOps taxisOps;
+extern const resOps taxisOps;
 #endif
 
 int
-taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
-            int nspTarget, void *context, int checkForSameID);
+taxisUnpack(char *unpackBuffer, int unpackBufferSize, int *unpackBufferPos,
+            int originNamespace, void *context, int checkForSameID);
 
 #endif  /* _TAXIS_H */
 /*
diff --git a/libcdi/src/varscan.c b/libcdi/src/varscan.c
index 40e0e0c..2d29cd9 100644
--- a/libcdi/src/varscan.c
+++ b/libcdi/src/varscan.c
@@ -61,6 +61,7 @@ typedef struct
   int           lmissval;
   double        missval;
   char         *name;
+  char         *stdname;
   char         *longname;
   char         *units;
   ensinfo_t    *ensdata;
@@ -111,6 +112,7 @@ void paramInitEntry(int varID, int param)
   vartable[varID].lmissval       = 0;
   vartable[varID].missval        = 0;
   vartable[varID].name           = NULL;
+  vartable[varID].stdname        = NULL;
   vartable[varID].longname       = NULL;
   vartable[varID].units          = NULL;
   vartable[varID].ensdata        = NULL;
@@ -152,6 +154,7 @@ void varFree(void)
 	free(vartable[varID].levelTable);
 
       if ( vartable[varID].name )     free(vartable[varID].name);
+      if ( vartable[varID].stdname )  free(vartable[varID].stdname);
       if ( vartable[varID].longname ) free(vartable[varID].longname);
       if ( vartable[varID].units )    free(vartable[varID].units);
       if ( vartable[varID].ensdata )  free(vartable[varID].ensdata);
@@ -314,7 +317,7 @@ int paramNewEntry(int param)
 void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
 		  int level1, int level2, int level_sf, int level_unit, int prec,
 		  int *pvarID, int *plevelID, int tsteptype, int numavg, int ltype,
-		  const char *name, const char *longname, const char *units)
+		  const char *name, const char *stdname, const char *longname, const char *units)
 {
   int varID = UNDEFID;
   int levelID = -1;
@@ -336,6 +339,7 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
       if ( numavg ) vartable[varID].timave = 1;
 
       if ( name )     if ( name[0] )     vartable[varID].name     = strdup(name);
+      if ( stdname )  if ( stdname[0] )  vartable[varID].stdname  = strdup(stdname);
       if ( longname ) if ( longname[0] ) vartable[varID].longname = strdup(longname);
       if ( units )    if ( units[0] )    vartable[varID].units    = strdup(units);
     }
@@ -361,9 +365,6 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
   levelID = levelNewEntry(varID, level1, level2);
   vartable[varID].levelTable[levelID].recID = recID;
 
-  if ( CDI_Debug )
-    Message("varID = %d  levelID = %d", varID, levelID);
-
   *pvarID   = varID;
   *plevelID = levelID;
 }
@@ -383,8 +384,8 @@ static
 int cmpLevelTable(const void* s1, const void* s2)
 {
   int cmp = 0;
-  const leveltable_t* x = s1;
-  const leveltable_t* y = s2;
+  const leveltable_t* x = (const leveltable_t*) s1;
+  const leveltable_t* y = (const leveltable_t*) s2;
   /*
   printf("%g %g  %d %d\n", x->leve11, y->level1, x, y);
   */
@@ -398,8 +399,8 @@ static
 int cmpLevelTableInv(const void* s1, const void* s2)
 {
   int cmp = 0;
-  const leveltable_t* x = s1;
-  const leveltable_t* y = s2;
+  const leveltable_t* x = (const leveltable_t*) s1;
+  const leveltable_t* y = (const leveltable_t*) s2;
   /*
   printf("%g %g  %d %d\n", x->leve11, y->level1, x, y);
   */
@@ -422,26 +423,11 @@ param_t;
 static
 int cmpparam(const void* s1, const void* s2)
 {
-  int cmp = 0;
-  const param_t* x = s1;
-  const param_t* y = s2;
-
-  if      ( x->param > y->param ) cmp =  1;
-  else if ( x->param < y->param ) cmp = -1;
-
-  return (cmp);
-}
-
-
-static
-int cmpltype(const void* s1, const void* s2)
-{
-  int cmp = 0;
-  const param_t* x = s1;
-  const param_t* y = s2;
+  const param_t* x = (const param_t*) s1;
+  const param_t* y = (const param_t*) s2;
 
-  if      ( x->ltype > y->ltype ) cmp =  1;
-  else if ( x->ltype < y->ltype ) cmp = -1;
+  int cmp = (( x->param > y->param ) - ( x->param < y->param )) * 2
+           + ( x->ltype > y->ltype ) - ( x->ltype < y->ltype );
 
   return (cmp);
 }
@@ -486,7 +472,6 @@ void cdi_generate_vars(stream_t *streamptr)
 	  varInfo[varid]->param = vartable[varid].param;
 	  varInfo[varid]->ltype = vartable[varid].ltype;
 	}
-      qsort(varInfo[0], nvars, sizeof(param_t), cmpltype);
       qsort(varInfo[0], nvars, sizeof(param_t), cmpparam);
       for ( varid = 0; varid < nvars; varid++ )
 	{
@@ -621,6 +606,7 @@ void cdi_generate_vars(stream_t *streamptr)
       if ( vartable[varid].lmissval ) vlistDefVarMissval(vlistID, varID, vartable[varid].missval);
 
       if ( vartable[varid].name )     vlistDefVarName(vlistID, varID, vartable[varid].name);
+      if ( vartable[varid].stdname )  vlistDefVarStdname(vlistID, varID, vartable[varid].stdname);
       if ( vartable[varid].longname ) vlistDefVarLongname(vlistID, varID, vartable[varid].longname);
       if ( vartable[varid].units )    vlistDefVarUnits(vlistID, varID, vartable[varid].units);
 
@@ -780,7 +766,7 @@ int varDefGrid(int vlistID, grid_t grid, int mode)
       ngrids = gridSize();
       if ( ngrids > 0 )
         {
-          gridIndexList = malloc(ngrids*sizeof(int));
+          gridIndexList = (int*) malloc(ngrids*sizeof(int));
           gridGetIndexList ( ngrids, gridIndexList );
           for ( i = 0; i < ngrids; i++ )
             {
diff --git a/libcdi/src/varscan.h b/libcdi/src/varscan.h
index f2e17e6..cee34b2 100644
--- a/libcdi/src/varscan.h
+++ b/libcdi/src/varscan.h
@@ -9,7 +9,7 @@
 void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
 		  int level1, int level2, int level_sf, int level_unit, int prec,
 		  int *pvarID, int *plevelID, int tsteptype, int numavg, int ltype,
-		  const char *name, const char *longname, const char *units);
+		  const char *name, const char *stdname, const char *longname, const char *units);
 
 void varDefVCT(size_t vctsize, double *vctptr);
 void varDefZAxisReference(int nlev, int nvgrid, char *uuid);
diff --git a/libcdi/src/version.c b/libcdi/src/version.c
index 6f0189e..2201cc0 100644
--- a/libcdi/src/version.c
+++ b/libcdi/src/version.c
@@ -11,17 +11,15 @@
 #else
 #  error "VERSION undefined"
 #endif
-
+/*
 #if defined(__cplusplus)
 extern "C" {
 #endif
-
 char *cdiLibraryVersion(void);
-
 #if defined(__cplusplus)
 }
 #endif
-
+*/
 char *cdiLibraryVersion(void)
 {
   return (cdi_libvers);
diff --git a/libcdi/src/vlist.c b/libcdi/src/vlist.c
index 5252b7c..70951ce 100644
--- a/libcdi/src/vlist.c
+++ b/libcdi/src/vlist.c
@@ -46,15 +46,20 @@ static int vlistIsInitialized = 0;
 #endif
 
 
-/* FIXME: implementation incomplete, fix once leaf nodes are complete */
 static int
 vlist_compare(vlist_t *a, vlist_t *b)
 {
   int diff;
-  diff = (a->nvars != b->nvars) || (a->ngrids != b->ngrids)
-    || (a->nzaxis != b->nzaxis) || (a->instID != b->instID)
-    || (a->modelID != b->modelID) || (a->tableID != b->tableID)
-    || (a->ntsteps != b->ntsteps);
+  diff = (a->nvars != b->nvars) | (a->ngrids != b->ngrids)
+    | (a->nzaxis != b->nzaxis) | (a->instID != b->instID)
+    | (a->modelID != b->modelID) | (a->tableID != b->tableID)
+    | (a->ntsteps != b->ntsteps) | (a->atts.nelems != b->atts.nelems);
+  int nvars = a->nvars;
+  for (int varID = 0; varID < nvars; ++varID)
+    diff |= vlistVarCompare(a, varID, b, varID);
+  int natts = a->atts.nelems;
+  for (int attID = 0; attID < natts; ++attID)
+    diff |= vlist_att_compare(a, CDI_GLOBAL, b, CDI_GLOBAL, attID);
   return diff;
 }
 
@@ -68,6 +73,9 @@ static void vlistPackP    ( void * vlistptr, void * buff, int size,
                             int *position, void *context);
 static int  vlistTxCode   ( void );
 
+#if !defined(__cplusplus)
+const
+#endif
 resOps vlist_ops = {
   (valCompareFunc)vlist_compare,
   (valDestroyFunc)vlist_delete,
@@ -81,14 +89,13 @@ resOps vlist_ops = {
 vlist_t *vlist_to_pointer(int code)
 {
   VLIST_INIT();
-  return reshGetVal(code, &vlist_ops );
+  return (vlist_t*) reshGetVal(code, &vlist_ops );
 }
 
 static
 void vlist_init_entry(vlist_t *vlistptr)
 {
-  vlistptr->self           = reshPut(vlistptr, &vlist_ops);
-
+  vlistptr->self           = CDI_UNDEFID;
   vlistptr->nvars          = 0;
   vlistptr->vars           = NULL;
   vlistptr->ngrids         = 0;
@@ -104,14 +111,17 @@ void vlist_init_entry(vlist_t *vlistptr)
 }
 
 static
-vlist_t *vlist_new_entry(void)
+vlist_t *vlist_new_entry(cdiResH resH)
 {
-  vlist_t *vlistptr;
-
-  vlistptr = (vlist_t *)xmalloc(sizeof(vlist_t));
-
+  vlist_t *vlistptr = (vlist_t*) xmalloc(sizeof(vlist_t));
   vlist_init_entry(vlistptr);
-
+  if (resH == CDI_UNDEFID)
+    vlistptr->self = reshPut(vlistptr, &vlist_ops);
+  else
+    {
+      vlistptr->self = resH;
+      reshReplace(resH, vlistptr, &vlist_ops);
+    }
   return (vlistptr);
 }
 
@@ -194,7 +204,7 @@ int vlistCreate(void)
 
   VLIST_INIT();
 
-  vlistptr = vlist_new_entry();
+  vlistptr = vlist_new_entry(CDI_UNDEFID);
 
   vlistID = vlistptr->self;
 
@@ -919,7 +929,7 @@ void vlistMerge(int vlistID2, int vlistID1)
           */
           if (vlistptr1->vars[varID].levinfo)
             {
-              vlistptr2->vars[varID].levinfo =
+              vlistptr2->vars[varID].levinfo = (levinfo_t*)
                 xrealloc(vlistptr2->vars[varID].levinfo, nlevs*sizeof(levinfo_t));
 
               memcpy(vlistptr2->vars[varID].levinfo+nlevs2,
@@ -1129,7 +1139,7 @@ void vlistDefNtsteps(int vlistID, int nts)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1277,7 +1287,7 @@ void vlistDefTaxis(int vlistID, int taxisID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1322,7 +1332,7 @@ void  vlistDefTable(int vlistID, int tableID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1352,7 +1362,7 @@ void vlistDefInstitut(int vlistID, int instID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1398,7 +1408,7 @@ void vlistDefModel(int vlistID, int modelID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1502,7 +1512,7 @@ void vlistChangeGridIndex(int vlistID, int index, int gridID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1528,7 +1538,7 @@ void vlistChangeGrid(int vlistID, int gridID1, int gridID2)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1595,7 +1605,7 @@ void vlistChangeZaxisIndex(int vlistID, int index, int zaxisID)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1635,7 +1645,7 @@ void vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
 
   vlist_check_ptr(__func__, vlistptr);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1660,8 +1670,8 @@ void vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
         if ( vlistptr->vars[varID].levinfo && nlevs2 != nlevs1 )
           {
             vlistptr->vars[varID].levinfo
-              = realloc(vlistptr->vars[varID].levinfo,
-                        nlevs2 * sizeof(levinfo_t));
+              = (levinfo_t*) realloc(vlistptr->vars[varID].levinfo,
+                                     nlevs2 * sizeof(levinfo_t));
 
             for ( levID = 0; levID < nlevs2; levID++ )
               vlistptr->vars[varID].levinfo[levID] = DEFAULT_LEVINFO(levID);
@@ -1705,7 +1715,7 @@ static
 int  vlistGetSizeP ( void * vlistptr, void *context)
 {
   int txsize, varID;
-  vlist_t *p = vlistptr;
+  vlist_t *p = (vlist_t*) vlistptr;
   txsize = serializeGetSize(vlist_nints, DATATYPE_INT, context);
   txsize += vlistAttsGetSize(p, CDI_GLOBAL, context);
   for ( varID = 0; varID <  p->nvars; varID++ )
@@ -1719,7 +1729,7 @@ void vlistPackP ( void * vlistptr, void * buf, int size, int *position,
                   void *context )
 {
   int varID, tempbuf[vlist_nints];
-  vlist_t *p = vlistptr;
+  vlist_t *p = (vlist_t*) vlistptr;
   tempbuf[0] = p->self;
   tempbuf[1] = p->nvars;
   tempbuf[2] = p->ntsteps;
@@ -1735,21 +1745,23 @@ void vlistPackP ( void * vlistptr, void * buf, int size, int *position,
     }
 }
 
-void vlistUnpack(char * buf, int size, int *position, int nspTarget, void *context)
+void vlistUnpack(char * buf, int size, int *position, int originNamespace,
+                 void *context, int force_id)
 {
-  int newvlist;
-  int varID, tempbuf[vlist_nints];
+  int tempbuf[vlist_nints];
   serializeUnpack(buf, size, position, tempbuf, vlist_nints, DATATYPE_INT, context);
-  newvlist = vlistCreate();
-  /* xassert(newvlist == tempbuf[0]); */
-  vlist_t *p = vlist_to_pointer(newvlist);
-  p->taxisID = namespaceAdaptKey(tempbuf[3], nspTarget);
+  int targetID = namespaceAdaptKey(tempbuf[0], originNamespace);
+  vlist_t *p = vlist_new_entry(force_id?targetID:CDI_UNDEFID);
+  xassert(!force_id || p->self == targetID);
+  if (!force_id)
+    targetID = p->self;
+  p->taxisID = namespaceAdaptKey(tempbuf[3], originNamespace);
   p->tableID = tempbuf[4];
-  p->instID = namespaceAdaptKey(tempbuf[5], nspTarget);
-  p->modelID = namespaceAdaptKey(tempbuf[6], nspTarget);
-  vlistAttsUnpack(newvlist, CDI_GLOBAL, buf, size, position, context);
-  for ( varID = 0; varID < tempbuf[1]; varID++ )
-    vlistVarUnpack(newvlist, buf, size, position, nspTarget, context);
+  p->instID = namespaceAdaptKey(tempbuf[5], originNamespace);
+  p->modelID = namespaceAdaptKey(tempbuf[6], originNamespace);
+  vlistAttsUnpack(targetID, CDI_GLOBAL, buf, size, position, context);
+  for (int varID = 0; varID < tempbuf[1]; varID++ )
+    vlistVarUnpack(targetID, buf, size, position, originNamespace, context);
 }
 
 /*
diff --git a/libcdi/src/vlist.h b/libcdi/src/vlist.h
index cbc38b4..899730d 100644
--- a/libcdi/src/vlist.h
+++ b/libcdi/src/vlist.h
@@ -48,8 +48,11 @@ typedef struct
 levinfo_t;
 
 #define DEFAULT_LEVINFO(levID) \
+  (levinfo_t){ 0, -1, levID, levID}
+/*
+#define DEFAULT_LEVINFO(levID) \
   (levinfo_t){ .flag = 0, .index = -1, .flevelID = levID, .mlevelID = levID}
-
+*/
 typedef struct
 {
   int ens_index;
@@ -155,7 +158,8 @@ int      vlistHasTime(int vlistID);
 int      vlistDelAtts(int vlistID, int varID);
 int      vlistCopyVarAtts(int vlistID1, int varID_1, int vlistID2, int varID_2);
 
-void     vlistUnpack(char * buffer, int bufferSize, int * pos, int, void *context);
+void     vlistUnpack(char * buffer, int bufferSize, int * pos,
+                     int originNamespace, void *context, int force_id);
 
 /*      vlistDefVarValidrange: Define the valid range of a Variable */
 void    vlistDefVarValidrange(int vlistID, int varID, const double *validrange);
@@ -163,6 +167,9 @@ void    vlistDefVarValidrange(int vlistID, int varID, const double *validrange);
 /*      vlistInqVarValidrange: Get the valid range of a Variable */
 int     vlistInqVarValidrange(int vlistID, int varID, double *validrange);
 
+int vlist_att_compare(vlist_t *a, int varIDA, vlist_t *b, int varIDB,
+                      int attnum);
+
 #if  defined  (HAVE_LIBGRIB_API)
 extern int   cdiNAdditionalGRIBKeys;
 extern char* cdiAdditionalGRIBKeys[];
diff --git a/libcdi/src/vlist_att.c b/libcdi/src/vlist_att.c
index 6643992..02fa786 100644
--- a/libcdi/src/vlist_att.c
+++ b/libcdi/src/vlist_att.c
@@ -473,6 +473,32 @@ vlistAttTypeLookup(cdi_att_t *attp)
   return type;
 }
 
+
+int vlist_att_compare(vlist_t *a, int varIDA, vlist_t *b, int varIDB,
+                      int attnum)
+{
+  cdi_atts_t *attspa = get_attsp(a, varIDA),
+    *attspb = get_attsp(b, varIDB);
+  if (attspa == NULL && attspb == NULL)
+    return 0;
+  xassert(attnum >= 0 && attnum < (int)attspa->nelems
+          && attnum < (int)attspb->nelems);
+  cdi_att_t *attpa = attspa->value + attnum,
+    *attpb = attspb->value + attnum;
+  size_t len;
+  if ((len = attpa->namesz) != attpb->namesz)
+    return 1;
+  int diff;
+  if ((diff = memcmp(attpa->name, attpb->name, len)))
+    return 1;
+  if (attpa->indtype != attpb->indtype
+      || attpa->exdtype != attpb->exdtype
+      || attpa->nelems != attpb->nelems)
+    return 1;
+  return memcmp(attpa->xvalue, attpb->xvalue, attpa->xsz);
+}
+
+
 static int
 vlistAttGetSize(vlist_t *vlistptr, int varID, int attnum, void *context)
 {
@@ -544,7 +570,7 @@ vlistAttUnpack(int vlistID, int varID,
 
   serializeUnpack(buf, size, position,
                   tempbuf, vlist_att_nints, DATATYPE_INT, context);
-  attName = xmalloc(tempbuf[0] + 1);
+  attName = (char*) xmalloc(tempbuf[0] + 1);
   serializeUnpack(buf, size, position, attName, tempbuf[0], DATATYPE_TXT, context);
   attName[tempbuf[0]] = '\0';
   switch (tempbuf[2])
diff --git a/libcdi/src/vlist_var.c b/libcdi/src/vlist_var.c
index cbb0949..f602cf1 100644
--- a/libcdi/src/vlist_var.c
+++ b/libcdi/src/vlist_var.c
@@ -15,7 +15,11 @@
 #include "serialize.h"
 #include "error.h"
 
-extern resOps vlist_ops;
+extern
+#if !defined(__cplusplus)
+const
+#endif
+resOps vlist_ops;
 
 static
 void vlistvarInitEntry(int vlistID, int varID)
@@ -204,7 +208,7 @@ int vlistDefVar(int vlistID, int gridID, int zaxisID, int tsteptype)
   vlist_t *vlistptr;
 
   vlistptr = vlist_to_pointer(vlistID);
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return CDI_UNDEFID;
@@ -264,7 +268,7 @@ cdiVlistCreateVarLevInfo(vlist_t *vlistptr, int varID)
   int zaxisID = vlistptr->vars[varID].zaxisID;
   int nlevs = zaxisInqSize(zaxisID);
 
-  vlistptr->vars[varID].levinfo = malloc(nlevs * sizeof(levinfo_t));
+  vlistptr->vars[varID].levinfo = (levinfo_t*) malloc(nlevs * sizeof(levinfo_t));
 
   for (int levID = 0; levID < nlevs; levID++ )
       vlistptr->vars[varID].levinfo[levID] = DEFAULT_LEVINFO(levID);
@@ -293,7 +297,7 @@ void vlistDefVarParam(int vlistID, int varID, int param)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -326,7 +330,7 @@ void vlistDefVarCode(int vlistID, int varID, int code)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -462,7 +466,7 @@ The function @func{vlistInqVarCode} returns the code number of a variable.
 int vlistInqVarCode(int vlistID, int varID)
 {
   vlist_t *vlistptr;
-  int param, code;
+  int param, code = -varID-1;
   int pdis, pcat, pnum;
 
   vlistptr = vlist_to_pointer(vlistID);
@@ -471,7 +475,8 @@ int vlistInqVarCode(int vlistID, int varID)
 
   param = vlistptr->vars[varID].param;
   cdiDecodeParam(param, &pnum, &pcat, &pdis);
-  code = pnum;
+
+  if ( pdis == 255 ) code = pnum;
 
   if ( code < 0 && vlistptr->vars[varID].tableID != -1 && vlistptr->vars[varID].name != NULL )
     {
@@ -840,7 +845,7 @@ void vlistDefVarDatatype(int vlistID, int varID, int datatype)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -867,7 +872,7 @@ void vlistDefVarInstitut(int vlistID, int varID, int instID)
 
   vlistptr = vlist_to_pointer(vlistID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -891,7 +896,7 @@ void vlistDefVarModel(int vlistID, int varID, int modelID)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -917,7 +922,7 @@ void vlistDefVarTable(int vlistID, int varID, int tableID)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -935,7 +940,7 @@ void vlistDefVarTable(int vlistID, int varID, int tableID)
     param = vlistptr->vars[varID].param;
 
     cdiDecodeParam(param, &pnum, &pcat, &pdis);
-  
+
     vlistptr->vars[varID].param = cdiEncodeParam(pnum, tablenum, pdis);
   }
 }
@@ -972,7 +977,7 @@ void vlistDefVarName(int vlistID, int varID, const char *name)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1013,7 +1018,7 @@ void vlistDefVarLongname(int vlistID, int varID, const char *longname)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1054,7 +1059,7 @@ void vlistDefVarStdname(int vlistID, int varID, const char *stdname)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1095,7 +1100,7 @@ void vlistDefVarUnits(int vlistID, int varID, const char *units)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1191,7 +1196,7 @@ void vlistDefVarExtra(int vlistID, int varID, const char *extra)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1287,7 +1292,7 @@ double vlistInqVarScalefactor(int vlistID, int varID)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return 1.0;
@@ -1316,7 +1321,7 @@ void vlistDefVarScalefactor(int vlistID, int varID, double scalefactor)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed." );
       return;
@@ -1334,7 +1339,7 @@ void vlistDefVarAddoffset(int vlistID, int varID, double addoffset)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1352,7 +1357,7 @@ void vlistDefVarTsteptype(int vlistID, int varID, int tsteptype)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1378,7 +1383,7 @@ void vlistDefVarTimave(int vlistID, int varID, int timave)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1404,7 +1409,7 @@ void vlistDefVarTimaccu(int vlistID, int varID, int timaccu)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1430,7 +1435,7 @@ void vlistDefVarTypeOfGeneratingProcess(int vlistID, int varID, int typeOfGenera
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1522,7 +1527,7 @@ void vlistDefFlag(int vlistID, int varID, int levID, int flag)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1652,7 +1657,7 @@ void vlistDefIndex(int vlistID, int varID, int levelID, int index)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1693,7 +1698,7 @@ void vlistChangeVarZaxis(int vlistID, int varID, int zaxisID)
   int nvars, index;
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1743,7 +1748,7 @@ void vlistChangeVarGrid(int vlistID, int varID, int gridID)
   int nvars, index;
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1791,7 +1796,7 @@ void vlistDefVarCompType(int vlistID, int varID, int comptype)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1817,7 +1822,7 @@ void vlistDefVarCompLevel(int vlistID, int varID, int complevel)
 {
   vlist_t *vlistptr;
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1875,6 +1880,8 @@ void  vlistDefVarXYZ(int vlistID, int varID, int xyz)
 
   vlistCheckVarID(__func__, vlistID, varID);
 
+  if ( xyz == 3 ) xyz = 321;
+
   /* check xyz dimension order */
   {
     int dimorder[3];
@@ -2094,7 +2101,7 @@ void     vlistDefVarIOrank   ( int vlistID, int varID, int iorank )
 
   vlistCheckVarID ( __func__, vlistID, varID );
 
-  if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
+  if ( reshGetStatus ( vlistID, &vlist_ops ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -2116,6 +2123,51 @@ int vlistInqVarIOrank(int vlistID, int varID)
 }
 
 
+int vlistVarCompare(vlist_t *a, int varIDA, vlist_t *b, int varIDB)
+{
+  xassert(a && b
+          && varIDA >= 0 && varIDA < a->nvars
+          && varIDB >= 0 && varIDB < b->nvars);
+  var_t *pva = a->vars + varIDA, *pvb = b->vars + varIDB;
+#define FCMP(f) ((pva->f) != (pvb->f))
+#define FCMPSTR(fs) ((pva->fs) != (pvb->fs) && strcmp((pva->fs), (pvb->fs)))
+#define FCMP2(f) (namespaceResHDecode(pva->f).idx       \
+                  != namespaceResHDecode(pvb->f).idx)
+  int diff = FCMP(fvarID) | FCMP(mvarID) | FCMP(flag) | FCMP(param)
+    | FCMP(datatype) | FCMP(tsteptype) | FCMP(timave) | FCMP(timaccu)
+    | FCMP(chunktype) | FCMP(xyz) | FCMP2(gridID) | FCMP2(zaxisID)
+    | FCMP2(instID) | FCMP2(modelID) | FCMP2(tableID) | FCMP(missvalused)
+    | FCMP(missval) | FCMP(addoffset) | FCMP(scalefactor) | FCMPSTR(name)
+    | FCMPSTR(longname) | FCMPSTR(stdname) | FCMPSTR(units) | FCMPSTR(extra)
+    | FCMP(comptype) | FCMP(complevel) | FCMP(lvalidrange)
+    | FCMP(validrange[0]) | FCMP(validrange[1]);
+#undef FCMP
+#undef FCMP2
+  if ((diff |= ((pva->levinfo == NULL) ^ (pvb->levinfo == NULL))))
+    return 1;
+  if (pva->levinfo)
+    {
+      int zaxisID = pva->zaxisID;
+      int nlevs = zaxisInqSize(zaxisID);
+      diff |= (memcmp(pva->levinfo, pvb->levinfo, sizeof (levinfo_t) * nlevs)
+               != 0);
+      if (diff)
+        return 1;
+    }
+  int natts = a->vars[varIDA].atts.nelems;
+  if (natts != b->vars[varIDB].atts.nelems)
+    return 1;
+  for (int attID = 0; attID < natts; ++attID)
+    diff |= vlist_att_compare(a, varIDA, b, varIDB, attID);
+  if ((diff |= ((pva->ensdata == NULL) ^ (pvb->ensdata == NULL))))
+    return 1;
+  if (pva->ensdata)
+    diff = (memcmp(pva->ensdata, pvb->ensdata, sizeof (*(pva->ensdata)))) != 0;
+  return diff;
+}
+
+
+
 enum {
   vlistvar_nints = 20,
   vlistvar_ndbls = 3,
@@ -2210,7 +2262,7 @@ imax(int a, int b)
 
 
 void vlistVarUnpack(int vlistID, char * buf, int size, int *position,
-		    int nspTarget, void *context)
+		    int originNamespace, void *context)
 {
   double dtempbuf[vlistvar_ndbls];
   int tempbuf[vlistvar_nints];
@@ -2223,11 +2275,11 @@ void vlistVarUnpack(int vlistID, char * buf, int size, int *position,
                   dtempbuf, vlistvar_ndbls, DATATYPE_FLT64, context);
 
   newvar = vlistDefVar ( vlistID,
-			 namespaceAdaptKey ( tempbuf[1], nspTarget ),
-			 namespaceAdaptKey ( tempbuf[2], nspTarget ),
+			 namespaceAdaptKey ( tempbuf[1], originNamespace ),
+			 namespaceAdaptKey ( tempbuf[2], originNamespace ),
 			 tempbuf[3]);
   if (tempbuf[4] || tempbuf[5] || tempbuf[6] || tempbuf[7])
-    varname = xmalloc(imax(imax(imax(tempbuf[4],tempbuf[5]),tempbuf[6]),
+    varname = (char*) xmalloc(imax(imax(imax(tempbuf[4],tempbuf[5]),tempbuf[6]),
                            tempbuf[7])+ 1);
   if (tempbuf[4])
   {
@@ -2260,9 +2312,9 @@ void vlistVarUnpack(int vlistID, char * buf, int size, int *position,
   if ( varname ) free ( varname );
   vlistDefVarDatatype(vlistID, newvar, tempbuf[8]);
   vlistDefVarInstitut ( vlistID, newvar,
-			namespaceAdaptKey ( tempbuf[10], nspTarget ));
+			namespaceAdaptKey ( tempbuf[10], originNamespace ));
   vlistDefVarModel ( vlistID, newvar,
-		     namespaceAdaptKey ( tempbuf[11], nspTarget ));
+		     namespaceAdaptKey ( tempbuf[11], originNamespace ));
   vlistDefVarTable(vlistID, newvar, tempbuf[12]);
   /* FIXME: changing the table might change the param code */
   vlistDefVarParam(vlistID, newvar, tempbuf[9]);
diff --git a/libcdi/src/vlist_var.h b/libcdi/src/vlist_var.h
index 32968d7..baba96a 100644
--- a/libcdi/src/vlist_var.h
+++ b/libcdi/src/vlist_var.h
@@ -14,6 +14,7 @@ void vlistVarPack(vlist_t *p, int varID,
                   char * buffer, int bufferSize, int * pos, void *context);
 void vlistVarUnpack(int vlistID,
                     char * buf, int size, int *position, int, void *context);
+int vlistVarCompare(vlist_t *a, int varIDA, vlist_t *b, int varIDB);
 void vlistDefVarIOrank    ( int, int, int );
 int  vlistInqVarIOrank    ( int, int );
 
diff --git a/libcdi/src/zaxis.c b/libcdi/src/zaxis.c
index ec498ce..2ddcfd4 100644
--- a/libcdi/src/zaxis.c
+++ b/libcdi/src/zaxis.c
@@ -21,7 +21,7 @@
 #define  LevelDown  2
 
 
-static struct {
+static const struct {
   unsigned char positive;   // 1: up;  2: down
   char *name;
   char *longname;
@@ -57,7 +57,9 @@ ZaxistypeEntry[] = {
   { /* 25 */ 0, "height",            "generalized height",     "height",         ""},
 };
 
-static int CDI_MaxZaxistype = sizeof(ZaxistypeEntry) / sizeof(ZaxistypeEntry[0]);
+enum {
+  CDI_NumZaxistype = sizeof(ZaxistypeEntry) / sizeof(ZaxistypeEntry[0]),
+};
 
 
 typedef struct {
@@ -84,15 +86,20 @@ typedef struct {
 }
 zaxis_t;
 
-static int    zaxisCompareP    ( void * zaxisptr1, void * zaxisptr2 );
+static int zaxisCompareP(zaxis_t *z1, zaxis_t *z2);
 static void   zaxisDestroyP    ( void * zaxisptr );
 static void   zaxisPrintP      ( void * zaxisptr, FILE * fp );
 static int    zaxisGetPackSize ( void * zaxisptr, void *context);
 static void   zaxisPack        ( void * zaxisptr, void * buffer, int size, int *pos, void *context);
 static int    zaxisTxCode      ( void );
 
-resOps zaxisOps = { zaxisCompareP, zaxisDestroyP, zaxisPrintP
-                    , zaxisGetPackSize, zaxisPack, zaxisTxCode
+static const resOps zaxisOps = {
+  (int (*)(void *, void *))zaxisCompareP,
+  zaxisDestroyP,
+  zaxisPrintP,
+  zaxisGetPackSize,
+  zaxisPack,
+  zaxisTxCode
 };
 
 static int  ZAXIS_Debug = 0;   /* If set to 1, debugging */
@@ -124,15 +131,19 @@ void zaxisDefaultValue ( zaxis_t *zaxisptr )
 
 
 static
-zaxis_t *zaxisNewEntry(void)
+zaxis_t *zaxisNewEntry(int id)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = (zaxis_t *) xmalloc(sizeof(zaxis_t));
+  zaxis_t *zaxisptr = (zaxis_t *)xmalloc(sizeof(zaxis_t));
 
   zaxisDefaultValue ( zaxisptr );
 
-  zaxisptr->self = reshPut (( void * ) zaxisptr, &zaxisOps );
+  if (id == CDI_UNDEFID)
+    zaxisptr->self = reshPut(zaxisptr, &zaxisOps);
+  else
+    {
+      zaxisptr->self = id;
+      reshReplace(id, zaxisptr, &zaxisOps);
+    }
 
   return (zaxisptr);
 }
@@ -154,9 +165,7 @@ void zaxisInit(void)
 static
 void zaxis_copy(zaxis_t *zaxisptr2, zaxis_t *zaxisptr1)
 {
-  int zaxisID2;
-
-  zaxisID2 = zaxisptr2->self;
+  int zaxisID2 = zaxisptr2->self;
   memcpy(zaxisptr2, zaxisptr1, sizeof(zaxis_t));
   zaxisptr2->self = zaxisID2;
 }
@@ -175,6 +184,35 @@ int zaxisSize(void)
   return reshCountType ( &zaxisOps );
 }
 
+static int
+zaxisCreate_(int zaxistype, int size, int id)
+{
+  zaxis_t *zaxisptr = zaxisNewEntry(id);
+
+  zaxisptr->type = zaxistype;
+  zaxisptr->size = size;
+
+  if ( zaxistype >= CDI_NumZaxistype || zaxistype < 0 )
+    Error("Internal problem! zaxistype > CDI_MaxZaxistype");
+
+  int zaxisID = zaxisptr->self;
+  zaxisDefName(zaxisID, ZaxistypeEntry[zaxistype].name);
+  zaxisDefLongname(zaxisID, ZaxistypeEntry[zaxistype].longname);
+  zaxisDefUnits(zaxisID, ZaxistypeEntry[zaxistype].units);
+
+  if ( *ZaxistypeEntry[zaxistype].stdname )
+    strcpy(zaxisptr->stdname, ZaxistypeEntry[zaxistype].stdname);
+
+  zaxisptr->positive = ZaxistypeEntry[zaxistype].positive;
+
+  double *vals = zaxisptr->vals = (double *)xmalloc(size*sizeof(double));
+
+  for ( int ilev = 0; ilev < size; ilev++ )
+    vals[ilev] = 0.0;
+
+  return zaxisID;
+}
+
 
 /*
 @Function  zaxisCreate
@@ -218,47 +256,15 @@ zaxisDefLevels(zaxisID, levs);
 */
 int zaxisCreate(int zaxistype, int size)
 {
-  int ilev;
-  int zaxisID;
-  double *vals;
-  zaxis_t *zaxisptr;
-
   if ( CDI_Debug )
     Message("zaxistype: %d size: %d ", zaxistype, size);
 
   zaxisInit ();
-
-  zaxisptr = zaxisNewEntry();
-
-  zaxisID = zaxisptr->self;
-
-  zaxisptr->type = zaxistype;
-  zaxisptr->size = size;
-
-  if ( zaxistype > CDI_MaxZaxistype )
-    Error("Internal problem! zaxistype > CDI_MaxZaxistype");
-
-  zaxisDefName(zaxisID, ZaxistypeEntry[zaxistype].name);
-  zaxisDefLongname(zaxisID, ZaxistypeEntry[zaxistype].longname);
-  zaxisDefUnits(zaxisID, ZaxistypeEntry[zaxistype].units);
-
-  if ( *ZaxistypeEntry[zaxistype].stdname )
-    strcpy(zaxisptr->stdname, ZaxistypeEntry[zaxistype].stdname);
-
-  zaxisptr->positive = ZaxistypeEntry[zaxistype].positive;
-
-  vals = (double *) malloc(size*sizeof(double));
-
-  for ( ilev = 0; ilev < size; ilev++ )
-    vals[ilev] = 0.0;
-
-  zaxisptr->vals = vals;
-
-  return (zaxisID);
+  return zaxisCreate_(zaxistype, size, CDI_UNDEFID);
 }
 
 
-void zaxisDestroyKernel( zaxis_t * zaxisptr )
+static void zaxisDestroyKernel( zaxis_t * zaxisptr )
 {
   int id;
 
@@ -289,9 +295,7 @@ void zaxisDestroyKernel( zaxis_t * zaxisptr )
 */
 void zaxisDestroy(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxisDestroyKernel ( zaxisptr );
 }
@@ -308,7 +312,7 @@ char *zaxisNamePtr(int zaxistype)
 {
   char *name;
 
-  if ( zaxistype >= 0 && zaxistype < CDI_MaxZaxistype )
+  if ( zaxistype >= 0 && zaxistype < CDI_NumZaxistype )
     name = ZaxistypeEntry[zaxistype].longname;
   else
     name = ZaxistypeEntry[ZAXIS_GENERIC].longname;
@@ -340,7 +344,7 @@ void zaxisDefName(int zaxisID, const char *name)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -351,7 +355,10 @@ void zaxisDefName(int zaxisID, const char *name)
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( name )
-    strcpy(zaxisptr->name, name);
+    {
+      strncpy(zaxisptr->name, name, CDI_MAX_NAME - 1);
+      zaxisptr->name[CDI_MAX_NAME - 1] = '\0';
+    }
 }
 
 /*
@@ -372,7 +379,7 @@ void zaxisDefLongname(int zaxisID, const char *longname)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -383,7 +390,10 @@ void zaxisDefLongname(int zaxisID, const char *longname)
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( longname )
-    strcpy(zaxisptr->longname, longname);
+    {
+      strncpy(zaxisptr->longname, longname, CDI_MAX_NAME - 1);
+      zaxisptr->longname[CDI_MAX_NAME - 1] = '\0';
+    }
 }
 
 /*
@@ -404,7 +414,7 @@ void zaxisDefUnits(int zaxisID, const char *units)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -415,7 +425,10 @@ void zaxisDefUnits(int zaxisID, const char *units)
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( units )
-    strcpy(zaxisptr->units, units);
+    {
+      strncpy(zaxisptr->units, units, CDI_MAX_NAME - 1);
+      zaxisptr->units[CDI_MAX_NAME - 1] = '\0';
+    }
 }
 
 /*
@@ -439,9 +452,7 @@ The function @func{zaxisInqName} returns the name of a Z-axis.
 */
 void zaxisInqName(int zaxisID, char *name)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -469,9 +480,7 @@ The function @func{zaxisInqLongname} returns the longname of a Z-axis.
 */
 void zaxisInqLongname(int zaxisID, char *longname)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -499,9 +508,7 @@ The function @func{zaxisInqUnits} returns the units of a Z-axis.
 */
 void zaxisInqUnits(int zaxisID, char *units)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -511,9 +518,7 @@ void zaxisInqUnits(int zaxisID, char *units)
 
 void zaxisInqStdname(int zaxisID, char *stdname)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -525,7 +530,7 @@ void zaxisDefPrec(int zaxisID, int prec)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -541,9 +546,7 @@ void zaxisDefPrec(int zaxisID, int prec)
 
 int zaxisInqPrec(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -555,7 +558,7 @@ void zaxisDefPositive(int zaxisID, int positive)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -571,9 +574,7 @@ void zaxisDefPositive(int zaxisID, int positive)
 
 int zaxisInqPositive(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -585,7 +586,7 @@ void zaxisDefLtype(int zaxisID, int ltype)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -601,9 +602,7 @@ void zaxisDefLtype(int zaxisID, int ltype)
 
 int zaxisInqLtype(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -626,12 +625,9 @@ The function @func{zaxisDefLevels} defines the levels of a Z-axis.
 */
 void zaxisDefLevels(int zaxisID, const double *levels)
 {
-  int ilev;
-  int size;
-  double *vals;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -641,11 +637,11 @@ void zaxisDefLevels(int zaxisID, const double *levels)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  int size = zaxisptr->size;
 
-  vals = zaxisptr->vals;
+  double *vals = zaxisptr->vals;
 
-  for ( ilev = 0; ilev < size; ilev++ )
+  for (int ilev = 0; ilev < size; ilev++ )
     vals[ilev] = levels[ilev];
 }
 
@@ -668,7 +664,7 @@ void zaxisDefLevel(int zaxisID, int levelID, double level)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -687,7 +683,7 @@ void zaxisDefNlevRef(int zaxisID, const int nhlev)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -703,16 +699,11 @@ void zaxisDefNlevRef(int zaxisID, const int nhlev)
 
 int zaxisInqNlevRef(int zaxisID)
 {
-  int nhlev = -1;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  nhlev = zaxisptr->nhlev;
-
-  return (nhlev);
+  return (zaxisptr->nhlev);
 }
 
 /*
@@ -733,7 +724,7 @@ void zaxisDefNumber(int zaxisID, const int number)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -763,16 +754,11 @@ The function @func{zaxisInqNumber} returns the reference number to a generalized
 */
 int zaxisInqNumber(int zaxisID)
 {
-  int number = -1;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  number = zaxisptr->number;
-
-  return (number);
+  return (zaxisptr->number);
 }
 
 /*
@@ -793,7 +779,7 @@ void zaxisDefUUID(int zaxisID, const char *uuid)
 {
   zaxis_t *zaxisptr;
 
-    if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+    if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -825,9 +811,7 @@ The function @func{zaxisInqUUID} returns the UUID to a generalized Z-axis.
 */
 void zaxisInqUUID(int zaxisID, char *uuid)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -853,9 +837,7 @@ The function @func{zaxisInqLevel} returns one level of a Z-axis.
 double zaxisInqLevel(int zaxisID, int levelID)
 {
   double level = 0;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -868,9 +850,7 @@ double zaxisInqLevel(int zaxisID, int levelID)
 double zaxisInqLbound(int zaxisID, int index)
 {
   double level = 0;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -885,9 +865,7 @@ double zaxisInqLbound(int zaxisID, int index)
 double zaxisInqUbound(int zaxisID, int index)
 {
   double level = 0;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -901,9 +879,7 @@ double zaxisInqUbound(int zaxisID, int index)
 
 const double *zaxisInqLevelsPtr(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -929,16 +905,12 @@ The function @func{zaxisInqLevels} returns all levels of a Z-axis.
 */
 void zaxisInqLevels(int zaxisID, double *levels)
 {
-  int size;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
-  for ( i = 0; i < size; i++ )
+  int size = zaxisptr->size;
+  for (int i = 0; i < size; i++ )
     levels[i] =  zaxisptr->vals[i];
 }
 
@@ -946,10 +918,7 @@ void zaxisInqLevels(int zaxisID, double *levels)
 int zaxisInqLbounds(int zaxisID, double *lbounds)
 {
   int size = 0;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -958,7 +927,7 @@ int zaxisInqLbounds(int zaxisID, double *lbounds)
       size = zaxisptr->size;
 
       if ( lbounds )
-        for ( i = 0; i < size; i++ )
+        for (int i = 0; i < size; i++ )
           lbounds[i] =  zaxisptr->lbounds[i];
     }
 
@@ -969,10 +938,7 @@ int zaxisInqLbounds(int zaxisID, double *lbounds)
 int zaxisInqUbounds(int zaxisID, double *ubounds)
 {
   int size = 0;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -981,7 +947,7 @@ int zaxisInqUbounds(int zaxisID, double *ubounds)
       size = zaxisptr->size;
 
       if ( ubounds )
-        for ( i = 0; i < size; i++ )
+        for (int i = 0; i < size; i++ )
           ubounds[i] =  zaxisptr->ubounds[i];
     }
 
@@ -992,10 +958,7 @@ int zaxisInqUbounds(int zaxisID, double *ubounds)
 int zaxisInqWeights(int zaxisID, double *weights)
 {
   int size = 0;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -1004,7 +967,7 @@ int zaxisInqWeights(int zaxisID, double *weights)
       size = zaxisptr->size;
 
       if ( weights )
-        for ( i = 0; i < size; i++ )
+        for ( int i = 0; i < size; i++ )
           weights[i] =  zaxisptr->weights[i];
     }
 
@@ -1014,20 +977,18 @@ int zaxisInqWeights(int zaxisID, double *weights)
 
 int zaxisInqLevelID(int zaxisID, double level)
 {
-  int size;
   int levelID = CDI_UNDEFID;
-  int i;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
-  for ( i = 0; i < size; i++ )
-    if ( fabs(level-zaxisptr->vals[i]) < DBL_EPSILON ) break;
-
-  if ( i < size ) levelID = i;
+  int size = zaxisptr->size;
+  for ( int i = 0; i < size; i++ )
+    if ( fabs(level-zaxisptr->vals[i]) < DBL_EPSILON )
+      {
+        levelID = i;
+        break;
+      }
 
   return (levelID);
 }
@@ -1059,9 +1020,7 @@ The valid CDI Z-axis types are @func{ZAXIS_GENERIC}, @func{ZAXIS_SURFACE},
 */
 int zaxisInqType(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -1086,14 +1045,11 @@ The function @func{zaxisInqSize} returns the size of a Z-axis.
 */
 int zaxisInqSize(int zaxisID)
 {
-  int size = 1;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  int size = zaxisptr->size;
 
   return (size);
 }
@@ -1101,45 +1057,36 @@ int zaxisInqSize(int zaxisID)
 
 void cdiCheckZaxis(int zaxisID)
 {
-  int size, i, found;
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   if ( zaxisInqType(zaxisID) == ZAXIS_GENERIC )
     {
-      size = zaxisptr->size;
+      int size = zaxisptr->size;
       if ( size > 1 )
         {
           /* check direction */
           if ( ! zaxisptr->direction )
             {
-              found = 0;
-              for ( i = 1; i < size; i++ )
-                if ( zaxisptr->vals[i] > zaxisptr->vals[i-1] )
-                  found++;
-              if ( found == size-1 )
+              int ups = 0, downs = 0;
+              for ( int i = 1; i < size; i++ )
+                {
+                  ups += (zaxisptr->vals[i] > zaxisptr->vals[i-1]);
+                  downs += (zaxisptr->vals[i] < zaxisptr->vals[i-1]);
+                }
+              if ( ups == size-1 )
                 {
                   zaxisptr->direction = LevelUp;
                 }
-              else
+              else if ( downs == size-1 )
                 {
-                  found = 0;
-                  for ( i = 1; i < size; i++ )
-                    if ( zaxisptr->vals[i] < zaxisptr->vals[i-1] )
-                      found++;
-                  if ( found == size-1 )
-                    {
-                      zaxisptr->direction = LevelDown;
-                    }
+                  zaxisptr->direction = LevelDown;
+                }
+              else /* !zaxisptr->direction */
+                {
+                  Warning("Direction undefined for zaxisID %d", zaxisID);
                 }
-            }
-          /* check consistent */
-          if ( !zaxisptr->direction )
-            {
-              Warning("Direction undefined for zaxisID %d", zaxisID);
             }
         }
     }
@@ -1150,7 +1097,7 @@ void zaxisDefVct(int zaxisID, int size, const double *vct)
 {
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1174,9 +1121,7 @@ void zaxisDefVct(int zaxisID, int size, const double *vct)
 
 void zaxisInqVct(int zaxisID, double *vct)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -1186,9 +1131,7 @@ void zaxisInqVct(int zaxisID, double *vct)
 
 int zaxisInqVctSize(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -1198,9 +1141,7 @@ int zaxisInqVctSize(int zaxisID)
 
 const double *zaxisInqVctPtr(int zaxisID)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -1210,10 +1151,9 @@ const double *zaxisInqVctPtr(int zaxisID)
 
 void zaxisDefLbounds(int zaxisID, const double *lbounds)
 {
-  size_t size;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1223,14 +1163,14 @@ void zaxisDefLbounds(int zaxisID, const double *lbounds)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  size_t size = zaxisptr->size;
 
   if ( CDI_Debug )
     if ( zaxisptr->lbounds != NULL )
       Warning("Lower bounds already defined for zaxisID = %d", zaxisID);
 
   if ( zaxisptr->lbounds == NULL )
-    zaxisptr->lbounds = (double *) malloc(size*sizeof(double));
+    zaxisptr->lbounds = (double *)xmalloc(size*sizeof(double));
 
   memcpy(zaxisptr->lbounds, lbounds, size*sizeof(double));
 }
@@ -1238,10 +1178,9 @@ void zaxisDefLbounds(int zaxisID, const double *lbounds)
 
 void zaxisDefUbounds(int zaxisID, const double *ubounds)
 {
-  size_t size;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1251,14 +1190,14 @@ void zaxisDefUbounds(int zaxisID, const double *ubounds)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  size_t size = zaxisptr->size;
 
   if ( CDI_Debug )
     if ( zaxisptr->ubounds != NULL )
       Warning("Upper bounds already defined for zaxisID = %d", zaxisID);
 
   if ( zaxisptr->ubounds == NULL )
-    zaxisptr->ubounds = (double *) malloc(size*sizeof(double));
+    zaxisptr->ubounds = (double *)xmalloc(size*sizeof(double));
 
   memcpy(zaxisptr->ubounds, ubounds, size*sizeof(double));
 }
@@ -1266,10 +1205,9 @@ void zaxisDefUbounds(int zaxisID, const double *ubounds)
 
 void zaxisDefWeights(int zaxisID, const double *weights)
 {
-  size_t size;
   zaxis_t *zaxisptr;
 
-  if ( reshGetStatus ( zaxisID, &zaxisOps ) == CLOSED )
+  if ( reshGetStatus ( zaxisID, &zaxisOps ) == RESH_CLOSED )
     {
       Warning("%s", "Operation not executed.");
       return;
@@ -1279,14 +1217,14 @@ void zaxisDefWeights(int zaxisID, const double *weights)
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
-  size = zaxisptr->size;
+  size_t size = zaxisptr->size;
 
   if ( CDI_Debug )
     if ( zaxisptr->weights != NULL )
       Warning("Weights already defined for zaxisID = %d", zaxisID);
 
   if ( zaxisptr->weights == NULL )
-    zaxisptr->weights = (double *) malloc(size*sizeof(double));
+    zaxisptr->weights = (double *)xmalloc(size*sizeof(double));
 
   memcpy(zaxisptr->weights, weights, size*sizeof(double));
 }
@@ -1294,9 +1232,7 @@ void zaxisDefWeights(int zaxisID, const double *weights)
 
 void zaxisChangeType(int zaxisID, int zaxistype)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -1306,16 +1242,14 @@ void zaxisChangeType(int zaxisID, int zaxistype)
 
 void zaxisResize(int zaxisID, int size)
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
   zaxisptr->size = size;
 
   if ( zaxisptr->vals )
-    zaxisptr->vals = (double *) realloc(zaxisptr->vals, size*sizeof(double));
+    zaxisptr->vals = (double *)xrealloc(zaxisptr->vals, size*sizeof(double));
 }
 
 
@@ -1324,9 +1258,7 @@ int zaxisDuplicate(int zaxisID)
   int zaxisIDnew;
   int zaxistype, zaxissize;
   int size;
-  zaxis_t *zaxisptr, *zaxisptrnew;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxis_check_ptr(zaxisID, zaxisptr);
 
@@ -1334,7 +1266,7 @@ int zaxisDuplicate(int zaxisID)
   zaxissize = zaxisInqSize(zaxisID);
 
   zaxisIDnew = zaxisCreate(zaxistype, zaxissize);
-  zaxisptrnew = ( zaxis_t * ) reshGetVal ( zaxisIDnew, &zaxisOps );
+  zaxis_t *zaxisptrnew = reshGetVal(zaxisIDnew, &zaxisOps);
 
   zaxis_copy(zaxisptrnew, zaxisptr);
 
@@ -1346,7 +1278,7 @@ int zaxisDuplicate(int zaxisID)
     {
       size = zaxissize;
 
-      zaxisptrnew->vals = (double *) malloc(size*sizeof(double));
+      zaxisptrnew->vals = (double *)xmalloc(size*sizeof(double));
       memcpy(zaxisptrnew->vals, zaxisptr->vals, size*sizeof(double));
     }
 
@@ -1354,7 +1286,7 @@ int zaxisDuplicate(int zaxisID)
     {
       size = zaxissize;
 
-      zaxisptrnew->lbounds = (double *) malloc(size*sizeof(double));
+      zaxisptrnew->lbounds = (double *)xmalloc(size*sizeof(double));
       memcpy(zaxisptrnew->lbounds, zaxisptr->lbounds, size*sizeof(double));
     }
 
@@ -1362,7 +1294,7 @@ int zaxisDuplicate(int zaxisID)
     {
       size = zaxissize;
 
-      zaxisptrnew->ubounds = (double *) malloc(size*sizeof(double));
+      zaxisptrnew->ubounds = (double *)xmalloc(size*sizeof(double));
       memcpy(zaxisptrnew->ubounds, zaxisptr->ubounds, size*sizeof(double));
     }
 
@@ -1373,7 +1305,7 @@ int zaxisDuplicate(int zaxisID)
       if ( size )
         {
           zaxisptrnew->vctsize = size;
-          zaxisptrnew->vct = (double *) malloc(size*sizeof(double));
+          zaxisptrnew->vct = (double *)xmalloc(size*sizeof(double));
           memcpy(zaxisptrnew->vct, zaxisptr->vct, size*sizeof(double));
         }
     }
@@ -1497,9 +1429,7 @@ void zaxisPrintKernel ( zaxis_t * zaxisptr, FILE * fp )
 
 void zaxisPrint ( int zaxisID )
 {
-  zaxis_t *zaxisptr;
-
-  zaxisptr = ( zaxis_t * ) reshGetVal ( zaxisID, &zaxisOps );
+  zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
 
   zaxisPrintKernel ( zaxisptr, stdout );
 }
@@ -1516,98 +1446,86 @@ void zaxisPrintP ( void * voidptr, FILE * fp )
 }
 
 
-static
-int  zaxisCompareP ( void * zaxisptr1, void * zaxisptr2 )
-{
-  zaxis_t * z1 = ( zaxis_t * ) zaxisptr1 ;
-  zaxis_t * z2 = ( zaxis_t * ) zaxisptr2 ;
-  static int differ = -1;
-  static int equal  =  0;
-  int i;
-
-  xassert ( z1 );
-  xassert ( z2 );
-
-  if ( z1->type      != z2->type )      return differ;
-  if ( z1->ltype     != z2->ltype )     return differ;
-  if ( z1->direction != z2->direction ) return differ;
-  if ( z1->prec      != z2->prec )      return differ;
-  if ( z1->size      != z2->size )      return differ;
-  if ( z1->vctsize   != z2->vctsize )   return differ;
-
-  if ( z1->vals )
+static int
+zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
+{
+  enum {
+    differ = -1,
+  };
+  int diff = 0;
+  xassert(z1 && z2);
+
+  diff |= (z1->type != z2->type)
+    | (z1->ltype != z2->ltype)
+    | (z1->direction != z2->direction)
+    | (z1->prec != z2->prec)
+    | (z1->size != z2->size)
+    | (z1->vctsize != z2->vctsize)
+    | (z1->positive != z2->positive);
+
+  if (diff)
+    return differ;
+  int size = z1->size;
+  int anyPresent = 0;
+  int present = (z1->vals != NULL);
+  diff |= (present ^ (z2->vals != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->vals ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->vals[i], z2->vals[i]) ) return differ;
+      const double *p = z1->vals, *q = z2->vals;
+      for (int i = 0; i < size; i++)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->vals )
-    return differ;
 
-  if ( z1->lbounds )
+  present = (z1->lbounds != NULL);
+  diff |= (present ^ (z2->lbounds != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->lbounds ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->lbounds[i], z2->lbounds[i]) ) return differ;
+      const double *p = z1->lbounds, *q = z2->lbounds;
+      for (int i = 0; i < size; i++)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->lbounds )
-    return differ;
 
-  if ( z1->ubounds )
+  present = (z1->ubounds != NULL);
+  diff |= (present ^ (z2->ubounds != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->ubounds ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->ubounds[i], z2->ubounds[i]) ) return differ;
+      const double *p = z1->ubounds, *q = z2->ubounds;
+      for (int i = 0; i < size; ++i)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->ubounds )
-    return differ;
 
-  if ( z1->weights )
+  present = (z1->weights != NULL);
+  diff |= (present ^ (z2->weights != NULL));
+  anyPresent |= present;
+  if (!diff && present)
     {
-      xassert ( z1->size );
-
-      if ( !z2->weights ) return differ;
-
-      for ( i = 0; i < z1->size; i++ )
-        if ( IS_NOT_EQUAL(z1->weights[i], z2->weights[i]) ) return differ;
+      const double *p = z1->weights, *q = z2->weights;
+      for (int i = 0; i < size; ++i)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->weights )
-    return differ;
 
- if ( z1->vct )
+  present = (z1->vct != NULL);
+  diff |= (present ^ (z2->vct != NULL));
+  if (!diff && present)
     {
-      xassert ( z1->vctsize );
-
-      if ( !z2->vct ) return differ;
-
-      for ( i = 0; i < z1->vctsize; i++ )
-        if ( IS_NOT_EQUAL(z1->vct[i], z2->vct[i]) ) return differ;
+      int vctsize = z1->vctsize;
+      xassert(vctsize);
+      const double *p = z1->vct, *q = z2->vct;
+      for (int i = 0; i < vctsize; ++i)
+        diff |= IS_NOT_EQUAL(p[i], q[i]);
     }
-  else if ( z2->vct )
-    return differ;
-
-  if ( memcmp ( &z1->name    , &z2->name    , CDI_MAX_NAME ))
-    return differ;
-  if ( memcmp ( &z1->longname, &z2->longname, CDI_MAX_NAME ))
-    return differ;
-  if ( memcmp ( &z1->stdname , &z2->stdname , CDI_MAX_NAME ))
-    return differ;
-  if ( memcmp ( &z1->units   , &z2->units   , CDI_MAX_NAME ))
-    return differ;
 
-  if ( z1->positive != z2->positive ) return differ;
+  if (anyPresent)
+    xassert(size);
 
-
-  return equal;
+  diff |= strcmp(z1->name, z2->name)
+    | strcmp(z1->longname, z2->longname)
+    | strcmp(z1->stdname, z2->stdname)
+    | strcmp(z1->units, z2->units);
+  return diff;
 }
 
 
@@ -1683,9 +1601,9 @@ zaxisGetPackSize(void * voidP, void *context)
 
 void
 zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
-            int * unpackBufferPos, int nspTarget, void *context)
+            int * unpackBufferPos, int originNamespace, void *context,
+            int force_id)
 {
-  zaxis_t * zaxisP;
   int intBuffer[zaxisNint], memberMask;
   uint32_t d;
   char charBuffer[zaxisNstrings * CDI_MAX_NAME];
@@ -1697,12 +1615,11 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
 
   xassert(cdiCheckSum(DATATYPE_INT, zaxisNint, intBuffer) == d);
 
-  zaxisInit ();
-
-  zaxisP = zaxisNewEntry();
-  if ( ! zaxisP ) Error("No memory");
+  zaxisInit();
 
-  xassert(namespaceAdaptKey(intBuffer[0], nspTarget) == zaxisP->self);
+  zaxis_t *zaxisP
+    = zaxisNewEntry(force_id ? namespaceAdaptKey(intBuffer[0], originNamespace)
+                    : CDI_UNDEFID);
 
   zaxisP->prec      = intBuffer[1];
   zaxisP->type      = intBuffer[2];
@@ -1717,7 +1634,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->vals = xmalloc(size * sizeof ( double ));
+      zaxisP->vals = (double*) xmalloc(size * sizeof ( double ));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->vals, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -1730,7 +1647,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->lbounds = xmalloc(size * sizeof (double));
+      zaxisP->lbounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->lbounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -1743,7 +1660,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->ubounds = xmalloc(size * sizeof (double));
+      zaxisP->ubounds = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->ubounds, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -1756,7 +1673,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->size));
 
-      zaxisP->weights = xmalloc(size * sizeof (double));
+      zaxisP->weights = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->weights, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
@@ -1769,7 +1686,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
       int size;
       xassert((size = zaxisP->vctsize));
 
-      zaxisP->vct = xmalloc(size * sizeof (double));
+      zaxisP->vct = (double*) xmalloc(size * sizeof (double));
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
                       zaxisP->vct, size, DATATYPE_FLT64, context);
       serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
diff --git a/libcdi/src/zaxis.h b/libcdi/src/zaxis.h
index 366c7b1..133316d 100644
--- a/libcdi/src/zaxis.h
+++ b/libcdi/src/zaxis.h
@@ -3,4 +3,9 @@
 
 int zaxisSize(void);
 
+void
+zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
+            int * unpackBufferPos, int originNamespace, void *context,
+            int force_id);
+
 #endif
diff --git a/libcdi/tests/Makefile.am b/libcdi/tests/Makefile.am
index afa834b..0922b40 100644
--- a/libcdi/tests/Makefile.am
+++ b/libcdi/tests/Makefile.am
@@ -42,7 +42,7 @@ pio_write_deco2d_LDADD = $(LDADD)
 endif
 
 LDADD = ../src/libcdi.la -lm
-INCLUDES   = -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_srcdir)/src
 #
 # EXTRA_DIST = $(TESTS)
 #
diff --git a/libcdi/tests/Makefile.in b/libcdi/tests/Makefile.in
index b35a251..2a0b675 100644
--- a/libcdi/tests/Makefile.in
+++ b/libcdi/tests/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -63,16 +90,18 @@ check_PROGRAMS = cksum_verify$(EXEEXT) test_grib$(EXEEXT) \
 @USE_MPI_TRUE at am__append_1 = test_resource_copy_mpi_run
 @USE_MPI_TRUE at am__append_2 = test_resource_copy_mpi
 subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/pio_cksum_asynch.in $(srcdir)/pio_cksum_cdf.in \
-	$(srcdir)/pio_cksum_fpguard.in $(srcdir)/pio_cksum_mpinonb.in \
-	$(srcdir)/pio_cksum_writer.in \
-	$(srcdir)/pio_write_deco2d_run.in $(srcdir)/pio_write_run.in \
-	$(srcdir)/test_chunk_cksum.in $(srcdir)/test_cksum_extra.in \
-	$(srcdir)/test_cksum_grib.in $(srcdir)/test_cksum_ieg.in \
-	$(srcdir)/test_cksum_nc.in $(srcdir)/test_cksum_nc2.in \
-	$(srcdir)/test_cksum_nc4.in $(srcdir)/test_cksum_service.in \
-	$(srcdir)/test_resource_copy_mpi_run.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs \
+	$(srcdir)/test_cksum_grib.in $(srcdir)/test_cksum_nc.in \
+	$(srcdir)/test_cksum_nc2.in $(srcdir)/test_cksum_nc4.in \
+	$(srcdir)/test_cksum_extra.in $(srcdir)/test_cksum_service.in \
+	$(srcdir)/test_cksum_ieg.in $(srcdir)/test_chunk_cksum.in \
+	$(srcdir)/pio_write_run.in $(srcdir)/pio_write_deco2d_run.in \
+	$(srcdir)/pio_cksum_mpinonb.in $(srcdir)/pio_cksum_fpguard.in \
+	$(srcdir)/pio_cksum_asynch.in $(srcdir)/pio_cksum_writer.in \
+	$(srcdir)/pio_cksum_cdf.in \
+	$(srcdir)/test_resource_copy_mpi_run.in \
+	$(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -103,6 +132,10 @@ am_cksum_read_OBJECTS = cksum_read.$(OBJEXT) var_cksum.$(OBJEXT) \
 cksum_read_OBJECTS = $(am_cksum_read_OBJECTS)
 cksum_read_LDADD = $(LDADD)
 cksum_read_DEPENDENCIES = ../src/libcdi.la
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
 am_cksum_verify_OBJECTS = cksum_verify.$(OBJEXT)
 cksum_verify_OBJECTS = $(am_cksum_verify_OBJECTS)
 cksum_verify_LDADD = $(LDADD)
@@ -140,23 +173,44 @@ am_test_resource_copy_mpi_OBJECTS =  \
 test_resource_copy_mpi_OBJECTS = $(am_test_resource_copy_mpi_OBJECTS)
 @USE_MPI_TRUE at test_resource_copy_mpi_DEPENDENCIES =  \
 @USE_MPI_TRUE@	../src/libcdipio.la
-test_resource_copy_mpi_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+test_resource_copy_mpi_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(test_resource_copy_mpi_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(cksum_read_SOURCES) $(cksum_verify_SOURCES) \
 	$(cksum_write_SOURCES) $(cksum_write_chunk_SOURCES) \
 	$(pio_write_SOURCES) $(pio_write_deco2d_SOURCES) \
@@ -172,26 +226,51 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
-# If stdout is a non-dumb tty, use colors.  If test -t is not supported,
-# then this fails; a conservative approach.  Of course do not redirect
-# stdout here, just stderr.
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=; \
-test "X$(AM_COLOR_TESTS)" != Xno \
-&& test "X$$TERM" != Xdumb \
-&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
-&& { \
-  red=''; \
-  grn=''; \
-  lgn=''; \
-  blu=''; \
-  std=''; \
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = { \
+  $(am__tty_colors_dummy); \
+  if test "X$(AM_COLOR_TESTS)" = Xno; then \
+    am__color_tests=no; \
+  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+    am__color_tests=yes; \
+  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+    am__color_tests=yes; \
+  fi; \
+  if test $$am__color_tests = yes; then \
+    red=''; \
+    grn=''; \
+    lgn=''; \
+    blu=''; \
+    mgn=''; \
+    brg=''; \
+    std=''; \
+  fi; \
 }
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -405,7 +484,7 @@ AM_CFLAGS = $(PPM_CORE_CFLAGS) $(YAXT_CFLAGS)
 @USE_MPI_TRUE at test_resource_copy_mpi_LDADD = ../src/libcdipio.la
 @USE_MPI_TRUE at test_resource_copy_mpi_CFLAGS = $(AM_CFLAGS) $(CFLAGS) -DMPI_MARSHALLING
 LDADD = ../src/libcdi.la -lm
-INCLUDES = -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_srcdir)/src
 #
 # EXTRA_DIST = $(TESTS)
 #
@@ -425,9 +504,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu tests/Makefile
+	  $(AUTOMAKE) --foreign tests/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -487,33 +566,42 @@ clean-checkPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
+
 cksum_read$(EXEEXT): $(cksum_read_OBJECTS) $(cksum_read_DEPENDENCIES) $(EXTRA_cksum_read_DEPENDENCIES) 
 	@rm -f cksum_read$(EXEEXT)
-	$(LINK) $(cksum_read_OBJECTS) $(cksum_read_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(cksum_read_OBJECTS) $(cksum_read_LDADD) $(LIBS)
+
 cksum_verify$(EXEEXT): $(cksum_verify_OBJECTS) $(cksum_verify_DEPENDENCIES) $(EXTRA_cksum_verify_DEPENDENCIES) 
 	@rm -f cksum_verify$(EXEEXT)
-	$(LINK) $(cksum_verify_OBJECTS) $(cksum_verify_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(cksum_verify_OBJECTS) $(cksum_verify_LDADD) $(LIBS)
+
 cksum_write$(EXEEXT): $(cksum_write_OBJECTS) $(cksum_write_DEPENDENCIES) $(EXTRA_cksum_write_DEPENDENCIES) 
 	@rm -f cksum_write$(EXEEXT)
-	$(LINK) $(cksum_write_OBJECTS) $(cksum_write_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(cksum_write_OBJECTS) $(cksum_write_LDADD) $(LIBS)
+
 cksum_write_chunk$(EXEEXT): $(cksum_write_chunk_OBJECTS) $(cksum_write_chunk_DEPENDENCIES) $(EXTRA_cksum_write_chunk_DEPENDENCIES) 
 	@rm -f cksum_write_chunk$(EXEEXT)
-	$(LINK) $(cksum_write_chunk_OBJECTS) $(cksum_write_chunk_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(cksum_write_chunk_OBJECTS) $(cksum_write_chunk_LDADD) $(LIBS)
+
 pio_write$(EXEEXT): $(pio_write_OBJECTS) $(pio_write_DEPENDENCIES) $(EXTRA_pio_write_DEPENDENCIES) 
 	@rm -f pio_write$(EXEEXT)
-	$(LINK) $(pio_write_OBJECTS) $(pio_write_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(pio_write_OBJECTS) $(pio_write_LDADD) $(LIBS)
+
 pio_write_deco2d$(EXEEXT): $(pio_write_deco2d_OBJECTS) $(pio_write_deco2d_DEPENDENCIES) $(EXTRA_pio_write_deco2d_DEPENDENCIES) 
 	@rm -f pio_write_deco2d$(EXEEXT)
-	$(LINK) $(pio_write_deco2d_OBJECTS) $(pio_write_deco2d_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(pio_write_deco2d_OBJECTS) $(pio_write_deco2d_LDADD) $(LIBS)
+
 test_grib$(EXEEXT): $(test_grib_OBJECTS) $(test_grib_DEPENDENCIES) $(EXTRA_test_grib_DEPENDENCIES) 
 	@rm -f test_grib$(EXEEXT)
-	$(LINK) $(test_grib_OBJECTS) $(test_grib_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(test_grib_OBJECTS) $(test_grib_LDADD) $(LIBS)
+
 test_resource_copy$(EXEEXT): $(test_resource_copy_OBJECTS) $(test_resource_copy_DEPENDENCIES) $(EXTRA_test_resource_copy_DEPENDENCIES) 
 	@rm -f test_resource_copy$(EXEEXT)
-	$(LINK) $(test_resource_copy_OBJECTS) $(test_resource_copy_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(LINK) $(test_resource_copy_OBJECTS) $(test_resource_copy_LDADD) $(LIBS)
+
 test_resource_copy_mpi$(EXEEXT): $(test_resource_copy_mpi_OBJECTS) $(test_resource_copy_mpi_DEPENDENCIES) $(EXTRA_test_resource_copy_mpi_DEPENDENCIES) 
 	@rm -f test_resource_copy_mpi$(EXEEXT)
-	$(test_resource_copy_mpi_LINK) $(test_resource_copy_mpi_OBJECTS) $(test_resource_copy_mpi_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(test_resource_copy_mpi_LINK) $(test_resource_copy_mpi_OBJECTS) $(test_resource_copy_mpi_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -538,53 +626,53 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/var_cksum.Po at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 resource_unpack.o: $(top_srcdir)/src/resource_unpack.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT resource_unpack.o -MD -MP -MF $(DEPDIR)/resource_unpack.Tpo -c -o resource_unpack.o `test -f '$(top_srcdir)/src/resource_unpack.c' || echo '$(srcdir)/'`$(top_srcdir)/src/resource_unpack.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/resource_unpack.Tpo $(DEPDIR)/resource_unpack.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/resource_unpack.c' object='resource_unpack.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT resource_unpack.o -MD -MP -MF $(DEPDIR)/resource_unpack.Tpo -c -o resource_unpack.o `test -f '$(top_srcdir)/src/resource_unpack.c' || echo '$(srcdir)/'`$(top_srcdir)/src/resource_unpack.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resource_unpack.Tpo $(DEPDIR)/resource_unpack.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/src/resource_unpack.c' object='resource_unpack.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o resource_unpack.o `test -f '$(top_srcdir)/src/resource_unpack.c' || echo '$(srcdir)/'`$(top_srcdir)/src/resource_unpack.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o resource_unpack.o `test -f '$(top_srcdir)/src/resource_unpack.c' || echo '$(srcdir)/'`$(top_srcdir)/src/resource_unpack.c
 
 resource_unpack.obj: $(top_srcdir)/src/resource_unpack.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT resource_unpack.obj -MD -MP -MF $(DEPDIR)/resource_unpack.Tpo -c -o resource_unpack.obj `if test -f '$(top_srcdir)/src/resource_unpack.c'; then $(CYGPATH_W) '$(top_srcdir)/src/resource_unpack.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/resource_unpack.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/resource_unpack.Tpo $(DEPDIR)/resource_unpack.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/resource_unpack.c' object='resource_unpack.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT resource_unpack.obj -MD -MP -MF $(DEPDIR)/resource_unpack.Tpo -c -o resource_unpack.obj `if test -f '$(top_srcdir)/src/resource_unpack.c'; then $(CYGPATH_W) '$(top_srcdir)/src/resource_unpack.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/resource_unpack.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resource_unpack.Tpo $(DEPDIR)/resource_unpack.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/src/resource_unpack.c' object='resource_unpack.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o resource_unpack.obj `if test -f '$(top_srcdir)/src/resource_unpack.c'; then $(CYGPATH_W) '$(top_srcdir)/src/resource_unpack.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/resource_unpack.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o resource_unpack.obj `if test -f '$(top_srcdir)/src/resource_unpack.c'; then $(CYGPATH_W) '$(top_srcdir)/src/resource_unpack.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/resource_unpack.c'; fi`
 
 test_resource_copy_mpi-test_resource_copy.o: test_resource_copy.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -MT test_resource_copy_mpi-test_resource_copy.o -MD -MP -MF $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo -c -o test_resource_copy_mpi-test_resource_copy.o `test -f 'test_resource_copy.c' || echo '$(srcdir)/'`test_resource_copy.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_resource_copy.c' object='test_resource_copy_mpi-test_resource_copy.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -MT test_resource_copy_mpi-test_resource_copy.o -MD -MP -MF $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo -c -o test_resource_copy_mpi-test_resource_copy.o `test -f 'test_resource_copy.c' || echo '$(srcdir)/'`test_resource_copy.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test_resource_copy.c' object='test_resource_copy_mpi-test_resource_copy.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -c -o test_resource_copy_mpi-test_resource_copy.o `test -f 'test_resource_copy.c' || echo '$(srcdir)/'`test_resource_copy.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -c -o test_resource_copy_mpi-test_resource_copy.o `test -f 'test_resource_copy.c' || echo '$(srcdir)/'`test_resource_copy.c
 
 test_resource_copy_mpi-test_resource_copy.obj: test_resource_copy.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -MT test_resource_copy_mpi-test_resource_copy.obj -MD -MP -MF $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo -c -o test_resource_copy_mpi-test_resource_copy.obj `if test -f 'test_resource_copy.c'; then $(CYGPATH_W) 'test_resource_copy.c'; else $(CYGPATH_W) '$(srcdir)/test_resource_copy.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_resource_copy.c' object='test_resource_copy_mpi-test_resource_copy.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -MT test_resource_copy_mpi-test_resource_copy.obj -MD -MP -MF $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo -c -o test_resource_copy_mpi-test_resource_copy.obj `if test -f 'test_resource_copy.c'; then $(CYGPATH_W) 'test_resource_copy.c'; else $(CYGPATH_W) '$(srcdir)/test_resource_copy.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Tpo $(DEPDIR)/test_resource_copy_mpi-test_resource_copy.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test_resource_copy.c' object='test_resource_copy_mpi-test_resource_copy.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -c -o test_resource_copy_mpi-test_resource_copy.obj `if test -f 'test_resource_copy.c'; then $(CYGPATH_W) 'test_resource_copy.c'; else $(CYGPATH_W) '$(srcdir)/test_resource_copy.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_resource_copy_mpi_CFLAGS) $(CFLAGS) -c -o test_resource_copy_mpi-test_resource_copy.obj `if test -f 'test_resource_copy.c'; then $(CYGPATH_W) 'test_resource_copy.c'; else $(CYGPATH_W) '$(srcdir)/test_resource_copy.c'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -592,26 +680,15 @@ mostlyclean-libtool:
 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)
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -623,15 +700,11 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$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; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -640,6 +713,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -654,7 +742,7 @@ check-TESTS: $(TESTS)
 	    if test -f ./$$tst; then dir=./; \
 	    elif test -f $$tst; then dir=; \
 	    else dir="$(srcdir)/"; fi; \
-	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
 	      all=`expr $$all + 1`; \
 	      case " $(XFAIL_TESTS) " in \
 	      *[\ \	]$$tst[\ \	]*) \
@@ -877,9 +965,9 @@ uninstall-am:
 
 .MAKE: check-am install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
-	clean-checkPROGRAMS clean-generic clean-libtool ctags \
-	distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+	clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+	ctags ctags-am 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 \
@@ -889,7 +977,7 @@ uninstall-am:
 	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
+	tags tags-am uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libcdi/tests/cksum_verify.c b/libcdi/tests/cksum_verify.c
index bdbf262..6983993 100644
--- a/libcdi/tests/cksum_verify.c
+++ b/libcdi/tests/cksum_verify.c
@@ -2,6 +2,10 @@
 #include "config.h"
 #endif
 
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libcdi/tests/deco2d_model.c b/libcdi/tests/deco2d_model.c
index ffa239d..6ffbf3d 100644
--- a/libcdi/tests/deco2d_model.c
+++ b/libcdi/tests/deco2d_model.c
@@ -321,7 +321,6 @@ modelRun(struct model_config setup, MPI_Comm comm)
                                         varslice, var);
                   size_t layerSize = (size_t)(chunk[0] * chunk[1]);
                   size_t nblk = (layerSize + nproma - 1)/nproma - 1;
-                  size_t npromz = layerSize - nblk * nproma;
                   for (size_t k = 0; k < varLevs; ++k)
                     {
                       blk_displ[k] = k * (nblk + 1) * nproma;
diff --git a/libcdi/tests/pio_write_run.in b/libcdi/tests/pio_write_run.in
index c2c2953..913b0a1 100644
--- a/libcdi/tests/pio_write_run.in
+++ b/libcdi/tests/pio_write_run.in
@@ -4,8 +4,9 @@ LOG="${LOG-pio_write.log}"
 mpi_task_num="${mpi_task_num-4}"
 suffix="${suffix-grb}"
 exec 5>&1 6>&2 >"$LOG" 2>&1
-../libtool --mode=execute @MPI_LAUNCH@ -n ${mpi_task_num} \
-  ${tool_wrap} ./pio_write ${pio_write_args}
+../libtool --mode=execute \
+  @MPI_LAUNCH@ \
+  -n ${mpi_task_num} ${tool_wrap} ./pio_write ${pio_write_args}
 exec 2>&6 1>&5 5>&- 6>&-
 ../libtool --mode=execute \
   ${tool_wrap} ./cksum_read example_0.${suffix} example_0.cksum
diff --git a/libcdi/tests/test_resource_copy.c b/libcdi/tests/test_resource_copy.c
index 03f972c..59e5ec4 100644
--- a/libcdi/tests/test_resource_copy.c
+++ b/libcdi/tests/test_resource_copy.c
@@ -173,7 +173,7 @@ int defineModel ( int instID )
 {
   int modelID = CDI_UNDEFID;
 
-  modelID = modelDef ( instID, 0, "myModel");
+  modelID = modelDef(instID, 0, "resource_copy");
 
   return modelID;
 }
@@ -182,20 +182,20 @@ static int destNamespace;
 
 int modelRun(MPI_Comm comm)
 {
-  int gridID, zaxisID, taxisID, instID, modelID, vlistID, streamID;
+  int gridID, zaxisID, taxisID, instID, vlistID, streamID;
 
   char * recvBuffer, * sendBuffer;
   int bufferSize, differ;
 
 #ifdef MPI_MARSHALLING
-  serializeSetMPI();
+  cdiPioSerializeSetMPI();
 #endif
 
   gridID  = defineGrid      ();
   zaxisID = defineZaxis     ();
   taxisID = defineTaxis     ();
   instID  = defineInstitute ();
-  modelID = defineModel     ( instID );
+  defineModel(instID);
   vlistID = defineVlist     ( gridID, zaxisID, taxisID);
   streamID = streamOpenWrite("example.grb", FILETYPE_GRB);
   if ( streamID < 0 ) xabort ( "Could not open file" );
diff --git a/m4/acx_options.m4 b/m4/acx_options.m4
index 4b4c816..c12dd1a 100644
--- a/m4/acx_options.m4
+++ b/m4/acx_options.m4
@@ -135,18 +135,20 @@ AC_SUBST([HDF5_INCLUDE])
 AC_SUBST([HDF5_LIBS])
 #  ----------------------------------------------------------------------
 #  Compile application with netcdf
+ENABLE_NETCDF=no
 NETCDF_ROOT=''
 NETCDF_INCLUDE=''
 NETCDF_LIBS=''
 AC_ARG_WITH([netcdf],
-            [AS_HELP_STRING([--with-netcdf=<yes|no|directory> (default=yes)],[location of netcdf library (lib and include subdirs)])],
+            [AS_HELP_STRING([--with-netcdf=<yes|no|directory> (default=no)],[location of netcdf library (lib and include subdirs)])],
             [AS_CASE(["$with_netcdf"],
                      [no],[AC_MSG_CHECKING([for netcdf library])
                            AC_MSG_RESULT([suppressed])],
                      [yes],[AC_CHECK_HEADERS([netcdf.h])
                             AC_SEARCH_LIBS([nc_open],
                                            [netcdf],
-                                           [AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
+                                           [AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])
+                                            ENABLE_NETCDF=yes],
                                            [AC_MSG_ERROR([Could not link to netcdf library])])
                             NETCDF_LIBS=" -lnetcdf"
                             AC_CHECK_PROG(NC_CONFIG,nc-config,nc-config)
@@ -167,7 +169,8 @@ AC_ARG_WITH([netcdf],
                                  AC_CHECK_HEADERS([netcdf.h])
                                  AC_SEARCH_LIBS([nc_open],
                                                 [netcdf],
-                                                [AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
+                                                [AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])
+                                                 ENABLE_NETCDF=yes],
                                                 [AC_MSG_ERROR([Could not link to netcdf library])])
                                  NETCDF_LIBS=" -L$NETCDF_ROOT/lib -lnetcdf"
                                  NETCDF_INCLUDE=" -I$NETCDF_ROOT/include"
@@ -191,6 +194,7 @@ AC_ARG_WITH([netcdf],
                                 [AC_MSG_NOTICE([$with_netcdf is not a directory! NETCDF suppressed])])])],
             [AC_MSG_CHECKING([for NETCDF library])
              AC_MSG_RESULT([suppressed])])
+AC_SUBST([ENABLE_NETCDF])
 AC_SUBST([NETCDF_ROOT])
 AC_SUBST([NETCDF_INCLUDE])
 AC_SUBST([NETCDF_LIBS])
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 22924a8..44e0ecf 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,8 +1,8 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -11,8 +11,8 @@
 
 m4_define([_LT_COPYING], [dnl
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -168,10 +170,13 @@ _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_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
 # See if we are running on zsh, and set the options which allow our
@@ -634,7 +639,7 @@ 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) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
@@ -748,15 +753,12 @@ _LT_EOF
   # 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 '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
+  _LT_PROG_REPLACE_SHELLFNS
 
-  mv -f "$cfgfile" "$ofile" ||
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 ],
@@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],			[_LT_LANG(C)],
   [C++],		[_LT_LANG(CXX)],
+  [Go],			[_LT_LANG(GO)],
   [Java],		[_LT_LANG(GCJ)],
   [Fortran 77],		[_LT_LANG(F77)],
   [Fortran],		[_LT_LANG(FC)],
@@ -822,6 +825,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	$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
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	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
@@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	[lt_cv_ld_exported_symbols_list=no])
 	LDFLAGS="$save_LDFLAGS"
     ])
+
     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
       [lt_cv_ld_force_load=no
       cat > conftest.c << _LT_EOF
@@ -990,7 +1030,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1035,8 +1077,8 @@ _LT_EOF
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
   else
     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   fi
@@ -1073,30 +1117,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   fi
 ])
 
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
 # 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.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
 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
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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 "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
 ])# _LT_SYS_MODULE_PATH_AIX
 
 
@@ -1121,7 +1176,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
 AC_MSG_CHECKING([how to print strings])
 # Test print first, because it will be a builtin if present.
-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
   ECHO='print -r --'
 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -1165,6 +1220,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 ])# _LT_PROG_ECHO_BACKSLASH
 
 
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
 # _LT_ENABLE_LOCK
 # ---------------
 m4_defun([_LT_ENABLE_LOCK],
@@ -1286,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*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" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -1311,14 +1412,47 @@ need_locks="$enable_libtool_lock"
 ])# _LT_ENABLE_LOCK
 
 
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	AC_TRY_EVAL([lt_ar_try])
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
 # _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])
+[_LT_PROG_AR
 
 AC_CHECK_TOOL(STRIP, strip, :)
 test -z "$STRIP" && STRIP=:
@@ -1337,13 +1471,13 @@ 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 -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -1523,6 +1657,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   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
@@ -1562,7 +1701,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
@@ -1658,10 +1797,10 @@ else
 /* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-void fnord () __attribute__((visibility("default")));
+int fnord () __attribute__((visibility("default")));
 #endif
 
-void fnord () { int i=42; }
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -2108,7 +2247,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -2117,7 +2256,7 @@ aix3*)
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -2182,7 +2321,7 @@ beos*)
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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'
@@ -2201,8 +2340,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -2235,13 +2375,71 @@ m4_if([$1], [],[
       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH.
+        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
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # 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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
+    # Assume MSVC wrapper
     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -2262,7 +2460,7 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -2270,10 +2468,6 @@ dgux*)
   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.
@@ -2281,7 +2475,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -2299,7 +2493,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2319,17 +2513,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -2390,7 +2585,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[[3-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -2406,7 +2601,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -2443,9 +2638,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2508,7 +2703,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -2577,7 +2772,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2602,7 +2797,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -2626,7 +2821,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     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
@@ -2657,7 +2852,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2667,7 +2862,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   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
@@ -2945,6 +3140,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -3084,7 +3284,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3163,6 +3363,21 @@ tpf*)
   ;;
 esac
 ])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 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
@@ -3170,7 +3385,11 @@ 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"])
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 ])# _LT_CHECK_MAGIC_METHOD
 
 
@@ -3273,6 +3492,67 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AM_PROG_NM], [])
 dnl AC_DEFUN([AC_PROG_NM], [])
 
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
 
 # LT_LIB_M
 # --------
@@ -3399,8 +3679,8 @@ esac
 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'"
+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=
@@ -3424,6 +3704,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -3436,6 +3717,7 @@ for ac_symprfx in "" "_"; do
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -3469,6 +3751,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t at _DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t at _DLSYM_CONST
+#else
+# define LT@&t at _DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -3480,7 +3774,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT@&t at _DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -3506,15 +3800,15 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_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"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 	fi
@@ -3547,6 +3841,13 @@ else
   AC_MSG_RESULT(ok)
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+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],
@@ -3557,6 +3858,8 @@ _LT_DECL([global_symbol_to_c_name_address],
 _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_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
 
 
@@ -3568,7 +3871,6 @@ _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
@@ -3673,6 +3975,12 @@ m4_if([$1], [CXX], [
 	  ;;
 	esac
 	;;
+      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).
+	m4_if([$1], [GCJ], [],
+	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+	;;
       dgux*)
 	case $cc_basename in
 	  ec++*)
@@ -3981,7 +4289,9 @@ m4_if([$1], [CXX], [
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
       ;;
     esac
   else
@@ -4047,6 +4357,12 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 	;;
+      nagfor*)
+	# NAG Fortran compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
@@ -4067,18 +4383,33 @@ m4_if([$1], [CXX], [
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
 	  # 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)=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  _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 '
+	  ;;
 	*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,'
 	  ;;
+        *Intel*\ [[CF]]*Compiler*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	  ;;
+	*Portland\ Group*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -4166,9 +4497,11 @@ case $host_os in
     _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])
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
 #
 # Check to make sure the PIC flag actually works.
@@ -4187,6 +4520,8 @@ fi
 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 	[Additional compiler flags for building library objects])
 
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
 #
 # Check to make sure the static flag actually works.
 #
@@ -4207,6 +4542,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 m4_defun([_LT_LINKER_SHLIBS],
 [AC_REQUIRE([LT_PATH_LD])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -4215,6 +4551,7 @@ 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'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
@@ -4229,15 +4566,22 @@ m4_if([$1], [CXX], [
     ;;
   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'
-  ;;
+    case $cc_basename in
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
   *)
     _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)=
@@ -4252,7 +4596,6 @@ m4_if([$1], [CXX], [
   _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
@@ -4405,7 +4748,8 @@ _LT_EOF
       _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'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       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'
@@ -4453,7 +4797,7 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 	 && test "$tmp_diet" = no
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
@@ -4502,8 +4846,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # 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(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_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~
@@ -4523,8 +4866,8 @@ _LT_EOF
 	_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'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4542,8 +4885,8 @@ _LT_EOF
 
 _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'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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
@@ -4589,8 +4932,8 @@ _LT_EOF
 
     *)
       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'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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
@@ -4720,7 +5063,7 @@ _LT_EOF
 	_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_SYS_MODULE_PATH_AIX([$1])
         _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
@@ -4731,7 +5074,7 @@ _LT_EOF
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 _LT_SYS_MODULE_PATH_AIX
+	 _LT_SYS_MODULE_PATH_AIX([$1])
 	 _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.
@@ -4775,20 +5118,64 @@ _LT_EOF
       # 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 `func_echo_all "$deplibs" | $SED '\''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
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	_LT_TAGVAR(always_export_symbols, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
+	# 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+	_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'
+	# Don't use ranlib
+	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	_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 `func_echo_all "$deplibs" | $SED '\''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(enable_shared_with_static_runtimes, $1)=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4801,10 +5188,6 @@ _LT_EOF
       _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
@@ -4817,7 +5200,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    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
@@ -4826,7 +5209,7 @@ _LT_EOF
 
     # 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(archive_cmds, $1)='$CC -shared $pic_flag -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
@@ -4834,7 +5217,7 @@ _LT_EOF
 
     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'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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
@@ -4850,13 +5233,12 @@ _LT_EOF
 
     hpux10*)
       if test "$GCC" = yes && test "$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'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${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
@@ -4874,10 +5256,10 @@ _LT_EOF
 	  _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 $pic_flag ${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'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
@@ -4924,16 +5306,31 @@ _LT_EOF
 
     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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
+	# This should be the same for all languages, so no per-tag cache variable.
+	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+	  [lt_cv_irix_exported_symbol],
+	  [save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   AC_LINK_IFELSE(
+	     [AC_LANG_SOURCE(
+	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			      [C++], [[int foo (void) { return 0; }]],
+			      [Fortran 77], [[
+      subroutine foo
+      end]],
+			      [Fortran], [[
+      subroutine foo
+      end]])])],
+	      [lt_cv_irix_exported_symbol=yes],
+	      [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
       else
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
@@ -5018,7 +5415,7 @@ _LT_EOF
     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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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 \*'
@@ -5037,9 +5434,9 @@ _LT_EOF
       _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_cmds, $1)='$CC -shared $pic_flag ${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'
+	  $CC -shared $pic_flag ${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"*)
@@ -5283,9 +5680,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _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],
@@ -5311,8 +5705,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
     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],
@@ -5323,6 +5715,8 @@ _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([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
 _LT_TAGDECL([], [file_list_spec], [1],
     [Specify filename containing input files])
 dnl FIXME: Not yet implemented
@@ -5424,6 +5818,7 @@ CC="$lt_save_CC"
 m4_defun([_LT_LANG_CXX_CONFIG],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
     (test "X$CXX" != "Xg++"))) ; then
@@ -5442,7 +5837,6 @@ _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
@@ -5485,6 +5879,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
   # Allow CC to be a program name with arguments.
   lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
   lt_save_LD=$LD
   lt_save_GCC=$GCC
   GCC=$GXX
@@ -5502,6 +5897,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -5523,8 +5919,8 @@ if test "$_lt_caught_CXX_error" != yes; then
       # 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(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -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'
@@ -5665,7 +6061,7 @@ if test "$_lt_caught_CXX_error" != yes; then
           _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_SYS_MODULE_PATH_AIX([$1])
           _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
@@ -5677,7 +6073,7 @@ if test "$_lt_caught_CXX_error" != yes; then
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    _LT_SYS_MODULE_PATH_AIX
+	    _LT_SYS_MODULE_PATH_AIX([$1])
 	    _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.
@@ -5719,29 +6115,75 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       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(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
-        _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
-        ;;
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # 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
+	  _LT_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(file_list_spec, $1)='@'
+	  # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	  # Don't use ranlib
+	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _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(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+	  _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
+	  ;;
+	esac
+	;;
       darwin* | rhapsody*)
         _LT_DARWIN_LINKER_FEATURES($1)
 	;;
@@ -5764,7 +6206,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5816,7 +6258,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             ;;
           *)
             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'
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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
@@ -5887,10 +6329,10 @@ if test "$_lt_caught_CXX_error" != yes; then
 	            _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 $pic_flag ${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'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -5931,9 +6373,9 @@ if test "$_lt_caught_CXX_error" != yes; then
           *)
 	    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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 	      fi
 	    fi
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -6211,7 +6653,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	          _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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	      esac
 
@@ -6298,9 +6740,9 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    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_cmds, $1)='$CC -shared $pic_flag -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'
+		  $CC -shared $pic_flag -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
@@ -6429,6 +6871,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -6443,6 +6886,29 @@ AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
 
 
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf 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).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -6451,6 +6917,7 @@ AC_LANG_POP
 # objects, libraries and library flags.
 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 # Dependencies to place before and after the object being linked:
 _LT_TAGVAR(predep_objects, $1)=
 _LT_TAGVAR(postdep_objects, $1)=
@@ -6500,7 +6967,20 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
 ])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
 dnl Parse the compiler output and extract the necessary
 dnl objects, libraries and library flags.
 if AC_TRY_EVAL(ac_compile); then
@@ -6512,7 +6992,7 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case ${prev}${p} in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
@@ -6521,13 +7001,22 @@ if AC_TRY_EVAL(ac_compile); then
           test $p = "-R"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        fi
 
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
        if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
+	 case ${prev} 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.
@@ -6547,8 +7036,10 @@ if AC_TRY_EVAL(ac_compile); then
 	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
 	 fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -6584,6 +7075,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 m4_if([$1], [CXX],
@@ -6683,7 +7175,6 @@ _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
@@ -6733,7 +7224,9 @@ if test "$_lt_disable_F77" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -6787,6 +7280,7 @@ if test "$_lt_disable_F77" != yes; then
 
   GCC=$lt_save_GCC
   CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
 fi # test "$_lt_disable_F77" != yes
 
 AC_LANG_POP
@@ -6813,7 +7307,6 @@ _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
@@ -6863,7 +7356,9 @@ if test "$_lt_disable_FC" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
   compiler=$CC
   GCC=$ac_cv_fc_compiler_gnu
 
@@ -6919,7 +7414,8 @@ if test "$_lt_disable_FC" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
 fi # test "$_lt_disable_FC" != yes
 
 AC_LANG_POP
@@ -6956,10 +7452,12 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=yes
 CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_TAGVAR(LD, $1)="$LD"
@@ -6990,10 +7488,82 @@ fi
 AC_LANG_RESTORE
 
 GCC=$lt_save_GCC
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# 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_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go 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
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## 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...
+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
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
@@ -7025,9 +7595,11 @@ _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
 CC=${RC-"windres"}
+CFLAGS=
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_CC_BASENAME([$compiler])
@@ -7040,7 +7612,8 @@ fi
 
 GCC=$lt_save_GCC
 AC_LANG_RESTORE
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_RC_CONFIG
 
 
@@ -7060,6 +7633,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
@@ -7099,6 +7679,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 AC_SUBST([OBJDUMP])
 ])
 
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
 
 # _LT_DECL_SED
 # ------------
@@ -7192,8 +7781,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES],
 # Try some XSI features
 xsi_shell=no
 ( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
     && eval 'test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
   && xsi_shell=yes
@@ -7232,206 +7821,162 @@ _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=$(( $[*] ))
-}
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
 
-# 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"
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
 
-# 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 "${1}" | $SED "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # 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_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
 
-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.
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
 
-# 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 "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-  esac
-}
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
 
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
 
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
 
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
 
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
 
-# 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_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
 
-_LT_EOF
-esac
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
 
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
     ;;
-  *)
-    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
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
     ;;
-  esac
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
 ])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 17cfd51..5d9acd8 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # 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],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
     [pic_mode=default])
 
 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index 93fc771..07a8602 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -7,17 +7,17 @@
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# Generated from ltversion.in.
+# @configure_input@
 
-# serial 3175 ltversion.m4
+# serial 3337 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.2.10])
-m4_define([LT_PACKAGE_REVISION], [1.3175])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.10'
-macro_revision='1.3175'
+[macro_version='2.4.2'
+macro_revision='1.3337'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/src/Adisit.c b/src/Adisit.c
index dfcbdb6..ccc4656 100644
--- a/src/Adisit.c
+++ b/src/Adisit.c
@@ -194,6 +194,8 @@ void *Adisit(void *argument)
   ADISIT = cdoOperatorAdd("adisit", 1, 1, "");
   ADIPOT = cdoOperatorAdd("adipot", 1, 1, "");
 
+  UNUSED(ADIPOT);
+
   operatorID = cdoOperatorID();
 
   if ( operatorArgc() == 1 ) pin = atof(operatorArgv()[0]);
@@ -256,7 +258,7 @@ void *Adisit(void *argument)
   if ( nlevel1 != nlevel2 ) cdoAbort("temperature and salinity have different number of levels!");
   nlevel = nlevel1;
 
-  pressure = malloc(nlevel*sizeof(double));
+  pressure = (double*) malloc(nlevel*sizeof(double));
   zaxisInqLevels(zaxisID, pressure);
 
   if ( pin >= 0 ) 
@@ -274,9 +276,9 @@ void *Adisit(void *argument)
   field_init(&tho);
   field_init(&sao);
   field_init(&tis);
-  tho.ptr = malloc(gridsize*nlevel*sizeof(double));
-  sao.ptr = malloc(gridsize*nlevel*sizeof(double));
-  tis.ptr = malloc(gridsize*nlevel*sizeof(double));
+  tho.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
+  sao.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
+  tis.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
 
   tho.nmiss = 0;
   sao.nmiss = 0;
diff --git a/src/Arith.c b/src/Arith.c
index 15d1588..b64a962 100644
--- a/src/Arith.c
+++ b/src/Arith.c
@@ -150,12 +150,12 @@ void *Arith(void *argument)
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
   if ( filltype == FILL_VAR || filltype == FILL_VARTS )
     {
-      vardata2 = malloc(gridsize*nlevels2*sizeof(double));
-      varnmiss2 = malloc(nlevels2*sizeof(int));
+      vardata2 = (double*) malloc(gridsize*nlevels2*sizeof(double));
+      varnmiss2 = (int*) malloc(nlevels2*sizeof(int));
     }
 
   if ( cdoVerbose ) cdoPrint("Number of timesteps: file1 %d, file2 %d", ntsteps1, ntsteps2);
@@ -183,14 +183,14 @@ void *Arith(void *argument)
       if ( filltype == FILL_TS )
 	{
 	  nvars  = vlistNvars(vlistIDx2);
-	  vardata  = malloc(nvars*sizeof(double *));
-	  varnmiss = malloc(nvars*sizeof(int *));
+	  vardata  = (double **) malloc(nvars*sizeof(double *));
+	  varnmiss = (int **) malloc(nvars*sizeof(int *));
 	  for ( varID = 0; varID < nvars; varID++ )
 	    {
 	      gridsize = gridInqSize(vlistInqVarGrid(vlistIDx2, varID));
 	      nlev     = zaxisInqSize(vlistInqVarZaxis(vlistIDx2, varID));
-	      vardata[varID]  = malloc(nlev*gridsize*sizeof(double));
-	      varnmiss[varID] = malloc(nlev*sizeof(int));
+	      vardata[varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
+	      varnmiss[varID] = (int*) malloc(nlev*sizeof(int));
 	    }
 	}
     }
diff --git a/src/Arithc.c b/src/Arithc.c
index 14abb29..abd255c 100644
--- a/src/Arithc.c
+++ b/src/Arithc.c
@@ -36,7 +36,7 @@ int *fill_vars(int vlistID)
 {
   int varID;
   int nvars = vlistNvars(vlistID);
-  int *vars = malloc(nvars*sizeof(int));
+  int *vars = (int*) malloc(nvars*sizeof(int));
 
   if ( cdoNumVarnames )
     {
@@ -117,7 +117,7 @@ void *Arithc(void *argument)
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr    = malloc(gridsize*sizeof(double));
+  field.ptr    = (double*) malloc(gridsize*sizeof(double));
   field.weight = NULL;
 
   tsID = 0;
diff --git a/src/Arithdays.c b/src/Arithdays.c
index b68c9d7..999c7a5 100644
--- a/src/Arithdays.c
+++ b/src/Arithdays.c
@@ -116,7 +116,7 @@ void *Arithdays(void *argument)
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr    = malloc(gridsize*sizeof(double));
+  field.ptr    = (double*) malloc(gridsize*sizeof(double));
   field.weight = NULL;
 
   tsID = 0;
diff --git a/src/Arithlat.c b/src/Arithlat.c
index d717da4..32fb17f 100644
--- a/src/Arithlat.c
+++ b/src/Arithlat.c
@@ -71,7 +71,7 @@ void *Arithlat(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
@@ -118,7 +118,7 @@ void *Arithlat(void *argument)
 
 	      gridsize = gridInqSize(gridID);
 
-	      scale = realloc(scale, gridsize*sizeof(double));
+	      scale = (double*) realloc(scale, gridsize*sizeof(double));
 	      gridInqYvals(gridID, scale);
 
 	      /* Convert lat/lon units if required */
diff --git a/src/CDIread.c b/src/CDIread.c
index 66192d7..e5a0ee1 100644
--- a/src/CDIread.c
+++ b/src/CDIread.c
@@ -140,8 +140,8 @@ void *CDIread(void *argument)
 	  
       gridsize = vlistGridsizeMax(vlistID);
       
-      if ( darray == NULL ) darray = malloc(gridsize*sizeof(double));
-      if ( farray == NULL && memtype == MEMTYPE_FLOAT ) farray = malloc(gridsize*sizeof(float));
+      if ( darray == NULL ) darray = (double*) malloc(gridsize*sizeof(double));
+      if ( farray == NULL && memtype == MEMTYPE_FLOAT ) farray = (float*) malloc(gridsize*sizeof(float));
 
       t0 = timer_val(timer_read);
 
diff --git a/src/CDItest.c b/src/CDItest.c
index 173f310..6c012d2 100644
--- a/src/CDItest.c
+++ b/src/CDItest.c
@@ -49,10 +49,14 @@ void *CDItest(void *argument)
 
   NCOPY = cdoOperatorAdd("ncopy",   0, 0, NULL);
 
+  UNUSED(NCOPY);
+
   //  if ( UNCHANGED_RECORD ) lcopy = TRUE;
 
   operatorID = cdoOperatorID();
 
+  UNUSED(operatorID);
+
   //  operatorInputArg("Number of copies");
   if ( operatorArgc() == 1 ) max_copy = atoi(operatorArgv()[0]);
 
@@ -75,7 +79,7 @@ void *CDItest(void *argument)
       streamDefVlist(streamID2, vlistID2);
 
       gridsize = vlistGridsizeMax(vlistID1);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
 
       tsID1 = 0;
       tsID2 = 0;
diff --git a/src/CDIwrite.c b/src/CDIwrite.c
index 70f7148..3870a2b 100644
--- a/src/CDIwrite.c
+++ b/src/CDIwrite.c
@@ -166,19 +166,19 @@ void *CDIwrite(void *argument)
       cdoPrint("nvars      : %d", nvars);
     } 
 
-  vars = malloc(nvars*sizeof(double **));
+  vars = (double ***) malloc(nvars*sizeof(double **));
   for ( varID = 0; varID < nvars; varID++ )
     {
-      vars[varID] = malloc(nlevs*sizeof(double *));
+      vars[varID] = (double **) malloc(nlevs*sizeof(double *));
       for ( levelID = 0; levelID < nlevs; levelID++ )
 	{
-	  vars[varID][levelID] = malloc(gridsize*sizeof(double));
+	  vars[varID][levelID] = (double*) malloc(gridsize*sizeof(double));
 	  for ( i = 0; i < gridsize; ++i )
 	    vars[varID][levelID][i] = varID + rand()/(RAND_MAX+1.0);
 	}
     }
 
-  if ( memtype == MEMTYPE_FLOAT ) farray = malloc(gridsize*sizeof(float));
+  if ( memtype == MEMTYPE_FLOAT ) farray = (float*) malloc(gridsize*sizeof(float));
 
   vlistID = vlistCreate();
 
diff --git a/src/Cat.c b/src/Cat.c
index d65d4d3..02b7c8f 100644
--- a/src/Cat.c
+++ b/src/Cat.c
@@ -106,7 +106,7 @@ void *Cat(void *argument)
 	  if ( ! lcopy )
 	    {
 	      gridsize = vlistGridsizeMax(vlistID1);
-	      array = malloc(gridsize*sizeof(double));
+	      array = (double*) malloc(gridsize*sizeof(double));
 	    }
 	}
       else
diff --git a/src/Change.c b/src/Change.c
index 8ecc8ae..7f1fa37 100644
--- a/src/Change.c
+++ b/src/Change.c
@@ -204,8 +204,8 @@ void *Change(void *argument)
 	{
 	  zaxisID1 = vlistZaxis(vlistID2, index);
 	  nlevs = zaxisInqSize(zaxisID1);
-	  levels = malloc(nlevs*sizeof(double));
-	  newlevels = malloc(nlevs*sizeof(double));
+	  levels = (double*) malloc(nlevs*sizeof(double));
+	  newlevels = (double*) malloc(nlevs*sizeof(double));
 	  zaxisInqLevels(zaxisID1, levels);
 
 	  for ( k = 0; k < nlevs; k++ ) newlevels[k] = levels[k];
@@ -255,7 +255,7 @@ void *Change(void *argument)
 
       zaxisID1 = vlistInqVarZaxis(vlistID2, varID);
       nlevs = zaxisInqSize(zaxisID1);
-      levels = malloc(nlevs*sizeof(double));
+      levels = (double*) malloc(nlevs*sizeof(double));
       zaxisInqLevels(zaxisID1, levels);
       nfound = 0;
       for ( k = 0; k < nlevs; k++ )
@@ -278,7 +278,7 @@ void *Change(void *argument)
     }
   else if ( operatorID == CHLTYPE )                
     {
-      int zaxistype, zaxistype1, zaxistype2, ltype, ltype1, ltype2, sameltype;
+      int ltype, ltype1, ltype2;
 
       nzaxis = vlistNzaxis(vlistID2);
       for ( index = 0; index < nzaxis; index++ )
@@ -286,26 +286,17 @@ void *Change(void *argument)
 	  zaxisID1 = vlistZaxis(vlistID2, index);
 	  zaxisID2 = zaxisDuplicate(zaxisID1);
 
-	  zaxistype = zaxisInqType(zaxisID1);
 	  ltype = zaxisInqLtype(zaxisID1);
 
 	  for ( i = 0; i < nch; i += 2 )
 	    {
-	      sameltype = FALSE;
 	      ltype1 = chltypes[i];
 	      ltype2 = chltypes[i+1];
 
-	      zaxistype1 = ltype2ztype(ltype1);
-	      zaxistype2 = ltype2ztype(ltype2);
-
-	      if ( zaxistype1 == zaxistype ) sameltype = TRUE;
-
-	      if ( !(zaxistype1 == ZAXIS_GENERIC && ltype1 == ltype) ) sameltype = FALSE;
-
-	      if ( sameltype)
+	      if ( ltype1 == ltype )
 		{
-		  zaxisChangeType(zaxisID2, zaxistype2);
-		  if ( zaxistype == ZAXIS_GENERIC ) zaxisDefLtype(zaxisID2, ltype2);
+		  zaxisChangeType(zaxisID2, ZAXIS_GENERIC);
+		  zaxisDefLtype(zaxisID2, ltype2);
 		  vlistChangeZaxis(vlistID2, zaxisID1, zaxisID2);
 		}
 	    }
@@ -317,7 +308,7 @@ void *Change(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID2);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID1 = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID1)) )
diff --git a/src/Change_e5slm.c b/src/Change_e5slm.c
index 6d04d74..6c5acb6 100644
--- a/src/Change_e5slm.c
+++ b/src/Change_e5slm.c
@@ -75,9 +75,9 @@ void *Change_e5slm(void *argument)
 
   gridsize = gridInqSize(vlistInqVarGrid(vlistIDslm, 0));
 
-  array = malloc(gridsize*sizeof(double));
-  cland = malloc(gridsize*sizeof(double));
-  lsea  = malloc(gridsize*sizeof(short));
+  array = (double*) malloc(gridsize*sizeof(double));
+  cland = (double*) malloc(gridsize*sizeof(double));
+  lsea  = (short*) malloc(gridsize*sizeof(short));
 
   streamInqTimestep(streamIDslm, 0);
 
@@ -102,7 +102,7 @@ void *Change_e5slm(void *argument)
 
 
   nvars = vlistNvars(vlistID1);
-  codes = malloc(nvars*sizeof(short));
+  codes = (short*) malloc(nvars*sizeof(short));
 
   for ( varID = 0; varID < nvars; ++varID )
     {
diff --git a/src/Cloudlayer.c b/src/Cloudlayer.c
index e78f70d..3cd2b9c 100644
--- a/src/Cloudlayer.c
+++ b/src/Cloudlayer.c
@@ -234,13 +234,13 @@ void *Cloudlayer(void *argument)
   nlevel = zaxisInqSize(zaxisID);
   nhlev  = nlevel+1;
 
-  aclcac = malloc(gridsize*nlevel*sizeof(double));
+  aclcac = (double*) malloc(gridsize*nlevel*sizeof(double));
   for ( varID = 0; varID < nvars2; ++varID )
-    cloud[varID] = malloc(gridsize*sizeof(double));
+    cloud[varID] = (double*) malloc(gridsize*sizeof(double));
 
   if ( zaxisInqType(zaxisID) == ZAXIS_PRESSURE )
     {
-      plevs = malloc(nlevel*sizeof(double));
+      plevs = (double*) malloc(nlevel*sizeof(double));
       zaxisInqLevels(zaxisID, plevs);
       if ( plevs[0] > plevs[nlevel-1] )
 	{
@@ -281,11 +281,11 @@ void *Cloudlayer(void *argument)
 	{
 	  double *vct;
 
-	  vct = malloc(nvct*sizeof(double));
+	  vct = (double*) malloc(nvct*sizeof(double));
 	  zaxisInqVct(zaxisID, vct);
 
 	  nlevs = nlevel + 1;
-	  plevs = malloc(nlevs*sizeof(double));
+	  plevs = (double*) malloc(nlevs*sizeof(double));
 	  vct2plev(vct, plevs, nlevs);
 	  free(vct);
 
diff --git a/src/Command.c b/src/Command.c
index f29b4cc..ff9a708 100644
--- a/src/Command.c
+++ b/src/Command.c
@@ -140,6 +140,8 @@ int com_list(char *arg)
 /* The user wishes to quit using this program. Just set DONE non-zero. */
 int com_quit(char *arg)
 {
+  UNUSED(arg);
+
   Done = 1;
 
   return (0);
@@ -150,6 +152,8 @@ int com_stat(char *arg)
 {
   int nrecs;
   int tsID;
+ 
+  UNUSED(arg);
 
   fprintf(stdout, "name=%s\n", all_vars[gl_varID].name);
 
@@ -301,11 +305,13 @@ void command_init()
   gl_vlistID = streamInqVlist(gl_streamID);
   taxisID = vlistInqTaxis(gl_vlistID);
 
+  UNUSED(taxisID);
+
   gridsize = vlistGridsizeMax(gl_vlistID);
-  gl_data = malloc(gridsize*sizeof(double));
+  gl_data = (double*) malloc(gridsize*sizeof(double));
 
   gl_nvars = vlistNvars(gl_vlistID);
-  all_vars = malloc(gl_nvars*sizeof(vars_t));
+  all_vars = (vars_t*) malloc(gl_nvars*sizeof(vars_t));
 
   for ( varID = 0; varID < gl_nvars; ++varID )
     {
@@ -319,9 +325,8 @@ void command_init()
 
 void *Command(void *argument)
 {
-  int nrecs;
-  int recID, varID, levelID;
-  int nmiss;
+  // int recID, varID, levelID;
+  // int nmiss;
   double s_utime, s_stime;
   double e_utime, e_stime;
   double c_cputime = 0, c_usertime = 0, c_systime = 0;
diff --git a/src/Comp.c b/src/Comp.c
index cb9e5c4..1233752 100644
--- a/src/Comp.c
+++ b/src/Comp.c
@@ -112,9 +112,9 @@ void *Comp(void *argument)
 
   gridsize = vlistGridsizeMax(vlistIDx1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
-  array3 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
+  array3 = (double*) malloc(gridsize*sizeof(double));
 
   arrayx1 = array1;
   arrayx2 = array2;
@@ -143,12 +143,12 @@ void *Comp(void *argument)
       if ( filltype == FILL_TS )
 	{
 	  nvars  = vlistNvars(vlistIDx2);
-	  vardata  = malloc(nvars*sizeof(double *));
+	  vardata  = (double **) malloc(nvars*sizeof(double *));
 	  for ( varID = 0; varID < nvars; varID++ )
 	    {
 	      gridsize = gridInqSize(vlistInqVarGrid(vlistIDx2, varID));
 	      nlev     = zaxisInqSize(vlistInqVarZaxis(vlistIDx2, varID));
-	      vardata[varID]  = malloc(nlev*gridsize*sizeof(double));
+	      vardata[varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
 	    }
 	}
     }
diff --git a/src/Compc.c b/src/Compc.c
index b48bf4e..aedab51 100644
--- a/src/Compc.c
+++ b/src/Compc.c
@@ -78,8 +78,8 @@ void *Compc(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
 
diff --git a/src/Complextorect.c b/src/Complextorect.c
index e319501..e52a71c 100644
--- a/src/Complextorect.c
+++ b/src/Complextorect.c
@@ -74,9 +74,9 @@ void *Complextorect(void *argument)
   streamDefVlist(streamID3, vlistID3);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(2*gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
-  array3 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(2*gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
+  array3 = (double*) malloc(gridsize*sizeof(double));
       
   tsID  = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Cond.c b/src/Cond.c
index a69518f..07e8df7 100644
--- a/src/Cond.c
+++ b/src/Cond.c
@@ -95,9 +95,9 @@ void *Cond(void *argument)
   if ( filltype == FILL_REC && gridsize != gridInqSize(vlistGrid(vlistID1, 0)) )
     cdoAbort("Stream1 >%s< has wrong gridsize!", cdoStreamName(0)->args);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
-  array3 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
+  array3 = (double*) malloc(gridsize*sizeof(double));
 
   if ( cdoVerbose )
     cdoPrint("Number of timesteps: file1 %d, file2 %d", ntsteps1, ntsteps2);
@@ -110,14 +110,14 @@ void *Cond(void *argument)
 	  cdoPrint("Filling up stream1 >%s< by copying the first timestep.", cdoStreamName(0)->args);
 
 	  nvars  = vlistNvars(vlistID1);
-	  vardata1  = malloc(nvars*sizeof(double *));
-	  varnmiss1 = malloc(nvars*sizeof(int *));
+	  vardata1  = (double **) malloc(nvars*sizeof(double *));
+	  varnmiss1 = (int **) malloc(nvars*sizeof(int *));
 	  for ( varID = 0; varID < nvars; varID++ )
 	    {
 	      gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
 	      nlev     = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-	      vardata1[varID]  = malloc(nlev*gridsize*sizeof(double));
-	      varnmiss1[varID] = malloc(nlev*sizeof(int));
+	      vardata1[varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
+	      varnmiss1[varID] = (int*) malloc(nlev*sizeof(int));
 	    }
 	}
     }
diff --git a/src/Cond2.c b/src/Cond2.c
index a1aa53c..a71be1c 100644
--- a/src/Cond2.c
+++ b/src/Cond2.c
@@ -98,10 +98,10 @@ void *Cond2(void *argument)
   if ( filltype == FILL_REC && gridsize != gridInqSize(vlistGrid(vlistID1, 0)) )
     cdoAbort("Stream1 >%s< has wrong gridsize!", cdoStreamName(0)->args);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
-  array3 = malloc(gridsize*sizeof(double));
-  array4 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
+  array3 = (double*) malloc(gridsize*sizeof(double));
+  array4 = (double*) malloc(gridsize*sizeof(double));
 
   if ( cdoVerbose )
     cdoPrint("Number of timesteps: file1 %d, file2 %d, file3 %d",
@@ -115,14 +115,14 @@ void *Cond2(void *argument)
 	  cdoPrint("Filling up stream1 >%s< by copying the first timestep.", cdoStreamName(0)->args);
 
 	  nvars  = vlistNvars(vlistID1);
-	  vardata1  = malloc(nvars*sizeof(double *));
-	  varnmiss1 = malloc(nvars*sizeof(int *));
+	  vardata1  = (double **) malloc(nvars*sizeof(double *));
+	  varnmiss1 = (int **) malloc(nvars*sizeof(int *));
 	  for ( varID = 0; varID < nvars; varID++ )
 	    {
 	      gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
 	      nlev     = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-	      vardata1[varID]  = malloc(nlev*gridsize*sizeof(double));
-	      varnmiss1[varID] = malloc(nlev*sizeof(int));
+	      vardata1[varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
+	      varnmiss1[varID] = (int*) malloc(nlev*sizeof(int));
 	    }
 	}
     }
diff --git a/src/Condc.c b/src/Condc.c
index e1c76bf..ae42e22 100644
--- a/src/Condc.c
+++ b/src/Condc.c
@@ -69,8 +69,8 @@ void *Condc(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
 
diff --git a/src/Consecstat.c b/src/Consecstat.c
index 5548806..091a12e 100644
--- a/src/Consecstat.c
+++ b/src/Consecstat.c
@@ -119,14 +119,14 @@ static void selEndOfPeriod(field_t *periods, field_t history, field_t current, i
     if ( DBL_IS_EQUAL(parray[i], pmissval) ) periods->nmiss++;
 }
 
-void *Consecstat (void *argument)
+void *Consecstat(void *argument)
 {
   int operatorID;
-  int i;
   int istreamID, itaxisID, ivlistID, itsID;
   int ostreamID, otaxisID, ovlistID, otsID;
   int vdate = 0, vtime = 0;
   int histvdate = 0, histvtime = 0;
+  int i;
   int recID, nrecs;
   int varID, nvars;
   int levelID, nlevels; 
@@ -152,7 +152,7 @@ void *Consecstat (void *argument)
   vlistDefTaxis(ovlistID, otaxisID);
 
   field_init(&field);
-  field.ptr = malloc(vlistGridsizeMax(ovlistID)*sizeof(double));
+  field.ptr = (double*) malloc(vlistGridsizeMax(ovlistID)*sizeof(double));
 
   nvars     = vlistNvars(ivlistID);
   vars      = field_calloc(ivlistID, FIELD_PTR);
diff --git a/src/Copy.c b/src/Copy.c
index 4571b0f..33a3066 100644
--- a/src/Copy.c
+++ b/src/Copy.c
@@ -102,11 +102,11 @@ void *Copy(void *argument)
 	  streamDefVlist(streamID2, vlistID2);
 
 	  gridsize = vlistGridsizeMax(vlistID1);
-	  array = malloc(gridsize*sizeof(double));
+	  array = (double*) malloc(gridsize*sizeof(double));
 	  if ( cdoParIO )
 	    {
 	      fprintf(stderr, "Parallel reading enabled!\n");
-	      parIO.array = malloc(gridsize*sizeof(double));
+	      parIO.array = (double*) malloc(gridsize*sizeof(double));
 	      parIO.array_size = gridsize;
 	    }
 	}
diff --git a/src/Deltime.c b/src/Deltime.c
index 3f34e40..cc76e1e 100644
--- a/src/Deltime.c
+++ b/src/Deltime.c
@@ -32,7 +32,7 @@ void *Deltime(void *argument)
   int recID, varID, levelID;
   int vlistID1, vlistID2;
   int taxisID1, taxisID2;
-  int vdate, vtime;
+  int vdate /*, vtime */;
   int copytimestep;
   int lcopy = FALSE;
   int gridsize;
@@ -48,6 +48,8 @@ void *Deltime(void *argument)
   DELDAY   = cdoOperatorAdd("delday",   0, 0, NULL);
   DEL29FEB = cdoOperatorAdd("del29feb", 0, 0, NULL);
 
+  UNUSED(DELDAY);
+
   operatorID = cdoOperatorID();
 
   if ( operatorID == DEL29FEB )
@@ -66,7 +68,7 @@ void *Deltime(void *argument)
       sarg = operatorArgv()[0];
       dday = atoi(sarg);
       dmon = 0;
-      while ( isdigit(*sarg) ) *sarg++;
+      while ( isdigit(*sarg) ) sarg++;
       if ( isalpha(*sarg) )
 	{
 	  char smon[32];
@@ -100,7 +102,7 @@ void *Deltime(void *argument)
   if ( ! lcopy )
     {
       gridsize = vlistGridsizeMax(vlistID1);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
       
   nfound = 0;
@@ -109,7 +111,7 @@ void *Deltime(void *argument)
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
     {
       vdate = taxisInqVdate(taxisID1);
-      vtime = taxisInqVtime(taxisID1);
+      // vtime = taxisInqVtime(taxisID1);
 
       cdiDecodeDate(vdate, &year, &month, &day);
 
diff --git a/src/Derivepar.c b/src/Derivepar.c
index cb74f44..047c6d1 100644
--- a/src/Derivepar.c
+++ b/src/Derivepar.c
@@ -17,7 +17,7 @@
 /*
    This module contains the following operators:
 
-      Derivepar     geopotheight          geopotential height
+      Derivepar     gheight          geopotential height
 */
 
 #include <ctype.h>
@@ -121,7 +121,7 @@ void minmaxval(long nvals, double *array, int *imiss, double *minval, double *ma
 
   if ( imiss )
     {
-      for ( i = 0; i < nvals; i++ )
+      for ( i = 0; i < nvals; ++i )
 	{
 	  if ( ! imiss[i] )
 	    {
@@ -132,7 +132,9 @@ void minmaxval(long nvals, double *array, int *imiss, double *minval, double *ma
     }
   else
     {
-      for ( i = 0; i < nvals; i++ )
+      xmin = array[0];
+      xmax = array[0];
+      for ( i = 1; i < nvals; ++i )
 	{
 	  if      ( array[i] > xmax ) xmax = array[i];
 	  else if ( array[i] < xmin ) xmin = array[i];
@@ -146,11 +148,10 @@ void minmaxval(long nvals, double *array, int *imiss, double *minval, double *ma
 
 void *Derivepar(void *argument)
 {
-  int GEOPOTHEIGHT, SEALEVELPRESSURE;
+  int GHEIGHT, SEALEVELPRESSURE;
   int operatorID;
   int mode;
   enum {ECHAM_MODE, WMO_MODE};
-  int geop_code = 0, temp_code = 0, ps_code = 0, lsp_code = 0, hum_code = 0;
   int streamID1, streamID2;
   int vlistID1, vlistID2;
   int gridsize, ngp = 0;
@@ -163,9 +164,10 @@ void *Derivepar(void *argument)
   int nlevel;
   int nvct;
   int surfaceID = -1;
-  int geopID = -1, tempID = -1, humID = -1, psID = -1, lnpsID = -1, presID = -1;
+  int sgeopotID = -1, geopotID = -1, tempID = -1, humID = -1, psID = -1, lnpsID = -1, presID = -1, gheightID = -1;
   // int clwcID = -1, ciwcID = -1;
   int code, param;
+  int pnum, pcat, pdis;
   char paramstr[32];
   char varname[CDI_MAX_NAME], stdname[CDI_MAX_NAME];
   double *single2;
@@ -173,22 +175,22 @@ void *Derivepar(void *argument)
   int lhavevct;
   int nhlevf = 0;
   double *vct = NULL;
-  double *geop = NULL, *ps = NULL, *temp = NULL, *hum = NULL;
+  double *sgeopot = NULL, *ps = NULL, *temp = NULL, *hum = NULL;
   // double *lwater = NULL, *iwater = NULL;
-  double *geopotheight = NULL;
+  double *gheight = NULL;
   double *sealevelpressure = NULL;
   int nmiss, nmissout = 0;
-  int ltq = FALSE;
   double *array = NULL;
   double *half_press = NULL;
   double *full_press = NULL;
   double minval, maxval;
   int instNum, tableNum;
   int useTable;
+  gribcode_t gribcodes = {0};
 
   cdoInitialize(argument);
 
-  GEOPOTHEIGHT     = cdoOperatorAdd("geopotheight",   0, 0, NULL);
+  GHEIGHT          = cdoOperatorAdd("gheight",   0, 0, NULL);
   SEALEVELPRESSURE = cdoOperatorAdd("sealevelpressure",   0, 0, NULL);
 
   operatorID = cdoOperatorID();
@@ -254,7 +256,7 @@ void *Derivepar(void *argument)
                       if ( cdoVerbose )
                         cdoPrint("lhavevct=TRUE  zaxisIDh = %d, nhlevf   = %d", zaxisIDh, nlevel);
  
-		      vct = malloc(nvct*sizeof(double));
+		      vct = (double*) malloc(nvct*sizeof(double));
 		      zaxisInqVct(zaxisID, vct);
 
 		      if ( cdoVerbose )
@@ -265,14 +267,14 @@ void *Derivepar(void *argument)
               else 
                 {
 		  if ( cdoVerbose )
-		    cdoPrint("nlevel /= (nvct/2 - 1): nlevel = %d", nlevel);
+		    cdoPrint("nlevel = (nvct/2 - 1): nlevel = %d", nlevel);
                 }
 	    }
 	}
     }
 
   if ( zaxisIDh == -1 )
-    cdoAbort("No data on hybrid model level found!");
+    cdoAbort("No 3D variable with hybrid sigma pressure coordinate found!");
 
   nvars = vlistNvars(vlistID1);
 
@@ -302,25 +304,20 @@ void *Derivepar(void *argument)
       param    = vlistInqVarParam(vlistID1, varID);
 
       cdiParamToString(param, paramstr, sizeof(paramstr));
+      cdiDecodeParam(param, &pnum, &pcat, &pdis);
+      if ( pdis >= 0 && pdis < 255 ) code = -1;
 
       if ( useTable )
 	{
 	  if ( tableNum == 2 )
 	    {
 	      mode = WMO_MODE;
-	      geop_code  =   6;
-	      temp_code  =  11;
-	      hum_code   =  51;
-	      ps_code    =   1;
+	      wmo_gribcodes(&gribcodes);
 	    }
 	  else if ( tableNum == 128 || tableNum == 0 )
 	    {
 	      mode = ECHAM_MODE;
-	      geop_code  = 129;
-	      temp_code  = 130;
-	      hum_code   = 133;
-	      ps_code    = 134;
-	      lsp_code   = 152;
+	      echam_gribcodes(&gribcodes);
 	    }
 	  else
 	    mode = -1;
@@ -328,11 +325,7 @@ void *Derivepar(void *argument)
       else
 	{
 	  mode = ECHAM_MODE;
-	  geop_code  = 129;
-	  temp_code  = 130;
-	  hum_code   = 133;
-	  ps_code    = 134;
-	  lsp_code   = 152;
+	  echam_gribcodes(&gribcodes);
 	}
 
       if ( cdoVerbose )
@@ -350,22 +343,25 @@ void *Derivepar(void *argument)
 
 	  if ( code < 0 )
 	    {
-	      if      ( geopID == -1  && strcmp(varname, "geosp")   == 0 ) code = 129;
-	      else if ( psID   == -1  && strcmp(varname, "aps")     == 0 ) code = 134;
-	      else if ( psID   == -1  && strcmp(varname, "ps")      == 0 ) code = 134;
-	      else if ( lnpsID == -1  && strcmp(varname, "lsp")     == 0 ) code = 152;
-	      else if ( tempID == -1  && strcmp(varname, "t")       == 0 ) code = 130;
-	      else if ( humID  == -1  && strcmp(varname, "q")       == 0 ) code = 133;
+	      if      ( sgeopotID == -1 && strcmp(varname, "geosp")   == 0 ) code = gribcodes.geopot;
+	      else if ( psID      == -1 && strcmp(varname, "aps")     == 0 ) code = gribcodes.ps;
+	      else if ( psID      == -1 && strcmp(varname, "ps")      == 0 ) code = gribcodes.ps;
+	      else if ( lnpsID    == -1 && strcmp(varname, "lsp")     == 0 ) code = gribcodes.lsp;
+	      else if ( tempID    == -1 && strcmp(varname, "t")       == 0 ) code = gribcodes.temp;
+	      else if ( humID     == -1 && strcmp(varname, "q")       == 0 ) code = gribcodes.hum;
+	      // else if ( geopotID  == -1 && strcmp(stdname, "geopotential_full") == 0 ) code = gribcodes.geopot;
 	      // else if ( strcmp(varname, "clwc")    == 0 ) code = 246;
 	      // else if ( strcmp(varname, "ciwc")    == 0 ) code = 247;
 	    }
 	}
 
-      if      ( code == geop_code && nlevel == 1      ) geopID    = varID;
-      else if ( code == temp_code && nlevel == nhlevf ) tempID    = varID;
-      else if ( code == hum_code  && nlevel == nhlevf ) humID     = varID;
-      else if ( code == ps_code   && nlevel == 1      ) psID      = varID;
-      else if ( code == lsp_code  && nlevel == 1      ) lnpsID    = varID;
+      if      ( code == gribcodes.geopot  && nlevel == 1      ) sgeopotID = varID;
+      else if ( code == gribcodes.geopot  && nlevel == nhlevf ) geopotID  = varID;
+      else if ( code == gribcodes.temp    && nlevel == nhlevf ) tempID    = varID;
+      else if ( code == gribcodes.hum     && nlevel == nhlevf ) humID     = varID;
+      else if ( code == gribcodes.ps      && nlevel == 1      ) psID      = varID;
+      else if ( code == gribcodes.lsp     && nlevel == 1      ) lnpsID    = varID;
+      else if ( code == gribcodes.gheight && nlevel == nhlevf ) gheightID = varID;
       // else if ( code == 246 ) clwcID    = varID;
       // else if ( code == 247 ) ciwcID    = varID;
 
@@ -378,62 +374,79 @@ void *Derivepar(void *argument)
 	cdoAbort("Spectral data unsupported!");
     }
 
-  if ( tempID == -1 ) cdoAbort("Air temperature not found!");
-
-  array  = malloc(ngp*sizeof(double));
+  if ( cdoVerbose )
+    {
+      cdoPrint("Found:");
+      if ( tempID    != -1 ) cdoPrint("  %s", var_stdname(air_temperature));
+      if ( psID      != -1 ) cdoPrint("  %s", var_stdname(surface_air_pressure));
+      if ( lnpsID    != -1 ) cdoPrint("  LOG(%s)", var_stdname(surface_air_pressure));
+      if ( sgeopotID != -1 ) cdoPrint("  %s", var_stdname(surface_geopotential));
+      if ( geopotID  != -1 ) cdoPrint("  %s", var_stdname(geopotential));
+      if ( gheightID != -1 ) cdoPrint("  %s", var_stdname(geopotential_height));
+    }
 
-  geop   = malloc(ngp*sizeof(double));
-  ps     = malloc(ngp*sizeof(double));
+  if ( tempID == -1 ) cdoAbort("%s not found!", var_stdname(air_temperature));
 
-  temp   = malloc(ngp*nhlevf*sizeof(double));
+  array   = (double*) malloc(ngp*sizeof(double));
+  sgeopot = (double*) malloc(ngp*sizeof(double));
+  ps      = (double*) malloc(ngp*sizeof(double));
+  temp    = (double*) malloc(ngp*nhlevf*sizeof(double));
 
-  // lwater = malloc(ngp*nhlevf*sizeof(double));
-  // iwater = malloc(ngp*nhlevf*sizeof(double));
+  // lwater = (double*) malloc(ngp*nhlevf*sizeof(double));
+  // iwater = (double*) malloc(ngp*nhlevf*sizeof(double));
 
-  half_press   = malloc(ngp*(nhlevf+1)*sizeof(double));
+  half_press = (double*) malloc(ngp*(nhlevf+1)*sizeof(double));
 
-  if ( operatorID == GEOPOTHEIGHT )
+  if ( operatorID == GHEIGHT )
     {
       if ( humID == -1 )
 	cdoWarning("%s not found - using algorithm without %s!", var_stdname(specific_humidity), var_stdname(specific_humidity));
       else
-	hum    = malloc(ngp*nhlevf*sizeof(double));
+	hum    = (double*) malloc(ngp*nhlevf*sizeof(double));
 
-      geopotheight = malloc(ngp*(nhlevf+1)*sizeof(double));
+      gheight = (double*) malloc(ngp*(nhlevf+1)*sizeof(double));
     }
   
   if ( operatorID == SEALEVELPRESSURE )
     {
-      full_press   = malloc(ngp*nhlevf*sizeof(double));
+      full_press   = (double*) malloc(ngp*nhlevf*sizeof(double));
 
       surfaceID = zaxisFromName("surface");
-      sealevelpressure = malloc(ngp*sizeof(double));
+      sealevelpressure = (double*) malloc(ngp*sizeof(double));
     }
 
-  if ( zaxisIDh != -1 && geopID == -1 )
+  if ( zaxisIDh != -1 && sgeopotID == -1 )
     {
-      if ( ltq )
-	cdoWarning("%s not found - using zero %s!", var_stdname(surface_geopotential), var_stdname(surface_geopotential));
+      if ( geopotID == -1 )
+	cdoWarning("%s not found - set to zero!", var_stdname(surface_geopotential));
+      else
+	cdoPrint("%s not found - using bottom layer of %s!", var_stdname(surface_geopotential), var_stdname(geopotential));
 
-      memset(geop, 0, ngp*sizeof(double));
+      memset(sgeopot, 0, ngp*sizeof(double));
     }
 
   presID = lnpsID;
   if ( zaxisIDh != -1 && lnpsID == -1 )
     {
-      presID = psID;
-      if ( psID != -1 )
-	cdoWarning("LOG(%s) not found - using %s!", var_stdname(surface_air_pressure), var_stdname(surface_air_pressure));
-      else
+      if ( psID == -1 )
 	cdoAbort("%s not found!", var_stdname(surface_air_pressure));
+      else
+	presID = psID;
     }
 
+  if ( cdoVerbose )
+    {
+      if ( presID == lnpsID )
+	cdoPrint("using LOG(%s)", var_stdname(surface_air_pressure));      
+      else
+	cdoPrint("using %s", var_stdname(surface_air_pressure));
+    }
 
   vlistID2 = vlistCreate();
 
   int var_id = -1;
 
-  if ( operatorID == GEOPOTHEIGHT )
+  if ( operatorID == GHEIGHT )
     {
       var_id = geopotential_height;
       varID  = vlistDefVar(vlistID2, gridID, zaxisIDh, TSTEP_INSTANT);
@@ -477,9 +490,13 @@ void *Derivepar(void *argument)
 
 	  if ( zaxisIDh != -1 )
 	    {
-	      if ( varID == geopID )
+	      if ( varID == sgeopotID )
+		{
+		  memcpy(sgeopot, array, ngp*sizeof(double));
+		}
+	      else if ( varID == geopotID && sgeopotID == -1 && (levelID+1) == nhlevf )
 		{
-		  memcpy(geop, array, ngp*sizeof(double));
+		  memcpy(sgeopot, array, ngp*sizeof(double));
 		}
 	      else if ( varID == presID )
 		{
@@ -508,8 +525,8 @@ void *Derivepar(void *argument)
 	  if ( minval < MIN_PS || maxval > MAX_PS )
 	    cdoWarning("Surface pressure out of range (min=%g max=%g)!", minval, maxval);
 
-	  /* check range of geop */
-	  minmaxval(ngp, geop, NULL, &minval, &maxval);
+	  /* check range of surface geopot */
+	  minmaxval(ngp, sgeopot, NULL, &minval, &maxval);
 	  if ( minval < MIN_FIS || maxval > MAX_FIS )
 	    cdoWarning("Orography out of range (min=%g max=%g)!", minval, maxval);
 	}
@@ -547,12 +564,12 @@ void *Derivepar(void *argument)
 	    }
 	}
 
-      if ( operatorID == GEOPOTHEIGHT )
+      if ( operatorID == GHEIGHT )
 	{
 	  presh(NULL, half_press, vct, ps, nhlevf, ngp);
 	  
-	  memcpy(geopotheight+ngp*nhlevf, geop, ngp*sizeof(double));
-	  MakeGeopotHeight(geopotheight, temp, hum, half_press, ngp, nhlevf);
+	  memcpy(gheight+ngp*nhlevf, sgeopot, ngp*sizeof(double));
+	  MakeGeopotHeight(gheight, temp, hum, half_press, ngp, nhlevf);
 
 	  nmissout = 0;
 	  varID = 0;
@@ -560,14 +577,14 @@ void *Derivepar(void *argument)
 	  for ( levelID = 0; levelID < nlevel; levelID++ )
 	    {
 	      streamDefRecord(streamID2, varID, levelID);
-	      streamWriteRecord(streamID2, geopotheight+levelID*ngp, nmissout);
+	      streamWriteRecord(streamID2, gheight+levelID*ngp, nmissout);
 	    }
 	}
       else if ( operatorID == SEALEVELPRESSURE )
 	{
 	  presh(full_press, half_press, vct, ps, nhlevf, ngp);
 
-	  extra_P(sealevelpressure, half_press+ngp*(nhlevf), full_press+ngp*(nhlevf-1), geop, temp+ngp*(nhlevf-1), ngp);
+	  extra_P(sealevelpressure, half_press+ngp*(nhlevf), full_press+ngp*(nhlevf-1), sgeopot, temp+ngp*(nhlevf-1), ngp);
 
 	  streamDefRecord(streamID2, 0, 0);
 	  streamWriteRecord(streamID2, sealevelpressure, 0);
@@ -584,9 +601,9 @@ void *Derivepar(void *argument)
   vlistDestroy(vlistID2);
 
   free(ps);
-  free(geop);
+  free(sgeopot);
   free(temp);
-  if ( geopotheight ) free(geopotheight);
+  if ( gheight ) free(gheight);
   if ( sealevelpressure ) free(sealevelpressure);
   if ( hum ) free(hum);
 
diff --git a/src/Detrend.c b/src/Detrend.c
index 8cbe0f5..da66f25 100644
--- a/src/Detrend.c
+++ b/src/Detrend.c
@@ -114,7 +114,7 @@ void *Detrend(void *argument)
     double *array1;
     double *array2;
   } memory_t;
-  memory_t *mem = NULL;
+  memory_t *ompmem = NULL;
 
   cdoInitialize(argument);
 
@@ -139,8 +139,8 @@ void *Detrend(void *argument)
       if ( tsID >= nalloc )
 	{
 	  nalloc += NALLOC_INC;
-	  dtinfo = realloc(dtinfo, nalloc*sizeof(dtinfo_t));
-	  vars   = realloc(vars, nalloc*sizeof(field_t **));
+	  dtinfo = (dtinfo_t*) realloc(dtinfo, nalloc*sizeof(dtinfo_t));
+	  vars   = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	}
 
       taxisInqDTinfo(taxisID1, &dtinfo[tsID]);
@@ -152,7 +152,7 @@ void *Detrend(void *argument)
 	  streamInqRecord(streamID1, &varID, &levelID);
 	  gridID   = vlistInqVarGrid(vlistID1, varID);
 	  gridsize = gridInqSize(gridID);
-	  vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+	  vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 	  streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
 	  vars[tsID][varID][levelID].nmiss = nmiss;
 	}
@@ -162,11 +162,11 @@ void *Detrend(void *argument)
 
   nts = tsID;
 
-  mem = malloc(ompNumThreads*sizeof(memory_t));
+  ompmem = (memory_t*) malloc(ompNumThreads*sizeof(memory_t));
   for ( i = 0; i < ompNumThreads; i++ )
     {
-      mem[i].array1 = malloc(nts*sizeof(double));
-      mem[i].array2 = malloc(nts*sizeof(double));
+      ompmem[i].array1 = (double*) malloc(nts*sizeof(double));
+      ompmem[i].array2 = (double*) malloc(nts*sizeof(double));
     }
 
   for ( varID = 0; varID < nvars; varID++ )
@@ -188,22 +188,22 @@ void *Detrend(void *argument)
               ompthID = 0;
 #endif
 	      for ( tsID = 0; tsID < nts; tsID++ )
-		mem[ompthID].array1[tsID] = vars[tsID][varID][levelID].ptr[i];
+		ompmem[ompthID].array1[tsID] = vars[tsID][varID][levelID].ptr[i];
 
-	      detrend(nts, missval, mem[ompthID].array1, mem[ompthID].array2);
+	      detrend(nts, missval, ompmem[ompthID].array1, ompmem[ompthID].array2);
 
 	      for ( tsID = 0; tsID < nts; tsID++ )
-		vars[tsID][varID][levelID].ptr[i] = mem[ompthID].array2[tsID];
+		vars[tsID][varID][levelID].ptr[i] = ompmem[ompthID].array2[tsID];
 	    }
 	}
     }
 
   for ( i = 0; i < ompNumThreads; i++ )
     {
-      free(mem[i].array1);
-      free(mem[i].array2);
+      free(ompmem[i].array1);
+      free(ompmem[i].array2);
     }
-  free(mem);
+  free(ompmem);
 
   for ( tsID = 0; tsID < nts; tsID++ )
     {
diff --git a/src/Diff.c b/src/Diff.c
index cbf21f1..b10f337 100644
--- a/src/Diff.c
+++ b/src/Diff.c
@@ -30,7 +30,7 @@
 
 void *Diff(void *argument)
 {
-  int DIFF, DIFF2, DIFFP, DIFFN, DIFFC;
+  int DIFF, DIFFP, DIFFN, DIFFC;
   int operatorID;
   int lhead = TRUE;
   int i;
@@ -40,6 +40,7 @@ void *Diff(void *argument)
   int ndiff;
   int code, param;
   int gridID, zaxisID, vdate, vtime;
+  int checkrel;
   int nrecs, nrecs2;
   int levelID;
   int tsID;
@@ -52,20 +53,24 @@ void *Diff(void *argument)
   char varname[CDI_MAX_NAME];
   char paramstr[32];
   char vdatestr[32], vtimestr[32];
-  double *array1, *array2;
+  double absdiff;
+  double abslim = 0., abslim2 = 1.e-3, rellim = 0.5;
   double absm, relm;
   double missval1, missval2;
+  double *array1, *array2;
 
   cdoInitialize(argument);
 
   DIFF  = cdoOperatorAdd("diff",  0, 0, NULL);
-  DIFF2 = cdoOperatorAdd("diff2", 0, 0, NULL);
   DIFFP = cdoOperatorAdd("diffp", 0, 0, NULL);
   DIFFN = cdoOperatorAdd("diffn", 0, 0, NULL);
   DIFFC = cdoOperatorAdd("diffc", 0, 0, NULL);
 
   operatorID = cdoOperatorID();
 
+  if ( operatorArgc() == 1 ) abslim = atof(operatorArgv()[0]);
+  if ( abslim < -1.e33 || abslim > 1.e+33 ) cdoAbort("Abs. limit out of range\n");
+
   streamID1 = streamOpenRead(cdoStreamName(0));
   streamID2 = streamOpenRead(cdoStreamName(1));
 
@@ -76,8 +81,8 @@ void *Diff(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   indg = 0;
   tsID = 0;
@@ -113,6 +118,8 @@ void *Diff(void *argument)
 	  missval1 = vlistInqVarMissval(vlistID1, varID1);
 	  missval2 = vlistInqVarMissval(vlistID2, varID2);
 
+	  checkrel = gridInqType(gridID) != GRID_SPECTRAL;
+
 	  cdiParamToString(param, paramstr, sizeof(paramstr));
 
 	  streamReadRecord(streamID1, array1, &nmiss1);
@@ -126,21 +133,28 @@ void *Diff(void *argument)
 
 	  for ( i = 0; i < gridsize; i++ )
 	    {
-	      if ( !DBL_IS_EQUAL(array1[i], missval1) && !DBL_IS_EQUAL(array2[i], missval2) )
+	      if ( (DBL_IS_NAN(array1[i]) && !DBL_IS_NAN(array2[i])) ||
+		  (!DBL_IS_NAN(array1[i]) &&  DBL_IS_NAN(array2[i])) )
+		{
+		  ndiff++;
+		  relm = 1.0;
+		}
+	      else if ( !DBL_IS_EQUAL(array1[i], missval1) && !DBL_IS_EQUAL(array2[i], missval2) )
 		{
-		  if ( fabs(array1[i] - array2[i]) > 0 ) ndiff++;
+		  absdiff = fabs(array1[i] - array2[i]);
+		  if ( absdiff > 0. ) ndiff++;
+
+		  absm = MAX(absm, absdiff);
 
-		  absm = MAX(absm, fabs(array1[i]-array2[i]));
-		  if ( array1[i]*array2[i] < 0 )
+		  if ( array1[i]*array2[i] < 0. )
 		    dsgn = TRUE;
-		  else if ( IS_EQUAL(array1[i]*array2[i], 0) )
+		  else if ( IS_EQUAL(array1[i]*array2[i], 0.) )
 		    zero = TRUE;
 		  else
-		    relm = MAX(relm, fabs(array1[i]-array2[i]) /
-			   MAX(fabs(array1[i]), fabs(array2[i])));
+		    relm = MAX(relm, absdiff / MAX(fabs(array1[i]), fabs(array2[i])));
 		}
 	      else if ( (DBL_IS_EQUAL(array1[i], missval1) && !DBL_IS_EQUAL(array2[i], missval2)) || 
-			(!DBL_IS_EQUAL(array1[i], missval1) && DBL_IS_EQUAL(array2[i], missval2)) )
+		       (!DBL_IS_EQUAL(array1[i], missval1) &&  DBL_IS_EQUAL(array2[i], missval2)) )
 		{
 		  ndiff++;
 		  relm = 1.0;
@@ -149,63 +163,81 @@ void *Diff(void *argument)
 
 	  if ( ! cdoSilentMode || cdoVerbose )
 	    {
-	      if ( absm > 0 || relm > 0 || cdoVerbose )
+	      if ( absm > abslim || (checkrel && relm > rellim) || cdoVerbose )
 		{
 		  if ( lhead )
 		    {
 		      lhead = FALSE;
 
+		      set_text_color(stdout, BRIGHT, BLACK);
 		      fprintf(stdout, "               Date     Time   Level Gridsize    Miss ");
-			
-		      if ( operatorID == DIFF2 ) fprintf(stdout, "   Diff ");
-
+		      fprintf(stdout, "   Diff ");
 		      fprintf(stdout, ": S Z  Max_Absdiff Max_Reldiff");
 
-		      if ( operatorID == DIFFN || operatorID == DIFF2 )
+		      if ( operatorID == DIFFN )
 			fprintf(stdout, " : Parameter name");
 		      else if ( operatorID == DIFF || operatorID == DIFFP )
 			fprintf(stdout, " : Parameter ID");
 		      else if ( operatorID == DIFFC )
 			fprintf(stdout, " : Code number");
+		      reset_text_color(stdout);
 
 		      fprintf(stdout, "\n");
 		    }
 
 		  if ( operatorID == DIFFN ) vlistInqVarName(vlistID1, varID1, varname);
+		  
+		  set_text_color(stdout, BRIGHT, BLACK);
+		  fprintf(stdout, "%6d ", indg);
+		  reset_text_color(stdout);
+		  set_text_color(stdout, RESET, BLACK);
+		  fprintf(stdout, ":");
+		  reset_text_color(stdout);
 		
-		  fprintf(stdout, "%6d :%s %s ", indg, vdatestr, vtimestr);
-
+		  set_text_color(stdout, RESET, BLUE);
+		  fprintf(stdout, "%s %s ", vdatestr, vtimestr);
 		  fprintf(stdout, "%7g ", zaxisInqLevel(zaxisID, levelID));
-
 		  fprintf(stdout, "%8d %7d ", gridsize, MAX(nmiss1, nmiss2));
-
-		  if ( operatorID == DIFF2 )  fprintf(stdout, "%7d ", ndiff);
+		  fprintf(stdout, "%7d ", ndiff);
+		  reset_text_color(stdout);
 		
-		  fprintf(stdout, ": %c %c ", dsgn ? 'T' : 'F', zero ? 'T' : 'F');
+		  set_text_color(stdout, RESET, BLACK);
+		  fprintf(stdout, ":");
+		  reset_text_color(stdout);
+		  fprintf(stdout, " %c %c ", dsgn ? 'T' : 'F', zero ? 'T' : 'F');
 		  fprintf(stdout, "%#12.5g%#12.5g", absm, relm);
+		  set_text_color(stdout, RESET, BLACK);
+		  fprintf(stdout, " : ");
+		  reset_text_color(stdout);
 
+		  set_text_color(stdout, BRIGHT, GREEN);
 		  if ( operatorID == DIFFN )
-		    fprintf(stdout, " : %-11s", varname);
-		  else if ( operatorID == DIFF || operatorID == DIFF2 || operatorID == DIFFP )
-		    fprintf(stdout, " : %-11s", paramstr);
+		    fprintf(stdout, "%-11s", varname);
+		  else if ( operatorID == DIFF || operatorID == DIFFP )
+		    fprintf(stdout, "%-11s", paramstr);
 		  else if ( operatorID == DIFFC )
-		    fprintf(stdout, " : %4d", code);
+		    fprintf(stdout, "%4d", code);
+		  reset_text_color(stdout);
 		      
 		  fprintf(stdout, "\n");
 		}
 	    }
 
 	  ngrec++;
-	  if ( absm > 0     || relm > 0     ) ndrec++;
-	  if ( absm > 1.e-3 || relm > 1.e-3 ) nd2rec++;
+	  if ( absm > abslim  || (checkrel && relm > rellim) ) ndrec++;
+	  if ( absm > abslim2 || (checkrel && relm > rellim) ) nd2rec++;
 	}
       tsID++;
     }
 
   if ( ndrec > 0 )
     {
-      fprintf(stdout, "  %d of %d records differ\n", ndrec, ngrec);
-      if ( ndrec != nd2rec )
+      set_text_color(stdout, BRIGHT, RED);
+      fprintf(stdout, "  %d of %d records differ", ndrec, ngrec);
+      reset_text_color(stdout);
+      fprintf(stdout, "\n");
+
+      if ( ndrec != nd2rec && abslim < abslim2 )
 	fprintf(stdout, "  %d of %d records differ more than 0.001\n", nd2rec, ngrec);
       /*  fprintf(stdout, "  %d of %d records differ more then one thousandth\n", nprec, ngrec); */
     }
diff --git a/src/Duplicate.c b/src/Duplicate.c
index 42abc1f..2f533e9 100644
--- a/src/Duplicate.c
+++ b/src/Duplicate.c
@@ -86,9 +86,9 @@ void *Duplicate(void *argument)
       if ( tsID >= nalloc )
 	{
 	  nalloc += NALLOC_INC;
-	  vdate = realloc(vdate, nalloc*sizeof(int));
-	  vtime = realloc(vtime, nalloc*sizeof(int));
-	  vars  = realloc(vars, nalloc*sizeof(field_t **));
+	  vdate = (int*) realloc(vdate, nalloc*sizeof(int));
+	  vtime = (int*) realloc(vtime, nalloc*sizeof(int));
+	  vars  = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	}
 
       vdate[tsID] = taxisInqVdate(taxisID1);
@@ -101,7 +101,7 @@ void *Duplicate(void *argument)
 	  streamInqRecord(streamID1, &varID, &levelID);
 	  gridID   = vlistInqVarGrid(vlistID1, varID);
 	  gridsize = gridInqSize(gridID);
-	  vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+	  vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 	  streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
 	  vars[tsID][varID][levelID].nmiss = nmiss;
 	}
diff --git a/src/EOFs.c b/src/EOFs.c
index 507bd0f..e0ccac1 100644
--- a/src/EOFs.c
+++ b/src/EOFs.c
@@ -144,7 +144,7 @@ void *EOFs(void * argument)
   nvars       = vlistNvars(vlistID1);
   nrecs       = vlistNrecs(vlistID1);
 
-  weight      = malloc(gridsize*sizeof(double));
+  weight      = (double*) malloc(gridsize*sizeof(double));
   if ( WEIGHTS )
     gridWeights(gridID1, &weight[0]);
   else
@@ -157,7 +157,7 @@ void *EOFs(void * argument)
   tsID        = 0;
 
   /* COUNT NUMBER OF TIMESTEPS if EOF_ or EOF_TIME */
-  if ( operfunc == EOF_ || operfunc == EOF_TIME)
+  if ( operfunc == EOF_ || operfunc == EOF_TIME )
     {
       if ( cdoVerbose ) 
 	cdoPrint("Counting timesteps in ifile");
@@ -183,10 +183,11 @@ void *EOFs(void * argument)
       streamID1   = streamOpenRead(cdoStreamName(0));
       vlistID1    = streamInqVlist(streamID1);
       taxisID1    = vlistInqTaxis(vlistID1);
-      if ( nts < gridsize || operfunc == EOF_TIME) {
-         time_space = 1;
-         grid_space = 0;
-       }
+      if ( nts < gridsize || operfunc == EOF_TIME )
+	{
+	  time_space = 1;
+	  grid_space = 0;
+	}
       else
         {
           time_space = 0;
@@ -237,11 +238,11 @@ void *EOFs(void * argument)
   if ( cdoTimer ) timer_start(timer_alloc);
 
   /* allocation of temporary fields and output structures */
-  in           = malloc(gridsize*sizeof(double));
-  datafields   = malloc(nvars*sizeof(double ***));
-  datacounts   = malloc(nvars*sizeof(int **));
-  eigenvectors = malloc(nvars*sizeof(double ***));
-  eigenvalues  = malloc(nvars*sizeof(double ***));
+  in           = (double*) malloc(gridsize*sizeof(double));
+  datafields   = (double ****) malloc(nvars*sizeof(double ***));
+  datacounts   = (int ***) malloc(nvars*sizeof(int **));
+  eigenvectors = (double ****) malloc(nvars*sizeof(double ***));
+  eigenvalues  = (double ****) malloc(nvars*sizeof(double ***));
 
   for ( varID = 0; varID < nvars; ++varID )
     {
@@ -250,22 +251,22 @@ void *EOFs(void * argument)
       nlevs               = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
       missval             = vlistInqVarMissval(vlistID1, varID);
 
-      datafields[varID]   = malloc(nlevs*sizeof(double **));
-      datacounts[varID]   = malloc(nlevs*sizeof(int* ));
-      eigenvectors[varID] = malloc(nlevs*sizeof(double **));
-      eigenvalues[varID]  = malloc(nlevs*sizeof(double **));
+      datafields[varID]   = (double ***) malloc(nlevs*sizeof(double **));
+      datacounts[varID]   = (int* *) malloc(nlevs*sizeof(int* ));
+      eigenvectors[varID] = (double ***) malloc(nlevs*sizeof(double **));
+      eigenvalues[varID]  = (double ***) malloc(nlevs*sizeof(double **));
 
       for ( levelID = 0; levelID < nlevs; ++levelID )
         {
           if ( grid_space )
             {
-              datafields[varID][levelID]            = malloc(1*sizeof(double *));
+              datafields[varID][levelID]            = (double **) malloc(1*sizeof(double *));
               //datafields[varID][levelID][0].grid    = gridID1;
               //datafields[varID][levelID][0].nmiss   = 0;
               //datafields[varID][levelID][0].missval = missval;
-              datafields[varID][levelID][0]     = malloc(gridsize*gridsize*sizeof(double));
+              datafields[varID][levelID][0]     = (double*) malloc(gridsize*gridsize*sizeof(double));
 
-              datacounts[varID][levelID]            = malloc(gridsize*gridsize*sizeof(int));
+              datacounts[varID][levelID]            = (int*) malloc(gridsize*gridsize*sizeof(int));
 	      for ( i = 0; i<gridsize*gridsize; i++ )
 		{
 		  datacounts[varID][levelID][i] = 0;
@@ -274,34 +275,34 @@ void *EOFs(void * argument)
 	    }
           else if ( time_space )
             {
-              datafields[varID][levelID] = malloc(nts*sizeof(double *));
+              datafields[varID][levelID] = (double **) malloc(nts*sizeof(double *));
               for ( tsID = 0; tsID < nts; tsID++ )
                 {
                   //datafields[varID][levelID][tsID].grid    = gridID1;
                   //datafields[varID][levelID][tsID].nmiss   = 0;
                   //datafields[varID][levelID][tsID].missval = missval;
-                  datafields[varID][levelID][tsID]    = malloc(gridsize*sizeof(double));
+                  datafields[varID][levelID][tsID]    = (double*) malloc(gridsize*sizeof(double));
                   for ( i = 0; i < gridsize; ++i )
                     datafields[varID][levelID][tsID][i] = 0;
                 }
-              datacounts[varID][levelID] = malloc(gridsize*sizeof(int));	      
+              datacounts[varID][levelID] = (int*) malloc(gridsize*sizeof(int));	      
 	      for(i=0;i<gridsize;i++)
 		datacounts[varID][levelID][i] = 0;
             }
 
-          eigenvectors[varID][levelID] = malloc(n_eig*sizeof(double *));
-          eigenvalues[varID][levelID]  = malloc(n*sizeof(double *));
+          eigenvectors[varID][levelID] = (double **) malloc(n_eig*sizeof(double *));
+          eigenvalues[varID][levelID]  = (double **) malloc(n*sizeof(double *));
 
           for ( i = 0; i < n; i++ )
             {
               if ( i < n_eig )
                 {
-                  eigenvectors[varID][levelID][i] = malloc(gridsize*sizeof(double));
+                  eigenvectors[varID][levelID][i] = (double*) malloc(gridsize*sizeof(double));
                   for ( ii = 0; ii < gridsize; ++ii )
                     eigenvectors[varID][levelID][i][ii] = missval;
                 }
 
-              eigenvalues[varID][levelID][i] = malloc(1*sizeof(double));
+              eigenvalues[varID][levelID][i] = (double*) malloc(1*sizeof(double));
               eigenvalues[varID][levelID][i][0]  = missval;
             }
         }
@@ -400,8 +401,8 @@ void *EOFs(void * argument)
         }
 
   /*
-  pack = malloc(gridsize*sizeof(int)); //TODO
-  miss = malloc(gridsize*sizeof(int));
+  pack = (int*) malloc(gridsize*sizeof(int)); //TODO
+  miss = (int*) malloc(gridsize*sizeof(int));
   */
 
   if ( cdoTimer ) timer_stop(timer_read);
@@ -436,8 +437,8 @@ void *EOFs(void * argument)
 
           if ( grid_space )
             {
-	      pack = malloc(gridsize*sizeof(int));
-	      miss = malloc(gridsize*sizeof(int));
+	      pack = (int*) malloc(gridsize*sizeof(int));
+	      miss = (int*) malloc(gridsize*sizeof(int));
 
               for ( i1 = 0; i1 < gridsize; i1++ )
                 {
@@ -453,10 +454,10 @@ void *EOFs(void * argument)
 	      n = npack;
 	      if ( npack )
 		{
-		  cov = malloc(npack*sizeof(double *));
+		  cov = (double **) malloc(npack*sizeof(double *));
 		  for (i1 = 0; i1 < npack; i1++ )
-		    cov[i1] = malloc(npack*sizeof(double));
-		  eigv = malloc(npack*sizeof(double));
+		    cov[i1] = (double*) malloc(npack*sizeof(double));
+		  eigv = (double*) malloc(npack*sizeof(double));
 		}
 
               for (i1 = 0; i1 < npack; i1++)
@@ -471,10 +472,10 @@ void *EOFs(void * argument)
             {
               sum_w = 0;
 
-	      pack = malloc ( gridsize * sizeof(int) );
-	      miss = malloc ( gridsize * sizeof(int) );
+	      pack = (int*) malloc(gridsize*sizeof(int));
+	      miss = (int*) malloc(gridsize*sizeof(int));
 
-              for ( i = 0; i < gridsize ; i++ )
+              for ( i = 0; i < gridsize; i++ )
                 {
 		  if ( datacountv[i] )
 		    {
@@ -487,10 +488,10 @@ void *EOFs(void * argument)
 	      if ( cdoVerbose )
 		cdoPrint("allocating cov with %i x %i elements | npack=%i",nts,nts,npack);
 
-              cov = malloc (nts*sizeof(double*));
+              cov = (double**) malloc(nts*sizeof(double*));
               for ( j1 = 0; j1 < nts; j1++)
-                cov[j1] = malloc(nts*sizeof(double));
-	      eigv = malloc (nts*sizeof(double));
+                cov[j1] = (double*) malloc(nts*sizeof(double));
+	      eigv = (double*) malloc(nts*sizeof(double));
 
 #if defined(_OPENMP)
 #pragma omp parallel for private(j1,j2,i,sum, df1p, df2p) default(shared) schedule(dynamic)
@@ -530,12 +531,14 @@ void *EOFs(void * argument)
           for (i = 0; i < n; i++) 
             eigenvalues[varID][levelID][i][0] = eigv[i]*sum_w;
 
-          for (i = 0; i < n_eig; i++)
+          for ( i = 0; i < n_eig; i++ )
             {
+	      double *eigenvec = eigenvectors[varID][levelID][i];
+
               if ( grid_space )
 		{
 		  for(j = 0; j < npack; j++)
-		    eigenvectors[varID][levelID][i][pack[j]] = 
+		    eigenvec[pack[j]] = 
 #ifdef OLD_IMPLEMENTATION
 		      cov[i][j] / sqrt(weight[pack[j]]);
 #else
@@ -545,7 +548,7 @@ void *EOFs(void * argument)
               else if ( time_space )
                 {
 #if defined(_OPENMP)
-#pragma omp parallel for private(i2,j,sum) shared(datafieldv,eigenvectors)
+#pragma omp parallel for private(i2,j,sum) shared(datafieldv,eigenvec)
 #endif
                   for ( i2 = 0; i2 < npack; i2++ )
                     {
@@ -553,14 +556,14 @@ void *EOFs(void * argument)
                       for ( j = 0; j < nts; j++ )
                         sum += datafieldv[j][pack[i2]] * cov[i][j];
 
-                      eigenvectors[varID][levelID][i][pack[i2]] = sum;
+                      eigenvec[pack[i2]] = sum;
                     }
                   // NORMALIZING
                   sum = 0;
 
 #if defined(_OPENMP)
 #pragma omp parallel for private(i2) default(none) reduction(+:sum)	\
-  shared(eigenvectors,weight,pack,varID,levelID,i,npack)
+  shared(eigenvec,weight,pack,npack)
 #endif
                   for ( i2 = 0; i2 < npack; i2++ )
 		    {
@@ -572,8 +575,8 @@ void *EOFs(void * argument)
 #else
 		      sum += /*weight[pack[i2]] **/
 #endif
-		      eigenvectors[varID][levelID][i][pack[i2]] *
-		      eigenvectors[varID][levelID][i][pack[i2]];
+			eigenvec[pack[i2]] *
+			eigenvec[pack[i2]];
 		    }
 
                   if ( sum > 0 )
@@ -581,19 +584,19 @@ void *EOFs(void * argument)
                       sum = sqrt(sum);
 #if defined(_OPENMP)
 #pragma omp parallel for private(i2) default(none) \
-  shared(npack,varID,levelID,i,pack,sum,eigenvectors)
+  shared(npack,pack,sum,eigenvec)
 #endif
                       for( i2 = 0; i2 < npack; i2++ )
-                        eigenvectors[varID][levelID][i][pack[i2]] /= sum;
+                        eigenvec[pack[i2]] /= sum;
                     }
                   else
 		    {
 #if defined(_OPENMP)
 #pragma omp parallel for private(i2) default(none) \
-  shared(npack,varID,levelID,i,pack,sum,eigenvectors,missval)
+  shared(npack,pack,eigenvec,missval)
 #endif
 		      for( i2 = 0; i2 < npack; i2++ )
-			eigenvectors[varID][levelID][i][pack[i2]] = missval;
+			eigenvec[pack[i2]] = missval;
 		    }
                 } // else if ( time_space )
             } // for ( i = 0; i < n_eig; i++ )
@@ -766,4 +769,3 @@ void *EOFs(void * argument)
 
   return (0);
 }
-
diff --git a/src/EcaIndices.c b/src/EcaIndices.c
index 03a651b..7c0af95 100755
--- a/src/EcaIndices.c
+++ b/src/EcaIndices.c
@@ -355,7 +355,7 @@ void *EcaCwdi(void *argument)
   if ( operatorArgc() > 0 ) argN = atoi(operatorArgv()[0]);
   if ( operatorArgc() > 1 ) argT = atof(operatorArgv()[1]);
   
-  longname = malloc(strlen(CWDI_LONGNAME) + 80);
+  longname = (char*) malloc(strlen(CWDI_LONGNAME) + 80);
   sprintf(longname, CWDI_LONGNAME, argN, argT);
 
   request.var1.name     = CWDI_NAME;
@@ -396,7 +396,7 @@ void *EcaCwfi(void *argument)
 
   if ( operatorArgc() > 0 ) argN = atoi(operatorArgv()[0]);
 
-  longname = malloc(strlen(CWFI_LONGNAME) + 40);
+  longname = (char*) malloc(strlen(CWFI_LONGNAME) + 40);
   sprintf(longname, CWFI_LONGNAME, argN);
 
   request.var1.name     = CWFI_NAME;
@@ -498,7 +498,7 @@ void *EcaGsl(void *argument)
   if ( operatorArgc() > 1 ) argT = atof(operatorArgv()[1]);
   if ( operatorArgc() > 2 ) minLandFraction = atof(operatorArgv()[2]);
 
-  longname = malloc(strlen(GSL_LONGNAME) + 160);
+  longname = (char*) malloc(strlen(GSL_LONGNAME) + 160);
   sprintf(longname, GSL_LONGNAME, argN, argT, argN, argT);
   
   request.name      = GSL_NAME;
@@ -576,7 +576,7 @@ void *EcaHwdi(void *argument)
   if ( operatorArgc() > 0 ) argN = atoi(operatorArgv()[0]);
   if ( operatorArgc() > 1 ) argT = atof(operatorArgv()[1]);
   
-  longname = malloc(strlen(HWDI_LONGNAME) + 80);
+  longname = (char*) malloc(strlen(HWDI_LONGNAME) + 80);
   sprintf(longname, HWDI_LONGNAME, argN, argT);
   
   request.var1.name     = HWDI_NAME;
@@ -617,7 +617,7 @@ void *EcaHwfi(void *argument)
 
   if ( operatorArgc() > 0 ) argN = atoi(operatorArgv()[0]);
 
-  longname = malloc(strlen(HWFI_LONGNAME) + 40);
+  longname = (char*) malloc(strlen(HWFI_LONGNAME) + 40);
   sprintf(longname, HWFI_LONGNAME, argN);
 
   request.var1.name     = HWFI_NAME;
@@ -683,7 +683,7 @@ void *EcaSu(void *argument)
   cdoOperatorAdd("eca_su", 0, 31, NULL);
 
   if ( operatorArgc() > 0 ) argT = atof(operatorArgv()[0]);
-  longname = malloc(strlen(SU_LONGNAME) + 40);
+  longname = (char*) malloc(strlen(SU_LONGNAME) + 40);
   sprintf(longname, SU_LONGNAME, argT);
 
   request.var1.name     = SU_NAME;
@@ -818,7 +818,7 @@ void *EcaTr(void *argument)
   cdoOperatorAdd("eca_tr", 0, 31, NULL);
 
   if ( operatorArgc() > 0 ) argT = atof(operatorArgv()[0]);
-  longname = malloc(strlen(TR_LONGNAME) + 40);
+  longname = (char*) malloc(strlen(TR_LONGNAME) + 40);
   sprintf(longname, TR_LONGNAME, argT);
  
   request.var1.name     = TR_NAME;
@@ -1327,7 +1327,7 @@ void *EcaRx5day(void *argument)
   cdoInitialize(argument);
   if ( operatorArgc() > 0 ) argX = atof(operatorArgv()[0]);
   
-  longname = malloc(strlen(RX5DAY_LONGNAME2) + 40);
+  longname = (char*) malloc(strlen(RX5DAY_LONGNAME2) + 40);
   sprintf(longname, RX5DAY_LONGNAME2, argX);
   
   cdoOperatorAdd("eca_rx5day", 0, 31, NULL);
@@ -1431,7 +1431,7 @@ void *Strwin(void *argument)
   if ( operatorArgc() > 0 )
     maxWind = atof(operatorArgv()[0]);
 
-  longname = malloc(strlen(STRWIN_LONGNAME) + 40);
+  longname = (char*) malloc(strlen(STRWIN_LONGNAME) + 40);
   sprintf(longname, STRWIN_LONGNAME, maxWind);
          
   request.var1.name     = STRWIN_NAME;
diff --git a/src/Echam5ini.c b/src/Echam5ini.c
index 6dff491..de983ed 100644
--- a/src/Echam5ini.c
+++ b/src/Echam5ini.c
@@ -89,7 +89,7 @@ void inivar(VAR *var, int gridtype, int zaxistype, int code, const char *name,
 static
 void inivars_ml(VAR **vars)
 {
-  *vars = malloc((nvars_ml+1)*sizeof(VAR));
+  *vars = (VAR*) malloc((nvars_ml+1)*sizeof(VAR));
 
   inivar(&(*vars)[0], GRID_GAUSSIAN, ZAXIS_HYBRID,  133, "Q",   "specific humidity", "kg/kg");
   inivar(&(*vars)[1], GRID_SPECTRAL, ZAXIS_HYBRID,  138, "SVO", "vorticity", "1/s");
@@ -170,15 +170,15 @@ int import_e5ml(const char *filename, VAR **vars)
   zaxisIDsfc = zaxisCreate(ZAXIS_SURFACE, 1);
   zaxisIDml  = zaxisCreate(ZAXIS_HYBRID, nlev);
 
-  levs = malloc(nlev*sizeof(double));
+  levs = (double*) malloc(nlev*sizeof(double));
   for ( i = 0; i < nlev; i++ ) levs[i] = i+1;
   zaxisDefLevels(zaxisIDml, levs);
   free(levs);
 
   /* read variables */
 
-  xvals = malloc(nlon*sizeof(double));
-  yvals = malloc(nlat*sizeof(double));
+  xvals = (double*) malloc(nlon*sizeof(double));
+  yvals = (double*) malloc(nlat*sizeof(double));
 
   nce(nc_inq_varid(nc_file_id, "lon", &nc_var_id));
   nce(nc_get_var_double(nc_file_id, nc_var_id, xvals));
@@ -192,7 +192,7 @@ int import_e5ml(const char *filename, VAR **vars)
   free(xvals);
   free(yvals);
 
-  vct   = malloc(nvct*sizeof(double));
+  vct   = (double*) malloc(nvct*sizeof(double));
 
   nce(nc_inq_varid(nc_file_id, "vct_a", &nc_var_id));
   nce(nc_get_var_double(nc_file_id, nc_var_id, vct));
@@ -210,6 +210,8 @@ int import_e5ml(const char *filename, VAR **vars)
       gridtype  = (*vars)[iv].gridtype;
       zaxistype = (*vars)[iv].zaxistype;
 
+      UNUSED(zaxistype);
+
       if ( gridtype == GRID_GAUSSIAN )
 	{
 	  (*vars)[iv].gridID = gridIDgp;
@@ -225,7 +227,7 @@ int import_e5ml(const char *filename, VAR **vars)
       (*vars)[iv].gridsize  = nvals;
       (*vars)[iv].nlev      = nlev;
 
-      (*vars)[iv].ptr = malloc(nlev*nvals*sizeof(double));
+      (*vars)[iv].ptr = (double*) malloc(nlev*nvals*sizeof(double));
       
       for ( i = 0; i < nlev; i++ )
 	{
@@ -255,7 +257,7 @@ int import_e5ml(const char *filename, VAR **vars)
   start[0] = 0;    start[1] = 0;  start[2] = nlev;
   count[0] = nsp;  count[1] = 2;  count[2] = 1;
 
-  (*vars)[nvars_ml].ptr = malloc(nsp*2*sizeof(double));
+  (*vars)[nvars_ml].ptr = (double*) malloc(nsp*2*sizeof(double));
 
   nce(nc_inq_varid(nc_file_id, "STP", &nc_var_id));
   nce(nc_get_vara_double(nc_file_id, nc_var_id, start, count, (*vars)[nvars_ml].ptr));
@@ -283,7 +285,7 @@ void export_e5ml(const char *filename, VAR *vars, int nvars, int vdate, int vtim
   int varid, code;
   int ilev;
   int lon, lat;
-  int nlon, nlat, nlev, nlevp1, nvct, nsp, n2, i, nvclev;
+  int nlon, nlat, nlev, nlevp1/*, nvct*/, nsp, n2, i, nvclev;
   int lat_dimid, lon_dimid, nlev_dimid, nlevp1_dimid, nsp_dimid, nvclev_dimid, n2_dimid;
   int gridIDgp = -1, gridIDsp, zaxisIDml = -1;
   int gridtype, zaxistype;
@@ -293,7 +295,7 @@ void export_e5ml(const char *filename, VAR *vars, int nvars, int vdate, int vtim
   const double *vct;
   char atttext[1024];
   size_t attlen;
-  int attint;
+  //int attint;
   char *username;
   char timestr[30];
   time_t date_and_time_in_sec;
@@ -335,6 +337,7 @@ void export_e5ml(const char *filename, VAR *vars, int nvars, int vdate, int vtim
       else if ( gridtype == GRID_SPECTRAL && nsp == 0 )
 	{
 	  gridIDsp = vars[varid].gridID;
+	  UNUSED(gridIDsp);
 	  nsp = gridInqSize(vars[varid].gridID);
 	  nsp = nsp/2;
 	}
@@ -424,7 +427,7 @@ void export_e5ml(const char *filename, VAR *vars, int nvars, int vdate, int vtim
   nce(nc_put_att_int(nc_file_id, NC_GLOBAL, "vdate", NC_INT, 1, &vdate));
   nce(nc_put_att_int(nc_file_id, NC_GLOBAL, "vtime", NC_INT, 1, &vtime));
 
-  attint = 31;
+  //attint = 31;
   nce(nc_put_att_int(nc_file_id, NC_GLOBAL, "spherical_truncation_n", NC_INT, 1, &ntr));
   nce(nc_put_att_int(nc_file_id, NC_GLOBAL, "spherical_truncation_m", NC_INT, 1, &ntr));
   nce(nc_put_att_int(nc_file_id, NC_GLOBAL, "spherical_truncation_k", NC_INT, 1, &ntr));
@@ -449,8 +452,8 @@ void export_e5ml(const char *filename, VAR *vars, int nvars, int vdate, int vtim
 
   /* define gaussian grid */
 
-  xvals = malloc(nlon*sizeof(double));
-  yvals = malloc(nlat*sizeof(double));
+  xvals = (double*) malloc(nlon*sizeof(double));
+  yvals = (double*) malloc(nlat*sizeof(double));
 
   gridInqXvals(gridIDgp, xvals);
   gridInqYvals(gridIDgp, yvals);
@@ -482,9 +485,9 @@ void export_e5ml(const char *filename, VAR *vars, int nvars, int vdate, int vtim
 
   /* define model level */
 
-  nvct = nvclev*2;
+  // nvct = nvclev*2;
 
-  /* vct   = malloc(nvct*sizeof(double)); */
+  /* vct   = (double*) malloc(nvct*sizeof(double)); */
 
   vct = zaxisInqVctPtr(zaxisIDml);
 
@@ -631,7 +634,7 @@ void read_gg3d(int nc_file_id, const char *name, VAR *var, int gridID, int zaxis
   var->gridsize  = gridsize;
   var->nlev      = nlev;
 
-  var->ptr = malloc(nlev*gridsize*sizeof(double));
+  var->ptr = (double*) malloc(nlev*gridsize*sizeof(double));
   
   for ( i = 0; i < nlev; i++ )
     {
@@ -668,7 +671,7 @@ void read_fc4d(int nc_file_id, const char *name, VAR *var, int gridID, int zaxis
   var->gridsize  = nfc;
   var->nlev      = nlev;
 
-  var->ptr = malloc(nlev*nfc*sizeof(double));
+  var->ptr = (double*) malloc(nlev*nfc*sizeof(double));
   
   for ( i = 0; i < nlev; i++ )
     {
@@ -747,6 +750,8 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
   nce(nc_inq_dimlen(nc_file_id, spc_dimid, &dimlen));
   spc = (int) dimlen;
 
+  UNUSED(spc);
+
   nce(nc_inq_dimid(nc_file_id, "nvclev", &nvclev_dimid));
   nce(nc_inq_dimlen(nc_file_id, nvclev_dimid, &dimlen));
   nvclev = (int) dimlen;
@@ -771,6 +776,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
   nce(nc_inq_dimlen(nc_file_id, ilev_dimid, &dimlen));
   ilev = (int) dimlen;
 
+  UNUSED(ilev);
   /*
   nce(nc_inq_dimid(nc_file_id, "surface", &surface_dimid));
   nce(nc_inq_dimlen(nc_file_id, surface_dimid, &surface));
@@ -794,8 +800,8 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
   gridDefXsize(gridIDgp, nlon);
   gridDefYsize(gridIDgp, nlat);
 
-  xvals = malloc(nlon*sizeof(double));
-  yvals = malloc(nlat*sizeof(double));
+  xvals = (double*) malloc(nlon*sizeof(double));
+  yvals = (double*) malloc(nlat*sizeof(double));
 
   nce(nc_inq_varid(nc_file_id, "lon", &nc_var_id));
   nce(nc_get_var_double(nc_file_id, nc_var_id, xvals));
@@ -829,7 +835,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
   nlev = belowsurface;
   zaxisIDbsfc = zaxisCreate(ZAXIS_DEPTH_BELOW_LAND, nlev);
 
-  levs = malloc(nlev*sizeof(double));
+  levs = (double*) malloc(nlev*sizeof(double));
   for ( i = 0; i < nlev; i++ ) levs[i] = 0;
   zaxisDefLevels(zaxisIDbsfc, levs);
   free(levs);
@@ -840,7 +846,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
   nlev = n2;
   zaxisIDn2 = zaxisCreate(ZAXIS_GENERIC, nlev);
 
-  levs = malloc(nlev*sizeof(double));
+  levs = (double*) malloc(nlev*sizeof(double));
   for ( i = 0; i < nlev; i++ ) levs[i] = 0;
   zaxisDefLevels(zaxisIDn2, levs);
   free(levs);
@@ -850,7 +856,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
   nlev = lev;
   nvct = nvclev*2;
 
-  vct   = malloc(nvct*sizeof(double));
+  vct   = (double*) malloc(nvct*sizeof(double));
 
   nce(nc_inq_varid(nc_file_id, "vct_a", &nc_var_id));
   nce(nc_get_var_double(nc_file_id, nc_var_id, vct));
@@ -862,7 +868,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
 
   zaxisIDml  = zaxisCreate(ZAXIS_HYBRID, nlev);
 
-  levs = malloc(nlev*sizeof(double));
+  levs = (double*) malloc(nlev*sizeof(double));
   for ( i = 0; i < nlev; i++ ) levs[i] = i+1;
   zaxisDefLevels(zaxisIDml, levs);
   free(levs);
@@ -873,7 +879,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
 
   zaxisIDmlh  = zaxisCreate(ZAXIS_HYBRID_HALF, nlevp1);
 
-  levs = malloc(nlevp1*sizeof(double));
+  levs = (double*) malloc(nlevp1*sizeof(double));
   for ( i = 0; i < nlevp1; i++ ) levs[i] = i;
   zaxisDefLevels(zaxisIDmlh, levs);
   free(levs);
@@ -930,7 +936,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
 	}
     }
 
-  *vars = malloc(max_vars*sizeof(VAR));
+  *vars = (VAR*) malloc(max_vars*sizeof(VAR));
 
   varid = 0;
   for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
@@ -1002,7 +1008,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
 	      (*vars)[varid].gridsize  = nvals;
 	      (*vars)[varid].nlev      = 1;
 
-	      (*vars)[varid].ptr = malloc(nvals*sizeof(double));
+	      (*vars)[varid].ptr = (double*) malloc(nvals*sizeof(double));
 
 	      nce(nc_inq_varid(nc_file_id, name, &nc_var_id));
 	      nce(nc_get_var_double(nc_file_id, nc_var_id, (*vars)[varid].ptr));
@@ -1020,7 +1026,7 @@ int import_e5res(const char *filename, VAR **vars, ATTS *atts)
 	      (*vars)[varid].gridsize  = nvals;
 	      (*vars)[varid].nlev      = nlev;
 
-	      (*vars)[varid].ptr = malloc(nvals*nlev*sizeof(double));
+	      (*vars)[varid].ptr = (double*) malloc(nvals*nlev*sizeof(double));
 
 	      for ( i = 0; i < nlev; i++ )
 		{
@@ -1083,7 +1089,7 @@ void export_e5res(const char *filename, VAR *vars, int nvars)
   int varid;
   size_t nvals;
   size_t start[4], count[4];
-  int nlon, nlat, nlev, nvct, nfc, i;
+  int nlon, nlat, nlev/*, nvct*/, nfc, i;
   int gridIDgp = -1, zaxisIDml = -1;
   int nc_file_id;
   double *xvals, *yvals;
@@ -1369,8 +1375,8 @@ void export_e5res(const char *filename, VAR *vars, int nvars)
   nlon = lon;
   nlat = lat;
 
-  xvals = malloc(nlon*sizeof(double));
-  yvals = malloc(nlat*sizeof(double));
+  xvals = (double*) malloc(nlon*sizeof(double));
+  yvals = (double*) malloc(nlat*sizeof(double));
 
   gridInqXvals(gridIDgp, xvals);
   gridInqYvals(gridIDgp, yvals);
@@ -1392,9 +1398,9 @@ void export_e5res(const char *filename, VAR *vars, int nvars)
   /* define model level */
 
   nlev = lev;
-  nvct = nvclev*2;
+  //nvct = nvclev*2;
 
-  /* vct   = malloc(nvct*sizeof(double)); */
+  /* vct   = (double*) malloc(nvct*sizeof(double)); */
 
   vct = zaxisInqVctPtr(zaxisIDml);
 
@@ -1530,7 +1536,7 @@ void *Echam5ini(void *argument)
 
       nvars = vlistNvars(vlistID1);
 
-      vars = malloc(nvars*sizeof(VAR));
+      vars = (VAR*) malloc(nvars*sizeof(VAR));
 
       for ( varID = 0; varID < nvars; ++varID )
 	{
@@ -1581,7 +1587,7 @@ void *Echam5ini(void *argument)
 	  vars[varID].gridsize  = gridsize;
 	  vars[varID].nlev      = nlev;
 
-	  vars[varID].ptr = malloc(nlev*gridsize*sizeof(double));
+	  vars[varID].ptr = (double*) malloc(nlev*gridsize*sizeof(double));
 	}
 
       nrecs = streamInqTimestep(streamID1, 0);
diff --git a/src/Enlarge.c b/src/Enlarge.c
index fb5ece5..ebd5b80 100644
--- a/src/Enlarge.c
+++ b/src/Enlarge.c
@@ -77,8 +77,8 @@ void *Enlarge(void *argument)
 
   streamDefVlist(streamID2, vlistID2);
 
-  array1 = malloc(gridsize2*sizeof(double));
-  array2 = malloc(gridsize2*sizeof(double));
+  array1 = (double*) malloc(gridsize2*sizeof(double));
+  array2 = (double*) malloc(gridsize2*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Enlargegrid.c b/src/Enlargegrid.c
index c541a83..ab6f3a0 100644
--- a/src/Enlargegrid.c
+++ b/src/Enlargegrid.c
@@ -69,13 +69,13 @@ void gen_index(int gridID1, int gridID2, int *index)
       if ( ! (gridInqXvals(gridID2, NULL) && gridInqYvals(gridID2, NULL)) )
 	cdoAbort("Grid 2 has no values!");
 
-      xvals1 = malloc(nlon1*sizeof(double));
-      yvals1 = malloc(nlat1*sizeof(double));
-      xvals2 = malloc(nlon2*sizeof(double));
-      yvals2 = malloc(nlat2*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*sizeof(double));
+      yvals1 = (double*) malloc(nlat1*sizeof(double));
+      xvals2 = (double*) malloc(nlon2*sizeof(double));
+      yvals2 = (double*) malloc(nlat2*sizeof(double));
 
-      xindex = malloc(nlon2*sizeof(int));
-      yindex = malloc(nlat2*sizeof(int));
+      xindex = (int*) malloc(nlon2*sizeof(int));
+      yindex = (int*) malloc(nlat2*sizeof(int));
 
       gridInqXvals(gridID1, xvals1);
       gridInqYvals(gridID1, yvals1);
@@ -209,9 +209,9 @@ void *Enlargegrid(void *argument)
   gridsize1 = gridInqSize(gridID1);
   gridsize2 = gridInqSize(gridID2);
 
-  array1 = malloc(gridsize1*sizeof(double));
-  array2 = malloc(gridsize2*sizeof(double));
-  gindex = malloc(gridsize1*sizeof(int));
+  array1 = (double*) malloc(gridsize1*sizeof(double));
+  array2 = (double*) malloc(gridsize2*sizeof(double));
+  gindex = (int*) malloc(gridsize1*sizeof(int));
 
   gen_index(gridID2, gridID1, gindex);
 
diff --git a/src/Ensstat.c b/src/Ensstat.c
index a95cfe7..86d85b1 100644
--- a/src/Ensstat.c
+++ b/src/Ensstat.c
@@ -108,15 +108,15 @@ void *Ensstat(void *argument)
       if ( !userFileOverwrite(ofilename) )
 	cdoAbort("Outputfile %s already exists!", ofilename);
 
-  ef = malloc(nfiles*sizeof(ens_file_t));
+  ef = (ens_file_t*) malloc(nfiles*sizeof(ens_file_t));
 
-  field = malloc(ompNumThreads*sizeof(field_t));
+  field = (field_t*) malloc(ompNumThreads*sizeof(field_t));
   for ( i = 0; i < ompNumThreads; i++ )
     {
       field_init(&field[i]);
       field[i].size   = nfiles;
-      field[i].ptr    = malloc(nfiles*sizeof(double));
-      field[i].weight = malloc(nfiles*sizeof(double));
+      field[i].ptr    = (double*) malloc(nfiles*sizeof(double));
+      field[i].weight = (double*) malloc(nfiles*sizeof(double));
       for ( fileID = 0; fileID < nfiles; fileID++ )
 	field[i].weight[fileID] = 1;
     }
@@ -148,9 +148,9 @@ void *Ensstat(void *argument)
   gridsize = vlistGridsizeMax(vlistID1);
 
   for ( fileID = 0; fileID < nfiles; fileID++ )
-    ef[fileID].array = malloc(gridsize*sizeof(double));
+    ef[fileID].array = (double*) malloc(gridsize*sizeof(double));
 
-  array2 = malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   do
diff --git a/src/Ensstat3.c b/src/Ensstat3.c
index 6f16560..916bee4 100644
--- a/src/Ensstat3.c
+++ b/src/Ensstat3.c
@@ -121,7 +121,7 @@ void *Ensstat3(void *argument)
       if ( !userFileOverwrite(ofilename) )
 	cdoAbort("Outputfile %s already exists!", ofilename);
 
-  ef = malloc(nfiles*sizeof(ens_file_t));
+  ef = (ens_file_t*) malloc(nfiles*sizeof(ens_file_t));
 
   /* *************************************************** */
   /* should each thread be allocating memory locally???? */
@@ -129,17 +129,17 @@ void *Ensstat3(void *argument)
   /* --> #pragma omp parallel for ...                    */
   /* *************************************************** */
 #if defined(_OPENMP)
-  field = malloc(omp_get_max_threads()*sizeof(field_t));
+  field = (field_t*) malloc(omp_get_max_threads()*sizeof(field_t));
   for ( i = 0; i < omp_get_max_threads(); i++ )
 #else
-  field = malloc(1*sizeof(field_t));
+  field = (field_t*) malloc(1*sizeof(field_t));
   for ( i = 0; i < 1; i++ )
 #endif
     {
       field_init(&field[i]);
       field[i].size   = nfiles;
-      field[i].ptr    = malloc(nfiles*sizeof(double));
-      field[i].weight = malloc(nfiles*sizeof(double));
+      field[i].ptr    = (double*) malloc(nfiles*sizeof(double));
+      field[i].weight = (double*) malloc(nfiles*sizeof(double));
       for ( fileID = 0; fileID < nfiles; fileID++ )
 	field[i].weight[fileID] = 1;
     }
@@ -161,9 +161,9 @@ void *Ensstat3(void *argument)
   vlistID1 = ef[0].vlistID;
   vlistID2 = vlistCreate();
   nvars = vlistNvars(vlistID1);
-  varID2 = malloc(nvars*sizeof(int));
+  varID2 = (int*) malloc(nvars*sizeof(int));
 
-  levs = calloc (nfiles, sizeof(double) );
+  levs = (double*) calloc(nfiles, sizeof(double));
   zaxisID2 = zaxisCreate(ZAXIS_GENERIC, nfiles);
   for ( i=0; i<nfiles; i++ )
     levs[i] = i;
@@ -217,37 +217,37 @@ void *Ensstat3(void *argument)
   gridsize = vlistGridsizeMax(vlistID1);
 
   for ( fileID = 0; fileID < nfiles; fileID++ )
-    ef[fileID].array = malloc(gridsize*sizeof(double));
+    ef[fileID].array = (double*) malloc(gridsize*sizeof(double));
 
   if ( operfunc == func_rank && datafunc == SPACE ) 
     { /*need to memorize data for entire grid before writing          */
-      array2 = malloc((nfiles+1)*sizeof(int*));
+      array2 = (int**) malloc((nfiles+1)*sizeof(int*));
       for ( binID=0; binID<nfiles; binID++ ) 
-	array2[binID] = calloc ( gridsize, sizeof(int) );
+	array2[binID] = (int*) calloc( gridsize, sizeof(int));
     }
   else if ( operfunc == func_rank )
     {  /* can process data separately for each timestep and only need */
        /* to cumulate values over the grid                            */
-      array2    = malloc ( (nfiles+1)*sizeof(int *));
+      array2    = (int **) malloc( (nfiles+1)*sizeof(int *));
       for ( binID=0; binID<nfiles; binID++ )
-	array2[binID] = calloc ( 1, sizeof(int) );
+	array2[binID] = (int*) calloc( 1, sizeof(int));
     }
 
   if ( operfunc == func_roc ) {
-    ctg_tab = malloc ((nbins+1)*sizeof(int*) );
-    hist =    malloc ( nbins*sizeof(int) );
-    uThresh = malloc ( nbins*sizeof(double) );
-    lThresh = malloc ( nbins*sizeof(double) );
-    roc     = malloc ((nbins+1)*sizeof(double*) );
+    ctg_tab = (int**) malloc((nbins+1)*sizeof(int*));
+    hist =    (int*) malloc ( nbins*sizeof(int));
+    uThresh = (double*) malloc( nbins*sizeof(double));
+    lThresh = (double*) malloc( nbins*sizeof(double));
+    roc     = (double**) malloc((nbins+1)*sizeof(double*));
     
     for  ( i=0; i<nbins; i++ ) {
-      ctg_tab[i] = calloc ( 4,sizeof(int) );
-      roc[i]     = calloc( 2,sizeof(double));
+      ctg_tab[i] = (int*) calloc( 4,sizeof(int));
+      roc[i]     = (double*) calloc( 2,sizeof(double));
       uThresh[i] = ((double)i+1)/nbins;
       lThresh[i] = (double)i/nbins;
     }
-    ctg_tab[nbins] = calloc (4,sizeof(int));
-    roc[nbins]     = calloc (2,sizeof(double));
+    ctg_tab[nbins] = (int*) calloc(4,sizeof(int));
+    roc[nbins]     = (double*) calloc(2,sizeof(double));
   }
   
   
@@ -451,7 +451,7 @@ void *Ensstat3(void *argument)
       int osize = gridsize;
 
       if ( datafunc == TIME ) osize = 1;
-      tmpdoub = malloc(osize*sizeof(double));
+      tmpdoub = (double*) malloc(osize*sizeof(double));
 
       for ( binID = 0; binID < nfiles; binID++ )
 	{
diff --git a/src/Ensval.c b/src/Ensval.c
index d4607ae..0e86324 100644
--- a/src/Ensval.c
+++ b/src/Ensval.c
@@ -92,7 +92,7 @@ void *Ensval(void *argument)
   x = NULL;
   val = NULL;
   weights = NULL; 
-  int vlistCheck, gridsizeCheck;
+  //int vlistCheck, gridsizeCheck;
   
   cdoInitialize(argument);
   
@@ -118,31 +118,31 @@ void *Ensval(void *argument)
   }
 
   // allocate array to hold results 
-  r = malloc ( nostreams*sizeof(double) );
+  r = (double*) malloc( nostreams*sizeof(double));
   
 
   // one stream for each value of the decomposition
-  streamID2 = malloc ( nostreams*sizeof(int) );
-  vlistID2 = malloc ( nostreams*sizeof(int) );
-  taxisID2 = malloc ( nostreams*sizeof(int) );
-  zaxisID2 = malloc ( nostreams*sizeof(int) );
+  streamID2 = (int*) malloc( nostreams*sizeof(int));
+  vlistID2 = (int*) malloc( nostreams*sizeof(int));
+  taxisID2 = (int*) malloc( nostreams*sizeof(int));
+  zaxisID2 = (int*) malloc( nostreams*sizeof(int));
 
-  val = calloc ( nfiles,sizeof(double) );
+  val = (double*) calloc( nfiles,sizeof(double));
   
   if ( operfunc == CRPS ) {
-    alpha=calloc ( nens+1,sizeof(double) );
-    beta =calloc ( nens+1,sizeof(double) );
-    alpha_weights=calloc ( nens+1,sizeof(double) );
-    beta_weights =calloc ( nens+1,sizeof(double) );
+    alpha= (double*) calloc( nens+1,sizeof(double));
+    beta = (double*) calloc( nens+1,sizeof(double));
+    alpha_weights= (double*) calloc( nens+1,sizeof(double));
+    beta_weights = (double*) calloc( nens+1,sizeof(double));
   }
   else if ( operfunc == BRS ) {
-    brs_g = calloc ( nens+1,sizeof(double) );
-    brs_o = calloc ( nens+1,sizeof(double) );
+    brs_g = (double*) calloc( nens+1,sizeof(double));
+    brs_o = (double*) calloc( nens+1,sizeof(double));
   }
   if ( cdoVerbose )
     cdoPrint("Ensemble over %d files (Ensstat5).", nfiles-1);
 
-  ef = malloc(nfiles*sizeof(ens_file_t));
+  ef = (ens_file_t*) malloc(nfiles*sizeof(ens_file_t));
   
   for ( fileID = 0; fileID < nfiles; fileID++ )
     {
@@ -203,7 +203,7 @@ void *Ensval(void *argument)
       break;
     }
 
-    ofilename = calloc(namelen, sizeof(char));
+    ofilename = (char*) calloc(namelen, sizeof(char));
 
     sprintf(ofilename, "%s.%s%s", ofilebase, type_suffix, file_suffix);
     // fprintf(stderr, "StreamID %i: %s\n", stream, ofilename);
@@ -270,11 +270,11 @@ void *Ensval(void *argument)
 		  missval  = vlistInqVarMissval(vlistID1, varID);
 		  gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));//vlistGridsizeMax(vlistID1);
 		  if ( weights ) free(weights); 
-		  weights=malloc (gridsize*sizeof(double));
+		  weights= (double*) malloc(gridsize*sizeof(double));
 		}
 
 	      if (ef[fileID].array ) free(ef[fileID].array);
-	      ef[fileID].array = malloc(gridsize*sizeof(double));
+	      ef[fileID].array = (double*) malloc(gridsize*sizeof(double));
 
 	      streamID = ef[fileID].streamID;
 	      streamReadRecord(streamID, ef[fileID].array, &nmiss);
diff --git a/src/Eof3d.c b/src/Eof3d.c
index 4a31789..d534104 100644
--- a/src/Eof3d.c
+++ b/src/Eof3d.c
@@ -56,7 +56,6 @@ void *EOF3d(void * argument)
   int gridsize, temp_size = 0;
   int gridID1, gridID2, gridID3;
   int i, i2, j, j1, j2, eofID, varID, recID, levelID, tsID;
-  int *miss;
   int missval_warning=0;
   int nmiss,ngrids,n_eig,nrecs,nvars,n=0,nlevs=0,npack=0,nts=0;
   int offset;
@@ -145,7 +144,7 @@ void *EOF3d(void * argument)
   nvars       = vlistNvars(vlistID1);
   nrecs       = vlistNrecs(vlistID1);
   taxisID1    = vlistInqTaxis(vlistID1);
-  weight      = malloc(gridsize*sizeof(double));
+  weight      = (double*) malloc(gridsize*sizeof(double));
   if ( WEIGHTS )
       gridWeights(gridID1, &weight[0]);
   else
@@ -161,9 +160,9 @@ void *EOF3d(void * argument)
   gridID2     = gridCreate(GRID_LONLAT, 1);
   gridDefXsize(gridID2, 1);
   gridDefYsize(gridID2, 1);
-  xvals       = malloc(1*sizeof(double));
-  yvals       = malloc(1*sizeof(double));
-  zvals       = malloc(1*sizeof(double));
+  xvals       = (double*) malloc(1*sizeof(double));
+  yvals       = (double*) malloc(1*sizeof(double));
+  zvals       = (double*) malloc(1*sizeof(double));
   xvals[0]    = 0;
   yvals[0]    = 0;
   zvals[0]    = 0;
@@ -180,7 +179,7 @@ void *EOF3d(void * argument)
   taxisDefRtime(taxisID2, 0);
   vlistDefTaxis(vlistID2, taxisID2);
 
-  varID2 = malloc (nvars*sizeof(int));
+  varID2 = (int*) malloc(nvars*sizeof(int));
   for ( varID=0; varID<nvars; varID++ )
     varID2[varID] = vlistDefVar(vlistID2, gridID2, zaxisID2, TSTEP_INSTANT);
   ngrids      = vlistNgrids(vlistID2);
@@ -243,11 +242,11 @@ void *EOF3d(void * argument)
   if ( cdoTimer ) timer_start(timer_alloc);
 
   /* allocation of temporary fields and output structures */
-  in.ptr       = malloc(gridsize*sizeof(double));
-  datafields   = malloc(nvars*sizeof(field_t*));
-  datacounts   = malloc(nvars*sizeof(int *));
-  eigenvectors = malloc(nvars*sizeof(field_t*));
-  eigenvalues  = malloc(nvars*sizeof(field_t*));
+  in.ptr       = (double*) malloc(gridsize*sizeof(double));
+  datafields   = (field_t**) malloc(nvars*sizeof(field_t*));
+  datacounts   = (int**) malloc(nvars*sizeof(int*));
+  eigenvectors = (field_t**) malloc(nvars*sizeof(field_t*));
+  eigenvalues  = (field_t**) malloc(nvars*sizeof(field_t*));
 
   for ( varID = 0; varID < nvars; ++varID )
     {
@@ -257,26 +256,25 @@ void *EOF3d(void * argument)
       temp_size           = gridsize * nlevs;
       missval             = vlistInqVarMissval(vlistID1, varID);
 
-      datafields[varID]   = malloc(nlevs*sizeof(field_t*));
-      datacounts[varID]   = malloc(nlevs*sizeof(int* ));
-      eigenvectors[varID] = malloc(nlevs*sizeof(field_t*));
+      datacounts[varID]   = (int*) malloc(nlevs*sizeof(int));
+      eigenvectors[varID] = (field_t*) malloc(nlevs*sizeof(field_t));
+      datafields[varID]   = (field_t*) malloc(nts*sizeof(field_t));
 
-      datafields[varID] = malloc(nts*sizeof(field_t));
       for ( tsID = 0; tsID < nts; tsID++ )
 	{
 	  datafields[varID][tsID].grid    = gridID1;
 	  datafields[varID][tsID].nmiss   = 0;
 	  datafields[varID][tsID].missval = missval;
-	  datafields[varID][tsID].ptr     = malloc(temp_size*sizeof(double));
+	  datafields[varID][tsID].ptr     = (double*) malloc(temp_size*sizeof(double));
 	  for ( i = 0; i < temp_size; ++i )
 	    datafields[varID][tsID].ptr[i] = 0;
 	}
-      datacounts[varID] = malloc(temp_size*sizeof(int));	      
+      datacounts[varID] = (int*) malloc(temp_size*sizeof(int));	      
       for(i=0;i<temp_size;i++)
 	datacounts[varID][i] = 0;
       
-      eigenvectors[varID] = malloc(n_eig*sizeof(field_t));
-      eigenvalues[varID]  = malloc(nts*sizeof(field_t));
+      eigenvectors[varID] = (field_t*) malloc(n_eig*sizeof(field_t));
+      eigenvalues[varID]  = (field_t*) malloc(nts*sizeof(field_t));
 
       for ( i = 0; i < n; i++ )
 	{
@@ -285,7 +283,7 @@ void *EOF3d(void * argument)
 	      eigenvectors[varID][i].grid    = gridID2;
 	      eigenvectors[varID][i].nmiss   = 0;
 	      eigenvectors[varID][i].missval = missval;
-	      eigenvectors[varID][i].ptr     = malloc(temp_size*sizeof(double));
+	      eigenvectors[varID][i].ptr     = (double*) malloc(temp_size*sizeof(double));
 	      for ( i2 = 0; i2 < temp_size; ++i2 )
 		eigenvectors[varID][i].ptr[i2] = missval;
 	    }
@@ -293,7 +291,7 @@ void *EOF3d(void * argument)
 	  eigenvalues[varID][i].grid    = gridID3;
 	  eigenvalues[varID][i].nmiss   = 0;
 	  eigenvalues[varID][i].missval = missval;
-	  eigenvalues[varID][i].ptr     = malloc(1*sizeof(double));
+	  eigenvalues[varID][i].ptr     = (double*) malloc(1*sizeof(double));
 	  eigenvalues[varID][i].ptr[0]  = missval;
 	}
     }
@@ -355,8 +353,7 @@ void *EOF3d(void * argument)
   if ( cdoVerbose ) 
     cdoPrint("Read data for %i variables",nvars);
   
-  pack = malloc(temp_size*sizeof(int)); //TODO
-  miss = malloc(temp_size*sizeof(int));
+  pack = (int*) malloc(temp_size*sizeof(int)); //TODO
 
   if ( cdoTimer ) timer_stop(timer_read);
 
@@ -378,14 +375,15 @@ void *EOF3d(void * argument)
 
       if ( cdoTimer ) timer_start(timer_cov);
       
-      sum_w = 0;
+      // sum_w = 0;
+      sum_w = 1;
       for ( i = 0; i < temp_size ; i++ )
 	{
 	  if ( datacounts[varID][i] > 1)
 	    {
 	      pack[npack] = i;
 	      npack++;
-	      sum_w += weight[i%gridsize];
+	      //  sum_w += weight[i%gridsize];
 	    }
 	}
 
@@ -397,10 +395,10 @@ void *EOF3d(void * argument)
       }
 
 	  
-      cov = malloc (nts*sizeof(double*));
+      cov = (double**) malloc(nts*sizeof(double*));
       for ( j1 = 0; j1 < nts; j1++)
-	cov[j1] = malloc(nts*sizeof(double));
-      eigv = malloc(n*sizeof(double));
+	cov[j1] = (double*) malloc(nts*sizeof(double));
+      eigv = (double*) malloc(n*sizeof(double));
 
       if ( cdoVerbose )  {
 	cdoPrint("varID %i allocated eigv and cov with nts=%i and n=%i",varID,nts,n);
@@ -418,6 +416,7 @@ void *EOF3d(void * argument)
 	    df1p = datafields[varID][j1].ptr;
 	    df2p = datafields[varID][j2].ptr;
 	    for ( i = 0; i < npack; i++ )
+	      //  sum += df1p[pack[i]]*df2p[pack[i]];
 	      sum += weight[pack[i]%gridsize]*df1p[pack[i]]*df2p[pack[i]];
 	    cov[j2][j1] = cov[j1][j2] = sum / sum_w / nts;
 	  }
@@ -450,44 +449,45 @@ void *EOF3d(void * argument)
 
       for ( eofID = 0; eofID < n_eig; eofID++ )
 	{
+	  double *eigenvec = eigenvectors[varID][eofID].ptr;
+
 #if defined(_OPENMP)
-#pragma omp parallel for private(i,j,sum) shared(datafields, eigenvectors)
+#pragma omp parallel for private(i,j,sum) shared(datafields, eigenvec)
 #endif 
 	  for ( i = 0; i < npack; i++ )
 	    {
 	      sum = 0;
 	      for ( j = 0; j < nts; j++ )
 		sum += datafields[varID][j].ptr[pack[i]] * cov[eofID][j];
-	      eigenvectors[varID][eofID].ptr[pack[i]] = sum;
+	      eigenvec[pack[i]] = sum;
 	    }
 	  // NORMALIZING
 	  sum = 0;
 
 #if defined(_OPENMP)
 #pragma omp parallel for private(i) default(none) reduction(+:sum) \
-  shared(eigenvectors,weight,pack,varID,eofID,npack,gridsize)
+  shared(eigenvec,weight,pack,npack,gridsize)
 #endif 
 	  for ( i = 0; i < npack; i++ )
-	    sum +=  weight[pack[i]%gridsize] *
-	      eigenvectors[varID][eofID].ptr[pack[i]] *
-	      eigenvectors[varID][eofID].ptr[pack[i]];
+	    // sum +=  weight[pack[i]%gridsize] *
+	    sum += eigenvec[pack[i]] * eigenvec[pack[i]];
 
 	  if ( sum > 0 ) {
 	    sum = sqrt(sum);
 #if defined(_OPENMP)
 #pragma omp parallel for private(i) default(none) \
-  shared(sum,npack,eigenvectors,varID,eofID,pack)
+  shared(sum,npack,eigenvec,pack)
 #endif
 	    for( i = 0; i < npack; i++ )
-	      eigenvectors[varID][eofID].ptr[pack[i]] /= sum;
+	      eigenvec[pack[i]] /= sum;
 	  }
 	  else
 #if defined(_OPENMP)
 #pragma omp parallel for private(i) default(none) \
-  shared(eigenvectors,varID,eofID,pack,missval,npack)
+  shared(eigenvec,pack,missval,npack)
 #endif
 	    for( i = 0; i < npack; i++ )
-	      eigenvectors[varID][eofID].ptr[pack[i]] = missval;
+	      eigenvec[pack[i]] = missval;
 	}     /* for ( eofID = 0; eofID < n_eig; eofID++ )     */
 
       if ( cdoTimer ) timer_stop(timer_post);
@@ -584,4 +584,3 @@ void *EOF3d(void * argument)
  
   return (0);
 }
-
diff --git a/src/Eofcoeff.c b/src/Eofcoeff.c
index 631a435..fb7a7a9 100644
--- a/src/Eofcoeff.c
+++ b/src/Eofcoeff.c
@@ -35,26 +35,24 @@ void *Eofcoeff(void * argument)
 {
   char eof_name[8], oname[1024], filesuffix[32];
   const char *refname;
-  double *w;
+  //double *w;
   double missval1 = -999, missval2;
   double *xvals, *yvals;  
   field_t ***eof;  
   field_t in;  
   field_t out;
-  int operatorID, operfunc;  
+  //int operatorID;  
   int gridsize;
   int i, varID, recID, levelID, tsID, eofID;    
-  int gridID1, gridID2, gridID3;
+  int gridID1, gridID3;
   int nrecs, nvars, nlevs, neof, nchars, nmiss, ngrids; 
-  int reached_eof;
   int streamID1, streamID2, *streamIDs;
-  int taxisID1, taxisID2, taxisID3;
+  int taxisID2, taxisID3;
   int vlistID1, vlistID2, vlistID3;
    
   cdoInitialize(argument);
   cdoOperatorAdd("eofcoeff",  0,       0, NULL);
-  operatorID = cdoOperatorID();
-  operfunc = cdoOperatorF1(operatorID);
+  //operatorID = cdoOperatorID();
      
   streamID1 = streamOpenRead(cdoStreamName(0));
   streamID2 = streamOpenRead(cdoStreamName(1));
@@ -63,16 +61,16 @@ void *Eofcoeff(void * argument)
   vlistID2 = streamInqVlist(streamID2);
   vlistID3 = vlistDuplicate(vlistID2);   
   
-  taxisID1 = vlistInqTaxis(vlistID1);  
+  //taxisID1 = vlistInqTaxis(vlistID1);  
   taxisID2 = vlistInqTaxis(vlistID2); 
   taxisID3 = taxisDuplicate(taxisID2);
   
   gridID1 = vlistInqVarGrid(vlistID1, 0);
-  gridID2 = vlistInqVarGrid(vlistID2, 0);
+  //gridID2 = vlistInqVarGrid(vlistID2, 0);
   
   if ( vlistGridsizeMax(vlistID1)==vlistGridsizeMax(vlistID2) )
     gridsize = vlistGridsizeMax(vlistID1);  
-  else 
+  else
     {
       gridsize = -1;
       cdoAbort ("Gridsize of input files does not match");
@@ -83,10 +81,10 @@ void *Eofcoeff(void * argument)
     cdoAbort("Too many grids in input");
   
   nvars = vlistNvars(vlistID1)==vlistNvars(vlistID2) ? vlistNvars(vlistID1) : -1;
-  nrecs = vlistNrecs(vlistID1); 
+  nrecs = vlistNrecs(vlistID1);
   nlevs = zaxisInqSize(vlistInqVarZaxis(vlistID1, 0));
-  w = malloc(gridsize*sizeof(double));
-  gridWeights(gridID2, &w[0]);
+  //w = (double*) malloc(gridsize*sizeof(double));
+  //gridWeights(gridID2, w);
   
   
   
@@ -102,31 +100,28 @@ void *Eofcoeff(void * argument)
   filesuffix[0] = 0;
   cdoGenFileSuffix(filesuffix, sizeof(filesuffix), streamInqFiletype(streamID1), vlistID1, refname);
   
-  eof = malloc (nvars * sizeof(field_t**) );
+  eof = (field_t***) malloc(nvars * sizeof(field_t**));
   for ( varID=0; varID<nvars; varID++)
-    eof[varID] = malloc(nlevs*sizeof(field_t*));
-  reached_eof=0;
+    eof[varID] = (field_t**) malloc(nlevs*sizeof(field_t*));
+
   eofID = 0;
   while ( 1 )       
    {     
      nrecs = streamInqTimestep(streamID1, eofID);
-     if ( nrecs == 0)
-       {
-         reached_eof = 1;
-         break;
-       }
+     if ( nrecs == 0) break;
+
      for ( recID = 0; recID < nrecs; recID++ )
        {         
          streamInqRecord(streamID1, &varID, &levelID);
          missval1 = vlistInqVarMissval(vlistID1, varID);
          if ( eofID == 0 )
-           eof[varID][levelID] = malloc (1*sizeof(field_t));
+           eof[varID][levelID] = (field_t*) malloc(1*sizeof(field_t));
          else
-           eof[varID][levelID] = realloc (eof[varID][levelID], (eofID+1)*sizeof(field_t));
+           eof[varID][levelID] = (field_t*) realloc(eof[varID][levelID], (eofID+1)*sizeof(field_t));
          eof[varID][levelID][eofID].grid   = gridID1;
          eof[varID][levelID][eofID].nmiss  = 0;
          eof[varID][levelID][eofID].missval= missval1;
-         eof[varID][levelID][eofID].ptr    = malloc(gridsize*sizeof(double));
+         eof[varID][levelID][eofID].ptr    = (double*) malloc(gridsize*sizeof(double));
          memset(&eof[varID][levelID][eofID].ptr[0], missval1, gridsize*sizeof(double));
          if ( varID >= nvars )
            cdoAbort("Internal error - too high varID");
@@ -145,8 +140,8 @@ void *Eofcoeff(void * argument)
   gridID3 = gridCreate(GRID_LONLAT, 1);
   gridDefXsize(gridID3, 1);
   gridDefYsize(gridID3, 1);
-  xvals=malloc(1*sizeof(double));
-  yvals=malloc(1*sizeof(double));
+  xvals= (double*) malloc(1*sizeof(double));
+  yvals= (double*) malloc(1*sizeof(double));
   xvals[0]=0;
   yvals[0]=0;
   gridDefXvals(gridID3, xvals);
@@ -164,7 +159,7 @@ void *Eofcoeff(void * argument)
     vlistDefVarTsteptype(vlistID3, varID, TSTEP_INSTANT);
   
   // open streams for eofcoeff output
-  streamIDs = malloc (neof*sizeof(int)); 
+  streamIDs = (int*) malloc(neof*sizeof(int)); 
   eofID = 0;
   for ( eofID = 0; eofID < neof; eofID++)
     {
@@ -187,23 +182,17 @@ void *Eofcoeff(void * argument)
     }
   
   // ALLOCATE temporary fields for data read and write
-  in.ptr = malloc(gridsize*sizeof(double));
+  in.ptr = (double*) malloc(gridsize*sizeof(double));
   in.grid = gridID1;  
   out.missval = missval1;
   out.nmiss = 0;
-  out.ptr = malloc (1*sizeof(double));
+  out.ptr = (double*) malloc(1*sizeof(double));
  
-  // 
-  reached_eof=0;
   tsID=0;
   while ( 1 )
     {      
       nrecs = streamInqTimestep(streamID2, tsID);
-      if ( nrecs == 0 )
-        {
-          reached_eof=1;
-          break;
-        }
+      if ( nrecs == 0 ) break;
       
       taxisCopyTimestep(taxisID3, taxisID2);
       /*for ( eofID=0; eofID<neof; eofID++)
@@ -230,7 +219,8 @@ void *Eofcoeff(void * argument)
                   if (! DBL_IS_EQUAL(in.ptr[i],missval2) && 
                       ! DBL_IS_EQUAL(eof[varID][levelID][eofID].ptr[i],missval1 ))
                     {
-                      double tmp = w[i]*in.ptr[i]*eof[varID][levelID][eofID].ptr[i];
+		      // double tmp = w[i]*in.ptr[i]*eof[varID][levelID][eofID].ptr[i];
+                      double tmp = in.ptr[i]*eof[varID][levelID][eofID].ptr[i];
                       out.ptr[0] += tmp;                   
                     }
                 }            
diff --git a/src/Eofcoeff3d.c b/src/Eofcoeff3d.c
index 78e2aee..2711e9d 100644
--- a/src/Eofcoeff3d.c
+++ b/src/Eofcoeff3d.c
@@ -35,26 +35,25 @@ void *Eofcoeff3d(void * argument)
 {
   char eof_name[6], oname[1024], filesuffix[32];
   const char *refname;
-  double *w;
+  //double *w;
   double missval1 = -999, missval2 = -999;
   double *xvals, *yvals, *zvals;  
   field_t ***eof;  
   field_t in;  
   field_t **out;
-  int operatorID, operfunc;  
+  //int operatorID, operfunc;  
   int gridsize;
   int i, varID, recID, levelID, tsID, eofID, *varID3;    
-  int gridID1, gridID2, gridID3;
-  int nrecs, nvars, nlevs, neof, nchars, nmiss, ngrids; 
-  int reached_eof;
+  int gridID1,gridID3;
+  int nrecs, nvars, nlevs, neof, nchars, nmiss; 
   int streamID1, streamID2, *streamIDs;
-  int taxisID1, taxisID2, taxisID3;
+  int taxisID2, taxisID3;
   int vlistID1, vlistID2, vlistID3;
   int zaxisID3;
    
   cdoInitialize(argument);
   cdoOperatorAdd("eofcoeff3d",  0,       0, NULL);
-  operatorID = cdoOperatorID();
+  //  operatorID = cdoOperatorID();
   //  operfunc = cdoOperatorFunc(operatorID);
      
   streamID1 = streamOpenRead(cdoStreamName(0));
@@ -63,12 +62,12 @@ void *Eofcoeff3d(void * argument)
   vlistID1 = streamInqVlist(streamID1);
   vlistID2 = streamInqVlist(streamID2);
   
-  taxisID1 = vlistInqTaxis(vlistID1);  
+  //taxisID1 = vlistInqTaxis(vlistID1);  
   taxisID2 = vlistInqTaxis(vlistID2); 
   taxisID3 = taxisDuplicate(taxisID2);
   
   gridID1 = vlistInqVarGrid(vlistID1, 0);
-  gridID2 = vlistInqVarGrid(vlistID2, 0);
+  //gridID2 = vlistInqVarGrid(vlistID2, 0);
   
   if ( vlistGridsizeMax(vlistID1)==vlistGridsizeMax(vlistID2) )
     gridsize = vlistGridsizeMax(vlistID1);  
@@ -85,8 +84,8 @@ void *Eofcoeff3d(void * argument)
   nvars = vlistNvars(vlistID1)==vlistNvars(vlistID2) ? vlistNvars(vlistID1) : -1;
   nrecs = vlistNrecs(vlistID1); 
   nlevs = zaxisInqSize(vlistInqVarZaxis(vlistID1, 0));
-  w = malloc(gridsize*sizeof(double));
-  gridWeights(gridID2, &w[0]);
+  //w = (double*) malloc(gridsize*sizeof(double));
+  //gridWeights(gridID2, w);
   
   
   if (vlistGridsizeMax(vlistID2)   != gridsize ||
@@ -100,31 +99,28 @@ void *Eofcoeff3d(void * argument)
   filesuffix[0] = 0;
   cdoGenFileSuffix(filesuffix, sizeof(filesuffix), streamInqFiletype(streamID1), vlistID1, refname);
  
-  eof = malloc (nvars * sizeof(field_t**) );
+  eof = (field_t***) malloc(nvars * sizeof(field_t**));
   for ( varID=0; varID<nvars; varID++)
-    eof[varID] = malloc(nlevs*sizeof(field_t*));
-  reached_eof=0;
+    eof[varID] = (field_t**) malloc(nlevs*sizeof(field_t*));
+
   eofID = 0;
   while ( 1 )       
    {     
      nrecs = streamInqTimestep(streamID1, eofID);
-     if ( nrecs == 0)
-       {
-         reached_eof = 1;
-         break;
-       }
+     if ( nrecs == 0) break;
+
      for ( recID = 0; recID < nrecs; recID++ )
        {         
          streamInqRecord(streamID1, &varID, &levelID);
          missval1 = vlistInqVarMissval(vlistID1, varID);
          if ( eofID == 0 )
-           eof[varID][levelID] = malloc (1*sizeof(field_t));
+           eof[varID][levelID] = (field_t*) malloc(1*sizeof(field_t));
          else
-           eof[varID][levelID] = realloc (eof[varID][levelID], (eofID+1)*sizeof(field_t));
+           eof[varID][levelID] = (field_t*) realloc(eof[varID][levelID], (eofID+1)*sizeof(field_t));
          eof[varID][levelID][eofID].grid   = gridID1;
          eof[varID][levelID][eofID].nmiss  = 0;
          eof[varID][levelID][eofID].missval= missval1;
-         eof[varID][levelID][eofID].ptr    = malloc(gridsize*sizeof(double));
+         eof[varID][levelID][eofID].ptr    = (double*) malloc(gridsize*sizeof(double));
          memset(&eof[varID][levelID][eofID].ptr[0], missval1, gridsize*sizeof(double));
 
          if ( varID >= nvars )
@@ -144,14 +140,14 @@ void *Eofcoeff3d(void * argument)
   gridID3 = gridCreate(GRID_LONLAT, 1);
   gridDefXsize(gridID3, 1);
   gridDefYsize(gridID3, 1);
-  xvals=malloc(1*sizeof(double));
-  yvals=malloc(1*sizeof(double));
+  xvals= (double*) malloc(1*sizeof(double));
+  yvals= (double*) malloc(1*sizeof(double));
   xvals[0]=0;
   yvals[0]=0;
   gridDefXvals(gridID3, xvals);
   gridDefYvals(gridID3, yvals);
   
-  zvals = malloc ( 1* sizeof(double ) );
+  zvals = (double *) malloc( 1* sizeof(double ));
   zvals[0] = 0.;
   zaxisID3 = zaxisCreate(ZAXIS_GENERIC,1);
   zaxisDefLevels(zaxisID3,zvals);
@@ -160,12 +156,12 @@ void *Eofcoeff3d(void * argument)
   
   vlistID3 = vlistCreate();
   vlistDefTaxis(vlistID3,taxisID3);
-  varID3 = malloc ( nvars * sizeof(int) );
+  varID3 = (int*) malloc( nvars * sizeof(int));
   for ( varID=0; varID<nvars; varID++ )
     varID3[varID] = vlistDefVar(vlistID3, gridID3, zaxisID3, TSTEP_INSTANT);
   
   // open streams for eofcoeff output
-  streamIDs = malloc (neof*sizeof(int)); 
+  streamIDs = (int*) malloc(neof*sizeof(int)); 
   eofID = 0;
   for ( eofID = 0; eofID < neof; eofID++)
     {
@@ -187,28 +183,23 @@ void *Eofcoeff3d(void * argument)
     }
   
   // ALLOCATE temporary fields for data read and write
-  in.ptr = malloc(gridsize*sizeof(double));
+  in.ptr = (double*) malloc(gridsize*sizeof(double));
   in.grid = gridID1;  
-  out = malloc (nvars*sizeof(field_t*));
+  out = (field_t**) malloc(nvars*sizeof(field_t*));
   for ( varID = 0; varID < nvars; varID++ ) {
-    out[varID] = malloc ( neof * sizeof(field_t) );
+    out[varID] = (field_t*) malloc( neof * sizeof(field_t));
     for ( eofID=0; eofID<neof; eofID++ ) {
       out[varID][eofID].missval = missval1;
       out[varID][eofID].nmiss = 0;
-      out[varID][eofID].ptr = malloc (1*sizeof(double));
+      out[varID][eofID].ptr = (double*) malloc(1*sizeof(double));
     }
   }
 
-  reached_eof=0;
   tsID=0;
   while ( 1 )
     {      
       nrecs = streamInqTimestep(streamID2, tsID);
-      if ( nrecs == 0 )
-        {
-          reached_eof=1;
-          break;
-        }
+      if ( nrecs == 0 ) break;
 
       for ( varID = 0; varID < nvars; varID++ )
 	for ( eofID = 0; eofID < neof; eofID++ ) {
@@ -236,7 +227,8 @@ void *Eofcoeff3d(void * argument)
                   if (! DBL_IS_EQUAL(in.ptr[i],missval2) && 
                       ! DBL_IS_EQUAL(eof[varID][levelID][eofID].ptr[i],missval1 ) )
                     {
-                      double tmp = w[i]*in.ptr[i]*eof[varID][levelID][eofID].ptr[i];
+                      // double tmp = w[i]*in.ptr[i]*eof[varID][levelID][eofID].ptr[i];
+                      double tmp = in.ptr[i]*eof[varID][levelID][eofID].ptr[i];
                       out[varID][eofID].ptr[0] += tmp;                   
                     }
 		  else
diff --git a/src/Exprf.c b/src/Exprf.c
index 338a601..2cb1d71 100644
--- a/src/Exprf.c
+++ b/src/Exprf.c
@@ -56,7 +56,7 @@ void *Expr(void *argument)
   int gridsize, nlevel;
   int nmiss;
   int taxisID1, taxisID2;
-  int lwarn = TRUE;
+  //int lwarn = TRUE;
   double missval;
   double *array = NULL;
   double *single1, *single2;
@@ -74,6 +74,8 @@ void *Expr(void *argument)
   AEXPR  = cdoOperatorAdd("aexpr",  0, 0, "expressions");
   AEXPRF = cdoOperatorAdd("aexprf", 0, 0, "expr script filename");
 
+  UNUSED(AEXPRF);
+
   operatorID = cdoOperatorID();
 
   operatorInputArg(cdoOperatorEnter(operatorID));
@@ -83,7 +85,7 @@ void *Expr(void *argument)
       size_t slen;
 
       slen = strlen(operatorArgv()[0]);
-      exprs = malloc(slen+2);
+      exprs = (char*) malloc(slen+2);
       strcpy(exprs, operatorArgv()[0]);
       if ( exprs[slen-1] != ';' )
 	{
@@ -106,7 +108,7 @@ void *Expr(void *argument)
       if ( stat(exprf, &filestat) != 0 ) cdoAbort("Stat failed on %s", exprf);
 
       fsize = (size_t) filestat.st_size;
-      exprs = malloc(fsize+1);
+      exprs = (char*) malloc(fsize+1);
 
       while ( (ichar = fgetc(fp)) != EOF ) exprs[ipos++] = ichar;
 
@@ -166,8 +168,8 @@ void *Expr(void *argument)
 
   streamDefVlist(streamID2, vlistID2);
 
-  parse_arg.vardata1 = malloc(nvars*sizeof(double*));
-  parse_arg.vardata2 = malloc(nvars2*sizeof(double*));
+  parse_arg.vardata1 = (double**) malloc(nvars*sizeof(double*));
+  parse_arg.vardata2 = (double**) malloc(nvars2*sizeof(double*));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
@@ -178,7 +180,7 @@ void *Expr(void *argument)
       gridsize = gridInqSize(gridID);
       nlevel   = zaxisInqSize(zaxisID);
       if ( parse_arg.var_needed[varID] )
-	parse_arg.vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
+	parse_arg.vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
       else
 	parse_arg.vardata1[varID] = NULL;
     }
@@ -190,11 +192,11 @@ void *Expr(void *argument)
 
       gridsize = gridInqSize(gridID);
       nlevel   = zaxisInqSize(zaxisID);
-      parse_arg.vardata2[varID] = malloc(gridsize*nlevel*sizeof(double));
+      parse_arg.vardata2[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/FC.c b/src/FC.c
index dee9661..bde23dd 100644
--- a/src/FC.c
+++ b/src/FC.c
@@ -230,7 +230,7 @@ void *FC(void *argument)
   // printf("nfc %d, ntr %d, nlat %d, nlon %d\n", nfc, ntr, nlat, nlon);
 
   nvars = vlistNvars(vlistID2);
-  vars  = malloc(nvars*sizeof(int));
+  vars  = (int*) malloc(nvars*sizeof(int));
   for ( varID = 0; varID < nvars; varID++ )
     {
       if ( gridID1 == vlistInqVarGrid(vlistID1, varID) )
@@ -246,12 +246,12 @@ void *FC(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
 
   if ( gridID2 != -1 )
     {
       gridsize = gridInqSize(gridID2);
-      array2 = malloc(gridsize*sizeof(double));
+      array2 = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Filedes.c b/src/Filedes.c
index 37119b5..4cc74b0 100644
--- a/src/Filedes.c
+++ b/src/Filedes.c
@@ -84,7 +84,9 @@ static
 void partab(FILE *fp, int vlistID, int option)
 {
   int varID, code, tabnum, tableID, datatype = -1;
+  int param;
   char pstr[32];
+  char paramstr[32];
   char varname[CDI_MAX_NAME], varlongname[CDI_MAX_NAME], varstdname[CDI_MAX_NAME], varunits[CDI_MAX_NAME];
   int natts;
   int nvars;
@@ -134,9 +136,10 @@ void partab(FILE *fp, int vlistID, int option)
       varname[0]     = 0;
       varlongname[0] = 0;
       varunits[0]    = 0;
-      code     = vlistInqVarCode(vlistID, varID);
-      tableID  = vlistInqVarTable(vlistID, varID);
-      tabnum   = tableInqNum(tableID);
+      param    = vlistInqVarParam(vlistID, varID);
+      // code     = vlistInqVarCode(vlistID, varID);
+      // tableID  = vlistInqVarTable(vlistID, varID);
+      // tabnum   = tableInqNum(tableID);
       missval  = vlistInqVarMissval(vlistID, varID);
       vlistInqVarName(vlistID, varID, varname);
       /* printf("1>%s<\n", varname); */
@@ -147,8 +150,13 @@ void partab(FILE *fp, int vlistID, int option)
       vlistInqVarUnits(vlistID, varID, varunits);
             
       fprintf(fp, "  name=%s\n", varname);
-      if ( code   > 0 ) fprintf(fp, "  code=%d\n", code);
-      if ( tabnum > 0 ) fprintf(fp, "  table=%d\n", tabnum);
+      // if ( code   > 0 ) fprintf(fp, "  code=%d\n", code);
+      // if ( tabnum > 0 ) fprintf(fp, "  table=%d\n", tabnum);
+      if ( param >= 0 )
+	{
+	  cdiParamToString(param, paramstr, sizeof(paramstr));
+	  fprintf(fp, "  param=%s\n", paramstr);
+	}
       if ( strlen(varstdname) )
 	fprintf(fp, "  standard_name=%s\n", varstdname);
       if ( strlen(varlongname) )
diff --git a/src/Fillmiss.c b/src/Fillmiss.c
index d650cd6..48e1685 100644
--- a/src/Fillmiss.c
+++ b/src/Fillmiss.c
@@ -56,8 +56,8 @@ void fillmiss(field_t *field1, field_t *field2, int nfill)
   if ( !(gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN ) )
     cdoAbort("Unsupported grid type: %s!", gridNamePtr(gridtype));
 
-  matrix1 = malloc(ny * sizeof(double *));
-  matrix2 = malloc(ny * sizeof(double *));
+  matrix1 = (double **) malloc(ny * sizeof(double *));
+  matrix2 = (double **) malloc(ny * sizeof(double *));
 
   for ( j = 0; j < ny; j++ )
     {
@@ -165,8 +165,8 @@ void fillmiss_one_step(field_t *field1, field_t *field2, int maxfill)
   nx  = gridInqXsize(gridID);
   ny  = gridInqYsize(gridID);
 
-  matrix1 = malloc(ny * sizeof(double *));
-  matrix2 = malloc(ny * sizeof(double *));
+  matrix1 = (double **) malloc(ny * sizeof(double *));
+  matrix2 = (double **) malloc(ny * sizeof(double *));
 
   for ( j = 0; j < ny; j++ ) { matrix1[j] = array1 + j*nx; matrix2[j] = array2 + j*nx; }
 
@@ -342,8 +342,8 @@ void *Fillmiss(void *argument)
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr   = malloc(gridsize*sizeof(double));
-  field2.ptr   = malloc(gridsize*sizeof(double));
+  field1.ptr   = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr   = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Filter.c b/src/Filter.c
index 9415a30..96b8f54 100644
--- a/src/Filter.c
+++ b/src/Filter.c
@@ -27,92 +27,18 @@
 #  include "config.h"
 #endif
 
-#if defined( HAVE_LIBFFTW3 ) 
-#include <fftw3.h>
-#endif
-
 #include <cdi.h>
 #include "cdo.h"
 #include "cdo_int.h"
+#include "statistic.h"
 #include "pstream.h"
 
-#include "stdlib.h"
-
+#if defined(HAVE_LIBFFTW3) 
+#include <fftw3.h>
+#endif
 
-#define  NALLOC_INC  1000
-#define  PI2         6.2832
-#define  HALF        0.5
 
-/* FAST FOURIER TRANSFORMATION (bare) */
-static
-void fft2(double *real, double *imag, int n, int isign)
-{
-  int nn, mmax, m, j, istep, i;
-  double wtemp, wr, wpr, wpi, wi, theta, tempr, tempi, tmp;   
-  
-  if ( n < 2 || (n&(n-1)) ) printf("n must be power of 2\n");
-  nn = n << 1;
-  j = 1;
-  
-  /* BIT Reversion of data */
-  for ( i=1; i<nn; i+=2 )
-    {
-      if ( j > i ) 
-        {        
-          /* swap real part */
-          tmp = real[j/2]; 
-          real[j/2] = real[i/2];          
-          real[i/2] = tmp;                    
-          
-          /* swap imaginary part */
-          tmp = imag[j/2]; 
-          imag[j/2] = imag[i/2];
-          imag[i/2] = tmp;         
-        }
-      m = n;
-      while ( m >= 2 && j > m )
-        {
-          j -= m;
-          m >>= 1;
-        }
-      j += m;
-    }
-  
-  /* Danielson-Lanzcos algorithm */
-  mmax = 2;
-  while ( nn > mmax )
-    {
-      istep = mmax << 1;
-      theta = isign*(PI2/mmax);
-      wtemp = sin(HALF*theta);
-      wpr = -2.0*wtemp*wtemp;
-      wpi = sin(theta);
-      wr = 1.0;
-      wi = 0.0;
-      for( m = 1; m<mmax; m+=2 )
-        {
-          for ( i = m; i <= nn; i+=istep)
-            {              
-              j=i+mmax;         
-              tempr = wr*real[j/2]-wi*imag[j/2];
-              tempi = wr*imag[j/2]+wi*real[j/2];
-              real[j/2] = real[i/2]-tempr;
-              imag[j/2] = imag[i/2]-tempi;
-              real[i/2] += tempr;
-              imag[i/2] += tempi;       
-            }
-          wr = (wtemp=wr)*wpr-wi*wpi+wr;
-          wi = wi*wpr+wtemp*wpi+wi;
-        }
-      mmax = istep;      
-    }   
-  if ( isign == -1 )
-    for( i =0; i<n; i++)
-      {
-        real[i]/=n;
-        imag[i]/=n;
-      }
-}
+#define  NALLOC_INC  1024
 
 
 /* include from Tinfo.c */
@@ -126,59 +52,78 @@ void create_fmasc(int nts, double fdata, double fmin, double fmax, int *fmasc)
   
   dimin = nts*fmin / fdata;
   dimax = nts*fmax / fdata;
- 
+
   imin = dimin<0 ? 0 : (int)floor(dimin);  
   imax = ceil(dimax)>nts/2 ? nts/2 : (int) ceil(dimax);  
+
+  //  printf("%d %d %g %g %g %g %g\n", imin, imax, dimin, dimax, fdata, fmin, fmax);
   
   fmasc[imin] = 1;
   for ( i = imin+1; i <= imax; i++ )  
     fmasc[i] = fmasc[nts-i] = 1; 
-  
 }
 
-
-#if defined( HAVE_LIBFFTW3 ) 
+#if defined(HAVE_LIBFFTW3) 
 static
-void filter_fftw(int nts, const int *fmasc, 
-                 fftw_complex *fft_in, fftw_complex *fft_out, fftw_plan *p_T2S, fftw_plan *p_S2T)
+void filter_fftw(int nts, const int *fmasc, fftw_complex *fft_out, fftw_plan *p_T2S, fftw_plan *p_S2T)
 {  
-  //  fprintf(stderr,"using fftw filter\n");
-
   int i;
 
   fftw_execute(*p_T2S);
 
   for ( i = 0; i < nts; i++ )
-    if ( ! fmasc[i] )   {
-      fft_out[i][0] = 0;
-      fft_out[i][1] = 0;
-    }
+    if ( ! fmasc[i] )
+      {
+	fft_out[i][0] = 0;
+	fft_out[i][1] = 0;
+      }
   
   fftw_execute(*p_S2T);
   
   return;
 }
-
-#else 
+#endif
 
 static
 void filter_intrinsic(int nts, const int *fmasc, double *array1, double *array2)
 {  
   int i;
-  
-  fft2(array1, array2, nts, 1);
+  int lpower2 = FALSE;
+  double *work_r = NULL;
+  double *work_i = NULL;
+
+  if ( (nts&(nts-1)) == 0 ) lpower2 = TRUE;
+
+  if ( !lpower2 )
+    {
+      work_r = (double*) malloc(nts*sizeof(double));
+      work_i = (double*) malloc(nts*sizeof(double));
+    }
+
+  if ( lpower2 )
+    fft(array1, array2, nts, 1);
+  else
+    ft_r(array1, array2, nts, 1, work_r, work_i);
+
   for ( i = 0; i < nts; i++ )
-    if ( ! fmasc[i] )  array1[i] = array2[i] = 0;
-  fft2(array1, array2, nts, -1);
+    if ( ! fmasc[i] )
+      array1[i] = array2[i] = 0;
+
+  if ( lpower2 )
+    fft(array1, array2, nts, -1);
+  else
+    ft_r(array1, array2, nts, -1, work_r, work_i);
+
+  if ( work_r ) free(work_r);
+  if ( work_i ) free(work_i);
   
   return;
 }
 
-#endif
 
 void *Filter(void *argument)
 {
-  enum {BAND, HIGH, LOW};
+  enum {BANDPASS, HIGHPASS, LOWPASS};
   char *tunits[] = {"second", "minute", "hour", "day", "month", "year"};
   int iunits[] = {31536000, 525600, 8760, 365, 12, 1};
   int operatorID;
@@ -188,35 +133,47 @@ void *Filter(void *argument)
   int gridID, varID, levelID, recID;
   int tsID;
   int i;
-  int nts,nts2;
+  int nts;
   int nalloc = 0;
   int streamID1, streamID2;
   int vlistID1, vlistID2, taxisID1, taxisID2;
   int nmiss;
   int nvars, nlevel;
   dtinfo_t *dtinfo = NULL;
-  int tunit;
-  int incperiod0, incunit0, incunit, dpy, calendar;
+  int incperiod0, incunit0, incunit, calendar;
   int year0, month0, day0;
   double *array1 = NULL, *array2 = NULL;
   double fdata = 0;
   field_t ***vars = NULL;
   double fmin = 0, fmax = 0;
   int *fmasc;
-#if defined( HAVE_LIBFFTW3 ) 
+  int use_fftw = FALSE;
+#if defined(HAVE_LIBFFTW3) 
   fftw_plan p_T2S, p_S2T;
-  fftw_complex *out_fft;
-  fftw_complex *in_fft;
+  fftw_complex *out_fft = NULL;
+  fftw_complex *in_fft = NULL;
 #endif
   
   cdoInitialize(argument);
 
-  cdoOperatorAdd("bandpass",  BAND,  0, NULL);
-  cdoOperatorAdd("highpass",  HIGH,  0, NULL);
-  cdoOperatorAdd("lowpass" ,  LOW,   0, NULL);
+  cdoOperatorAdd("bandpass",  BANDPASS,  0, NULL);
+  cdoOperatorAdd("highpass",  HIGHPASS,  0, NULL);
+  cdoOperatorAdd("lowpass" ,  LOWPASS,   0, NULL);
 
   operatorID = cdoOperatorID();
   operfunc   = cdoOperatorF1(operatorID);
+
+  if ( CDO_Use_FFTW )
+    {
+#if defined(HAVE_LIBFFTW3) 
+      if ( cdoVerbose ) cdoPrint("Using fftw3 lib");
+      use_fftw = TRUE;
+#else
+      if ( cdoVerbose ) cdoPrint("LIBFFTW3 support not compiled in!");
+#endif
+    }
+      
+  if ( cdoVerbose && use_fftw  == FALSE ) cdoPrint("Using intrinsic FFT function!");
   
   streamID1 = streamOpenRead(cdoStreamName(0));
 
@@ -227,14 +184,8 @@ void *Filter(void *argument)
   taxisID2 = taxisDuplicate(taxisID1);
   vlistDefTaxis(vlistID2, taxisID2);
 
-  tunit = taxisInqTunit(taxisID1); 
   calendar = taxisInqCalendar(taxisID1);  
-  dpy = calendar_dpy(calendar); /* should be 365 !!! */
-  
-  streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
-  
-  streamDefVlist(streamID2, vlistID2);
-  
+ 
   nvars = vlistNvars(vlistID1);
   
   tsID = 0;    
@@ -243,8 +194,8 @@ void *Filter(void *argument)
       if ( tsID >= nalloc )
         {
           nalloc += NALLOC_INC;
-	  dtinfo = realloc(dtinfo, nalloc*sizeof(dtinfo_t));
-          vars   = realloc(vars,   nalloc*sizeof(field_t **));
+	  dtinfo = (dtinfo_t*) realloc(dtinfo, nalloc*sizeof(dtinfo_t));
+          vars   = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
         }
                        
       taxisInqDTinfo(taxisID1, &dtinfo[tsID]);
@@ -256,14 +207,14 @@ void *Filter(void *argument)
           streamInqRecord(streamID1, &varID, &levelID);
           gridID   = vlistInqVarGrid(vlistID1, varID);
           gridsize = gridInqSize(gridID);
-          vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+          vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
           streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
           vars[tsID][varID][levelID].nmiss = nmiss;
-          if ( nmiss ) cdoAbort("Missing value support for operators in module Filter not added yet");
+          if ( nmiss ) cdoAbort("Missing value support for operators in module Filter not added yet!");
         }
 
       /* get and check time increment */                   
-      if ( tsID > 0)
+      if ( tsID > 0 )
         {    
 	  juldate_t juldate0, juldate;
 	  double jdelta;
@@ -283,14 +234,13 @@ void *Filter(void *argument)
               printf("    %4.4i-%2.2i-%2.2i\n",     year0,month0,day0);*/
               getTimeInc(jdelta, dtinfo[tsID-1].v.date, dtinfo[tsID].v.date, &incperiod0, &incunit0);
               incperiod = incperiod0; 
-              if ( incperiod == 0 ) cdoAbort("Time step must be different from zero\n");
+              if ( incperiod == 0 ) cdoAbort("Time step must be different from zero!");
               incunit = incunit0;
-              if ( cdoVerbose ) fprintf(stdout, "time step %i %s\n", incperiod, tunits[incunit]);
+              if ( cdoVerbose ) cdoPrint("Time step %i %s", incperiod, tunits[incunit]);
               fdata = 1.*iunits[incunit]/incperiod;
             }
           else 
-            getTimeInc(jdelta, dtinfo[tsID-1].v.date, dtinfo[tsID].v.date, &incperiod, &incunit);  
-        
+            getTimeInc(jdelta, dtinfo[tsID-1].v.date, dtinfo[tsID].v.date, &incperiod, &incunit);        
 
 	  if ( incunit0 < 4 && month == 2 && day == 29 && 
 	       ( day0 != day || month0 != month || year0 != year ) )
@@ -300,124 +250,116 @@ void *Filter(void *argument)
 	    }
 
           if ( ! ( incperiod == incperiod0 && incunit == incunit0 ) )
-            cdoWarning("Time increment in step %i (%d%s) differs from step 0 (%d%s)",
+            cdoWarning("Time increment in step %i (%d%s) differs from step 1 (%d%s)!",
 		       tsID, incperiod, tunits[incunit], incperiod0, tunits[incunit0]);        
         }
       tsID++;
     }
   
   nts = tsID;
-  /*  round up nts to next power of two for (better) performance 
-   ** of fast fourier transformation */
-#if defined( HAVE_LIBFFTW3 ) 
-  nts2 = nts;
-
-  out_fft = malloc ( nts * sizeof(fftw_complex) );
-  in_fft  = malloc ( nts * sizeof(fftw_complex) );
-
-  p_T2S = fftw_plan_dft_1d(nts,in_fft,out_fft,  1, FFTW_ESTIMATE);
-  p_S2T = fftw_plan_dft_1d(nts,out_fft,in_fft, -1, FFTW_ESTIMATE);
-#else 
-  nts2 = nts-1;
-  nts2 |= nts2 >> 1;  /* handle  2 bit numbers */
-  nts2 |= nts2 >> 2;  /* handle  4 bit numbers */
-  nts2 |= nts2 >> 4;  /* handle  8 bit numbers */
-  nts2 |= nts2 >> 8;  /* handle 16 bit numbers */
-  nts2 |= nts2 >> 16; /* handle 32 bit numbers */
-  nts2++;
-
-  array1 = malloc(nts2*sizeof(double));
-  array2 = malloc(nts2*sizeof(double));
-#endif
+  if ( nts <= 1 ) cdoAbort("Number of time steps <= 1!");
 
-  fmasc  = calloc(nts2, sizeof(int));
-   
-  for ( tsID = 0; tsID < nts; tsID++ ) array2[tsID] = 0;
+  fmasc  = (int*) calloc(nts, sizeof(int));
 
   switch(operfunc)
-  {
-    case BAND: 
     {
-      operatorInputArg("Lower bound of frequency band:");
-      fmin = atof(operatorArgv()[0]);
-      
-      operatorInputArg("Upper bound of frequency band:");
-      fmax = atof(operatorArgv()[1]);
-      break;
+    case BANDPASS: 
+      {
+	operatorInputArg("lower and upper bound of frequency band");
+	operatorCheckArgc(2);
+	fmin = atof(operatorArgv()[0]);
+	fmax = atof(operatorArgv()[1]);
+	break;
+      }
+    case HIGHPASS:
+      {              
+	operatorInputArg("lower bound of frequency pass");
+	operatorCheckArgc(1);
+	fmin = atof(operatorArgv()[0]);
+	fmax = fdata;
+	break;
+      }
+    case LOWPASS: 
+      {
+	operatorInputArg("upper bound of frequency pass");
+	operatorCheckArgc(1);
+	fmin = 0;
+	fmax = atof(operatorArgv()[0]);
+	break;
+      }
     }
-    case HIGH: 
-    {              
-      operatorInputArg("Lower bound of frequency pass:");
-      fmin = atof(operatorArgv()[0]);
-      fmax = fdata;
-      break;
+  
+  create_fmasc(nts, fdata, fmin, fmax, fmasc);
+
+  if ( use_fftw )
+    {
+#if defined(HAVE_LIBFFTW3) 
+      in_fft  = (fftw_complex*) malloc(nts*sizeof(fftw_complex));
+      out_fft = (fftw_complex*) malloc(nts*sizeof(fftw_complex));
+
+      p_T2S = fftw_plan_dft_1d(nts, in_fft, out_fft,  1, FFTW_ESTIMATE);
+      p_S2T = fftw_plan_dft_1d(nts, out_fft, in_fft, -1, FFTW_ESTIMATE);
+#endif
     }
-    case LOW:  
+  else
     {
-      fmin = 0;
-      operatorInputArg("Upper bound of frequency pass:");
-      fmax = atof(operatorArgv()[0]);
-      break;
-    }      
-  }
-  
-  create_fmasc(nts, fdata, fmin, fmax, fmasc); 
+      array1 = (double*) malloc(nts*sizeof(double));
+      array2 = (double*) malloc(nts*sizeof(double));
+    }
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridID   = vlistInqVarGrid(vlistID1, varID);
       gridsize = gridInqSize(gridID);
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-
-#if defined( HAVE_LIBFFTW3 ) 
-      fprintf(stderr," using fftw lib\n");
-#endif
       
       for ( levelID = 0; levelID < nlevel; levelID++ )
-        { 
-#if defined( HAVE_LIBFFTW3 ) 
-          for ( i = 0; i < gridsize-1; i++ )
-            {
-              for ( tsID = 0; tsID < nts; tsID++ )                              
-                {
-		  in_fft[tsID][0] = vars[tsID][varID][levelID].ptr[i];
-		  // in_fft[tsID][1] = vars[tsID][varID][levelID].ptr[i+1];
-		  in_fft[tsID][1] = 0;
-		}
-
-	      filter_fftw(nts,fmasc,in_fft,out_fft,&p_T2S,&p_S2T);
-
-              for ( tsID = 0; tsID < nts; tsID++ )
+        {
+	  if ( use_fftw )
+	    {
+#if defined(HAVE_LIBFFTW3) 
+	      for ( i = 0; i < gridsize; i++ )
 		{
-		  vars[tsID][varID][levelID].ptr[i]   = in_fft[tsID][0] / nts;  
-		  //		  vars[tsID][varID][levelID].ptr[i+1] = in_fft[tsID][1] / nts;  
+		  for ( tsID = 0; tsID < nts; tsID++ )                              
+		    {
+		      in_fft[tsID][0] = vars[tsID][varID][levelID].ptr[i];
+		      in_fft[tsID][1] = 0;
+		    }
+
+		  filter_fftw(nts, fmasc, out_fft, &p_T2S, &p_S2T);
+		  
+		  for ( tsID = 0; tsID < nts; tsID++ )
+		    {
+		      vars[tsID][varID][levelID].ptr[i] = in_fft[tsID][0] / nts;  
+		    }
 		}
+#endif
 	    }
-#else 
-	  for ( i = 0; i < gridsize; i++ )  
+	  else
 	    {
-	      // for some reason, the optimization using the complex transform independent of the 
-	      // real one in order to transform two time series at the same time does not work
-	      // properly here. 
-
-	      memset( array2,0,nts2*sizeof(double) );
-	      for ( tsID = 0; tsID < nts; tsID++ )
-		array1[tsID] = vars[tsID][varID][levelID].ptr[i];                                         
-	      /* zero padding up to next power of to */
-              for ( ; tsID < nts2; tsID++ )                
-		array1[tsID] = 0;       
-
-	      filter_intrinsic(nts2,fmasc,array1,array2);
-              for ( tsID = 0; tsID < nts; tsID++ )
-		vars[tsID][varID][levelID].ptr[i]   = array1[tsID];  
+	      for ( i = 0; i < gridsize; i++ )  
+		{
+		  for ( tsID = 0; tsID < nts; tsID++ )
+		    array1[tsID] = vars[tsID][varID][levelID].ptr[i];
+
+		  memset(array2, 0, nts*sizeof(double));
+
+		  filter_intrinsic(nts, fmasc, array1, array2);
+
+		  for ( tsID = 0; tsID < nts; tsID++ )
+		    vars[tsID][varID][levelID].ptr[i] = array1[tsID];  
+		}
 	    }
-#endif
 	}
     }
   
   if ( array1 ) free(array1);
   if ( array2 ) free(array2);
 
+  streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
+  
+  streamDefVlist(streamID2, vlistID2);
+ 
   for ( tsID = 0; tsID < nts; tsID++ )
     {
       taxisDefDTinfo(taxisID2, dtinfo[tsID]);
@@ -431,9 +373,9 @@ void *Filter(void *argument)
               if ( vars[tsID][varID][levelID].ptr )
                 {
                   nmiss = vars[tsID][varID][levelID].nmiss;
-		  //fprintf(stderr, "%d %d %d %g\n", tsID, varID, levelID, vars[tsID][varID][levelID].ptr[0]);
 		  streamDefRecord(streamID2, varID, levelID);
                   streamWriteRecord(streamID2, vars[tsID][varID][levelID].ptr, nmiss);
+
                   free(vars[tsID][varID][levelID].ptr);
 		  vars[tsID][varID][levelID].ptr = NULL;
                 }
@@ -443,12 +385,17 @@ void *Filter(void *argument)
       field_free(vars[tsID], vlistID1);
     }
 
-  if ( vars   ) free(vars);
-  if ( dtinfo ) free(dtinfo);
-  
   streamClose(streamID2);
   streamClose(streamID1);
-  
+
+  if ( vars   ) free(vars);
+  if ( dtinfo ) free(dtinfo);
+
+#if defined(HAVE_LIBFFTW3)
+  if ( in_fft  ) free(in_fft);
+  if ( out_fft ) free(out_fft);
+#endif
+
   cdoFinish();
   
   return (0);
diff --git a/src/Fldrms.c b/src/Fldrms.c
index 2520818..092dfc0 100644
--- a/src/Fldrms.c
+++ b/src/Fldrms.c
@@ -101,12 +101,12 @@ void *Fldrms(void *argument)
   field_init(&field3);
 
   lim = vlistGridsizeMax(vlistID1);
-  field1.ptr    = malloc(lim*sizeof(double));
+  field1.ptr    = (double*) malloc(lim*sizeof(double));
   field1.weight = NULL;
   if ( needWeights )
-    field1.weight = malloc(lim*sizeof(double));
+    field1.weight = (double*) malloc(lim*sizeof(double));
 
-  field2.ptr    = malloc(lim*sizeof(double));
+  field2.ptr    = (double*) malloc(lim*sizeof(double));
   field2.weight = NULL;
 
   field3.ptr  = &sglval;
diff --git a/src/Fldstat.c b/src/Fldstat.c
index ea60ddd..5b8a77d 100644
--- a/src/Fldstat.c
+++ b/src/Fldstat.c
@@ -165,10 +165,10 @@ void *Fldstat(void *argument)
   field_init(&field);
 
   lim = vlistGridsizeMax(vlistID1);
-  field.ptr    = malloc(lim*sizeof(double));
+  field.ptr    = (double*) malloc(lim*sizeof(double));
   field.weight = NULL;
   if ( needWeights )
-    field.weight = malloc(lim*sizeof(double));
+    field.weight = (double*) malloc(lim*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Fldstat2.c b/src/Fldstat2.c
index ec4b478..7861716 100644
--- a/src/Fldstat2.c
+++ b/src/Fldstat2.c
@@ -156,11 +156,11 @@ void *Fldstat2(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
   weight = NULL;
   if ( needWeights )
-    weight = malloc(gridsize*sizeof(double));
+    weight = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Fourier.c b/src/Fourier.c
index 5437fd4..e8b814a 100644
--- a/src/Fourier.c
+++ b/src/Fourier.c
@@ -54,7 +54,7 @@ void *Fourier(void *argument)
     double *work_r;
     double *work_i;
   } memory_t;
-  memory_t *mem = NULL;
+  memory_t *ompmem = NULL;
 
 
   cdoInitialize(argument);
@@ -83,9 +83,9 @@ void *Fourier(void *argument)
       if ( tsID >= nalloc )
 	{
 	  nalloc += NALLOC_INC;
-	  vdate = realloc(vdate, nalloc*sizeof(int));
-	  vtime = realloc(vtime, nalloc*sizeof(int));
-	  vars  = realloc(vars, nalloc*sizeof(field_t **));
+	  vdate = (int*) realloc(vdate, nalloc*sizeof(int));
+	  vtime = (int*) realloc(vtime, nalloc*sizeof(int));
+	  vars  = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	}
 
       vdate[tsID] = taxisInqVdate(taxisID1);
@@ -98,7 +98,7 @@ void *Fourier(void *argument)
 	  streamInqRecord(streamID1, &varID, &levelID);
 	  gridID   = vlistInqVarGrid(vlistID1, varID);
 	  gridsize = gridInqSize(gridID);
-	  vars[tsID][varID][levelID].ptr = malloc(2*gridsize*sizeof(double));
+	  vars[tsID][varID][levelID].ptr = (double*) malloc(2*gridsize*sizeof(double));
 	  streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
 	  vars[tsID][varID][levelID].nmiss = nmiss;
 	}
@@ -110,15 +110,15 @@ void *Fourier(void *argument)
 
   for ( bit = nts; !(bit & 1); bit >>= 1 );
 
-  mem = malloc(ompNumThreads*sizeof(memory_t));
+  ompmem = (memory_t*) malloc(ompNumThreads*sizeof(memory_t));
   for ( i = 0; i < ompNumThreads; i++ )
     {
-      mem[i].real = malloc(nts*sizeof(double));
-      mem[i].imag = malloc(nts*sizeof(double));
+      ompmem[i].real = (double*) malloc(nts*sizeof(double));
+      ompmem[i].imag = (double*) malloc(nts*sizeof(double));
       if ( bit != 1 )
 	{
-	  mem[i].work_r = malloc(nts*sizeof(double));
-	  mem[i].work_i = malloc(nts*sizeof(double));
+	  ompmem[i].work_r = (double*) malloc(nts*sizeof(double));
+	  ompmem[i].work_i = (double*) malloc(nts*sizeof(double));
 	}
     }
 
@@ -143,23 +143,23 @@ void *Fourier(void *argument)
 #endif
 	      for ( tsID = 0; tsID < nts; tsID++ )
 		{
-		  mem[ompthID].real[tsID] = vars[tsID][varID][levelID].ptr[2*i];
-		  mem[ompthID].imag[tsID] = vars[tsID][varID][levelID].ptr[2*i+1];
-		  if ( DBL_IS_EQUAL(mem[ompthID].real[tsID], missval) ||
-		       DBL_IS_EQUAL(mem[ompthID].imag[tsID], missval) ) lmiss = 1;
+		  ompmem[ompthID].real[tsID] = vars[tsID][varID][levelID].ptr[2*i];
+		  ompmem[ompthID].imag[tsID] = vars[tsID][varID][levelID].ptr[2*i+1];
+		  if ( DBL_IS_EQUAL(ompmem[ompthID].real[tsID], missval) ||
+		       DBL_IS_EQUAL(ompmem[ompthID].imag[tsID], missval) ) lmiss = 1;
 		}
 
 	      if ( lmiss == 0 )
 		{
 		  if ( bit == 1 )	/* nts is a power of 2 */
-		    fft(mem[ompthID].real, mem[ompthID].imag, nts, sign);
+		    fft(ompmem[ompthID].real, ompmem[ompthID].imag, nts, sign);
 		  else
-		    ft_r(mem[ompthID].real, mem[ompthID].imag, nts, sign, mem[ompthID].work_r, mem[ompthID].work_i);
+		    ft_r(ompmem[ompthID].real, ompmem[ompthID].imag, nts, sign, ompmem[ompthID].work_r, ompmem[ompthID].work_i);
 
 		  for ( tsID = 0; tsID < nts; tsID++ )
 		    {
-		      vars[tsID][varID][levelID].ptr[2*i]   = mem[ompthID].real[tsID];
-		      vars[tsID][varID][levelID].ptr[2*i+1] = mem[ompthID].imag[tsID];
+		      vars[tsID][varID][levelID].ptr[2*i]   = ompmem[ompthID].real[tsID];
+		      vars[tsID][varID][levelID].ptr[2*i+1] = ompmem[ompthID].imag[tsID];
 		    }
 		}
 	      else
@@ -176,15 +176,15 @@ void *Fourier(void *argument)
 
   for ( i = 0; i < ompNumThreads; i++ )
     {
-      free(mem[i].real);
-      free(mem[i].imag);
+      free(ompmem[i].real);
+      free(ompmem[i].imag);
       if ( bit != 1 )
 	{
-	  free(mem[i].work_r);
-	  free(mem[i].work_i);
+	  free(ompmem[i].work_r);
+	  free(ompmem[i].work_i);
 	}
     }
-  free(mem);
+  free(ompmem);
 
   for ( tsID = 0; tsID < nts; tsID++ )
     {
diff --git a/src/Gather.c b/src/Gather.c
index 6ae3b6d..293b93e 100644
--- a/src/Gather.c
+++ b/src/Gather.c
@@ -99,11 +99,11 @@ int genGrid(int nfiles, ens_file_t *ef, int **gridindex, int igrid)
   if ( gridtype == GRID_GENERIC && gridInqXsize(gridID) == 0 && gridInqYsize(gridID) == 0 )
     return (gridID2);
 
-  xsize = malloc(nfiles*sizeof(int));
-  ysize = malloc(nfiles*sizeof(int));
-  xyinfo = malloc(nfiles*sizeof(xyinfo_t));
-  xvals = malloc(nfiles*sizeof(double));
-  yvals = malloc(nfiles*sizeof(double));
+  xsize = (int*) malloc(nfiles*sizeof(int));
+  ysize = (int*) malloc(nfiles*sizeof(int));
+  xyinfo = (xyinfo_t*) malloc(nfiles*sizeof(xyinfo_t));
+  xvals = (double**) malloc(nfiles*sizeof(double*));
+  yvals = (double**) malloc(nfiles*sizeof(double*));
 
   for ( fileID = 0; fileID < nfiles; fileID++ )
     {
@@ -121,8 +121,8 @@ int genGrid(int nfiles, ens_file_t *ef, int **gridindex, int igrid)
       if ( xsize != gridInqXsize(gridID) ) cdoAbort("xsize differ!");
       if ( ysize != gridInqYsize(gridID) ) cdoAbort("ysize differ!");
       */
-      xvals[fileID] = malloc(xsize[fileID]*sizeof(double));
-      yvals[fileID] = malloc(ysize[fileID]*sizeof(double));
+      xvals[fileID] = (double*) malloc(xsize[fileID]*sizeof(double));
+      yvals[fileID] = (double*) malloc(ysize[fileID]*sizeof(double));
       gridInqXvals(gridID, xvals[fileID]);
       gridInqYvals(gridID, yvals[fileID]);
 
@@ -172,11 +172,11 @@ int genGrid(int nfiles, ens_file_t *ef, int **gridindex, int igrid)
   for ( j = 0; j < ny; ++j ) ysize2 += ysize[xyinfo[j*nx].id];
   if ( cdoVerbose ) cdoPrint("xsize2 %d  ysize2 %d", xsize2, ysize2);
 
-  xvals2 = malloc(xsize2*sizeof(double));
-  yvals2 = malloc(ysize2*sizeof(double));
+  xvals2 = (double*) malloc(xsize2*sizeof(double));
+  yvals2 = (double*) malloc(ysize2*sizeof(double));
 
-  xoff = malloc((nx+1)*sizeof(int));
-  yoff = malloc((ny+1)*sizeof(int));
+  xoff = (int*) malloc((nx+1)*sizeof(int));
+  yoff = (int*) malloc((ny+1)*sizeof(int));
 
   xoff[0] = 0;
   for ( i = 0; i < nx; ++i )
@@ -297,7 +297,7 @@ void *Gather(void *argument)
       if ( !userFileOverwrite(ofilename) )
 	cdoAbort("Outputfile %s already exists!", ofilename);
 
-  ef = malloc(nfiles*sizeof(ens_file_t));
+  ef = (ens_file_t*) malloc(nfiles*sizeof(ens_file_t));
 
   for ( fileID = 0; fileID < nfiles; fileID++ )
     {
@@ -310,7 +310,7 @@ void *Gather(void *argument)
     }
 
   nvars = vlistNvars(ef[0].vlistID);
-  vars  = malloc(nvars*sizeof(int));
+  vars  = (int*) malloc(nvars*sizeof(int));
   for ( varID = 0; varID < nvars; varID++ ) vars[varID] = FALSE;
 
   /* check that the contents is always the same */
@@ -332,13 +332,13 @@ void *Gather(void *argument)
   gridsize = gridsizemax;
 
   for ( fileID = 0; fileID < nfiles; fileID++ )
-    ef[fileID].array = malloc(gridsizemax*sizeof(double));
+    ef[fileID].array = (double*) malloc(gridsizemax*sizeof(double));
 
   ngrids = vlistNgrids(ef[0].vlistID);
-  gridIDs = malloc(ngrids*sizeof(int));
-  gridindex = malloc(nfiles*sizeof(int *));
+  gridIDs = (int*) malloc(ngrids*sizeof(int));
+  gridindex = (int **) malloc(nfiles*sizeof(int *));
   for ( fileID = 0; fileID < nfiles; fileID++ )
-    gridindex[fileID] = malloc(gridsizemax*sizeof(int));
+    gridindex[fileID] = (int*) malloc(gridsizemax*sizeof(int));
 
   int ginit = FALSE;
   for ( i = 0; i < ngrids; ++i )
@@ -387,7 +387,7 @@ void *Gather(void *argument)
       
   streamDefVlist(streamID2, vlistID2);
 	  
-  array2 = malloc(gridsize2*sizeof(double));
+  array2 = (double*) malloc(gridsize2*sizeof(double));
 
   tsID = 0;
   do
diff --git a/src/Gengrid.c b/src/Gengrid.c
index 47dd83a..49612f8 100644
--- a/src/Gengrid.c
+++ b/src/Gengrid.c
@@ -62,9 +62,9 @@ void *Gengrid(void *argument)
   xsize = gridInqXsize(gridID1);
   ysize = gridInqYsize(gridID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
-  array3 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
+  array3 = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   nrecs = streamInqTimestep(streamID1, tsID);
diff --git a/src/Gradsdes.c b/src/Gradsdes.c
index 169ff52..c31eddb 100644
--- a/src/Gradsdes.c
+++ b/src/Gradsdes.c
@@ -274,7 +274,7 @@ void dumpmap()
 
       if ( indx.hinum > 0 )
 	{
-	  indx.hipnt = malloc(sizeof(int)*indx.hinum);
+	  indx.hipnt = (int*) malloc(sizeof(int)*indx.hinum);
 	  for ( i = 0; i < indx.hinum; i++ )
 	    {
 	      nbytes = fread(mrec, sizeof(unsigned char), 4, mapfp);
@@ -283,12 +283,12 @@ void dumpmap()
 	}
       if ( indx.hfnum > 0 )
 	{
-	  indx.hfpnt = malloc(sizeof(float)*indx.hfnum);
+	  indx.hfpnt = (float*) malloc(sizeof(float)*indx.hfnum);
 	  nbytes = fread (indx.hfpnt,sizeof(float),indx.hfnum,mapfp);
 	}
       if ( indx.intnum > 0 )
 	{
-	  indx.intpnt = malloc(sizeof(int)*indx.intnum);
+	  indx.intpnt = (int*) malloc(sizeof(int)*indx.intnum);
 	  for ( i = 0; i < indx.intnum; i++ )
 	    {
 	      nbytes = fread(mrec, sizeof(unsigned char), 4, mapfp);
@@ -298,7 +298,7 @@ void dumpmap()
 	}
       if ( indx.fltnum > 0 )
 	{
-	  indx.fltpnt = malloc(sizeof(float)*indx.fltnum);
+	  indx.fltpnt = (float*) malloc(sizeof(float)*indx.fltnum);
 	  for ( i = 0; i < indx.fltnum; i++ )
 	    {
 	      nbytes = fread(urec, sizeof(unsigned char), 4, mapfp);
@@ -317,26 +317,26 @@ void dumpmap()
       
       if ( indx.hinum > 0 )
 	{
-	  indx.hipnt = malloc(sizeof(int)*indx.hinum);
+	  indx.hipnt = (int*) malloc(sizeof(int)*indx.hinum);
 	  nbytes = fread (indx.hipnt, sizeof(int), indx.hinum, mapfp);
 	  if ( swpflg ) gabswp((float *)(indx.hipnt),indx.hinum);
 	}
       if ( indx.hfnum > 0 )
 	{
-	  indx.hfpnt = malloc(sizeof(float)*indx.hfnum);
+	  indx.hfpnt = (float*) malloc(sizeof(float)*indx.hfnum);
 	  nbytes = fread (indx.hfpnt,sizeof(float),indx.hfnum,mapfp);
 	  if ( swpflg ) gabswp(indx.hfpnt,indx.hfnum);
 	}
 
       if ( indx.intnum > 0 )
 	{
-	  indx.intpnt = malloc(sizeof(int)*indx.intnum);
+	  indx.intpnt = (int*) malloc(sizeof(int)*indx.intnum);
 	  nbytes = fread (indx.intpnt,sizeof(int),indx.intnum,mapfp);
 	  if ( swpflg ) gabswp((float *)(indx.intpnt),indx.intnum);
 	}
       if ( indx.fltnum > 0 )
 	{
-	  indx.fltpnt = malloc(sizeof(float)*indx.fltnum);
+	  indx.fltpnt = (float*) malloc(sizeof(float)*indx.fltnum);
 	  nbytes = fread (indx.fltpnt,sizeof(float),indx.fltnum,mapfp);
 	  if ( swpflg ) gabswp(indx.fltpnt,indx.fltnum);
 	}
@@ -346,7 +346,7 @@ void dumpmap()
 	  indxb.bignum = indx.hipnt[4];
 	  if ( indxb.bignum > 0 )
 	    {
-	      indxb.bigpnt = malloc(sizeof(off_t)*indxb.bignum);
+	      indxb.bigpnt = (off_t*) malloc(sizeof(off_t)*indxb.bignum);
 	      nbytes = fread (indxb.bigpnt,sizeof(off_t),indxb.bignum,mapfp);
 	      if ( swpflg ) gabswp(indxb.bigpnt,indxb.bignum);
 	    }
@@ -435,8 +435,8 @@ void ctl_xydef(FILE *gdp, int gridID, int *yrev)
 	      xsize, ysize, originLat, originLon, lat1, lat2, lonParY, xincm, yincm);
 
       gridID = gridToCurvilinear(gridID, 0);
-      xvals = malloc(xsize*ysize*sizeof(double));
-      yvals = malloc(xsize*ysize*sizeof(double));
+      xvals = (double*) malloc(xsize*ysize*sizeof(double));
+      yvals = (double*) malloc(xsize*ysize*sizeof(double));
       gridInqXvals(gridID, xvals);
       gridInqYvals(gridID, yvals);
       for ( i = 0; i < xsize*ysize; ++i )
@@ -477,7 +477,7 @@ void ctl_xydef(FILE *gdp, int gridID, int *yrev)
       xinc   = gridInqXinc(gridID);
       if ( IS_EQUAL(xinc, 0) && gridInqXvals(gridID, NULL) )
 	{
-	  xvals = malloc(xsize*sizeof(double));
+	  xvals = (double*) malloc(xsize*sizeof(double));
 	  gridInqXvals(gridID, xvals);
 	  fprintf(gdp ,"XDEF %d LEVELS ", xsize);
 	  j = 0;
@@ -513,7 +513,7 @@ void ctl_xydef(FILE *gdp, int gridID, int *yrev)
 
       if ( IS_EQUAL(yinc, 0) && gridInqYvals(gridID, NULL) )
 	{
-	  yvals = malloc(ysize*sizeof(double));
+	  yvals = (double*) malloc(ysize*sizeof(double));
 	  gridInqYvals(gridID, yvals);
 	  fprintf(gdp ,"YDEF %d LEVELS ", ysize);
 	  j = 0;
@@ -589,7 +589,7 @@ void ctl_zdef(FILE *gdp, int vlistID, int *zrev)
 	}
     }
 
-  levels = malloc(nlevmax*sizeof(double));
+  levels = (double*) malloc(nlevmax*sizeof(double));
   zaxisInqLevels(zaxisIDmax, levels);
   if ( zaxisInqType(zaxisIDmax) == ZAXIS_PRESSURE ) lplev = TRUE;
   level0 = levels[0];
@@ -848,7 +848,7 @@ void write_map_grib1(const char *ctlfile, int map_version, int nrecords, int *in
       nb += 7;      /* base time (+ sec)  for compatibility with earlier version 2 maps */
       nb += 8*4;    /* grvals for time <-> grid conversion */
       
-      map = malloc(nb);
+      map = (unsigned char*) malloc(nb);
       
       bcnt = 0;
       Put1Byte(map, bcnt, 0);
@@ -910,7 +910,7 @@ void write_map_grib1(const char *ctlfile, int map_version, int nrecords, int *in
       if ( map_version == 1 )
 	{
 	  int *intnumbuf;
-	  intnumbuf = malloc(indx.intnum*sizeof(int));
+	  intnumbuf = (int*) malloc(indx.intnum*sizeof(int));
 	  for ( i = 0; i < nrecords; i++ )
 	    {
 	      intnumbuf[i*3+0] = (int) bignum[i*2];
@@ -1063,8 +1063,8 @@ void *Gradsdes(void *argument)
     cdoAbort("No Lon/Lat, Gaussian or Lambert grid found (%s data unsupported)!", gridNamePtr(gridtype));
 
   /* select all variables with used gridID */
-  vars = malloc(nvars*sizeof(int));
-  recoffset = malloc(nvars*sizeof(int));
+  vars = (int*) malloc(nvars*sizeof(int));
+  recoffset = (int*) malloc(nvars*sizeof(int));
   nvarsout = 0;
   nrecsout = 0;
   for ( varID = 0; varID < nvars; varID++ )
@@ -1183,7 +1183,7 @@ void *Gradsdes(void *argument)
 	}
 
       gridsize = vlistGridsizeMax(vlistID);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
   else if ( filetype == FILETYPE_NC )
     {
@@ -1297,9 +1297,9 @@ void *Gradsdes(void *argument)
 	  if ( nrecords >= maxrecs )
 	    {
 	      maxrecs = nrecords;
-	      intnum = realloc(intnum, 1*maxrecs*sizeof(int));
-	      fltnum = realloc(fltnum, 3*maxrecs*sizeof(float));
-	      bignum = realloc(bignum, 2*maxrecs*sizeof(off_t));
+	      intnum = (int*) realloc(intnum, 1*maxrecs*sizeof(int));
+	      fltnum = (float*) realloc(fltnum, 3*maxrecs*sizeof(float));
+	      bignum = (off_t*) realloc(bignum, 2*maxrecs*sizeof(off_t));
 	    }
 
 	  for ( recID = 0; recID < nrecs; recID++ )
diff --git a/src/Gridboxstat.c b/src/Gridboxstat.c
index bf933cc..aadbeb6 100644
--- a/src/Gridboxstat.c
+++ b/src/Gridboxstat.c
@@ -103,19 +103,19 @@ int genBoxGrid(int gridID1, int xinc, int yinc)
       if ( gridInqXbounds(gridID1, NULL) && gridInqYbounds(gridID1, NULL) )
         gridHasBounds = TRUE;
 
-      xvals1 = malloc(nlon1*sizeof(double));
-      yvals1 = malloc(nlat1*sizeof(double));
-      xvals2 = malloc(nlon2*sizeof(double));
-      yvals2 = malloc(nlat2*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*sizeof(double));
+      yvals1 = (double*) malloc(nlat1*sizeof(double));
+      xvals2 = (double*) malloc(nlon2*sizeof(double));
+      yvals2 = (double*) malloc(nlat2*sizeof(double));
       gridInqXvals(gridID1, xvals1);
       gridInqYvals(gridID1, yvals1);
 
       if ( gridHasBounds )
         {
-          grid1_corner_lon = malloc(2*nlon1*sizeof(double));
-          grid1_corner_lat = malloc(2*nlat1*sizeof(double));
-          grid2_corner_lon = malloc(2*nlon2*sizeof(double));
-          grid2_corner_lat = malloc(2*nlat2*sizeof(double));
+          grid1_corner_lon = (double*) malloc(2*nlon1*sizeof(double));
+          grid1_corner_lat = (double*) malloc(2*nlat1*sizeof(double));
+          grid2_corner_lon = (double*) malloc(2*nlon2*sizeof(double));
+          grid2_corner_lat = (double*) malloc(2*nlat2*sizeof(double));
           gridInqXbounds(gridID1, grid1_corner_lon);
           gridInqYbounds(gridID1, grid1_corner_lat);
         }
@@ -177,10 +177,10 @@ int genBoxGrid(int gridID1, int xinc, int yinc)
       if ( gridInqXbounds(gridID1, NULL) && gridInqYbounds(gridID1, NULL) )
         gridHasBounds = TRUE;
       
-      xvals1 = malloc(nlon1*nlat1*sizeof(double));
-      yvals1 = malloc(nlon1*nlat1*sizeof(double));
-      xvals2 = malloc(nlon2*nlat2*sizeof(double));
-      yvals2 = malloc(nlon2*nlat2*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+      yvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+      xvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
+      yvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
       gridInqXvals(gridID1, xvals1);
       gridInqYvals(gridID1, yvals1);
 
@@ -195,10 +195,10 @@ int genBoxGrid(int gridID1, int xinc, int yinc)
       
       if ( gridHasBounds )
         {
-          grid1_corner_lon = malloc(4*nlon1*nlat1*sizeof(double));
-          grid1_corner_lat = malloc(4*nlon1*nlat1*sizeof(double));
-          grid2_corner_lon = malloc(4*nlon2*nlat2*sizeof(double));
-          grid2_corner_lat = malloc(4*nlon2*nlat2*sizeof(double));
+          grid1_corner_lon = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+          grid1_corner_lat = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+          grid2_corner_lon = (double*) malloc(4*nlon2*nlat2*sizeof(double));
+          grid2_corner_lat = (double*) malloc(4*nlon2*nlat2*sizeof(double));
           gridInqXbounds(gridID1, grid1_corner_lon);
           gridInqYbounds(gridID1, grid1_corner_lat);
 
@@ -545,14 +545,14 @@ void gridboxstat(field_t *field1, field_t *field2, int xinc, int yinc, int statf
   if ( field1->weight ) useWeight = TRUE;
 
   gridsize      = xinc*yinc;
-  field = malloc(ompNumThreads*sizeof(field_t));
+  field = (field_t*) malloc(ompNumThreads*sizeof(field_t));
   for ( i = 0; i < ompNumThreads; i++ )
     {
       field[i].size    = gridsize;
-      field[i].ptr     = malloc(gridsize*sizeof(double));
+      field[i].ptr     = (double*) malloc(gridsize*sizeof(double));
       field[i].weight  = NULL;
       if ( useWeight )
-	field[i].weight  = malloc(gridsize*sizeof(double));
+	field[i].weight  = (double*) malloc(gridsize*sizeof(double));
       field[i].missval = field1->missval;
       field[i].nmiss   = 0;
     }
@@ -700,13 +700,13 @@ void *Gridboxstat(void *argument)
   field_init(&field2);
 
   gridsize1 = gridInqSize(gridID1);
-  field1.ptr    = malloc(gridsize1*sizeof(double));
+  field1.ptr    = (double*) malloc(gridsize1*sizeof(double));
   field1.weight = NULL;
   if ( needWeights )
-    field1.weight = malloc(gridsize1*sizeof(double));
+    field1.weight = (double*) malloc(gridsize1*sizeof(double));
 
   gridsize2 = gridInqSize(gridID2);
-  field2.ptr    = malloc(gridsize2*sizeof(double));
+  field2.ptr    = (double*) malloc(gridsize2*sizeof(double));
   field2.weight = NULL;
 
   tsID = 0;
diff --git a/src/Gridcell.c b/src/Gridcell.c
index c12ef39..bc2445b 100644
--- a/src/Gridcell.c
+++ b/src/Gridcell.c
@@ -137,7 +137,7 @@ void *Gridcell(void *argument)
 
 
   gridsize = gridInqSize(gridID);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
 
   if ( operatorID == GRIDAREA )
@@ -185,7 +185,7 @@ void *Gridcell(void *argument)
   else if ( operatorID == GRIDMASK )
     {
       int *mask;
-      mask = malloc(gridsize*sizeof(int));
+      mask = (int*) malloc(gridsize*sizeof(int));
       if ( gridInqMask(gridID, NULL) )
 	{
 	  gridInqMask(gridID, mask);
@@ -218,8 +218,8 @@ void *Gridcell(void *argument)
 	  xsize = gridInqXsize(gridID);
 	  ysize = gridInqYsize(gridID);
 
-	  xv = malloc(gridsize*sizeof(double));
-	  yv = malloc(gridsize*sizeof(double));
+	  xv = (double*) malloc(gridsize*sizeof(double));
+	  yv = (double*) malloc(gridsize*sizeof(double));
 
 	  gridInqXvals(gridID, xv);
 	  gridInqYvals(gridID, yv);
diff --git a/src/Harmonic.c b/src/Harmonic.c
index c57667c..ab66f38 100644
--- a/src/Harmonic.c
+++ b/src/Harmonic.c
@@ -80,7 +80,7 @@ void *Harmonic(void *argument)
   filesuffix[0] = 0;
   cdoGenFileSuffix(filesuffix, sizeof(filesuffix), streamInqFiletype(streamID1), vlistID1, refname);
 
-  streamIDs = malloc(n_out*sizeof(int));
+  streamIDs = (int*) malloc(n_out*sizeof(int));
 
   strcpy(filename, cdoStreamName(1)->args);
   nchars = strlen(filename);
@@ -102,35 +102,35 @@ void *Harmonic(void *argument)
 
   nvars = vlistNvars(vlistID1);
 
-  out  = malloc(n_out*sizeof(double **));
-  work = malloc(2*n_out*sizeof(double **));
+  out  = (double ***) malloc(n_out*sizeof(double **));
+  work = (double ***) malloc(2*n_out*sizeof(double **));
 
   for ( j = 0; j < n_out; ++j )
     {
-      out[j] = malloc(nvars*sizeof(double *));
+      out[j] = (double **) malloc(nvars*sizeof(double *));
       for ( varID = 0; varID < nvars; ++varID )
 	{
 	  gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
 	  nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-	  out[j][varID] = malloc(gridsize*nlevel*sizeof(double));
+	  out[j][varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
 	}
     }
 
   for ( j = 0; j < n_out*2; ++j )
     {
-      work[j] = malloc(nvars*sizeof(double *));
+      work[j] = (double **) malloc(nvars*sizeof(double *));
       for ( varID = 0; varID < nvars; ++varID )
 	{
 	  gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
 	  nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-	  work[j][varID] = malloc(gridsize*nlevel*sizeof(double));
+	  work[j][varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
 	  memset(work[j][varID], 0, gridsize*nlevel*sizeof(double));
 	}
     }
 
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Hi.c b/src/Hi.c
index f882037..3446b92 100755
--- a/src/Hi.c
+++ b/src/Hi.c
@@ -123,9 +123,9 @@ void *Hi(void *argument)
   field_init(&field1);
   field_init(&field2);
   field_init(&field3);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
-  field3.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
+  field3.ptr = (double*) malloc(gridsize*sizeof(double));
 
   if ( cdoVerbose )
     cdoPrint("Number of timesteps: file1 %d, file2 %d, file3 %d",
diff --git a/src/Histogram.c b/src/Histogram.c
index 3bc7ddb..9288417 100644
--- a/src/Histogram.c
+++ b/src/Histogram.c
@@ -82,7 +82,7 @@ void *Histogram(void *argument)
 
   /* create zaxis for output bins */
   zaxisID2 = zaxisCreate(ZAXIS_GENERIC, nbins);
-  bins = malloc(nbins*sizeof(double));
+  bins = (double*) malloc(nbins*sizeof(double));
   /* for ( i = 0; i < nbins; i++ ) bins[i] = (fltarr[i]+fltarr[i+1])/2; */
   for ( i = 0; i < nbins; i++ ) bins[i] = fltarr[i];
   zaxisDefLevels(zaxisID2, bins);
@@ -112,22 +112,22 @@ void *Histogram(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   nvars = vlistNvars(vlistID2);
-  vardata   = malloc(nvars*sizeof(double *));
-  varcount  = malloc(nvars*sizeof(double *));
-  vartcount = malloc(nvars*sizeof(double *));
+  vardata   = (double **) malloc(nvars*sizeof(double *));
+  varcount  = (double **) malloc(nvars*sizeof(double *));
+  vartcount = (double **) malloc(nvars*sizeof(double *));
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID));
-      vardata[varID]  = malloc(nbins*gridsize*sizeof(double));
-      varcount[varID] = malloc(nbins*gridsize*sizeof(double));
-      vartcount[varID] = malloc(gridsize*sizeof(double));
+      vardata[varID]  = (double*) malloc(nbins*gridsize*sizeof(double));
+      varcount[varID] = (double*) malloc(nbins*gridsize*sizeof(double));
+      vartcount[varID] = (double*) malloc(gridsize*sizeof(double));
       memset(vardata[varID], 0, nbins*gridsize*sizeof(double));
       memset(varcount[varID], 0, nbins*gridsize*sizeof(double));
       memset(vartcount[varID], 0, gridsize*sizeof(double));
     }
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID1 = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID1)) )
diff --git a/src/Importamsr.c b/src/Importamsr.c
index ce4a38d..4d42244 100644
--- a/src/Importamsr.c
+++ b/src/Importamsr.c
@@ -121,7 +121,7 @@ void read_amsr(FILE *fp, int vlistID, int nvars, double *data[], int *nmiss)
   for ( varID = 0; varID < nvars; ++varID )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID));
-      amsr_data = realloc(amsr_data, gridsize);
+      amsr_data = (unsigned char *) realloc(amsr_data, gridsize);
       size = fread(amsr_data, 1, gridsize, fp);
       if ( (int)size != gridsize ) cdoAbort("Read error!");
 
@@ -228,7 +228,7 @@ void *Importamsr(void *argument)
   if ( fsize == 12441600 )
     {
       nvars = 6;
-      for ( i = 0; i < nvars; ++i ) data[i] = malloc(gridsize*sizeof(double));
+      for ( i = 0; i < nvars; ++i ) data[i] = (double*) malloc(gridsize*sizeof(double));
 
       init_amsr_day(vlistID, gridID, zaxisID, nvars);
 
@@ -253,7 +253,7 @@ void *Importamsr(void *argument)
   else if ( fsize == 5184000 )
     {
       nvars = 5;
-      for ( i = 0; i < nvars; ++i ) data[i] = malloc(gridsize*sizeof(double));
+      for ( i = 0; i < nvars; ++i ) data[i] = (double*) malloc(gridsize*sizeof(double));
 
       init_amsr_averaged(vlistID, gridID, zaxisID, nvars);
 
diff --git a/src/Importbinary.c b/src/Importbinary.c
index d63ae83..db4607c 100644
--- a/src/Importbinary.c
+++ b/src/Importbinary.c
@@ -19,6 +19,10 @@
 #  include "config.h"
 #endif
 
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 /* fseeko */
+#endif
+
 #include <ctype.h>
 
 #include <cdi.h>
@@ -86,8 +90,8 @@ int y_is_gauss(double *gridyvals, int ysize)
   if ( ysize > 2 )
     {
       double *yvals, *yw;
-      yvals = malloc(ysize*sizeof(double));
-      yw    = malloc(ysize*sizeof(double));
+      yvals = (double*) malloc(ysize*sizeof(double));
+      yw    = (double*) malloc(ysize*sizeof(double));
       gaussaw(yvals, yw, ysize);
       free(yw);
       for ( i = 0; i < (int) ysize; i++ )
@@ -126,8 +130,8 @@ int define_grid(dsets_t *pfi)
   nx = pfi->dnum[0];
   ny = pfi->dnum[1];
 
-  xvals = malloc(nx*sizeof(double));
-  yvals = malloc(ny*sizeof(double));
+  xvals = (double*) malloc(nx*sizeof(double));
+  yvals = (double*) malloc(ny*sizeof(double));
 
   get_dim_vals(pfi, xvals, nx, 0);
   get_dim_vals(pfi, yvals, ny, 1);
@@ -164,7 +168,7 @@ int define_level(dsets_t *pfi, int nlev)
     {
       double *zvals = NULL;
 
-      zvals = malloc(nz*sizeof(double));
+      zvals = (double*) malloc(nz*sizeof(double));
 
       get_dim_vals(pfi, zvals, nz, 2);
 
@@ -252,10 +256,10 @@ void *Importbinary(void *argument)
 
   vlistID = vlistCreate();
 
-  var_zaxisID = malloc(nvars*sizeof(int));
-  recVarID    = malloc(nrecs*sizeof(int));
-  recLevelID  = malloc(nrecs*sizeof(int));
-  var_dfrm    = malloc(nrecs*sizeof(int));
+  var_zaxisID = (int*) malloc(nvars*sizeof(int));
+  recVarID    = (int*) malloc(nrecs*sizeof(int));
+  recLevelID  = (int*) malloc(nrecs*sizeof(int));
+  var_dfrm    = (int*) malloc(nrecs*sizeof(int));
 
   recID = 0;
   for ( ivar = 0; ivar < nvars; ++ivar )
@@ -366,9 +370,9 @@ void *Importbinary(void *argument)
 
   //recsize = pfi.gsiz*4;
   recsize = pfi.gsiz*8;
-  rec = malloc(recsize);
+  rec = (char*) malloc(recsize);
 
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   /*
   if (pfi.tmplat)
@@ -438,7 +442,7 @@ void *Importbinary(void *argument)
       pfi.infile = fopen(ch,"rb");
       if (pfi.infile==NULL) {
 	if (pfi.tmplat) {
-	  if ( cdoVerbose ) cdoPrint("Could not open file: %s",ch);
+	  cdoWarning("Could not open file: %s",ch);
 	  break;
 	} else {
 	  cdoAbort("Could not open file: %s",ch);
@@ -551,9 +555,10 @@ void *Importbinary(void *argument)
 		      if ( array[i] > fmax ) fmax = array[i];
 		    }
 		}
+	      /*
 	      if ( cdoVerbose )
 		printf("%3d %4d %3d %6d %6d %12.5g %12.5g\n", tsID, recID, recoffset, nmiss, n_nan, fmin, fmax);
-
+	      */
 	      varID   = recVarID[recID];
 	      levelID = recLevelID[recID];
 	      streamDefRecord(streamID,  varID,  levelID);
diff --git a/src/Importcmsaf.c b/src/Importcmsaf.c
index 959912a..50941c2 100644
--- a/src/Importcmsaf.c
+++ b/src/Importcmsaf.c
@@ -68,7 +68,6 @@ typedef struct {
 }
 datasets_t;
 
-#define  NINT(x)   ((x) < 0 ? (int)((x)-0.5) : (int)((x)+0.5))
 
 #if defined(HAVE_LIBHDF5)
 static
@@ -109,7 +108,7 @@ void get_grid_info(double c0, double re, int *nrxp, int *nryp,
 
   git=2.*pi*re*cos(pi/6.)/c0;
   /* number of longitude pixels */
-  nrx=2*NINT(0.5*git);
+  nrx=2*lround(0.5*git);
 
   /* central index in longitude */
   r0=nrx/2+0.5;
@@ -177,10 +176,10 @@ int defLonLatGrid(int nx, int ny, double c0, double lts, double re)
       return(-1);
     }
 
-  xvals = malloc(nx*sizeof(double));
-  yvals = malloc(ny*sizeof(double));
-  xbounds = malloc(nx*2*sizeof(double));
-  ybounds = malloc(nx*2*sizeof(double));
+  xvals = (double*) malloc(nx*sizeof(double));
+  yvals = (double*) malloc(ny*sizeof(double));
+  xbounds = (double*) malloc(nx*2*sizeof(double));
+  ybounds = (double*) malloc(nx*2*sizeof(double));
 
   for ( i = 0; i < nx; ++i )
     {
@@ -231,8 +230,8 @@ int defSinusoidalGrid(int nx, int ny, double xmin, double xmax, double ymin, dou
   int i;
   double *xvals, *yvals;
 
-  xvals = malloc(nx*sizeof(double));
-  yvals = malloc(ny*sizeof(double));
+  xvals = (double*) malloc(nx*sizeof(double));
+  yvals = (double*) malloc(ny*sizeof(double));
 
   for ( i = 0; i < nx; ++i )
     {
@@ -266,8 +265,8 @@ int defLaeaGrid(int nx, int ny, double xmin, double xmax, double ymin, double ym
   int i;
   double *xvals, *yvals;
 
-  xvals = malloc(nx*sizeof(double));
-  yvals = malloc(ny*sizeof(double));
+  xvals = (double*) malloc(nx*sizeof(double));
+  yvals = (double*) malloc(ny*sizeof(double));
 
   for ( i = 0; i < nx; ++i )
     {
@@ -476,8 +475,8 @@ int read_geolocation(hid_t loc_id, int nx, int ny, int lprojtype)
   H5Gclose(grp_id);
 
   /* check region */
-  xsize = NINT((region.xmax-region.xmin)/region.dx);
-  ysize = NINT((region.ymax-region.ymin)/region.dy);
+  xsize = lround((region.xmax-region.xmin)/region.dx);
+  ysize = lround((region.ymax-region.ymin)/region.dy);
 
   if ( cdoVerbose ) cdoPrint("  Size: xsize=%d  ysize=%d", xsize, ysize);
 
@@ -496,8 +495,8 @@ int read_geolocation(hid_t loc_id, int nx, int ny, int lprojtype)
          cdoPrint("  Corrected region: xmin=%g xmax=%g ymin=%g ymax=%g dx=%g dy=%g",
                 region.xmin, region.xmax, region.ymin, region.ymax, region.dx, region.dy);
 
-       xsize = NINT((region.xmax-region.xmin)/region.dx);
-       ysize = NINT((region.ymax-region.ymin)/region.dy);
+       xsize = lround((region.xmax-region.xmin)/region.dx);
+       ysize = lround((region.ymax-region.ymin)/region.dy);
        if ( cdoVerbose ) cdoPrint("  Corrected size: xsize=%d  ysize=%d", xsize, ysize);
     }
 
@@ -513,8 +512,8 @@ int read_geolocation(hid_t loc_id, int nx, int ny, int lprojtype)
         cdoPrint("  Corrected region: xmin=%g xmax=%g ymin=%g ymax=%g dx=%g dy=%g",
                region.xmin, region.xmax, region.ymin, region.ymax, region.dx, region.dy);
 
-        xsize = NINT((region.xmax-region.xmin)/region.dx);
-        ysize = NINT((region.ymax-region.ymin)/region.dy);
+        xsize = lround((region.xmax-region.xmin)/region.dx);
+        ysize = lround((region.ymax-region.ymin)/region.dy);
         if ( cdoVerbose ) cdoPrint("  Corrected size: xsize=%d  ysize=%d", xsize, ysize);
     }
 
@@ -737,8 +736,8 @@ int read_region(hid_t loc_id, int nx, int ny)
   dx = (xmax-xmin) / nx;
   dy = (ymax-ymin) / ny;
   /*
-  xsize = NINT((region.xmax-region.xmin)/region.dx);
-  ysize = NINT((region.ymax-region.ymin)/region.dy);
+  xsize = lround((region.xmax-region.xmin)/region.dx);
+  ysize = lround((region.ymax-region.ymin)/region.dy);
 
   if ( cdoVerbose ) cdoPrint("  Size: xsize=%d  ysize=%d", xsize, ysize);
   */
@@ -1061,7 +1060,7 @@ void read_dataset(hid_t loc_id, const char *name, void *opdata)
       
       offset = gridsize*(nz-1);
       array  = ((datasets_t *) opdata)->obj[nset].array;
-      array  = realloc(array, gridsize*nz*nt*sizeof(double));
+      array  = (double*) realloc(array, gridsize*nz*nt*sizeof(double));
       ((datasets_t *) opdata)->obj[nset].array    = array;
       array  = array+offset;
 
@@ -1071,7 +1070,7 @@ void read_dataset(hid_t loc_id, const char *name, void *opdata)
 	    {
 	      float *farray;
 	      int i;
-	      farray = malloc(gridsize*nt*sizeof(float));
+	      farray = (float*) malloc(gridsize*nt*sizeof(float));
 	      status = H5Dread(dset_id, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, farray);
 	      if ( status < 0 )
 		cdoAbort("Reading of NATIVE_FLOAT variable %s failed!", varname);
@@ -1088,7 +1087,7 @@ void read_dataset(hid_t loc_id, const char *name, void *opdata)
       else
 	{
 	  int *iarray, i;
-	  iarray = malloc(gridsize*nt*sizeof(int));
+	  iarray = (int*) malloc(gridsize*nt*sizeof(int));
 	  status = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, iarray);
 	  if ( status < 0 )
 	    cdoAbort("Reading of NATIVE_INT variable %s failed!", varname);
@@ -1120,7 +1119,7 @@ void read_dataset(hid_t loc_id, const char *name, void *opdata)
 
       if ( nz == 1 ) ((datasets_t *) opdata)->nsets++;
 
-      mask = malloc(gridsize*nt*sizeof(short));
+      mask = (short*) malloc(gridsize*nt*sizeof(short));
       memset(mask, 0, gridsize*nt*sizeof(short));
 
       nmiss  = 0;
@@ -1457,7 +1456,7 @@ void *Importcmsaf(void *argument)
 
   if ( nt > 1 )
     {
-      vtimes = malloc(nt*sizeof(int));
+      vtimes = (int*) malloc(nt*sizeof(int));
       
       for ( i = 0; i < nt; ++i ) vtimes[i] = i*10000 + 45*100;
 
@@ -1513,7 +1512,7 @@ void *Importcmsaf(void *argument)
   else
     {
       double *levels;
-      levels = malloc(nz*sizeof(double));
+      levels = (double*) malloc(nz*sizeof(double));
       for ( i = 0; i < nz; ++i ) levels[i] = i+1;
       zaxisID = zaxisCreate(ZAXIS_GENERIC, nz);
       zaxisDefLevels(zaxisID, levels);
diff --git a/src/Importobs.c b/src/Importobs.c
index 4fb495a..eed08da 100644
--- a/src/Importobs.c
+++ b/src/Importobs.c
@@ -147,8 +147,8 @@ void *Importobs(void *argument)
 
   // printf("gridsize=%d, xsize=%d, ysize=%d\n", gridsize, xsize, ysize);
 
-  xvals = malloc(gridsize*sizeof(double));
-  yvals = malloc(gridsize*sizeof(double));
+  xvals = (double*) malloc(gridsize*sizeof(double));
+  yvals = (double*) malloc(gridsize*sizeof(double));
 
   gridInqXvals(gridID, xvals);
   gridInqYvals(gridID, yvals);
@@ -178,7 +178,7 @@ void *Importobs(void *argument)
   vlistDefTaxis(vlistID, taxisID);
 
     {
-      for ( i = 0; i < nvars; ++i ) data[i] = malloc(gridsize*sizeof(double));
+      for ( i = 0; i < nvars; ++i ) data[i] = (double*) malloc(gridsize*sizeof(double));
 
       init_vars(vlistID, gridID, zaxisID, nvars);
 
@@ -237,7 +237,7 @@ void *Importobs(void *argument)
 	  if ( i < xsize && j < ysize && index >= 0 )
 	    {
 	      pstation = station;
-	      while (isalpha(*pstation)) *pstation++;
+	      while (isalpha(*pstation)) pstation++;
 	      // printf("station %s %d\n", pstation, atoi(pstation));
 	      data[index][j*xsize+i] = value;
 	      data[    4][j*xsize+i] = height1;
diff --git a/src/Info.c b/src/Info.c
index c32141a..b58ca16 100644
--- a/src/Info.c
+++ b/src/Info.c
@@ -28,7 +28,7 @@
 #include "cdo_int.h"
 #include "pstream.h"
 
-
+static
 void printMap(int nlon, int nlat, double *array, double missval, double min, double max)
 {
   /* source code from PINGO */
@@ -37,7 +37,8 @@ void printMap(int nlon, int nlat, double *array, double missval, double min, dou
   double step;
   double level[10];
   int min_n, max_n;
-  char c;
+  int bmin = 1, bmax = 1;
+  unsigned char c;
 
   step = (max - min) / 10;
 
@@ -151,7 +152,29 @@ void printMap(int nlon, int nlat, double *array, double missval, double min, dou
 		    break;
 		  }
 	    }
+
+	  if      ( c == '0' ) { set_text_color(stdout, BRIGHT, BLUE); }
+	  else if ( c == '1' ) { set_text_color(stdout, RESET, BLUE); }
+	  else if ( c == '2' ) { set_text_color(stdout, BRIGHT, CYAN); }
+	  else if ( c == '3' ) { set_text_color(stdout, RESET, CYAN); }
+	  else if ( c == '4' ) { set_text_color(stdout, RESET, GREEN); }
+	  else if ( c == '5' ) { set_text_color(stdout, RESET, YELLOW); }
+	  else if ( c == '6' ) { set_text_color(stdout, RESET, RED); }
+	  else if ( c == '7' ) { set_text_color(stdout, BRIGHT, RED); }
+	  else if ( c == '8' ) { set_text_color(stdout, RESET, MAGENTA); }
+	  else if ( c == '9' ) { set_text_color(stdout, BRIGHT, MAGENTA); }
+	  else if ( c == 'M' )
+	    {
+	      if ( bmax ) { bmax = 0; set_text_color(stdout, BLINK, BLACK); }
+	      else        {           set_text_color(stdout, RESET, BLACK); }
+	    }
+	  else if ( c == 'm' )
+	    {
+	      if ( bmin ) { bmin = 0; set_text_color(stdout, BLINK, BLACK); }
+	      else        {           set_text_color(stdout, RESET, BLACK); }
+	    }
 	  putchar (c);
+	  reset_text_color(stdout);
 	}
       printf (" %0*d\n", nlat < 10 ? 1 : nlat < 100 ? 2 : nlat < 1000 ? 3 : 4, ilat + 1);
       fflush (stdout);
@@ -266,7 +289,7 @@ void *Info(void *argument)
       gridsize = vlistGridsizeMax(vlistID);
       if ( vlistNumber(vlistID) != CDI_REAL ) gridsize *= 2;
 
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
 
       indg = 0;
       tsID = 0;
@@ -283,6 +306,7 @@ void *Info(void *argument)
 	    {
 	      if ( (tsID == 0 && recID == 0) || operatorID == MAP )
 		{
+		  set_text_color(stdout, BRIGHT, BLACK);
 		  fprintf(stdout, "%6d :       Date     Time   Level Gridsize    Miss :"
 			  "     Minimum        Mean     Maximum : ",  -(indf+1));
 
@@ -290,8 +314,9 @@ void *Info(void *argument)
 		  else if ( operatorID == INFOC ) fprintf(stdout, "Code number");
 		  else                            fprintf(stdout, "Parameter ID");
 
-		  if ( cdoVerbose ) fprintf(stdout, " : Extra" );              
-		  fprintf(stdout, "\n" );              
+		  if ( cdoVerbose ) fprintf(stdout, " : Extra" );
+		  reset_text_color(stdout);
+		  fprintf(stdout, "\n" );
 		}
 
 	      streamInqRecord(streamID, &varID, &levelID);
@@ -310,12 +335,23 @@ void *Info(void *argument)
 
 	      if ( operatorID == INFON ) vlistInqVarName(vlistID, varID, varname);
 
-	      fprintf(stdout, "%6d :%s %s ", indg, vdatestr, vtimestr);
-
+	      set_text_color(stdout, BRIGHT, BLACK);
+	      fprintf(stdout, "%6d ", indg);
+	      reset_text_color(stdout);
+	      set_text_color(stdout, RESET, BLACK);
+	      fprintf(stdout, ":");
+	      reset_text_color(stdout);
+	      
+	      set_text_color(stdout, RESET, BLUE);
+	      fprintf(stdout, "%s %s ", vdatestr, vtimestr);
 	      level = zaxisInqLevel(zaxisID, levelID);
 	      fprintf(stdout, "%7g ", level);
-
-	      fprintf(stdout, "%8d %7d :", gridsize, nmiss);
+	      fprintf(stdout, "%8d %7d ", gridsize, nmiss);
+	      reset_text_color(stdout);
+		
+	      set_text_color(stdout, RESET, BLACK);
+	      fprintf(stdout, ":");
+	      reset_text_color(stdout);
 
 	      if ( /* gridInqType(gridID) == GRID_SPECTRAL || */
 		   (gridsize == 1 && nmiss == 0 && number == CDI_REAL) )
@@ -364,7 +400,7 @@ void *Info(void *argument)
 			      /* #pragma omp critical */
 			      if ( array[i] > arrmax ) arrmax = array[i];
 			      arrmean += array[i];
-			      arrvar  += array[i]*array[i];
+			      // arrvar  += array[i]*array[i];
 			    }
 			  nvals = gridsize;
 			}
@@ -372,7 +408,7 @@ void *Info(void *argument)
 		      if ( nvals )
 			{
 			  arrmean = arrmean/nvals;
-			  arrvar  = arrvar/nvals - arrmean*arrmean;
+			  // arrvar  = arrvar/nvals - arrmean*arrmean;
 			  fprintf(stdout, "%#12.5g%#12.5g%#12.5g", arrmin, arrmean, arrmax);
 			}
 		      else
@@ -407,12 +443,18 @@ void *Info(void *argument)
 		    }
 		}
 
+	      set_text_color(stdout, RESET, BLACK);
+	      fprintf(stdout, " : ");
+	      reset_text_color(stdout);
+
+	      set_text_color(stdout, BRIGHT, GREEN);
 	      if ( operatorID == INFON )
-		fprintf(stdout, " : %-14s", varname);
+		fprintf(stdout, "%-14s", varname);
 	      else if ( operatorID == INFOC )
-		fprintf(stdout, " : %4d   ", code);
+		fprintf(stdout, "%4d   ", code);
 	      else
-		fprintf(stdout, " : %-14s", paramstr);
+		fprintf(stdout, "%-14s", paramstr);
+	      reset_text_color(stdout);
 
 	      if ( cdoVerbose )
 		{
diff --git a/src/Input.c b/src/Input.c
index b861c47..5f12b2b 100644
--- a/src/Input.c
+++ b/src/Input.c
@@ -121,7 +121,7 @@ void *Input(void *argument)
 	  time     = 0;
 	  
 	  if ( nrecs == 0 )
-	    array = malloc(gridsize*sizeof(double));
+	    array = (double*) malloc(gridsize*sizeof(double));
 	  
 	  cdoPrint("Enter all %d elements of record %d!", gridsize, nrecs+1);
 	  
@@ -164,7 +164,7 @@ void *Input(void *argument)
 	      if ( gridsize < 0 )
 		cdoAbort("Gridsize must not be negative!", gridsize);
 
-	      array = malloc(gridsize*sizeof(double));
+	      array = (double*) malloc(gridsize*sizeof(double));
 
 	      gridID = gridCreate(GRID_GENERIC, gridsize);
 	    }
@@ -211,7 +211,7 @@ void *Input(void *argument)
 	      if ( gridsize < 0 )
 		cdoAbort("Gridsize must not be negative!", gridsize);
 
-	      array = malloc(gridsize*sizeof(double));
+	      array = (double*) malloc(gridsize*sizeof(double));
 
 	      gridID = gridCreate(GRID_GENERIC, gridsize);
 	      gridDefXsize(gridID, nlon);
diff --git a/src/Intgrid.c b/src/Intgrid.c
index 92e7aa9..837847e 100644
--- a/src/Intgrid.c
+++ b/src/Intgrid.c
@@ -53,10 +53,10 @@ int genThinoutGrid(int gridID1, int xinc, int yinc)
 
   if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT )
     {
-      xvals1 = malloc(nlon1*sizeof(double));
-      yvals1 = malloc(nlat1*sizeof(double));
-      xvals2 = malloc(nlon2*sizeof(double));
-      yvals2 = malloc(nlat2*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*sizeof(double));
+      yvals1 = (double*) malloc(nlat1*sizeof(double));
+      xvals2 = (double*) malloc(nlon2*sizeof(double));
+      yvals2 = (double*) malloc(nlat2*sizeof(double));
       gridInqXvals(gridID1, xvals1);
       gridInqYvals(gridID1, yvals1);
 
@@ -112,19 +112,19 @@ int genBoxavgGrid(int gridID1, int xinc, int yinc)
 
   if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT )
     {
-      xvals1 = malloc(nlon1*sizeof(double));
-      yvals1 = malloc(nlat1*sizeof(double));
-      xvals2 = malloc(nlon2*sizeof(double));
-      yvals2 = malloc(nlat2*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*sizeof(double));
+      yvals1 = (double*) malloc(nlat1*sizeof(double));
+      xvals2 = (double*) malloc(nlon2*sizeof(double));
+      yvals2 = (double*) malloc(nlat2*sizeof(double));
       gridInqXvals(gridID1, xvals1);
       gridInqYvals(gridID1, yvals1);
 
       if ( gridInqYbounds(gridID1, NULL) && gridInqXbounds(gridID1, NULL) )
 	{
-	  grid1_corner_lon = malloc(2*nlon1*sizeof(double));
-	  grid1_corner_lat = malloc(2*nlat1*sizeof(double));
-	  grid2_corner_lon = malloc(2*nlon2*sizeof(double));
-	  grid2_corner_lat = malloc(2*nlat2*sizeof(double));
+	  grid1_corner_lon = (double*) malloc(2*nlon1*sizeof(double));
+	  grid1_corner_lat = (double*) malloc(2*nlat1*sizeof(double));
+	  grid2_corner_lon = (double*) malloc(2*nlon2*sizeof(double));
+	  grid2_corner_lat = (double*) malloc(2*nlat2*sizeof(double));
 	  gridInqXbounds(gridID1, grid1_corner_lon);
 	  gridInqYbounds(gridID1, grid1_corner_lat);
 	}
@@ -204,13 +204,13 @@ void boxavg(field_t *field1, field_t *field2, int xinc, int yinc)
   nlon2 = gridInqXsize(gridID2);
   nlat2 = gridInqYsize(gridID2);
 
-  xfield1 = malloc(nlat1*sizeof(double *));
+  xfield1 = (double **) malloc(nlat1*sizeof(double *));
 
   for ( ilat = 0; ilat < nlat1; ilat++ )
     xfield1[ilat] = array1 + ilat*nlon1;
 
 
-  xfield2 = malloc(nlat2 * sizeof(double *));
+  xfield2 = (double **) malloc(nlat2 * sizeof(double *));
 
   for ( ilat = 0; ilat < nlat2; ilat++ )
     xfield2[ilat] = array2 + ilat*nlon2;
@@ -272,12 +272,12 @@ void thinout(field_t *field1, field_t *field2, int xinc, int yinc)
   nlon2 = gridInqXsize(gridID2);
   nlat2 = gridInqYsize(gridID2);
 
-  xfield1 = malloc(nlat1*sizeof(double *));
+  xfield1 = (double **) malloc(nlat1*sizeof(double *));
 
   for ( ilat = 0; ilat < nlat1; ilat++ )
     xfield1[ilat] = array1 + ilat*nlon1;
 
-  xfield2 = malloc(nlat2*sizeof(double *));
+  xfield2 = (double **) malloc(nlat2*sizeof(double *));
 
   for ( ilat = 0; ilat < nlat2; ilat++ )
     xfield2[ilat] = array2 + ilat*nlon2;
@@ -408,10 +408,10 @@ void *Intgrid(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1   = malloc(gridsize*sizeof(double));
+  array1   = (double*) malloc(gridsize*sizeof(double));
 
   gridsize = gridInqSize(gridID2);
-  array2   = malloc(gridsize*sizeof(double));
+  array2   = (double*) malloc(gridsize*sizeof(double));
 
   field_init(&field1);
   field_init(&field2);
diff --git a/src/Intgridtraj.c b/src/Intgridtraj.c
index 2143888..847a5e9 100644
--- a/src/Intgridtraj.c
+++ b/src/Intgridtraj.c
@@ -100,21 +100,21 @@ void *Intgridtraj(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
-  vardata1 = malloc(nvars*sizeof(double*));
-  vardata2 = malloc(nvars*sizeof(double*));
+  vardata1 = (double**) malloc(nvars*sizeof(double*));
+  vardata2 = (double**) malloc(nvars*sizeof(double*));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
-      vardata2[varID] = malloc(gridsize*nlevel*sizeof(double));
+      vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
+      vardata2[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   gridID2 = gridCreate(GRID_TRAJECTORY, 1);
diff --git a/src/Intlevel.c b/src/Intlevel.c
index 6d890d4..f9dfac9 100644
--- a/src/Intlevel.c
+++ b/src/Intlevel.c
@@ -231,7 +231,7 @@ void *Intlevel(void *argument)
   if ( i == nzaxis ) cdoAbort("No processable variable found!");
 
   nlev1 = nlevel;
-  lev1  = malloc((nlev1+2)*sizeof(double));
+  lev1  = (double*) malloc((nlev1+2)*sizeof(double));
   zaxisInqLevels(zaxisID1, lev1+1);
 
   lup = FALSE;
@@ -273,10 +273,10 @@ void *Intlevel(void *argument)
 
   if ( cdoVerbose ) for ( i = 0; i < nlev1+2; ++i ) printf("lev1 %d: %g\n", i, lev1[i]);
 
-  lev_idx1 = malloc(nlev2*sizeof(int));
-  lev_idx2 = malloc(nlev2*sizeof(int));
-  lev_wgt1 = malloc(nlev2*sizeof(double));
-  lev_wgt2 = malloc(nlev2*sizeof(double));
+  lev_idx1 = (int*) malloc(nlev2*sizeof(int));
+  lev_idx2 = (int*) malloc(nlev2*sizeof(int));
+  lev_wgt1 = (double*) malloc(nlev2*sizeof(double));
+  lev_wgt2 = (double*) malloc(nlev2*sizeof(double));
 
   gen_weights(expol, nlev1+2, lev1, nlev2, lev2, lev_idx1, lev_idx2, lev_wgt1, lev_wgt2);
 
@@ -307,11 +307,11 @@ void *Intlevel(void *argument)
 
   nvars = vlistNvars(vlistID1);
 
-  vars      = malloc(nvars*sizeof(int));
-  vardata1  = malloc(nvars*sizeof(double*));
-  vardata2  = malloc(nvars*sizeof(double*));
-  varnmiss  = malloc(nvars*sizeof(int*));
-  varinterp = malloc(nvars*sizeof(int));
+  vars      = (int*) malloc(nvars*sizeof(int));
+  vardata1  = (double**) malloc(nvars*sizeof(double*));
+  vardata2  = (double**) malloc(nvars*sizeof(double*));
+  varnmiss  = (int**) malloc(nvars*sizeof(int*));
+  varinterp = (int*) malloc(nvars*sizeof(int));
 
   maxlev   = nlev1 > nlev2 ? nlev1 : nlev2;
 
@@ -322,20 +322,20 @@ void *Intlevel(void *argument)
       gridsize = gridInqSize(gridID);
       nlevel   = zaxisInqSize(zaxisID);
 
-      vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
+      vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
 
       if ( zaxisID == zaxisID1 )
 	{
 	  varinterp[varID] = TRUE;
-	  vardata2[varID]  = malloc(gridsize*nlev2*sizeof(double));
-	  varnmiss[varID]  = malloc(maxlev*sizeof(int));
+	  vardata2[varID]  = (double*) malloc(gridsize*nlev2*sizeof(double));
+	  varnmiss[varID]  = (int*) malloc(maxlev*sizeof(int));
 	  memset(varnmiss[varID], 0, maxlev*sizeof(int));
 	}
       else
 	{
 	  varinterp[varID] = FALSE;
 	  vardata2[varID]  = vardata1[varID];
-	  varnmiss[varID]  = malloc(nlevel*sizeof(int));
+	  varnmiss[varID]  = (int*) malloc(nlevel*sizeof(int));
 	}
     }
 
diff --git a/src/Intlevel3d.c b/src/Intlevel3d.c
index 04d6b4e..46a59e1 100644
--- a/src/Intlevel3d.c
+++ b/src/Intlevel3d.c
@@ -266,12 +266,12 @@ void *Intlevel3d(void *argument)
 
     nlonIn  = gridInqXsize(gridID);
     nlatIn  = gridInqYsize(gridID);
-    lonIn   = malloc(nlonIn*sizeof(double));
-    latIn   = malloc(nlatIn*sizeof(double));
+    lonIn   = (double*) malloc(nlonIn*sizeof(double));
+    latIn   = (double*) malloc(nlatIn*sizeof(double));
     gridInqXvals(gridID, lonIn);
     gridInqYvals(gridID, latIn);
 
-    zlevels_in = malloc(gridsize*(nlevel+2)*sizeof(double*));
+    zlevels_in = (double*) malloc(gridsize*(nlevel+2)*sizeof(double));
     nlevi      = nlevel;   /* number of input levels for later use */
     gridsizei  = gridsize; /* horizontal gridsize of input z coordinate */
     nrecs      = streamInqTimestep(streamID0, 0);
@@ -302,12 +302,12 @@ void *Intlevel3d(void *argument)
 
     nlonOut = gridInqXsize(gridID);
     nlatOut = gridInqYsize(gridID);
-    lonOut  = malloc(nlonOut*sizeof(double));
-    latOut  = malloc(nlatOut*sizeof(double));
+    lonOut  = (double*) malloc(nlonOut*sizeof(double));
+    latOut  = (double*) malloc(nlatOut*sizeof(double));
     gridInqXvals(gridID, lonOut);
     gridInqYvals(gridID, latOut);
 
-    zlevels_out = malloc(gridsize*nlevel*sizeof(double));
+    zlevels_out = (double*) malloc(gridsize*nlevel*sizeof(double));
     nlevo       = nlevel;  /* number of output levels for later use */
     gridsizeo   = gridsize;/* horizontal gridsize of output z coordinate */
     nrecs       = streamInqTimestep(streamID2, 0);
@@ -427,10 +427,10 @@ void *Intlevel3d(void *argument)
   /*
    * Create weights for later interpolation - assumption: input vertical correct is constant in time
    */
-  lev_idx1 = malloc(nlevo*gridSize*sizeof(int));
-  lev_idx2 = malloc(nlevo*gridSize*sizeof(int));
-  lev_wgt1 = malloc(nlevo*gridSize*sizeof(double));
-  lev_wgt2 = malloc(nlevo*gridSize*sizeof(double));
+  lev_idx1 = (int*) malloc(nlevo*gridSize*sizeof(int));
+  lev_idx2 = (int*) malloc(nlevo*gridSize*sizeof(int));
+  lev_wgt1 = (double*) malloc(nlevo*gridSize*sizeof(double));
+  lev_wgt2 = (double*) malloc(nlevo*gridSize*sizeof(double));
 
   gen_weights3d(expol, nlevi+2, gridSize, zlevels_in, nlevo, zlevels_out, lev_idx1, lev_idx2, lev_wgt1, lev_wgt2);
 
@@ -438,7 +438,7 @@ void *Intlevel3d(void *argument)
    * Copy z-axis information to output z-axis
    */
   zaxisID3 = zaxisCreate(zaxisInqType(zaxisID1), nlevo);
-  lev2 = malloc(nlevo*sizeof(double));
+  lev2 = (double*) malloc(nlevo*sizeof(double));
   /* fill values with its indices */
   for (i=0;i<nlevo;i++)
     lev2[i] = (double) i;
@@ -470,11 +470,11 @@ void *Intlevel3d(void *argument)
 
   maxlev   = nlevi > nlevo ? nlevi : nlevo;
   nvars     = vlistNvars(vlistID1);
-  vars      = malloc(nvars*sizeof(int));
-  vardata1  = malloc(nvars*sizeof(double*)); /* input                                         */
-  vardata2  = malloc(nvars*sizeof(double*)); /* output                                        */
-  varnmiss  = malloc(nvars*sizeof(int*));    /* can for missing values of arbitrary variables */
-  varinterp = malloc(nvars*sizeof(int));     /* marker for variables to be interpolated       */
+  vars      = (int*) malloc(nvars*sizeof(int));
+  vardata1  = (double**) malloc(nvars*sizeof(double*)); /* input                                         */
+  vardata2  = (double**) malloc(nvars*sizeof(double*)); /* output                                        */
+  varnmiss  = (int**) malloc(nvars*sizeof(int*));    /* can for missing values of arbitrary variables */
+  varinterp = (int*) malloc(nvars*sizeof(int));     /* marker for variables to be interpolated       */
 
   /* by default no variable should be interpolated */
   for (i = 0; i < nvars;i++)
@@ -489,7 +489,7 @@ void *Intlevel3d(void *argument)
 
       vlistInqVarName(vlistID1, varID, varname);
 
-      vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
+      vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
 
       /*  variabls for interpolation:
        *  * have the required vertical axis, i.e. the correct number of levels (nlevi)
@@ -500,8 +500,8 @@ void *Intlevel3d(void *argument)
         {
           nlonIn  = gridInqXsize(gridID);
           nlatIn  = gridInqYsize(gridID);
-          lonIn   = malloc(nlonIn*sizeof(double));
-          latIn   = malloc(nlatIn*sizeof(double));
+          lonIn   = (double*) malloc(nlonIn*sizeof(double));
+          latIn   = (double*) malloc(nlatIn*sizeof(double));
           gridInqXvals(gridID, lonIn);
           gridInqYvals(gridID, latIn);
 
@@ -512,14 +512,14 @@ void *Intlevel3d(void *argument)
             {
               varinterp[varID] = FALSE;
               vardata2[varID]  = vardata1[varID];
-              varnmiss[varID]  = malloc(nlevel*sizeof(int));
+              varnmiss[varID]  = (int*) malloc(nlevel*sizeof(int));
               if ( cdoVerbose ) cdoPrint("Ignore variable %s with %d levels\n",varname,nlevel);
             }
           else
             {
               varinterp[varID] = TRUE;
-              vardata2[varID]  = malloc(gridsize*nlevo*sizeof(double));
-              varnmiss[varID]  = malloc(maxlev*sizeof(int));
+              vardata2[varID]  = (double*) malloc(gridsize*nlevo*sizeof(double));
+              varnmiss[varID]  = (int*) malloc(maxlev*sizeof(int));
               memset(varnmiss[varID], 0, maxlev*sizeof(int));
             }
         }
@@ -527,7 +527,7 @@ void *Intlevel3d(void *argument)
         {
           varinterp[varID] = FALSE;
           vardata2[varID]  = vardata1[varID];
-          varnmiss[varID]  = malloc(nlevel*sizeof(int));
+          varnmiss[varID]  = (int*) malloc(nlevel*sizeof(int));
           if ( cdoVerbose ) cdoPrint("Ignore variable %s with %d levels\n",varname,nlevel);
         }
       }
diff --git a/src/Intntime.c b/src/Intntime.c
index 0837d9d..f8554b3 100644
--- a/src/Intntime.c
+++ b/src/Intntime.c
@@ -68,25 +68,25 @@ void *Intntime(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
-  nmiss1   = malloc(nvars*sizeof(int *));
-  nmiss2   = malloc(nvars*sizeof(int *));
-  vardata1 = malloc(nvars*sizeof(double *));
-  vardata2 = malloc(nvars*sizeof(double *));
+  nmiss1   = (int **) malloc(nvars*sizeof(int *));
+  nmiss2   = (int **) malloc(nvars*sizeof(int *));
+  vardata1 = (double **) malloc(nvars*sizeof(double *));
+  vardata2 = (double **) malloc(nvars*sizeof(double *));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      nmiss1[varID]   = malloc(nlevel*sizeof(int));
-      nmiss2[varID]   = malloc(nlevel*sizeof(int));
-      vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
-      vardata2[varID] = malloc(gridsize*nlevel*sizeof(double));
+      nmiss1[varID]   = (int*) malloc(nlevel*sizeof(int));
+      nmiss2[varID]   = (int*) malloc(nlevel*sizeof(int));
+      vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
+      vardata2[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   taxisID1 = vlistInqTaxis(vlistID1);
@@ -144,7 +144,7 @@ void *Intntime(void *argument)
 	{
 	  double seconds;
 	  seconds = it * juldate_to_seconds(juldate_sub(juldate2, juldate1)) / numts;
-	  juldate = juldate_add_seconds(NINT(seconds), juldate1);
+	  juldate = juldate_add_seconds(lround(seconds), juldate1);
 
 	  juldate_decode(calendar, juldate, &vdate, &vtime);
 
diff --git a/src/Inttime.c b/src/Inttime.c
index 8cf4472..62114e2 100644
--- a/src/Inttime.c
+++ b/src/Inttime.c
@@ -111,25 +111,25 @@ void *Inttime(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
-  nmiss1   = malloc(nvars*sizeof(int *));
-  nmiss2   = malloc(nvars*sizeof(int *));
-  vardata1 = malloc(nvars*sizeof(double *));
-  vardata2 = malloc(nvars*sizeof(double *));
+  nmiss1   = (int **) malloc(nvars*sizeof(int *));
+  nmiss2   = (int **) malloc(nvars*sizeof(int *));
+  vardata1 = (double **) malloc(nvars*sizeof(double *));
+  vardata2 = (double **) malloc(nvars*sizeof(double *));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      nmiss1[varID]   = malloc(nlevel*sizeof(int));
-      nmiss2[varID]   = malloc(nlevel*sizeof(int));
-      vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
-      vardata2[varID] = malloc(gridsize*nlevel*sizeof(double));
+      nmiss1[varID]   = (int*) malloc(nlevel*sizeof(int));
+      nmiss2[varID]   = (int*) malloc(nlevel*sizeof(int));
+      vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
+      vardata2[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   taxisID1 = vlistInqTaxis(vlistID1);
diff --git a/src/Intyear.c b/src/Intyear.c
index ea58b71..6069101 100644
--- a/src/Intyear.c
+++ b/src/Intyear.c
@@ -60,7 +60,7 @@ void *Intyear(void *argument)
 
   iyears = (int *) listArrayPtr(ilist);
 
-  streamIDs = malloc(nyears*sizeof(int));
+  streamIDs = (int*) malloc(nyears*sizeof(int));
 
   streamID1 = streamOpenRead(cdoStreamName(0));
   streamID2 = streamOpenRead(cdoStreamName(1));
@@ -72,9 +72,9 @@ void *Intyear(void *argument)
   vlistCompare(vlistID1, vlistID2, CMP_ALL);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
-  array3 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
+  array3 = (double*) malloc(gridsize*sizeof(double));
 
   taxisID1 = vlistInqTaxis(vlistID1);
   taxisID2 = vlistInqTaxis(vlistID2);
diff --git a/src/Invert.c b/src/Invert.c
index 6566cd2..7583309 100644
--- a/src/Invert.c
+++ b/src/Invert.c
@@ -66,8 +66,8 @@ void invertLonDes(int vlistID)
 	  else
             size = nlon;
 
-	  xv1 = malloc(size*sizeof(double));
-	  xv2 = malloc(size*sizeof(double));
+	  xv1 = (double*) malloc(size*sizeof(double));
+	  xv2 = (double*) malloc(size*sizeof(double));
 
 	  gridInqXvals(gridID1, xv1);
 
@@ -101,8 +101,8 @@ void invertLonDes(int vlistID)
 	  else
             size = nv*nlon;
 
-	  xb1 = malloc(size*sizeof(double));
-	  xb2 = malloc(size*sizeof(double));
+	  xb1 = (double*) malloc(size*sizeof(double));
+	  xb2 = (double*) malloc(size*sizeof(double));
 
 	  gridInqXbounds(gridID1, xb1);
 
@@ -165,8 +165,8 @@ void invertLatDes(int vlistID)
 	  else
             size = nlat;
 
-	  yv1 = malloc(size*sizeof(double));
-	  yv2 = malloc(size*sizeof(double));
+	  yv1 = (double*) malloc(size*sizeof(double));
+	  yv2 = (double*) malloc(size*sizeof(double));
 
 
 	  if ( gridtype == GRID_CURVILINEAR )
@@ -213,8 +213,8 @@ void invertLatDes(int vlistID)
 	  else
             size = nv*nlat;
 
-	  yb1 = malloc(size*sizeof(double));
-	  yb2 = malloc(size*sizeof(double));
+	  yb1 = (double*) malloc(size*sizeof(double));
+	  yb2 = (double*) malloc(size*sizeof(double));
 
 	  gridInqYbounds(gridID1, yb1);
 
@@ -256,8 +256,8 @@ void invertLonData(double *array1, double *array2, int gridID1)
 
   if ( nlat > 0 )
     {
-      field1 = malloc(nlat*sizeof(double *));
-      field2 = malloc(nlat*sizeof(double *));
+      field1 = (double **) malloc(nlat*sizeof(double *));
+      field2 = (double **) malloc(nlat*sizeof(double *));
   
       for ( ilat = 0; ilat < nlat; ilat++ )
 	{
@@ -290,8 +290,8 @@ void invertLatData(double *array1, double *array2, int gridID1)
 
   if ( nlat > 0 )
     {
-      field1 = malloc(nlat*sizeof(double *));
-      field2 = malloc(nlat*sizeof(double *));
+      field1 = (double **) malloc(nlat*sizeof(double *));
+      field2 = (double **) malloc(nlat*sizeof(double *));
   
       for ( ilat = 0; ilat < nlat; ilat++ )
 	{
@@ -366,8 +366,8 @@ void *Invert(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Invertlev.c b/src/Invertlev.c
index 3dacd13..ea5713c 100644
--- a/src/Invertlev.c
+++ b/src/Invertlev.c
@@ -55,8 +55,8 @@ void invertLevDes(int vlistID)
       /* if ( zaxisInqLevels(zaxisID1, NULL) ) */
 	{
 
-	  yv1 = malloc(nlev*sizeof(double));
-	  yv2 = malloc(nlev*sizeof(double));
+	  yv1 = (double*) malloc(nlev*sizeof(double));
+	  yv2 = (double*) malloc(nlev*sizeof(double));
 
 	  zaxisInqLevels(zaxisID1, yv1);
 	  for ( ilev = 0; ilev < nlev; ++ilev ) yv2[nlev-ilev-1] = yv1[ilev];
@@ -68,8 +68,8 @@ void invertLevDes(int vlistID)
 
       if ( zaxisInqLbounds(zaxisID1, NULL) && zaxisInqUbounds(zaxisID1, NULL) )
 	{
-	  yb1 = malloc(nlev*sizeof(double));
-	  yb2 = malloc(nlev*sizeof(double));
+	  yb1 = (double*) malloc(nlev*sizeof(double));
+	  yb2 = (double*) malloc(nlev*sizeof(double));
 
 	  zaxisInqLbounds(zaxisID1, yb1);
 	  for ( ilev = 0; ilev < nlev; ++ilev ) yb2[nlev-ilev-1] = yb1[ilev];
@@ -137,12 +137,12 @@ void *Invertlev(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   nvars = vlistNvars(vlistID1);
 
-  vardata  = malloc(nvars*sizeof(double*));
-  varnmiss = malloc(nvars*sizeof(int*));
+  vardata  = (double**) malloc(nvars*sizeof(double*));
+  varnmiss = (int**) malloc(nvars*sizeof(int*));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
@@ -160,8 +160,8 @@ void *Invertlev(void *argument)
       else
 	{
 	  linvert = TRUE;
-	  vardata[varID]  = malloc(gridsize*nlev*sizeof(double));
-	  varnmiss[varID] = malloc(nlev*sizeof(int));
+	  vardata[varID]  = (double*) malloc(gridsize*nlev*sizeof(double));
+	  varnmiss[varID] = (int*) malloc(nlev*sizeof(int));
 	}
     }
 
diff --git a/src/Isosurface.c b/src/Isosurface.c
index ef81b0d..0297511 100644
--- a/src/Isosurface.c
+++ b/src/Isosurface.c
@@ -135,7 +135,7 @@ void *Isosurface(void *argument)
   if ( i == nzaxis ) cdoAbort("No processable variable found!");
 
   nlev1 = nlevel;
-  lev1  = malloc((nlev1)*sizeof(double));
+  lev1  = (double*) malloc((nlev1)*sizeof(double));
   zaxisInqLevels(zaxisID1, lev1);
 
   zaxisIDsfc = zaxisCreate(ZAXIS_SURFACE, 1);
@@ -150,13 +150,13 @@ void *Isosurface(void *argument)
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   nvars = vlistNvars(vlistID1);
 
-  liso  =     malloc(nvars*sizeof(int));
-  vars  =     malloc(nvars*sizeof(int));
-  vars1 = malloc(nvars*sizeof(field_t));
+  liso  = (int*)     malloc(nvars*sizeof(int));
+  vars  = (int*)     malloc(nvars*sizeof(int));
+  vars1 = (field_t*) malloc(nvars*sizeof(field_t));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
@@ -176,7 +176,7 @@ void *Isosurface(void *argument)
       vars1[varID].zaxis   = zaxisID;
       vars1[varID].nmiss   = 0;
       vars1[varID].missval = missval;
-      vars1[varID].ptr     = malloc(gridsize*nlevel*sizeof(double));
+      vars1[varID].ptr     = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Maggraph.c b/src/Maggraph.c
index 8a8ff7d..cb732a5 100644
--- a/src/Maggraph.c
+++ b/src/Maggraph.c
@@ -256,20 +256,20 @@ void maggraph(const char *plotfile, const char *varname,const char *varunits, lo
   if ( stat == TRUE )
     {
 	/* if all files are of same number of steps, only one date_time_str array is being used */
-        date_time_str[0] = malloc( ntime_steps*sizeof(char *) ); 
+        date_time_str[0] = (char **) malloc( ntime_steps*sizeof(char *)); 
 	
-	date_time   = malloc( ntime_steps*sizeof(double) );
-	mean_val    = malloc( ntime_steps*sizeof(double) );
-	std_dev_val = malloc( ntime_steps*sizeof(double) );
-	spread_min  = malloc( ntime_steps*sizeof(double) );
-	spread_max  = malloc( ntime_steps*sizeof(double) );
+	date_time   = (double*) malloc( ntime_steps*sizeof(double));
+	mean_val    = (double*) malloc( ntime_steps*sizeof(double));
+	std_dev_val = (double*) malloc( ntime_steps*sizeof(double));
+	spread_min  = (double*) malloc( ntime_steps*sizeof(double));
+	spread_max  = (double*) malloc( ntime_steps*sizeof(double));
 	
 	for ( tsID = 0; tsID < ntime_steps; ++tsID )
 	  {
 	    date_time[tsID] = tsID+1;
 	    date2str(vdate[0][tsID], vdatestr, sizeof(vdatestr));
 	    time2str(vtime[0][tsID], vtimestr, sizeof(vtimestr));
-	    date_time_str[0][tsID] = malloc(256);
+	    date_time_str[0][tsID] = (char*) malloc(256);
 	    sprintf(date_time_str[0][tsID], "%s %s", vdatestr, vtimestr);
 	    mean_val[tsID] = 0.;
 	    std_dev_val[tsID] = 0.;
@@ -358,8 +358,8 @@ void maggraph(const char *plotfile, const char *varname,const char *varunits, lo
 	{
 	  if ( DBG )
 	    fprintf(stderr,"FILE  %ld\n", fileID );
-	  date_time             = malloc( nts[fileID]*sizeof(double) );
-	  date_time_str[fileID] = malloc( nts[fileID]*sizeof(char *) );
+	  date_time             = (double*) malloc( nts[fileID]*sizeof(double));
+	  date_time_str[fileID] = (char **) malloc( nts[fileID]*sizeof(char *));
 	  
 	  for ( tsID = 0; tsID <  nts[fileID]; ++tsID )
 	    {
@@ -367,7 +367,7 @@ void maggraph(const char *plotfile, const char *varname,const char *varunits, lo
 	      date2str(vdate[fileID][tsID], vdatestr, sizeof(vdatestr));
 	      time2str(vtime[fileID][tsID], vtimestr, sizeof(vtimestr));
 	      
-	      date_time_str[fileID][tsID] = malloc(256);
+	      date_time_str[fileID][tsID] = (char*) malloc(256);
 	      sprintf(date_time_str[fileID][tsID], "%s %s", vdatestr, vtimestr);
 	      if ( DBG )
 		fprintf( stderr,"%s %s %s\n", vdatestr, vtimestr, date_time_str[fileID][tsID] );
@@ -668,7 +668,7 @@ void maggraph(const char *plotfile, const char *varname,const char *varunits, lo
     }
   
   
-  lines[0] = malloc(1024);
+  lines[0] = (char*) malloc(1024);
   /* To be obtained from Meta Data */
   /*sprintf( lines[0],"%s","ExpID : " );*/ 
   /*sprintf( lines[0],"%sxxxx  Variable : %s[%s]",lines[0], varname, varunits );*/
@@ -824,10 +824,10 @@ void *Maggraph(void *argument)
        fprintf( stderr," files %s\n",ofilename );
     }
 	
-  datatab = malloc(nfiles*sizeof(double *));
-  vdate   = malloc(nfiles*sizeof(int *));
-  vtime   = malloc(nfiles*sizeof(int *));
-  nts     = malloc(nfiles*sizeof(long));
+  datatab = (double **) malloc(nfiles*sizeof(double *));
+  vdate   = (int **) malloc(nfiles*sizeof(int *));
+  vtime   = (int **) malloc(nfiles*sizeof(int *));
+  nts     = (long*) malloc(nfiles*sizeof(long));
   
   for ( fileID = 0; fileID < nfiles; fileID++ )
     {
@@ -876,9 +876,9 @@ void *Maggraph(void *argument)
 	  if ( tsID == 0 )
 	    {
 	      nts_alloc += NINC_ALLOC;
-	      datatab[ fileID ] = malloc( nts_alloc*sizeof(double) );
-	      vdate[ fileID ]   = malloc(  nts_alloc*sizeof(int) );
-	      vtime[ fileID ]   = malloc(  nts_alloc*sizeof(int) );
+	      datatab[ fileID ] = (double*) malloc( nts_alloc*sizeof(double));
+	      vdate[ fileID ]   = (int*) malloc(  nts_alloc*sizeof(int));
+	      vtime[ fileID ]   = (int*) malloc(  nts_alloc*sizeof(int));
 	    }
 		
 	  nts[ fileID ]++;
@@ -886,9 +886,9 @@ void *Maggraph(void *argument)
 	  if ( nts[ fileID ] > nts_alloc )
 	    {
 	      nts_alloc += NINC_ALLOC;
-	      datatab[ fileID ] = realloc(datatab[fileID], nts_alloc*sizeof(double));
-	      vdate[ fileID ]   = realloc(vdate[fileID], nts_alloc*sizeof(int));
-	      vtime[ fileID ]   = realloc(vtime[fileID], nts_alloc*sizeof(int));
+	      datatab[ fileID ] = (double*) realloc(datatab[fileID], nts_alloc*sizeof(double));
+	      vdate[ fileID ]   = (int*) realloc(vdate[fileID], nts_alloc*sizeof(int));
+	      vtime[ fileID ]   = (int*) realloc(vtime[fileID], nts_alloc*sizeof(int));
 	    }
 	  
 	  streamInqRecord( streamID, &varID, &levelID );
diff --git a/src/Magplot.c b/src/Magplot.c
index 9875333..b6562ef 100644
--- a/src/Magplot.c
+++ b/src/Magplot.c
@@ -549,9 +549,9 @@ void *Magplot(void *argument)
   nlat     = gridInqYsize(gridID);
   nlev     = zaxisInqSize(zaxisID);
 
-  array           = malloc(gridsize*sizeof(double));
-  grid_center_lat = malloc(gridsize*sizeof(double));
-  grid_center_lon = malloc(gridsize*sizeof(double));
+  array           = (double*) malloc(gridsize*sizeof(double));
+  grid_center_lat = (double*) malloc(gridsize*sizeof(double));
+  grid_center_lon = (double*) malloc(gridsize*sizeof(double));
 
   gridInqYvals(gridID, grid_center_lat);
   gridInqXvals(gridID, grid_center_lon);
@@ -931,7 +931,7 @@ void VerifyPlotParameters( int num_param, char **param_names, int opID )
 			  if( syntax == TRUE )
 			    {
 	                       NUM_LEVELS = split_str_count;
-	                       LEV_LIST = malloc( sizeof( double ) * split_str_count );
+	                       LEV_LIST = (double*) malloc( sizeof( double ) * split_str_count );
 			       for( k = 0; k < split_str_count; k++ )
 		                 {
 		                    LEV_LIST[k] = atof( split_str1[k] );
@@ -1096,12 +1096,12 @@ int ReadColourTable ( char *filepath )
       }
     
     USR_COLOUR_COUNT = 0;
-    USR_COLOUR_TABLE = malloc ( num_colors * sizeof( char * ) );
-    temp_table  = malloc ( num_colors * sizeof( char * ) );
+    USR_COLOUR_TABLE = ( char **) malloc( num_colors * sizeof( char* ));
+    temp_table  = ( char **) malloc( num_colors * sizeof( char* ));
     
     for( i =0; i < num_colors; i++ )
       {
-         temp_table[i] = malloc (  256 * sizeof( char ) );
+         temp_table[i] = ( char *) malloc(  256 * sizeof( char ));
 	 fscanf( fp, "%s", temp_table[i] );
 	 if( DBG )
 	   fprintf( stdout, "%s\n", temp_table[i] );
diff --git a/src/Magvector.c b/src/Magvector.c
index 1395ec0..a61d832 100644
--- a/src/Magvector.c
+++ b/src/Magvector.c
@@ -291,10 +291,10 @@ void *Magvector(void *argument)
   nlat     = gridInqYsize(gridID);
   nlev     = zaxisInqSize(zaxisID);
 
-  uarray          = malloc(gridsize*sizeof(double));
-  varray          = malloc(gridsize*sizeof(double));
-  grid_center_lat = malloc(gridsize*sizeof(double));
-  grid_center_lon = malloc(gridsize*sizeof(double));
+  uarray          = (double*) malloc(gridsize*sizeof(double));
+  varray          = (double*) malloc(gridsize*sizeof(double));
+  grid_center_lat = (double*) malloc(gridsize*sizeof(double));
+  grid_center_lon = (double*) malloc(gridsize*sizeof(double));
 
   gridInqYvals(gridID, grid_center_lat);
   gridInqXvals(gridID, grid_center_lon);
diff --git a/src/Makefile.am b/src/Makefile.am
index b627bec..c0a88e1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -183,10 +183,12 @@ cdo_SOURCES += Adisit.c        \
                cdo_int.h       \
                cdo_pthread.c   \
                cdo_vlist.c     \
+               cdo_getopt.c    \
+               cdo_getopt.h    \
                color.c         \
                color.h         \
                commandline.c   \
-               const.h       \
+               const.h         \
                counter.h       \
                dmemory.h       \
                dtypes.h        \
@@ -270,7 +272,15 @@ cdo_SOURCES += Adisit.c        \
                remaplib.c      \
                remapsort.c     \
                remap_scrip_io.c \
+               remap_search_reg2d.c \
                remap_search_latbins.c \
+               remap_store_link.c \
+               remap_store_link.h \
+               remap_conserv.c \
+               remap_conserv_scrip.c \
+               remap_distwgt_scrip.c \
+               remap_bicubic_scrip.c \
+               remap_bilinear_scrip.c \
                stdnametable.c  \
                stdnametable.h  \
                specspace.c     \
@@ -278,6 +288,8 @@ cdo_SOURCES += Adisit.c        \
                statistic.c     \
                statistic.h     \
                table.c         \
+               text.c          \
+               text.h          \
                timebase.h      \
                timer.c         \
                userlog.c       \
@@ -338,9 +350,9 @@ if ENABLE_ALL_STATIC
 cdotest_LDFLAGS  += -all-static
 endif
 
-cdo-userlog.o: userlog.c config.h
-	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
-cdo_static-userlog.o: userlog.c config.h
-	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo_static-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
+#cdo-userlog.o: userlog.c config.h
+#	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
+#cdo_static-userlog.o: userlog.c config.h
+#	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo_static-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
 #
 CLEANFILES  = `ls *~ 2> /dev/null`
diff --git a/src/Makefile.in b/src/Makefile.in
index 70e7a09..a3d039d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -16,23 +15,51 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -70,8 +97,9 @@ bin_PROGRAMS = cdo$(EXEEXT)
 noinst_PROGRAMS = cdotest$(EXEEXT)
 @ENABLE_ALL_STATIC_TRUE at am__append_3 = -all-static
 subdir = src
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/config.h.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/config.h.in $(top_srcdir)/config/mkinstalldirs \
+	$(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -118,26 +146,29 @@ am__cdo_SOURCES_DIST = cdo.c Adisit.c Arith.c Arithc.c Arithdays.c \
 	YAR.c Yearmonstat.c Ydayarith.c Ydaypctl.c Ydaystat.c \
 	Ydrunpctl.c Ydrunstat.c Yhourarith.c Yhourstat.c Ymonarith.c \
 	Ymonpctl.c Ymonstat.c Yseaspctl.c Yseasstat.c Zonstat.c cdo.h \
-	cdo_int.h cdo_pthread.c cdo_vlist.c color.c color.h \
-	commandline.c const.h counter.h dmemory.h dtypes.h ecacore.c \
-	ecacore.h ecautil.c ecautil.h error.h etopo.h temp.h mask.h \
-	exception.c expr.c expr.h expr_lex.c expr_yacc.c expr_yacc.h \
-	features.c field.c field.h field2.c fieldc.c fieldmem.c \
-	fieldmer.c fieldzon.c fouriertrans.c functs.h gradsdeslib.c \
-	gradsdeslib.h grid.c grid.h grid_area.c grid_gme.c grid_lcc.c \
-	grid_rot.c gridreference.c griddes.c griddes.h griddes_h5.c \
-	griddes_nc.c hetaeta.c hetaeta.h history.c institution.c \
-	interpol.c interpol.h job.c juldate.c kvlist.c kvlist.h \
-	legendre.c list.c list.h merge_sort2.c merge_sort2.h modules.c \
-	modules.h namelist.c namelist.h normal.c nth_element.c \
-	nth_element.h operator_help.h par_io.c par_io.h percentiles.c \
-	percentiles.h pipe.c pipe.h printinfo.h process.c process.h \
-	pstream.c pstream.h pstream_int.h pthread_debug.c \
-	pthread_debug.h readline.c realtime.c remap.h remaplib.c \
-	remapsort.c remap_scrip_io.c remap_search_latbins.c \
-	stdnametable.c stdnametable.h specspace.c specspace.h \
-	statistic.c statistic.h table.c timebase.h timer.c userlog.c \
-	util.c util.h vinterp.c vinterp.h zaxis.c clipping/clipping.c \
+	cdo_int.h cdo_pthread.c cdo_vlist.c cdo_getopt.c cdo_getopt.h \
+	color.c color.h commandline.c const.h counter.h dmemory.h \
+	dtypes.h ecacore.c ecacore.h ecautil.c ecautil.h error.h \
+	etopo.h temp.h mask.h exception.c expr.c expr.h expr_lex.c \
+	expr_yacc.c expr_yacc.h features.c field.c field.h field2.c \
+	fieldc.c fieldmem.c fieldmer.c fieldzon.c fouriertrans.c \
+	functs.h gradsdeslib.c gradsdeslib.h grid.c grid.h grid_area.c \
+	grid_gme.c grid_lcc.c grid_rot.c gridreference.c griddes.c \
+	griddes.h griddes_h5.c griddes_nc.c hetaeta.c hetaeta.h \
+	history.c institution.c interpol.c interpol.h job.c juldate.c \
+	kvlist.c kvlist.h legendre.c list.c list.h merge_sort2.c \
+	merge_sort2.h modules.c modules.h namelist.c namelist.h \
+	normal.c nth_element.c nth_element.h operator_help.h par_io.c \
+	par_io.h percentiles.c percentiles.h pipe.c pipe.h printinfo.h \
+	process.c process.h pstream.c pstream.h pstream_int.h \
+	pthread_debug.c pthread_debug.h readline.c realtime.c remap.h \
+	remaplib.c remapsort.c remap_scrip_io.c remap_search_reg2d.c \
+	remap_search_latbins.c remap_store_link.c remap_store_link.h \
+	remap_conserv.c remap_conserv_scrip.c remap_distwgt_scrip.c \
+	remap_bicubic_scrip.c remap_bilinear_scrip.c stdnametable.c \
+	stdnametable.h specspace.c specspace.h statistic.c statistic.h \
+	table.c text.c text.h timebase.h timer.c userlog.c util.c \
+	util.h vinterp.c vinterp.h zaxis.c clipping/clipping.c \
 	clipping/clipping.h clipping/area.c clipping/area.h \
 	clipping/ensure_array_size.c clipping/ensure_array_size.h \
 	clipping/geometry_tools.c clipping/geometry.h clipping/grid.h \
@@ -238,12 +269,13 @@ am_cdo_OBJECTS = cdo-cdo.$(OBJEXT) cdo-Adisit.$(OBJEXT) \
 	cdo-Ymonpctl.$(OBJEXT) cdo-Ymonstat.$(OBJEXT) \
 	cdo-Yseaspctl.$(OBJEXT) cdo-Yseasstat.$(OBJEXT) \
 	cdo-Zonstat.$(OBJEXT) cdo-cdo_pthread.$(OBJEXT) \
-	cdo-cdo_vlist.$(OBJEXT) cdo-color.$(OBJEXT) \
-	cdo-commandline.$(OBJEXT) cdo-ecacore.$(OBJEXT) \
-	cdo-ecautil.$(OBJEXT) cdo-exception.$(OBJEXT) \
-	cdo-expr.$(OBJEXT) cdo-expr_lex.$(OBJEXT) \
-	cdo-expr_yacc.$(OBJEXT) cdo-features.$(OBJEXT) \
-	cdo-field.$(OBJEXT) cdo-field2.$(OBJEXT) cdo-fieldc.$(OBJEXT) \
+	cdo-cdo_vlist.$(OBJEXT) cdo-cdo_getopt.$(OBJEXT) \
+	cdo-color.$(OBJEXT) cdo-commandline.$(OBJEXT) \
+	cdo-ecacore.$(OBJEXT) cdo-ecautil.$(OBJEXT) \
+	cdo-exception.$(OBJEXT) cdo-expr.$(OBJEXT) \
+	cdo-expr_lex.$(OBJEXT) cdo-expr_yacc.$(OBJEXT) \
+	cdo-features.$(OBJEXT) cdo-field.$(OBJEXT) \
+	cdo-field2.$(OBJEXT) cdo-fieldc.$(OBJEXT) \
 	cdo-fieldmem.$(OBJEXT) cdo-fieldmer.$(OBJEXT) \
 	cdo-fieldzon.$(OBJEXT) cdo-fouriertrans.$(OBJEXT) \
 	cdo-gradsdeslib.$(OBJEXT) cdo-grid.$(OBJEXT) \
@@ -263,38 +295,69 @@ am_cdo_OBJECTS = cdo-cdo.$(OBJEXT) cdo-Adisit.$(OBJEXT) \
 	cdo-pthread_debug.$(OBJEXT) cdo-readline.$(OBJEXT) \
 	cdo-realtime.$(OBJEXT) cdo-remaplib.$(OBJEXT) \
 	cdo-remapsort.$(OBJEXT) cdo-remap_scrip_io.$(OBJEXT) \
-	cdo-remap_search_latbins.$(OBJEXT) cdo-stdnametable.$(OBJEXT) \
+	cdo-remap_search_reg2d.$(OBJEXT) \
+	cdo-remap_search_latbins.$(OBJEXT) \
+	cdo-remap_store_link.$(OBJEXT) cdo-remap_conserv.$(OBJEXT) \
+	cdo-remap_conserv_scrip.$(OBJEXT) \
+	cdo-remap_distwgt_scrip.$(OBJEXT) \
+	cdo-remap_bicubic_scrip.$(OBJEXT) \
+	cdo-remap_bilinear_scrip.$(OBJEXT) cdo-stdnametable.$(OBJEXT) \
 	cdo-specspace.$(OBJEXT) cdo-statistic.$(OBJEXT) \
-	cdo-table.$(OBJEXT) cdo-timer.$(OBJEXT) cdo-userlog.$(OBJEXT) \
-	cdo-util.$(OBJEXT) cdo-vinterp.$(OBJEXT) cdo-zaxis.$(OBJEXT) \
-	cdo-clipping.$(OBJEXT) cdo-area.$(OBJEXT) \
+	cdo-table.$(OBJEXT) cdo-text.$(OBJEXT) cdo-timer.$(OBJEXT) \
+	cdo-userlog.$(OBJEXT) cdo-util.$(OBJEXT) cdo-vinterp.$(OBJEXT) \
+	cdo-zaxis.$(OBJEXT) cdo-clipping.$(OBJEXT) cdo-area.$(OBJEXT) \
 	cdo-ensure_array_size.$(OBJEXT) cdo-geometry_tools.$(OBJEXT) \
 	cdo-grid_cell.$(OBJEXT) cdo-intersection.$(OBJEXT) \
 	cdo-utils.$(OBJEXT) $(am__objects_1)
 cdo_OBJECTS = $(am_cdo_OBJECTS)
 cdo_DEPENDENCIES = $(top_builddir)/libcdi/src/libcdi.la
-cdo_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cdo_LDFLAGS) \
-	$(LDFLAGS) -o $@
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+cdo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(cdo_LDFLAGS) $(LDFLAGS) -o $@
 am_cdotest_OBJECTS = cdotest-cdotest.$(OBJEXT)
 cdotest_OBJECTS = $(am_cdotest_OBJECTS)
 cdotest_DEPENDENCIES = $(cdo_LDADD)
-cdotest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cdotest_LDFLAGS) \
-	$(LDFLAGS) -o $@
+cdotest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(cdotest_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = -I. at am__isrc@
 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(cdo_SOURCES) $(cdotest_SOURCES)
 DIST_SOURCES = $(am__cdo_SOURCES_DIST) $(cdotest_SOURCES)
 am__can_run_installinfo = \
@@ -302,11 +365,31 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+	$(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -342,6 +425,7 @@ ENABLE_DATA = @ENABLE_DATA@
 ENABLE_EXTRA = @ENABLE_EXTRA@
 ENABLE_GRIB = @ENABLE_GRIB@
 ENABLE_IEG = @ENABLE_IEG@
+ENABLE_NETCDF = @ENABLE_NETCDF@
 ENABLE_SERVICE = @ENABLE_SERVICE@
 EXEEXT = @EXEEXT@
 FCFLAGS = @FCFLAGS@
@@ -353,7 +437,6 @@ HDF5_INCLUDE = @HDF5_INCLUDE@
 HDF5_LIBS = @HDF5_LIBS@
 HDF5_ROOT = @HDF5_ROOT@
 HOST_NAME = @HOST_NAME@
-INCLUDES = @INCLUDES@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -373,6 +456,7 @@ MAGICS_LIBS = @MAGICS_LIBS@
 MAGICS_ROOT = @MAGICS_ROOT@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NC_CONFIG = @NC_CONFIG@
 NETCDF_INCLUDE = @NETCDF_INCLUDE@
@@ -382,6 +466,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -418,6 +503,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
@@ -501,32 +587,35 @@ cdo_SOURCES = cdo.c Adisit.c Arith.c Arithc.c Arithdays.c Arithlat.c \
 	Ydaypctl.c Ydaystat.c Ydrunpctl.c Ydrunstat.c Yhourarith.c \
 	Yhourstat.c Ymonarith.c Ymonpctl.c Ymonstat.c Yseaspctl.c \
 	Yseasstat.c Zonstat.c cdo.h cdo_int.h cdo_pthread.c \
-	cdo_vlist.c color.c color.h commandline.c const.h counter.h \
-	dmemory.h dtypes.h ecacore.c ecacore.h ecautil.c ecautil.h \
-	error.h etopo.h temp.h mask.h exception.c expr.c expr.h \
-	expr_lex.c expr_yacc.c expr_yacc.h features.c field.c field.h \
-	field2.c fieldc.c fieldmem.c fieldmer.c fieldzon.c \
-	fouriertrans.c functs.h gradsdeslib.c gradsdeslib.h grid.c \
-	grid.h grid_area.c grid_gme.c grid_lcc.c grid_rot.c \
-	gridreference.c griddes.c griddes.h griddes_h5.c griddes_nc.c \
-	hetaeta.c hetaeta.h history.c institution.c interpol.c \
-	interpol.h job.c juldate.c kvlist.c kvlist.h legendre.c list.c \
-	list.h merge_sort2.c merge_sort2.h modules.c modules.h \
-	namelist.c namelist.h normal.c nth_element.c nth_element.h \
-	operator_help.h par_io.c par_io.h percentiles.c percentiles.h \
-	pipe.c pipe.h printinfo.h process.c process.h pstream.c \
-	pstream.h pstream_int.h pthread_debug.c pthread_debug.h \
-	readline.c realtime.c remap.h remaplib.c remapsort.c \
-	remap_scrip_io.c remap_search_latbins.c stdnametable.c \
+	cdo_vlist.c cdo_getopt.c cdo_getopt.h color.c color.h \
+	commandline.c const.h counter.h dmemory.h dtypes.h ecacore.c \
+	ecacore.h ecautil.c ecautil.h error.h etopo.h temp.h mask.h \
+	exception.c expr.c expr.h expr_lex.c expr_yacc.c expr_yacc.h \
+	features.c field.c field.h field2.c fieldc.c fieldmem.c \
+	fieldmer.c fieldzon.c fouriertrans.c functs.h gradsdeslib.c \
+	gradsdeslib.h grid.c grid.h grid_area.c grid_gme.c grid_lcc.c \
+	grid_rot.c gridreference.c griddes.c griddes.h griddes_h5.c \
+	griddes_nc.c hetaeta.c hetaeta.h history.c institution.c \
+	interpol.c interpol.h job.c juldate.c kvlist.c kvlist.h \
+	legendre.c list.c list.h merge_sort2.c merge_sort2.h modules.c \
+	modules.h namelist.c namelist.h normal.c nth_element.c \
+	nth_element.h operator_help.h par_io.c par_io.h percentiles.c \
+	percentiles.h pipe.c pipe.h printinfo.h process.c process.h \
+	pstream.c pstream.h pstream_int.h pthread_debug.c \
+	pthread_debug.h readline.c realtime.c remap.h remaplib.c \
+	remapsort.c remap_scrip_io.c remap_search_reg2d.c \
+	remap_search_latbins.c remap_store_link.c remap_store_link.h \
+	remap_conserv.c remap_conserv_scrip.c remap_distwgt_scrip.c \
+	remap_bicubic_scrip.c remap_bilinear_scrip.c stdnametable.c \
 	stdnametable.h specspace.c specspace.h statistic.c statistic.h \
-	table.c timebase.h timer.c userlog.c util.c util.h vinterp.c \
-	vinterp.h zaxis.c clipping/clipping.c clipping/clipping.h \
-	clipping/area.c clipping/area.h clipping/ensure_array_size.c \
-	clipping/ensure_array_size.h clipping/geometry_tools.c \
-	clipping/geometry.h clipping/grid.h clipping/points.h \
-	clipping/dep_list.h clipping/grid_cell.c clipping/grid_cell.h \
-	clipping/intersection.c clipping/utils.c clipping/utils.h \
-	$(am__append_1)
+	table.c text.c text.h timebase.h timer.c userlog.c util.c \
+	util.h vinterp.c vinterp.h zaxis.c clipping/clipping.c \
+	clipping/clipping.h clipping/area.c clipping/area.h \
+	clipping/ensure_array_size.c clipping/ensure_array_size.h \
+	clipping/geometry_tools.c clipping/geometry.h clipping/grid.h \
+	clipping/points.h clipping/dep_list.h clipping/grid_cell.c \
+	clipping/grid_cell.h clipping/intersection.c clipping/utils.c \
+	clipping/utils.h $(am__append_1)
 cdo_CPPFLAGS = -I$(top_srcdir)/libcdi/src
 cdo_LDADD = $(top_builddir)/libcdi/src/libcdi.la
 cdo_LDFLAGS = $(am__append_2)
@@ -536,6 +625,11 @@ cdotest_SOURCES = cdo_int.h	\
 cdotest_LDADD = $(cdo_LDADD)
 cdotest_CPPFLAGS = $(cdo_CPPFLAGS)
 cdotest_LDFLAGS = $(cdo_LDFLAGS) $(am__append_3)
+
+#cdo-userlog.o: userlog.c config.h
+#	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
+#cdo_static-userlog.o: userlog.c config.h
+#	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo_static-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
 #
 CLEANFILES = `ls *~ 2> /dev/null`
 all: config.h
@@ -552,9 +646,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu src/Makefile
+	  $(AUTOMAKE) --foreign src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -575,8 +669,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-	@if test ! -f $@; then rm -f stamp-h1; else :; fi
-	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+	@test -f $@ || rm -f stamp-h1
+	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
@@ -597,10 +691,12 @@ install-binPROGRAMS: $(bin_PROGRAMS)
 	fi; \
 	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; \
+	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|.*|.|' \
+	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 } \
@@ -621,7 +717,8 @@ uninstall-binPROGRAMS:
 	@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)/' `; \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
 	test -n "$$list" || exit 0; \
 	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
 	cd "$(DESTDIR)$(bindir)" && rm -f $$files
@@ -643,12 +740,14 @@ clean-noinstPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
+
 cdo$(EXEEXT): $(cdo_OBJECTS) $(cdo_DEPENDENCIES) $(EXTRA_cdo_DEPENDENCIES) 
 	@rm -f cdo$(EXEEXT)
-	$(cdo_LINK) $(cdo_OBJECTS) $(cdo_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(cdo_LINK) $(cdo_OBJECTS) $(cdo_LDADD) $(LIBS)
+
 cdotest$(EXEEXT): $(cdotest_OBJECTS) $(cdotest_DEPENDENCIES) $(EXTRA_cdotest_DEPENDENCIES) 
 	@rm -f cdotest$(EXEEXT)
-	$(cdotest_LINK) $(cdotest_OBJECTS) $(cdotest_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(cdotest_LINK) $(cdotest_OBJECTS) $(cdotest_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -839,6 +938,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-Zonstat.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-area.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-cdo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-cdo_getopt.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-cdo_pthread.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-cdo_vlist.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-clipping.Po at am__quote@
@@ -895,8 +995,15 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-pthread_debug.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-readline.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-realtime.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_bicubic_scrip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_bilinear_scrip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_conserv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_conserv_scrip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_distwgt_scrip.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_scrip_io.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_search_latbins.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_search_reg2d.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remap_store_link.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remaplib.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-remapsort.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-results_template_parser.Po at am__quote@
@@ -905,6 +1012,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-stdnametable.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-table.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-template_parser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-text.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-timer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-userlog.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdo-util.Po at am__quote@
@@ -914,3602 +1022,3735 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdotest-cdotest.Po at am__quote@
 
 .c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ 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 AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 cdo-cdo.o: cdo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo.o -MD -MP -MF $(DEPDIR)/cdo-cdo.Tpo -c -o cdo-cdo.o `test -f 'cdo.c' || echo '$(srcdir)/'`cdo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-cdo.Tpo $(DEPDIR)/cdo-cdo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdo.c' object='cdo-cdo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo.o -MD -MP -MF $(DEPDIR)/cdo-cdo.Tpo -c -o cdo-cdo.o `test -f 'cdo.c' || echo '$(srcdir)/'`cdo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo.Tpo $(DEPDIR)/cdo-cdo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo.c' object='cdo-cdo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo.o `test -f 'cdo.c' || echo '$(srcdir)/'`cdo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo.o `test -f 'cdo.c' || echo '$(srcdir)/'`cdo.c
 
 cdo-cdo.obj: cdo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo.obj -MD -MP -MF $(DEPDIR)/cdo-cdo.Tpo -c -o cdo-cdo.obj `if test -f 'cdo.c'; then $(CYGPATH_W) 'cdo.c'; else $(CYGPATH_W) '$(srcdir)/cdo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-cdo.Tpo $(DEPDIR)/cdo-cdo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdo.c' object='cdo-cdo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo.obj -MD -MP -MF $(DEPDIR)/cdo-cdo.Tpo -c -o cdo-cdo.obj `if test -f 'cdo.c'; then $(CYGPATH_W) 'cdo.c'; else $(CYGPATH_W) '$(srcdir)/cdo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo.Tpo $(DEPDIR)/cdo-cdo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo.c' object='cdo-cdo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo.obj `if test -f 'cdo.c'; then $(CYGPATH_W) 'cdo.c'; else $(CYGPATH_W) '$(srcdir)/cdo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo.obj `if test -f 'cdo.c'; then $(CYGPATH_W) 'cdo.c'; else $(CYGPATH_W) '$(srcdir)/cdo.c'; fi`
 
 cdo-Adisit.o: Adisit.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Adisit.o -MD -MP -MF $(DEPDIR)/cdo-Adisit.Tpo -c -o cdo-Adisit.o `test -f 'Adisit.c' || echo '$(srcdir)/'`Adisit.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Adisit.Tpo $(DEPDIR)/cdo-Adisit.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Adisit.c' object='cdo-Adisit.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Adisit.o -MD -MP -MF $(DEPDIR)/cdo-Adisit.Tpo -c -o cdo-Adisit.o `test -f 'Adisit.c' || echo '$(srcdir)/'`Adisit.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Adisit.Tpo $(DEPDIR)/cdo-Adisit.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Adisit.c' object='cdo-Adisit.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Adisit.o `test -f 'Adisit.c' || echo '$(srcdir)/'`Adisit.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Adisit.o `test -f 'Adisit.c' || echo '$(srcdir)/'`Adisit.c
 
 cdo-Adisit.obj: Adisit.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Adisit.obj -MD -MP -MF $(DEPDIR)/cdo-Adisit.Tpo -c -o cdo-Adisit.obj `if test -f 'Adisit.c'; then $(CYGPATH_W) 'Adisit.c'; else $(CYGPATH_W) '$(srcdir)/Adisit.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Adisit.Tpo $(DEPDIR)/cdo-Adisit.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Adisit.c' object='cdo-Adisit.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Adisit.obj -MD -MP -MF $(DEPDIR)/cdo-Adisit.Tpo -c -o cdo-Adisit.obj `if test -f 'Adisit.c'; then $(CYGPATH_W) 'Adisit.c'; else $(CYGPATH_W) '$(srcdir)/Adisit.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Adisit.Tpo $(DEPDIR)/cdo-Adisit.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Adisit.c' object='cdo-Adisit.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Adisit.obj `if test -f 'Adisit.c'; then $(CYGPATH_W) 'Adisit.c'; else $(CYGPATH_W) '$(srcdir)/Adisit.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Adisit.obj `if test -f 'Adisit.c'; then $(CYGPATH_W) 'Adisit.c'; else $(CYGPATH_W) '$(srcdir)/Adisit.c'; fi`
 
 cdo-Arith.o: Arith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arith.o -MD -MP -MF $(DEPDIR)/cdo-Arith.Tpo -c -o cdo-Arith.o `test -f 'Arith.c' || echo '$(srcdir)/'`Arith.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arith.Tpo $(DEPDIR)/cdo-Arith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arith.c' object='cdo-Arith.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arith.o -MD -MP -MF $(DEPDIR)/cdo-Arith.Tpo -c -o cdo-Arith.o `test -f 'Arith.c' || echo '$(srcdir)/'`Arith.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arith.Tpo $(DEPDIR)/cdo-Arith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arith.c' object='cdo-Arith.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arith.o `test -f 'Arith.c' || echo '$(srcdir)/'`Arith.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arith.o `test -f 'Arith.c' || echo '$(srcdir)/'`Arith.c
 
 cdo-Arith.obj: Arith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arith.obj -MD -MP -MF $(DEPDIR)/cdo-Arith.Tpo -c -o cdo-Arith.obj `if test -f 'Arith.c'; then $(CYGPATH_W) 'Arith.c'; else $(CYGPATH_W) '$(srcdir)/Arith.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arith.Tpo $(DEPDIR)/cdo-Arith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arith.c' object='cdo-Arith.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arith.obj -MD -MP -MF $(DEPDIR)/cdo-Arith.Tpo -c -o cdo-Arith.obj `if test -f 'Arith.c'; then $(CYGPATH_W) 'Arith.c'; else $(CYGPATH_W) '$(srcdir)/Arith.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arith.Tpo $(DEPDIR)/cdo-Arith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arith.c' object='cdo-Arith.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arith.obj `if test -f 'Arith.c'; then $(CYGPATH_W) 'Arith.c'; else $(CYGPATH_W) '$(srcdir)/Arith.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arith.obj `if test -f 'Arith.c'; then $(CYGPATH_W) 'Arith.c'; else $(CYGPATH_W) '$(srcdir)/Arith.c'; fi`
 
 cdo-Arithc.o: Arithc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithc.o -MD -MP -MF $(DEPDIR)/cdo-Arithc.Tpo -c -o cdo-Arithc.o `test -f 'Arithc.c' || echo '$(srcdir)/'`Arithc.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arithc.Tpo $(DEPDIR)/cdo-Arithc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arithc.c' object='cdo-Arithc.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithc.o -MD -MP -MF $(DEPDIR)/cdo-Arithc.Tpo -c -o cdo-Arithc.o `test -f 'Arithc.c' || echo '$(srcdir)/'`Arithc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arithc.Tpo $(DEPDIR)/cdo-Arithc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arithc.c' object='cdo-Arithc.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithc.o `test -f 'Arithc.c' || echo '$(srcdir)/'`Arithc.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithc.o `test -f 'Arithc.c' || echo '$(srcdir)/'`Arithc.c
 
 cdo-Arithc.obj: Arithc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithc.obj -MD -MP -MF $(DEPDIR)/cdo-Arithc.Tpo -c -o cdo-Arithc.obj `if test -f 'Arithc.c'; then $(CYGPATH_W) 'Arithc.c'; else $(CYGPATH_W) '$(srcdir)/Arithc.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arithc.Tpo $(DEPDIR)/cdo-Arithc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arithc.c' object='cdo-Arithc.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithc.obj -MD -MP -MF $(DEPDIR)/cdo-Arithc.Tpo -c -o cdo-Arithc.obj `if test -f 'Arithc.c'; then $(CYGPATH_W) 'Arithc.c'; else $(CYGPATH_W) '$(srcdir)/Arithc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arithc.Tpo $(DEPDIR)/cdo-Arithc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arithc.c' object='cdo-Arithc.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithc.obj `if test -f 'Arithc.c'; then $(CYGPATH_W) 'Arithc.c'; else $(CYGPATH_W) '$(srcdir)/Arithc.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithc.obj `if test -f 'Arithc.c'; then $(CYGPATH_W) 'Arithc.c'; else $(CYGPATH_W) '$(srcdir)/Arithc.c'; fi`
 
 cdo-Arithdays.o: Arithdays.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithdays.o -MD -MP -MF $(DEPDIR)/cdo-Arithdays.Tpo -c -o cdo-Arithdays.o `test -f 'Arithdays.c' || echo '$(srcdir)/'`Arithdays.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arithdays.Tpo $(DEPDIR)/cdo-Arithdays.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arithdays.c' object='cdo-Arithdays.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithdays.o -MD -MP -MF $(DEPDIR)/cdo-Arithdays.Tpo -c -o cdo-Arithdays.o `test -f 'Arithdays.c' || echo '$(srcdir)/'`Arithdays.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arithdays.Tpo $(DEPDIR)/cdo-Arithdays.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arithdays.c' object='cdo-Arithdays.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithdays.o `test -f 'Arithdays.c' || echo '$(srcdir)/'`Arithdays.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithdays.o `test -f 'Arithdays.c' || echo '$(srcdir)/'`Arithdays.c
 
 cdo-Arithdays.obj: Arithdays.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithdays.obj -MD -MP -MF $(DEPDIR)/cdo-Arithdays.Tpo -c -o cdo-Arithdays.obj `if test -f 'Arithdays.c'; then $(CYGPATH_W) 'Arithdays.c'; else $(CYGPATH_W) '$(srcdir)/Arithdays.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arithdays.Tpo $(DEPDIR)/cdo-Arithdays.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arithdays.c' object='cdo-Arithdays.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithdays.obj -MD -MP -MF $(DEPDIR)/cdo-Arithdays.Tpo -c -o cdo-Arithdays.obj `if test -f 'Arithdays.c'; then $(CYGPATH_W) 'Arithdays.c'; else $(CYGPATH_W) '$(srcdir)/Arithdays.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arithdays.Tpo $(DEPDIR)/cdo-Arithdays.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arithdays.c' object='cdo-Arithdays.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithdays.obj `if test -f 'Arithdays.c'; then $(CYGPATH_W) 'Arithdays.c'; else $(CYGPATH_W) '$(srcdir)/Arithdays.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithdays.obj `if test -f 'Arithdays.c'; then $(CYGPATH_W) 'Arithdays.c'; else $(CYGPATH_W) '$(srcdir)/Arithdays.c'; fi`
 
 cdo-Arithlat.o: Arithlat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithlat.o -MD -MP -MF $(DEPDIR)/cdo-Arithlat.Tpo -c -o cdo-Arithlat.o `test -f 'Arithlat.c' || echo '$(srcdir)/'`Arithlat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arithlat.Tpo $(DEPDIR)/cdo-Arithlat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arithlat.c' object='cdo-Arithlat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithlat.o -MD -MP -MF $(DEPDIR)/cdo-Arithlat.Tpo -c -o cdo-Arithlat.o `test -f 'Arithlat.c' || echo '$(srcdir)/'`Arithlat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arithlat.Tpo $(DEPDIR)/cdo-Arithlat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arithlat.c' object='cdo-Arithlat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithlat.o `test -f 'Arithlat.c' || echo '$(srcdir)/'`Arithlat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithlat.o `test -f 'Arithlat.c' || echo '$(srcdir)/'`Arithlat.c
 
 cdo-Arithlat.obj: Arithlat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithlat.obj -MD -MP -MF $(DEPDIR)/cdo-Arithlat.Tpo -c -o cdo-Arithlat.obj `if test -f 'Arithlat.c'; then $(CYGPATH_W) 'Arithlat.c'; else $(CYGPATH_W) '$(srcdir)/Arithlat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Arithlat.Tpo $(DEPDIR)/cdo-Arithlat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Arithlat.c' object='cdo-Arithlat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Arithlat.obj -MD -MP -MF $(DEPDIR)/cdo-Arithlat.Tpo -c -o cdo-Arithlat.obj `if test -f 'Arithlat.c'; then $(CYGPATH_W) 'Arithlat.c'; else $(CYGPATH_W) '$(srcdir)/Arithlat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Arithlat.Tpo $(DEPDIR)/cdo-Arithlat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Arithlat.c' object='cdo-Arithlat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithlat.obj `if test -f 'Arithlat.c'; then $(CYGPATH_W) 'Arithlat.c'; else $(CYGPATH_W) '$(srcdir)/Arithlat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Arithlat.obj `if test -f 'Arithlat.c'; then $(CYGPATH_W) 'Arithlat.c'; else $(CYGPATH_W) '$(srcdir)/Arithlat.c'; fi`
 
 cdo-CDItest.o: CDItest.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDItest.o -MD -MP -MF $(DEPDIR)/cdo-CDItest.Tpo -c -o cdo-CDItest.o `test -f 'CDItest.c' || echo '$(srcdir)/'`CDItest.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CDItest.Tpo $(DEPDIR)/cdo-CDItest.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CDItest.c' object='cdo-CDItest.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDItest.o -MD -MP -MF $(DEPDIR)/cdo-CDItest.Tpo -c -o cdo-CDItest.o `test -f 'CDItest.c' || echo '$(srcdir)/'`CDItest.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CDItest.Tpo $(DEPDIR)/cdo-CDItest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CDItest.c' object='cdo-CDItest.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDItest.o `test -f 'CDItest.c' || echo '$(srcdir)/'`CDItest.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDItest.o `test -f 'CDItest.c' || echo '$(srcdir)/'`CDItest.c
 
 cdo-CDItest.obj: CDItest.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDItest.obj -MD -MP -MF $(DEPDIR)/cdo-CDItest.Tpo -c -o cdo-CDItest.obj `if test -f 'CDItest.c'; then $(CYGPATH_W) 'CDItest.c'; else $(CYGPATH_W) '$(srcdir)/CDItest.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CDItest.Tpo $(DEPDIR)/cdo-CDItest.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CDItest.c' object='cdo-CDItest.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDItest.obj -MD -MP -MF $(DEPDIR)/cdo-CDItest.Tpo -c -o cdo-CDItest.obj `if test -f 'CDItest.c'; then $(CYGPATH_W) 'CDItest.c'; else $(CYGPATH_W) '$(srcdir)/CDItest.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CDItest.Tpo $(DEPDIR)/cdo-CDItest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CDItest.c' object='cdo-CDItest.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDItest.obj `if test -f 'CDItest.c'; then $(CYGPATH_W) 'CDItest.c'; else $(CYGPATH_W) '$(srcdir)/CDItest.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDItest.obj `if test -f 'CDItest.c'; then $(CYGPATH_W) 'CDItest.c'; else $(CYGPATH_W) '$(srcdir)/CDItest.c'; fi`
 
 cdo-CDIread.o: CDIread.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIread.o -MD -MP -MF $(DEPDIR)/cdo-CDIread.Tpo -c -o cdo-CDIread.o `test -f 'CDIread.c' || echo '$(srcdir)/'`CDIread.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CDIread.Tpo $(DEPDIR)/cdo-CDIread.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CDIread.c' object='cdo-CDIread.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIread.o -MD -MP -MF $(DEPDIR)/cdo-CDIread.Tpo -c -o cdo-CDIread.o `test -f 'CDIread.c' || echo '$(srcdir)/'`CDIread.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CDIread.Tpo $(DEPDIR)/cdo-CDIread.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CDIread.c' object='cdo-CDIread.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIread.o `test -f 'CDIread.c' || echo '$(srcdir)/'`CDIread.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIread.o `test -f 'CDIread.c' || echo '$(srcdir)/'`CDIread.c
 
 cdo-CDIread.obj: CDIread.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIread.obj -MD -MP -MF $(DEPDIR)/cdo-CDIread.Tpo -c -o cdo-CDIread.obj `if test -f 'CDIread.c'; then $(CYGPATH_W) 'CDIread.c'; else $(CYGPATH_W) '$(srcdir)/CDIread.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CDIread.Tpo $(DEPDIR)/cdo-CDIread.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CDIread.c' object='cdo-CDIread.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIread.obj -MD -MP -MF $(DEPDIR)/cdo-CDIread.Tpo -c -o cdo-CDIread.obj `if test -f 'CDIread.c'; then $(CYGPATH_W) 'CDIread.c'; else $(CYGPATH_W) '$(srcdir)/CDIread.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CDIread.Tpo $(DEPDIR)/cdo-CDIread.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CDIread.c' object='cdo-CDIread.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIread.obj `if test -f 'CDIread.c'; then $(CYGPATH_W) 'CDIread.c'; else $(CYGPATH_W) '$(srcdir)/CDIread.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIread.obj `if test -f 'CDIread.c'; then $(CYGPATH_W) 'CDIread.c'; else $(CYGPATH_W) '$(srcdir)/CDIread.c'; fi`
 
 cdo-CDIwrite.o: CDIwrite.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIwrite.o -MD -MP -MF $(DEPDIR)/cdo-CDIwrite.Tpo -c -o cdo-CDIwrite.o `test -f 'CDIwrite.c' || echo '$(srcdir)/'`CDIwrite.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CDIwrite.Tpo $(DEPDIR)/cdo-CDIwrite.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CDIwrite.c' object='cdo-CDIwrite.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIwrite.o -MD -MP -MF $(DEPDIR)/cdo-CDIwrite.Tpo -c -o cdo-CDIwrite.o `test -f 'CDIwrite.c' || echo '$(srcdir)/'`CDIwrite.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CDIwrite.Tpo $(DEPDIR)/cdo-CDIwrite.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CDIwrite.c' object='cdo-CDIwrite.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIwrite.o `test -f 'CDIwrite.c' || echo '$(srcdir)/'`CDIwrite.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIwrite.o `test -f 'CDIwrite.c' || echo '$(srcdir)/'`CDIwrite.c
 
 cdo-CDIwrite.obj: CDIwrite.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIwrite.obj -MD -MP -MF $(DEPDIR)/cdo-CDIwrite.Tpo -c -o cdo-CDIwrite.obj `if test -f 'CDIwrite.c'; then $(CYGPATH_W) 'CDIwrite.c'; else $(CYGPATH_W) '$(srcdir)/CDIwrite.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CDIwrite.Tpo $(DEPDIR)/cdo-CDIwrite.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CDIwrite.c' object='cdo-CDIwrite.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CDIwrite.obj -MD -MP -MF $(DEPDIR)/cdo-CDIwrite.Tpo -c -o cdo-CDIwrite.obj `if test -f 'CDIwrite.c'; then $(CYGPATH_W) 'CDIwrite.c'; else $(CYGPATH_W) '$(srcdir)/CDIwrite.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CDIwrite.Tpo $(DEPDIR)/cdo-CDIwrite.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CDIwrite.c' object='cdo-CDIwrite.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIwrite.obj `if test -f 'CDIwrite.c'; then $(CYGPATH_W) 'CDIwrite.c'; else $(CYGPATH_W) '$(srcdir)/CDIwrite.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CDIwrite.obj `if test -f 'CDIwrite.c'; then $(CYGPATH_W) 'CDIwrite.c'; else $(CYGPATH_W) '$(srcdir)/CDIwrite.c'; fi`
 
 cdo-Cat.o: Cat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cat.o -MD -MP -MF $(DEPDIR)/cdo-Cat.Tpo -c -o cdo-Cat.o `test -f 'Cat.c' || echo '$(srcdir)/'`Cat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cat.Tpo $(DEPDIR)/cdo-Cat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cat.c' object='cdo-Cat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cat.o -MD -MP -MF $(DEPDIR)/cdo-Cat.Tpo -c -o cdo-Cat.o `test -f 'Cat.c' || echo '$(srcdir)/'`Cat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cat.Tpo $(DEPDIR)/cdo-Cat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cat.c' object='cdo-Cat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cat.o `test -f 'Cat.c' || echo '$(srcdir)/'`Cat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cat.o `test -f 'Cat.c' || echo '$(srcdir)/'`Cat.c
 
 cdo-Cat.obj: Cat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cat.obj -MD -MP -MF $(DEPDIR)/cdo-Cat.Tpo -c -o cdo-Cat.obj `if test -f 'Cat.c'; then $(CYGPATH_W) 'Cat.c'; else $(CYGPATH_W) '$(srcdir)/Cat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cat.Tpo $(DEPDIR)/cdo-Cat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cat.c' object='cdo-Cat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cat.obj -MD -MP -MF $(DEPDIR)/cdo-Cat.Tpo -c -o cdo-Cat.obj `if test -f 'Cat.c'; then $(CYGPATH_W) 'Cat.c'; else $(CYGPATH_W) '$(srcdir)/Cat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cat.Tpo $(DEPDIR)/cdo-Cat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cat.c' object='cdo-Cat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cat.obj `if test -f 'Cat.c'; then $(CYGPATH_W) 'Cat.c'; else $(CYGPATH_W) '$(srcdir)/Cat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cat.obj `if test -f 'Cat.c'; then $(CYGPATH_W) 'Cat.c'; else $(CYGPATH_W) '$(srcdir)/Cat.c'; fi`
 
 cdo-Change.o: Change.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change.o -MD -MP -MF $(DEPDIR)/cdo-Change.Tpo -c -o cdo-Change.o `test -f 'Change.c' || echo '$(srcdir)/'`Change.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Change.Tpo $(DEPDIR)/cdo-Change.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Change.c' object='cdo-Change.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change.o -MD -MP -MF $(DEPDIR)/cdo-Change.Tpo -c -o cdo-Change.o `test -f 'Change.c' || echo '$(srcdir)/'`Change.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Change.Tpo $(DEPDIR)/cdo-Change.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Change.c' object='cdo-Change.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change.o `test -f 'Change.c' || echo '$(srcdir)/'`Change.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change.o `test -f 'Change.c' || echo '$(srcdir)/'`Change.c
 
 cdo-Change.obj: Change.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change.obj -MD -MP -MF $(DEPDIR)/cdo-Change.Tpo -c -o cdo-Change.obj `if test -f 'Change.c'; then $(CYGPATH_W) 'Change.c'; else $(CYGPATH_W) '$(srcdir)/Change.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Change.Tpo $(DEPDIR)/cdo-Change.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Change.c' object='cdo-Change.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change.obj -MD -MP -MF $(DEPDIR)/cdo-Change.Tpo -c -o cdo-Change.obj `if test -f 'Change.c'; then $(CYGPATH_W) 'Change.c'; else $(CYGPATH_W) '$(srcdir)/Change.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Change.Tpo $(DEPDIR)/cdo-Change.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Change.c' object='cdo-Change.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change.obj `if test -f 'Change.c'; then $(CYGPATH_W) 'Change.c'; else $(CYGPATH_W) '$(srcdir)/Change.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change.obj `if test -f 'Change.c'; then $(CYGPATH_W) 'Change.c'; else $(CYGPATH_W) '$(srcdir)/Change.c'; fi`
 
 cdo-Change_e5slm.o: Change_e5slm.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change_e5slm.o -MD -MP -MF $(DEPDIR)/cdo-Change_e5slm.Tpo -c -o cdo-Change_e5slm.o `test -f 'Change_e5slm.c' || echo '$(srcdir)/'`Change_e5slm.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Change_e5slm.Tpo $(DEPDIR)/cdo-Change_e5slm.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Change_e5slm.c' object='cdo-Change_e5slm.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change_e5slm.o -MD -MP -MF $(DEPDIR)/cdo-Change_e5slm.Tpo -c -o cdo-Change_e5slm.o `test -f 'Change_e5slm.c' || echo '$(srcdir)/'`Change_e5slm.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Change_e5slm.Tpo $(DEPDIR)/cdo-Change_e5slm.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Change_e5slm.c' object='cdo-Change_e5slm.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change_e5slm.o `test -f 'Change_e5slm.c' || echo '$(srcdir)/'`Change_e5slm.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change_e5slm.o `test -f 'Change_e5slm.c' || echo '$(srcdir)/'`Change_e5slm.c
 
 cdo-Change_e5slm.obj: Change_e5slm.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change_e5slm.obj -MD -MP -MF $(DEPDIR)/cdo-Change_e5slm.Tpo -c -o cdo-Change_e5slm.obj `if test -f 'Change_e5slm.c'; then $(CYGPATH_W) 'Change_e5slm.c'; else $(CYGPATH_W) '$(srcdir)/Change_e5slm.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Change_e5slm.Tpo $(DEPDIR)/cdo-Change_e5slm.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Change_e5slm.c' object='cdo-Change_e5slm.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Change_e5slm.obj -MD -MP -MF $(DEPDIR)/cdo-Change_e5slm.Tpo -c -o cdo-Change_e5slm.obj `if test -f 'Change_e5slm.c'; then $(CYGPATH_W) 'Change_e5slm.c'; else $(CYGPATH_W) '$(srcdir)/Change_e5slm.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Change_e5slm.Tpo $(DEPDIR)/cdo-Change_e5slm.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Change_e5slm.c' object='cdo-Change_e5slm.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change_e5slm.obj `if test -f 'Change_e5slm.c'; then $(CYGPATH_W) 'Change_e5slm.c'; else $(CYGPATH_W) '$(srcdir)/Change_e5slm.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Change_e5slm.obj `if test -f 'Change_e5slm.c'; then $(CYGPATH_W) 'Change_e5slm.c'; else $(CYGPATH_W) '$(srcdir)/Change_e5slm.c'; fi`
 
 cdo-Cloudlayer.o: Cloudlayer.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cloudlayer.o -MD -MP -MF $(DEPDIR)/cdo-Cloudlayer.Tpo -c -o cdo-Cloudlayer.o `test -f 'Cloudlayer.c' || echo '$(srcdir)/'`Cloudlayer.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cloudlayer.Tpo $(DEPDIR)/cdo-Cloudlayer.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cloudlayer.c' object='cdo-Cloudlayer.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cloudlayer.o -MD -MP -MF $(DEPDIR)/cdo-Cloudlayer.Tpo -c -o cdo-Cloudlayer.o `test -f 'Cloudlayer.c' || echo '$(srcdir)/'`Cloudlayer.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cloudlayer.Tpo $(DEPDIR)/cdo-Cloudlayer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cloudlayer.c' object='cdo-Cloudlayer.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cloudlayer.o `test -f 'Cloudlayer.c' || echo '$(srcdir)/'`Cloudlayer.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cloudlayer.o `test -f 'Cloudlayer.c' || echo '$(srcdir)/'`Cloudlayer.c
 
 cdo-Cloudlayer.obj: Cloudlayer.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cloudlayer.obj -MD -MP -MF $(DEPDIR)/cdo-Cloudlayer.Tpo -c -o cdo-Cloudlayer.obj `if test -f 'Cloudlayer.c'; then $(CYGPATH_W) 'Cloudlayer.c'; else $(CYGPATH_W) '$(srcdir)/Cloudlayer.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cloudlayer.Tpo $(DEPDIR)/cdo-Cloudlayer.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cloudlayer.c' object='cdo-Cloudlayer.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cloudlayer.obj -MD -MP -MF $(DEPDIR)/cdo-Cloudlayer.Tpo -c -o cdo-Cloudlayer.obj `if test -f 'Cloudlayer.c'; then $(CYGPATH_W) 'Cloudlayer.c'; else $(CYGPATH_W) '$(srcdir)/Cloudlayer.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cloudlayer.Tpo $(DEPDIR)/cdo-Cloudlayer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cloudlayer.c' object='cdo-Cloudlayer.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cloudlayer.obj `if test -f 'Cloudlayer.c'; then $(CYGPATH_W) 'Cloudlayer.c'; else $(CYGPATH_W) '$(srcdir)/Cloudlayer.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cloudlayer.obj `if test -f 'Cloudlayer.c'; then $(CYGPATH_W) 'Cloudlayer.c'; else $(CYGPATH_W) '$(srcdir)/Cloudlayer.c'; fi`
 
 cdo-Command.o: Command.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Command.o -MD -MP -MF $(DEPDIR)/cdo-Command.Tpo -c -o cdo-Command.o `test -f 'Command.c' || echo '$(srcdir)/'`Command.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Command.Tpo $(DEPDIR)/cdo-Command.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Command.c' object='cdo-Command.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Command.o -MD -MP -MF $(DEPDIR)/cdo-Command.Tpo -c -o cdo-Command.o `test -f 'Command.c' || echo '$(srcdir)/'`Command.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Command.Tpo $(DEPDIR)/cdo-Command.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Command.c' object='cdo-Command.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Command.o `test -f 'Command.c' || echo '$(srcdir)/'`Command.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Command.o `test -f 'Command.c' || echo '$(srcdir)/'`Command.c
 
 cdo-Command.obj: Command.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Command.obj -MD -MP -MF $(DEPDIR)/cdo-Command.Tpo -c -o cdo-Command.obj `if test -f 'Command.c'; then $(CYGPATH_W) 'Command.c'; else $(CYGPATH_W) '$(srcdir)/Command.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Command.Tpo $(DEPDIR)/cdo-Command.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Command.c' object='cdo-Command.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Command.obj -MD -MP -MF $(DEPDIR)/cdo-Command.Tpo -c -o cdo-Command.obj `if test -f 'Command.c'; then $(CYGPATH_W) 'Command.c'; else $(CYGPATH_W) '$(srcdir)/Command.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Command.Tpo $(DEPDIR)/cdo-Command.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Command.c' object='cdo-Command.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Command.obj `if test -f 'Command.c'; then $(CYGPATH_W) 'Command.c'; else $(CYGPATH_W) '$(srcdir)/Command.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Command.obj `if test -f 'Command.c'; then $(CYGPATH_W) 'Command.c'; else $(CYGPATH_W) '$(srcdir)/Command.c'; fi`
 
 cdo-Comp.o: Comp.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Comp.o -MD -MP -MF $(DEPDIR)/cdo-Comp.Tpo -c -o cdo-Comp.o `test -f 'Comp.c' || echo '$(srcdir)/'`Comp.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Comp.Tpo $(DEPDIR)/cdo-Comp.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Comp.c' object='cdo-Comp.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Comp.o -MD -MP -MF $(DEPDIR)/cdo-Comp.Tpo -c -o cdo-Comp.o `test -f 'Comp.c' || echo '$(srcdir)/'`Comp.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Comp.Tpo $(DEPDIR)/cdo-Comp.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Comp.c' object='cdo-Comp.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Comp.o `test -f 'Comp.c' || echo '$(srcdir)/'`Comp.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Comp.o `test -f 'Comp.c' || echo '$(srcdir)/'`Comp.c
 
 cdo-Comp.obj: Comp.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Comp.obj -MD -MP -MF $(DEPDIR)/cdo-Comp.Tpo -c -o cdo-Comp.obj `if test -f 'Comp.c'; then $(CYGPATH_W) 'Comp.c'; else $(CYGPATH_W) '$(srcdir)/Comp.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Comp.Tpo $(DEPDIR)/cdo-Comp.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Comp.c' object='cdo-Comp.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Comp.obj -MD -MP -MF $(DEPDIR)/cdo-Comp.Tpo -c -o cdo-Comp.obj `if test -f 'Comp.c'; then $(CYGPATH_W) 'Comp.c'; else $(CYGPATH_W) '$(srcdir)/Comp.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Comp.Tpo $(DEPDIR)/cdo-Comp.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Comp.c' object='cdo-Comp.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Comp.obj `if test -f 'Comp.c'; then $(CYGPATH_W) 'Comp.c'; else $(CYGPATH_W) '$(srcdir)/Comp.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Comp.obj `if test -f 'Comp.c'; then $(CYGPATH_W) 'Comp.c'; else $(CYGPATH_W) '$(srcdir)/Comp.c'; fi`
 
 cdo-Compc.o: Compc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Compc.o -MD -MP -MF $(DEPDIR)/cdo-Compc.Tpo -c -o cdo-Compc.o `test -f 'Compc.c' || echo '$(srcdir)/'`Compc.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Compc.Tpo $(DEPDIR)/cdo-Compc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Compc.c' object='cdo-Compc.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Compc.o -MD -MP -MF $(DEPDIR)/cdo-Compc.Tpo -c -o cdo-Compc.o `test -f 'Compc.c' || echo '$(srcdir)/'`Compc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Compc.Tpo $(DEPDIR)/cdo-Compc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Compc.c' object='cdo-Compc.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Compc.o `test -f 'Compc.c' || echo '$(srcdir)/'`Compc.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Compc.o `test -f 'Compc.c' || echo '$(srcdir)/'`Compc.c
 
 cdo-Compc.obj: Compc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Compc.obj -MD -MP -MF $(DEPDIR)/cdo-Compc.Tpo -c -o cdo-Compc.obj `if test -f 'Compc.c'; then $(CYGPATH_W) 'Compc.c'; else $(CYGPATH_W) '$(srcdir)/Compc.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Compc.Tpo $(DEPDIR)/cdo-Compc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Compc.c' object='cdo-Compc.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Compc.obj -MD -MP -MF $(DEPDIR)/cdo-Compc.Tpo -c -o cdo-Compc.obj `if test -f 'Compc.c'; then $(CYGPATH_W) 'Compc.c'; else $(CYGPATH_W) '$(srcdir)/Compc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Compc.Tpo $(DEPDIR)/cdo-Compc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Compc.c' object='cdo-Compc.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Compc.obj `if test -f 'Compc.c'; then $(CYGPATH_W) 'Compc.c'; else $(CYGPATH_W) '$(srcdir)/Compc.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Compc.obj `if test -f 'Compc.c'; then $(CYGPATH_W) 'Compc.c'; else $(CYGPATH_W) '$(srcdir)/Compc.c'; fi`
 
 cdo-Complextorect.o: Complextorect.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Complextorect.o -MD -MP -MF $(DEPDIR)/cdo-Complextorect.Tpo -c -o cdo-Complextorect.o `test -f 'Complextorect.c' || echo '$(srcdir)/'`Complextorect.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Complextorect.Tpo $(DEPDIR)/cdo-Complextorect.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Complextorect.c' object='cdo-Complextorect.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Complextorect.o -MD -MP -MF $(DEPDIR)/cdo-Complextorect.Tpo -c -o cdo-Complextorect.o `test -f 'Complextorect.c' || echo '$(srcdir)/'`Complextorect.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Complextorect.Tpo $(DEPDIR)/cdo-Complextorect.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Complextorect.c' object='cdo-Complextorect.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Complextorect.o `test -f 'Complextorect.c' || echo '$(srcdir)/'`Complextorect.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Complextorect.o `test -f 'Complextorect.c' || echo '$(srcdir)/'`Complextorect.c
 
 cdo-Complextorect.obj: Complextorect.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Complextorect.obj -MD -MP -MF $(DEPDIR)/cdo-Complextorect.Tpo -c -o cdo-Complextorect.obj `if test -f 'Complextorect.c'; then $(CYGPATH_W) 'Complextorect.c'; else $(CYGPATH_W) '$(srcdir)/Complextorect.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Complextorect.Tpo $(DEPDIR)/cdo-Complextorect.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Complextorect.c' object='cdo-Complextorect.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Complextorect.obj -MD -MP -MF $(DEPDIR)/cdo-Complextorect.Tpo -c -o cdo-Complextorect.obj `if test -f 'Complextorect.c'; then $(CYGPATH_W) 'Complextorect.c'; else $(CYGPATH_W) '$(srcdir)/Complextorect.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Complextorect.Tpo $(DEPDIR)/cdo-Complextorect.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Complextorect.c' object='cdo-Complextorect.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Complextorect.obj `if test -f 'Complextorect.c'; then $(CYGPATH_W) 'Complextorect.c'; else $(CYGPATH_W) '$(srcdir)/Complextorect.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Complextorect.obj `if test -f 'Complextorect.c'; then $(CYGPATH_W) 'Complextorect.c'; else $(CYGPATH_W) '$(srcdir)/Complextorect.c'; fi`
 
 cdo-Cond.o: Cond.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond.o -MD -MP -MF $(DEPDIR)/cdo-Cond.Tpo -c -o cdo-Cond.o `test -f 'Cond.c' || echo '$(srcdir)/'`Cond.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cond.Tpo $(DEPDIR)/cdo-Cond.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cond.c' object='cdo-Cond.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond.o -MD -MP -MF $(DEPDIR)/cdo-Cond.Tpo -c -o cdo-Cond.o `test -f 'Cond.c' || echo '$(srcdir)/'`Cond.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cond.Tpo $(DEPDIR)/cdo-Cond.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cond.c' object='cdo-Cond.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond.o `test -f 'Cond.c' || echo '$(srcdir)/'`Cond.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond.o `test -f 'Cond.c' || echo '$(srcdir)/'`Cond.c
 
 cdo-Cond.obj: Cond.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond.obj -MD -MP -MF $(DEPDIR)/cdo-Cond.Tpo -c -o cdo-Cond.obj `if test -f 'Cond.c'; then $(CYGPATH_W) 'Cond.c'; else $(CYGPATH_W) '$(srcdir)/Cond.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cond.Tpo $(DEPDIR)/cdo-Cond.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cond.c' object='cdo-Cond.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond.obj -MD -MP -MF $(DEPDIR)/cdo-Cond.Tpo -c -o cdo-Cond.obj `if test -f 'Cond.c'; then $(CYGPATH_W) 'Cond.c'; else $(CYGPATH_W) '$(srcdir)/Cond.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cond.Tpo $(DEPDIR)/cdo-Cond.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cond.c' object='cdo-Cond.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond.obj `if test -f 'Cond.c'; then $(CYGPATH_W) 'Cond.c'; else $(CYGPATH_W) '$(srcdir)/Cond.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond.obj `if test -f 'Cond.c'; then $(CYGPATH_W) 'Cond.c'; else $(CYGPATH_W) '$(srcdir)/Cond.c'; fi`
 
 cdo-Cond2.o: Cond2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond2.o -MD -MP -MF $(DEPDIR)/cdo-Cond2.Tpo -c -o cdo-Cond2.o `test -f 'Cond2.c' || echo '$(srcdir)/'`Cond2.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cond2.Tpo $(DEPDIR)/cdo-Cond2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cond2.c' object='cdo-Cond2.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond2.o -MD -MP -MF $(DEPDIR)/cdo-Cond2.Tpo -c -o cdo-Cond2.o `test -f 'Cond2.c' || echo '$(srcdir)/'`Cond2.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cond2.Tpo $(DEPDIR)/cdo-Cond2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cond2.c' object='cdo-Cond2.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond2.o `test -f 'Cond2.c' || echo '$(srcdir)/'`Cond2.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond2.o `test -f 'Cond2.c' || echo '$(srcdir)/'`Cond2.c
 
 cdo-Cond2.obj: Cond2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond2.obj -MD -MP -MF $(DEPDIR)/cdo-Cond2.Tpo -c -o cdo-Cond2.obj `if test -f 'Cond2.c'; then $(CYGPATH_W) 'Cond2.c'; else $(CYGPATH_W) '$(srcdir)/Cond2.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Cond2.Tpo $(DEPDIR)/cdo-Cond2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Cond2.c' object='cdo-Cond2.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Cond2.obj -MD -MP -MF $(DEPDIR)/cdo-Cond2.Tpo -c -o cdo-Cond2.obj `if test -f 'Cond2.c'; then $(CYGPATH_W) 'Cond2.c'; else $(CYGPATH_W) '$(srcdir)/Cond2.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Cond2.Tpo $(DEPDIR)/cdo-Cond2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Cond2.c' object='cdo-Cond2.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond2.obj `if test -f 'Cond2.c'; then $(CYGPATH_W) 'Cond2.c'; else $(CYGPATH_W) '$(srcdir)/Cond2.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Cond2.obj `if test -f 'Cond2.c'; then $(CYGPATH_W) 'Cond2.c'; else $(CYGPATH_W) '$(srcdir)/Cond2.c'; fi`
 
 cdo-Condc.o: Condc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Condc.o -MD -MP -MF $(DEPDIR)/cdo-Condc.Tpo -c -o cdo-Condc.o `test -f 'Condc.c' || echo '$(srcdir)/'`Condc.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Condc.Tpo $(DEPDIR)/cdo-Condc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Condc.c' object='cdo-Condc.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Condc.o -MD -MP -MF $(DEPDIR)/cdo-Condc.Tpo -c -o cdo-Condc.o `test -f 'Condc.c' || echo '$(srcdir)/'`Condc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Condc.Tpo $(DEPDIR)/cdo-Condc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Condc.c' object='cdo-Condc.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Condc.o `test -f 'Condc.c' || echo '$(srcdir)/'`Condc.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Condc.o `test -f 'Condc.c' || echo '$(srcdir)/'`Condc.c
 
 cdo-Condc.obj: Condc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Condc.obj -MD -MP -MF $(DEPDIR)/cdo-Condc.Tpo -c -o cdo-Condc.obj `if test -f 'Condc.c'; then $(CYGPATH_W) 'Condc.c'; else $(CYGPATH_W) '$(srcdir)/Condc.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Condc.Tpo $(DEPDIR)/cdo-Condc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Condc.c' object='cdo-Condc.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Condc.obj -MD -MP -MF $(DEPDIR)/cdo-Condc.Tpo -c -o cdo-Condc.obj `if test -f 'Condc.c'; then $(CYGPATH_W) 'Condc.c'; else $(CYGPATH_W) '$(srcdir)/Condc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Condc.Tpo $(DEPDIR)/cdo-Condc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Condc.c' object='cdo-Condc.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Condc.obj `if test -f 'Condc.c'; then $(CYGPATH_W) 'Condc.c'; else $(CYGPATH_W) '$(srcdir)/Condc.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Condc.obj `if test -f 'Condc.c'; then $(CYGPATH_W) 'Condc.c'; else $(CYGPATH_W) '$(srcdir)/Condc.c'; fi`
 
 cdo-Consecstat.o: Consecstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Consecstat.o -MD -MP -MF $(DEPDIR)/cdo-Consecstat.Tpo -c -o cdo-Consecstat.o `test -f 'Consecstat.c' || echo '$(srcdir)/'`Consecstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Consecstat.Tpo $(DEPDIR)/cdo-Consecstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Consecstat.c' object='cdo-Consecstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Consecstat.o -MD -MP -MF $(DEPDIR)/cdo-Consecstat.Tpo -c -o cdo-Consecstat.o `test -f 'Consecstat.c' || echo '$(srcdir)/'`Consecstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Consecstat.Tpo $(DEPDIR)/cdo-Consecstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Consecstat.c' object='cdo-Consecstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Consecstat.o `test -f 'Consecstat.c' || echo '$(srcdir)/'`Consecstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Consecstat.o `test -f 'Consecstat.c' || echo '$(srcdir)/'`Consecstat.c
 
 cdo-Consecstat.obj: Consecstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Consecstat.obj -MD -MP -MF $(DEPDIR)/cdo-Consecstat.Tpo -c -o cdo-Consecstat.obj `if test -f 'Consecstat.c'; then $(CYGPATH_W) 'Consecstat.c'; else $(CYGPATH_W) '$(srcdir)/Consecstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Consecstat.Tpo $(DEPDIR)/cdo-Consecstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Consecstat.c' object='cdo-Consecstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Consecstat.obj -MD -MP -MF $(DEPDIR)/cdo-Consecstat.Tpo -c -o cdo-Consecstat.obj `if test -f 'Consecstat.c'; then $(CYGPATH_W) 'Consecstat.c'; else $(CYGPATH_W) '$(srcdir)/Consecstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Consecstat.Tpo $(DEPDIR)/cdo-Consecstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Consecstat.c' object='cdo-Consecstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Consecstat.obj `if test -f 'Consecstat.c'; then $(CYGPATH_W) 'Consecstat.c'; else $(CYGPATH_W) '$(srcdir)/Consecstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Consecstat.obj `if test -f 'Consecstat.c'; then $(CYGPATH_W) 'Consecstat.c'; else $(CYGPATH_W) '$(srcdir)/Consecstat.c'; fi`
 
 cdo-Copy.o: Copy.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Copy.o -MD -MP -MF $(DEPDIR)/cdo-Copy.Tpo -c -o cdo-Copy.o `test -f 'Copy.c' || echo '$(srcdir)/'`Copy.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Copy.Tpo $(DEPDIR)/cdo-Copy.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Copy.c' object='cdo-Copy.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Copy.o -MD -MP -MF $(DEPDIR)/cdo-Copy.Tpo -c -o cdo-Copy.o `test -f 'Copy.c' || echo '$(srcdir)/'`Copy.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Copy.Tpo $(DEPDIR)/cdo-Copy.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Copy.c' object='cdo-Copy.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Copy.o `test -f 'Copy.c' || echo '$(srcdir)/'`Copy.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Copy.o `test -f 'Copy.c' || echo '$(srcdir)/'`Copy.c
 
 cdo-Copy.obj: Copy.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Copy.obj -MD -MP -MF $(DEPDIR)/cdo-Copy.Tpo -c -o cdo-Copy.obj `if test -f 'Copy.c'; then $(CYGPATH_W) 'Copy.c'; else $(CYGPATH_W) '$(srcdir)/Copy.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Copy.Tpo $(DEPDIR)/cdo-Copy.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Copy.c' object='cdo-Copy.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Copy.obj -MD -MP -MF $(DEPDIR)/cdo-Copy.Tpo -c -o cdo-Copy.obj `if test -f 'Copy.c'; then $(CYGPATH_W) 'Copy.c'; else $(CYGPATH_W) '$(srcdir)/Copy.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Copy.Tpo $(DEPDIR)/cdo-Copy.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Copy.c' object='cdo-Copy.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Copy.obj `if test -f 'Copy.c'; then $(CYGPATH_W) 'Copy.c'; else $(CYGPATH_W) '$(srcdir)/Copy.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Copy.obj `if test -f 'Copy.c'; then $(CYGPATH_W) 'Copy.c'; else $(CYGPATH_W) '$(srcdir)/Copy.c'; fi`
 
 cdo-Deltime.o: Deltime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Deltime.o -MD -MP -MF $(DEPDIR)/cdo-Deltime.Tpo -c -o cdo-Deltime.o `test -f 'Deltime.c' || echo '$(srcdir)/'`Deltime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Deltime.Tpo $(DEPDIR)/cdo-Deltime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Deltime.c' object='cdo-Deltime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Deltime.o -MD -MP -MF $(DEPDIR)/cdo-Deltime.Tpo -c -o cdo-Deltime.o `test -f 'Deltime.c' || echo '$(srcdir)/'`Deltime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Deltime.Tpo $(DEPDIR)/cdo-Deltime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Deltime.c' object='cdo-Deltime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Deltime.o `test -f 'Deltime.c' || echo '$(srcdir)/'`Deltime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Deltime.o `test -f 'Deltime.c' || echo '$(srcdir)/'`Deltime.c
 
 cdo-Deltime.obj: Deltime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Deltime.obj -MD -MP -MF $(DEPDIR)/cdo-Deltime.Tpo -c -o cdo-Deltime.obj `if test -f 'Deltime.c'; then $(CYGPATH_W) 'Deltime.c'; else $(CYGPATH_W) '$(srcdir)/Deltime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Deltime.Tpo $(DEPDIR)/cdo-Deltime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Deltime.c' object='cdo-Deltime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Deltime.obj -MD -MP -MF $(DEPDIR)/cdo-Deltime.Tpo -c -o cdo-Deltime.obj `if test -f 'Deltime.c'; then $(CYGPATH_W) 'Deltime.c'; else $(CYGPATH_W) '$(srcdir)/Deltime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Deltime.Tpo $(DEPDIR)/cdo-Deltime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Deltime.c' object='cdo-Deltime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Deltime.obj `if test -f 'Deltime.c'; then $(CYGPATH_W) 'Deltime.c'; else $(CYGPATH_W) '$(srcdir)/Deltime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Deltime.obj `if test -f 'Deltime.c'; then $(CYGPATH_W) 'Deltime.c'; else $(CYGPATH_W) '$(srcdir)/Deltime.c'; fi`
 
 cdo-Derivepar.o: Derivepar.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Derivepar.o -MD -MP -MF $(DEPDIR)/cdo-Derivepar.Tpo -c -o cdo-Derivepar.o `test -f 'Derivepar.c' || echo '$(srcdir)/'`Derivepar.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Derivepar.Tpo $(DEPDIR)/cdo-Derivepar.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Derivepar.c' object='cdo-Derivepar.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Derivepar.o -MD -MP -MF $(DEPDIR)/cdo-Derivepar.Tpo -c -o cdo-Derivepar.o `test -f 'Derivepar.c' || echo '$(srcdir)/'`Derivepar.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Derivepar.Tpo $(DEPDIR)/cdo-Derivepar.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Derivepar.c' object='cdo-Derivepar.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Derivepar.o `test -f 'Derivepar.c' || echo '$(srcdir)/'`Derivepar.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Derivepar.o `test -f 'Derivepar.c' || echo '$(srcdir)/'`Derivepar.c
 
 cdo-Derivepar.obj: Derivepar.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Derivepar.obj -MD -MP -MF $(DEPDIR)/cdo-Derivepar.Tpo -c -o cdo-Derivepar.obj `if test -f 'Derivepar.c'; then $(CYGPATH_W) 'Derivepar.c'; else $(CYGPATH_W) '$(srcdir)/Derivepar.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Derivepar.Tpo $(DEPDIR)/cdo-Derivepar.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Derivepar.c' object='cdo-Derivepar.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Derivepar.obj -MD -MP -MF $(DEPDIR)/cdo-Derivepar.Tpo -c -o cdo-Derivepar.obj `if test -f 'Derivepar.c'; then $(CYGPATH_W) 'Derivepar.c'; else $(CYGPATH_W) '$(srcdir)/Derivepar.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Derivepar.Tpo $(DEPDIR)/cdo-Derivepar.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Derivepar.c' object='cdo-Derivepar.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Derivepar.obj `if test -f 'Derivepar.c'; then $(CYGPATH_W) 'Derivepar.c'; else $(CYGPATH_W) '$(srcdir)/Derivepar.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Derivepar.obj `if test -f 'Derivepar.c'; then $(CYGPATH_W) 'Derivepar.c'; else $(CYGPATH_W) '$(srcdir)/Derivepar.c'; fi`
 
 cdo-Detrend.o: Detrend.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Detrend.o -MD -MP -MF $(DEPDIR)/cdo-Detrend.Tpo -c -o cdo-Detrend.o `test -f 'Detrend.c' || echo '$(srcdir)/'`Detrend.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Detrend.Tpo $(DEPDIR)/cdo-Detrend.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Detrend.c' object='cdo-Detrend.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Detrend.o -MD -MP -MF $(DEPDIR)/cdo-Detrend.Tpo -c -o cdo-Detrend.o `test -f 'Detrend.c' || echo '$(srcdir)/'`Detrend.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Detrend.Tpo $(DEPDIR)/cdo-Detrend.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Detrend.c' object='cdo-Detrend.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Detrend.o `test -f 'Detrend.c' || echo '$(srcdir)/'`Detrend.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Detrend.o `test -f 'Detrend.c' || echo '$(srcdir)/'`Detrend.c
 
 cdo-Detrend.obj: Detrend.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Detrend.obj -MD -MP -MF $(DEPDIR)/cdo-Detrend.Tpo -c -o cdo-Detrend.obj `if test -f 'Detrend.c'; then $(CYGPATH_W) 'Detrend.c'; else $(CYGPATH_W) '$(srcdir)/Detrend.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Detrend.Tpo $(DEPDIR)/cdo-Detrend.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Detrend.c' object='cdo-Detrend.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Detrend.obj -MD -MP -MF $(DEPDIR)/cdo-Detrend.Tpo -c -o cdo-Detrend.obj `if test -f 'Detrend.c'; then $(CYGPATH_W) 'Detrend.c'; else $(CYGPATH_W) '$(srcdir)/Detrend.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Detrend.Tpo $(DEPDIR)/cdo-Detrend.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Detrend.c' object='cdo-Detrend.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Detrend.obj `if test -f 'Detrend.c'; then $(CYGPATH_W) 'Detrend.c'; else $(CYGPATH_W) '$(srcdir)/Detrend.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Detrend.obj `if test -f 'Detrend.c'; then $(CYGPATH_W) 'Detrend.c'; else $(CYGPATH_W) '$(srcdir)/Detrend.c'; fi`
 
 cdo-Diff.o: Diff.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Diff.o -MD -MP -MF $(DEPDIR)/cdo-Diff.Tpo -c -o cdo-Diff.o `test -f 'Diff.c' || echo '$(srcdir)/'`Diff.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Diff.Tpo $(DEPDIR)/cdo-Diff.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Diff.c' object='cdo-Diff.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Diff.o -MD -MP -MF $(DEPDIR)/cdo-Diff.Tpo -c -o cdo-Diff.o `test -f 'Diff.c' || echo '$(srcdir)/'`Diff.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Diff.Tpo $(DEPDIR)/cdo-Diff.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Diff.c' object='cdo-Diff.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Diff.o `test -f 'Diff.c' || echo '$(srcdir)/'`Diff.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Diff.o `test -f 'Diff.c' || echo '$(srcdir)/'`Diff.c
 
 cdo-Diff.obj: Diff.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Diff.obj -MD -MP -MF $(DEPDIR)/cdo-Diff.Tpo -c -o cdo-Diff.obj `if test -f 'Diff.c'; then $(CYGPATH_W) 'Diff.c'; else $(CYGPATH_W) '$(srcdir)/Diff.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Diff.Tpo $(DEPDIR)/cdo-Diff.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Diff.c' object='cdo-Diff.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Diff.obj -MD -MP -MF $(DEPDIR)/cdo-Diff.Tpo -c -o cdo-Diff.obj `if test -f 'Diff.c'; then $(CYGPATH_W) 'Diff.c'; else $(CYGPATH_W) '$(srcdir)/Diff.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Diff.Tpo $(DEPDIR)/cdo-Diff.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Diff.c' object='cdo-Diff.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Diff.obj `if test -f 'Diff.c'; then $(CYGPATH_W) 'Diff.c'; else $(CYGPATH_W) '$(srcdir)/Diff.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Diff.obj `if test -f 'Diff.c'; then $(CYGPATH_W) 'Diff.c'; else $(CYGPATH_W) '$(srcdir)/Diff.c'; fi`
 
 cdo-Duplicate.o: Duplicate.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Duplicate.o -MD -MP -MF $(DEPDIR)/cdo-Duplicate.Tpo -c -o cdo-Duplicate.o `test -f 'Duplicate.c' || echo '$(srcdir)/'`Duplicate.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Duplicate.Tpo $(DEPDIR)/cdo-Duplicate.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Duplicate.c' object='cdo-Duplicate.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Duplicate.o -MD -MP -MF $(DEPDIR)/cdo-Duplicate.Tpo -c -o cdo-Duplicate.o `test -f 'Duplicate.c' || echo '$(srcdir)/'`Duplicate.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Duplicate.Tpo $(DEPDIR)/cdo-Duplicate.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Duplicate.c' object='cdo-Duplicate.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Duplicate.o `test -f 'Duplicate.c' || echo '$(srcdir)/'`Duplicate.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Duplicate.o `test -f 'Duplicate.c' || echo '$(srcdir)/'`Duplicate.c
 
 cdo-Duplicate.obj: Duplicate.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Duplicate.obj -MD -MP -MF $(DEPDIR)/cdo-Duplicate.Tpo -c -o cdo-Duplicate.obj `if test -f 'Duplicate.c'; then $(CYGPATH_W) 'Duplicate.c'; else $(CYGPATH_W) '$(srcdir)/Duplicate.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Duplicate.Tpo $(DEPDIR)/cdo-Duplicate.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Duplicate.c' object='cdo-Duplicate.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Duplicate.obj -MD -MP -MF $(DEPDIR)/cdo-Duplicate.Tpo -c -o cdo-Duplicate.obj `if test -f 'Duplicate.c'; then $(CYGPATH_W) 'Duplicate.c'; else $(CYGPATH_W) '$(srcdir)/Duplicate.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Duplicate.Tpo $(DEPDIR)/cdo-Duplicate.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Duplicate.c' object='cdo-Duplicate.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Duplicate.obj `if test -f 'Duplicate.c'; then $(CYGPATH_W) 'Duplicate.c'; else $(CYGPATH_W) '$(srcdir)/Duplicate.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Duplicate.obj `if test -f 'Duplicate.c'; then $(CYGPATH_W) 'Duplicate.c'; else $(CYGPATH_W) '$(srcdir)/Duplicate.c'; fi`
 
 cdo-EOFs.o: EOFs.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EOFs.o -MD -MP -MF $(DEPDIR)/cdo-EOFs.Tpo -c -o cdo-EOFs.o `test -f 'EOFs.c' || echo '$(srcdir)/'`EOFs.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-EOFs.Tpo $(DEPDIR)/cdo-EOFs.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='EOFs.c' object='cdo-EOFs.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EOFs.o -MD -MP -MF $(DEPDIR)/cdo-EOFs.Tpo -c -o cdo-EOFs.o `test -f 'EOFs.c' || echo '$(srcdir)/'`EOFs.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-EOFs.Tpo $(DEPDIR)/cdo-EOFs.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='EOFs.c' object='cdo-EOFs.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EOFs.o `test -f 'EOFs.c' || echo '$(srcdir)/'`EOFs.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EOFs.o `test -f 'EOFs.c' || echo '$(srcdir)/'`EOFs.c
 
 cdo-EOFs.obj: EOFs.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EOFs.obj -MD -MP -MF $(DEPDIR)/cdo-EOFs.Tpo -c -o cdo-EOFs.obj `if test -f 'EOFs.c'; then $(CYGPATH_W) 'EOFs.c'; else $(CYGPATH_W) '$(srcdir)/EOFs.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-EOFs.Tpo $(DEPDIR)/cdo-EOFs.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='EOFs.c' object='cdo-EOFs.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EOFs.obj -MD -MP -MF $(DEPDIR)/cdo-EOFs.Tpo -c -o cdo-EOFs.obj `if test -f 'EOFs.c'; then $(CYGPATH_W) 'EOFs.c'; else $(CYGPATH_W) '$(srcdir)/EOFs.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-EOFs.Tpo $(DEPDIR)/cdo-EOFs.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='EOFs.c' object='cdo-EOFs.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EOFs.obj `if test -f 'EOFs.c'; then $(CYGPATH_W) 'EOFs.c'; else $(CYGPATH_W) '$(srcdir)/EOFs.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EOFs.obj `if test -f 'EOFs.c'; then $(CYGPATH_W) 'EOFs.c'; else $(CYGPATH_W) '$(srcdir)/EOFs.c'; fi`
 
 cdo-Eof3d.o: Eof3d.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eof3d.o -MD -MP -MF $(DEPDIR)/cdo-Eof3d.Tpo -c -o cdo-Eof3d.o `test -f 'Eof3d.c' || echo '$(srcdir)/'`Eof3d.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Eof3d.Tpo $(DEPDIR)/cdo-Eof3d.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Eof3d.c' object='cdo-Eof3d.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eof3d.o -MD -MP -MF $(DEPDIR)/cdo-Eof3d.Tpo -c -o cdo-Eof3d.o `test -f 'Eof3d.c' || echo '$(srcdir)/'`Eof3d.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Eof3d.Tpo $(DEPDIR)/cdo-Eof3d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Eof3d.c' object='cdo-Eof3d.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eof3d.o `test -f 'Eof3d.c' || echo '$(srcdir)/'`Eof3d.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eof3d.o `test -f 'Eof3d.c' || echo '$(srcdir)/'`Eof3d.c
 
 cdo-Eof3d.obj: Eof3d.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eof3d.obj -MD -MP -MF $(DEPDIR)/cdo-Eof3d.Tpo -c -o cdo-Eof3d.obj `if test -f 'Eof3d.c'; then $(CYGPATH_W) 'Eof3d.c'; else $(CYGPATH_W) '$(srcdir)/Eof3d.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Eof3d.Tpo $(DEPDIR)/cdo-Eof3d.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Eof3d.c' object='cdo-Eof3d.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eof3d.obj -MD -MP -MF $(DEPDIR)/cdo-Eof3d.Tpo -c -o cdo-Eof3d.obj `if test -f 'Eof3d.c'; then $(CYGPATH_W) 'Eof3d.c'; else $(CYGPATH_W) '$(srcdir)/Eof3d.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Eof3d.Tpo $(DEPDIR)/cdo-Eof3d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Eof3d.c' object='cdo-Eof3d.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eof3d.obj `if test -f 'Eof3d.c'; then $(CYGPATH_W) 'Eof3d.c'; else $(CYGPATH_W) '$(srcdir)/Eof3d.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eof3d.obj `if test -f 'Eof3d.c'; then $(CYGPATH_W) 'Eof3d.c'; else $(CYGPATH_W) '$(srcdir)/Eof3d.c'; fi`
 
 cdo-EcaIndices.o: EcaIndices.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EcaIndices.o -MD -MP -MF $(DEPDIR)/cdo-EcaIndices.Tpo -c -o cdo-EcaIndices.o `test -f 'EcaIndices.c' || echo '$(srcdir)/'`EcaIndices.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-EcaIndices.Tpo $(DEPDIR)/cdo-EcaIndices.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='EcaIndices.c' object='cdo-EcaIndices.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EcaIndices.o -MD -MP -MF $(DEPDIR)/cdo-EcaIndices.Tpo -c -o cdo-EcaIndices.o `test -f 'EcaIndices.c' || echo '$(srcdir)/'`EcaIndices.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-EcaIndices.Tpo $(DEPDIR)/cdo-EcaIndices.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='EcaIndices.c' object='cdo-EcaIndices.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EcaIndices.o `test -f 'EcaIndices.c' || echo '$(srcdir)/'`EcaIndices.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EcaIndices.o `test -f 'EcaIndices.c' || echo '$(srcdir)/'`EcaIndices.c
 
 cdo-EcaIndices.obj: EcaIndices.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EcaIndices.obj -MD -MP -MF $(DEPDIR)/cdo-EcaIndices.Tpo -c -o cdo-EcaIndices.obj `if test -f 'EcaIndices.c'; then $(CYGPATH_W) 'EcaIndices.c'; else $(CYGPATH_W) '$(srcdir)/EcaIndices.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-EcaIndices.Tpo $(DEPDIR)/cdo-EcaIndices.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='EcaIndices.c' object='cdo-EcaIndices.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-EcaIndices.obj -MD -MP -MF $(DEPDIR)/cdo-EcaIndices.Tpo -c -o cdo-EcaIndices.obj `if test -f 'EcaIndices.c'; then $(CYGPATH_W) 'EcaIndices.c'; else $(CYGPATH_W) '$(srcdir)/EcaIndices.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-EcaIndices.Tpo $(DEPDIR)/cdo-EcaIndices.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='EcaIndices.c' object='cdo-EcaIndices.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EcaIndices.obj `if test -f 'EcaIndices.c'; then $(CYGPATH_W) 'EcaIndices.c'; else $(CYGPATH_W) '$(srcdir)/EcaIndices.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-EcaIndices.obj `if test -f 'EcaIndices.c'; then $(CYGPATH_W) 'EcaIndices.c'; else $(CYGPATH_W) '$(srcdir)/EcaIndices.c'; fi`
 
 cdo-Echam5ini.o: Echam5ini.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Echam5ini.o -MD -MP -MF $(DEPDIR)/cdo-Echam5ini.Tpo -c -o cdo-Echam5ini.o `test -f 'Echam5ini.c' || echo '$(srcdir)/'`Echam5ini.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Echam5ini.Tpo $(DEPDIR)/cdo-Echam5ini.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Echam5ini.c' object='cdo-Echam5ini.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Echam5ini.o -MD -MP -MF $(DEPDIR)/cdo-Echam5ini.Tpo -c -o cdo-Echam5ini.o `test -f 'Echam5ini.c' || echo '$(srcdir)/'`Echam5ini.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Echam5ini.Tpo $(DEPDIR)/cdo-Echam5ini.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Echam5ini.c' object='cdo-Echam5ini.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Echam5ini.o `test -f 'Echam5ini.c' || echo '$(srcdir)/'`Echam5ini.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Echam5ini.o `test -f 'Echam5ini.c' || echo '$(srcdir)/'`Echam5ini.c
 
 cdo-Echam5ini.obj: Echam5ini.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Echam5ini.obj -MD -MP -MF $(DEPDIR)/cdo-Echam5ini.Tpo -c -o cdo-Echam5ini.obj `if test -f 'Echam5ini.c'; then $(CYGPATH_W) 'Echam5ini.c'; else $(CYGPATH_W) '$(srcdir)/Echam5ini.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Echam5ini.Tpo $(DEPDIR)/cdo-Echam5ini.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Echam5ini.c' object='cdo-Echam5ini.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Echam5ini.obj -MD -MP -MF $(DEPDIR)/cdo-Echam5ini.Tpo -c -o cdo-Echam5ini.obj `if test -f 'Echam5ini.c'; then $(CYGPATH_W) 'Echam5ini.c'; else $(CYGPATH_W) '$(srcdir)/Echam5ini.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Echam5ini.Tpo $(DEPDIR)/cdo-Echam5ini.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Echam5ini.c' object='cdo-Echam5ini.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Echam5ini.obj `if test -f 'Echam5ini.c'; then $(CYGPATH_W) 'Echam5ini.c'; else $(CYGPATH_W) '$(srcdir)/Echam5ini.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Echam5ini.obj `if test -f 'Echam5ini.c'; then $(CYGPATH_W) 'Echam5ini.c'; else $(CYGPATH_W) '$(srcdir)/Echam5ini.c'; fi`
 
 cdo-Enlarge.o: Enlarge.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlarge.o -MD -MP -MF $(DEPDIR)/cdo-Enlarge.Tpo -c -o cdo-Enlarge.o `test -f 'Enlarge.c' || echo '$(srcdir)/'`Enlarge.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Enlarge.Tpo $(DEPDIR)/cdo-Enlarge.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Enlarge.c' object='cdo-Enlarge.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlarge.o -MD -MP -MF $(DEPDIR)/cdo-Enlarge.Tpo -c -o cdo-Enlarge.o `test -f 'Enlarge.c' || echo '$(srcdir)/'`Enlarge.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Enlarge.Tpo $(DEPDIR)/cdo-Enlarge.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Enlarge.c' object='cdo-Enlarge.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlarge.o `test -f 'Enlarge.c' || echo '$(srcdir)/'`Enlarge.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlarge.o `test -f 'Enlarge.c' || echo '$(srcdir)/'`Enlarge.c
 
 cdo-Enlarge.obj: Enlarge.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlarge.obj -MD -MP -MF $(DEPDIR)/cdo-Enlarge.Tpo -c -o cdo-Enlarge.obj `if test -f 'Enlarge.c'; then $(CYGPATH_W) 'Enlarge.c'; else $(CYGPATH_W) '$(srcdir)/Enlarge.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Enlarge.Tpo $(DEPDIR)/cdo-Enlarge.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Enlarge.c' object='cdo-Enlarge.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlarge.obj -MD -MP -MF $(DEPDIR)/cdo-Enlarge.Tpo -c -o cdo-Enlarge.obj `if test -f 'Enlarge.c'; then $(CYGPATH_W) 'Enlarge.c'; else $(CYGPATH_W) '$(srcdir)/Enlarge.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Enlarge.Tpo $(DEPDIR)/cdo-Enlarge.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Enlarge.c' object='cdo-Enlarge.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlarge.obj `if test -f 'Enlarge.c'; then $(CYGPATH_W) 'Enlarge.c'; else $(CYGPATH_W) '$(srcdir)/Enlarge.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlarge.obj `if test -f 'Enlarge.c'; then $(CYGPATH_W) 'Enlarge.c'; else $(CYGPATH_W) '$(srcdir)/Enlarge.c'; fi`
 
 cdo-Enlargegrid.o: Enlargegrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlargegrid.o -MD -MP -MF $(DEPDIR)/cdo-Enlargegrid.Tpo -c -o cdo-Enlargegrid.o `test -f 'Enlargegrid.c' || echo '$(srcdir)/'`Enlargegrid.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Enlargegrid.Tpo $(DEPDIR)/cdo-Enlargegrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Enlargegrid.c' object='cdo-Enlargegrid.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlargegrid.o -MD -MP -MF $(DEPDIR)/cdo-Enlargegrid.Tpo -c -o cdo-Enlargegrid.o `test -f 'Enlargegrid.c' || echo '$(srcdir)/'`Enlargegrid.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Enlargegrid.Tpo $(DEPDIR)/cdo-Enlargegrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Enlargegrid.c' object='cdo-Enlargegrid.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlargegrid.o `test -f 'Enlargegrid.c' || echo '$(srcdir)/'`Enlargegrid.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlargegrid.o `test -f 'Enlargegrid.c' || echo '$(srcdir)/'`Enlargegrid.c
 
 cdo-Enlargegrid.obj: Enlargegrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlargegrid.obj -MD -MP -MF $(DEPDIR)/cdo-Enlargegrid.Tpo -c -o cdo-Enlargegrid.obj `if test -f 'Enlargegrid.c'; then $(CYGPATH_W) 'Enlargegrid.c'; else $(CYGPATH_W) '$(srcdir)/Enlargegrid.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Enlargegrid.Tpo $(DEPDIR)/cdo-Enlargegrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Enlargegrid.c' object='cdo-Enlargegrid.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Enlargegrid.obj -MD -MP -MF $(DEPDIR)/cdo-Enlargegrid.Tpo -c -o cdo-Enlargegrid.obj `if test -f 'Enlargegrid.c'; then $(CYGPATH_W) 'Enlargegrid.c'; else $(CYGPATH_W) '$(srcdir)/Enlargegrid.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Enlargegrid.Tpo $(DEPDIR)/cdo-Enlargegrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Enlargegrid.c' object='cdo-Enlargegrid.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlargegrid.obj `if test -f 'Enlargegrid.c'; then $(CYGPATH_W) 'Enlargegrid.c'; else $(CYGPATH_W) '$(srcdir)/Enlargegrid.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Enlargegrid.obj `if test -f 'Enlargegrid.c'; then $(CYGPATH_W) 'Enlargegrid.c'; else $(CYGPATH_W) '$(srcdir)/Enlargegrid.c'; fi`
 
 cdo-Ensstat.o: Ensstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat.o -MD -MP -MF $(DEPDIR)/cdo-Ensstat.Tpo -c -o cdo-Ensstat.o `test -f 'Ensstat.c' || echo '$(srcdir)/'`Ensstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ensstat.Tpo $(DEPDIR)/cdo-Ensstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ensstat.c' object='cdo-Ensstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat.o -MD -MP -MF $(DEPDIR)/cdo-Ensstat.Tpo -c -o cdo-Ensstat.o `test -f 'Ensstat.c' || echo '$(srcdir)/'`Ensstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ensstat.Tpo $(DEPDIR)/cdo-Ensstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ensstat.c' object='cdo-Ensstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat.o `test -f 'Ensstat.c' || echo '$(srcdir)/'`Ensstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat.o `test -f 'Ensstat.c' || echo '$(srcdir)/'`Ensstat.c
 
 cdo-Ensstat.obj: Ensstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat.obj -MD -MP -MF $(DEPDIR)/cdo-Ensstat.Tpo -c -o cdo-Ensstat.obj `if test -f 'Ensstat.c'; then $(CYGPATH_W) 'Ensstat.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ensstat.Tpo $(DEPDIR)/cdo-Ensstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ensstat.c' object='cdo-Ensstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat.obj -MD -MP -MF $(DEPDIR)/cdo-Ensstat.Tpo -c -o cdo-Ensstat.obj `if test -f 'Ensstat.c'; then $(CYGPATH_W) 'Ensstat.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ensstat.Tpo $(DEPDIR)/cdo-Ensstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ensstat.c' object='cdo-Ensstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat.obj `if test -f 'Ensstat.c'; then $(CYGPATH_W) 'Ensstat.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat.obj `if test -f 'Ensstat.c'; then $(CYGPATH_W) 'Ensstat.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat.c'; fi`
 
 cdo-Ensstat3.o: Ensstat3.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat3.o -MD -MP -MF $(DEPDIR)/cdo-Ensstat3.Tpo -c -o cdo-Ensstat3.o `test -f 'Ensstat3.c' || echo '$(srcdir)/'`Ensstat3.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ensstat3.Tpo $(DEPDIR)/cdo-Ensstat3.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ensstat3.c' object='cdo-Ensstat3.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat3.o -MD -MP -MF $(DEPDIR)/cdo-Ensstat3.Tpo -c -o cdo-Ensstat3.o `test -f 'Ensstat3.c' || echo '$(srcdir)/'`Ensstat3.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ensstat3.Tpo $(DEPDIR)/cdo-Ensstat3.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ensstat3.c' object='cdo-Ensstat3.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat3.o `test -f 'Ensstat3.c' || echo '$(srcdir)/'`Ensstat3.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat3.o `test -f 'Ensstat3.c' || echo '$(srcdir)/'`Ensstat3.c
 
 cdo-Ensstat3.obj: Ensstat3.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat3.obj -MD -MP -MF $(DEPDIR)/cdo-Ensstat3.Tpo -c -o cdo-Ensstat3.obj `if test -f 'Ensstat3.c'; then $(CYGPATH_W) 'Ensstat3.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat3.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ensstat3.Tpo $(DEPDIR)/cdo-Ensstat3.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ensstat3.c' object='cdo-Ensstat3.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensstat3.obj -MD -MP -MF $(DEPDIR)/cdo-Ensstat3.Tpo -c -o cdo-Ensstat3.obj `if test -f 'Ensstat3.c'; then $(CYGPATH_W) 'Ensstat3.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat3.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ensstat3.Tpo $(DEPDIR)/cdo-Ensstat3.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ensstat3.c' object='cdo-Ensstat3.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat3.obj `if test -f 'Ensstat3.c'; then $(CYGPATH_W) 'Ensstat3.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat3.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensstat3.obj `if test -f 'Ensstat3.c'; then $(CYGPATH_W) 'Ensstat3.c'; else $(CYGPATH_W) '$(srcdir)/Ensstat3.c'; fi`
 
 cdo-Ensval.o: Ensval.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensval.o -MD -MP -MF $(DEPDIR)/cdo-Ensval.Tpo -c -o cdo-Ensval.o `test -f 'Ensval.c' || echo '$(srcdir)/'`Ensval.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ensval.Tpo $(DEPDIR)/cdo-Ensval.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ensval.c' object='cdo-Ensval.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensval.o -MD -MP -MF $(DEPDIR)/cdo-Ensval.Tpo -c -o cdo-Ensval.o `test -f 'Ensval.c' || echo '$(srcdir)/'`Ensval.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ensval.Tpo $(DEPDIR)/cdo-Ensval.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ensval.c' object='cdo-Ensval.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensval.o `test -f 'Ensval.c' || echo '$(srcdir)/'`Ensval.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensval.o `test -f 'Ensval.c' || echo '$(srcdir)/'`Ensval.c
 
 cdo-Ensval.obj: Ensval.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensval.obj -MD -MP -MF $(DEPDIR)/cdo-Ensval.Tpo -c -o cdo-Ensval.obj `if test -f 'Ensval.c'; then $(CYGPATH_W) 'Ensval.c'; else $(CYGPATH_W) '$(srcdir)/Ensval.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ensval.Tpo $(DEPDIR)/cdo-Ensval.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ensval.c' object='cdo-Ensval.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ensval.obj -MD -MP -MF $(DEPDIR)/cdo-Ensval.Tpo -c -o cdo-Ensval.obj `if test -f 'Ensval.c'; then $(CYGPATH_W) 'Ensval.c'; else $(CYGPATH_W) '$(srcdir)/Ensval.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ensval.Tpo $(DEPDIR)/cdo-Ensval.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ensval.c' object='cdo-Ensval.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensval.obj `if test -f 'Ensval.c'; then $(CYGPATH_W) 'Ensval.c'; else $(CYGPATH_W) '$(srcdir)/Ensval.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ensval.obj `if test -f 'Ensval.c'; then $(CYGPATH_W) 'Ensval.c'; else $(CYGPATH_W) '$(srcdir)/Ensval.c'; fi`
 
 cdo-Eofcoeff.o: Eofcoeff.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff.o -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff.Tpo -c -o cdo-Eofcoeff.o `test -f 'Eofcoeff.c' || echo '$(srcdir)/'`Eofcoeff.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Eofcoeff.Tpo $(DEPDIR)/cdo-Eofcoeff.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Eofcoeff.c' object='cdo-Eofcoeff.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff.o -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff.Tpo -c -o cdo-Eofcoeff.o `test -f 'Eofcoeff.c' || echo '$(srcdir)/'`Eofcoeff.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Eofcoeff.Tpo $(DEPDIR)/cdo-Eofcoeff.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Eofcoeff.c' object='cdo-Eofcoeff.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff.o `test -f 'Eofcoeff.c' || echo '$(srcdir)/'`Eofcoeff.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff.o `test -f 'Eofcoeff.c' || echo '$(srcdir)/'`Eofcoeff.c
 
 cdo-Eofcoeff.obj: Eofcoeff.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff.obj -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff.Tpo -c -o cdo-Eofcoeff.obj `if test -f 'Eofcoeff.c'; then $(CYGPATH_W) 'Eofcoeff.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Eofcoeff.Tpo $(DEPDIR)/cdo-Eofcoeff.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Eofcoeff.c' object='cdo-Eofcoeff.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff.obj -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff.Tpo -c -o cdo-Eofcoeff.obj `if test -f 'Eofcoeff.c'; then $(CYGPATH_W) 'Eofcoeff.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Eofcoeff.Tpo $(DEPDIR)/cdo-Eofcoeff.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Eofcoeff.c' object='cdo-Eofcoeff.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff.obj `if test -f 'Eofcoeff.c'; then $(CYGPATH_W) 'Eofcoeff.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff.obj `if test -f 'Eofcoeff.c'; then $(CYGPATH_W) 'Eofcoeff.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff.c'; fi`
 
 cdo-Eofcoeff3d.o: Eofcoeff3d.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff3d.o -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff3d.Tpo -c -o cdo-Eofcoeff3d.o `test -f 'Eofcoeff3d.c' || echo '$(srcdir)/'`Eofcoeff3d.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Eofcoeff3d.Tpo $(DEPDIR)/cdo-Eofcoeff3d.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Eofcoeff3d.c' object='cdo-Eofcoeff3d.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff3d.o -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff3d.Tpo -c -o cdo-Eofcoeff3d.o `test -f 'Eofcoeff3d.c' || echo '$(srcdir)/'`Eofcoeff3d.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Eofcoeff3d.Tpo $(DEPDIR)/cdo-Eofcoeff3d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Eofcoeff3d.c' object='cdo-Eofcoeff3d.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff3d.o `test -f 'Eofcoeff3d.c' || echo '$(srcdir)/'`Eofcoeff3d.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff3d.o `test -f 'Eofcoeff3d.c' || echo '$(srcdir)/'`Eofcoeff3d.c
 
 cdo-Eofcoeff3d.obj: Eofcoeff3d.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff3d.obj -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff3d.Tpo -c -o cdo-Eofcoeff3d.obj `if test -f 'Eofcoeff3d.c'; then $(CYGPATH_W) 'Eofcoeff3d.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff3d.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Eofcoeff3d.Tpo $(DEPDIR)/cdo-Eofcoeff3d.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Eofcoeff3d.c' object='cdo-Eofcoeff3d.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Eofcoeff3d.obj -MD -MP -MF $(DEPDIR)/cdo-Eofcoeff3d.Tpo -c -o cdo-Eofcoeff3d.obj `if test -f 'Eofcoeff3d.c'; then $(CYGPATH_W) 'Eofcoeff3d.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff3d.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Eofcoeff3d.Tpo $(DEPDIR)/cdo-Eofcoeff3d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Eofcoeff3d.c' object='cdo-Eofcoeff3d.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff3d.obj `if test -f 'Eofcoeff3d.c'; then $(CYGPATH_W) 'Eofcoeff3d.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff3d.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Eofcoeff3d.obj `if test -f 'Eofcoeff3d.c'; then $(CYGPATH_W) 'Eofcoeff3d.c'; else $(CYGPATH_W) '$(srcdir)/Eofcoeff3d.c'; fi`
 
 cdo-Exprf.o: Exprf.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Exprf.o -MD -MP -MF $(DEPDIR)/cdo-Exprf.Tpo -c -o cdo-Exprf.o `test -f 'Exprf.c' || echo '$(srcdir)/'`Exprf.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Exprf.Tpo $(DEPDIR)/cdo-Exprf.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Exprf.c' object='cdo-Exprf.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Exprf.o -MD -MP -MF $(DEPDIR)/cdo-Exprf.Tpo -c -o cdo-Exprf.o `test -f 'Exprf.c' || echo '$(srcdir)/'`Exprf.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Exprf.Tpo $(DEPDIR)/cdo-Exprf.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Exprf.c' object='cdo-Exprf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Exprf.o `test -f 'Exprf.c' || echo '$(srcdir)/'`Exprf.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Exprf.o `test -f 'Exprf.c' || echo '$(srcdir)/'`Exprf.c
 
 cdo-Exprf.obj: Exprf.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Exprf.obj -MD -MP -MF $(DEPDIR)/cdo-Exprf.Tpo -c -o cdo-Exprf.obj `if test -f 'Exprf.c'; then $(CYGPATH_W) 'Exprf.c'; else $(CYGPATH_W) '$(srcdir)/Exprf.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Exprf.Tpo $(DEPDIR)/cdo-Exprf.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Exprf.c' object='cdo-Exprf.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Exprf.obj -MD -MP -MF $(DEPDIR)/cdo-Exprf.Tpo -c -o cdo-Exprf.obj `if test -f 'Exprf.c'; then $(CYGPATH_W) 'Exprf.c'; else $(CYGPATH_W) '$(srcdir)/Exprf.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Exprf.Tpo $(DEPDIR)/cdo-Exprf.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Exprf.c' object='cdo-Exprf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Exprf.obj `if test -f 'Exprf.c'; then $(CYGPATH_W) 'Exprf.c'; else $(CYGPATH_W) '$(srcdir)/Exprf.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Exprf.obj `if test -f 'Exprf.c'; then $(CYGPATH_W) 'Exprf.c'; else $(CYGPATH_W) '$(srcdir)/Exprf.c'; fi`
 
 cdo-FC.o: FC.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-FC.o -MD -MP -MF $(DEPDIR)/cdo-FC.Tpo -c -o cdo-FC.o `test -f 'FC.c' || echo '$(srcdir)/'`FC.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-FC.Tpo $(DEPDIR)/cdo-FC.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='FC.c' object='cdo-FC.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-FC.o -MD -MP -MF $(DEPDIR)/cdo-FC.Tpo -c -o cdo-FC.o `test -f 'FC.c' || echo '$(srcdir)/'`FC.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-FC.Tpo $(DEPDIR)/cdo-FC.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='FC.c' object='cdo-FC.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-FC.o `test -f 'FC.c' || echo '$(srcdir)/'`FC.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-FC.o `test -f 'FC.c' || echo '$(srcdir)/'`FC.c
 
 cdo-FC.obj: FC.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-FC.obj -MD -MP -MF $(DEPDIR)/cdo-FC.Tpo -c -o cdo-FC.obj `if test -f 'FC.c'; then $(CYGPATH_W) 'FC.c'; else $(CYGPATH_W) '$(srcdir)/FC.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-FC.Tpo $(DEPDIR)/cdo-FC.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='FC.c' object='cdo-FC.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-FC.obj -MD -MP -MF $(DEPDIR)/cdo-FC.Tpo -c -o cdo-FC.obj `if test -f 'FC.c'; then $(CYGPATH_W) 'FC.c'; else $(CYGPATH_W) '$(srcdir)/FC.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-FC.Tpo $(DEPDIR)/cdo-FC.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='FC.c' object='cdo-FC.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-FC.obj `if test -f 'FC.c'; then $(CYGPATH_W) 'FC.c'; else $(CYGPATH_W) '$(srcdir)/FC.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-FC.obj `if test -f 'FC.c'; then $(CYGPATH_W) 'FC.c'; else $(CYGPATH_W) '$(srcdir)/FC.c'; fi`
 
 cdo-Filedes.o: Filedes.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filedes.o -MD -MP -MF $(DEPDIR)/cdo-Filedes.Tpo -c -o cdo-Filedes.o `test -f 'Filedes.c' || echo '$(srcdir)/'`Filedes.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Filedes.Tpo $(DEPDIR)/cdo-Filedes.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Filedes.c' object='cdo-Filedes.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filedes.o -MD -MP -MF $(DEPDIR)/cdo-Filedes.Tpo -c -o cdo-Filedes.o `test -f 'Filedes.c' || echo '$(srcdir)/'`Filedes.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Filedes.Tpo $(DEPDIR)/cdo-Filedes.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Filedes.c' object='cdo-Filedes.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filedes.o `test -f 'Filedes.c' || echo '$(srcdir)/'`Filedes.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filedes.o `test -f 'Filedes.c' || echo '$(srcdir)/'`Filedes.c
 
 cdo-Filedes.obj: Filedes.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filedes.obj -MD -MP -MF $(DEPDIR)/cdo-Filedes.Tpo -c -o cdo-Filedes.obj `if test -f 'Filedes.c'; then $(CYGPATH_W) 'Filedes.c'; else $(CYGPATH_W) '$(srcdir)/Filedes.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Filedes.Tpo $(DEPDIR)/cdo-Filedes.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Filedes.c' object='cdo-Filedes.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filedes.obj -MD -MP -MF $(DEPDIR)/cdo-Filedes.Tpo -c -o cdo-Filedes.obj `if test -f 'Filedes.c'; then $(CYGPATH_W) 'Filedes.c'; else $(CYGPATH_W) '$(srcdir)/Filedes.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Filedes.Tpo $(DEPDIR)/cdo-Filedes.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Filedes.c' object='cdo-Filedes.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filedes.obj `if test -f 'Filedes.c'; then $(CYGPATH_W) 'Filedes.c'; else $(CYGPATH_W) '$(srcdir)/Filedes.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filedes.obj `if test -f 'Filedes.c'; then $(CYGPATH_W) 'Filedes.c'; else $(CYGPATH_W) '$(srcdir)/Filedes.c'; fi`
 
 cdo-Fillmiss.o: Fillmiss.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fillmiss.o -MD -MP -MF $(DEPDIR)/cdo-Fillmiss.Tpo -c -o cdo-Fillmiss.o `test -f 'Fillmiss.c' || echo '$(srcdir)/'`Fillmiss.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fillmiss.Tpo $(DEPDIR)/cdo-Fillmiss.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fillmiss.c' object='cdo-Fillmiss.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fillmiss.o -MD -MP -MF $(DEPDIR)/cdo-Fillmiss.Tpo -c -o cdo-Fillmiss.o `test -f 'Fillmiss.c' || echo '$(srcdir)/'`Fillmiss.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fillmiss.Tpo $(DEPDIR)/cdo-Fillmiss.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fillmiss.c' object='cdo-Fillmiss.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fillmiss.o `test -f 'Fillmiss.c' || echo '$(srcdir)/'`Fillmiss.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fillmiss.o `test -f 'Fillmiss.c' || echo '$(srcdir)/'`Fillmiss.c
 
 cdo-Fillmiss.obj: Fillmiss.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fillmiss.obj -MD -MP -MF $(DEPDIR)/cdo-Fillmiss.Tpo -c -o cdo-Fillmiss.obj `if test -f 'Fillmiss.c'; then $(CYGPATH_W) 'Fillmiss.c'; else $(CYGPATH_W) '$(srcdir)/Fillmiss.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fillmiss.Tpo $(DEPDIR)/cdo-Fillmiss.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fillmiss.c' object='cdo-Fillmiss.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fillmiss.obj -MD -MP -MF $(DEPDIR)/cdo-Fillmiss.Tpo -c -o cdo-Fillmiss.obj `if test -f 'Fillmiss.c'; then $(CYGPATH_W) 'Fillmiss.c'; else $(CYGPATH_W) '$(srcdir)/Fillmiss.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fillmiss.Tpo $(DEPDIR)/cdo-Fillmiss.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fillmiss.c' object='cdo-Fillmiss.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fillmiss.obj `if test -f 'Fillmiss.c'; then $(CYGPATH_W) 'Fillmiss.c'; else $(CYGPATH_W) '$(srcdir)/Fillmiss.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fillmiss.obj `if test -f 'Fillmiss.c'; then $(CYGPATH_W) 'Fillmiss.c'; else $(CYGPATH_W) '$(srcdir)/Fillmiss.c'; fi`
 
 cdo-Filter.o: Filter.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filter.o -MD -MP -MF $(DEPDIR)/cdo-Filter.Tpo -c -o cdo-Filter.o `test -f 'Filter.c' || echo '$(srcdir)/'`Filter.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Filter.Tpo $(DEPDIR)/cdo-Filter.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Filter.c' object='cdo-Filter.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filter.o -MD -MP -MF $(DEPDIR)/cdo-Filter.Tpo -c -o cdo-Filter.o `test -f 'Filter.c' || echo '$(srcdir)/'`Filter.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Filter.Tpo $(DEPDIR)/cdo-Filter.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Filter.c' object='cdo-Filter.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filter.o `test -f 'Filter.c' || echo '$(srcdir)/'`Filter.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filter.o `test -f 'Filter.c' || echo '$(srcdir)/'`Filter.c
 
 cdo-Filter.obj: Filter.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filter.obj -MD -MP -MF $(DEPDIR)/cdo-Filter.Tpo -c -o cdo-Filter.obj `if test -f 'Filter.c'; then $(CYGPATH_W) 'Filter.c'; else $(CYGPATH_W) '$(srcdir)/Filter.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Filter.Tpo $(DEPDIR)/cdo-Filter.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Filter.c' object='cdo-Filter.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Filter.obj -MD -MP -MF $(DEPDIR)/cdo-Filter.Tpo -c -o cdo-Filter.obj `if test -f 'Filter.c'; then $(CYGPATH_W) 'Filter.c'; else $(CYGPATH_W) '$(srcdir)/Filter.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Filter.Tpo $(DEPDIR)/cdo-Filter.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Filter.c' object='cdo-Filter.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filter.obj `if test -f 'Filter.c'; then $(CYGPATH_W) 'Filter.c'; else $(CYGPATH_W) '$(srcdir)/Filter.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Filter.obj `if test -f 'Filter.c'; then $(CYGPATH_W) 'Filter.c'; else $(CYGPATH_W) '$(srcdir)/Filter.c'; fi`
 
 cdo-Fldrms.o: Fldrms.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldrms.o -MD -MP -MF $(DEPDIR)/cdo-Fldrms.Tpo -c -o cdo-Fldrms.o `test -f 'Fldrms.c' || echo '$(srcdir)/'`Fldrms.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fldrms.Tpo $(DEPDIR)/cdo-Fldrms.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fldrms.c' object='cdo-Fldrms.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldrms.o -MD -MP -MF $(DEPDIR)/cdo-Fldrms.Tpo -c -o cdo-Fldrms.o `test -f 'Fldrms.c' || echo '$(srcdir)/'`Fldrms.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fldrms.Tpo $(DEPDIR)/cdo-Fldrms.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fldrms.c' object='cdo-Fldrms.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldrms.o `test -f 'Fldrms.c' || echo '$(srcdir)/'`Fldrms.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldrms.o `test -f 'Fldrms.c' || echo '$(srcdir)/'`Fldrms.c
 
 cdo-Fldrms.obj: Fldrms.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldrms.obj -MD -MP -MF $(DEPDIR)/cdo-Fldrms.Tpo -c -o cdo-Fldrms.obj `if test -f 'Fldrms.c'; then $(CYGPATH_W) 'Fldrms.c'; else $(CYGPATH_W) '$(srcdir)/Fldrms.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fldrms.Tpo $(DEPDIR)/cdo-Fldrms.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fldrms.c' object='cdo-Fldrms.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldrms.obj -MD -MP -MF $(DEPDIR)/cdo-Fldrms.Tpo -c -o cdo-Fldrms.obj `if test -f 'Fldrms.c'; then $(CYGPATH_W) 'Fldrms.c'; else $(CYGPATH_W) '$(srcdir)/Fldrms.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fldrms.Tpo $(DEPDIR)/cdo-Fldrms.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fldrms.c' object='cdo-Fldrms.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldrms.obj `if test -f 'Fldrms.c'; then $(CYGPATH_W) 'Fldrms.c'; else $(CYGPATH_W) '$(srcdir)/Fldrms.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldrms.obj `if test -f 'Fldrms.c'; then $(CYGPATH_W) 'Fldrms.c'; else $(CYGPATH_W) '$(srcdir)/Fldrms.c'; fi`
 
 cdo-Fldstat.o: Fldstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat.o -MD -MP -MF $(DEPDIR)/cdo-Fldstat.Tpo -c -o cdo-Fldstat.o `test -f 'Fldstat.c' || echo '$(srcdir)/'`Fldstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fldstat.Tpo $(DEPDIR)/cdo-Fldstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fldstat.c' object='cdo-Fldstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat.o -MD -MP -MF $(DEPDIR)/cdo-Fldstat.Tpo -c -o cdo-Fldstat.o `test -f 'Fldstat.c' || echo '$(srcdir)/'`Fldstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fldstat.Tpo $(DEPDIR)/cdo-Fldstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fldstat.c' object='cdo-Fldstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat.o `test -f 'Fldstat.c' || echo '$(srcdir)/'`Fldstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat.o `test -f 'Fldstat.c' || echo '$(srcdir)/'`Fldstat.c
 
 cdo-Fldstat.obj: Fldstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat.obj -MD -MP -MF $(DEPDIR)/cdo-Fldstat.Tpo -c -o cdo-Fldstat.obj `if test -f 'Fldstat.c'; then $(CYGPATH_W) 'Fldstat.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fldstat.Tpo $(DEPDIR)/cdo-Fldstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fldstat.c' object='cdo-Fldstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat.obj -MD -MP -MF $(DEPDIR)/cdo-Fldstat.Tpo -c -o cdo-Fldstat.obj `if test -f 'Fldstat.c'; then $(CYGPATH_W) 'Fldstat.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fldstat.Tpo $(DEPDIR)/cdo-Fldstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fldstat.c' object='cdo-Fldstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat.obj `if test -f 'Fldstat.c'; then $(CYGPATH_W) 'Fldstat.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat.obj `if test -f 'Fldstat.c'; then $(CYGPATH_W) 'Fldstat.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat.c'; fi`
 
 cdo-Fldstat2.o: Fldstat2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat2.o -MD -MP -MF $(DEPDIR)/cdo-Fldstat2.Tpo -c -o cdo-Fldstat2.o `test -f 'Fldstat2.c' || echo '$(srcdir)/'`Fldstat2.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fldstat2.Tpo $(DEPDIR)/cdo-Fldstat2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fldstat2.c' object='cdo-Fldstat2.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat2.o -MD -MP -MF $(DEPDIR)/cdo-Fldstat2.Tpo -c -o cdo-Fldstat2.o `test -f 'Fldstat2.c' || echo '$(srcdir)/'`Fldstat2.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fldstat2.Tpo $(DEPDIR)/cdo-Fldstat2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fldstat2.c' object='cdo-Fldstat2.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat2.o `test -f 'Fldstat2.c' || echo '$(srcdir)/'`Fldstat2.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat2.o `test -f 'Fldstat2.c' || echo '$(srcdir)/'`Fldstat2.c
 
 cdo-Fldstat2.obj: Fldstat2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat2.obj -MD -MP -MF $(DEPDIR)/cdo-Fldstat2.Tpo -c -o cdo-Fldstat2.obj `if test -f 'Fldstat2.c'; then $(CYGPATH_W) 'Fldstat2.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat2.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fldstat2.Tpo $(DEPDIR)/cdo-Fldstat2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fldstat2.c' object='cdo-Fldstat2.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fldstat2.obj -MD -MP -MF $(DEPDIR)/cdo-Fldstat2.Tpo -c -o cdo-Fldstat2.obj `if test -f 'Fldstat2.c'; then $(CYGPATH_W) 'Fldstat2.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat2.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fldstat2.Tpo $(DEPDIR)/cdo-Fldstat2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fldstat2.c' object='cdo-Fldstat2.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat2.obj `if test -f 'Fldstat2.c'; then $(CYGPATH_W) 'Fldstat2.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat2.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fldstat2.obj `if test -f 'Fldstat2.c'; then $(CYGPATH_W) 'Fldstat2.c'; else $(CYGPATH_W) '$(srcdir)/Fldstat2.c'; fi`
 
 cdo-Fourier.o: Fourier.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fourier.o -MD -MP -MF $(DEPDIR)/cdo-Fourier.Tpo -c -o cdo-Fourier.o `test -f 'Fourier.c' || echo '$(srcdir)/'`Fourier.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fourier.Tpo $(DEPDIR)/cdo-Fourier.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fourier.c' object='cdo-Fourier.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fourier.o -MD -MP -MF $(DEPDIR)/cdo-Fourier.Tpo -c -o cdo-Fourier.o `test -f 'Fourier.c' || echo '$(srcdir)/'`Fourier.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fourier.Tpo $(DEPDIR)/cdo-Fourier.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fourier.c' object='cdo-Fourier.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fourier.o `test -f 'Fourier.c' || echo '$(srcdir)/'`Fourier.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fourier.o `test -f 'Fourier.c' || echo '$(srcdir)/'`Fourier.c
 
 cdo-Fourier.obj: Fourier.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fourier.obj -MD -MP -MF $(DEPDIR)/cdo-Fourier.Tpo -c -o cdo-Fourier.obj `if test -f 'Fourier.c'; then $(CYGPATH_W) 'Fourier.c'; else $(CYGPATH_W) '$(srcdir)/Fourier.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Fourier.Tpo $(DEPDIR)/cdo-Fourier.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Fourier.c' object='cdo-Fourier.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Fourier.obj -MD -MP -MF $(DEPDIR)/cdo-Fourier.Tpo -c -o cdo-Fourier.obj `if test -f 'Fourier.c'; then $(CYGPATH_W) 'Fourier.c'; else $(CYGPATH_W) '$(srcdir)/Fourier.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Fourier.Tpo $(DEPDIR)/cdo-Fourier.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Fourier.c' object='cdo-Fourier.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fourier.obj `if test -f 'Fourier.c'; then $(CYGPATH_W) 'Fourier.c'; else $(CYGPATH_W) '$(srcdir)/Fourier.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Fourier.obj `if test -f 'Fourier.c'; then $(CYGPATH_W) 'Fourier.c'; else $(CYGPATH_W) '$(srcdir)/Fourier.c'; fi`
 
 cdo-Gather.o: Gather.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gather.o -MD -MP -MF $(DEPDIR)/cdo-Gather.Tpo -c -o cdo-Gather.o `test -f 'Gather.c' || echo '$(srcdir)/'`Gather.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gather.Tpo $(DEPDIR)/cdo-Gather.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gather.c' object='cdo-Gather.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gather.o -MD -MP -MF $(DEPDIR)/cdo-Gather.Tpo -c -o cdo-Gather.o `test -f 'Gather.c' || echo '$(srcdir)/'`Gather.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gather.Tpo $(DEPDIR)/cdo-Gather.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gather.c' object='cdo-Gather.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gather.o `test -f 'Gather.c' || echo '$(srcdir)/'`Gather.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gather.o `test -f 'Gather.c' || echo '$(srcdir)/'`Gather.c
 
 cdo-Gather.obj: Gather.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gather.obj -MD -MP -MF $(DEPDIR)/cdo-Gather.Tpo -c -o cdo-Gather.obj `if test -f 'Gather.c'; then $(CYGPATH_W) 'Gather.c'; else $(CYGPATH_W) '$(srcdir)/Gather.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gather.Tpo $(DEPDIR)/cdo-Gather.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gather.c' object='cdo-Gather.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gather.obj -MD -MP -MF $(DEPDIR)/cdo-Gather.Tpo -c -o cdo-Gather.obj `if test -f 'Gather.c'; then $(CYGPATH_W) 'Gather.c'; else $(CYGPATH_W) '$(srcdir)/Gather.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gather.Tpo $(DEPDIR)/cdo-Gather.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gather.c' object='cdo-Gather.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gather.obj `if test -f 'Gather.c'; then $(CYGPATH_W) 'Gather.c'; else $(CYGPATH_W) '$(srcdir)/Gather.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gather.obj `if test -f 'Gather.c'; then $(CYGPATH_W) 'Gather.c'; else $(CYGPATH_W) '$(srcdir)/Gather.c'; fi`
 
 cdo-Gengrid.o: Gengrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gengrid.o -MD -MP -MF $(DEPDIR)/cdo-Gengrid.Tpo -c -o cdo-Gengrid.o `test -f 'Gengrid.c' || echo '$(srcdir)/'`Gengrid.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gengrid.Tpo $(DEPDIR)/cdo-Gengrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gengrid.c' object='cdo-Gengrid.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gengrid.o -MD -MP -MF $(DEPDIR)/cdo-Gengrid.Tpo -c -o cdo-Gengrid.o `test -f 'Gengrid.c' || echo '$(srcdir)/'`Gengrid.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gengrid.Tpo $(DEPDIR)/cdo-Gengrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gengrid.c' object='cdo-Gengrid.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gengrid.o `test -f 'Gengrid.c' || echo '$(srcdir)/'`Gengrid.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gengrid.o `test -f 'Gengrid.c' || echo '$(srcdir)/'`Gengrid.c
 
 cdo-Gengrid.obj: Gengrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gengrid.obj -MD -MP -MF $(DEPDIR)/cdo-Gengrid.Tpo -c -o cdo-Gengrid.obj `if test -f 'Gengrid.c'; then $(CYGPATH_W) 'Gengrid.c'; else $(CYGPATH_W) '$(srcdir)/Gengrid.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gengrid.Tpo $(DEPDIR)/cdo-Gengrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gengrid.c' object='cdo-Gengrid.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gengrid.obj -MD -MP -MF $(DEPDIR)/cdo-Gengrid.Tpo -c -o cdo-Gengrid.obj `if test -f 'Gengrid.c'; then $(CYGPATH_W) 'Gengrid.c'; else $(CYGPATH_W) '$(srcdir)/Gengrid.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gengrid.Tpo $(DEPDIR)/cdo-Gengrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gengrid.c' object='cdo-Gengrid.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gengrid.obj `if test -f 'Gengrid.c'; then $(CYGPATH_W) 'Gengrid.c'; else $(CYGPATH_W) '$(srcdir)/Gengrid.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gengrid.obj `if test -f 'Gengrid.c'; then $(CYGPATH_W) 'Gengrid.c'; else $(CYGPATH_W) '$(srcdir)/Gengrid.c'; fi`
 
 cdo-Gradsdes.o: Gradsdes.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gradsdes.o -MD -MP -MF $(DEPDIR)/cdo-Gradsdes.Tpo -c -o cdo-Gradsdes.o `test -f 'Gradsdes.c' || echo '$(srcdir)/'`Gradsdes.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gradsdes.Tpo $(DEPDIR)/cdo-Gradsdes.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gradsdes.c' object='cdo-Gradsdes.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gradsdes.o -MD -MP -MF $(DEPDIR)/cdo-Gradsdes.Tpo -c -o cdo-Gradsdes.o `test -f 'Gradsdes.c' || echo '$(srcdir)/'`Gradsdes.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gradsdes.Tpo $(DEPDIR)/cdo-Gradsdes.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gradsdes.c' object='cdo-Gradsdes.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gradsdes.o `test -f 'Gradsdes.c' || echo '$(srcdir)/'`Gradsdes.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gradsdes.o `test -f 'Gradsdes.c' || echo '$(srcdir)/'`Gradsdes.c
 
 cdo-Gradsdes.obj: Gradsdes.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gradsdes.obj -MD -MP -MF $(DEPDIR)/cdo-Gradsdes.Tpo -c -o cdo-Gradsdes.obj `if test -f 'Gradsdes.c'; then $(CYGPATH_W) 'Gradsdes.c'; else $(CYGPATH_W) '$(srcdir)/Gradsdes.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gradsdes.Tpo $(DEPDIR)/cdo-Gradsdes.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gradsdes.c' object='cdo-Gradsdes.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gradsdes.obj -MD -MP -MF $(DEPDIR)/cdo-Gradsdes.Tpo -c -o cdo-Gradsdes.obj `if test -f 'Gradsdes.c'; then $(CYGPATH_W) 'Gradsdes.c'; else $(CYGPATH_W) '$(srcdir)/Gradsdes.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gradsdes.Tpo $(DEPDIR)/cdo-Gradsdes.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gradsdes.c' object='cdo-Gradsdes.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gradsdes.obj `if test -f 'Gradsdes.c'; then $(CYGPATH_W) 'Gradsdes.c'; else $(CYGPATH_W) '$(srcdir)/Gradsdes.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gradsdes.obj `if test -f 'Gradsdes.c'; then $(CYGPATH_W) 'Gradsdes.c'; else $(CYGPATH_W) '$(srcdir)/Gradsdes.c'; fi`
 
 cdo-Gridboxstat.o: Gridboxstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridboxstat.o -MD -MP -MF $(DEPDIR)/cdo-Gridboxstat.Tpo -c -o cdo-Gridboxstat.o `test -f 'Gridboxstat.c' || echo '$(srcdir)/'`Gridboxstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gridboxstat.Tpo $(DEPDIR)/cdo-Gridboxstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gridboxstat.c' object='cdo-Gridboxstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridboxstat.o -MD -MP -MF $(DEPDIR)/cdo-Gridboxstat.Tpo -c -o cdo-Gridboxstat.o `test -f 'Gridboxstat.c' || echo '$(srcdir)/'`Gridboxstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gridboxstat.Tpo $(DEPDIR)/cdo-Gridboxstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gridboxstat.c' object='cdo-Gridboxstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridboxstat.o `test -f 'Gridboxstat.c' || echo '$(srcdir)/'`Gridboxstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridboxstat.o `test -f 'Gridboxstat.c' || echo '$(srcdir)/'`Gridboxstat.c
 
 cdo-Gridboxstat.obj: Gridboxstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridboxstat.obj -MD -MP -MF $(DEPDIR)/cdo-Gridboxstat.Tpo -c -o cdo-Gridboxstat.obj `if test -f 'Gridboxstat.c'; then $(CYGPATH_W) 'Gridboxstat.c'; else $(CYGPATH_W) '$(srcdir)/Gridboxstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gridboxstat.Tpo $(DEPDIR)/cdo-Gridboxstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gridboxstat.c' object='cdo-Gridboxstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridboxstat.obj -MD -MP -MF $(DEPDIR)/cdo-Gridboxstat.Tpo -c -o cdo-Gridboxstat.obj `if test -f 'Gridboxstat.c'; then $(CYGPATH_W) 'Gridboxstat.c'; else $(CYGPATH_W) '$(srcdir)/Gridboxstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gridboxstat.Tpo $(DEPDIR)/cdo-Gridboxstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gridboxstat.c' object='cdo-Gridboxstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridboxstat.obj `if test -f 'Gridboxstat.c'; then $(CYGPATH_W) 'Gridboxstat.c'; else $(CYGPATH_W) '$(srcdir)/Gridboxstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridboxstat.obj `if test -f 'Gridboxstat.c'; then $(CYGPATH_W) 'Gridboxstat.c'; else $(CYGPATH_W) '$(srcdir)/Gridboxstat.c'; fi`
 
 cdo-Gridcell.o: Gridcell.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridcell.o -MD -MP -MF $(DEPDIR)/cdo-Gridcell.Tpo -c -o cdo-Gridcell.o `test -f 'Gridcell.c' || echo '$(srcdir)/'`Gridcell.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gridcell.Tpo $(DEPDIR)/cdo-Gridcell.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gridcell.c' object='cdo-Gridcell.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridcell.o -MD -MP -MF $(DEPDIR)/cdo-Gridcell.Tpo -c -o cdo-Gridcell.o `test -f 'Gridcell.c' || echo '$(srcdir)/'`Gridcell.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gridcell.Tpo $(DEPDIR)/cdo-Gridcell.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gridcell.c' object='cdo-Gridcell.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridcell.o `test -f 'Gridcell.c' || echo '$(srcdir)/'`Gridcell.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridcell.o `test -f 'Gridcell.c' || echo '$(srcdir)/'`Gridcell.c
 
 cdo-Gridcell.obj: Gridcell.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridcell.obj -MD -MP -MF $(DEPDIR)/cdo-Gridcell.Tpo -c -o cdo-Gridcell.obj `if test -f 'Gridcell.c'; then $(CYGPATH_W) 'Gridcell.c'; else $(CYGPATH_W) '$(srcdir)/Gridcell.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Gridcell.Tpo $(DEPDIR)/cdo-Gridcell.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Gridcell.c' object='cdo-Gridcell.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridcell.obj -MD -MP -MF $(DEPDIR)/cdo-Gridcell.Tpo -c -o cdo-Gridcell.obj `if test -f 'Gridcell.c'; then $(CYGPATH_W) 'Gridcell.c'; else $(CYGPATH_W) '$(srcdir)/Gridcell.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gridcell.Tpo $(DEPDIR)/cdo-Gridcell.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Gridcell.c' object='cdo-Gridcell.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridcell.obj `if test -f 'Gridcell.c'; then $(CYGPATH_W) 'Gridcell.c'; else $(CYGPATH_W) '$(srcdir)/Gridcell.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridcell.obj `if test -f 'Gridcell.c'; then $(CYGPATH_W) 'Gridcell.c'; else $(CYGPATH_W) '$(srcdir)/Gridcell.c'; fi`
 
 cdo-Harmonic.o: Harmonic.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Harmonic.o -MD -MP -MF $(DEPDIR)/cdo-Harmonic.Tpo -c -o cdo-Harmonic.o `test -f 'Harmonic.c' || echo '$(srcdir)/'`Harmonic.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Harmonic.Tpo $(DEPDIR)/cdo-Harmonic.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Harmonic.c' object='cdo-Harmonic.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Harmonic.o -MD -MP -MF $(DEPDIR)/cdo-Harmonic.Tpo -c -o cdo-Harmonic.o `test -f 'Harmonic.c' || echo '$(srcdir)/'`Harmonic.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Harmonic.Tpo $(DEPDIR)/cdo-Harmonic.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Harmonic.c' object='cdo-Harmonic.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Harmonic.o `test -f 'Harmonic.c' || echo '$(srcdir)/'`Harmonic.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Harmonic.o `test -f 'Harmonic.c' || echo '$(srcdir)/'`Harmonic.c
 
 cdo-Harmonic.obj: Harmonic.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Harmonic.obj -MD -MP -MF $(DEPDIR)/cdo-Harmonic.Tpo -c -o cdo-Harmonic.obj `if test -f 'Harmonic.c'; then $(CYGPATH_W) 'Harmonic.c'; else $(CYGPATH_W) '$(srcdir)/Harmonic.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Harmonic.Tpo $(DEPDIR)/cdo-Harmonic.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Harmonic.c' object='cdo-Harmonic.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Harmonic.obj -MD -MP -MF $(DEPDIR)/cdo-Harmonic.Tpo -c -o cdo-Harmonic.obj `if test -f 'Harmonic.c'; then $(CYGPATH_W) 'Harmonic.c'; else $(CYGPATH_W) '$(srcdir)/Harmonic.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Harmonic.Tpo $(DEPDIR)/cdo-Harmonic.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Harmonic.c' object='cdo-Harmonic.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Harmonic.obj `if test -f 'Harmonic.c'; then $(CYGPATH_W) 'Harmonic.c'; else $(CYGPATH_W) '$(srcdir)/Harmonic.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Harmonic.obj `if test -f 'Harmonic.c'; then $(CYGPATH_W) 'Harmonic.c'; else $(CYGPATH_W) '$(srcdir)/Harmonic.c'; fi`
 
 cdo-Hi.o: Hi.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Hi.o -MD -MP -MF $(DEPDIR)/cdo-Hi.Tpo -c -o cdo-Hi.o `test -f 'Hi.c' || echo '$(srcdir)/'`Hi.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Hi.Tpo $(DEPDIR)/cdo-Hi.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Hi.c' object='cdo-Hi.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Hi.o -MD -MP -MF $(DEPDIR)/cdo-Hi.Tpo -c -o cdo-Hi.o `test -f 'Hi.c' || echo '$(srcdir)/'`Hi.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Hi.Tpo $(DEPDIR)/cdo-Hi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Hi.c' object='cdo-Hi.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Hi.o `test -f 'Hi.c' || echo '$(srcdir)/'`Hi.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Hi.o `test -f 'Hi.c' || echo '$(srcdir)/'`Hi.c
 
 cdo-Hi.obj: Hi.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Hi.obj -MD -MP -MF $(DEPDIR)/cdo-Hi.Tpo -c -o cdo-Hi.obj `if test -f 'Hi.c'; then $(CYGPATH_W) 'Hi.c'; else $(CYGPATH_W) '$(srcdir)/Hi.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Hi.Tpo $(DEPDIR)/cdo-Hi.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Hi.c' object='cdo-Hi.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Hi.obj -MD -MP -MF $(DEPDIR)/cdo-Hi.Tpo -c -o cdo-Hi.obj `if test -f 'Hi.c'; then $(CYGPATH_W) 'Hi.c'; else $(CYGPATH_W) '$(srcdir)/Hi.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Hi.Tpo $(DEPDIR)/cdo-Hi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Hi.c' object='cdo-Hi.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Hi.obj `if test -f 'Hi.c'; then $(CYGPATH_W) 'Hi.c'; else $(CYGPATH_W) '$(srcdir)/Hi.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Hi.obj `if test -f 'Hi.c'; then $(CYGPATH_W) 'Hi.c'; else $(CYGPATH_W) '$(srcdir)/Hi.c'; fi`
 
 cdo-Histogram.o: Histogram.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Histogram.o -MD -MP -MF $(DEPDIR)/cdo-Histogram.Tpo -c -o cdo-Histogram.o `test -f 'Histogram.c' || echo '$(srcdir)/'`Histogram.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Histogram.Tpo $(DEPDIR)/cdo-Histogram.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Histogram.c' object='cdo-Histogram.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Histogram.o -MD -MP -MF $(DEPDIR)/cdo-Histogram.Tpo -c -o cdo-Histogram.o `test -f 'Histogram.c' || echo '$(srcdir)/'`Histogram.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Histogram.Tpo $(DEPDIR)/cdo-Histogram.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Histogram.c' object='cdo-Histogram.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Histogram.o `test -f 'Histogram.c' || echo '$(srcdir)/'`Histogram.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Histogram.o `test -f 'Histogram.c' || echo '$(srcdir)/'`Histogram.c
 
 cdo-Histogram.obj: Histogram.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Histogram.obj -MD -MP -MF $(DEPDIR)/cdo-Histogram.Tpo -c -o cdo-Histogram.obj `if test -f 'Histogram.c'; then $(CYGPATH_W) 'Histogram.c'; else $(CYGPATH_W) '$(srcdir)/Histogram.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Histogram.Tpo $(DEPDIR)/cdo-Histogram.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Histogram.c' object='cdo-Histogram.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Histogram.obj -MD -MP -MF $(DEPDIR)/cdo-Histogram.Tpo -c -o cdo-Histogram.obj `if test -f 'Histogram.c'; then $(CYGPATH_W) 'Histogram.c'; else $(CYGPATH_W) '$(srcdir)/Histogram.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Histogram.Tpo $(DEPDIR)/cdo-Histogram.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Histogram.c' object='cdo-Histogram.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Histogram.obj `if test -f 'Histogram.c'; then $(CYGPATH_W) 'Histogram.c'; else $(CYGPATH_W) '$(srcdir)/Histogram.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Histogram.obj `if test -f 'Histogram.c'; then $(CYGPATH_W) 'Histogram.c'; else $(CYGPATH_W) '$(srcdir)/Histogram.c'; fi`
 
 cdo-Importamsr.o: Importamsr.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importamsr.o -MD -MP -MF $(DEPDIR)/cdo-Importamsr.Tpo -c -o cdo-Importamsr.o `test -f 'Importamsr.c' || echo '$(srcdir)/'`Importamsr.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importamsr.Tpo $(DEPDIR)/cdo-Importamsr.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importamsr.c' object='cdo-Importamsr.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importamsr.o -MD -MP -MF $(DEPDIR)/cdo-Importamsr.Tpo -c -o cdo-Importamsr.o `test -f 'Importamsr.c' || echo '$(srcdir)/'`Importamsr.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importamsr.Tpo $(DEPDIR)/cdo-Importamsr.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importamsr.c' object='cdo-Importamsr.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importamsr.o `test -f 'Importamsr.c' || echo '$(srcdir)/'`Importamsr.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importamsr.o `test -f 'Importamsr.c' || echo '$(srcdir)/'`Importamsr.c
 
 cdo-Importamsr.obj: Importamsr.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importamsr.obj -MD -MP -MF $(DEPDIR)/cdo-Importamsr.Tpo -c -o cdo-Importamsr.obj `if test -f 'Importamsr.c'; then $(CYGPATH_W) 'Importamsr.c'; else $(CYGPATH_W) '$(srcdir)/Importamsr.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importamsr.Tpo $(DEPDIR)/cdo-Importamsr.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importamsr.c' object='cdo-Importamsr.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importamsr.obj -MD -MP -MF $(DEPDIR)/cdo-Importamsr.Tpo -c -o cdo-Importamsr.obj `if test -f 'Importamsr.c'; then $(CYGPATH_W) 'Importamsr.c'; else $(CYGPATH_W) '$(srcdir)/Importamsr.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importamsr.Tpo $(DEPDIR)/cdo-Importamsr.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importamsr.c' object='cdo-Importamsr.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importamsr.obj `if test -f 'Importamsr.c'; then $(CYGPATH_W) 'Importamsr.c'; else $(CYGPATH_W) '$(srcdir)/Importamsr.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importamsr.obj `if test -f 'Importamsr.c'; then $(CYGPATH_W) 'Importamsr.c'; else $(CYGPATH_W) '$(srcdir)/Importamsr.c'; fi`
 
 cdo-Importbinary.o: Importbinary.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importbinary.o -MD -MP -MF $(DEPDIR)/cdo-Importbinary.Tpo -c -o cdo-Importbinary.o `test -f 'Importbinary.c' || echo '$(srcdir)/'`Importbinary.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importbinary.Tpo $(DEPDIR)/cdo-Importbinary.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importbinary.c' object='cdo-Importbinary.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importbinary.o -MD -MP -MF $(DEPDIR)/cdo-Importbinary.Tpo -c -o cdo-Importbinary.o `test -f 'Importbinary.c' || echo '$(srcdir)/'`Importbinary.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importbinary.Tpo $(DEPDIR)/cdo-Importbinary.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importbinary.c' object='cdo-Importbinary.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importbinary.o `test -f 'Importbinary.c' || echo '$(srcdir)/'`Importbinary.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importbinary.o `test -f 'Importbinary.c' || echo '$(srcdir)/'`Importbinary.c
 
 cdo-Importbinary.obj: Importbinary.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importbinary.obj -MD -MP -MF $(DEPDIR)/cdo-Importbinary.Tpo -c -o cdo-Importbinary.obj `if test -f 'Importbinary.c'; then $(CYGPATH_W) 'Importbinary.c'; else $(CYGPATH_W) '$(srcdir)/Importbinary.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importbinary.Tpo $(DEPDIR)/cdo-Importbinary.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importbinary.c' object='cdo-Importbinary.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importbinary.obj -MD -MP -MF $(DEPDIR)/cdo-Importbinary.Tpo -c -o cdo-Importbinary.obj `if test -f 'Importbinary.c'; then $(CYGPATH_W) 'Importbinary.c'; else $(CYGPATH_W) '$(srcdir)/Importbinary.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importbinary.Tpo $(DEPDIR)/cdo-Importbinary.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importbinary.c' object='cdo-Importbinary.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importbinary.obj `if test -f 'Importbinary.c'; then $(CYGPATH_W) 'Importbinary.c'; else $(CYGPATH_W) '$(srcdir)/Importbinary.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importbinary.obj `if test -f 'Importbinary.c'; then $(CYGPATH_W) 'Importbinary.c'; else $(CYGPATH_W) '$(srcdir)/Importbinary.c'; fi`
 
 cdo-Importcmsaf.o: Importcmsaf.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importcmsaf.o -MD -MP -MF $(DEPDIR)/cdo-Importcmsaf.Tpo -c -o cdo-Importcmsaf.o `test -f 'Importcmsaf.c' || echo '$(srcdir)/'`Importcmsaf.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importcmsaf.Tpo $(DEPDIR)/cdo-Importcmsaf.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importcmsaf.c' object='cdo-Importcmsaf.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importcmsaf.o -MD -MP -MF $(DEPDIR)/cdo-Importcmsaf.Tpo -c -o cdo-Importcmsaf.o `test -f 'Importcmsaf.c' || echo '$(srcdir)/'`Importcmsaf.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importcmsaf.Tpo $(DEPDIR)/cdo-Importcmsaf.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importcmsaf.c' object='cdo-Importcmsaf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importcmsaf.o `test -f 'Importcmsaf.c' || echo '$(srcdir)/'`Importcmsaf.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importcmsaf.o `test -f 'Importcmsaf.c' || echo '$(srcdir)/'`Importcmsaf.c
 
 cdo-Importcmsaf.obj: Importcmsaf.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importcmsaf.obj -MD -MP -MF $(DEPDIR)/cdo-Importcmsaf.Tpo -c -o cdo-Importcmsaf.obj `if test -f 'Importcmsaf.c'; then $(CYGPATH_W) 'Importcmsaf.c'; else $(CYGPATH_W) '$(srcdir)/Importcmsaf.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importcmsaf.Tpo $(DEPDIR)/cdo-Importcmsaf.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importcmsaf.c' object='cdo-Importcmsaf.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importcmsaf.obj -MD -MP -MF $(DEPDIR)/cdo-Importcmsaf.Tpo -c -o cdo-Importcmsaf.obj `if test -f 'Importcmsaf.c'; then $(CYGPATH_W) 'Importcmsaf.c'; else $(CYGPATH_W) '$(srcdir)/Importcmsaf.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importcmsaf.Tpo $(DEPDIR)/cdo-Importcmsaf.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importcmsaf.c' object='cdo-Importcmsaf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importcmsaf.obj `if test -f 'Importcmsaf.c'; then $(CYGPATH_W) 'Importcmsaf.c'; else $(CYGPATH_W) '$(srcdir)/Importcmsaf.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importcmsaf.obj `if test -f 'Importcmsaf.c'; then $(CYGPATH_W) 'Importcmsaf.c'; else $(CYGPATH_W) '$(srcdir)/Importcmsaf.c'; fi`
 
 cdo-Importobs.o: Importobs.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importobs.o -MD -MP -MF $(DEPDIR)/cdo-Importobs.Tpo -c -o cdo-Importobs.o `test -f 'Importobs.c' || echo '$(srcdir)/'`Importobs.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importobs.Tpo $(DEPDIR)/cdo-Importobs.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importobs.c' object='cdo-Importobs.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importobs.o -MD -MP -MF $(DEPDIR)/cdo-Importobs.Tpo -c -o cdo-Importobs.o `test -f 'Importobs.c' || echo '$(srcdir)/'`Importobs.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importobs.Tpo $(DEPDIR)/cdo-Importobs.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importobs.c' object='cdo-Importobs.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importobs.o `test -f 'Importobs.c' || echo '$(srcdir)/'`Importobs.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importobs.o `test -f 'Importobs.c' || echo '$(srcdir)/'`Importobs.c
 
 cdo-Importobs.obj: Importobs.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importobs.obj -MD -MP -MF $(DEPDIR)/cdo-Importobs.Tpo -c -o cdo-Importobs.obj `if test -f 'Importobs.c'; then $(CYGPATH_W) 'Importobs.c'; else $(CYGPATH_W) '$(srcdir)/Importobs.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Importobs.Tpo $(DEPDIR)/cdo-Importobs.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Importobs.c' object='cdo-Importobs.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Importobs.obj -MD -MP -MF $(DEPDIR)/cdo-Importobs.Tpo -c -o cdo-Importobs.obj `if test -f 'Importobs.c'; then $(CYGPATH_W) 'Importobs.c'; else $(CYGPATH_W) '$(srcdir)/Importobs.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Importobs.Tpo $(DEPDIR)/cdo-Importobs.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Importobs.c' object='cdo-Importobs.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importobs.obj `if test -f 'Importobs.c'; then $(CYGPATH_W) 'Importobs.c'; else $(CYGPATH_W) '$(srcdir)/Importobs.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Importobs.obj `if test -f 'Importobs.c'; then $(CYGPATH_W) 'Importobs.c'; else $(CYGPATH_W) '$(srcdir)/Importobs.c'; fi`
 
 cdo-Info.o: Info.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Info.o -MD -MP -MF $(DEPDIR)/cdo-Info.Tpo -c -o cdo-Info.o `test -f 'Info.c' || echo '$(srcdir)/'`Info.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Info.Tpo $(DEPDIR)/cdo-Info.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Info.c' object='cdo-Info.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Info.o -MD -MP -MF $(DEPDIR)/cdo-Info.Tpo -c -o cdo-Info.o `test -f 'Info.c' || echo '$(srcdir)/'`Info.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Info.Tpo $(DEPDIR)/cdo-Info.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Info.c' object='cdo-Info.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Info.o `test -f 'Info.c' || echo '$(srcdir)/'`Info.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Info.o `test -f 'Info.c' || echo '$(srcdir)/'`Info.c
 
 cdo-Info.obj: Info.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Info.obj -MD -MP -MF $(DEPDIR)/cdo-Info.Tpo -c -o cdo-Info.obj `if test -f 'Info.c'; then $(CYGPATH_W) 'Info.c'; else $(CYGPATH_W) '$(srcdir)/Info.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Info.Tpo $(DEPDIR)/cdo-Info.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Info.c' object='cdo-Info.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Info.obj -MD -MP -MF $(DEPDIR)/cdo-Info.Tpo -c -o cdo-Info.obj `if test -f 'Info.c'; then $(CYGPATH_W) 'Info.c'; else $(CYGPATH_W) '$(srcdir)/Info.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Info.Tpo $(DEPDIR)/cdo-Info.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Info.c' object='cdo-Info.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Info.obj `if test -f 'Info.c'; then $(CYGPATH_W) 'Info.c'; else $(CYGPATH_W) '$(srcdir)/Info.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Info.obj `if test -f 'Info.c'; then $(CYGPATH_W) 'Info.c'; else $(CYGPATH_W) '$(srcdir)/Info.c'; fi`
 
 cdo-Input.o: Input.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Input.o -MD -MP -MF $(DEPDIR)/cdo-Input.Tpo -c -o cdo-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Input.Tpo $(DEPDIR)/cdo-Input.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Input.c' object='cdo-Input.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Input.o -MD -MP -MF $(DEPDIR)/cdo-Input.Tpo -c -o cdo-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Input.Tpo $(DEPDIR)/cdo-Input.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Input.c' object='cdo-Input.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c
 
 cdo-Input.obj: Input.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Input.obj -MD -MP -MF $(DEPDIR)/cdo-Input.Tpo -c -o cdo-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Input.Tpo $(DEPDIR)/cdo-Input.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Input.c' object='cdo-Input.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Input.obj -MD -MP -MF $(DEPDIR)/cdo-Input.Tpo -c -o cdo-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Input.Tpo $(DEPDIR)/cdo-Input.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Input.c' object='cdo-Input.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi`
 
 cdo-Intgrid.o: Intgrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgrid.o -MD -MP -MF $(DEPDIR)/cdo-Intgrid.Tpo -c -o cdo-Intgrid.o `test -f 'Intgrid.c' || echo '$(srcdir)/'`Intgrid.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intgrid.Tpo $(DEPDIR)/cdo-Intgrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intgrid.c' object='cdo-Intgrid.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgrid.o -MD -MP -MF $(DEPDIR)/cdo-Intgrid.Tpo -c -o cdo-Intgrid.o `test -f 'Intgrid.c' || echo '$(srcdir)/'`Intgrid.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intgrid.Tpo $(DEPDIR)/cdo-Intgrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intgrid.c' object='cdo-Intgrid.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgrid.o `test -f 'Intgrid.c' || echo '$(srcdir)/'`Intgrid.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgrid.o `test -f 'Intgrid.c' || echo '$(srcdir)/'`Intgrid.c
 
 cdo-Intgrid.obj: Intgrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgrid.obj -MD -MP -MF $(DEPDIR)/cdo-Intgrid.Tpo -c -o cdo-Intgrid.obj `if test -f 'Intgrid.c'; then $(CYGPATH_W) 'Intgrid.c'; else $(CYGPATH_W) '$(srcdir)/Intgrid.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intgrid.Tpo $(DEPDIR)/cdo-Intgrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intgrid.c' object='cdo-Intgrid.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgrid.obj -MD -MP -MF $(DEPDIR)/cdo-Intgrid.Tpo -c -o cdo-Intgrid.obj `if test -f 'Intgrid.c'; then $(CYGPATH_W) 'Intgrid.c'; else $(CYGPATH_W) '$(srcdir)/Intgrid.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intgrid.Tpo $(DEPDIR)/cdo-Intgrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intgrid.c' object='cdo-Intgrid.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgrid.obj `if test -f 'Intgrid.c'; then $(CYGPATH_W) 'Intgrid.c'; else $(CYGPATH_W) '$(srcdir)/Intgrid.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgrid.obj `if test -f 'Intgrid.c'; then $(CYGPATH_W) 'Intgrid.c'; else $(CYGPATH_W) '$(srcdir)/Intgrid.c'; fi`
 
 cdo-Intgridtraj.o: Intgridtraj.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgridtraj.o -MD -MP -MF $(DEPDIR)/cdo-Intgridtraj.Tpo -c -o cdo-Intgridtraj.o `test -f 'Intgridtraj.c' || echo '$(srcdir)/'`Intgridtraj.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intgridtraj.Tpo $(DEPDIR)/cdo-Intgridtraj.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intgridtraj.c' object='cdo-Intgridtraj.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgridtraj.o -MD -MP -MF $(DEPDIR)/cdo-Intgridtraj.Tpo -c -o cdo-Intgridtraj.o `test -f 'Intgridtraj.c' || echo '$(srcdir)/'`Intgridtraj.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intgridtraj.Tpo $(DEPDIR)/cdo-Intgridtraj.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intgridtraj.c' object='cdo-Intgridtraj.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgridtraj.o `test -f 'Intgridtraj.c' || echo '$(srcdir)/'`Intgridtraj.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgridtraj.o `test -f 'Intgridtraj.c' || echo '$(srcdir)/'`Intgridtraj.c
 
 cdo-Intgridtraj.obj: Intgridtraj.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgridtraj.obj -MD -MP -MF $(DEPDIR)/cdo-Intgridtraj.Tpo -c -o cdo-Intgridtraj.obj `if test -f 'Intgridtraj.c'; then $(CYGPATH_W) 'Intgridtraj.c'; else $(CYGPATH_W) '$(srcdir)/Intgridtraj.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intgridtraj.Tpo $(DEPDIR)/cdo-Intgridtraj.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intgridtraj.c' object='cdo-Intgridtraj.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intgridtraj.obj -MD -MP -MF $(DEPDIR)/cdo-Intgridtraj.Tpo -c -o cdo-Intgridtraj.obj `if test -f 'Intgridtraj.c'; then $(CYGPATH_W) 'Intgridtraj.c'; else $(CYGPATH_W) '$(srcdir)/Intgridtraj.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intgridtraj.Tpo $(DEPDIR)/cdo-Intgridtraj.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intgridtraj.c' object='cdo-Intgridtraj.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgridtraj.obj `if test -f 'Intgridtraj.c'; then $(CYGPATH_W) 'Intgridtraj.c'; else $(CYGPATH_W) '$(srcdir)/Intgridtraj.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intgridtraj.obj `if test -f 'Intgridtraj.c'; then $(CYGPATH_W) 'Intgridtraj.c'; else $(CYGPATH_W) '$(srcdir)/Intgridtraj.c'; fi`
 
 cdo-Intlevel.o: Intlevel.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel.o -MD -MP -MF $(DEPDIR)/cdo-Intlevel.Tpo -c -o cdo-Intlevel.o `test -f 'Intlevel.c' || echo '$(srcdir)/'`Intlevel.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intlevel.Tpo $(DEPDIR)/cdo-Intlevel.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intlevel.c' object='cdo-Intlevel.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel.o -MD -MP -MF $(DEPDIR)/cdo-Intlevel.Tpo -c -o cdo-Intlevel.o `test -f 'Intlevel.c' || echo '$(srcdir)/'`Intlevel.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intlevel.Tpo $(DEPDIR)/cdo-Intlevel.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intlevel.c' object='cdo-Intlevel.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel.o `test -f 'Intlevel.c' || echo '$(srcdir)/'`Intlevel.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel.o `test -f 'Intlevel.c' || echo '$(srcdir)/'`Intlevel.c
 
 cdo-Intlevel.obj: Intlevel.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel.obj -MD -MP -MF $(DEPDIR)/cdo-Intlevel.Tpo -c -o cdo-Intlevel.obj `if test -f 'Intlevel.c'; then $(CYGPATH_W) 'Intlevel.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intlevel.Tpo $(DEPDIR)/cdo-Intlevel.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intlevel.c' object='cdo-Intlevel.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel.obj -MD -MP -MF $(DEPDIR)/cdo-Intlevel.Tpo -c -o cdo-Intlevel.obj `if test -f 'Intlevel.c'; then $(CYGPATH_W) 'Intlevel.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intlevel.Tpo $(DEPDIR)/cdo-Intlevel.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intlevel.c' object='cdo-Intlevel.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel.obj `if test -f 'Intlevel.c'; then $(CYGPATH_W) 'Intlevel.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel.obj `if test -f 'Intlevel.c'; then $(CYGPATH_W) 'Intlevel.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel.c'; fi`
 
 cdo-Intlevel3d.o: Intlevel3d.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel3d.o -MD -MP -MF $(DEPDIR)/cdo-Intlevel3d.Tpo -c -o cdo-Intlevel3d.o `test -f 'Intlevel3d.c' || echo '$(srcdir)/'`Intlevel3d.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intlevel3d.Tpo $(DEPDIR)/cdo-Intlevel3d.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intlevel3d.c' object='cdo-Intlevel3d.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel3d.o -MD -MP -MF $(DEPDIR)/cdo-Intlevel3d.Tpo -c -o cdo-Intlevel3d.o `test -f 'Intlevel3d.c' || echo '$(srcdir)/'`Intlevel3d.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intlevel3d.Tpo $(DEPDIR)/cdo-Intlevel3d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intlevel3d.c' object='cdo-Intlevel3d.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel3d.o `test -f 'Intlevel3d.c' || echo '$(srcdir)/'`Intlevel3d.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel3d.o `test -f 'Intlevel3d.c' || echo '$(srcdir)/'`Intlevel3d.c
 
 cdo-Intlevel3d.obj: Intlevel3d.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel3d.obj -MD -MP -MF $(DEPDIR)/cdo-Intlevel3d.Tpo -c -o cdo-Intlevel3d.obj `if test -f 'Intlevel3d.c'; then $(CYGPATH_W) 'Intlevel3d.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel3d.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intlevel3d.Tpo $(DEPDIR)/cdo-Intlevel3d.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intlevel3d.c' object='cdo-Intlevel3d.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intlevel3d.obj -MD -MP -MF $(DEPDIR)/cdo-Intlevel3d.Tpo -c -o cdo-Intlevel3d.obj `if test -f 'Intlevel3d.c'; then $(CYGPATH_W) 'Intlevel3d.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel3d.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intlevel3d.Tpo $(DEPDIR)/cdo-Intlevel3d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intlevel3d.c' object='cdo-Intlevel3d.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel3d.obj `if test -f 'Intlevel3d.c'; then $(CYGPATH_W) 'Intlevel3d.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel3d.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intlevel3d.obj `if test -f 'Intlevel3d.c'; then $(CYGPATH_W) 'Intlevel3d.c'; else $(CYGPATH_W) '$(srcdir)/Intlevel3d.c'; fi`
 
 cdo-Intntime.o: Intntime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intntime.o -MD -MP -MF $(DEPDIR)/cdo-Intntime.Tpo -c -o cdo-Intntime.o `test -f 'Intntime.c' || echo '$(srcdir)/'`Intntime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intntime.Tpo $(DEPDIR)/cdo-Intntime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intntime.c' object='cdo-Intntime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intntime.o -MD -MP -MF $(DEPDIR)/cdo-Intntime.Tpo -c -o cdo-Intntime.o `test -f 'Intntime.c' || echo '$(srcdir)/'`Intntime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intntime.Tpo $(DEPDIR)/cdo-Intntime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intntime.c' object='cdo-Intntime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intntime.o `test -f 'Intntime.c' || echo '$(srcdir)/'`Intntime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intntime.o `test -f 'Intntime.c' || echo '$(srcdir)/'`Intntime.c
 
 cdo-Intntime.obj: Intntime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intntime.obj -MD -MP -MF $(DEPDIR)/cdo-Intntime.Tpo -c -o cdo-Intntime.obj `if test -f 'Intntime.c'; then $(CYGPATH_W) 'Intntime.c'; else $(CYGPATH_W) '$(srcdir)/Intntime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intntime.Tpo $(DEPDIR)/cdo-Intntime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intntime.c' object='cdo-Intntime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intntime.obj -MD -MP -MF $(DEPDIR)/cdo-Intntime.Tpo -c -o cdo-Intntime.obj `if test -f 'Intntime.c'; then $(CYGPATH_W) 'Intntime.c'; else $(CYGPATH_W) '$(srcdir)/Intntime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intntime.Tpo $(DEPDIR)/cdo-Intntime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intntime.c' object='cdo-Intntime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intntime.obj `if test -f 'Intntime.c'; then $(CYGPATH_W) 'Intntime.c'; else $(CYGPATH_W) '$(srcdir)/Intntime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intntime.obj `if test -f 'Intntime.c'; then $(CYGPATH_W) 'Intntime.c'; else $(CYGPATH_W) '$(srcdir)/Intntime.c'; fi`
 
 cdo-Inttime.o: Inttime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Inttime.o -MD -MP -MF $(DEPDIR)/cdo-Inttime.Tpo -c -o cdo-Inttime.o `test -f 'Inttime.c' || echo '$(srcdir)/'`Inttime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Inttime.Tpo $(DEPDIR)/cdo-Inttime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Inttime.c' object='cdo-Inttime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Inttime.o -MD -MP -MF $(DEPDIR)/cdo-Inttime.Tpo -c -o cdo-Inttime.o `test -f 'Inttime.c' || echo '$(srcdir)/'`Inttime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Inttime.Tpo $(DEPDIR)/cdo-Inttime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Inttime.c' object='cdo-Inttime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Inttime.o `test -f 'Inttime.c' || echo '$(srcdir)/'`Inttime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Inttime.o `test -f 'Inttime.c' || echo '$(srcdir)/'`Inttime.c
 
 cdo-Inttime.obj: Inttime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Inttime.obj -MD -MP -MF $(DEPDIR)/cdo-Inttime.Tpo -c -o cdo-Inttime.obj `if test -f 'Inttime.c'; then $(CYGPATH_W) 'Inttime.c'; else $(CYGPATH_W) '$(srcdir)/Inttime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Inttime.Tpo $(DEPDIR)/cdo-Inttime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Inttime.c' object='cdo-Inttime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Inttime.obj -MD -MP -MF $(DEPDIR)/cdo-Inttime.Tpo -c -o cdo-Inttime.obj `if test -f 'Inttime.c'; then $(CYGPATH_W) 'Inttime.c'; else $(CYGPATH_W) '$(srcdir)/Inttime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Inttime.Tpo $(DEPDIR)/cdo-Inttime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Inttime.c' object='cdo-Inttime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Inttime.obj `if test -f 'Inttime.c'; then $(CYGPATH_W) 'Inttime.c'; else $(CYGPATH_W) '$(srcdir)/Inttime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Inttime.obj `if test -f 'Inttime.c'; then $(CYGPATH_W) 'Inttime.c'; else $(CYGPATH_W) '$(srcdir)/Inttime.c'; fi`
 
 cdo-Intyear.o: Intyear.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intyear.o -MD -MP -MF $(DEPDIR)/cdo-Intyear.Tpo -c -o cdo-Intyear.o `test -f 'Intyear.c' || echo '$(srcdir)/'`Intyear.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intyear.Tpo $(DEPDIR)/cdo-Intyear.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intyear.c' object='cdo-Intyear.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intyear.o -MD -MP -MF $(DEPDIR)/cdo-Intyear.Tpo -c -o cdo-Intyear.o `test -f 'Intyear.c' || echo '$(srcdir)/'`Intyear.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intyear.Tpo $(DEPDIR)/cdo-Intyear.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intyear.c' object='cdo-Intyear.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intyear.o `test -f 'Intyear.c' || echo '$(srcdir)/'`Intyear.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intyear.o `test -f 'Intyear.c' || echo '$(srcdir)/'`Intyear.c
 
 cdo-Intyear.obj: Intyear.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intyear.obj -MD -MP -MF $(DEPDIR)/cdo-Intyear.Tpo -c -o cdo-Intyear.obj `if test -f 'Intyear.c'; then $(CYGPATH_W) 'Intyear.c'; else $(CYGPATH_W) '$(srcdir)/Intyear.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Intyear.Tpo $(DEPDIR)/cdo-Intyear.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Intyear.c' object='cdo-Intyear.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Intyear.obj -MD -MP -MF $(DEPDIR)/cdo-Intyear.Tpo -c -o cdo-Intyear.obj `if test -f 'Intyear.c'; then $(CYGPATH_W) 'Intyear.c'; else $(CYGPATH_W) '$(srcdir)/Intyear.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Intyear.Tpo $(DEPDIR)/cdo-Intyear.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Intyear.c' object='cdo-Intyear.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intyear.obj `if test -f 'Intyear.c'; then $(CYGPATH_W) 'Intyear.c'; else $(CYGPATH_W) '$(srcdir)/Intyear.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Intyear.obj `if test -f 'Intyear.c'; then $(CYGPATH_W) 'Intyear.c'; else $(CYGPATH_W) '$(srcdir)/Intyear.c'; fi`
 
 cdo-Invert.o: Invert.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invert.o -MD -MP -MF $(DEPDIR)/cdo-Invert.Tpo -c -o cdo-Invert.o `test -f 'Invert.c' || echo '$(srcdir)/'`Invert.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Invert.Tpo $(DEPDIR)/cdo-Invert.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Invert.c' object='cdo-Invert.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invert.o -MD -MP -MF $(DEPDIR)/cdo-Invert.Tpo -c -o cdo-Invert.o `test -f 'Invert.c' || echo '$(srcdir)/'`Invert.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Invert.Tpo $(DEPDIR)/cdo-Invert.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Invert.c' object='cdo-Invert.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invert.o `test -f 'Invert.c' || echo '$(srcdir)/'`Invert.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invert.o `test -f 'Invert.c' || echo '$(srcdir)/'`Invert.c
 
 cdo-Invert.obj: Invert.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invert.obj -MD -MP -MF $(DEPDIR)/cdo-Invert.Tpo -c -o cdo-Invert.obj `if test -f 'Invert.c'; then $(CYGPATH_W) 'Invert.c'; else $(CYGPATH_W) '$(srcdir)/Invert.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Invert.Tpo $(DEPDIR)/cdo-Invert.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Invert.c' object='cdo-Invert.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invert.obj -MD -MP -MF $(DEPDIR)/cdo-Invert.Tpo -c -o cdo-Invert.obj `if test -f 'Invert.c'; then $(CYGPATH_W) 'Invert.c'; else $(CYGPATH_W) '$(srcdir)/Invert.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Invert.Tpo $(DEPDIR)/cdo-Invert.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Invert.c' object='cdo-Invert.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invert.obj `if test -f 'Invert.c'; then $(CYGPATH_W) 'Invert.c'; else $(CYGPATH_W) '$(srcdir)/Invert.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invert.obj `if test -f 'Invert.c'; then $(CYGPATH_W) 'Invert.c'; else $(CYGPATH_W) '$(srcdir)/Invert.c'; fi`
 
 cdo-Invertlev.o: Invertlev.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invertlev.o -MD -MP -MF $(DEPDIR)/cdo-Invertlev.Tpo -c -o cdo-Invertlev.o `test -f 'Invertlev.c' || echo '$(srcdir)/'`Invertlev.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Invertlev.Tpo $(DEPDIR)/cdo-Invertlev.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Invertlev.c' object='cdo-Invertlev.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invertlev.o -MD -MP -MF $(DEPDIR)/cdo-Invertlev.Tpo -c -o cdo-Invertlev.o `test -f 'Invertlev.c' || echo '$(srcdir)/'`Invertlev.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Invertlev.Tpo $(DEPDIR)/cdo-Invertlev.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Invertlev.c' object='cdo-Invertlev.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invertlev.o `test -f 'Invertlev.c' || echo '$(srcdir)/'`Invertlev.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invertlev.o `test -f 'Invertlev.c' || echo '$(srcdir)/'`Invertlev.c
 
 cdo-Invertlev.obj: Invertlev.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invertlev.obj -MD -MP -MF $(DEPDIR)/cdo-Invertlev.Tpo -c -o cdo-Invertlev.obj `if test -f 'Invertlev.c'; then $(CYGPATH_W) 'Invertlev.c'; else $(CYGPATH_W) '$(srcdir)/Invertlev.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Invertlev.Tpo $(DEPDIR)/cdo-Invertlev.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Invertlev.c' object='cdo-Invertlev.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Invertlev.obj -MD -MP -MF $(DEPDIR)/cdo-Invertlev.Tpo -c -o cdo-Invertlev.obj `if test -f 'Invertlev.c'; then $(CYGPATH_W) 'Invertlev.c'; else $(CYGPATH_W) '$(srcdir)/Invertlev.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Invertlev.Tpo $(DEPDIR)/cdo-Invertlev.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Invertlev.c' object='cdo-Invertlev.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invertlev.obj `if test -f 'Invertlev.c'; then $(CYGPATH_W) 'Invertlev.c'; else $(CYGPATH_W) '$(srcdir)/Invertlev.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Invertlev.obj `if test -f 'Invertlev.c'; then $(CYGPATH_W) 'Invertlev.c'; else $(CYGPATH_W) '$(srcdir)/Invertlev.c'; fi`
 
 cdo-Isosurface.o: Isosurface.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Isosurface.o -MD -MP -MF $(DEPDIR)/cdo-Isosurface.Tpo -c -o cdo-Isosurface.o `test -f 'Isosurface.c' || echo '$(srcdir)/'`Isosurface.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Isosurface.Tpo $(DEPDIR)/cdo-Isosurface.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Isosurface.c' object='cdo-Isosurface.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Isosurface.o -MD -MP -MF $(DEPDIR)/cdo-Isosurface.Tpo -c -o cdo-Isosurface.o `test -f 'Isosurface.c' || echo '$(srcdir)/'`Isosurface.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Isosurface.Tpo $(DEPDIR)/cdo-Isosurface.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Isosurface.c' object='cdo-Isosurface.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Isosurface.o `test -f 'Isosurface.c' || echo '$(srcdir)/'`Isosurface.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Isosurface.o `test -f 'Isosurface.c' || echo '$(srcdir)/'`Isosurface.c
 
 cdo-Isosurface.obj: Isosurface.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Isosurface.obj -MD -MP -MF $(DEPDIR)/cdo-Isosurface.Tpo -c -o cdo-Isosurface.obj `if test -f 'Isosurface.c'; then $(CYGPATH_W) 'Isosurface.c'; else $(CYGPATH_W) '$(srcdir)/Isosurface.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Isosurface.Tpo $(DEPDIR)/cdo-Isosurface.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Isosurface.c' object='cdo-Isosurface.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Isosurface.obj -MD -MP -MF $(DEPDIR)/cdo-Isosurface.Tpo -c -o cdo-Isosurface.obj `if test -f 'Isosurface.c'; then $(CYGPATH_W) 'Isosurface.c'; else $(CYGPATH_W) '$(srcdir)/Isosurface.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Isosurface.Tpo $(DEPDIR)/cdo-Isosurface.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Isosurface.c' object='cdo-Isosurface.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Isosurface.obj `if test -f 'Isosurface.c'; then $(CYGPATH_W) 'Isosurface.c'; else $(CYGPATH_W) '$(srcdir)/Isosurface.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Isosurface.obj `if test -f 'Isosurface.c'; then $(CYGPATH_W) 'Isosurface.c'; else $(CYGPATH_W) '$(srcdir)/Isosurface.c'; fi`
 
 cdo-Kvl.o: Kvl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Kvl.o -MD -MP -MF $(DEPDIR)/cdo-Kvl.Tpo -c -o cdo-Kvl.o `test -f 'Kvl.c' || echo '$(srcdir)/'`Kvl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Kvl.Tpo $(DEPDIR)/cdo-Kvl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Kvl.c' object='cdo-Kvl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Kvl.o -MD -MP -MF $(DEPDIR)/cdo-Kvl.Tpo -c -o cdo-Kvl.o `test -f 'Kvl.c' || echo '$(srcdir)/'`Kvl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Kvl.Tpo $(DEPDIR)/cdo-Kvl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Kvl.c' object='cdo-Kvl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Kvl.o `test -f 'Kvl.c' || echo '$(srcdir)/'`Kvl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Kvl.o `test -f 'Kvl.c' || echo '$(srcdir)/'`Kvl.c
 
 cdo-Kvl.obj: Kvl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Kvl.obj -MD -MP -MF $(DEPDIR)/cdo-Kvl.Tpo -c -o cdo-Kvl.obj `if test -f 'Kvl.c'; then $(CYGPATH_W) 'Kvl.c'; else $(CYGPATH_W) '$(srcdir)/Kvl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Kvl.Tpo $(DEPDIR)/cdo-Kvl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Kvl.c' object='cdo-Kvl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Kvl.obj -MD -MP -MF $(DEPDIR)/cdo-Kvl.Tpo -c -o cdo-Kvl.obj `if test -f 'Kvl.c'; then $(CYGPATH_W) 'Kvl.c'; else $(CYGPATH_W) '$(srcdir)/Kvl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Kvl.Tpo $(DEPDIR)/cdo-Kvl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Kvl.c' object='cdo-Kvl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Kvl.obj `if test -f 'Kvl.c'; then $(CYGPATH_W) 'Kvl.c'; else $(CYGPATH_W) '$(srcdir)/Kvl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Kvl.obj `if test -f 'Kvl.c'; then $(CYGPATH_W) 'Kvl.c'; else $(CYGPATH_W) '$(srcdir)/Kvl.c'; fi`
 
 cdo-Log.o: Log.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Log.o -MD -MP -MF $(DEPDIR)/cdo-Log.Tpo -c -o cdo-Log.o `test -f 'Log.c' || echo '$(srcdir)/'`Log.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Log.Tpo $(DEPDIR)/cdo-Log.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Log.c' object='cdo-Log.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Log.o -MD -MP -MF $(DEPDIR)/cdo-Log.Tpo -c -o cdo-Log.o `test -f 'Log.c' || echo '$(srcdir)/'`Log.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Log.Tpo $(DEPDIR)/cdo-Log.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Log.c' object='cdo-Log.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Log.o `test -f 'Log.c' || echo '$(srcdir)/'`Log.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Log.o `test -f 'Log.c' || echo '$(srcdir)/'`Log.c
 
 cdo-Log.obj: Log.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Log.obj -MD -MP -MF $(DEPDIR)/cdo-Log.Tpo -c -o cdo-Log.obj `if test -f 'Log.c'; then $(CYGPATH_W) 'Log.c'; else $(CYGPATH_W) '$(srcdir)/Log.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Log.Tpo $(DEPDIR)/cdo-Log.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Log.c' object='cdo-Log.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Log.obj -MD -MP -MF $(DEPDIR)/cdo-Log.Tpo -c -o cdo-Log.obj `if test -f 'Log.c'; then $(CYGPATH_W) 'Log.c'; else $(CYGPATH_W) '$(srcdir)/Log.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Log.Tpo $(DEPDIR)/cdo-Log.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Log.c' object='cdo-Log.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Log.obj `if test -f 'Log.c'; then $(CYGPATH_W) 'Log.c'; else $(CYGPATH_W) '$(srcdir)/Log.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Log.obj `if test -f 'Log.c'; then $(CYGPATH_W) 'Log.c'; else $(CYGPATH_W) '$(srcdir)/Log.c'; fi`
 
 cdo-Maskbox.o: Maskbox.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maskbox.o -MD -MP -MF $(DEPDIR)/cdo-Maskbox.Tpo -c -o cdo-Maskbox.o `test -f 'Maskbox.c' || echo '$(srcdir)/'`Maskbox.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Maskbox.Tpo $(DEPDIR)/cdo-Maskbox.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Maskbox.c' object='cdo-Maskbox.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maskbox.o -MD -MP -MF $(DEPDIR)/cdo-Maskbox.Tpo -c -o cdo-Maskbox.o `test -f 'Maskbox.c' || echo '$(srcdir)/'`Maskbox.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Maskbox.Tpo $(DEPDIR)/cdo-Maskbox.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Maskbox.c' object='cdo-Maskbox.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maskbox.o `test -f 'Maskbox.c' || echo '$(srcdir)/'`Maskbox.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maskbox.o `test -f 'Maskbox.c' || echo '$(srcdir)/'`Maskbox.c
 
 cdo-Maskbox.obj: Maskbox.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maskbox.obj -MD -MP -MF $(DEPDIR)/cdo-Maskbox.Tpo -c -o cdo-Maskbox.obj `if test -f 'Maskbox.c'; then $(CYGPATH_W) 'Maskbox.c'; else $(CYGPATH_W) '$(srcdir)/Maskbox.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Maskbox.Tpo $(DEPDIR)/cdo-Maskbox.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Maskbox.c' object='cdo-Maskbox.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maskbox.obj -MD -MP -MF $(DEPDIR)/cdo-Maskbox.Tpo -c -o cdo-Maskbox.obj `if test -f 'Maskbox.c'; then $(CYGPATH_W) 'Maskbox.c'; else $(CYGPATH_W) '$(srcdir)/Maskbox.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Maskbox.Tpo $(DEPDIR)/cdo-Maskbox.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Maskbox.c' object='cdo-Maskbox.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maskbox.obj `if test -f 'Maskbox.c'; then $(CYGPATH_W) 'Maskbox.c'; else $(CYGPATH_W) '$(srcdir)/Maskbox.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maskbox.obj `if test -f 'Maskbox.c'; then $(CYGPATH_W) 'Maskbox.c'; else $(CYGPATH_W) '$(srcdir)/Maskbox.c'; fi`
 
 cdo-Mastrfu.o: Mastrfu.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mastrfu.o -MD -MP -MF $(DEPDIR)/cdo-Mastrfu.Tpo -c -o cdo-Mastrfu.o `test -f 'Mastrfu.c' || echo '$(srcdir)/'`Mastrfu.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mastrfu.Tpo $(DEPDIR)/cdo-Mastrfu.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mastrfu.c' object='cdo-Mastrfu.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mastrfu.o -MD -MP -MF $(DEPDIR)/cdo-Mastrfu.Tpo -c -o cdo-Mastrfu.o `test -f 'Mastrfu.c' || echo '$(srcdir)/'`Mastrfu.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mastrfu.Tpo $(DEPDIR)/cdo-Mastrfu.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mastrfu.c' object='cdo-Mastrfu.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mastrfu.o `test -f 'Mastrfu.c' || echo '$(srcdir)/'`Mastrfu.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mastrfu.o `test -f 'Mastrfu.c' || echo '$(srcdir)/'`Mastrfu.c
 
 cdo-Mastrfu.obj: Mastrfu.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mastrfu.obj -MD -MP -MF $(DEPDIR)/cdo-Mastrfu.Tpo -c -o cdo-Mastrfu.obj `if test -f 'Mastrfu.c'; then $(CYGPATH_W) 'Mastrfu.c'; else $(CYGPATH_W) '$(srcdir)/Mastrfu.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mastrfu.Tpo $(DEPDIR)/cdo-Mastrfu.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mastrfu.c' object='cdo-Mastrfu.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mastrfu.obj -MD -MP -MF $(DEPDIR)/cdo-Mastrfu.Tpo -c -o cdo-Mastrfu.obj `if test -f 'Mastrfu.c'; then $(CYGPATH_W) 'Mastrfu.c'; else $(CYGPATH_W) '$(srcdir)/Mastrfu.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mastrfu.Tpo $(DEPDIR)/cdo-Mastrfu.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mastrfu.c' object='cdo-Mastrfu.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mastrfu.obj `if test -f 'Mastrfu.c'; then $(CYGPATH_W) 'Mastrfu.c'; else $(CYGPATH_W) '$(srcdir)/Mastrfu.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mastrfu.obj `if test -f 'Mastrfu.c'; then $(CYGPATH_W) 'Mastrfu.c'; else $(CYGPATH_W) '$(srcdir)/Mastrfu.c'; fi`
 
 cdo-Math.o: Math.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Math.o -MD -MP -MF $(DEPDIR)/cdo-Math.Tpo -c -o cdo-Math.o `test -f 'Math.c' || echo '$(srcdir)/'`Math.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Math.Tpo $(DEPDIR)/cdo-Math.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Math.c' object='cdo-Math.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Math.o -MD -MP -MF $(DEPDIR)/cdo-Math.Tpo -c -o cdo-Math.o `test -f 'Math.c' || echo '$(srcdir)/'`Math.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Math.Tpo $(DEPDIR)/cdo-Math.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Math.c' object='cdo-Math.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Math.o `test -f 'Math.c' || echo '$(srcdir)/'`Math.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Math.o `test -f 'Math.c' || echo '$(srcdir)/'`Math.c
 
 cdo-Math.obj: Math.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Math.obj -MD -MP -MF $(DEPDIR)/cdo-Math.Tpo -c -o cdo-Math.obj `if test -f 'Math.c'; then $(CYGPATH_W) 'Math.c'; else $(CYGPATH_W) '$(srcdir)/Math.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Math.Tpo $(DEPDIR)/cdo-Math.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Math.c' object='cdo-Math.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Math.obj -MD -MP -MF $(DEPDIR)/cdo-Math.Tpo -c -o cdo-Math.obj `if test -f 'Math.c'; then $(CYGPATH_W) 'Math.c'; else $(CYGPATH_W) '$(srcdir)/Math.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Math.Tpo $(DEPDIR)/cdo-Math.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Math.c' object='cdo-Math.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Math.obj `if test -f 'Math.c'; then $(CYGPATH_W) 'Math.c'; else $(CYGPATH_W) '$(srcdir)/Math.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Math.obj `if test -f 'Math.c'; then $(CYGPATH_W) 'Math.c'; else $(CYGPATH_W) '$(srcdir)/Math.c'; fi`
 
 cdo-Merge.o: Merge.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merge.o -MD -MP -MF $(DEPDIR)/cdo-Merge.Tpo -c -o cdo-Merge.o `test -f 'Merge.c' || echo '$(srcdir)/'`Merge.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Merge.Tpo $(DEPDIR)/cdo-Merge.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Merge.c' object='cdo-Merge.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merge.o -MD -MP -MF $(DEPDIR)/cdo-Merge.Tpo -c -o cdo-Merge.o `test -f 'Merge.c' || echo '$(srcdir)/'`Merge.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Merge.Tpo $(DEPDIR)/cdo-Merge.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Merge.c' object='cdo-Merge.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merge.o `test -f 'Merge.c' || echo '$(srcdir)/'`Merge.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merge.o `test -f 'Merge.c' || echo '$(srcdir)/'`Merge.c
 
 cdo-Merge.obj: Merge.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merge.obj -MD -MP -MF $(DEPDIR)/cdo-Merge.Tpo -c -o cdo-Merge.obj `if test -f 'Merge.c'; then $(CYGPATH_W) 'Merge.c'; else $(CYGPATH_W) '$(srcdir)/Merge.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Merge.Tpo $(DEPDIR)/cdo-Merge.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Merge.c' object='cdo-Merge.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merge.obj -MD -MP -MF $(DEPDIR)/cdo-Merge.Tpo -c -o cdo-Merge.obj `if test -f 'Merge.c'; then $(CYGPATH_W) 'Merge.c'; else $(CYGPATH_W) '$(srcdir)/Merge.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Merge.Tpo $(DEPDIR)/cdo-Merge.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Merge.c' object='cdo-Merge.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merge.obj `if test -f 'Merge.c'; then $(CYGPATH_W) 'Merge.c'; else $(CYGPATH_W) '$(srcdir)/Merge.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merge.obj `if test -f 'Merge.c'; then $(CYGPATH_W) 'Merge.c'; else $(CYGPATH_W) '$(srcdir)/Merge.c'; fi`
 
 cdo-Mergegrid.o: Mergegrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergegrid.o -MD -MP -MF $(DEPDIR)/cdo-Mergegrid.Tpo -c -o cdo-Mergegrid.o `test -f 'Mergegrid.c' || echo '$(srcdir)/'`Mergegrid.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mergegrid.Tpo $(DEPDIR)/cdo-Mergegrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mergegrid.c' object='cdo-Mergegrid.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergegrid.o -MD -MP -MF $(DEPDIR)/cdo-Mergegrid.Tpo -c -o cdo-Mergegrid.o `test -f 'Mergegrid.c' || echo '$(srcdir)/'`Mergegrid.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mergegrid.Tpo $(DEPDIR)/cdo-Mergegrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mergegrid.c' object='cdo-Mergegrid.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergegrid.o `test -f 'Mergegrid.c' || echo '$(srcdir)/'`Mergegrid.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergegrid.o `test -f 'Mergegrid.c' || echo '$(srcdir)/'`Mergegrid.c
 
 cdo-Mergegrid.obj: Mergegrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergegrid.obj -MD -MP -MF $(DEPDIR)/cdo-Mergegrid.Tpo -c -o cdo-Mergegrid.obj `if test -f 'Mergegrid.c'; then $(CYGPATH_W) 'Mergegrid.c'; else $(CYGPATH_W) '$(srcdir)/Mergegrid.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mergegrid.Tpo $(DEPDIR)/cdo-Mergegrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mergegrid.c' object='cdo-Mergegrid.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergegrid.obj -MD -MP -MF $(DEPDIR)/cdo-Mergegrid.Tpo -c -o cdo-Mergegrid.obj `if test -f 'Mergegrid.c'; then $(CYGPATH_W) 'Mergegrid.c'; else $(CYGPATH_W) '$(srcdir)/Mergegrid.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mergegrid.Tpo $(DEPDIR)/cdo-Mergegrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mergegrid.c' object='cdo-Mergegrid.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergegrid.obj `if test -f 'Mergegrid.c'; then $(CYGPATH_W) 'Mergegrid.c'; else $(CYGPATH_W) '$(srcdir)/Mergegrid.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergegrid.obj `if test -f 'Mergegrid.c'; then $(CYGPATH_W) 'Mergegrid.c'; else $(CYGPATH_W) '$(srcdir)/Mergegrid.c'; fi`
 
 cdo-Mergetime.o: Mergetime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergetime.o -MD -MP -MF $(DEPDIR)/cdo-Mergetime.Tpo -c -o cdo-Mergetime.o `test -f 'Mergetime.c' || echo '$(srcdir)/'`Mergetime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mergetime.Tpo $(DEPDIR)/cdo-Mergetime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mergetime.c' object='cdo-Mergetime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergetime.o -MD -MP -MF $(DEPDIR)/cdo-Mergetime.Tpo -c -o cdo-Mergetime.o `test -f 'Mergetime.c' || echo '$(srcdir)/'`Mergetime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mergetime.Tpo $(DEPDIR)/cdo-Mergetime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mergetime.c' object='cdo-Mergetime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergetime.o `test -f 'Mergetime.c' || echo '$(srcdir)/'`Mergetime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergetime.o `test -f 'Mergetime.c' || echo '$(srcdir)/'`Mergetime.c
 
 cdo-Mergetime.obj: Mergetime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergetime.obj -MD -MP -MF $(DEPDIR)/cdo-Mergetime.Tpo -c -o cdo-Mergetime.obj `if test -f 'Mergetime.c'; then $(CYGPATH_W) 'Mergetime.c'; else $(CYGPATH_W) '$(srcdir)/Mergetime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mergetime.Tpo $(DEPDIR)/cdo-Mergetime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mergetime.c' object='cdo-Mergetime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mergetime.obj -MD -MP -MF $(DEPDIR)/cdo-Mergetime.Tpo -c -o cdo-Mergetime.obj `if test -f 'Mergetime.c'; then $(CYGPATH_W) 'Mergetime.c'; else $(CYGPATH_W) '$(srcdir)/Mergetime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mergetime.Tpo $(DEPDIR)/cdo-Mergetime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mergetime.c' object='cdo-Mergetime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergetime.obj `if test -f 'Mergetime.c'; then $(CYGPATH_W) 'Mergetime.c'; else $(CYGPATH_W) '$(srcdir)/Mergetime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mergetime.obj `if test -f 'Mergetime.c'; then $(CYGPATH_W) 'Mergetime.c'; else $(CYGPATH_W) '$(srcdir)/Mergetime.c'; fi`
 
 cdo-Merstat.o: Merstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merstat.o -MD -MP -MF $(DEPDIR)/cdo-Merstat.Tpo -c -o cdo-Merstat.o `test -f 'Merstat.c' || echo '$(srcdir)/'`Merstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Merstat.Tpo $(DEPDIR)/cdo-Merstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Merstat.c' object='cdo-Merstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merstat.o -MD -MP -MF $(DEPDIR)/cdo-Merstat.Tpo -c -o cdo-Merstat.o `test -f 'Merstat.c' || echo '$(srcdir)/'`Merstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Merstat.Tpo $(DEPDIR)/cdo-Merstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Merstat.c' object='cdo-Merstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merstat.o `test -f 'Merstat.c' || echo '$(srcdir)/'`Merstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merstat.o `test -f 'Merstat.c' || echo '$(srcdir)/'`Merstat.c
 
 cdo-Merstat.obj: Merstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merstat.obj -MD -MP -MF $(DEPDIR)/cdo-Merstat.Tpo -c -o cdo-Merstat.obj `if test -f 'Merstat.c'; then $(CYGPATH_W) 'Merstat.c'; else $(CYGPATH_W) '$(srcdir)/Merstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Merstat.Tpo $(DEPDIR)/cdo-Merstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Merstat.c' object='cdo-Merstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Merstat.obj -MD -MP -MF $(DEPDIR)/cdo-Merstat.Tpo -c -o cdo-Merstat.obj `if test -f 'Merstat.c'; then $(CYGPATH_W) 'Merstat.c'; else $(CYGPATH_W) '$(srcdir)/Merstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Merstat.Tpo $(DEPDIR)/cdo-Merstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Merstat.c' object='cdo-Merstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merstat.obj `if test -f 'Merstat.c'; then $(CYGPATH_W) 'Merstat.c'; else $(CYGPATH_W) '$(srcdir)/Merstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Merstat.obj `if test -f 'Merstat.c'; then $(CYGPATH_W) 'Merstat.c'; else $(CYGPATH_W) '$(srcdir)/Merstat.c'; fi`
 
 cdo-Monarith.o: Monarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Monarith.o -MD -MP -MF $(DEPDIR)/cdo-Monarith.Tpo -c -o cdo-Monarith.o `test -f 'Monarith.c' || echo '$(srcdir)/'`Monarith.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Monarith.Tpo $(DEPDIR)/cdo-Monarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Monarith.c' object='cdo-Monarith.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Monarith.o -MD -MP -MF $(DEPDIR)/cdo-Monarith.Tpo -c -o cdo-Monarith.o `test -f 'Monarith.c' || echo '$(srcdir)/'`Monarith.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Monarith.Tpo $(DEPDIR)/cdo-Monarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Monarith.c' object='cdo-Monarith.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Monarith.o `test -f 'Monarith.c' || echo '$(srcdir)/'`Monarith.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Monarith.o `test -f 'Monarith.c' || echo '$(srcdir)/'`Monarith.c
 
 cdo-Monarith.obj: Monarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Monarith.obj -MD -MP -MF $(DEPDIR)/cdo-Monarith.Tpo -c -o cdo-Monarith.obj `if test -f 'Monarith.c'; then $(CYGPATH_W) 'Monarith.c'; else $(CYGPATH_W) '$(srcdir)/Monarith.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Monarith.Tpo $(DEPDIR)/cdo-Monarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Monarith.c' object='cdo-Monarith.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Monarith.obj -MD -MP -MF $(DEPDIR)/cdo-Monarith.Tpo -c -o cdo-Monarith.obj `if test -f 'Monarith.c'; then $(CYGPATH_W) 'Monarith.c'; else $(CYGPATH_W) '$(srcdir)/Monarith.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Monarith.Tpo $(DEPDIR)/cdo-Monarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Monarith.c' object='cdo-Monarith.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Monarith.obj `if test -f 'Monarith.c'; then $(CYGPATH_W) 'Monarith.c'; else $(CYGPATH_W) '$(srcdir)/Monarith.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Monarith.obj `if test -f 'Monarith.c'; then $(CYGPATH_W) 'Monarith.c'; else $(CYGPATH_W) '$(srcdir)/Monarith.c'; fi`
 
 cdo-Mrotuv.o: Mrotuv.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuv.o -MD -MP -MF $(DEPDIR)/cdo-Mrotuv.Tpo -c -o cdo-Mrotuv.o `test -f 'Mrotuv.c' || echo '$(srcdir)/'`Mrotuv.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mrotuv.Tpo $(DEPDIR)/cdo-Mrotuv.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mrotuv.c' object='cdo-Mrotuv.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuv.o -MD -MP -MF $(DEPDIR)/cdo-Mrotuv.Tpo -c -o cdo-Mrotuv.o `test -f 'Mrotuv.c' || echo '$(srcdir)/'`Mrotuv.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mrotuv.Tpo $(DEPDIR)/cdo-Mrotuv.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mrotuv.c' object='cdo-Mrotuv.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuv.o `test -f 'Mrotuv.c' || echo '$(srcdir)/'`Mrotuv.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuv.o `test -f 'Mrotuv.c' || echo '$(srcdir)/'`Mrotuv.c
 
 cdo-Mrotuv.obj: Mrotuv.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuv.obj -MD -MP -MF $(DEPDIR)/cdo-Mrotuv.Tpo -c -o cdo-Mrotuv.obj `if test -f 'Mrotuv.c'; then $(CYGPATH_W) 'Mrotuv.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuv.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mrotuv.Tpo $(DEPDIR)/cdo-Mrotuv.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mrotuv.c' object='cdo-Mrotuv.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuv.obj -MD -MP -MF $(DEPDIR)/cdo-Mrotuv.Tpo -c -o cdo-Mrotuv.obj `if test -f 'Mrotuv.c'; then $(CYGPATH_W) 'Mrotuv.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuv.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mrotuv.Tpo $(DEPDIR)/cdo-Mrotuv.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mrotuv.c' object='cdo-Mrotuv.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuv.obj `if test -f 'Mrotuv.c'; then $(CYGPATH_W) 'Mrotuv.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuv.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuv.obj `if test -f 'Mrotuv.c'; then $(CYGPATH_W) 'Mrotuv.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuv.c'; fi`
 
 cdo-Mrotuvb.o: Mrotuvb.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuvb.o -MD -MP -MF $(DEPDIR)/cdo-Mrotuvb.Tpo -c -o cdo-Mrotuvb.o `test -f 'Mrotuvb.c' || echo '$(srcdir)/'`Mrotuvb.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mrotuvb.Tpo $(DEPDIR)/cdo-Mrotuvb.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mrotuvb.c' object='cdo-Mrotuvb.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuvb.o -MD -MP -MF $(DEPDIR)/cdo-Mrotuvb.Tpo -c -o cdo-Mrotuvb.o `test -f 'Mrotuvb.c' || echo '$(srcdir)/'`Mrotuvb.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mrotuvb.Tpo $(DEPDIR)/cdo-Mrotuvb.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mrotuvb.c' object='cdo-Mrotuvb.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuvb.o `test -f 'Mrotuvb.c' || echo '$(srcdir)/'`Mrotuvb.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuvb.o `test -f 'Mrotuvb.c' || echo '$(srcdir)/'`Mrotuvb.c
 
 cdo-Mrotuvb.obj: Mrotuvb.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuvb.obj -MD -MP -MF $(DEPDIR)/cdo-Mrotuvb.Tpo -c -o cdo-Mrotuvb.obj `if test -f 'Mrotuvb.c'; then $(CYGPATH_W) 'Mrotuvb.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuvb.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Mrotuvb.Tpo $(DEPDIR)/cdo-Mrotuvb.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Mrotuvb.c' object='cdo-Mrotuvb.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Mrotuvb.obj -MD -MP -MF $(DEPDIR)/cdo-Mrotuvb.Tpo -c -o cdo-Mrotuvb.obj `if test -f 'Mrotuvb.c'; then $(CYGPATH_W) 'Mrotuvb.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuvb.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Mrotuvb.Tpo $(DEPDIR)/cdo-Mrotuvb.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Mrotuvb.c' object='cdo-Mrotuvb.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuvb.obj `if test -f 'Mrotuvb.c'; then $(CYGPATH_W) 'Mrotuvb.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuvb.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Mrotuvb.obj `if test -f 'Mrotuvb.c'; then $(CYGPATH_W) 'Mrotuvb.c'; else $(CYGPATH_W) '$(srcdir)/Mrotuvb.c'; fi`
 
 cdo-Ninfo.o: Ninfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ninfo.o -MD -MP -MF $(DEPDIR)/cdo-Ninfo.Tpo -c -o cdo-Ninfo.o `test -f 'Ninfo.c' || echo '$(srcdir)/'`Ninfo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ninfo.Tpo $(DEPDIR)/cdo-Ninfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ninfo.c' object='cdo-Ninfo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ninfo.o -MD -MP -MF $(DEPDIR)/cdo-Ninfo.Tpo -c -o cdo-Ninfo.o `test -f 'Ninfo.c' || echo '$(srcdir)/'`Ninfo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ninfo.Tpo $(DEPDIR)/cdo-Ninfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ninfo.c' object='cdo-Ninfo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ninfo.o `test -f 'Ninfo.c' || echo '$(srcdir)/'`Ninfo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ninfo.o `test -f 'Ninfo.c' || echo '$(srcdir)/'`Ninfo.c
 
 cdo-Ninfo.obj: Ninfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ninfo.obj -MD -MP -MF $(DEPDIR)/cdo-Ninfo.Tpo -c -o cdo-Ninfo.obj `if test -f 'Ninfo.c'; then $(CYGPATH_W) 'Ninfo.c'; else $(CYGPATH_W) '$(srcdir)/Ninfo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ninfo.Tpo $(DEPDIR)/cdo-Ninfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ninfo.c' object='cdo-Ninfo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ninfo.obj -MD -MP -MF $(DEPDIR)/cdo-Ninfo.Tpo -c -o cdo-Ninfo.obj `if test -f 'Ninfo.c'; then $(CYGPATH_W) 'Ninfo.c'; else $(CYGPATH_W) '$(srcdir)/Ninfo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ninfo.Tpo $(DEPDIR)/cdo-Ninfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ninfo.c' object='cdo-Ninfo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ninfo.obj `if test -f 'Ninfo.c'; then $(CYGPATH_W) 'Ninfo.c'; else $(CYGPATH_W) '$(srcdir)/Ninfo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ninfo.obj `if test -f 'Ninfo.c'; then $(CYGPATH_W) 'Ninfo.c'; else $(CYGPATH_W) '$(srcdir)/Ninfo.c'; fi`
 
 cdo-Nmltest.o: Nmltest.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Nmltest.o -MD -MP -MF $(DEPDIR)/cdo-Nmltest.Tpo -c -o cdo-Nmltest.o `test -f 'Nmltest.c' || echo '$(srcdir)/'`Nmltest.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Nmltest.Tpo $(DEPDIR)/cdo-Nmltest.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Nmltest.c' object='cdo-Nmltest.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Nmltest.o -MD -MP -MF $(DEPDIR)/cdo-Nmltest.Tpo -c -o cdo-Nmltest.o `test -f 'Nmltest.c' || echo '$(srcdir)/'`Nmltest.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Nmltest.Tpo $(DEPDIR)/cdo-Nmltest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Nmltest.c' object='cdo-Nmltest.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Nmltest.o `test -f 'Nmltest.c' || echo '$(srcdir)/'`Nmltest.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Nmltest.o `test -f 'Nmltest.c' || echo '$(srcdir)/'`Nmltest.c
 
 cdo-Nmltest.obj: Nmltest.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Nmltest.obj -MD -MP -MF $(DEPDIR)/cdo-Nmltest.Tpo -c -o cdo-Nmltest.obj `if test -f 'Nmltest.c'; then $(CYGPATH_W) 'Nmltest.c'; else $(CYGPATH_W) '$(srcdir)/Nmltest.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Nmltest.Tpo $(DEPDIR)/cdo-Nmltest.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Nmltest.c' object='cdo-Nmltest.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Nmltest.obj -MD -MP -MF $(DEPDIR)/cdo-Nmltest.Tpo -c -o cdo-Nmltest.obj `if test -f 'Nmltest.c'; then $(CYGPATH_W) 'Nmltest.c'; else $(CYGPATH_W) '$(srcdir)/Nmltest.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Nmltest.Tpo $(DEPDIR)/cdo-Nmltest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Nmltest.c' object='cdo-Nmltest.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Nmltest.obj `if test -f 'Nmltest.c'; then $(CYGPATH_W) 'Nmltest.c'; else $(CYGPATH_W) '$(srcdir)/Nmltest.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Nmltest.obj `if test -f 'Nmltest.c'; then $(CYGPATH_W) 'Nmltest.c'; else $(CYGPATH_W) '$(srcdir)/Nmltest.c'; fi`
 
 cdo-Output.o: Output.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Output.o -MD -MP -MF $(DEPDIR)/cdo-Output.Tpo -c -o cdo-Output.o `test -f 'Output.c' || echo '$(srcdir)/'`Output.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Output.Tpo $(DEPDIR)/cdo-Output.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Output.c' object='cdo-Output.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Output.o -MD -MP -MF $(DEPDIR)/cdo-Output.Tpo -c -o cdo-Output.o `test -f 'Output.c' || echo '$(srcdir)/'`Output.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Output.Tpo $(DEPDIR)/cdo-Output.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Output.c' object='cdo-Output.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Output.o `test -f 'Output.c' || echo '$(srcdir)/'`Output.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Output.o `test -f 'Output.c' || echo '$(srcdir)/'`Output.c
 
 cdo-Output.obj: Output.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Output.obj -MD -MP -MF $(DEPDIR)/cdo-Output.Tpo -c -o cdo-Output.obj `if test -f 'Output.c'; then $(CYGPATH_W) 'Output.c'; else $(CYGPATH_W) '$(srcdir)/Output.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Output.Tpo $(DEPDIR)/cdo-Output.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Output.c' object='cdo-Output.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Output.obj -MD -MP -MF $(DEPDIR)/cdo-Output.Tpo -c -o cdo-Output.obj `if test -f 'Output.c'; then $(CYGPATH_W) 'Output.c'; else $(CYGPATH_W) '$(srcdir)/Output.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Output.Tpo $(DEPDIR)/cdo-Output.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Output.c' object='cdo-Output.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Output.obj `if test -f 'Output.c'; then $(CYGPATH_W) 'Output.c'; else $(CYGPATH_W) '$(srcdir)/Output.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Output.obj `if test -f 'Output.c'; then $(CYGPATH_W) 'Output.c'; else $(CYGPATH_W) '$(srcdir)/Output.c'; fi`
 
 cdo-Outputgmt.o: Outputgmt.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Outputgmt.o -MD -MP -MF $(DEPDIR)/cdo-Outputgmt.Tpo -c -o cdo-Outputgmt.o `test -f 'Outputgmt.c' || echo '$(srcdir)/'`Outputgmt.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Outputgmt.Tpo $(DEPDIR)/cdo-Outputgmt.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Outputgmt.c' object='cdo-Outputgmt.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Outputgmt.o -MD -MP -MF $(DEPDIR)/cdo-Outputgmt.Tpo -c -o cdo-Outputgmt.o `test -f 'Outputgmt.c' || echo '$(srcdir)/'`Outputgmt.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Outputgmt.Tpo $(DEPDIR)/cdo-Outputgmt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Outputgmt.c' object='cdo-Outputgmt.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Outputgmt.o `test -f 'Outputgmt.c' || echo '$(srcdir)/'`Outputgmt.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Outputgmt.o `test -f 'Outputgmt.c' || echo '$(srcdir)/'`Outputgmt.c
 
 cdo-Outputgmt.obj: Outputgmt.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Outputgmt.obj -MD -MP -MF $(DEPDIR)/cdo-Outputgmt.Tpo -c -o cdo-Outputgmt.obj `if test -f 'Outputgmt.c'; then $(CYGPATH_W) 'Outputgmt.c'; else $(CYGPATH_W) '$(srcdir)/Outputgmt.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Outputgmt.Tpo $(DEPDIR)/cdo-Outputgmt.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Outputgmt.c' object='cdo-Outputgmt.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Outputgmt.obj -MD -MP -MF $(DEPDIR)/cdo-Outputgmt.Tpo -c -o cdo-Outputgmt.obj `if test -f 'Outputgmt.c'; then $(CYGPATH_W) 'Outputgmt.c'; else $(CYGPATH_W) '$(srcdir)/Outputgmt.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Outputgmt.Tpo $(DEPDIR)/cdo-Outputgmt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Outputgmt.c' object='cdo-Outputgmt.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Outputgmt.obj `if test -f 'Outputgmt.c'; then $(CYGPATH_W) 'Outputgmt.c'; else $(CYGPATH_W) '$(srcdir)/Outputgmt.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Outputgmt.obj `if test -f 'Outputgmt.c'; then $(CYGPATH_W) 'Outputgmt.c'; else $(CYGPATH_W) '$(srcdir)/Outputgmt.c'; fi`
 
 cdo-Pack.o: Pack.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pack.o -MD -MP -MF $(DEPDIR)/cdo-Pack.Tpo -c -o cdo-Pack.o `test -f 'Pack.c' || echo '$(srcdir)/'`Pack.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Pack.Tpo $(DEPDIR)/cdo-Pack.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Pack.c' object='cdo-Pack.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pack.o -MD -MP -MF $(DEPDIR)/cdo-Pack.Tpo -c -o cdo-Pack.o `test -f 'Pack.c' || echo '$(srcdir)/'`Pack.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Pack.Tpo $(DEPDIR)/cdo-Pack.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Pack.c' object='cdo-Pack.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pack.o `test -f 'Pack.c' || echo '$(srcdir)/'`Pack.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pack.o `test -f 'Pack.c' || echo '$(srcdir)/'`Pack.c
 
 cdo-Pack.obj: Pack.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pack.obj -MD -MP -MF $(DEPDIR)/cdo-Pack.Tpo -c -o cdo-Pack.obj `if test -f 'Pack.c'; then $(CYGPATH_W) 'Pack.c'; else $(CYGPATH_W) '$(srcdir)/Pack.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Pack.Tpo $(DEPDIR)/cdo-Pack.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Pack.c' object='cdo-Pack.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pack.obj -MD -MP -MF $(DEPDIR)/cdo-Pack.Tpo -c -o cdo-Pack.obj `if test -f 'Pack.c'; then $(CYGPATH_W) 'Pack.c'; else $(CYGPATH_W) '$(srcdir)/Pack.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Pack.Tpo $(DEPDIR)/cdo-Pack.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Pack.c' object='cdo-Pack.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pack.obj `if test -f 'Pack.c'; then $(CYGPATH_W) 'Pack.c'; else $(CYGPATH_W) '$(srcdir)/Pack.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pack.obj `if test -f 'Pack.c'; then $(CYGPATH_W) 'Pack.c'; else $(CYGPATH_W) '$(srcdir)/Pack.c'; fi`
 
 cdo-Pinfo.o: Pinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pinfo.o -MD -MP -MF $(DEPDIR)/cdo-Pinfo.Tpo -c -o cdo-Pinfo.o `test -f 'Pinfo.c' || echo '$(srcdir)/'`Pinfo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Pinfo.Tpo $(DEPDIR)/cdo-Pinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Pinfo.c' object='cdo-Pinfo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pinfo.o -MD -MP -MF $(DEPDIR)/cdo-Pinfo.Tpo -c -o cdo-Pinfo.o `test -f 'Pinfo.c' || echo '$(srcdir)/'`Pinfo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Pinfo.Tpo $(DEPDIR)/cdo-Pinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Pinfo.c' object='cdo-Pinfo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pinfo.o `test -f 'Pinfo.c' || echo '$(srcdir)/'`Pinfo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pinfo.o `test -f 'Pinfo.c' || echo '$(srcdir)/'`Pinfo.c
 
 cdo-Pinfo.obj: Pinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Pinfo.Tpo -c -o cdo-Pinfo.obj `if test -f 'Pinfo.c'; then $(CYGPATH_W) 'Pinfo.c'; else $(CYGPATH_W) '$(srcdir)/Pinfo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Pinfo.Tpo $(DEPDIR)/cdo-Pinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Pinfo.c' object='cdo-Pinfo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Pinfo.Tpo -c -o cdo-Pinfo.obj `if test -f 'Pinfo.c'; then $(CYGPATH_W) 'Pinfo.c'; else $(CYGPATH_W) '$(srcdir)/Pinfo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Pinfo.Tpo $(DEPDIR)/cdo-Pinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Pinfo.c' object='cdo-Pinfo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pinfo.obj `if test -f 'Pinfo.c'; then $(CYGPATH_W) 'Pinfo.c'; else $(CYGPATH_W) '$(srcdir)/Pinfo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pinfo.obj `if test -f 'Pinfo.c'; then $(CYGPATH_W) 'Pinfo.c'; else $(CYGPATH_W) '$(srcdir)/Pinfo.c'; fi`
 
 cdo-Pressure.o: Pressure.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pressure.o -MD -MP -MF $(DEPDIR)/cdo-Pressure.Tpo -c -o cdo-Pressure.o `test -f 'Pressure.c' || echo '$(srcdir)/'`Pressure.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Pressure.Tpo $(DEPDIR)/cdo-Pressure.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Pressure.c' object='cdo-Pressure.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pressure.o -MD -MP -MF $(DEPDIR)/cdo-Pressure.Tpo -c -o cdo-Pressure.o `test -f 'Pressure.c' || echo '$(srcdir)/'`Pressure.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Pressure.Tpo $(DEPDIR)/cdo-Pressure.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Pressure.c' object='cdo-Pressure.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pressure.o `test -f 'Pressure.c' || echo '$(srcdir)/'`Pressure.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pressure.o `test -f 'Pressure.c' || echo '$(srcdir)/'`Pressure.c
 
 cdo-Pressure.obj: Pressure.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pressure.obj -MD -MP -MF $(DEPDIR)/cdo-Pressure.Tpo -c -o cdo-Pressure.obj `if test -f 'Pressure.c'; then $(CYGPATH_W) 'Pressure.c'; else $(CYGPATH_W) '$(srcdir)/Pressure.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Pressure.Tpo $(DEPDIR)/cdo-Pressure.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Pressure.c' object='cdo-Pressure.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Pressure.obj -MD -MP -MF $(DEPDIR)/cdo-Pressure.Tpo -c -o cdo-Pressure.obj `if test -f 'Pressure.c'; then $(CYGPATH_W) 'Pressure.c'; else $(CYGPATH_W) '$(srcdir)/Pressure.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Pressure.Tpo $(DEPDIR)/cdo-Pressure.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Pressure.c' object='cdo-Pressure.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pressure.obj `if test -f 'Pressure.c'; then $(CYGPATH_W) 'Pressure.c'; else $(CYGPATH_W) '$(srcdir)/Pressure.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Pressure.obj `if test -f 'Pressure.c'; then $(CYGPATH_W) 'Pressure.c'; else $(CYGPATH_W) '$(srcdir)/Pressure.c'; fi`
 
 cdo-Regres.o: Regres.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Regres.o -MD -MP -MF $(DEPDIR)/cdo-Regres.Tpo -c -o cdo-Regres.o `test -f 'Regres.c' || echo '$(srcdir)/'`Regres.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Regres.Tpo $(DEPDIR)/cdo-Regres.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Regres.c' object='cdo-Regres.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Regres.o -MD -MP -MF $(DEPDIR)/cdo-Regres.Tpo -c -o cdo-Regres.o `test -f 'Regres.c' || echo '$(srcdir)/'`Regres.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Regres.Tpo $(DEPDIR)/cdo-Regres.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Regres.c' object='cdo-Regres.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Regres.o `test -f 'Regres.c' || echo '$(srcdir)/'`Regres.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Regres.o `test -f 'Regres.c' || echo '$(srcdir)/'`Regres.c
 
 cdo-Regres.obj: Regres.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Regres.obj -MD -MP -MF $(DEPDIR)/cdo-Regres.Tpo -c -o cdo-Regres.obj `if test -f 'Regres.c'; then $(CYGPATH_W) 'Regres.c'; else $(CYGPATH_W) '$(srcdir)/Regres.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Regres.Tpo $(DEPDIR)/cdo-Regres.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Regres.c' object='cdo-Regres.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Regres.obj -MD -MP -MF $(DEPDIR)/cdo-Regres.Tpo -c -o cdo-Regres.obj `if test -f 'Regres.c'; then $(CYGPATH_W) 'Regres.c'; else $(CYGPATH_W) '$(srcdir)/Regres.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Regres.Tpo $(DEPDIR)/cdo-Regres.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Regres.c' object='cdo-Regres.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Regres.obj `if test -f 'Regres.c'; then $(CYGPATH_W) 'Regres.c'; else $(CYGPATH_W) '$(srcdir)/Regres.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Regres.obj `if test -f 'Regres.c'; then $(CYGPATH_W) 'Regres.c'; else $(CYGPATH_W) '$(srcdir)/Regres.c'; fi`
 
 cdo-Remap.o: Remap.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remap.o -MD -MP -MF $(DEPDIR)/cdo-Remap.Tpo -c -o cdo-Remap.o `test -f 'Remap.c' || echo '$(srcdir)/'`Remap.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Remap.Tpo $(DEPDIR)/cdo-Remap.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Remap.c' object='cdo-Remap.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remap.o -MD -MP -MF $(DEPDIR)/cdo-Remap.Tpo -c -o cdo-Remap.o `test -f 'Remap.c' || echo '$(srcdir)/'`Remap.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Remap.Tpo $(DEPDIR)/cdo-Remap.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Remap.c' object='cdo-Remap.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remap.o `test -f 'Remap.c' || echo '$(srcdir)/'`Remap.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remap.o `test -f 'Remap.c' || echo '$(srcdir)/'`Remap.c
 
 cdo-Remap.obj: Remap.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remap.obj -MD -MP -MF $(DEPDIR)/cdo-Remap.Tpo -c -o cdo-Remap.obj `if test -f 'Remap.c'; then $(CYGPATH_W) 'Remap.c'; else $(CYGPATH_W) '$(srcdir)/Remap.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Remap.Tpo $(DEPDIR)/cdo-Remap.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Remap.c' object='cdo-Remap.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remap.obj -MD -MP -MF $(DEPDIR)/cdo-Remap.Tpo -c -o cdo-Remap.obj `if test -f 'Remap.c'; then $(CYGPATH_W) 'Remap.c'; else $(CYGPATH_W) '$(srcdir)/Remap.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Remap.Tpo $(DEPDIR)/cdo-Remap.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Remap.c' object='cdo-Remap.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remap.obj `if test -f 'Remap.c'; then $(CYGPATH_W) 'Remap.c'; else $(CYGPATH_W) '$(srcdir)/Remap.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remap.obj `if test -f 'Remap.c'; then $(CYGPATH_W) 'Remap.c'; else $(CYGPATH_W) '$(srcdir)/Remap.c'; fi`
 
 cdo-Remapeta.o: Remapeta.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remapeta.o -MD -MP -MF $(DEPDIR)/cdo-Remapeta.Tpo -c -o cdo-Remapeta.o `test -f 'Remapeta.c' || echo '$(srcdir)/'`Remapeta.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Remapeta.Tpo $(DEPDIR)/cdo-Remapeta.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Remapeta.c' object='cdo-Remapeta.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remapeta.o -MD -MP -MF $(DEPDIR)/cdo-Remapeta.Tpo -c -o cdo-Remapeta.o `test -f 'Remapeta.c' || echo '$(srcdir)/'`Remapeta.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Remapeta.Tpo $(DEPDIR)/cdo-Remapeta.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Remapeta.c' object='cdo-Remapeta.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remapeta.o `test -f 'Remapeta.c' || echo '$(srcdir)/'`Remapeta.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remapeta.o `test -f 'Remapeta.c' || echo '$(srcdir)/'`Remapeta.c
 
 cdo-Remapeta.obj: Remapeta.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remapeta.obj -MD -MP -MF $(DEPDIR)/cdo-Remapeta.Tpo -c -o cdo-Remapeta.obj `if test -f 'Remapeta.c'; then $(CYGPATH_W) 'Remapeta.c'; else $(CYGPATH_W) '$(srcdir)/Remapeta.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Remapeta.Tpo $(DEPDIR)/cdo-Remapeta.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Remapeta.c' object='cdo-Remapeta.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Remapeta.obj -MD -MP -MF $(DEPDIR)/cdo-Remapeta.Tpo -c -o cdo-Remapeta.obj `if test -f 'Remapeta.c'; then $(CYGPATH_W) 'Remapeta.c'; else $(CYGPATH_W) '$(srcdir)/Remapeta.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Remapeta.Tpo $(DEPDIR)/cdo-Remapeta.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Remapeta.c' object='cdo-Remapeta.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remapeta.obj `if test -f 'Remapeta.c'; then $(CYGPATH_W) 'Remapeta.c'; else $(CYGPATH_W) '$(srcdir)/Remapeta.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Remapeta.obj `if test -f 'Remapeta.c'; then $(CYGPATH_W) 'Remapeta.c'; else $(CYGPATH_W) '$(srcdir)/Remapeta.c'; fi`
 
 cdo-Replace.o: Replace.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replace.o -MD -MP -MF $(DEPDIR)/cdo-Replace.Tpo -c -o cdo-Replace.o `test -f 'Replace.c' || echo '$(srcdir)/'`Replace.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Replace.Tpo $(DEPDIR)/cdo-Replace.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Replace.c' object='cdo-Replace.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replace.o -MD -MP -MF $(DEPDIR)/cdo-Replace.Tpo -c -o cdo-Replace.o `test -f 'Replace.c' || echo '$(srcdir)/'`Replace.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Replace.Tpo $(DEPDIR)/cdo-Replace.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Replace.c' object='cdo-Replace.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replace.o `test -f 'Replace.c' || echo '$(srcdir)/'`Replace.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replace.o `test -f 'Replace.c' || echo '$(srcdir)/'`Replace.c
 
 cdo-Replace.obj: Replace.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replace.obj -MD -MP -MF $(DEPDIR)/cdo-Replace.Tpo -c -o cdo-Replace.obj `if test -f 'Replace.c'; then $(CYGPATH_W) 'Replace.c'; else $(CYGPATH_W) '$(srcdir)/Replace.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Replace.Tpo $(DEPDIR)/cdo-Replace.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Replace.c' object='cdo-Replace.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replace.obj -MD -MP -MF $(DEPDIR)/cdo-Replace.Tpo -c -o cdo-Replace.obj `if test -f 'Replace.c'; then $(CYGPATH_W) 'Replace.c'; else $(CYGPATH_W) '$(srcdir)/Replace.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Replace.Tpo $(DEPDIR)/cdo-Replace.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Replace.c' object='cdo-Replace.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replace.obj `if test -f 'Replace.c'; then $(CYGPATH_W) 'Replace.c'; else $(CYGPATH_W) '$(srcdir)/Replace.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replace.obj `if test -f 'Replace.c'; then $(CYGPATH_W) 'Replace.c'; else $(CYGPATH_W) '$(srcdir)/Replace.c'; fi`
 
 cdo-Replacevalues.o: Replacevalues.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replacevalues.o -MD -MP -MF $(DEPDIR)/cdo-Replacevalues.Tpo -c -o cdo-Replacevalues.o `test -f 'Replacevalues.c' || echo '$(srcdir)/'`Replacevalues.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Replacevalues.Tpo $(DEPDIR)/cdo-Replacevalues.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Replacevalues.c' object='cdo-Replacevalues.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replacevalues.o -MD -MP -MF $(DEPDIR)/cdo-Replacevalues.Tpo -c -o cdo-Replacevalues.o `test -f 'Replacevalues.c' || echo '$(srcdir)/'`Replacevalues.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Replacevalues.Tpo $(DEPDIR)/cdo-Replacevalues.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Replacevalues.c' object='cdo-Replacevalues.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replacevalues.o `test -f 'Replacevalues.c' || echo '$(srcdir)/'`Replacevalues.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replacevalues.o `test -f 'Replacevalues.c' || echo '$(srcdir)/'`Replacevalues.c
 
 cdo-Replacevalues.obj: Replacevalues.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replacevalues.obj -MD -MP -MF $(DEPDIR)/cdo-Replacevalues.Tpo -c -o cdo-Replacevalues.obj `if test -f 'Replacevalues.c'; then $(CYGPATH_W) 'Replacevalues.c'; else $(CYGPATH_W) '$(srcdir)/Replacevalues.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Replacevalues.Tpo $(DEPDIR)/cdo-Replacevalues.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Replacevalues.c' object='cdo-Replacevalues.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Replacevalues.obj -MD -MP -MF $(DEPDIR)/cdo-Replacevalues.Tpo -c -o cdo-Replacevalues.obj `if test -f 'Replacevalues.c'; then $(CYGPATH_W) 'Replacevalues.c'; else $(CYGPATH_W) '$(srcdir)/Replacevalues.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Replacevalues.Tpo $(DEPDIR)/cdo-Replacevalues.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Replacevalues.c' object='cdo-Replacevalues.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replacevalues.obj `if test -f 'Replacevalues.c'; then $(CYGPATH_W) 'Replacevalues.c'; else $(CYGPATH_W) '$(srcdir)/Replacevalues.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Replacevalues.obj `if test -f 'Replacevalues.c'; then $(CYGPATH_W) 'Replacevalues.c'; else $(CYGPATH_W) '$(srcdir)/Replacevalues.c'; fi`
 
 cdo-Rhopot.o: Rhopot.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rhopot.o -MD -MP -MF $(DEPDIR)/cdo-Rhopot.Tpo -c -o cdo-Rhopot.o `test -f 'Rhopot.c' || echo '$(srcdir)/'`Rhopot.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Rhopot.Tpo $(DEPDIR)/cdo-Rhopot.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Rhopot.c' object='cdo-Rhopot.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rhopot.o -MD -MP -MF $(DEPDIR)/cdo-Rhopot.Tpo -c -o cdo-Rhopot.o `test -f 'Rhopot.c' || echo '$(srcdir)/'`Rhopot.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Rhopot.Tpo $(DEPDIR)/cdo-Rhopot.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Rhopot.c' object='cdo-Rhopot.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rhopot.o `test -f 'Rhopot.c' || echo '$(srcdir)/'`Rhopot.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rhopot.o `test -f 'Rhopot.c' || echo '$(srcdir)/'`Rhopot.c
 
 cdo-Rhopot.obj: Rhopot.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rhopot.obj -MD -MP -MF $(DEPDIR)/cdo-Rhopot.Tpo -c -o cdo-Rhopot.obj `if test -f 'Rhopot.c'; then $(CYGPATH_W) 'Rhopot.c'; else $(CYGPATH_W) '$(srcdir)/Rhopot.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Rhopot.Tpo $(DEPDIR)/cdo-Rhopot.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Rhopot.c' object='cdo-Rhopot.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rhopot.obj -MD -MP -MF $(DEPDIR)/cdo-Rhopot.Tpo -c -o cdo-Rhopot.obj `if test -f 'Rhopot.c'; then $(CYGPATH_W) 'Rhopot.c'; else $(CYGPATH_W) '$(srcdir)/Rhopot.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Rhopot.Tpo $(DEPDIR)/cdo-Rhopot.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Rhopot.c' object='cdo-Rhopot.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rhopot.obj `if test -f 'Rhopot.c'; then $(CYGPATH_W) 'Rhopot.c'; else $(CYGPATH_W) '$(srcdir)/Rhopot.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rhopot.obj `if test -f 'Rhopot.c'; then $(CYGPATH_W) 'Rhopot.c'; else $(CYGPATH_W) '$(srcdir)/Rhopot.c'; fi`
 
 cdo-Rotuv.o: Rotuv.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rotuv.o -MD -MP -MF $(DEPDIR)/cdo-Rotuv.Tpo -c -o cdo-Rotuv.o `test -f 'Rotuv.c' || echo '$(srcdir)/'`Rotuv.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Rotuv.Tpo $(DEPDIR)/cdo-Rotuv.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Rotuv.c' object='cdo-Rotuv.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rotuv.o -MD -MP -MF $(DEPDIR)/cdo-Rotuv.Tpo -c -o cdo-Rotuv.o `test -f 'Rotuv.c' || echo '$(srcdir)/'`Rotuv.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Rotuv.Tpo $(DEPDIR)/cdo-Rotuv.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Rotuv.c' object='cdo-Rotuv.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rotuv.o `test -f 'Rotuv.c' || echo '$(srcdir)/'`Rotuv.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rotuv.o `test -f 'Rotuv.c' || echo '$(srcdir)/'`Rotuv.c
 
 cdo-Rotuv.obj: Rotuv.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rotuv.obj -MD -MP -MF $(DEPDIR)/cdo-Rotuv.Tpo -c -o cdo-Rotuv.obj `if test -f 'Rotuv.c'; then $(CYGPATH_W) 'Rotuv.c'; else $(CYGPATH_W) '$(srcdir)/Rotuv.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Rotuv.Tpo $(DEPDIR)/cdo-Rotuv.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Rotuv.c' object='cdo-Rotuv.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Rotuv.obj -MD -MP -MF $(DEPDIR)/cdo-Rotuv.Tpo -c -o cdo-Rotuv.obj `if test -f 'Rotuv.c'; then $(CYGPATH_W) 'Rotuv.c'; else $(CYGPATH_W) '$(srcdir)/Rotuv.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Rotuv.Tpo $(DEPDIR)/cdo-Rotuv.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Rotuv.c' object='cdo-Rotuv.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rotuv.obj `if test -f 'Rotuv.c'; then $(CYGPATH_W) 'Rotuv.c'; else $(CYGPATH_W) '$(srcdir)/Rotuv.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Rotuv.obj `if test -f 'Rotuv.c'; then $(CYGPATH_W) 'Rotuv.c'; else $(CYGPATH_W) '$(srcdir)/Rotuv.c'; fi`
 
 cdo-Runpctl.o: Runpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runpctl.o -MD -MP -MF $(DEPDIR)/cdo-Runpctl.Tpo -c -o cdo-Runpctl.o `test -f 'Runpctl.c' || echo '$(srcdir)/'`Runpctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Runpctl.Tpo $(DEPDIR)/cdo-Runpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Runpctl.c' object='cdo-Runpctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runpctl.o -MD -MP -MF $(DEPDIR)/cdo-Runpctl.Tpo -c -o cdo-Runpctl.o `test -f 'Runpctl.c' || echo '$(srcdir)/'`Runpctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Runpctl.Tpo $(DEPDIR)/cdo-Runpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Runpctl.c' object='cdo-Runpctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runpctl.o `test -f 'Runpctl.c' || echo '$(srcdir)/'`Runpctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runpctl.o `test -f 'Runpctl.c' || echo '$(srcdir)/'`Runpctl.c
 
 cdo-Runpctl.obj: Runpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Runpctl.Tpo -c -o cdo-Runpctl.obj `if test -f 'Runpctl.c'; then $(CYGPATH_W) 'Runpctl.c'; else $(CYGPATH_W) '$(srcdir)/Runpctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Runpctl.Tpo $(DEPDIR)/cdo-Runpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Runpctl.c' object='cdo-Runpctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Runpctl.Tpo -c -o cdo-Runpctl.obj `if test -f 'Runpctl.c'; then $(CYGPATH_W) 'Runpctl.c'; else $(CYGPATH_W) '$(srcdir)/Runpctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Runpctl.Tpo $(DEPDIR)/cdo-Runpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Runpctl.c' object='cdo-Runpctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runpctl.obj `if test -f 'Runpctl.c'; then $(CYGPATH_W) 'Runpctl.c'; else $(CYGPATH_W) '$(srcdir)/Runpctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runpctl.obj `if test -f 'Runpctl.c'; then $(CYGPATH_W) 'Runpctl.c'; else $(CYGPATH_W) '$(srcdir)/Runpctl.c'; fi`
 
 cdo-Runstat.o: Runstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runstat.o -MD -MP -MF $(DEPDIR)/cdo-Runstat.Tpo -c -o cdo-Runstat.o `test -f 'Runstat.c' || echo '$(srcdir)/'`Runstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Runstat.Tpo $(DEPDIR)/cdo-Runstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Runstat.c' object='cdo-Runstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runstat.o -MD -MP -MF $(DEPDIR)/cdo-Runstat.Tpo -c -o cdo-Runstat.o `test -f 'Runstat.c' || echo '$(srcdir)/'`Runstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Runstat.Tpo $(DEPDIR)/cdo-Runstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Runstat.c' object='cdo-Runstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runstat.o `test -f 'Runstat.c' || echo '$(srcdir)/'`Runstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runstat.o `test -f 'Runstat.c' || echo '$(srcdir)/'`Runstat.c
 
 cdo-Runstat.obj: Runstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runstat.obj -MD -MP -MF $(DEPDIR)/cdo-Runstat.Tpo -c -o cdo-Runstat.obj `if test -f 'Runstat.c'; then $(CYGPATH_W) 'Runstat.c'; else $(CYGPATH_W) '$(srcdir)/Runstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Runstat.Tpo $(DEPDIR)/cdo-Runstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Runstat.c' object='cdo-Runstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Runstat.obj -MD -MP -MF $(DEPDIR)/cdo-Runstat.Tpo -c -o cdo-Runstat.obj `if test -f 'Runstat.c'; then $(CYGPATH_W) 'Runstat.c'; else $(CYGPATH_W) '$(srcdir)/Runstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Runstat.Tpo $(DEPDIR)/cdo-Runstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Runstat.c' object='cdo-Runstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runstat.obj `if test -f 'Runstat.c'; then $(CYGPATH_W) 'Runstat.c'; else $(CYGPATH_W) '$(srcdir)/Runstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runstat.obj `if test -f 'Runstat.c'; then $(CYGPATH_W) 'Runstat.c'; else $(CYGPATH_W) '$(srcdir)/Runstat.c'; fi`
 
 cdo-Scatter.o: Scatter.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Scatter.o -MD -MP -MF $(DEPDIR)/cdo-Scatter.Tpo -c -o cdo-Scatter.o `test -f 'Scatter.c' || echo '$(srcdir)/'`Scatter.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Scatter.Tpo $(DEPDIR)/cdo-Scatter.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Scatter.c' object='cdo-Scatter.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Scatter.o -MD -MP -MF $(DEPDIR)/cdo-Scatter.Tpo -c -o cdo-Scatter.o `test -f 'Scatter.c' || echo '$(srcdir)/'`Scatter.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Scatter.Tpo $(DEPDIR)/cdo-Scatter.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Scatter.c' object='cdo-Scatter.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Scatter.o `test -f 'Scatter.c' || echo '$(srcdir)/'`Scatter.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Scatter.o `test -f 'Scatter.c' || echo '$(srcdir)/'`Scatter.c
 
 cdo-Scatter.obj: Scatter.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Scatter.obj -MD -MP -MF $(DEPDIR)/cdo-Scatter.Tpo -c -o cdo-Scatter.obj `if test -f 'Scatter.c'; then $(CYGPATH_W) 'Scatter.c'; else $(CYGPATH_W) '$(srcdir)/Scatter.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Scatter.Tpo $(DEPDIR)/cdo-Scatter.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Scatter.c' object='cdo-Scatter.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Scatter.obj -MD -MP -MF $(DEPDIR)/cdo-Scatter.Tpo -c -o cdo-Scatter.obj `if test -f 'Scatter.c'; then $(CYGPATH_W) 'Scatter.c'; else $(CYGPATH_W) '$(srcdir)/Scatter.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Scatter.Tpo $(DEPDIR)/cdo-Scatter.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Scatter.c' object='cdo-Scatter.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Scatter.obj `if test -f 'Scatter.c'; then $(CYGPATH_W) 'Scatter.c'; else $(CYGPATH_W) '$(srcdir)/Scatter.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Scatter.obj `if test -f 'Scatter.c'; then $(CYGPATH_W) 'Scatter.c'; else $(CYGPATH_W) '$(srcdir)/Scatter.c'; fi`
 
 cdo-Seascount.o: Seascount.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seascount.o -MD -MP -MF $(DEPDIR)/cdo-Seascount.Tpo -c -o cdo-Seascount.o `test -f 'Seascount.c' || echo '$(srcdir)/'`Seascount.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seascount.Tpo $(DEPDIR)/cdo-Seascount.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seascount.c' object='cdo-Seascount.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seascount.o -MD -MP -MF $(DEPDIR)/cdo-Seascount.Tpo -c -o cdo-Seascount.o `test -f 'Seascount.c' || echo '$(srcdir)/'`Seascount.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seascount.Tpo $(DEPDIR)/cdo-Seascount.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seascount.c' object='cdo-Seascount.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seascount.o `test -f 'Seascount.c' || echo '$(srcdir)/'`Seascount.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seascount.o `test -f 'Seascount.c' || echo '$(srcdir)/'`Seascount.c
 
 cdo-Seascount.obj: Seascount.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seascount.obj -MD -MP -MF $(DEPDIR)/cdo-Seascount.Tpo -c -o cdo-Seascount.obj `if test -f 'Seascount.c'; then $(CYGPATH_W) 'Seascount.c'; else $(CYGPATH_W) '$(srcdir)/Seascount.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seascount.Tpo $(DEPDIR)/cdo-Seascount.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seascount.c' object='cdo-Seascount.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seascount.obj -MD -MP -MF $(DEPDIR)/cdo-Seascount.Tpo -c -o cdo-Seascount.obj `if test -f 'Seascount.c'; then $(CYGPATH_W) 'Seascount.c'; else $(CYGPATH_W) '$(srcdir)/Seascount.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seascount.Tpo $(DEPDIR)/cdo-Seascount.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seascount.c' object='cdo-Seascount.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seascount.obj `if test -f 'Seascount.c'; then $(CYGPATH_W) 'Seascount.c'; else $(CYGPATH_W) '$(srcdir)/Seascount.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seascount.obj `if test -f 'Seascount.c'; then $(CYGPATH_W) 'Seascount.c'; else $(CYGPATH_W) '$(srcdir)/Seascount.c'; fi`
 
 cdo-Seaspctl.o: Seaspctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seaspctl.o -MD -MP -MF $(DEPDIR)/cdo-Seaspctl.Tpo -c -o cdo-Seaspctl.o `test -f 'Seaspctl.c' || echo '$(srcdir)/'`Seaspctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seaspctl.Tpo $(DEPDIR)/cdo-Seaspctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seaspctl.c' object='cdo-Seaspctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seaspctl.o -MD -MP -MF $(DEPDIR)/cdo-Seaspctl.Tpo -c -o cdo-Seaspctl.o `test -f 'Seaspctl.c' || echo '$(srcdir)/'`Seaspctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seaspctl.Tpo $(DEPDIR)/cdo-Seaspctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seaspctl.c' object='cdo-Seaspctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seaspctl.o `test -f 'Seaspctl.c' || echo '$(srcdir)/'`Seaspctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seaspctl.o `test -f 'Seaspctl.c' || echo '$(srcdir)/'`Seaspctl.c
 
 cdo-Seaspctl.obj: Seaspctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seaspctl.obj -MD -MP -MF $(DEPDIR)/cdo-Seaspctl.Tpo -c -o cdo-Seaspctl.obj `if test -f 'Seaspctl.c'; then $(CYGPATH_W) 'Seaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Seaspctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seaspctl.Tpo $(DEPDIR)/cdo-Seaspctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seaspctl.c' object='cdo-Seaspctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seaspctl.obj -MD -MP -MF $(DEPDIR)/cdo-Seaspctl.Tpo -c -o cdo-Seaspctl.obj `if test -f 'Seaspctl.c'; then $(CYGPATH_W) 'Seaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Seaspctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seaspctl.Tpo $(DEPDIR)/cdo-Seaspctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seaspctl.c' object='cdo-Seaspctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seaspctl.obj `if test -f 'Seaspctl.c'; then $(CYGPATH_W) 'Seaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Seaspctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seaspctl.obj `if test -f 'Seaspctl.c'; then $(CYGPATH_W) 'Seaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Seaspctl.c'; fi`
 
 cdo-Seasstat.o: Seasstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seasstat.o -MD -MP -MF $(DEPDIR)/cdo-Seasstat.Tpo -c -o cdo-Seasstat.o `test -f 'Seasstat.c' || echo '$(srcdir)/'`Seasstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seasstat.Tpo $(DEPDIR)/cdo-Seasstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seasstat.c' object='cdo-Seasstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seasstat.o -MD -MP -MF $(DEPDIR)/cdo-Seasstat.Tpo -c -o cdo-Seasstat.o `test -f 'Seasstat.c' || echo '$(srcdir)/'`Seasstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seasstat.Tpo $(DEPDIR)/cdo-Seasstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seasstat.c' object='cdo-Seasstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seasstat.o `test -f 'Seasstat.c' || echo '$(srcdir)/'`Seasstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seasstat.o `test -f 'Seasstat.c' || echo '$(srcdir)/'`Seasstat.c
 
 cdo-Seasstat.obj: Seasstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seasstat.obj -MD -MP -MF $(DEPDIR)/cdo-Seasstat.Tpo -c -o cdo-Seasstat.obj `if test -f 'Seasstat.c'; then $(CYGPATH_W) 'Seasstat.c'; else $(CYGPATH_W) '$(srcdir)/Seasstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seasstat.Tpo $(DEPDIR)/cdo-Seasstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seasstat.c' object='cdo-Seasstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seasstat.obj -MD -MP -MF $(DEPDIR)/cdo-Seasstat.Tpo -c -o cdo-Seasstat.obj `if test -f 'Seasstat.c'; then $(CYGPATH_W) 'Seasstat.c'; else $(CYGPATH_W) '$(srcdir)/Seasstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seasstat.Tpo $(DEPDIR)/cdo-Seasstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seasstat.c' object='cdo-Seasstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seasstat.obj `if test -f 'Seasstat.c'; then $(CYGPATH_W) 'Seasstat.c'; else $(CYGPATH_W) '$(srcdir)/Seasstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seasstat.obj `if test -f 'Seasstat.c'; then $(CYGPATH_W) 'Seasstat.c'; else $(CYGPATH_W) '$(srcdir)/Seasstat.c'; fi`
 
 cdo-Selbox.o: Selbox.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selbox.o -MD -MP -MF $(DEPDIR)/cdo-Selbox.Tpo -c -o cdo-Selbox.o `test -f 'Selbox.c' || echo '$(srcdir)/'`Selbox.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Selbox.Tpo $(DEPDIR)/cdo-Selbox.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Selbox.c' object='cdo-Selbox.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selbox.o -MD -MP -MF $(DEPDIR)/cdo-Selbox.Tpo -c -o cdo-Selbox.o `test -f 'Selbox.c' || echo '$(srcdir)/'`Selbox.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selbox.Tpo $(DEPDIR)/cdo-Selbox.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Selbox.c' object='cdo-Selbox.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selbox.o `test -f 'Selbox.c' || echo '$(srcdir)/'`Selbox.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selbox.o `test -f 'Selbox.c' || echo '$(srcdir)/'`Selbox.c
 
 cdo-Selbox.obj: Selbox.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selbox.obj -MD -MP -MF $(DEPDIR)/cdo-Selbox.Tpo -c -o cdo-Selbox.obj `if test -f 'Selbox.c'; then $(CYGPATH_W) 'Selbox.c'; else $(CYGPATH_W) '$(srcdir)/Selbox.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Selbox.Tpo $(DEPDIR)/cdo-Selbox.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Selbox.c' object='cdo-Selbox.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selbox.obj -MD -MP -MF $(DEPDIR)/cdo-Selbox.Tpo -c -o cdo-Selbox.obj `if test -f 'Selbox.c'; then $(CYGPATH_W) 'Selbox.c'; else $(CYGPATH_W) '$(srcdir)/Selbox.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selbox.Tpo $(DEPDIR)/cdo-Selbox.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Selbox.c' object='cdo-Selbox.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selbox.obj `if test -f 'Selbox.c'; then $(CYGPATH_W) 'Selbox.c'; else $(CYGPATH_W) '$(srcdir)/Selbox.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selbox.obj `if test -f 'Selbox.c'; then $(CYGPATH_W) 'Selbox.c'; else $(CYGPATH_W) '$(srcdir)/Selbox.c'; fi`
 
 cdo-Select.o: Select.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Select.o -MD -MP -MF $(DEPDIR)/cdo-Select.Tpo -c -o cdo-Select.o `test -f 'Select.c' || echo '$(srcdir)/'`Select.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Select.Tpo $(DEPDIR)/cdo-Select.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Select.c' object='cdo-Select.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Select.o -MD -MP -MF $(DEPDIR)/cdo-Select.Tpo -c -o cdo-Select.o `test -f 'Select.c' || echo '$(srcdir)/'`Select.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Select.Tpo $(DEPDIR)/cdo-Select.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Select.c' object='cdo-Select.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Select.o `test -f 'Select.c' || echo '$(srcdir)/'`Select.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Select.o `test -f 'Select.c' || echo '$(srcdir)/'`Select.c
 
 cdo-Select.obj: Select.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Select.obj -MD -MP -MF $(DEPDIR)/cdo-Select.Tpo -c -o cdo-Select.obj `if test -f 'Select.c'; then $(CYGPATH_W) 'Select.c'; else $(CYGPATH_W) '$(srcdir)/Select.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Select.Tpo $(DEPDIR)/cdo-Select.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Select.c' object='cdo-Select.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Select.obj -MD -MP -MF $(DEPDIR)/cdo-Select.Tpo -c -o cdo-Select.obj `if test -f 'Select.c'; then $(CYGPATH_W) 'Select.c'; else $(CYGPATH_W) '$(srcdir)/Select.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Select.Tpo $(DEPDIR)/cdo-Select.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Select.c' object='cdo-Select.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Select.obj `if test -f 'Select.c'; then $(CYGPATH_W) 'Select.c'; else $(CYGPATH_W) '$(srcdir)/Select.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Select.obj `if test -f 'Select.c'; then $(CYGPATH_W) 'Select.c'; else $(CYGPATH_W) '$(srcdir)/Select.c'; fi`
 
 cdo-Seloperator.o: Seloperator.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seloperator.o -MD -MP -MF $(DEPDIR)/cdo-Seloperator.Tpo -c -o cdo-Seloperator.o `test -f 'Seloperator.c' || echo '$(srcdir)/'`Seloperator.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seloperator.Tpo $(DEPDIR)/cdo-Seloperator.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seloperator.c' object='cdo-Seloperator.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seloperator.o -MD -MP -MF $(DEPDIR)/cdo-Seloperator.Tpo -c -o cdo-Seloperator.o `test -f 'Seloperator.c' || echo '$(srcdir)/'`Seloperator.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seloperator.Tpo $(DEPDIR)/cdo-Seloperator.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seloperator.c' object='cdo-Seloperator.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seloperator.o `test -f 'Seloperator.c' || echo '$(srcdir)/'`Seloperator.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seloperator.o `test -f 'Seloperator.c' || echo '$(srcdir)/'`Seloperator.c
 
 cdo-Seloperator.obj: Seloperator.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seloperator.obj -MD -MP -MF $(DEPDIR)/cdo-Seloperator.Tpo -c -o cdo-Seloperator.obj `if test -f 'Seloperator.c'; then $(CYGPATH_W) 'Seloperator.c'; else $(CYGPATH_W) '$(srcdir)/Seloperator.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seloperator.Tpo $(DEPDIR)/cdo-Seloperator.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seloperator.c' object='cdo-Seloperator.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seloperator.obj -MD -MP -MF $(DEPDIR)/cdo-Seloperator.Tpo -c -o cdo-Seloperator.obj `if test -f 'Seloperator.c'; then $(CYGPATH_W) 'Seloperator.c'; else $(CYGPATH_W) '$(srcdir)/Seloperator.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seloperator.Tpo $(DEPDIR)/cdo-Seloperator.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seloperator.c' object='cdo-Seloperator.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seloperator.obj `if test -f 'Seloperator.c'; then $(CYGPATH_W) 'Seloperator.c'; else $(CYGPATH_W) '$(srcdir)/Seloperator.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seloperator.obj `if test -f 'Seloperator.c'; then $(CYGPATH_W) 'Seloperator.c'; else $(CYGPATH_W) '$(srcdir)/Seloperator.c'; fi`
 
 cdo-Selrec.o: Selrec.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selrec.o -MD -MP -MF $(DEPDIR)/cdo-Selrec.Tpo -c -o cdo-Selrec.o `test -f 'Selrec.c' || echo '$(srcdir)/'`Selrec.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Selrec.Tpo $(DEPDIR)/cdo-Selrec.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Selrec.c' object='cdo-Selrec.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selrec.o -MD -MP -MF $(DEPDIR)/cdo-Selrec.Tpo -c -o cdo-Selrec.o `test -f 'Selrec.c' || echo '$(srcdir)/'`Selrec.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selrec.Tpo $(DEPDIR)/cdo-Selrec.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Selrec.c' object='cdo-Selrec.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selrec.o `test -f 'Selrec.c' || echo '$(srcdir)/'`Selrec.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selrec.o `test -f 'Selrec.c' || echo '$(srcdir)/'`Selrec.c
 
 cdo-Selrec.obj: Selrec.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selrec.obj -MD -MP -MF $(DEPDIR)/cdo-Selrec.Tpo -c -o cdo-Selrec.obj `if test -f 'Selrec.c'; then $(CYGPATH_W) 'Selrec.c'; else $(CYGPATH_W) '$(srcdir)/Selrec.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Selrec.Tpo $(DEPDIR)/cdo-Selrec.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Selrec.c' object='cdo-Selrec.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selrec.obj -MD -MP -MF $(DEPDIR)/cdo-Selrec.Tpo -c -o cdo-Selrec.obj `if test -f 'Selrec.c'; then $(CYGPATH_W) 'Selrec.c'; else $(CYGPATH_W) '$(srcdir)/Selrec.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selrec.Tpo $(DEPDIR)/cdo-Selrec.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Selrec.c' object='cdo-Selrec.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selrec.obj `if test -f 'Selrec.c'; then $(CYGPATH_W) 'Selrec.c'; else $(CYGPATH_W) '$(srcdir)/Selrec.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selrec.obj `if test -f 'Selrec.c'; then $(CYGPATH_W) 'Selrec.c'; else $(CYGPATH_W) '$(srcdir)/Selrec.c'; fi`
 
 cdo-Seltime.o: Seltime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seltime.o -MD -MP -MF $(DEPDIR)/cdo-Seltime.Tpo -c -o cdo-Seltime.o `test -f 'Seltime.c' || echo '$(srcdir)/'`Seltime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seltime.Tpo $(DEPDIR)/cdo-Seltime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seltime.c' object='cdo-Seltime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seltime.o -MD -MP -MF $(DEPDIR)/cdo-Seltime.Tpo -c -o cdo-Seltime.o `test -f 'Seltime.c' || echo '$(srcdir)/'`Seltime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seltime.Tpo $(DEPDIR)/cdo-Seltime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seltime.c' object='cdo-Seltime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seltime.o `test -f 'Seltime.c' || echo '$(srcdir)/'`Seltime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seltime.o `test -f 'Seltime.c' || echo '$(srcdir)/'`Seltime.c
 
 cdo-Seltime.obj: Seltime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seltime.obj -MD -MP -MF $(DEPDIR)/cdo-Seltime.Tpo -c -o cdo-Seltime.obj `if test -f 'Seltime.c'; then $(CYGPATH_W) 'Seltime.c'; else $(CYGPATH_W) '$(srcdir)/Seltime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Seltime.Tpo $(DEPDIR)/cdo-Seltime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Seltime.c' object='cdo-Seltime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seltime.obj -MD -MP -MF $(DEPDIR)/cdo-Seltime.Tpo -c -o cdo-Seltime.obj `if test -f 'Seltime.c'; then $(CYGPATH_W) 'Seltime.c'; else $(CYGPATH_W) '$(srcdir)/Seltime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Seltime.Tpo $(DEPDIR)/cdo-Seltime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Seltime.c' object='cdo-Seltime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seltime.obj `if test -f 'Seltime.c'; then $(CYGPATH_W) 'Seltime.c'; else $(CYGPATH_W) '$(srcdir)/Seltime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Seltime.obj `if test -f 'Seltime.c'; then $(CYGPATH_W) 'Seltime.c'; else $(CYGPATH_W) '$(srcdir)/Seltime.c'; fi`
 
 cdo-Selvar.o: Selvar.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selvar.o -MD -MP -MF $(DEPDIR)/cdo-Selvar.Tpo -c -o cdo-Selvar.o `test -f 'Selvar.c' || echo '$(srcdir)/'`Selvar.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Selvar.Tpo $(DEPDIR)/cdo-Selvar.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Selvar.c' object='cdo-Selvar.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selvar.o -MD -MP -MF $(DEPDIR)/cdo-Selvar.Tpo -c -o cdo-Selvar.o `test -f 'Selvar.c' || echo '$(srcdir)/'`Selvar.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selvar.Tpo $(DEPDIR)/cdo-Selvar.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Selvar.c' object='cdo-Selvar.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selvar.o `test -f 'Selvar.c' || echo '$(srcdir)/'`Selvar.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selvar.o `test -f 'Selvar.c' || echo '$(srcdir)/'`Selvar.c
 
 cdo-Selvar.obj: Selvar.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selvar.obj -MD -MP -MF $(DEPDIR)/cdo-Selvar.Tpo -c -o cdo-Selvar.obj `if test -f 'Selvar.c'; then $(CYGPATH_W) 'Selvar.c'; else $(CYGPATH_W) '$(srcdir)/Selvar.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Selvar.Tpo $(DEPDIR)/cdo-Selvar.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Selvar.c' object='cdo-Selvar.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selvar.obj -MD -MP -MF $(DEPDIR)/cdo-Selvar.Tpo -c -o cdo-Selvar.obj `if test -f 'Selvar.c'; then $(CYGPATH_W) 'Selvar.c'; else $(CYGPATH_W) '$(srcdir)/Selvar.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selvar.Tpo $(DEPDIR)/cdo-Selvar.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Selvar.c' object='cdo-Selvar.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selvar.obj `if test -f 'Selvar.c'; then $(CYGPATH_W) 'Selvar.c'; else $(CYGPATH_W) '$(srcdir)/Selvar.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selvar.obj `if test -f 'Selvar.c'; then $(CYGPATH_W) 'Selvar.c'; else $(CYGPATH_W) '$(srcdir)/Selvar.c'; fi`
 
 cdo-Set.o: Set.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Set.o -MD -MP -MF $(DEPDIR)/cdo-Set.Tpo -c -o cdo-Set.o `test -f 'Set.c' || echo '$(srcdir)/'`Set.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Set.Tpo $(DEPDIR)/cdo-Set.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Set.c' object='cdo-Set.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Set.o -MD -MP -MF $(DEPDIR)/cdo-Set.Tpo -c -o cdo-Set.o `test -f 'Set.c' || echo '$(srcdir)/'`Set.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Set.Tpo $(DEPDIR)/cdo-Set.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Set.c' object='cdo-Set.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Set.o `test -f 'Set.c' || echo '$(srcdir)/'`Set.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Set.o `test -f 'Set.c' || echo '$(srcdir)/'`Set.c
 
 cdo-Set.obj: Set.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Set.obj -MD -MP -MF $(DEPDIR)/cdo-Set.Tpo -c -o cdo-Set.obj `if test -f 'Set.c'; then $(CYGPATH_W) 'Set.c'; else $(CYGPATH_W) '$(srcdir)/Set.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Set.Tpo $(DEPDIR)/cdo-Set.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Set.c' object='cdo-Set.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Set.obj -MD -MP -MF $(DEPDIR)/cdo-Set.Tpo -c -o cdo-Set.obj `if test -f 'Set.c'; then $(CYGPATH_W) 'Set.c'; else $(CYGPATH_W) '$(srcdir)/Set.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Set.Tpo $(DEPDIR)/cdo-Set.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Set.c' object='cdo-Set.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Set.obj `if test -f 'Set.c'; then $(CYGPATH_W) 'Set.c'; else $(CYGPATH_W) '$(srcdir)/Set.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Set.obj `if test -f 'Set.c'; then $(CYGPATH_W) 'Set.c'; else $(CYGPATH_W) '$(srcdir)/Set.c'; fi`
 
 cdo-Setbox.o: Setbox.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setbox.o -MD -MP -MF $(DEPDIR)/cdo-Setbox.Tpo -c -o cdo-Setbox.o `test -f 'Setbox.c' || echo '$(srcdir)/'`Setbox.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setbox.Tpo $(DEPDIR)/cdo-Setbox.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setbox.c' object='cdo-Setbox.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setbox.o -MD -MP -MF $(DEPDIR)/cdo-Setbox.Tpo -c -o cdo-Setbox.o `test -f 'Setbox.c' || echo '$(srcdir)/'`Setbox.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setbox.Tpo $(DEPDIR)/cdo-Setbox.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setbox.c' object='cdo-Setbox.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setbox.o `test -f 'Setbox.c' || echo '$(srcdir)/'`Setbox.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setbox.o `test -f 'Setbox.c' || echo '$(srcdir)/'`Setbox.c
 
 cdo-Setbox.obj: Setbox.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setbox.obj -MD -MP -MF $(DEPDIR)/cdo-Setbox.Tpo -c -o cdo-Setbox.obj `if test -f 'Setbox.c'; then $(CYGPATH_W) 'Setbox.c'; else $(CYGPATH_W) '$(srcdir)/Setbox.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setbox.Tpo $(DEPDIR)/cdo-Setbox.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setbox.c' object='cdo-Setbox.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setbox.obj -MD -MP -MF $(DEPDIR)/cdo-Setbox.Tpo -c -o cdo-Setbox.obj `if test -f 'Setbox.c'; then $(CYGPATH_W) 'Setbox.c'; else $(CYGPATH_W) '$(srcdir)/Setbox.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setbox.Tpo $(DEPDIR)/cdo-Setbox.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setbox.c' object='cdo-Setbox.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setbox.obj `if test -f 'Setbox.c'; then $(CYGPATH_W) 'Setbox.c'; else $(CYGPATH_W) '$(srcdir)/Setbox.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setbox.obj `if test -f 'Setbox.c'; then $(CYGPATH_W) 'Setbox.c'; else $(CYGPATH_W) '$(srcdir)/Setbox.c'; fi`
 
 cdo-Setgatt.o: Setgatt.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgatt.o -MD -MP -MF $(DEPDIR)/cdo-Setgatt.Tpo -c -o cdo-Setgatt.o `test -f 'Setgatt.c' || echo '$(srcdir)/'`Setgatt.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setgatt.Tpo $(DEPDIR)/cdo-Setgatt.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setgatt.c' object='cdo-Setgatt.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgatt.o -MD -MP -MF $(DEPDIR)/cdo-Setgatt.Tpo -c -o cdo-Setgatt.o `test -f 'Setgatt.c' || echo '$(srcdir)/'`Setgatt.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setgatt.Tpo $(DEPDIR)/cdo-Setgatt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setgatt.c' object='cdo-Setgatt.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgatt.o `test -f 'Setgatt.c' || echo '$(srcdir)/'`Setgatt.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgatt.o `test -f 'Setgatt.c' || echo '$(srcdir)/'`Setgatt.c
 
 cdo-Setgatt.obj: Setgatt.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgatt.obj -MD -MP -MF $(DEPDIR)/cdo-Setgatt.Tpo -c -o cdo-Setgatt.obj `if test -f 'Setgatt.c'; then $(CYGPATH_W) 'Setgatt.c'; else $(CYGPATH_W) '$(srcdir)/Setgatt.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setgatt.Tpo $(DEPDIR)/cdo-Setgatt.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setgatt.c' object='cdo-Setgatt.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgatt.obj -MD -MP -MF $(DEPDIR)/cdo-Setgatt.Tpo -c -o cdo-Setgatt.obj `if test -f 'Setgatt.c'; then $(CYGPATH_W) 'Setgatt.c'; else $(CYGPATH_W) '$(srcdir)/Setgatt.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setgatt.Tpo $(DEPDIR)/cdo-Setgatt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setgatt.c' object='cdo-Setgatt.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgatt.obj `if test -f 'Setgatt.c'; then $(CYGPATH_W) 'Setgatt.c'; else $(CYGPATH_W) '$(srcdir)/Setgatt.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgatt.obj `if test -f 'Setgatt.c'; then $(CYGPATH_W) 'Setgatt.c'; else $(CYGPATH_W) '$(srcdir)/Setgatt.c'; fi`
 
 cdo-Setgrid.o: Setgrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgrid.o -MD -MP -MF $(DEPDIR)/cdo-Setgrid.Tpo -c -o cdo-Setgrid.o `test -f 'Setgrid.c' || echo '$(srcdir)/'`Setgrid.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setgrid.Tpo $(DEPDIR)/cdo-Setgrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setgrid.c' object='cdo-Setgrid.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgrid.o -MD -MP -MF $(DEPDIR)/cdo-Setgrid.Tpo -c -o cdo-Setgrid.o `test -f 'Setgrid.c' || echo '$(srcdir)/'`Setgrid.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setgrid.Tpo $(DEPDIR)/cdo-Setgrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setgrid.c' object='cdo-Setgrid.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgrid.o `test -f 'Setgrid.c' || echo '$(srcdir)/'`Setgrid.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgrid.o `test -f 'Setgrid.c' || echo '$(srcdir)/'`Setgrid.c
 
 cdo-Setgrid.obj: Setgrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgrid.obj -MD -MP -MF $(DEPDIR)/cdo-Setgrid.Tpo -c -o cdo-Setgrid.obj `if test -f 'Setgrid.c'; then $(CYGPATH_W) 'Setgrid.c'; else $(CYGPATH_W) '$(srcdir)/Setgrid.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setgrid.Tpo $(DEPDIR)/cdo-Setgrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setgrid.c' object='cdo-Setgrid.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setgrid.obj -MD -MP -MF $(DEPDIR)/cdo-Setgrid.Tpo -c -o cdo-Setgrid.obj `if test -f 'Setgrid.c'; then $(CYGPATH_W) 'Setgrid.c'; else $(CYGPATH_W) '$(srcdir)/Setgrid.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setgrid.Tpo $(DEPDIR)/cdo-Setgrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setgrid.c' object='cdo-Setgrid.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgrid.obj `if test -f 'Setgrid.c'; then $(CYGPATH_W) 'Setgrid.c'; else $(CYGPATH_W) '$(srcdir)/Setgrid.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setgrid.obj `if test -f 'Setgrid.c'; then $(CYGPATH_W) 'Setgrid.c'; else $(CYGPATH_W) '$(srcdir)/Setgrid.c'; fi`
 
 cdo-Sethalo.o: Sethalo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sethalo.o -MD -MP -MF $(DEPDIR)/cdo-Sethalo.Tpo -c -o cdo-Sethalo.o `test -f 'Sethalo.c' || echo '$(srcdir)/'`Sethalo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sethalo.Tpo $(DEPDIR)/cdo-Sethalo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sethalo.c' object='cdo-Sethalo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sethalo.o -MD -MP -MF $(DEPDIR)/cdo-Sethalo.Tpo -c -o cdo-Sethalo.o `test -f 'Sethalo.c' || echo '$(srcdir)/'`Sethalo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sethalo.Tpo $(DEPDIR)/cdo-Sethalo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sethalo.c' object='cdo-Sethalo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sethalo.o `test -f 'Sethalo.c' || echo '$(srcdir)/'`Sethalo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sethalo.o `test -f 'Sethalo.c' || echo '$(srcdir)/'`Sethalo.c
 
 cdo-Sethalo.obj: Sethalo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sethalo.obj -MD -MP -MF $(DEPDIR)/cdo-Sethalo.Tpo -c -o cdo-Sethalo.obj `if test -f 'Sethalo.c'; then $(CYGPATH_W) 'Sethalo.c'; else $(CYGPATH_W) '$(srcdir)/Sethalo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sethalo.Tpo $(DEPDIR)/cdo-Sethalo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sethalo.c' object='cdo-Sethalo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sethalo.obj -MD -MP -MF $(DEPDIR)/cdo-Sethalo.Tpo -c -o cdo-Sethalo.obj `if test -f 'Sethalo.c'; then $(CYGPATH_W) 'Sethalo.c'; else $(CYGPATH_W) '$(srcdir)/Sethalo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sethalo.Tpo $(DEPDIR)/cdo-Sethalo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sethalo.c' object='cdo-Sethalo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sethalo.obj `if test -f 'Sethalo.c'; then $(CYGPATH_W) 'Sethalo.c'; else $(CYGPATH_W) '$(srcdir)/Sethalo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sethalo.obj `if test -f 'Sethalo.c'; then $(CYGPATH_W) 'Sethalo.c'; else $(CYGPATH_W) '$(srcdir)/Sethalo.c'; fi`
 
 cdo-Setmiss.o: Setmiss.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setmiss.o -MD -MP -MF $(DEPDIR)/cdo-Setmiss.Tpo -c -o cdo-Setmiss.o `test -f 'Setmiss.c' || echo '$(srcdir)/'`Setmiss.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setmiss.Tpo $(DEPDIR)/cdo-Setmiss.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setmiss.c' object='cdo-Setmiss.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setmiss.o -MD -MP -MF $(DEPDIR)/cdo-Setmiss.Tpo -c -o cdo-Setmiss.o `test -f 'Setmiss.c' || echo '$(srcdir)/'`Setmiss.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setmiss.Tpo $(DEPDIR)/cdo-Setmiss.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setmiss.c' object='cdo-Setmiss.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setmiss.o `test -f 'Setmiss.c' || echo '$(srcdir)/'`Setmiss.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setmiss.o `test -f 'Setmiss.c' || echo '$(srcdir)/'`Setmiss.c
 
 cdo-Setmiss.obj: Setmiss.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setmiss.obj -MD -MP -MF $(DEPDIR)/cdo-Setmiss.Tpo -c -o cdo-Setmiss.obj `if test -f 'Setmiss.c'; then $(CYGPATH_W) 'Setmiss.c'; else $(CYGPATH_W) '$(srcdir)/Setmiss.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setmiss.Tpo $(DEPDIR)/cdo-Setmiss.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setmiss.c' object='cdo-Setmiss.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setmiss.obj -MD -MP -MF $(DEPDIR)/cdo-Setmiss.Tpo -c -o cdo-Setmiss.obj `if test -f 'Setmiss.c'; then $(CYGPATH_W) 'Setmiss.c'; else $(CYGPATH_W) '$(srcdir)/Setmiss.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setmiss.Tpo $(DEPDIR)/cdo-Setmiss.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setmiss.c' object='cdo-Setmiss.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setmiss.obj `if test -f 'Setmiss.c'; then $(CYGPATH_W) 'Setmiss.c'; else $(CYGPATH_W) '$(srcdir)/Setmiss.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setmiss.obj `if test -f 'Setmiss.c'; then $(CYGPATH_W) 'Setmiss.c'; else $(CYGPATH_W) '$(srcdir)/Setmiss.c'; fi`
 
 cdo-Setpartab.o: Setpartab.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setpartab.o -MD -MP -MF $(DEPDIR)/cdo-Setpartab.Tpo -c -o cdo-Setpartab.o `test -f 'Setpartab.c' || echo '$(srcdir)/'`Setpartab.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setpartab.Tpo $(DEPDIR)/cdo-Setpartab.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setpartab.c' object='cdo-Setpartab.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setpartab.o -MD -MP -MF $(DEPDIR)/cdo-Setpartab.Tpo -c -o cdo-Setpartab.o `test -f 'Setpartab.c' || echo '$(srcdir)/'`Setpartab.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setpartab.Tpo $(DEPDIR)/cdo-Setpartab.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setpartab.c' object='cdo-Setpartab.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setpartab.o `test -f 'Setpartab.c' || echo '$(srcdir)/'`Setpartab.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setpartab.o `test -f 'Setpartab.c' || echo '$(srcdir)/'`Setpartab.c
 
 cdo-Setpartab.obj: Setpartab.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setpartab.obj -MD -MP -MF $(DEPDIR)/cdo-Setpartab.Tpo -c -o cdo-Setpartab.obj `if test -f 'Setpartab.c'; then $(CYGPATH_W) 'Setpartab.c'; else $(CYGPATH_W) '$(srcdir)/Setpartab.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setpartab.Tpo $(DEPDIR)/cdo-Setpartab.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setpartab.c' object='cdo-Setpartab.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setpartab.obj -MD -MP -MF $(DEPDIR)/cdo-Setpartab.Tpo -c -o cdo-Setpartab.obj `if test -f 'Setpartab.c'; then $(CYGPATH_W) 'Setpartab.c'; else $(CYGPATH_W) '$(srcdir)/Setpartab.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setpartab.Tpo $(DEPDIR)/cdo-Setpartab.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setpartab.c' object='cdo-Setpartab.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setpartab.obj `if test -f 'Setpartab.c'; then $(CYGPATH_W) 'Setpartab.c'; else $(CYGPATH_W) '$(srcdir)/Setpartab.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setpartab.obj `if test -f 'Setpartab.c'; then $(CYGPATH_W) 'Setpartab.c'; else $(CYGPATH_W) '$(srcdir)/Setpartab.c'; fi`
 
 cdo-Setrcaname.o: Setrcaname.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setrcaname.o -MD -MP -MF $(DEPDIR)/cdo-Setrcaname.Tpo -c -o cdo-Setrcaname.o `test -f 'Setrcaname.c' || echo '$(srcdir)/'`Setrcaname.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setrcaname.Tpo $(DEPDIR)/cdo-Setrcaname.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setrcaname.c' object='cdo-Setrcaname.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setrcaname.o -MD -MP -MF $(DEPDIR)/cdo-Setrcaname.Tpo -c -o cdo-Setrcaname.o `test -f 'Setrcaname.c' || echo '$(srcdir)/'`Setrcaname.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setrcaname.Tpo $(DEPDIR)/cdo-Setrcaname.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setrcaname.c' object='cdo-Setrcaname.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setrcaname.o `test -f 'Setrcaname.c' || echo '$(srcdir)/'`Setrcaname.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setrcaname.o `test -f 'Setrcaname.c' || echo '$(srcdir)/'`Setrcaname.c
 
 cdo-Setrcaname.obj: Setrcaname.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setrcaname.obj -MD -MP -MF $(DEPDIR)/cdo-Setrcaname.Tpo -c -o cdo-Setrcaname.obj `if test -f 'Setrcaname.c'; then $(CYGPATH_W) 'Setrcaname.c'; else $(CYGPATH_W) '$(srcdir)/Setrcaname.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setrcaname.Tpo $(DEPDIR)/cdo-Setrcaname.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setrcaname.c' object='cdo-Setrcaname.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setrcaname.obj -MD -MP -MF $(DEPDIR)/cdo-Setrcaname.Tpo -c -o cdo-Setrcaname.obj `if test -f 'Setrcaname.c'; then $(CYGPATH_W) 'Setrcaname.c'; else $(CYGPATH_W) '$(srcdir)/Setrcaname.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setrcaname.Tpo $(DEPDIR)/cdo-Setrcaname.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setrcaname.c' object='cdo-Setrcaname.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setrcaname.obj `if test -f 'Setrcaname.c'; then $(CYGPATH_W) 'Setrcaname.c'; else $(CYGPATH_W) '$(srcdir)/Setrcaname.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setrcaname.obj `if test -f 'Setrcaname.c'; then $(CYGPATH_W) 'Setrcaname.c'; else $(CYGPATH_W) '$(srcdir)/Setrcaname.c'; fi`
 
 cdo-Settime.o: Settime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Settime.o -MD -MP -MF $(DEPDIR)/cdo-Settime.Tpo -c -o cdo-Settime.o `test -f 'Settime.c' || echo '$(srcdir)/'`Settime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Settime.Tpo $(DEPDIR)/cdo-Settime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Settime.c' object='cdo-Settime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Settime.o -MD -MP -MF $(DEPDIR)/cdo-Settime.Tpo -c -o cdo-Settime.o `test -f 'Settime.c' || echo '$(srcdir)/'`Settime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Settime.Tpo $(DEPDIR)/cdo-Settime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Settime.c' object='cdo-Settime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Settime.o `test -f 'Settime.c' || echo '$(srcdir)/'`Settime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Settime.o `test -f 'Settime.c' || echo '$(srcdir)/'`Settime.c
 
 cdo-Settime.obj: Settime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Settime.obj -MD -MP -MF $(DEPDIR)/cdo-Settime.Tpo -c -o cdo-Settime.obj `if test -f 'Settime.c'; then $(CYGPATH_W) 'Settime.c'; else $(CYGPATH_W) '$(srcdir)/Settime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Settime.Tpo $(DEPDIR)/cdo-Settime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Settime.c' object='cdo-Settime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Settime.obj -MD -MP -MF $(DEPDIR)/cdo-Settime.Tpo -c -o cdo-Settime.obj `if test -f 'Settime.c'; then $(CYGPATH_W) 'Settime.c'; else $(CYGPATH_W) '$(srcdir)/Settime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Settime.Tpo $(DEPDIR)/cdo-Settime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Settime.c' object='cdo-Settime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Settime.obj `if test -f 'Settime.c'; then $(CYGPATH_W) 'Settime.c'; else $(CYGPATH_W) '$(srcdir)/Settime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Settime.obj `if test -f 'Settime.c'; then $(CYGPATH_W) 'Settime.c'; else $(CYGPATH_W) '$(srcdir)/Settime.c'; fi`
 
 cdo-Setzaxis.o: Setzaxis.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setzaxis.o -MD -MP -MF $(DEPDIR)/cdo-Setzaxis.Tpo -c -o cdo-Setzaxis.o `test -f 'Setzaxis.c' || echo '$(srcdir)/'`Setzaxis.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setzaxis.Tpo $(DEPDIR)/cdo-Setzaxis.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setzaxis.c' object='cdo-Setzaxis.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setzaxis.o -MD -MP -MF $(DEPDIR)/cdo-Setzaxis.Tpo -c -o cdo-Setzaxis.o `test -f 'Setzaxis.c' || echo '$(srcdir)/'`Setzaxis.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setzaxis.Tpo $(DEPDIR)/cdo-Setzaxis.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setzaxis.c' object='cdo-Setzaxis.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setzaxis.o `test -f 'Setzaxis.c' || echo '$(srcdir)/'`Setzaxis.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setzaxis.o `test -f 'Setzaxis.c' || echo '$(srcdir)/'`Setzaxis.c
 
 cdo-Setzaxis.obj: Setzaxis.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setzaxis.obj -MD -MP -MF $(DEPDIR)/cdo-Setzaxis.Tpo -c -o cdo-Setzaxis.obj `if test -f 'Setzaxis.c'; then $(CYGPATH_W) 'Setzaxis.c'; else $(CYGPATH_W) '$(srcdir)/Setzaxis.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Setzaxis.Tpo $(DEPDIR)/cdo-Setzaxis.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Setzaxis.c' object='cdo-Setzaxis.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Setzaxis.obj -MD -MP -MF $(DEPDIR)/cdo-Setzaxis.Tpo -c -o cdo-Setzaxis.obj `if test -f 'Setzaxis.c'; then $(CYGPATH_W) 'Setzaxis.c'; else $(CYGPATH_W) '$(srcdir)/Setzaxis.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Setzaxis.Tpo $(DEPDIR)/cdo-Setzaxis.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Setzaxis.c' object='cdo-Setzaxis.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setzaxis.obj `if test -f 'Setzaxis.c'; then $(CYGPATH_W) 'Setzaxis.c'; else $(CYGPATH_W) '$(srcdir)/Setzaxis.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Setzaxis.obj `if test -f 'Setzaxis.c'; then $(CYGPATH_W) 'Setzaxis.c'; else $(CYGPATH_W) '$(srcdir)/Setzaxis.c'; fi`
 
 cdo-Showinfo.o: Showinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Showinfo.o -MD -MP -MF $(DEPDIR)/cdo-Showinfo.Tpo -c -o cdo-Showinfo.o `test -f 'Showinfo.c' || echo '$(srcdir)/'`Showinfo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Showinfo.Tpo $(DEPDIR)/cdo-Showinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Showinfo.c' object='cdo-Showinfo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Showinfo.o -MD -MP -MF $(DEPDIR)/cdo-Showinfo.Tpo -c -o cdo-Showinfo.o `test -f 'Showinfo.c' || echo '$(srcdir)/'`Showinfo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Showinfo.Tpo $(DEPDIR)/cdo-Showinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Showinfo.c' object='cdo-Showinfo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Showinfo.o `test -f 'Showinfo.c' || echo '$(srcdir)/'`Showinfo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Showinfo.o `test -f 'Showinfo.c' || echo '$(srcdir)/'`Showinfo.c
 
 cdo-Showinfo.obj: Showinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Showinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Showinfo.Tpo -c -o cdo-Showinfo.obj `if test -f 'Showinfo.c'; then $(CYGPATH_W) 'Showinfo.c'; else $(CYGPATH_W) '$(srcdir)/Showinfo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Showinfo.Tpo $(DEPDIR)/cdo-Showinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Showinfo.c' object='cdo-Showinfo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Showinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Showinfo.Tpo -c -o cdo-Showinfo.obj `if test -f 'Showinfo.c'; then $(CYGPATH_W) 'Showinfo.c'; else $(CYGPATH_W) '$(srcdir)/Showinfo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Showinfo.Tpo $(DEPDIR)/cdo-Showinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Showinfo.c' object='cdo-Showinfo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Showinfo.obj `if test -f 'Showinfo.c'; then $(CYGPATH_W) 'Showinfo.c'; else $(CYGPATH_W) '$(srcdir)/Showinfo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Showinfo.obj `if test -f 'Showinfo.c'; then $(CYGPATH_W) 'Showinfo.c'; else $(CYGPATH_W) '$(srcdir)/Showinfo.c'; fi`
 
 cdo-Sinfo.o: Sinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sinfo.o -MD -MP -MF $(DEPDIR)/cdo-Sinfo.Tpo -c -o cdo-Sinfo.o `test -f 'Sinfo.c' || echo '$(srcdir)/'`Sinfo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sinfo.Tpo $(DEPDIR)/cdo-Sinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sinfo.c' object='cdo-Sinfo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sinfo.o -MD -MP -MF $(DEPDIR)/cdo-Sinfo.Tpo -c -o cdo-Sinfo.o `test -f 'Sinfo.c' || echo '$(srcdir)/'`Sinfo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sinfo.Tpo $(DEPDIR)/cdo-Sinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sinfo.c' object='cdo-Sinfo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sinfo.o `test -f 'Sinfo.c' || echo '$(srcdir)/'`Sinfo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sinfo.o `test -f 'Sinfo.c' || echo '$(srcdir)/'`Sinfo.c
 
 cdo-Sinfo.obj: Sinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Sinfo.Tpo -c -o cdo-Sinfo.obj `if test -f 'Sinfo.c'; then $(CYGPATH_W) 'Sinfo.c'; else $(CYGPATH_W) '$(srcdir)/Sinfo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sinfo.Tpo $(DEPDIR)/cdo-Sinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sinfo.c' object='cdo-Sinfo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Sinfo.Tpo -c -o cdo-Sinfo.obj `if test -f 'Sinfo.c'; then $(CYGPATH_W) 'Sinfo.c'; else $(CYGPATH_W) '$(srcdir)/Sinfo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sinfo.Tpo $(DEPDIR)/cdo-Sinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sinfo.c' object='cdo-Sinfo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sinfo.obj `if test -f 'Sinfo.c'; then $(CYGPATH_W) 'Sinfo.c'; else $(CYGPATH_W) '$(srcdir)/Sinfo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sinfo.obj `if test -f 'Sinfo.c'; then $(CYGPATH_W) 'Sinfo.c'; else $(CYGPATH_W) '$(srcdir)/Sinfo.c'; fi`
 
 cdo-Smooth9.o: Smooth9.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Smooth9.o -MD -MP -MF $(DEPDIR)/cdo-Smooth9.Tpo -c -o cdo-Smooth9.o `test -f 'Smooth9.c' || echo '$(srcdir)/'`Smooth9.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Smooth9.Tpo $(DEPDIR)/cdo-Smooth9.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Smooth9.c' object='cdo-Smooth9.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Smooth9.o -MD -MP -MF $(DEPDIR)/cdo-Smooth9.Tpo -c -o cdo-Smooth9.o `test -f 'Smooth9.c' || echo '$(srcdir)/'`Smooth9.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Smooth9.Tpo $(DEPDIR)/cdo-Smooth9.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Smooth9.c' object='cdo-Smooth9.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Smooth9.o `test -f 'Smooth9.c' || echo '$(srcdir)/'`Smooth9.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Smooth9.o `test -f 'Smooth9.c' || echo '$(srcdir)/'`Smooth9.c
 
 cdo-Smooth9.obj: Smooth9.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Smooth9.obj -MD -MP -MF $(DEPDIR)/cdo-Smooth9.Tpo -c -o cdo-Smooth9.obj `if test -f 'Smooth9.c'; then $(CYGPATH_W) 'Smooth9.c'; else $(CYGPATH_W) '$(srcdir)/Smooth9.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Smooth9.Tpo $(DEPDIR)/cdo-Smooth9.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Smooth9.c' object='cdo-Smooth9.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Smooth9.obj -MD -MP -MF $(DEPDIR)/cdo-Smooth9.Tpo -c -o cdo-Smooth9.obj `if test -f 'Smooth9.c'; then $(CYGPATH_W) 'Smooth9.c'; else $(CYGPATH_W) '$(srcdir)/Smooth9.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Smooth9.Tpo $(DEPDIR)/cdo-Smooth9.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Smooth9.c' object='cdo-Smooth9.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Smooth9.obj `if test -f 'Smooth9.c'; then $(CYGPATH_W) 'Smooth9.c'; else $(CYGPATH_W) '$(srcdir)/Smooth9.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Smooth9.obj `if test -f 'Smooth9.c'; then $(CYGPATH_W) 'Smooth9.c'; else $(CYGPATH_W) '$(srcdir)/Smooth9.c'; fi`
 
 cdo-Sort.o: Sort.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sort.o -MD -MP -MF $(DEPDIR)/cdo-Sort.Tpo -c -o cdo-Sort.o `test -f 'Sort.c' || echo '$(srcdir)/'`Sort.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sort.Tpo $(DEPDIR)/cdo-Sort.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sort.c' object='cdo-Sort.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sort.o -MD -MP -MF $(DEPDIR)/cdo-Sort.Tpo -c -o cdo-Sort.o `test -f 'Sort.c' || echo '$(srcdir)/'`Sort.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sort.Tpo $(DEPDIR)/cdo-Sort.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sort.c' object='cdo-Sort.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sort.o `test -f 'Sort.c' || echo '$(srcdir)/'`Sort.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sort.o `test -f 'Sort.c' || echo '$(srcdir)/'`Sort.c
 
 cdo-Sort.obj: Sort.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sort.obj -MD -MP -MF $(DEPDIR)/cdo-Sort.Tpo -c -o cdo-Sort.obj `if test -f 'Sort.c'; then $(CYGPATH_W) 'Sort.c'; else $(CYGPATH_W) '$(srcdir)/Sort.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sort.Tpo $(DEPDIR)/cdo-Sort.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sort.c' object='cdo-Sort.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sort.obj -MD -MP -MF $(DEPDIR)/cdo-Sort.Tpo -c -o cdo-Sort.obj `if test -f 'Sort.c'; then $(CYGPATH_W) 'Sort.c'; else $(CYGPATH_W) '$(srcdir)/Sort.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sort.Tpo $(DEPDIR)/cdo-Sort.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sort.c' object='cdo-Sort.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sort.obj `if test -f 'Sort.c'; then $(CYGPATH_W) 'Sort.c'; else $(CYGPATH_W) '$(srcdir)/Sort.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sort.obj `if test -f 'Sort.c'; then $(CYGPATH_W) 'Sort.c'; else $(CYGPATH_W) '$(srcdir)/Sort.c'; fi`
 
 cdo-Sorttimestamp.o: Sorttimestamp.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sorttimestamp.o -MD -MP -MF $(DEPDIR)/cdo-Sorttimestamp.Tpo -c -o cdo-Sorttimestamp.o `test -f 'Sorttimestamp.c' || echo '$(srcdir)/'`Sorttimestamp.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sorttimestamp.Tpo $(DEPDIR)/cdo-Sorttimestamp.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sorttimestamp.c' object='cdo-Sorttimestamp.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sorttimestamp.o -MD -MP -MF $(DEPDIR)/cdo-Sorttimestamp.Tpo -c -o cdo-Sorttimestamp.o `test -f 'Sorttimestamp.c' || echo '$(srcdir)/'`Sorttimestamp.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sorttimestamp.Tpo $(DEPDIR)/cdo-Sorttimestamp.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sorttimestamp.c' object='cdo-Sorttimestamp.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sorttimestamp.o `test -f 'Sorttimestamp.c' || echo '$(srcdir)/'`Sorttimestamp.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sorttimestamp.o `test -f 'Sorttimestamp.c' || echo '$(srcdir)/'`Sorttimestamp.c
 
 cdo-Sorttimestamp.obj: Sorttimestamp.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sorttimestamp.obj -MD -MP -MF $(DEPDIR)/cdo-Sorttimestamp.Tpo -c -o cdo-Sorttimestamp.obj `if test -f 'Sorttimestamp.c'; then $(CYGPATH_W) 'Sorttimestamp.c'; else $(CYGPATH_W) '$(srcdir)/Sorttimestamp.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Sorttimestamp.Tpo $(DEPDIR)/cdo-Sorttimestamp.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Sorttimestamp.c' object='cdo-Sorttimestamp.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sorttimestamp.obj -MD -MP -MF $(DEPDIR)/cdo-Sorttimestamp.Tpo -c -o cdo-Sorttimestamp.obj `if test -f 'Sorttimestamp.c'; then $(CYGPATH_W) 'Sorttimestamp.c'; else $(CYGPATH_W) '$(srcdir)/Sorttimestamp.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sorttimestamp.Tpo $(DEPDIR)/cdo-Sorttimestamp.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Sorttimestamp.c' object='cdo-Sorttimestamp.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sorttimestamp.obj `if test -f 'Sorttimestamp.c'; then $(CYGPATH_W) 'Sorttimestamp.c'; else $(CYGPATH_W) '$(srcdir)/Sorttimestamp.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sorttimestamp.obj `if test -f 'Sorttimestamp.c'; then $(CYGPATH_W) 'Sorttimestamp.c'; else $(CYGPATH_W) '$(srcdir)/Sorttimestamp.c'; fi`
 
 cdo-Specinfo.o: Specinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Specinfo.o -MD -MP -MF $(DEPDIR)/cdo-Specinfo.Tpo -c -o cdo-Specinfo.o `test -f 'Specinfo.c' || echo '$(srcdir)/'`Specinfo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Specinfo.Tpo $(DEPDIR)/cdo-Specinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Specinfo.c' object='cdo-Specinfo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Specinfo.o -MD -MP -MF $(DEPDIR)/cdo-Specinfo.Tpo -c -o cdo-Specinfo.o `test -f 'Specinfo.c' || echo '$(srcdir)/'`Specinfo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Specinfo.Tpo $(DEPDIR)/cdo-Specinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Specinfo.c' object='cdo-Specinfo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Specinfo.o `test -f 'Specinfo.c' || echo '$(srcdir)/'`Specinfo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Specinfo.o `test -f 'Specinfo.c' || echo '$(srcdir)/'`Specinfo.c
 
 cdo-Specinfo.obj: Specinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Specinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Specinfo.Tpo -c -o cdo-Specinfo.obj `if test -f 'Specinfo.c'; then $(CYGPATH_W) 'Specinfo.c'; else $(CYGPATH_W) '$(srcdir)/Specinfo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Specinfo.Tpo $(DEPDIR)/cdo-Specinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Specinfo.c' object='cdo-Specinfo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Specinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Specinfo.Tpo -c -o cdo-Specinfo.obj `if test -f 'Specinfo.c'; then $(CYGPATH_W) 'Specinfo.c'; else $(CYGPATH_W) '$(srcdir)/Specinfo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Specinfo.Tpo $(DEPDIR)/cdo-Specinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Specinfo.c' object='cdo-Specinfo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Specinfo.obj `if test -f 'Specinfo.c'; then $(CYGPATH_W) 'Specinfo.c'; else $(CYGPATH_W) '$(srcdir)/Specinfo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Specinfo.obj `if test -f 'Specinfo.c'; then $(CYGPATH_W) 'Specinfo.c'; else $(CYGPATH_W) '$(srcdir)/Specinfo.c'; fi`
 
 cdo-Spectral.o: Spectral.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectral.o -MD -MP -MF $(DEPDIR)/cdo-Spectral.Tpo -c -o cdo-Spectral.o `test -f 'Spectral.c' || echo '$(srcdir)/'`Spectral.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Spectral.Tpo $(DEPDIR)/cdo-Spectral.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Spectral.c' object='cdo-Spectral.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectral.o -MD -MP -MF $(DEPDIR)/cdo-Spectral.Tpo -c -o cdo-Spectral.o `test -f 'Spectral.c' || echo '$(srcdir)/'`Spectral.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Spectral.Tpo $(DEPDIR)/cdo-Spectral.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Spectral.c' object='cdo-Spectral.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectral.o `test -f 'Spectral.c' || echo '$(srcdir)/'`Spectral.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectral.o `test -f 'Spectral.c' || echo '$(srcdir)/'`Spectral.c
 
 cdo-Spectral.obj: Spectral.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectral.obj -MD -MP -MF $(DEPDIR)/cdo-Spectral.Tpo -c -o cdo-Spectral.obj `if test -f 'Spectral.c'; then $(CYGPATH_W) 'Spectral.c'; else $(CYGPATH_W) '$(srcdir)/Spectral.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Spectral.Tpo $(DEPDIR)/cdo-Spectral.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Spectral.c' object='cdo-Spectral.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectral.obj -MD -MP -MF $(DEPDIR)/cdo-Spectral.Tpo -c -o cdo-Spectral.obj `if test -f 'Spectral.c'; then $(CYGPATH_W) 'Spectral.c'; else $(CYGPATH_W) '$(srcdir)/Spectral.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Spectral.Tpo $(DEPDIR)/cdo-Spectral.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Spectral.c' object='cdo-Spectral.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectral.obj `if test -f 'Spectral.c'; then $(CYGPATH_W) 'Spectral.c'; else $(CYGPATH_W) '$(srcdir)/Spectral.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectral.obj `if test -f 'Spectral.c'; then $(CYGPATH_W) 'Spectral.c'; else $(CYGPATH_W) '$(srcdir)/Spectral.c'; fi`
 
 cdo-Spectrum.o: Spectrum.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectrum.o -MD -MP -MF $(DEPDIR)/cdo-Spectrum.Tpo -c -o cdo-Spectrum.o `test -f 'Spectrum.c' || echo '$(srcdir)/'`Spectrum.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Spectrum.Tpo $(DEPDIR)/cdo-Spectrum.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Spectrum.c' object='cdo-Spectrum.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectrum.o -MD -MP -MF $(DEPDIR)/cdo-Spectrum.Tpo -c -o cdo-Spectrum.o `test -f 'Spectrum.c' || echo '$(srcdir)/'`Spectrum.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Spectrum.Tpo $(DEPDIR)/cdo-Spectrum.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Spectrum.c' object='cdo-Spectrum.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectrum.o `test -f 'Spectrum.c' || echo '$(srcdir)/'`Spectrum.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectrum.o `test -f 'Spectrum.c' || echo '$(srcdir)/'`Spectrum.c
 
 cdo-Spectrum.obj: Spectrum.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectrum.obj -MD -MP -MF $(DEPDIR)/cdo-Spectrum.Tpo -c -o cdo-Spectrum.obj `if test -f 'Spectrum.c'; then $(CYGPATH_W) 'Spectrum.c'; else $(CYGPATH_W) '$(srcdir)/Spectrum.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Spectrum.Tpo $(DEPDIR)/cdo-Spectrum.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Spectrum.c' object='cdo-Spectrum.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Spectrum.obj -MD -MP -MF $(DEPDIR)/cdo-Spectrum.Tpo -c -o cdo-Spectrum.obj `if test -f 'Spectrum.c'; then $(CYGPATH_W) 'Spectrum.c'; else $(CYGPATH_W) '$(srcdir)/Spectrum.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Spectrum.Tpo $(DEPDIR)/cdo-Spectrum.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Spectrum.c' object='cdo-Spectrum.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectrum.obj `if test -f 'Spectrum.c'; then $(CYGPATH_W) 'Spectrum.c'; else $(CYGPATH_W) '$(srcdir)/Spectrum.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Spectrum.obj `if test -f 'Spectrum.c'; then $(CYGPATH_W) 'Spectrum.c'; else $(CYGPATH_W) '$(srcdir)/Spectrum.c'; fi`
 
 cdo-Split.o: Split.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Split.o -MD -MP -MF $(DEPDIR)/cdo-Split.Tpo -c -o cdo-Split.o `test -f 'Split.c' || echo '$(srcdir)/'`Split.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Split.Tpo $(DEPDIR)/cdo-Split.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Split.c' object='cdo-Split.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Split.o -MD -MP -MF $(DEPDIR)/cdo-Split.Tpo -c -o cdo-Split.o `test -f 'Split.c' || echo '$(srcdir)/'`Split.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Split.Tpo $(DEPDIR)/cdo-Split.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Split.c' object='cdo-Split.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Split.o `test -f 'Split.c' || echo '$(srcdir)/'`Split.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Split.o `test -f 'Split.c' || echo '$(srcdir)/'`Split.c
 
 cdo-Split.obj: Split.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Split.obj -MD -MP -MF $(DEPDIR)/cdo-Split.Tpo -c -o cdo-Split.obj `if test -f 'Split.c'; then $(CYGPATH_W) 'Split.c'; else $(CYGPATH_W) '$(srcdir)/Split.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Split.Tpo $(DEPDIR)/cdo-Split.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Split.c' object='cdo-Split.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Split.obj -MD -MP -MF $(DEPDIR)/cdo-Split.Tpo -c -o cdo-Split.obj `if test -f 'Split.c'; then $(CYGPATH_W) 'Split.c'; else $(CYGPATH_W) '$(srcdir)/Split.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Split.Tpo $(DEPDIR)/cdo-Split.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Split.c' object='cdo-Split.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Split.obj `if test -f 'Split.c'; then $(CYGPATH_W) 'Split.c'; else $(CYGPATH_W) '$(srcdir)/Split.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Split.obj `if test -f 'Split.c'; then $(CYGPATH_W) 'Split.c'; else $(CYGPATH_W) '$(srcdir)/Split.c'; fi`
 
 cdo-Splitrec.o: Splitrec.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitrec.o -MD -MP -MF $(DEPDIR)/cdo-Splitrec.Tpo -c -o cdo-Splitrec.o `test -f 'Splitrec.c' || echo '$(srcdir)/'`Splitrec.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splitrec.Tpo $(DEPDIR)/cdo-Splitrec.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splitrec.c' object='cdo-Splitrec.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitrec.o -MD -MP -MF $(DEPDIR)/cdo-Splitrec.Tpo -c -o cdo-Splitrec.o `test -f 'Splitrec.c' || echo '$(srcdir)/'`Splitrec.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splitrec.Tpo $(DEPDIR)/cdo-Splitrec.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splitrec.c' object='cdo-Splitrec.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitrec.o `test -f 'Splitrec.c' || echo '$(srcdir)/'`Splitrec.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitrec.o `test -f 'Splitrec.c' || echo '$(srcdir)/'`Splitrec.c
 
 cdo-Splitrec.obj: Splitrec.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitrec.obj -MD -MP -MF $(DEPDIR)/cdo-Splitrec.Tpo -c -o cdo-Splitrec.obj `if test -f 'Splitrec.c'; then $(CYGPATH_W) 'Splitrec.c'; else $(CYGPATH_W) '$(srcdir)/Splitrec.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splitrec.Tpo $(DEPDIR)/cdo-Splitrec.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splitrec.c' object='cdo-Splitrec.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitrec.obj -MD -MP -MF $(DEPDIR)/cdo-Splitrec.Tpo -c -o cdo-Splitrec.obj `if test -f 'Splitrec.c'; then $(CYGPATH_W) 'Splitrec.c'; else $(CYGPATH_W) '$(srcdir)/Splitrec.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splitrec.Tpo $(DEPDIR)/cdo-Splitrec.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splitrec.c' object='cdo-Splitrec.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitrec.obj `if test -f 'Splitrec.c'; then $(CYGPATH_W) 'Splitrec.c'; else $(CYGPATH_W) '$(srcdir)/Splitrec.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitrec.obj `if test -f 'Splitrec.c'; then $(CYGPATH_W) 'Splitrec.c'; else $(CYGPATH_W) '$(srcdir)/Splitrec.c'; fi`
 
 cdo-Splitsel.o: Splitsel.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitsel.o -MD -MP -MF $(DEPDIR)/cdo-Splitsel.Tpo -c -o cdo-Splitsel.o `test -f 'Splitsel.c' || echo '$(srcdir)/'`Splitsel.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splitsel.Tpo $(DEPDIR)/cdo-Splitsel.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splitsel.c' object='cdo-Splitsel.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitsel.o -MD -MP -MF $(DEPDIR)/cdo-Splitsel.Tpo -c -o cdo-Splitsel.o `test -f 'Splitsel.c' || echo '$(srcdir)/'`Splitsel.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splitsel.Tpo $(DEPDIR)/cdo-Splitsel.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splitsel.c' object='cdo-Splitsel.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitsel.o `test -f 'Splitsel.c' || echo '$(srcdir)/'`Splitsel.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitsel.o `test -f 'Splitsel.c' || echo '$(srcdir)/'`Splitsel.c
 
 cdo-Splitsel.obj: Splitsel.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitsel.obj -MD -MP -MF $(DEPDIR)/cdo-Splitsel.Tpo -c -o cdo-Splitsel.obj `if test -f 'Splitsel.c'; then $(CYGPATH_W) 'Splitsel.c'; else $(CYGPATH_W) '$(srcdir)/Splitsel.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splitsel.Tpo $(DEPDIR)/cdo-Splitsel.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splitsel.c' object='cdo-Splitsel.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splitsel.obj -MD -MP -MF $(DEPDIR)/cdo-Splitsel.Tpo -c -o cdo-Splitsel.obj `if test -f 'Splitsel.c'; then $(CYGPATH_W) 'Splitsel.c'; else $(CYGPATH_W) '$(srcdir)/Splitsel.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splitsel.Tpo $(DEPDIR)/cdo-Splitsel.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splitsel.c' object='cdo-Splitsel.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitsel.obj `if test -f 'Splitsel.c'; then $(CYGPATH_W) 'Splitsel.c'; else $(CYGPATH_W) '$(srcdir)/Splitsel.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splitsel.obj `if test -f 'Splitsel.c'; then $(CYGPATH_W) 'Splitsel.c'; else $(CYGPATH_W) '$(srcdir)/Splitsel.c'; fi`
 
 cdo-Splittime.o: Splittime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splittime.o -MD -MP -MF $(DEPDIR)/cdo-Splittime.Tpo -c -o cdo-Splittime.o `test -f 'Splittime.c' || echo '$(srcdir)/'`Splittime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splittime.Tpo $(DEPDIR)/cdo-Splittime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splittime.c' object='cdo-Splittime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splittime.o -MD -MP -MF $(DEPDIR)/cdo-Splittime.Tpo -c -o cdo-Splittime.o `test -f 'Splittime.c' || echo '$(srcdir)/'`Splittime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splittime.Tpo $(DEPDIR)/cdo-Splittime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splittime.c' object='cdo-Splittime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splittime.o `test -f 'Splittime.c' || echo '$(srcdir)/'`Splittime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splittime.o `test -f 'Splittime.c' || echo '$(srcdir)/'`Splittime.c
 
 cdo-Splittime.obj: Splittime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splittime.obj -MD -MP -MF $(DEPDIR)/cdo-Splittime.Tpo -c -o cdo-Splittime.obj `if test -f 'Splittime.c'; then $(CYGPATH_W) 'Splittime.c'; else $(CYGPATH_W) '$(srcdir)/Splittime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splittime.Tpo $(DEPDIR)/cdo-Splittime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splittime.c' object='cdo-Splittime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splittime.obj -MD -MP -MF $(DEPDIR)/cdo-Splittime.Tpo -c -o cdo-Splittime.obj `if test -f 'Splittime.c'; then $(CYGPATH_W) 'Splittime.c'; else $(CYGPATH_W) '$(srcdir)/Splittime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splittime.Tpo $(DEPDIR)/cdo-Splittime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splittime.c' object='cdo-Splittime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splittime.obj `if test -f 'Splittime.c'; then $(CYGPATH_W) 'Splittime.c'; else $(CYGPATH_W) '$(srcdir)/Splittime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splittime.obj `if test -f 'Splittime.c'; then $(CYGPATH_W) 'Splittime.c'; else $(CYGPATH_W) '$(srcdir)/Splittime.c'; fi`
 
 cdo-Splityear.o: Splityear.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splityear.o -MD -MP -MF $(DEPDIR)/cdo-Splityear.Tpo -c -o cdo-Splityear.o `test -f 'Splityear.c' || echo '$(srcdir)/'`Splityear.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splityear.Tpo $(DEPDIR)/cdo-Splityear.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splityear.c' object='cdo-Splityear.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splityear.o -MD -MP -MF $(DEPDIR)/cdo-Splityear.Tpo -c -o cdo-Splityear.o `test -f 'Splityear.c' || echo '$(srcdir)/'`Splityear.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splityear.Tpo $(DEPDIR)/cdo-Splityear.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splityear.c' object='cdo-Splityear.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splityear.o `test -f 'Splityear.c' || echo '$(srcdir)/'`Splityear.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splityear.o `test -f 'Splityear.c' || echo '$(srcdir)/'`Splityear.c
 
 cdo-Splityear.obj: Splityear.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splityear.obj -MD -MP -MF $(DEPDIR)/cdo-Splityear.Tpo -c -o cdo-Splityear.obj `if test -f 'Splityear.c'; then $(CYGPATH_W) 'Splityear.c'; else $(CYGPATH_W) '$(srcdir)/Splityear.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Splityear.Tpo $(DEPDIR)/cdo-Splityear.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Splityear.c' object='cdo-Splityear.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Splityear.obj -MD -MP -MF $(DEPDIR)/cdo-Splityear.Tpo -c -o cdo-Splityear.obj `if test -f 'Splityear.c'; then $(CYGPATH_W) 'Splityear.c'; else $(CYGPATH_W) '$(srcdir)/Splityear.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Splityear.Tpo $(DEPDIR)/cdo-Splityear.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Splityear.c' object='cdo-Splityear.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splityear.obj `if test -f 'Splityear.c'; then $(CYGPATH_W) 'Splityear.c'; else $(CYGPATH_W) '$(srcdir)/Splityear.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Splityear.obj `if test -f 'Splityear.c'; then $(CYGPATH_W) 'Splityear.c'; else $(CYGPATH_W) '$(srcdir)/Splityear.c'; fi`
 
 cdo-SSOpar.o: SSOpar.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-SSOpar.o -MD -MP -MF $(DEPDIR)/cdo-SSOpar.Tpo -c -o cdo-SSOpar.o `test -f 'SSOpar.c' || echo '$(srcdir)/'`SSOpar.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-SSOpar.Tpo $(DEPDIR)/cdo-SSOpar.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='SSOpar.c' object='cdo-SSOpar.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-SSOpar.o -MD -MP -MF $(DEPDIR)/cdo-SSOpar.Tpo -c -o cdo-SSOpar.o `test -f 'SSOpar.c' || echo '$(srcdir)/'`SSOpar.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-SSOpar.Tpo $(DEPDIR)/cdo-SSOpar.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='SSOpar.c' object='cdo-SSOpar.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-SSOpar.o `test -f 'SSOpar.c' || echo '$(srcdir)/'`SSOpar.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-SSOpar.o `test -f 'SSOpar.c' || echo '$(srcdir)/'`SSOpar.c
 
 cdo-SSOpar.obj: SSOpar.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-SSOpar.obj -MD -MP -MF $(DEPDIR)/cdo-SSOpar.Tpo -c -o cdo-SSOpar.obj `if test -f 'SSOpar.c'; then $(CYGPATH_W) 'SSOpar.c'; else $(CYGPATH_W) '$(srcdir)/SSOpar.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-SSOpar.Tpo $(DEPDIR)/cdo-SSOpar.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='SSOpar.c' object='cdo-SSOpar.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-SSOpar.obj -MD -MP -MF $(DEPDIR)/cdo-SSOpar.Tpo -c -o cdo-SSOpar.obj `if test -f 'SSOpar.c'; then $(CYGPATH_W) 'SSOpar.c'; else $(CYGPATH_W) '$(srcdir)/SSOpar.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-SSOpar.Tpo $(DEPDIR)/cdo-SSOpar.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='SSOpar.c' object='cdo-SSOpar.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-SSOpar.obj `if test -f 'SSOpar.c'; then $(CYGPATH_W) 'SSOpar.c'; else $(CYGPATH_W) '$(srcdir)/SSOpar.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-SSOpar.obj `if test -f 'SSOpar.c'; then $(CYGPATH_W) 'SSOpar.c'; else $(CYGPATH_W) '$(srcdir)/SSOpar.c'; fi`
 
 cdo-Subtrend.o: Subtrend.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Subtrend.o -MD -MP -MF $(DEPDIR)/cdo-Subtrend.Tpo -c -o cdo-Subtrend.o `test -f 'Subtrend.c' || echo '$(srcdir)/'`Subtrend.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Subtrend.Tpo $(DEPDIR)/cdo-Subtrend.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Subtrend.c' object='cdo-Subtrend.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Subtrend.o -MD -MP -MF $(DEPDIR)/cdo-Subtrend.Tpo -c -o cdo-Subtrend.o `test -f 'Subtrend.c' || echo '$(srcdir)/'`Subtrend.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Subtrend.Tpo $(DEPDIR)/cdo-Subtrend.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Subtrend.c' object='cdo-Subtrend.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Subtrend.o `test -f 'Subtrend.c' || echo '$(srcdir)/'`Subtrend.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Subtrend.o `test -f 'Subtrend.c' || echo '$(srcdir)/'`Subtrend.c
 
 cdo-Subtrend.obj: Subtrend.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Subtrend.obj -MD -MP -MF $(DEPDIR)/cdo-Subtrend.Tpo -c -o cdo-Subtrend.obj `if test -f 'Subtrend.c'; then $(CYGPATH_W) 'Subtrend.c'; else $(CYGPATH_W) '$(srcdir)/Subtrend.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Subtrend.Tpo $(DEPDIR)/cdo-Subtrend.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Subtrend.c' object='cdo-Subtrend.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Subtrend.obj -MD -MP -MF $(DEPDIR)/cdo-Subtrend.Tpo -c -o cdo-Subtrend.obj `if test -f 'Subtrend.c'; then $(CYGPATH_W) 'Subtrend.c'; else $(CYGPATH_W) '$(srcdir)/Subtrend.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Subtrend.Tpo $(DEPDIR)/cdo-Subtrend.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Subtrend.c' object='cdo-Subtrend.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Subtrend.obj `if test -f 'Subtrend.c'; then $(CYGPATH_W) 'Subtrend.c'; else $(CYGPATH_W) '$(srcdir)/Subtrend.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Subtrend.obj `if test -f 'Subtrend.c'; then $(CYGPATH_W) 'Subtrend.c'; else $(CYGPATH_W) '$(srcdir)/Subtrend.c'; fi`
 
 cdo-Tee.o: Tee.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tee.o -MD -MP -MF $(DEPDIR)/cdo-Tee.Tpo -c -o cdo-Tee.o `test -f 'Tee.c' || echo '$(srcdir)/'`Tee.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tee.Tpo $(DEPDIR)/cdo-Tee.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tee.c' object='cdo-Tee.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tee.o -MD -MP -MF $(DEPDIR)/cdo-Tee.Tpo -c -o cdo-Tee.o `test -f 'Tee.c' || echo '$(srcdir)/'`Tee.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tee.Tpo $(DEPDIR)/cdo-Tee.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tee.c' object='cdo-Tee.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tee.o `test -f 'Tee.c' || echo '$(srcdir)/'`Tee.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tee.o `test -f 'Tee.c' || echo '$(srcdir)/'`Tee.c
 
 cdo-Tee.obj: Tee.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tee.obj -MD -MP -MF $(DEPDIR)/cdo-Tee.Tpo -c -o cdo-Tee.obj `if test -f 'Tee.c'; then $(CYGPATH_W) 'Tee.c'; else $(CYGPATH_W) '$(srcdir)/Tee.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tee.Tpo $(DEPDIR)/cdo-Tee.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tee.c' object='cdo-Tee.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tee.obj -MD -MP -MF $(DEPDIR)/cdo-Tee.Tpo -c -o cdo-Tee.obj `if test -f 'Tee.c'; then $(CYGPATH_W) 'Tee.c'; else $(CYGPATH_W) '$(srcdir)/Tee.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tee.Tpo $(DEPDIR)/cdo-Tee.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tee.c' object='cdo-Tee.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tee.obj `if test -f 'Tee.c'; then $(CYGPATH_W) 'Tee.c'; else $(CYGPATH_W) '$(srcdir)/Tee.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tee.obj `if test -f 'Tee.c'; then $(CYGPATH_W) 'Tee.c'; else $(CYGPATH_W) '$(srcdir)/Tee.c'; fi`
 
 cdo-Templates.o: Templates.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Templates.o -MD -MP -MF $(DEPDIR)/cdo-Templates.Tpo -c -o cdo-Templates.o `test -f 'Templates.c' || echo '$(srcdir)/'`Templates.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Templates.Tpo $(DEPDIR)/cdo-Templates.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Templates.c' object='cdo-Templates.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Templates.o -MD -MP -MF $(DEPDIR)/cdo-Templates.Tpo -c -o cdo-Templates.o `test -f 'Templates.c' || echo '$(srcdir)/'`Templates.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Templates.Tpo $(DEPDIR)/cdo-Templates.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Templates.c' object='cdo-Templates.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Templates.o `test -f 'Templates.c' || echo '$(srcdir)/'`Templates.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Templates.o `test -f 'Templates.c' || echo '$(srcdir)/'`Templates.c
 
 cdo-Templates.obj: Templates.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Templates.obj -MD -MP -MF $(DEPDIR)/cdo-Templates.Tpo -c -o cdo-Templates.obj `if test -f 'Templates.c'; then $(CYGPATH_W) 'Templates.c'; else $(CYGPATH_W) '$(srcdir)/Templates.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Templates.Tpo $(DEPDIR)/cdo-Templates.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Templates.c' object='cdo-Templates.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Templates.obj -MD -MP -MF $(DEPDIR)/cdo-Templates.Tpo -c -o cdo-Templates.obj `if test -f 'Templates.c'; then $(CYGPATH_W) 'Templates.c'; else $(CYGPATH_W) '$(srcdir)/Templates.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Templates.Tpo $(DEPDIR)/cdo-Templates.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Templates.c' object='cdo-Templates.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Templates.obj `if test -f 'Templates.c'; then $(CYGPATH_W) 'Templates.c'; else $(CYGPATH_W) '$(srcdir)/Templates.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Templates.obj `if test -f 'Templates.c'; then $(CYGPATH_W) 'Templates.c'; else $(CYGPATH_W) '$(srcdir)/Templates.c'; fi`
 
 cdo-Test.o: Test.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Test.o -MD -MP -MF $(DEPDIR)/cdo-Test.Tpo -c -o cdo-Test.o `test -f 'Test.c' || echo '$(srcdir)/'`Test.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Test.Tpo $(DEPDIR)/cdo-Test.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Test.c' object='cdo-Test.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Test.o -MD -MP -MF $(DEPDIR)/cdo-Test.Tpo -c -o cdo-Test.o `test -f 'Test.c' || echo '$(srcdir)/'`Test.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Test.Tpo $(DEPDIR)/cdo-Test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Test.c' object='cdo-Test.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Test.o `test -f 'Test.c' || echo '$(srcdir)/'`Test.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Test.o `test -f 'Test.c' || echo '$(srcdir)/'`Test.c
 
 cdo-Test.obj: Test.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Test.obj -MD -MP -MF $(DEPDIR)/cdo-Test.Tpo -c -o cdo-Test.obj `if test -f 'Test.c'; then $(CYGPATH_W) 'Test.c'; else $(CYGPATH_W) '$(srcdir)/Test.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Test.Tpo $(DEPDIR)/cdo-Test.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Test.c' object='cdo-Test.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Test.obj -MD -MP -MF $(DEPDIR)/cdo-Test.Tpo -c -o cdo-Test.obj `if test -f 'Test.c'; then $(CYGPATH_W) 'Test.c'; else $(CYGPATH_W) '$(srcdir)/Test.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Test.Tpo $(DEPDIR)/cdo-Test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Test.c' object='cdo-Test.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Test.obj `if test -f 'Test.c'; then $(CYGPATH_W) 'Test.c'; else $(CYGPATH_W) '$(srcdir)/Test.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Test.obj `if test -f 'Test.c'; then $(CYGPATH_W) 'Test.c'; else $(CYGPATH_W) '$(srcdir)/Test.c'; fi`
 
 cdo-Tests.o: Tests.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tests.o -MD -MP -MF $(DEPDIR)/cdo-Tests.Tpo -c -o cdo-Tests.o `test -f 'Tests.c' || echo '$(srcdir)/'`Tests.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tests.Tpo $(DEPDIR)/cdo-Tests.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tests.c' object='cdo-Tests.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tests.o -MD -MP -MF $(DEPDIR)/cdo-Tests.Tpo -c -o cdo-Tests.o `test -f 'Tests.c' || echo '$(srcdir)/'`Tests.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tests.Tpo $(DEPDIR)/cdo-Tests.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tests.c' object='cdo-Tests.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tests.o `test -f 'Tests.c' || echo '$(srcdir)/'`Tests.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tests.o `test -f 'Tests.c' || echo '$(srcdir)/'`Tests.c
 
 cdo-Tests.obj: Tests.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tests.obj -MD -MP -MF $(DEPDIR)/cdo-Tests.Tpo -c -o cdo-Tests.obj `if test -f 'Tests.c'; then $(CYGPATH_W) 'Tests.c'; else $(CYGPATH_W) '$(srcdir)/Tests.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tests.Tpo $(DEPDIR)/cdo-Tests.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tests.c' object='cdo-Tests.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tests.obj -MD -MP -MF $(DEPDIR)/cdo-Tests.Tpo -c -o cdo-Tests.obj `if test -f 'Tests.c'; then $(CYGPATH_W) 'Tests.c'; else $(CYGPATH_W) '$(srcdir)/Tests.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tests.Tpo $(DEPDIR)/cdo-Tests.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tests.c' object='cdo-Tests.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tests.obj `if test -f 'Tests.c'; then $(CYGPATH_W) 'Tests.c'; else $(CYGPATH_W) '$(srcdir)/Tests.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tests.obj `if test -f 'Tests.c'; then $(CYGPATH_W) 'Tests.c'; else $(CYGPATH_W) '$(srcdir)/Tests.c'; fi`
 
 cdo-Timcount.o: Timcount.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timcount.o -MD -MP -MF $(DEPDIR)/cdo-Timcount.Tpo -c -o cdo-Timcount.o `test -f 'Timcount.c' || echo '$(srcdir)/'`Timcount.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timcount.Tpo $(DEPDIR)/cdo-Timcount.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timcount.c' object='cdo-Timcount.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timcount.o -MD -MP -MF $(DEPDIR)/cdo-Timcount.Tpo -c -o cdo-Timcount.o `test -f 'Timcount.c' || echo '$(srcdir)/'`Timcount.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timcount.Tpo $(DEPDIR)/cdo-Timcount.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timcount.c' object='cdo-Timcount.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timcount.o `test -f 'Timcount.c' || echo '$(srcdir)/'`Timcount.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timcount.o `test -f 'Timcount.c' || echo '$(srcdir)/'`Timcount.c
 
 cdo-Timcount.obj: Timcount.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timcount.obj -MD -MP -MF $(DEPDIR)/cdo-Timcount.Tpo -c -o cdo-Timcount.obj `if test -f 'Timcount.c'; then $(CYGPATH_W) 'Timcount.c'; else $(CYGPATH_W) '$(srcdir)/Timcount.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timcount.Tpo $(DEPDIR)/cdo-Timcount.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timcount.c' object='cdo-Timcount.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timcount.obj -MD -MP -MF $(DEPDIR)/cdo-Timcount.Tpo -c -o cdo-Timcount.obj `if test -f 'Timcount.c'; then $(CYGPATH_W) 'Timcount.c'; else $(CYGPATH_W) '$(srcdir)/Timcount.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timcount.Tpo $(DEPDIR)/cdo-Timcount.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timcount.c' object='cdo-Timcount.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timcount.obj `if test -f 'Timcount.c'; then $(CYGPATH_W) 'Timcount.c'; else $(CYGPATH_W) '$(srcdir)/Timcount.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timcount.obj `if test -f 'Timcount.c'; then $(CYGPATH_W) 'Timcount.c'; else $(CYGPATH_W) '$(srcdir)/Timcount.c'; fi`
 
 cdo-Timpctl.o: Timpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timpctl.o -MD -MP -MF $(DEPDIR)/cdo-Timpctl.Tpo -c -o cdo-Timpctl.o `test -f 'Timpctl.c' || echo '$(srcdir)/'`Timpctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timpctl.Tpo $(DEPDIR)/cdo-Timpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timpctl.c' object='cdo-Timpctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timpctl.o -MD -MP -MF $(DEPDIR)/cdo-Timpctl.Tpo -c -o cdo-Timpctl.o `test -f 'Timpctl.c' || echo '$(srcdir)/'`Timpctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timpctl.Tpo $(DEPDIR)/cdo-Timpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timpctl.c' object='cdo-Timpctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timpctl.o `test -f 'Timpctl.c' || echo '$(srcdir)/'`Timpctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timpctl.o `test -f 'Timpctl.c' || echo '$(srcdir)/'`Timpctl.c
 
 cdo-Timpctl.obj: Timpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Timpctl.Tpo -c -o cdo-Timpctl.obj `if test -f 'Timpctl.c'; then $(CYGPATH_W) 'Timpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timpctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timpctl.Tpo $(DEPDIR)/cdo-Timpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timpctl.c' object='cdo-Timpctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Timpctl.Tpo -c -o cdo-Timpctl.obj `if test -f 'Timpctl.c'; then $(CYGPATH_W) 'Timpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timpctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timpctl.Tpo $(DEPDIR)/cdo-Timpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timpctl.c' object='cdo-Timpctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timpctl.obj `if test -f 'Timpctl.c'; then $(CYGPATH_W) 'Timpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timpctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timpctl.obj `if test -f 'Timpctl.c'; then $(CYGPATH_W) 'Timpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timpctl.c'; fi`
 
 cdo-Timselpctl.o: Timselpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselpctl.o -MD -MP -MF $(DEPDIR)/cdo-Timselpctl.Tpo -c -o cdo-Timselpctl.o `test -f 'Timselpctl.c' || echo '$(srcdir)/'`Timselpctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timselpctl.Tpo $(DEPDIR)/cdo-Timselpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timselpctl.c' object='cdo-Timselpctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselpctl.o -MD -MP -MF $(DEPDIR)/cdo-Timselpctl.Tpo -c -o cdo-Timselpctl.o `test -f 'Timselpctl.c' || echo '$(srcdir)/'`Timselpctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timselpctl.Tpo $(DEPDIR)/cdo-Timselpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timselpctl.c' object='cdo-Timselpctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselpctl.o `test -f 'Timselpctl.c' || echo '$(srcdir)/'`Timselpctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselpctl.o `test -f 'Timselpctl.c' || echo '$(srcdir)/'`Timselpctl.c
 
 cdo-Timselpctl.obj: Timselpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Timselpctl.Tpo -c -o cdo-Timselpctl.obj `if test -f 'Timselpctl.c'; then $(CYGPATH_W) 'Timselpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timselpctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timselpctl.Tpo $(DEPDIR)/cdo-Timselpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timselpctl.c' object='cdo-Timselpctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Timselpctl.Tpo -c -o cdo-Timselpctl.obj `if test -f 'Timselpctl.c'; then $(CYGPATH_W) 'Timselpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timselpctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timselpctl.Tpo $(DEPDIR)/cdo-Timselpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timselpctl.c' object='cdo-Timselpctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselpctl.obj `if test -f 'Timselpctl.c'; then $(CYGPATH_W) 'Timselpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timselpctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselpctl.obj `if test -f 'Timselpctl.c'; then $(CYGPATH_W) 'Timselpctl.c'; else $(CYGPATH_W) '$(srcdir)/Timselpctl.c'; fi`
 
 cdo-Timselstat.o: Timselstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselstat.o -MD -MP -MF $(DEPDIR)/cdo-Timselstat.Tpo -c -o cdo-Timselstat.o `test -f 'Timselstat.c' || echo '$(srcdir)/'`Timselstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timselstat.Tpo $(DEPDIR)/cdo-Timselstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timselstat.c' object='cdo-Timselstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselstat.o -MD -MP -MF $(DEPDIR)/cdo-Timselstat.Tpo -c -o cdo-Timselstat.o `test -f 'Timselstat.c' || echo '$(srcdir)/'`Timselstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timselstat.Tpo $(DEPDIR)/cdo-Timselstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timselstat.c' object='cdo-Timselstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselstat.o `test -f 'Timselstat.c' || echo '$(srcdir)/'`Timselstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselstat.o `test -f 'Timselstat.c' || echo '$(srcdir)/'`Timselstat.c
 
 cdo-Timselstat.obj: Timselstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselstat.obj -MD -MP -MF $(DEPDIR)/cdo-Timselstat.Tpo -c -o cdo-Timselstat.obj `if test -f 'Timselstat.c'; then $(CYGPATH_W) 'Timselstat.c'; else $(CYGPATH_W) '$(srcdir)/Timselstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timselstat.Tpo $(DEPDIR)/cdo-Timselstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timselstat.c' object='cdo-Timselstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timselstat.obj -MD -MP -MF $(DEPDIR)/cdo-Timselstat.Tpo -c -o cdo-Timselstat.obj `if test -f 'Timselstat.c'; then $(CYGPATH_W) 'Timselstat.c'; else $(CYGPATH_W) '$(srcdir)/Timselstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timselstat.Tpo $(DEPDIR)/cdo-Timselstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timselstat.c' object='cdo-Timselstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselstat.obj `if test -f 'Timselstat.c'; then $(CYGPATH_W) 'Timselstat.c'; else $(CYGPATH_W) '$(srcdir)/Timselstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timselstat.obj `if test -f 'Timselstat.c'; then $(CYGPATH_W) 'Timselstat.c'; else $(CYGPATH_W) '$(srcdir)/Timselstat.c'; fi`
 
 cdo-Timsort.o: Timsort.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timsort.o -MD -MP -MF $(DEPDIR)/cdo-Timsort.Tpo -c -o cdo-Timsort.o `test -f 'Timsort.c' || echo '$(srcdir)/'`Timsort.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timsort.Tpo $(DEPDIR)/cdo-Timsort.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timsort.c' object='cdo-Timsort.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timsort.o -MD -MP -MF $(DEPDIR)/cdo-Timsort.Tpo -c -o cdo-Timsort.o `test -f 'Timsort.c' || echo '$(srcdir)/'`Timsort.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timsort.Tpo $(DEPDIR)/cdo-Timsort.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timsort.c' object='cdo-Timsort.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timsort.o `test -f 'Timsort.c' || echo '$(srcdir)/'`Timsort.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timsort.o `test -f 'Timsort.c' || echo '$(srcdir)/'`Timsort.c
 
 cdo-Timsort.obj: Timsort.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timsort.obj -MD -MP -MF $(DEPDIR)/cdo-Timsort.Tpo -c -o cdo-Timsort.obj `if test -f 'Timsort.c'; then $(CYGPATH_W) 'Timsort.c'; else $(CYGPATH_W) '$(srcdir)/Timsort.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timsort.Tpo $(DEPDIR)/cdo-Timsort.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timsort.c' object='cdo-Timsort.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timsort.obj -MD -MP -MF $(DEPDIR)/cdo-Timsort.Tpo -c -o cdo-Timsort.obj `if test -f 'Timsort.c'; then $(CYGPATH_W) 'Timsort.c'; else $(CYGPATH_W) '$(srcdir)/Timsort.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timsort.Tpo $(DEPDIR)/cdo-Timsort.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timsort.c' object='cdo-Timsort.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timsort.obj `if test -f 'Timsort.c'; then $(CYGPATH_W) 'Timsort.c'; else $(CYGPATH_W) '$(srcdir)/Timsort.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timsort.obj `if test -f 'Timsort.c'; then $(CYGPATH_W) 'Timsort.c'; else $(CYGPATH_W) '$(srcdir)/Timsort.c'; fi`
 
 cdo-Timstat.o: Timstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat.o -MD -MP -MF $(DEPDIR)/cdo-Timstat.Tpo -c -o cdo-Timstat.o `test -f 'Timstat.c' || echo '$(srcdir)/'`Timstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timstat.Tpo $(DEPDIR)/cdo-Timstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timstat.c' object='cdo-Timstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat.o -MD -MP -MF $(DEPDIR)/cdo-Timstat.Tpo -c -o cdo-Timstat.o `test -f 'Timstat.c' || echo '$(srcdir)/'`Timstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timstat.Tpo $(DEPDIR)/cdo-Timstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timstat.c' object='cdo-Timstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat.o `test -f 'Timstat.c' || echo '$(srcdir)/'`Timstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat.o `test -f 'Timstat.c' || echo '$(srcdir)/'`Timstat.c
 
 cdo-Timstat.obj: Timstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat.obj -MD -MP -MF $(DEPDIR)/cdo-Timstat.Tpo -c -o cdo-Timstat.obj `if test -f 'Timstat.c'; then $(CYGPATH_W) 'Timstat.c'; else $(CYGPATH_W) '$(srcdir)/Timstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timstat.Tpo $(DEPDIR)/cdo-Timstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timstat.c' object='cdo-Timstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat.obj -MD -MP -MF $(DEPDIR)/cdo-Timstat.Tpo -c -o cdo-Timstat.obj `if test -f 'Timstat.c'; then $(CYGPATH_W) 'Timstat.c'; else $(CYGPATH_W) '$(srcdir)/Timstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timstat.Tpo $(DEPDIR)/cdo-Timstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timstat.c' object='cdo-Timstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat.obj `if test -f 'Timstat.c'; then $(CYGPATH_W) 'Timstat.c'; else $(CYGPATH_W) '$(srcdir)/Timstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat.obj `if test -f 'Timstat.c'; then $(CYGPATH_W) 'Timstat.c'; else $(CYGPATH_W) '$(srcdir)/Timstat.c'; fi`
 
 cdo-Timstat2.o: Timstat2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat2.o -MD -MP -MF $(DEPDIR)/cdo-Timstat2.Tpo -c -o cdo-Timstat2.o `test -f 'Timstat2.c' || echo '$(srcdir)/'`Timstat2.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timstat2.Tpo $(DEPDIR)/cdo-Timstat2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timstat2.c' object='cdo-Timstat2.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat2.o -MD -MP -MF $(DEPDIR)/cdo-Timstat2.Tpo -c -o cdo-Timstat2.o `test -f 'Timstat2.c' || echo '$(srcdir)/'`Timstat2.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timstat2.Tpo $(DEPDIR)/cdo-Timstat2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timstat2.c' object='cdo-Timstat2.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat2.o `test -f 'Timstat2.c' || echo '$(srcdir)/'`Timstat2.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat2.o `test -f 'Timstat2.c' || echo '$(srcdir)/'`Timstat2.c
 
 cdo-Timstat2.obj: Timstat2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat2.obj -MD -MP -MF $(DEPDIR)/cdo-Timstat2.Tpo -c -o cdo-Timstat2.obj `if test -f 'Timstat2.c'; then $(CYGPATH_W) 'Timstat2.c'; else $(CYGPATH_W) '$(srcdir)/Timstat2.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timstat2.Tpo $(DEPDIR)/cdo-Timstat2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timstat2.c' object='cdo-Timstat2.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat2.obj -MD -MP -MF $(DEPDIR)/cdo-Timstat2.Tpo -c -o cdo-Timstat2.obj `if test -f 'Timstat2.c'; then $(CYGPATH_W) 'Timstat2.c'; else $(CYGPATH_W) '$(srcdir)/Timstat2.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timstat2.Tpo $(DEPDIR)/cdo-Timstat2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timstat2.c' object='cdo-Timstat2.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat2.obj `if test -f 'Timstat2.c'; then $(CYGPATH_W) 'Timstat2.c'; else $(CYGPATH_W) '$(srcdir)/Timstat2.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat2.obj `if test -f 'Timstat2.c'; then $(CYGPATH_W) 'Timstat2.c'; else $(CYGPATH_W) '$(srcdir)/Timstat2.c'; fi`
 
 cdo-Timstat3.o: Timstat3.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat3.o -MD -MP -MF $(DEPDIR)/cdo-Timstat3.Tpo -c -o cdo-Timstat3.o `test -f 'Timstat3.c' || echo '$(srcdir)/'`Timstat3.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timstat3.Tpo $(DEPDIR)/cdo-Timstat3.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timstat3.c' object='cdo-Timstat3.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat3.o -MD -MP -MF $(DEPDIR)/cdo-Timstat3.Tpo -c -o cdo-Timstat3.o `test -f 'Timstat3.c' || echo '$(srcdir)/'`Timstat3.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timstat3.Tpo $(DEPDIR)/cdo-Timstat3.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timstat3.c' object='cdo-Timstat3.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat3.o `test -f 'Timstat3.c' || echo '$(srcdir)/'`Timstat3.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat3.o `test -f 'Timstat3.c' || echo '$(srcdir)/'`Timstat3.c
 
 cdo-Timstat3.obj: Timstat3.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat3.obj -MD -MP -MF $(DEPDIR)/cdo-Timstat3.Tpo -c -o cdo-Timstat3.obj `if test -f 'Timstat3.c'; then $(CYGPATH_W) 'Timstat3.c'; else $(CYGPATH_W) '$(srcdir)/Timstat3.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Timstat3.Tpo $(DEPDIR)/cdo-Timstat3.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Timstat3.c' object='cdo-Timstat3.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Timstat3.obj -MD -MP -MF $(DEPDIR)/cdo-Timstat3.Tpo -c -o cdo-Timstat3.obj `if test -f 'Timstat3.c'; then $(CYGPATH_W) 'Timstat3.c'; else $(CYGPATH_W) '$(srcdir)/Timstat3.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Timstat3.Tpo $(DEPDIR)/cdo-Timstat3.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Timstat3.c' object='cdo-Timstat3.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat3.obj `if test -f 'Timstat3.c'; then $(CYGPATH_W) 'Timstat3.c'; else $(CYGPATH_W) '$(srcdir)/Timstat3.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Timstat3.obj `if test -f 'Timstat3.c'; then $(CYGPATH_W) 'Timstat3.c'; else $(CYGPATH_W) '$(srcdir)/Timstat3.c'; fi`
 
 cdo-Tinfo.o: Tinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tinfo.o -MD -MP -MF $(DEPDIR)/cdo-Tinfo.Tpo -c -o cdo-Tinfo.o `test -f 'Tinfo.c' || echo '$(srcdir)/'`Tinfo.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tinfo.Tpo $(DEPDIR)/cdo-Tinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tinfo.c' object='cdo-Tinfo.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tinfo.o -MD -MP -MF $(DEPDIR)/cdo-Tinfo.Tpo -c -o cdo-Tinfo.o `test -f 'Tinfo.c' || echo '$(srcdir)/'`Tinfo.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tinfo.Tpo $(DEPDIR)/cdo-Tinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tinfo.c' object='cdo-Tinfo.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tinfo.o `test -f 'Tinfo.c' || echo '$(srcdir)/'`Tinfo.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tinfo.o `test -f 'Tinfo.c' || echo '$(srcdir)/'`Tinfo.c
 
 cdo-Tinfo.obj: Tinfo.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Tinfo.Tpo -c -o cdo-Tinfo.obj `if test -f 'Tinfo.c'; then $(CYGPATH_W) 'Tinfo.c'; else $(CYGPATH_W) '$(srcdir)/Tinfo.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tinfo.Tpo $(DEPDIR)/cdo-Tinfo.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tinfo.c' object='cdo-Tinfo.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tinfo.obj -MD -MP -MF $(DEPDIR)/cdo-Tinfo.Tpo -c -o cdo-Tinfo.obj `if test -f 'Tinfo.c'; then $(CYGPATH_W) 'Tinfo.c'; else $(CYGPATH_W) '$(srcdir)/Tinfo.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tinfo.Tpo $(DEPDIR)/cdo-Tinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tinfo.c' object='cdo-Tinfo.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tinfo.obj `if test -f 'Tinfo.c'; then $(CYGPATH_W) 'Tinfo.c'; else $(CYGPATH_W) '$(srcdir)/Tinfo.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tinfo.obj `if test -f 'Tinfo.c'; then $(CYGPATH_W) 'Tinfo.c'; else $(CYGPATH_W) '$(srcdir)/Tinfo.c'; fi`
 
 cdo-Tocomplex.o: Tocomplex.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tocomplex.o -MD -MP -MF $(DEPDIR)/cdo-Tocomplex.Tpo -c -o cdo-Tocomplex.o `test -f 'Tocomplex.c' || echo '$(srcdir)/'`Tocomplex.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tocomplex.Tpo $(DEPDIR)/cdo-Tocomplex.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tocomplex.c' object='cdo-Tocomplex.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tocomplex.o -MD -MP -MF $(DEPDIR)/cdo-Tocomplex.Tpo -c -o cdo-Tocomplex.o `test -f 'Tocomplex.c' || echo '$(srcdir)/'`Tocomplex.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tocomplex.Tpo $(DEPDIR)/cdo-Tocomplex.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tocomplex.c' object='cdo-Tocomplex.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tocomplex.o `test -f 'Tocomplex.c' || echo '$(srcdir)/'`Tocomplex.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tocomplex.o `test -f 'Tocomplex.c' || echo '$(srcdir)/'`Tocomplex.c
 
 cdo-Tocomplex.obj: Tocomplex.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tocomplex.obj -MD -MP -MF $(DEPDIR)/cdo-Tocomplex.Tpo -c -o cdo-Tocomplex.obj `if test -f 'Tocomplex.c'; then $(CYGPATH_W) 'Tocomplex.c'; else $(CYGPATH_W) '$(srcdir)/Tocomplex.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tocomplex.Tpo $(DEPDIR)/cdo-Tocomplex.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tocomplex.c' object='cdo-Tocomplex.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tocomplex.obj -MD -MP -MF $(DEPDIR)/cdo-Tocomplex.Tpo -c -o cdo-Tocomplex.obj `if test -f 'Tocomplex.c'; then $(CYGPATH_W) 'Tocomplex.c'; else $(CYGPATH_W) '$(srcdir)/Tocomplex.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tocomplex.Tpo $(DEPDIR)/cdo-Tocomplex.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tocomplex.c' object='cdo-Tocomplex.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tocomplex.obj `if test -f 'Tocomplex.c'; then $(CYGPATH_W) 'Tocomplex.c'; else $(CYGPATH_W) '$(srcdir)/Tocomplex.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tocomplex.obj `if test -f 'Tocomplex.c'; then $(CYGPATH_W) 'Tocomplex.c'; else $(CYGPATH_W) '$(srcdir)/Tocomplex.c'; fi`
 
 cdo-Transpose.o: Transpose.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Transpose.o -MD -MP -MF $(DEPDIR)/cdo-Transpose.Tpo -c -o cdo-Transpose.o `test -f 'Transpose.c' || echo '$(srcdir)/'`Transpose.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Transpose.Tpo $(DEPDIR)/cdo-Transpose.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Transpose.c' object='cdo-Transpose.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Transpose.o -MD -MP -MF $(DEPDIR)/cdo-Transpose.Tpo -c -o cdo-Transpose.o `test -f 'Transpose.c' || echo '$(srcdir)/'`Transpose.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Transpose.Tpo $(DEPDIR)/cdo-Transpose.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Transpose.c' object='cdo-Transpose.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Transpose.o `test -f 'Transpose.c' || echo '$(srcdir)/'`Transpose.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Transpose.o `test -f 'Transpose.c' || echo '$(srcdir)/'`Transpose.c
 
 cdo-Transpose.obj: Transpose.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Transpose.obj -MD -MP -MF $(DEPDIR)/cdo-Transpose.Tpo -c -o cdo-Transpose.obj `if test -f 'Transpose.c'; then $(CYGPATH_W) 'Transpose.c'; else $(CYGPATH_W) '$(srcdir)/Transpose.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Transpose.Tpo $(DEPDIR)/cdo-Transpose.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Transpose.c' object='cdo-Transpose.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Transpose.obj -MD -MP -MF $(DEPDIR)/cdo-Transpose.Tpo -c -o cdo-Transpose.obj `if test -f 'Transpose.c'; then $(CYGPATH_W) 'Transpose.c'; else $(CYGPATH_W) '$(srcdir)/Transpose.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Transpose.Tpo $(DEPDIR)/cdo-Transpose.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Transpose.c' object='cdo-Transpose.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Transpose.obj `if test -f 'Transpose.c'; then $(CYGPATH_W) 'Transpose.c'; else $(CYGPATH_W) '$(srcdir)/Transpose.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Transpose.obj `if test -f 'Transpose.c'; then $(CYGPATH_W) 'Transpose.c'; else $(CYGPATH_W) '$(srcdir)/Transpose.c'; fi`
 
 cdo-Trend.o: Trend.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trend.o -MD -MP -MF $(DEPDIR)/cdo-Trend.Tpo -c -o cdo-Trend.o `test -f 'Trend.c' || echo '$(srcdir)/'`Trend.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Trend.Tpo $(DEPDIR)/cdo-Trend.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Trend.c' object='cdo-Trend.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trend.o -MD -MP -MF $(DEPDIR)/cdo-Trend.Tpo -c -o cdo-Trend.o `test -f 'Trend.c' || echo '$(srcdir)/'`Trend.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Trend.Tpo $(DEPDIR)/cdo-Trend.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Trend.c' object='cdo-Trend.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trend.o `test -f 'Trend.c' || echo '$(srcdir)/'`Trend.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trend.o `test -f 'Trend.c' || echo '$(srcdir)/'`Trend.c
 
 cdo-Trend.obj: Trend.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trend.obj -MD -MP -MF $(DEPDIR)/cdo-Trend.Tpo -c -o cdo-Trend.obj `if test -f 'Trend.c'; then $(CYGPATH_W) 'Trend.c'; else $(CYGPATH_W) '$(srcdir)/Trend.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Trend.Tpo $(DEPDIR)/cdo-Trend.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Trend.c' object='cdo-Trend.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trend.obj -MD -MP -MF $(DEPDIR)/cdo-Trend.Tpo -c -o cdo-Trend.obj `if test -f 'Trend.c'; then $(CYGPATH_W) 'Trend.c'; else $(CYGPATH_W) '$(srcdir)/Trend.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Trend.Tpo $(DEPDIR)/cdo-Trend.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Trend.c' object='cdo-Trend.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trend.obj `if test -f 'Trend.c'; then $(CYGPATH_W) 'Trend.c'; else $(CYGPATH_W) '$(srcdir)/Trend.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trend.obj `if test -f 'Trend.c'; then $(CYGPATH_W) 'Trend.c'; else $(CYGPATH_W) '$(srcdir)/Trend.c'; fi`
 
 cdo-Trms.o: Trms.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trms.o -MD -MP -MF $(DEPDIR)/cdo-Trms.Tpo -c -o cdo-Trms.o `test -f 'Trms.c' || echo '$(srcdir)/'`Trms.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Trms.Tpo $(DEPDIR)/cdo-Trms.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Trms.c' object='cdo-Trms.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trms.o -MD -MP -MF $(DEPDIR)/cdo-Trms.Tpo -c -o cdo-Trms.o `test -f 'Trms.c' || echo '$(srcdir)/'`Trms.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Trms.Tpo $(DEPDIR)/cdo-Trms.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Trms.c' object='cdo-Trms.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trms.o `test -f 'Trms.c' || echo '$(srcdir)/'`Trms.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trms.o `test -f 'Trms.c' || echo '$(srcdir)/'`Trms.c
 
 cdo-Trms.obj: Trms.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trms.obj -MD -MP -MF $(DEPDIR)/cdo-Trms.Tpo -c -o cdo-Trms.obj `if test -f 'Trms.c'; then $(CYGPATH_W) 'Trms.c'; else $(CYGPATH_W) '$(srcdir)/Trms.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Trms.Tpo $(DEPDIR)/cdo-Trms.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Trms.c' object='cdo-Trms.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Trms.obj -MD -MP -MF $(DEPDIR)/cdo-Trms.Tpo -c -o cdo-Trms.obj `if test -f 'Trms.c'; then $(CYGPATH_W) 'Trms.c'; else $(CYGPATH_W) '$(srcdir)/Trms.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Trms.Tpo $(DEPDIR)/cdo-Trms.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Trms.c' object='cdo-Trms.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trms.obj `if test -f 'Trms.c'; then $(CYGPATH_W) 'Trms.c'; else $(CYGPATH_W) '$(srcdir)/Trms.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Trms.obj `if test -f 'Trms.c'; then $(CYGPATH_W) 'Trms.c'; else $(CYGPATH_W) '$(srcdir)/Trms.c'; fi`
 
 cdo-Tstepcount.o: Tstepcount.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tstepcount.o -MD -MP -MF $(DEPDIR)/cdo-Tstepcount.Tpo -c -o cdo-Tstepcount.o `test -f 'Tstepcount.c' || echo '$(srcdir)/'`Tstepcount.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tstepcount.Tpo $(DEPDIR)/cdo-Tstepcount.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tstepcount.c' object='cdo-Tstepcount.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tstepcount.o -MD -MP -MF $(DEPDIR)/cdo-Tstepcount.Tpo -c -o cdo-Tstepcount.o `test -f 'Tstepcount.c' || echo '$(srcdir)/'`Tstepcount.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tstepcount.Tpo $(DEPDIR)/cdo-Tstepcount.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tstepcount.c' object='cdo-Tstepcount.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tstepcount.o `test -f 'Tstepcount.c' || echo '$(srcdir)/'`Tstepcount.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tstepcount.o `test -f 'Tstepcount.c' || echo '$(srcdir)/'`Tstepcount.c
 
 cdo-Tstepcount.obj: Tstepcount.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tstepcount.obj -MD -MP -MF $(DEPDIR)/cdo-Tstepcount.Tpo -c -o cdo-Tstepcount.obj `if test -f 'Tstepcount.c'; then $(CYGPATH_W) 'Tstepcount.c'; else $(CYGPATH_W) '$(srcdir)/Tstepcount.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Tstepcount.Tpo $(DEPDIR)/cdo-Tstepcount.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Tstepcount.c' object='cdo-Tstepcount.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Tstepcount.obj -MD -MP -MF $(DEPDIR)/cdo-Tstepcount.Tpo -c -o cdo-Tstepcount.obj `if test -f 'Tstepcount.c'; then $(CYGPATH_W) 'Tstepcount.c'; else $(CYGPATH_W) '$(srcdir)/Tstepcount.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Tstepcount.Tpo $(DEPDIR)/cdo-Tstepcount.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Tstepcount.c' object='cdo-Tstepcount.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tstepcount.obj `if test -f 'Tstepcount.c'; then $(CYGPATH_W) 'Tstepcount.c'; else $(CYGPATH_W) '$(srcdir)/Tstepcount.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Tstepcount.obj `if test -f 'Tstepcount.c'; then $(CYGPATH_W) 'Tstepcount.c'; else $(CYGPATH_W) '$(srcdir)/Tstepcount.c'; fi`
 
 cdo-Vardup.o: Vardup.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vardup.o -MD -MP -MF $(DEPDIR)/cdo-Vardup.Tpo -c -o cdo-Vardup.o `test -f 'Vardup.c' || echo '$(srcdir)/'`Vardup.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vardup.Tpo $(DEPDIR)/cdo-Vardup.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vardup.c' object='cdo-Vardup.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vardup.o -MD -MP -MF $(DEPDIR)/cdo-Vardup.Tpo -c -o cdo-Vardup.o `test -f 'Vardup.c' || echo '$(srcdir)/'`Vardup.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vardup.Tpo $(DEPDIR)/cdo-Vardup.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vardup.c' object='cdo-Vardup.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vardup.o `test -f 'Vardup.c' || echo '$(srcdir)/'`Vardup.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vardup.o `test -f 'Vardup.c' || echo '$(srcdir)/'`Vardup.c
 
 cdo-Vardup.obj: Vardup.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vardup.obj -MD -MP -MF $(DEPDIR)/cdo-Vardup.Tpo -c -o cdo-Vardup.obj `if test -f 'Vardup.c'; then $(CYGPATH_W) 'Vardup.c'; else $(CYGPATH_W) '$(srcdir)/Vardup.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vardup.Tpo $(DEPDIR)/cdo-Vardup.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vardup.c' object='cdo-Vardup.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vardup.obj -MD -MP -MF $(DEPDIR)/cdo-Vardup.Tpo -c -o cdo-Vardup.obj `if test -f 'Vardup.c'; then $(CYGPATH_W) 'Vardup.c'; else $(CYGPATH_W) '$(srcdir)/Vardup.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vardup.Tpo $(DEPDIR)/cdo-Vardup.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vardup.c' object='cdo-Vardup.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vardup.obj `if test -f 'Vardup.c'; then $(CYGPATH_W) 'Vardup.c'; else $(CYGPATH_W) '$(srcdir)/Vardup.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vardup.obj `if test -f 'Vardup.c'; then $(CYGPATH_W) 'Vardup.c'; else $(CYGPATH_W) '$(srcdir)/Vardup.c'; fi`
 
 cdo-Vargen.o: Vargen.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vargen.o -MD -MP -MF $(DEPDIR)/cdo-Vargen.Tpo -c -o cdo-Vargen.o `test -f 'Vargen.c' || echo '$(srcdir)/'`Vargen.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vargen.Tpo $(DEPDIR)/cdo-Vargen.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vargen.c' object='cdo-Vargen.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vargen.o -MD -MP -MF $(DEPDIR)/cdo-Vargen.Tpo -c -o cdo-Vargen.o `test -f 'Vargen.c' || echo '$(srcdir)/'`Vargen.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vargen.Tpo $(DEPDIR)/cdo-Vargen.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vargen.c' object='cdo-Vargen.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vargen.o `test -f 'Vargen.c' || echo '$(srcdir)/'`Vargen.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vargen.o `test -f 'Vargen.c' || echo '$(srcdir)/'`Vargen.c
 
 cdo-Vargen.obj: Vargen.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vargen.obj -MD -MP -MF $(DEPDIR)/cdo-Vargen.Tpo -c -o cdo-Vargen.obj `if test -f 'Vargen.c'; then $(CYGPATH_W) 'Vargen.c'; else $(CYGPATH_W) '$(srcdir)/Vargen.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vargen.Tpo $(DEPDIR)/cdo-Vargen.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vargen.c' object='cdo-Vargen.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vargen.obj -MD -MP -MF $(DEPDIR)/cdo-Vargen.Tpo -c -o cdo-Vargen.obj `if test -f 'Vargen.c'; then $(CYGPATH_W) 'Vargen.c'; else $(CYGPATH_W) '$(srcdir)/Vargen.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vargen.Tpo $(DEPDIR)/cdo-Vargen.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vargen.c' object='cdo-Vargen.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vargen.obj `if test -f 'Vargen.c'; then $(CYGPATH_W) 'Vargen.c'; else $(CYGPATH_W) '$(srcdir)/Vargen.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vargen.obj `if test -f 'Vargen.c'; then $(CYGPATH_W) 'Vargen.c'; else $(CYGPATH_W) '$(srcdir)/Vargen.c'; fi`
 
 cdo-Varrms.o: Varrms.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Varrms.o -MD -MP -MF $(DEPDIR)/cdo-Varrms.Tpo -c -o cdo-Varrms.o `test -f 'Varrms.c' || echo '$(srcdir)/'`Varrms.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Varrms.Tpo $(DEPDIR)/cdo-Varrms.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Varrms.c' object='cdo-Varrms.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Varrms.o -MD -MP -MF $(DEPDIR)/cdo-Varrms.Tpo -c -o cdo-Varrms.o `test -f 'Varrms.c' || echo '$(srcdir)/'`Varrms.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Varrms.Tpo $(DEPDIR)/cdo-Varrms.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Varrms.c' object='cdo-Varrms.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Varrms.o `test -f 'Varrms.c' || echo '$(srcdir)/'`Varrms.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Varrms.o `test -f 'Varrms.c' || echo '$(srcdir)/'`Varrms.c
 
 cdo-Varrms.obj: Varrms.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Varrms.obj -MD -MP -MF $(DEPDIR)/cdo-Varrms.Tpo -c -o cdo-Varrms.obj `if test -f 'Varrms.c'; then $(CYGPATH_W) 'Varrms.c'; else $(CYGPATH_W) '$(srcdir)/Varrms.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Varrms.Tpo $(DEPDIR)/cdo-Varrms.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Varrms.c' object='cdo-Varrms.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Varrms.obj -MD -MP -MF $(DEPDIR)/cdo-Varrms.Tpo -c -o cdo-Varrms.obj `if test -f 'Varrms.c'; then $(CYGPATH_W) 'Varrms.c'; else $(CYGPATH_W) '$(srcdir)/Varrms.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Varrms.Tpo $(DEPDIR)/cdo-Varrms.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Varrms.c' object='cdo-Varrms.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Varrms.obj `if test -f 'Varrms.c'; then $(CYGPATH_W) 'Varrms.c'; else $(CYGPATH_W) '$(srcdir)/Varrms.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Varrms.obj `if test -f 'Varrms.c'; then $(CYGPATH_W) 'Varrms.c'; else $(CYGPATH_W) '$(srcdir)/Varrms.c'; fi`
 
 cdo-Vertint.o: Vertint.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertint.o -MD -MP -MF $(DEPDIR)/cdo-Vertint.Tpo -c -o cdo-Vertint.o `test -f 'Vertint.c' || echo '$(srcdir)/'`Vertint.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vertint.Tpo $(DEPDIR)/cdo-Vertint.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vertint.c' object='cdo-Vertint.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertint.o -MD -MP -MF $(DEPDIR)/cdo-Vertint.Tpo -c -o cdo-Vertint.o `test -f 'Vertint.c' || echo '$(srcdir)/'`Vertint.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vertint.Tpo $(DEPDIR)/cdo-Vertint.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vertint.c' object='cdo-Vertint.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertint.o `test -f 'Vertint.c' || echo '$(srcdir)/'`Vertint.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertint.o `test -f 'Vertint.c' || echo '$(srcdir)/'`Vertint.c
 
 cdo-Vertint.obj: Vertint.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertint.obj -MD -MP -MF $(DEPDIR)/cdo-Vertint.Tpo -c -o cdo-Vertint.obj `if test -f 'Vertint.c'; then $(CYGPATH_W) 'Vertint.c'; else $(CYGPATH_W) '$(srcdir)/Vertint.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vertint.Tpo $(DEPDIR)/cdo-Vertint.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vertint.c' object='cdo-Vertint.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertint.obj -MD -MP -MF $(DEPDIR)/cdo-Vertint.Tpo -c -o cdo-Vertint.obj `if test -f 'Vertint.c'; then $(CYGPATH_W) 'Vertint.c'; else $(CYGPATH_W) '$(srcdir)/Vertint.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vertint.Tpo $(DEPDIR)/cdo-Vertint.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vertint.c' object='cdo-Vertint.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertint.obj `if test -f 'Vertint.c'; then $(CYGPATH_W) 'Vertint.c'; else $(CYGPATH_W) '$(srcdir)/Vertint.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertint.obj `if test -f 'Vertint.c'; then $(CYGPATH_W) 'Vertint.c'; else $(CYGPATH_W) '$(srcdir)/Vertint.c'; fi`
 
 cdo-Vertstat.o: Vertstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertstat.o -MD -MP -MF $(DEPDIR)/cdo-Vertstat.Tpo -c -o cdo-Vertstat.o `test -f 'Vertstat.c' || echo '$(srcdir)/'`Vertstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vertstat.Tpo $(DEPDIR)/cdo-Vertstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vertstat.c' object='cdo-Vertstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertstat.o -MD -MP -MF $(DEPDIR)/cdo-Vertstat.Tpo -c -o cdo-Vertstat.o `test -f 'Vertstat.c' || echo '$(srcdir)/'`Vertstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vertstat.Tpo $(DEPDIR)/cdo-Vertstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vertstat.c' object='cdo-Vertstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertstat.o `test -f 'Vertstat.c' || echo '$(srcdir)/'`Vertstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertstat.o `test -f 'Vertstat.c' || echo '$(srcdir)/'`Vertstat.c
 
 cdo-Vertstat.obj: Vertstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertstat.obj -MD -MP -MF $(DEPDIR)/cdo-Vertstat.Tpo -c -o cdo-Vertstat.obj `if test -f 'Vertstat.c'; then $(CYGPATH_W) 'Vertstat.c'; else $(CYGPATH_W) '$(srcdir)/Vertstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vertstat.Tpo $(DEPDIR)/cdo-Vertstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vertstat.c' object='cdo-Vertstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertstat.obj -MD -MP -MF $(DEPDIR)/cdo-Vertstat.Tpo -c -o cdo-Vertstat.obj `if test -f 'Vertstat.c'; then $(CYGPATH_W) 'Vertstat.c'; else $(CYGPATH_W) '$(srcdir)/Vertstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vertstat.Tpo $(DEPDIR)/cdo-Vertstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vertstat.c' object='cdo-Vertstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertstat.obj `if test -f 'Vertstat.c'; then $(CYGPATH_W) 'Vertstat.c'; else $(CYGPATH_W) '$(srcdir)/Vertstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertstat.obj `if test -f 'Vertstat.c'; then $(CYGPATH_W) 'Vertstat.c'; else $(CYGPATH_W) '$(srcdir)/Vertstat.c'; fi`
 
 cdo-Vertwind.o: Vertwind.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertwind.o -MD -MP -MF $(DEPDIR)/cdo-Vertwind.Tpo -c -o cdo-Vertwind.o `test -f 'Vertwind.c' || echo '$(srcdir)/'`Vertwind.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vertwind.Tpo $(DEPDIR)/cdo-Vertwind.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vertwind.c' object='cdo-Vertwind.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertwind.o -MD -MP -MF $(DEPDIR)/cdo-Vertwind.Tpo -c -o cdo-Vertwind.o `test -f 'Vertwind.c' || echo '$(srcdir)/'`Vertwind.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vertwind.Tpo $(DEPDIR)/cdo-Vertwind.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vertwind.c' object='cdo-Vertwind.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertwind.o `test -f 'Vertwind.c' || echo '$(srcdir)/'`Vertwind.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertwind.o `test -f 'Vertwind.c' || echo '$(srcdir)/'`Vertwind.c
 
 cdo-Vertwind.obj: Vertwind.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertwind.obj -MD -MP -MF $(DEPDIR)/cdo-Vertwind.Tpo -c -o cdo-Vertwind.obj `if test -f 'Vertwind.c'; then $(CYGPATH_W) 'Vertwind.c'; else $(CYGPATH_W) '$(srcdir)/Vertwind.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Vertwind.Tpo $(DEPDIR)/cdo-Vertwind.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Vertwind.c' object='cdo-Vertwind.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Vertwind.obj -MD -MP -MF $(DEPDIR)/cdo-Vertwind.Tpo -c -o cdo-Vertwind.obj `if test -f 'Vertwind.c'; then $(CYGPATH_W) 'Vertwind.c'; else $(CYGPATH_W) '$(srcdir)/Vertwind.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Vertwind.Tpo $(DEPDIR)/cdo-Vertwind.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Vertwind.c' object='cdo-Vertwind.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertwind.obj `if test -f 'Vertwind.c'; then $(CYGPATH_W) 'Vertwind.c'; else $(CYGPATH_W) '$(srcdir)/Vertwind.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Vertwind.obj `if test -f 'Vertwind.c'; then $(CYGPATH_W) 'Vertwind.c'; else $(CYGPATH_W) '$(srcdir)/Vertwind.c'; fi`
 
 cdo-Wct.o: Wct.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wct.o -MD -MP -MF $(DEPDIR)/cdo-Wct.Tpo -c -o cdo-Wct.o `test -f 'Wct.c' || echo '$(srcdir)/'`Wct.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Wct.Tpo $(DEPDIR)/cdo-Wct.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Wct.c' object='cdo-Wct.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wct.o -MD -MP -MF $(DEPDIR)/cdo-Wct.Tpo -c -o cdo-Wct.o `test -f 'Wct.c' || echo '$(srcdir)/'`Wct.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Wct.Tpo $(DEPDIR)/cdo-Wct.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Wct.c' object='cdo-Wct.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wct.o `test -f 'Wct.c' || echo '$(srcdir)/'`Wct.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wct.o `test -f 'Wct.c' || echo '$(srcdir)/'`Wct.c
 
 cdo-Wct.obj: Wct.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wct.obj -MD -MP -MF $(DEPDIR)/cdo-Wct.Tpo -c -o cdo-Wct.obj `if test -f 'Wct.c'; then $(CYGPATH_W) 'Wct.c'; else $(CYGPATH_W) '$(srcdir)/Wct.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Wct.Tpo $(DEPDIR)/cdo-Wct.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Wct.c' object='cdo-Wct.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wct.obj -MD -MP -MF $(DEPDIR)/cdo-Wct.Tpo -c -o cdo-Wct.obj `if test -f 'Wct.c'; then $(CYGPATH_W) 'Wct.c'; else $(CYGPATH_W) '$(srcdir)/Wct.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Wct.Tpo $(DEPDIR)/cdo-Wct.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Wct.c' object='cdo-Wct.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wct.obj `if test -f 'Wct.c'; then $(CYGPATH_W) 'Wct.c'; else $(CYGPATH_W) '$(srcdir)/Wct.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wct.obj `if test -f 'Wct.c'; then $(CYGPATH_W) 'Wct.c'; else $(CYGPATH_W) '$(srcdir)/Wct.c'; fi`
 
 cdo-Wind.o: Wind.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wind.o -MD -MP -MF $(DEPDIR)/cdo-Wind.Tpo -c -o cdo-Wind.o `test -f 'Wind.c' || echo '$(srcdir)/'`Wind.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Wind.Tpo $(DEPDIR)/cdo-Wind.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Wind.c' object='cdo-Wind.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wind.o -MD -MP -MF $(DEPDIR)/cdo-Wind.Tpo -c -o cdo-Wind.o `test -f 'Wind.c' || echo '$(srcdir)/'`Wind.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Wind.Tpo $(DEPDIR)/cdo-Wind.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Wind.c' object='cdo-Wind.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wind.o `test -f 'Wind.c' || echo '$(srcdir)/'`Wind.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wind.o `test -f 'Wind.c' || echo '$(srcdir)/'`Wind.c
 
 cdo-Wind.obj: Wind.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wind.obj -MD -MP -MF $(DEPDIR)/cdo-Wind.Tpo -c -o cdo-Wind.obj `if test -f 'Wind.c'; then $(CYGPATH_W) 'Wind.c'; else $(CYGPATH_W) '$(srcdir)/Wind.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Wind.Tpo $(DEPDIR)/cdo-Wind.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Wind.c' object='cdo-Wind.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Wind.obj -MD -MP -MF $(DEPDIR)/cdo-Wind.Tpo -c -o cdo-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)/cdo-Wind.Tpo $(DEPDIR)/cdo-Wind.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Wind.c' object='cdo-Wind.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wind.obj `if test -f 'Wind.c'; then $(CYGPATH_W) 'Wind.c'; else $(CYGPATH_W) '$(srcdir)/Wind.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Wind.obj `if test -f 'Wind.c'; then $(CYGPATH_W) 'Wind.c'; else $(CYGPATH_W) '$(srcdir)/Wind.c'; fi`
 
 cdo-Writegrid.o: Writegrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writegrid.o -MD -MP -MF $(DEPDIR)/cdo-Writegrid.Tpo -c -o cdo-Writegrid.o `test -f 'Writegrid.c' || echo '$(srcdir)/'`Writegrid.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Writegrid.Tpo $(DEPDIR)/cdo-Writegrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Writegrid.c' object='cdo-Writegrid.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writegrid.o -MD -MP -MF $(DEPDIR)/cdo-Writegrid.Tpo -c -o cdo-Writegrid.o `test -f 'Writegrid.c' || echo '$(srcdir)/'`Writegrid.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Writegrid.Tpo $(DEPDIR)/cdo-Writegrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Writegrid.c' object='cdo-Writegrid.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writegrid.o `test -f 'Writegrid.c' || echo '$(srcdir)/'`Writegrid.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writegrid.o `test -f 'Writegrid.c' || echo '$(srcdir)/'`Writegrid.c
 
 cdo-Writegrid.obj: Writegrid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writegrid.obj -MD -MP -MF $(DEPDIR)/cdo-Writegrid.Tpo -c -o cdo-Writegrid.obj `if test -f 'Writegrid.c'; then $(CYGPATH_W) 'Writegrid.c'; else $(CYGPATH_W) '$(srcdir)/Writegrid.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Writegrid.Tpo $(DEPDIR)/cdo-Writegrid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Writegrid.c' object='cdo-Writegrid.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writegrid.obj -MD -MP -MF $(DEPDIR)/cdo-Writegrid.Tpo -c -o cdo-Writegrid.obj `if test -f 'Writegrid.c'; then $(CYGPATH_W) 'Writegrid.c'; else $(CYGPATH_W) '$(srcdir)/Writegrid.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Writegrid.Tpo $(DEPDIR)/cdo-Writegrid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Writegrid.c' object='cdo-Writegrid.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writegrid.obj `if test -f 'Writegrid.c'; then $(CYGPATH_W) 'Writegrid.c'; else $(CYGPATH_W) '$(srcdir)/Writegrid.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writegrid.obj `if test -f 'Writegrid.c'; then $(CYGPATH_W) 'Writegrid.c'; else $(CYGPATH_W) '$(srcdir)/Writegrid.c'; fi`
 
 cdo-Writerandom.o: Writerandom.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writerandom.o -MD -MP -MF $(DEPDIR)/cdo-Writerandom.Tpo -c -o cdo-Writerandom.o `test -f 'Writerandom.c' || echo '$(srcdir)/'`Writerandom.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Writerandom.Tpo $(DEPDIR)/cdo-Writerandom.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Writerandom.c' object='cdo-Writerandom.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writerandom.o -MD -MP -MF $(DEPDIR)/cdo-Writerandom.Tpo -c -o cdo-Writerandom.o `test -f 'Writerandom.c' || echo '$(srcdir)/'`Writerandom.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Writerandom.Tpo $(DEPDIR)/cdo-Writerandom.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Writerandom.c' object='cdo-Writerandom.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writerandom.o `test -f 'Writerandom.c' || echo '$(srcdir)/'`Writerandom.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writerandom.o `test -f 'Writerandom.c' || echo '$(srcdir)/'`Writerandom.c
 
 cdo-Writerandom.obj: Writerandom.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writerandom.obj -MD -MP -MF $(DEPDIR)/cdo-Writerandom.Tpo -c -o cdo-Writerandom.obj `if test -f 'Writerandom.c'; then $(CYGPATH_W) 'Writerandom.c'; else $(CYGPATH_W) '$(srcdir)/Writerandom.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Writerandom.Tpo $(DEPDIR)/cdo-Writerandom.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Writerandom.c' object='cdo-Writerandom.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Writerandom.obj -MD -MP -MF $(DEPDIR)/cdo-Writerandom.Tpo -c -o cdo-Writerandom.obj `if test -f 'Writerandom.c'; then $(CYGPATH_W) 'Writerandom.c'; else $(CYGPATH_W) '$(srcdir)/Writerandom.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Writerandom.Tpo $(DEPDIR)/cdo-Writerandom.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Writerandom.c' object='cdo-Writerandom.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writerandom.obj `if test -f 'Writerandom.c'; then $(CYGPATH_W) 'Writerandom.c'; else $(CYGPATH_W) '$(srcdir)/Writerandom.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Writerandom.obj `if test -f 'Writerandom.c'; then $(CYGPATH_W) 'Writerandom.c'; else $(CYGPATH_W) '$(srcdir)/Writerandom.c'; fi`
 
 cdo-YAR.o: YAR.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-YAR.o -MD -MP -MF $(DEPDIR)/cdo-YAR.Tpo -c -o cdo-YAR.o `test -f 'YAR.c' || echo '$(srcdir)/'`YAR.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-YAR.Tpo $(DEPDIR)/cdo-YAR.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='YAR.c' object='cdo-YAR.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-YAR.o -MD -MP -MF $(DEPDIR)/cdo-YAR.Tpo -c -o cdo-YAR.o `test -f 'YAR.c' || echo '$(srcdir)/'`YAR.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-YAR.Tpo $(DEPDIR)/cdo-YAR.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='YAR.c' object='cdo-YAR.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-YAR.o `test -f 'YAR.c' || echo '$(srcdir)/'`YAR.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-YAR.o `test -f 'YAR.c' || echo '$(srcdir)/'`YAR.c
 
 cdo-YAR.obj: YAR.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-YAR.obj -MD -MP -MF $(DEPDIR)/cdo-YAR.Tpo -c -o cdo-YAR.obj `if test -f 'YAR.c'; then $(CYGPATH_W) 'YAR.c'; else $(CYGPATH_W) '$(srcdir)/YAR.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-YAR.Tpo $(DEPDIR)/cdo-YAR.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='YAR.c' object='cdo-YAR.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-YAR.obj -MD -MP -MF $(DEPDIR)/cdo-YAR.Tpo -c -o cdo-YAR.obj `if test -f 'YAR.c'; then $(CYGPATH_W) 'YAR.c'; else $(CYGPATH_W) '$(srcdir)/YAR.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-YAR.Tpo $(DEPDIR)/cdo-YAR.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='YAR.c' object='cdo-YAR.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-YAR.obj `if test -f 'YAR.c'; then $(CYGPATH_W) 'YAR.c'; else $(CYGPATH_W) '$(srcdir)/YAR.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-YAR.obj `if test -f 'YAR.c'; then $(CYGPATH_W) 'YAR.c'; else $(CYGPATH_W) '$(srcdir)/YAR.c'; fi`
 
 cdo-Yearmonstat.o: Yearmonstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yearmonstat.o -MD -MP -MF $(DEPDIR)/cdo-Yearmonstat.Tpo -c -o cdo-Yearmonstat.o `test -f 'Yearmonstat.c' || echo '$(srcdir)/'`Yearmonstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yearmonstat.Tpo $(DEPDIR)/cdo-Yearmonstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yearmonstat.c' object='cdo-Yearmonstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yearmonstat.o -MD -MP -MF $(DEPDIR)/cdo-Yearmonstat.Tpo -c -o cdo-Yearmonstat.o `test -f 'Yearmonstat.c' || echo '$(srcdir)/'`Yearmonstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yearmonstat.Tpo $(DEPDIR)/cdo-Yearmonstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yearmonstat.c' object='cdo-Yearmonstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yearmonstat.o `test -f 'Yearmonstat.c' || echo '$(srcdir)/'`Yearmonstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yearmonstat.o `test -f 'Yearmonstat.c' || echo '$(srcdir)/'`Yearmonstat.c
 
 cdo-Yearmonstat.obj: Yearmonstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yearmonstat.obj -MD -MP -MF $(DEPDIR)/cdo-Yearmonstat.Tpo -c -o cdo-Yearmonstat.obj `if test -f 'Yearmonstat.c'; then $(CYGPATH_W) 'Yearmonstat.c'; else $(CYGPATH_W) '$(srcdir)/Yearmonstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yearmonstat.Tpo $(DEPDIR)/cdo-Yearmonstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yearmonstat.c' object='cdo-Yearmonstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yearmonstat.obj -MD -MP -MF $(DEPDIR)/cdo-Yearmonstat.Tpo -c -o cdo-Yearmonstat.obj `if test -f 'Yearmonstat.c'; then $(CYGPATH_W) 'Yearmonstat.c'; else $(CYGPATH_W) '$(srcdir)/Yearmonstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yearmonstat.Tpo $(DEPDIR)/cdo-Yearmonstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yearmonstat.c' object='cdo-Yearmonstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yearmonstat.obj `if test -f 'Yearmonstat.c'; then $(CYGPATH_W) 'Yearmonstat.c'; else $(CYGPATH_W) '$(srcdir)/Yearmonstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yearmonstat.obj `if test -f 'Yearmonstat.c'; then $(CYGPATH_W) 'Yearmonstat.c'; else $(CYGPATH_W) '$(srcdir)/Yearmonstat.c'; fi`
 
 cdo-Ydayarith.o: Ydayarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydayarith.o -MD -MP -MF $(DEPDIR)/cdo-Ydayarith.Tpo -c -o cdo-Ydayarith.o `test -f 'Ydayarith.c' || echo '$(srcdir)/'`Ydayarith.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydayarith.Tpo $(DEPDIR)/cdo-Ydayarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydayarith.c' object='cdo-Ydayarith.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydayarith.o -MD -MP -MF $(DEPDIR)/cdo-Ydayarith.Tpo -c -o cdo-Ydayarith.o `test -f 'Ydayarith.c' || echo '$(srcdir)/'`Ydayarith.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydayarith.Tpo $(DEPDIR)/cdo-Ydayarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydayarith.c' object='cdo-Ydayarith.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydayarith.o `test -f 'Ydayarith.c' || echo '$(srcdir)/'`Ydayarith.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydayarith.o `test -f 'Ydayarith.c' || echo '$(srcdir)/'`Ydayarith.c
 
 cdo-Ydayarith.obj: Ydayarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydayarith.obj -MD -MP -MF $(DEPDIR)/cdo-Ydayarith.Tpo -c -o cdo-Ydayarith.obj `if test -f 'Ydayarith.c'; then $(CYGPATH_W) 'Ydayarith.c'; else $(CYGPATH_W) '$(srcdir)/Ydayarith.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydayarith.Tpo $(DEPDIR)/cdo-Ydayarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydayarith.c' object='cdo-Ydayarith.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydayarith.obj -MD -MP -MF $(DEPDIR)/cdo-Ydayarith.Tpo -c -o cdo-Ydayarith.obj `if test -f 'Ydayarith.c'; then $(CYGPATH_W) 'Ydayarith.c'; else $(CYGPATH_W) '$(srcdir)/Ydayarith.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydayarith.Tpo $(DEPDIR)/cdo-Ydayarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydayarith.c' object='cdo-Ydayarith.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydayarith.obj `if test -f 'Ydayarith.c'; then $(CYGPATH_W) 'Ydayarith.c'; else $(CYGPATH_W) '$(srcdir)/Ydayarith.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydayarith.obj `if test -f 'Ydayarith.c'; then $(CYGPATH_W) 'Ydayarith.c'; else $(CYGPATH_W) '$(srcdir)/Ydayarith.c'; fi`
 
 cdo-Ydaypctl.o: Ydaypctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaypctl.o -MD -MP -MF $(DEPDIR)/cdo-Ydaypctl.Tpo -c -o cdo-Ydaypctl.o `test -f 'Ydaypctl.c' || echo '$(srcdir)/'`Ydaypctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydaypctl.Tpo $(DEPDIR)/cdo-Ydaypctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydaypctl.c' object='cdo-Ydaypctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaypctl.o -MD -MP -MF $(DEPDIR)/cdo-Ydaypctl.Tpo -c -o cdo-Ydaypctl.o `test -f 'Ydaypctl.c' || echo '$(srcdir)/'`Ydaypctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydaypctl.Tpo $(DEPDIR)/cdo-Ydaypctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydaypctl.c' object='cdo-Ydaypctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaypctl.o `test -f 'Ydaypctl.c' || echo '$(srcdir)/'`Ydaypctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaypctl.o `test -f 'Ydaypctl.c' || echo '$(srcdir)/'`Ydaypctl.c
 
 cdo-Ydaypctl.obj: Ydaypctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaypctl.obj -MD -MP -MF $(DEPDIR)/cdo-Ydaypctl.Tpo -c -o cdo-Ydaypctl.obj `if test -f 'Ydaypctl.c'; then $(CYGPATH_W) 'Ydaypctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydaypctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydaypctl.Tpo $(DEPDIR)/cdo-Ydaypctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydaypctl.c' object='cdo-Ydaypctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaypctl.obj -MD -MP -MF $(DEPDIR)/cdo-Ydaypctl.Tpo -c -o cdo-Ydaypctl.obj `if test -f 'Ydaypctl.c'; then $(CYGPATH_W) 'Ydaypctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydaypctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydaypctl.Tpo $(DEPDIR)/cdo-Ydaypctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydaypctl.c' object='cdo-Ydaypctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaypctl.obj `if test -f 'Ydaypctl.c'; then $(CYGPATH_W) 'Ydaypctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydaypctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaypctl.obj `if test -f 'Ydaypctl.c'; then $(CYGPATH_W) 'Ydaypctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydaypctl.c'; fi`
 
 cdo-Ydaystat.o: Ydaystat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaystat.o -MD -MP -MF $(DEPDIR)/cdo-Ydaystat.Tpo -c -o cdo-Ydaystat.o `test -f 'Ydaystat.c' || echo '$(srcdir)/'`Ydaystat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydaystat.Tpo $(DEPDIR)/cdo-Ydaystat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydaystat.c' object='cdo-Ydaystat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaystat.o -MD -MP -MF $(DEPDIR)/cdo-Ydaystat.Tpo -c -o cdo-Ydaystat.o `test -f 'Ydaystat.c' || echo '$(srcdir)/'`Ydaystat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydaystat.Tpo $(DEPDIR)/cdo-Ydaystat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydaystat.c' object='cdo-Ydaystat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaystat.o `test -f 'Ydaystat.c' || echo '$(srcdir)/'`Ydaystat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaystat.o `test -f 'Ydaystat.c' || echo '$(srcdir)/'`Ydaystat.c
 
 cdo-Ydaystat.obj: Ydaystat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaystat.obj -MD -MP -MF $(DEPDIR)/cdo-Ydaystat.Tpo -c -o cdo-Ydaystat.obj `if test -f 'Ydaystat.c'; then $(CYGPATH_W) 'Ydaystat.c'; else $(CYGPATH_W) '$(srcdir)/Ydaystat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydaystat.Tpo $(DEPDIR)/cdo-Ydaystat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydaystat.c' object='cdo-Ydaystat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydaystat.obj -MD -MP -MF $(DEPDIR)/cdo-Ydaystat.Tpo -c -o cdo-Ydaystat.obj `if test -f 'Ydaystat.c'; then $(CYGPATH_W) 'Ydaystat.c'; else $(CYGPATH_W) '$(srcdir)/Ydaystat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydaystat.Tpo $(DEPDIR)/cdo-Ydaystat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydaystat.c' object='cdo-Ydaystat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaystat.obj `if test -f 'Ydaystat.c'; then $(CYGPATH_W) 'Ydaystat.c'; else $(CYGPATH_W) '$(srcdir)/Ydaystat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydaystat.obj `if test -f 'Ydaystat.c'; then $(CYGPATH_W) 'Ydaystat.c'; else $(CYGPATH_W) '$(srcdir)/Ydaystat.c'; fi`
 
 cdo-Ydrunpctl.o: Ydrunpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunpctl.o -MD -MP -MF $(DEPDIR)/cdo-Ydrunpctl.Tpo -c -o cdo-Ydrunpctl.o `test -f 'Ydrunpctl.c' || echo '$(srcdir)/'`Ydrunpctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydrunpctl.Tpo $(DEPDIR)/cdo-Ydrunpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydrunpctl.c' object='cdo-Ydrunpctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunpctl.o -MD -MP -MF $(DEPDIR)/cdo-Ydrunpctl.Tpo -c -o cdo-Ydrunpctl.o `test -f 'Ydrunpctl.c' || echo '$(srcdir)/'`Ydrunpctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydrunpctl.Tpo $(DEPDIR)/cdo-Ydrunpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydrunpctl.c' object='cdo-Ydrunpctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunpctl.o `test -f 'Ydrunpctl.c' || echo '$(srcdir)/'`Ydrunpctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunpctl.o `test -f 'Ydrunpctl.c' || echo '$(srcdir)/'`Ydrunpctl.c
 
 cdo-Ydrunpctl.obj: Ydrunpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Ydrunpctl.Tpo -c -o cdo-Ydrunpctl.obj `if test -f 'Ydrunpctl.c'; then $(CYGPATH_W) 'Ydrunpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunpctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydrunpctl.Tpo $(DEPDIR)/cdo-Ydrunpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydrunpctl.c' object='cdo-Ydrunpctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Ydrunpctl.Tpo -c -o cdo-Ydrunpctl.obj `if test -f 'Ydrunpctl.c'; then $(CYGPATH_W) 'Ydrunpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunpctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydrunpctl.Tpo $(DEPDIR)/cdo-Ydrunpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydrunpctl.c' object='cdo-Ydrunpctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunpctl.obj `if test -f 'Ydrunpctl.c'; then $(CYGPATH_W) 'Ydrunpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunpctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunpctl.obj `if test -f 'Ydrunpctl.c'; then $(CYGPATH_W) 'Ydrunpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunpctl.c'; fi`
 
 cdo-Ydrunstat.o: Ydrunstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunstat.o -MD -MP -MF $(DEPDIR)/cdo-Ydrunstat.Tpo -c -o cdo-Ydrunstat.o `test -f 'Ydrunstat.c' || echo '$(srcdir)/'`Ydrunstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydrunstat.Tpo $(DEPDIR)/cdo-Ydrunstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydrunstat.c' object='cdo-Ydrunstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunstat.o -MD -MP -MF $(DEPDIR)/cdo-Ydrunstat.Tpo -c -o cdo-Ydrunstat.o `test -f 'Ydrunstat.c' || echo '$(srcdir)/'`Ydrunstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydrunstat.Tpo $(DEPDIR)/cdo-Ydrunstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydrunstat.c' object='cdo-Ydrunstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunstat.o `test -f 'Ydrunstat.c' || echo '$(srcdir)/'`Ydrunstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunstat.o `test -f 'Ydrunstat.c' || echo '$(srcdir)/'`Ydrunstat.c
 
 cdo-Ydrunstat.obj: Ydrunstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunstat.obj -MD -MP -MF $(DEPDIR)/cdo-Ydrunstat.Tpo -c -o cdo-Ydrunstat.obj `if test -f 'Ydrunstat.c'; then $(CYGPATH_W) 'Ydrunstat.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ydrunstat.Tpo $(DEPDIR)/cdo-Ydrunstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ydrunstat.c' object='cdo-Ydrunstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ydrunstat.obj -MD -MP -MF $(DEPDIR)/cdo-Ydrunstat.Tpo -c -o cdo-Ydrunstat.obj `if test -f 'Ydrunstat.c'; then $(CYGPATH_W) 'Ydrunstat.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ydrunstat.Tpo $(DEPDIR)/cdo-Ydrunstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ydrunstat.c' object='cdo-Ydrunstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunstat.obj `if test -f 'Ydrunstat.c'; then $(CYGPATH_W) 'Ydrunstat.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ydrunstat.obj `if test -f 'Ydrunstat.c'; then $(CYGPATH_W) 'Ydrunstat.c'; else $(CYGPATH_W) '$(srcdir)/Ydrunstat.c'; fi`
 
 cdo-Yhourarith.o: Yhourarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourarith.o -MD -MP -MF $(DEPDIR)/cdo-Yhourarith.Tpo -c -o cdo-Yhourarith.o `test -f 'Yhourarith.c' || echo '$(srcdir)/'`Yhourarith.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yhourarith.Tpo $(DEPDIR)/cdo-Yhourarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yhourarith.c' object='cdo-Yhourarith.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourarith.o -MD -MP -MF $(DEPDIR)/cdo-Yhourarith.Tpo -c -o cdo-Yhourarith.o `test -f 'Yhourarith.c' || echo '$(srcdir)/'`Yhourarith.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yhourarith.Tpo $(DEPDIR)/cdo-Yhourarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yhourarith.c' object='cdo-Yhourarith.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourarith.o `test -f 'Yhourarith.c' || echo '$(srcdir)/'`Yhourarith.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourarith.o `test -f 'Yhourarith.c' || echo '$(srcdir)/'`Yhourarith.c
 
 cdo-Yhourarith.obj: Yhourarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourarith.obj -MD -MP -MF $(DEPDIR)/cdo-Yhourarith.Tpo -c -o cdo-Yhourarith.obj `if test -f 'Yhourarith.c'; then $(CYGPATH_W) 'Yhourarith.c'; else $(CYGPATH_W) '$(srcdir)/Yhourarith.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yhourarith.Tpo $(DEPDIR)/cdo-Yhourarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yhourarith.c' object='cdo-Yhourarith.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourarith.obj -MD -MP -MF $(DEPDIR)/cdo-Yhourarith.Tpo -c -o cdo-Yhourarith.obj `if test -f 'Yhourarith.c'; then $(CYGPATH_W) 'Yhourarith.c'; else $(CYGPATH_W) '$(srcdir)/Yhourarith.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yhourarith.Tpo $(DEPDIR)/cdo-Yhourarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yhourarith.c' object='cdo-Yhourarith.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourarith.obj `if test -f 'Yhourarith.c'; then $(CYGPATH_W) 'Yhourarith.c'; else $(CYGPATH_W) '$(srcdir)/Yhourarith.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourarith.obj `if test -f 'Yhourarith.c'; then $(CYGPATH_W) 'Yhourarith.c'; else $(CYGPATH_W) '$(srcdir)/Yhourarith.c'; fi`
 
 cdo-Yhourstat.o: Yhourstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourstat.o -MD -MP -MF $(DEPDIR)/cdo-Yhourstat.Tpo -c -o cdo-Yhourstat.o `test -f 'Yhourstat.c' || echo '$(srcdir)/'`Yhourstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yhourstat.Tpo $(DEPDIR)/cdo-Yhourstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yhourstat.c' object='cdo-Yhourstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourstat.o -MD -MP -MF $(DEPDIR)/cdo-Yhourstat.Tpo -c -o cdo-Yhourstat.o `test -f 'Yhourstat.c' || echo '$(srcdir)/'`Yhourstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yhourstat.Tpo $(DEPDIR)/cdo-Yhourstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yhourstat.c' object='cdo-Yhourstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourstat.o `test -f 'Yhourstat.c' || echo '$(srcdir)/'`Yhourstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourstat.o `test -f 'Yhourstat.c' || echo '$(srcdir)/'`Yhourstat.c
 
 cdo-Yhourstat.obj: Yhourstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourstat.obj -MD -MP -MF $(DEPDIR)/cdo-Yhourstat.Tpo -c -o cdo-Yhourstat.obj `if test -f 'Yhourstat.c'; then $(CYGPATH_W) 'Yhourstat.c'; else $(CYGPATH_W) '$(srcdir)/Yhourstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yhourstat.Tpo $(DEPDIR)/cdo-Yhourstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yhourstat.c' object='cdo-Yhourstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yhourstat.obj -MD -MP -MF $(DEPDIR)/cdo-Yhourstat.Tpo -c -o cdo-Yhourstat.obj `if test -f 'Yhourstat.c'; then $(CYGPATH_W) 'Yhourstat.c'; else $(CYGPATH_W) '$(srcdir)/Yhourstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yhourstat.Tpo $(DEPDIR)/cdo-Yhourstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yhourstat.c' object='cdo-Yhourstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourstat.obj `if test -f 'Yhourstat.c'; then $(CYGPATH_W) 'Yhourstat.c'; else $(CYGPATH_W) '$(srcdir)/Yhourstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yhourstat.obj `if test -f 'Yhourstat.c'; then $(CYGPATH_W) 'Yhourstat.c'; else $(CYGPATH_W) '$(srcdir)/Yhourstat.c'; fi`
 
 cdo-Ymonarith.o: Ymonarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonarith.o -MD -MP -MF $(DEPDIR)/cdo-Ymonarith.Tpo -c -o cdo-Ymonarith.o `test -f 'Ymonarith.c' || echo '$(srcdir)/'`Ymonarith.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ymonarith.Tpo $(DEPDIR)/cdo-Ymonarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ymonarith.c' object='cdo-Ymonarith.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonarith.o -MD -MP -MF $(DEPDIR)/cdo-Ymonarith.Tpo -c -o cdo-Ymonarith.o `test -f 'Ymonarith.c' || echo '$(srcdir)/'`Ymonarith.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ymonarith.Tpo $(DEPDIR)/cdo-Ymonarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ymonarith.c' object='cdo-Ymonarith.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonarith.o `test -f 'Ymonarith.c' || echo '$(srcdir)/'`Ymonarith.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonarith.o `test -f 'Ymonarith.c' || echo '$(srcdir)/'`Ymonarith.c
 
 cdo-Ymonarith.obj: Ymonarith.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonarith.obj -MD -MP -MF $(DEPDIR)/cdo-Ymonarith.Tpo -c -o cdo-Ymonarith.obj `if test -f 'Ymonarith.c'; then $(CYGPATH_W) 'Ymonarith.c'; else $(CYGPATH_W) '$(srcdir)/Ymonarith.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ymonarith.Tpo $(DEPDIR)/cdo-Ymonarith.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ymonarith.c' object='cdo-Ymonarith.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonarith.obj -MD -MP -MF $(DEPDIR)/cdo-Ymonarith.Tpo -c -o cdo-Ymonarith.obj `if test -f 'Ymonarith.c'; then $(CYGPATH_W) 'Ymonarith.c'; else $(CYGPATH_W) '$(srcdir)/Ymonarith.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ymonarith.Tpo $(DEPDIR)/cdo-Ymonarith.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ymonarith.c' object='cdo-Ymonarith.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonarith.obj `if test -f 'Ymonarith.c'; then $(CYGPATH_W) 'Ymonarith.c'; else $(CYGPATH_W) '$(srcdir)/Ymonarith.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonarith.obj `if test -f 'Ymonarith.c'; then $(CYGPATH_W) 'Ymonarith.c'; else $(CYGPATH_W) '$(srcdir)/Ymonarith.c'; fi`
 
 cdo-Ymonpctl.o: Ymonpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonpctl.o -MD -MP -MF $(DEPDIR)/cdo-Ymonpctl.Tpo -c -o cdo-Ymonpctl.o `test -f 'Ymonpctl.c' || echo '$(srcdir)/'`Ymonpctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ymonpctl.Tpo $(DEPDIR)/cdo-Ymonpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ymonpctl.c' object='cdo-Ymonpctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonpctl.o -MD -MP -MF $(DEPDIR)/cdo-Ymonpctl.Tpo -c -o cdo-Ymonpctl.o `test -f 'Ymonpctl.c' || echo '$(srcdir)/'`Ymonpctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ymonpctl.Tpo $(DEPDIR)/cdo-Ymonpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ymonpctl.c' object='cdo-Ymonpctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonpctl.o `test -f 'Ymonpctl.c' || echo '$(srcdir)/'`Ymonpctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonpctl.o `test -f 'Ymonpctl.c' || echo '$(srcdir)/'`Ymonpctl.c
 
 cdo-Ymonpctl.obj: Ymonpctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Ymonpctl.Tpo -c -o cdo-Ymonpctl.obj `if test -f 'Ymonpctl.c'; then $(CYGPATH_W) 'Ymonpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ymonpctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ymonpctl.Tpo $(DEPDIR)/cdo-Ymonpctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ymonpctl.c' object='cdo-Ymonpctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonpctl.obj -MD -MP -MF $(DEPDIR)/cdo-Ymonpctl.Tpo -c -o cdo-Ymonpctl.obj `if test -f 'Ymonpctl.c'; then $(CYGPATH_W) 'Ymonpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ymonpctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ymonpctl.Tpo $(DEPDIR)/cdo-Ymonpctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ymonpctl.c' object='cdo-Ymonpctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonpctl.obj `if test -f 'Ymonpctl.c'; then $(CYGPATH_W) 'Ymonpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ymonpctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonpctl.obj `if test -f 'Ymonpctl.c'; then $(CYGPATH_W) 'Ymonpctl.c'; else $(CYGPATH_W) '$(srcdir)/Ymonpctl.c'; fi`
 
 cdo-Ymonstat.o: Ymonstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonstat.o -MD -MP -MF $(DEPDIR)/cdo-Ymonstat.Tpo -c -o cdo-Ymonstat.o `test -f 'Ymonstat.c' || echo '$(srcdir)/'`Ymonstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ymonstat.Tpo $(DEPDIR)/cdo-Ymonstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ymonstat.c' object='cdo-Ymonstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonstat.o -MD -MP -MF $(DEPDIR)/cdo-Ymonstat.Tpo -c -o cdo-Ymonstat.o `test -f 'Ymonstat.c' || echo '$(srcdir)/'`Ymonstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ymonstat.Tpo $(DEPDIR)/cdo-Ymonstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ymonstat.c' object='cdo-Ymonstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonstat.o `test -f 'Ymonstat.c' || echo '$(srcdir)/'`Ymonstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonstat.o `test -f 'Ymonstat.c' || echo '$(srcdir)/'`Ymonstat.c
 
 cdo-Ymonstat.obj: Ymonstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonstat.obj -MD -MP -MF $(DEPDIR)/cdo-Ymonstat.Tpo -c -o cdo-Ymonstat.obj `if test -f 'Ymonstat.c'; then $(CYGPATH_W) 'Ymonstat.c'; else $(CYGPATH_W) '$(srcdir)/Ymonstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Ymonstat.Tpo $(DEPDIR)/cdo-Ymonstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Ymonstat.c' object='cdo-Ymonstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Ymonstat.obj -MD -MP -MF $(DEPDIR)/cdo-Ymonstat.Tpo -c -o cdo-Ymonstat.obj `if test -f 'Ymonstat.c'; then $(CYGPATH_W) 'Ymonstat.c'; else $(CYGPATH_W) '$(srcdir)/Ymonstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Ymonstat.Tpo $(DEPDIR)/cdo-Ymonstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Ymonstat.c' object='cdo-Ymonstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonstat.obj `if test -f 'Ymonstat.c'; then $(CYGPATH_W) 'Ymonstat.c'; else $(CYGPATH_W) '$(srcdir)/Ymonstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Ymonstat.obj `if test -f 'Ymonstat.c'; then $(CYGPATH_W) 'Ymonstat.c'; else $(CYGPATH_W) '$(srcdir)/Ymonstat.c'; fi`
 
 cdo-Yseaspctl.o: Yseaspctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseaspctl.o -MD -MP -MF $(DEPDIR)/cdo-Yseaspctl.Tpo -c -o cdo-Yseaspctl.o `test -f 'Yseaspctl.c' || echo '$(srcdir)/'`Yseaspctl.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yseaspctl.Tpo $(DEPDIR)/cdo-Yseaspctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yseaspctl.c' object='cdo-Yseaspctl.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseaspctl.o -MD -MP -MF $(DEPDIR)/cdo-Yseaspctl.Tpo -c -o cdo-Yseaspctl.o `test -f 'Yseaspctl.c' || echo '$(srcdir)/'`Yseaspctl.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yseaspctl.Tpo $(DEPDIR)/cdo-Yseaspctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yseaspctl.c' object='cdo-Yseaspctl.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseaspctl.o `test -f 'Yseaspctl.c' || echo '$(srcdir)/'`Yseaspctl.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseaspctl.o `test -f 'Yseaspctl.c' || echo '$(srcdir)/'`Yseaspctl.c
 
 cdo-Yseaspctl.obj: Yseaspctl.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseaspctl.obj -MD -MP -MF $(DEPDIR)/cdo-Yseaspctl.Tpo -c -o cdo-Yseaspctl.obj `if test -f 'Yseaspctl.c'; then $(CYGPATH_W) 'Yseaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Yseaspctl.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yseaspctl.Tpo $(DEPDIR)/cdo-Yseaspctl.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yseaspctl.c' object='cdo-Yseaspctl.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseaspctl.obj -MD -MP -MF $(DEPDIR)/cdo-Yseaspctl.Tpo -c -o cdo-Yseaspctl.obj `if test -f 'Yseaspctl.c'; then $(CYGPATH_W) 'Yseaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Yseaspctl.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yseaspctl.Tpo $(DEPDIR)/cdo-Yseaspctl.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yseaspctl.c' object='cdo-Yseaspctl.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseaspctl.obj `if test -f 'Yseaspctl.c'; then $(CYGPATH_W) 'Yseaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Yseaspctl.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseaspctl.obj `if test -f 'Yseaspctl.c'; then $(CYGPATH_W) 'Yseaspctl.c'; else $(CYGPATH_W) '$(srcdir)/Yseaspctl.c'; fi`
 
 cdo-Yseasstat.o: Yseasstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseasstat.o -MD -MP -MF $(DEPDIR)/cdo-Yseasstat.Tpo -c -o cdo-Yseasstat.o `test -f 'Yseasstat.c' || echo '$(srcdir)/'`Yseasstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yseasstat.Tpo $(DEPDIR)/cdo-Yseasstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yseasstat.c' object='cdo-Yseasstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseasstat.o -MD -MP -MF $(DEPDIR)/cdo-Yseasstat.Tpo -c -o cdo-Yseasstat.o `test -f 'Yseasstat.c' || echo '$(srcdir)/'`Yseasstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yseasstat.Tpo $(DEPDIR)/cdo-Yseasstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yseasstat.c' object='cdo-Yseasstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseasstat.o `test -f 'Yseasstat.c' || echo '$(srcdir)/'`Yseasstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseasstat.o `test -f 'Yseasstat.c' || echo '$(srcdir)/'`Yseasstat.c
 
 cdo-Yseasstat.obj: Yseasstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseasstat.obj -MD -MP -MF $(DEPDIR)/cdo-Yseasstat.Tpo -c -o cdo-Yseasstat.obj `if test -f 'Yseasstat.c'; then $(CYGPATH_W) 'Yseasstat.c'; else $(CYGPATH_W) '$(srcdir)/Yseasstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Yseasstat.Tpo $(DEPDIR)/cdo-Yseasstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Yseasstat.c' object='cdo-Yseasstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Yseasstat.obj -MD -MP -MF $(DEPDIR)/cdo-Yseasstat.Tpo -c -o cdo-Yseasstat.obj `if test -f 'Yseasstat.c'; then $(CYGPATH_W) 'Yseasstat.c'; else $(CYGPATH_W) '$(srcdir)/Yseasstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Yseasstat.Tpo $(DEPDIR)/cdo-Yseasstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Yseasstat.c' object='cdo-Yseasstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseasstat.obj `if test -f 'Yseasstat.c'; then $(CYGPATH_W) 'Yseasstat.c'; else $(CYGPATH_W) '$(srcdir)/Yseasstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Yseasstat.obj `if test -f 'Yseasstat.c'; then $(CYGPATH_W) 'Yseasstat.c'; else $(CYGPATH_W) '$(srcdir)/Yseasstat.c'; fi`
 
 cdo-Zonstat.o: Zonstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Zonstat.o -MD -MP -MF $(DEPDIR)/cdo-Zonstat.Tpo -c -o cdo-Zonstat.o `test -f 'Zonstat.c' || echo '$(srcdir)/'`Zonstat.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Zonstat.Tpo $(DEPDIR)/cdo-Zonstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Zonstat.c' object='cdo-Zonstat.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Zonstat.o -MD -MP -MF $(DEPDIR)/cdo-Zonstat.Tpo -c -o cdo-Zonstat.o `test -f 'Zonstat.c' || echo '$(srcdir)/'`Zonstat.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Zonstat.Tpo $(DEPDIR)/cdo-Zonstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Zonstat.c' object='cdo-Zonstat.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Zonstat.o `test -f 'Zonstat.c' || echo '$(srcdir)/'`Zonstat.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Zonstat.o `test -f 'Zonstat.c' || echo '$(srcdir)/'`Zonstat.c
 
 cdo-Zonstat.obj: Zonstat.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Zonstat.obj -MD -MP -MF $(DEPDIR)/cdo-Zonstat.Tpo -c -o cdo-Zonstat.obj `if test -f 'Zonstat.c'; then $(CYGPATH_W) 'Zonstat.c'; else $(CYGPATH_W) '$(srcdir)/Zonstat.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Zonstat.Tpo $(DEPDIR)/cdo-Zonstat.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Zonstat.c' object='cdo-Zonstat.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Zonstat.obj -MD -MP -MF $(DEPDIR)/cdo-Zonstat.Tpo -c -o cdo-Zonstat.obj `if test -f 'Zonstat.c'; then $(CYGPATH_W) 'Zonstat.c'; else $(CYGPATH_W) '$(srcdir)/Zonstat.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Zonstat.Tpo $(DEPDIR)/cdo-Zonstat.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Zonstat.c' object='cdo-Zonstat.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Zonstat.obj `if test -f 'Zonstat.c'; then $(CYGPATH_W) 'Zonstat.c'; else $(CYGPATH_W) '$(srcdir)/Zonstat.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Zonstat.obj `if test -f 'Zonstat.c'; then $(CYGPATH_W) 'Zonstat.c'; else $(CYGPATH_W) '$(srcdir)/Zonstat.c'; fi`
 
 cdo-cdo_pthread.o: cdo_pthread.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_pthread.o -MD -MP -MF $(DEPDIR)/cdo-cdo_pthread.Tpo -c -o cdo-cdo_pthread.o `test -f 'cdo_pthread.c' || echo '$(srcdir)/'`cdo_pthread.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-cdo_pthread.Tpo $(DEPDIR)/cdo-cdo_pthread.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdo_pthread.c' object='cdo-cdo_pthread.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_pthread.o -MD -MP -MF $(DEPDIR)/cdo-cdo_pthread.Tpo -c -o cdo-cdo_pthread.o `test -f 'cdo_pthread.c' || echo '$(srcdir)/'`cdo_pthread.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo_pthread.Tpo $(DEPDIR)/cdo-cdo_pthread.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo_pthread.c' object='cdo-cdo_pthread.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_pthread.o `test -f 'cdo_pthread.c' || echo '$(srcdir)/'`cdo_pthread.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_pthread.o `test -f 'cdo_pthread.c' || echo '$(srcdir)/'`cdo_pthread.c
 
 cdo-cdo_pthread.obj: cdo_pthread.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_pthread.obj -MD -MP -MF $(DEPDIR)/cdo-cdo_pthread.Tpo -c -o cdo-cdo_pthread.obj `if test -f 'cdo_pthread.c'; then $(CYGPATH_W) 'cdo_pthread.c'; else $(CYGPATH_W) '$(srcdir)/cdo_pthread.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-cdo_pthread.Tpo $(DEPDIR)/cdo-cdo_pthread.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdo_pthread.c' object='cdo-cdo_pthread.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_pthread.obj -MD -MP -MF $(DEPDIR)/cdo-cdo_pthread.Tpo -c -o cdo-cdo_pthread.obj `if test -f 'cdo_pthread.c'; then $(CYGPATH_W) 'cdo_pthread.c'; else $(CYGPATH_W) '$(srcdir)/cdo_pthread.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo_pthread.Tpo $(DEPDIR)/cdo-cdo_pthread.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo_pthread.c' object='cdo-cdo_pthread.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_pthread.obj `if test -f 'cdo_pthread.c'; then $(CYGPATH_W) 'cdo_pthread.c'; else $(CYGPATH_W) '$(srcdir)/cdo_pthread.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_pthread.obj `if test -f 'cdo_pthread.c'; then $(CYGPATH_W) 'cdo_pthread.c'; else $(CYGPATH_W) '$(srcdir)/cdo_pthread.c'; fi`
 
 cdo-cdo_vlist.o: cdo_vlist.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_vlist.o -MD -MP -MF $(DEPDIR)/cdo-cdo_vlist.Tpo -c -o cdo-cdo_vlist.o `test -f 'cdo_vlist.c' || echo '$(srcdir)/'`cdo_vlist.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-cdo_vlist.Tpo $(DEPDIR)/cdo-cdo_vlist.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdo_vlist.c' object='cdo-cdo_vlist.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_vlist.o -MD -MP -MF $(DEPDIR)/cdo-cdo_vlist.Tpo -c -o cdo-cdo_vlist.o `test -f 'cdo_vlist.c' || echo '$(srcdir)/'`cdo_vlist.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo_vlist.Tpo $(DEPDIR)/cdo-cdo_vlist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo_vlist.c' object='cdo-cdo_vlist.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_vlist.o `test -f 'cdo_vlist.c' || echo '$(srcdir)/'`cdo_vlist.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_vlist.o `test -f 'cdo_vlist.c' || echo '$(srcdir)/'`cdo_vlist.c
 
 cdo-cdo_vlist.obj: cdo_vlist.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_vlist.obj -MD -MP -MF $(DEPDIR)/cdo-cdo_vlist.Tpo -c -o cdo-cdo_vlist.obj `if test -f 'cdo_vlist.c'; then $(CYGPATH_W) 'cdo_vlist.c'; else $(CYGPATH_W) '$(srcdir)/cdo_vlist.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-cdo_vlist.Tpo $(DEPDIR)/cdo-cdo_vlist.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdo_vlist.c' object='cdo-cdo_vlist.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_vlist.obj -MD -MP -MF $(DEPDIR)/cdo-cdo_vlist.Tpo -c -o cdo-cdo_vlist.obj `if test -f 'cdo_vlist.c'; then $(CYGPATH_W) 'cdo_vlist.c'; else $(CYGPATH_W) '$(srcdir)/cdo_vlist.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo_vlist.Tpo $(DEPDIR)/cdo-cdo_vlist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo_vlist.c' object='cdo-cdo_vlist.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_vlist.obj `if test -f 'cdo_vlist.c'; then $(CYGPATH_W) 'cdo_vlist.c'; else $(CYGPATH_W) '$(srcdir)/cdo_vlist.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_vlist.obj `if test -f 'cdo_vlist.c'; then $(CYGPATH_W) 'cdo_vlist.c'; else $(CYGPATH_W) '$(srcdir)/cdo_vlist.c'; fi`
+
+cdo-cdo_getopt.o: cdo_getopt.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_getopt.o -MD -MP -MF $(DEPDIR)/cdo-cdo_getopt.Tpo -c -o cdo-cdo_getopt.o `test -f 'cdo_getopt.c' || echo '$(srcdir)/'`cdo_getopt.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo_getopt.Tpo $(DEPDIR)/cdo-cdo_getopt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo_getopt.c' object='cdo-cdo_getopt.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_getopt.o `test -f 'cdo_getopt.c' || echo '$(srcdir)/'`cdo_getopt.c
+
+cdo-cdo_getopt.obj: cdo_getopt.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-cdo_getopt.obj -MD -MP -MF $(DEPDIR)/cdo-cdo_getopt.Tpo -c -o cdo-cdo_getopt.obj `if test -f 'cdo_getopt.c'; then $(CYGPATH_W) 'cdo_getopt.c'; else $(CYGPATH_W) '$(srcdir)/cdo_getopt.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-cdo_getopt.Tpo $(DEPDIR)/cdo-cdo_getopt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdo_getopt.c' object='cdo-cdo_getopt.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-cdo_getopt.obj `if test -f 'cdo_getopt.c'; then $(CYGPATH_W) 'cdo_getopt.c'; else $(CYGPATH_W) '$(srcdir)/cdo_getopt.c'; fi`
 
 cdo-color.o: color.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-color.o -MD -MP -MF $(DEPDIR)/cdo-color.Tpo -c -o cdo-color.o `test -f 'color.c' || echo '$(srcdir)/'`color.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-color.Tpo $(DEPDIR)/cdo-color.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='color.c' object='cdo-color.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-color.o -MD -MP -MF $(DEPDIR)/cdo-color.Tpo -c -o cdo-color.o `test -f 'color.c' || echo '$(srcdir)/'`color.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-color.Tpo $(DEPDIR)/cdo-color.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='color.c' object='cdo-color.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-color.o `test -f 'color.c' || echo '$(srcdir)/'`color.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-color.o `test -f 'color.c' || echo '$(srcdir)/'`color.c
 
 cdo-color.obj: color.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-color.obj -MD -MP -MF $(DEPDIR)/cdo-color.Tpo -c -o cdo-color.obj `if test -f 'color.c'; then $(CYGPATH_W) 'color.c'; else $(CYGPATH_W) '$(srcdir)/color.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-color.Tpo $(DEPDIR)/cdo-color.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='color.c' object='cdo-color.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-color.obj -MD -MP -MF $(DEPDIR)/cdo-color.Tpo -c -o cdo-color.obj `if test -f 'color.c'; then $(CYGPATH_W) 'color.c'; else $(CYGPATH_W) '$(srcdir)/color.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-color.Tpo $(DEPDIR)/cdo-color.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='color.c' object='cdo-color.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-color.obj `if test -f 'color.c'; then $(CYGPATH_W) 'color.c'; else $(CYGPATH_W) '$(srcdir)/color.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-color.obj `if test -f 'color.c'; then $(CYGPATH_W) 'color.c'; else $(CYGPATH_W) '$(srcdir)/color.c'; fi`
 
 cdo-commandline.o: commandline.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-commandline.o -MD -MP -MF $(DEPDIR)/cdo-commandline.Tpo -c -o cdo-commandline.o `test -f 'commandline.c' || echo '$(srcdir)/'`commandline.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-commandline.Tpo $(DEPDIR)/cdo-commandline.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='commandline.c' object='cdo-commandline.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-commandline.o -MD -MP -MF $(DEPDIR)/cdo-commandline.Tpo -c -o cdo-commandline.o `test -f 'commandline.c' || echo '$(srcdir)/'`commandline.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-commandline.Tpo $(DEPDIR)/cdo-commandline.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='commandline.c' object='cdo-commandline.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-commandline.o `test -f 'commandline.c' || echo '$(srcdir)/'`commandline.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-commandline.o `test -f 'commandline.c' || echo '$(srcdir)/'`commandline.c
 
 cdo-commandline.obj: commandline.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-commandline.obj -MD -MP -MF $(DEPDIR)/cdo-commandline.Tpo -c -o cdo-commandline.obj `if test -f 'commandline.c'; then $(CYGPATH_W) 'commandline.c'; else $(CYGPATH_W) '$(srcdir)/commandline.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-commandline.Tpo $(DEPDIR)/cdo-commandline.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='commandline.c' object='cdo-commandline.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-commandline.obj -MD -MP -MF $(DEPDIR)/cdo-commandline.Tpo -c -o cdo-commandline.obj `if test -f 'commandline.c'; then $(CYGPATH_W) 'commandline.c'; else $(CYGPATH_W) '$(srcdir)/commandline.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-commandline.Tpo $(DEPDIR)/cdo-commandline.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='commandline.c' object='cdo-commandline.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-commandline.obj `if test -f 'commandline.c'; then $(CYGPATH_W) 'commandline.c'; else $(CYGPATH_W) '$(srcdir)/commandline.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-commandline.obj `if test -f 'commandline.c'; then $(CYGPATH_W) 'commandline.c'; else $(CYGPATH_W) '$(srcdir)/commandline.c'; fi`
 
 cdo-ecacore.o: ecacore.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecacore.o -MD -MP -MF $(DEPDIR)/cdo-ecacore.Tpo -c -o cdo-ecacore.o `test -f 'ecacore.c' || echo '$(srcdir)/'`ecacore.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-ecacore.Tpo $(DEPDIR)/cdo-ecacore.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ecacore.c' object='cdo-ecacore.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecacore.o -MD -MP -MF $(DEPDIR)/cdo-ecacore.Tpo -c -o cdo-ecacore.o `test -f 'ecacore.c' || echo '$(srcdir)/'`ecacore.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-ecacore.Tpo $(DEPDIR)/cdo-ecacore.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ecacore.c' object='cdo-ecacore.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecacore.o `test -f 'ecacore.c' || echo '$(srcdir)/'`ecacore.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecacore.o `test -f 'ecacore.c' || echo '$(srcdir)/'`ecacore.c
 
 cdo-ecacore.obj: ecacore.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecacore.obj -MD -MP -MF $(DEPDIR)/cdo-ecacore.Tpo -c -o cdo-ecacore.obj `if test -f 'ecacore.c'; then $(CYGPATH_W) 'ecacore.c'; else $(CYGPATH_W) '$(srcdir)/ecacore.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-ecacore.Tpo $(DEPDIR)/cdo-ecacore.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ecacore.c' object='cdo-ecacore.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecacore.obj -MD -MP -MF $(DEPDIR)/cdo-ecacore.Tpo -c -o cdo-ecacore.obj `if test -f 'ecacore.c'; then $(CYGPATH_W) 'ecacore.c'; else $(CYGPATH_W) '$(srcdir)/ecacore.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-ecacore.Tpo $(DEPDIR)/cdo-ecacore.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ecacore.c' object='cdo-ecacore.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecacore.obj `if test -f 'ecacore.c'; then $(CYGPATH_W) 'ecacore.c'; else $(CYGPATH_W) '$(srcdir)/ecacore.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecacore.obj `if test -f 'ecacore.c'; then $(CYGPATH_W) 'ecacore.c'; else $(CYGPATH_W) '$(srcdir)/ecacore.c'; fi`
 
 cdo-ecautil.o: ecautil.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecautil.o -MD -MP -MF $(DEPDIR)/cdo-ecautil.Tpo -c -o cdo-ecautil.o `test -f 'ecautil.c' || echo '$(srcdir)/'`ecautil.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-ecautil.Tpo $(DEPDIR)/cdo-ecautil.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ecautil.c' object='cdo-ecautil.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecautil.o -MD -MP -MF $(DEPDIR)/cdo-ecautil.Tpo -c -o cdo-ecautil.o `test -f 'ecautil.c' || echo '$(srcdir)/'`ecautil.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-ecautil.Tpo $(DEPDIR)/cdo-ecautil.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ecautil.c' object='cdo-ecautil.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecautil.o `test -f 'ecautil.c' || echo '$(srcdir)/'`ecautil.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecautil.o `test -f 'ecautil.c' || echo '$(srcdir)/'`ecautil.c
 
 cdo-ecautil.obj: ecautil.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecautil.obj -MD -MP -MF $(DEPDIR)/cdo-ecautil.Tpo -c -o cdo-ecautil.obj `if test -f 'ecautil.c'; then $(CYGPATH_W) 'ecautil.c'; else $(CYGPATH_W) '$(srcdir)/ecautil.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-ecautil.Tpo $(DEPDIR)/cdo-ecautil.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ecautil.c' object='cdo-ecautil.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ecautil.obj -MD -MP -MF $(DEPDIR)/cdo-ecautil.Tpo -c -o cdo-ecautil.obj `if test -f 'ecautil.c'; then $(CYGPATH_W) 'ecautil.c'; else $(CYGPATH_W) '$(srcdir)/ecautil.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-ecautil.Tpo $(DEPDIR)/cdo-ecautil.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ecautil.c' object='cdo-ecautil.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecautil.obj `if test -f 'ecautil.c'; then $(CYGPATH_W) 'ecautil.c'; else $(CYGPATH_W) '$(srcdir)/ecautil.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ecautil.obj `if test -f 'ecautil.c'; then $(CYGPATH_W) 'ecautil.c'; else $(CYGPATH_W) '$(srcdir)/ecautil.c'; fi`
 
 cdo-exception.o: exception.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-exception.o -MD -MP -MF $(DEPDIR)/cdo-exception.Tpo -c -o cdo-exception.o `test -f 'exception.c' || echo '$(srcdir)/'`exception.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-exception.Tpo $(DEPDIR)/cdo-exception.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='exception.c' object='cdo-exception.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-exception.o -MD -MP -MF $(DEPDIR)/cdo-exception.Tpo -c -o cdo-exception.o `test -f 'exception.c' || echo '$(srcdir)/'`exception.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-exception.Tpo $(DEPDIR)/cdo-exception.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='exception.c' object='cdo-exception.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-exception.o `test -f 'exception.c' || echo '$(srcdir)/'`exception.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-exception.o `test -f 'exception.c' || echo '$(srcdir)/'`exception.c
 
 cdo-exception.obj: exception.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-exception.obj -MD -MP -MF $(DEPDIR)/cdo-exception.Tpo -c -o cdo-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-exception.Tpo $(DEPDIR)/cdo-exception.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='exception.c' object='cdo-exception.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-exception.obj -MD -MP -MF $(DEPDIR)/cdo-exception.Tpo -c -o cdo-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-exception.Tpo $(DEPDIR)/cdo-exception.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='exception.c' object='cdo-exception.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
 
 cdo-expr.o: expr.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr.o -MD -MP -MF $(DEPDIR)/cdo-expr.Tpo -c -o cdo-expr.o `test -f 'expr.c' || echo '$(srcdir)/'`expr.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-expr.Tpo $(DEPDIR)/cdo-expr.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expr.c' object='cdo-expr.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr.o -MD -MP -MF $(DEPDIR)/cdo-expr.Tpo -c -o cdo-expr.o `test -f 'expr.c' || echo '$(srcdir)/'`expr.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-expr.Tpo $(DEPDIR)/cdo-expr.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='expr.c' object='cdo-expr.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr.o `test -f 'expr.c' || echo '$(srcdir)/'`expr.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr.o `test -f 'expr.c' || echo '$(srcdir)/'`expr.c
 
 cdo-expr.obj: expr.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr.obj -MD -MP -MF $(DEPDIR)/cdo-expr.Tpo -c -o cdo-expr.obj `if test -f 'expr.c'; then $(CYGPATH_W) 'expr.c'; else $(CYGPATH_W) '$(srcdir)/expr.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-expr.Tpo $(DEPDIR)/cdo-expr.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expr.c' object='cdo-expr.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr.obj -MD -MP -MF $(DEPDIR)/cdo-expr.Tpo -c -o cdo-expr.obj `if test -f 'expr.c'; then $(CYGPATH_W) 'expr.c'; else $(CYGPATH_W) '$(srcdir)/expr.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-expr.Tpo $(DEPDIR)/cdo-expr.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='expr.c' object='cdo-expr.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr.obj `if test -f 'expr.c'; then $(CYGPATH_W) 'expr.c'; else $(CYGPATH_W) '$(srcdir)/expr.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr.obj `if test -f 'expr.c'; then $(CYGPATH_W) 'expr.c'; else $(CYGPATH_W) '$(srcdir)/expr.c'; fi`
 
 cdo-expr_lex.o: expr_lex.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_lex.o -MD -MP -MF $(DEPDIR)/cdo-expr_lex.Tpo -c -o cdo-expr_lex.o `test -f 'expr_lex.c' || echo '$(srcdir)/'`expr_lex.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-expr_lex.Tpo $(DEPDIR)/cdo-expr_lex.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expr_lex.c' object='cdo-expr_lex.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_lex.o -MD -MP -MF $(DEPDIR)/cdo-expr_lex.Tpo -c -o cdo-expr_lex.o `test -f 'expr_lex.c' || echo '$(srcdir)/'`expr_lex.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-expr_lex.Tpo $(DEPDIR)/cdo-expr_lex.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='expr_lex.c' object='cdo-expr_lex.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_lex.o `test -f 'expr_lex.c' || echo '$(srcdir)/'`expr_lex.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_lex.o `test -f 'expr_lex.c' || echo '$(srcdir)/'`expr_lex.c
 
 cdo-expr_lex.obj: expr_lex.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_lex.obj -MD -MP -MF $(DEPDIR)/cdo-expr_lex.Tpo -c -o cdo-expr_lex.obj `if test -f 'expr_lex.c'; then $(CYGPATH_W) 'expr_lex.c'; else $(CYGPATH_W) '$(srcdir)/expr_lex.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-expr_lex.Tpo $(DEPDIR)/cdo-expr_lex.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expr_lex.c' object='cdo-expr_lex.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_lex.obj -MD -MP -MF $(DEPDIR)/cdo-expr_lex.Tpo -c -o cdo-expr_lex.obj `if test -f 'expr_lex.c'; then $(CYGPATH_W) 'expr_lex.c'; else $(CYGPATH_W) '$(srcdir)/expr_lex.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-expr_lex.Tpo $(DEPDIR)/cdo-expr_lex.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='expr_lex.c' object='cdo-expr_lex.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_lex.obj `if test -f 'expr_lex.c'; then $(CYGPATH_W) 'expr_lex.c'; else $(CYGPATH_W) '$(srcdir)/expr_lex.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_lex.obj `if test -f 'expr_lex.c'; then $(CYGPATH_W) 'expr_lex.c'; else $(CYGPATH_W) '$(srcdir)/expr_lex.c'; fi`
 
 cdo-expr_yacc.o: expr_yacc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_yacc.o -MD -MP -MF $(DEPDIR)/cdo-expr_yacc.Tpo -c -o cdo-expr_yacc.o `test -f 'expr_yacc.c' || echo '$(srcdir)/'`expr_yacc.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-expr_yacc.Tpo $(DEPDIR)/cdo-expr_yacc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expr_yacc.c' object='cdo-expr_yacc.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_yacc.o -MD -MP -MF $(DEPDIR)/cdo-expr_yacc.Tpo -c -o cdo-expr_yacc.o `test -f 'expr_yacc.c' || echo '$(srcdir)/'`expr_yacc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-expr_yacc.Tpo $(DEPDIR)/cdo-expr_yacc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='expr_yacc.c' object='cdo-expr_yacc.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_yacc.o `test -f 'expr_yacc.c' || echo '$(srcdir)/'`expr_yacc.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_yacc.o `test -f 'expr_yacc.c' || echo '$(srcdir)/'`expr_yacc.c
 
 cdo-expr_yacc.obj: expr_yacc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_yacc.obj -MD -MP -MF $(DEPDIR)/cdo-expr_yacc.Tpo -c -o cdo-expr_yacc.obj `if test -f 'expr_yacc.c'; then $(CYGPATH_W) 'expr_yacc.c'; else $(CYGPATH_W) '$(srcdir)/expr_yacc.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-expr_yacc.Tpo $(DEPDIR)/cdo-expr_yacc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expr_yacc.c' object='cdo-expr_yacc.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-expr_yacc.obj -MD -MP -MF $(DEPDIR)/cdo-expr_yacc.Tpo -c -o cdo-expr_yacc.obj `if test -f 'expr_yacc.c'; then $(CYGPATH_W) 'expr_yacc.c'; else $(CYGPATH_W) '$(srcdir)/expr_yacc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-expr_yacc.Tpo $(DEPDIR)/cdo-expr_yacc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='expr_yacc.c' object='cdo-expr_yacc.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_yacc.obj `if test -f 'expr_yacc.c'; then $(CYGPATH_W) 'expr_yacc.c'; else $(CYGPATH_W) '$(srcdir)/expr_yacc.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-expr_yacc.obj `if test -f 'expr_yacc.c'; then $(CYGPATH_W) 'expr_yacc.c'; else $(CYGPATH_W) '$(srcdir)/expr_yacc.c'; fi`
 
 cdo-features.o: features.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-features.o -MD -MP -MF $(DEPDIR)/cdo-features.Tpo -c -o cdo-features.o `test -f 'features.c' || echo '$(srcdir)/'`features.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-features.Tpo $(DEPDIR)/cdo-features.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='features.c' object='cdo-features.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-features.o -MD -MP -MF $(DEPDIR)/cdo-features.Tpo -c -o cdo-features.o `test -f 'features.c' || echo '$(srcdir)/'`features.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-features.Tpo $(DEPDIR)/cdo-features.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='features.c' object='cdo-features.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-features.o `test -f 'features.c' || echo '$(srcdir)/'`features.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-features.o `test -f 'features.c' || echo '$(srcdir)/'`features.c
 
 cdo-features.obj: features.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-features.obj -MD -MP -MF $(DEPDIR)/cdo-features.Tpo -c -o cdo-features.obj `if test -f 'features.c'; then $(CYGPATH_W) 'features.c'; else $(CYGPATH_W) '$(srcdir)/features.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-features.Tpo $(DEPDIR)/cdo-features.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='features.c' object='cdo-features.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-features.obj -MD -MP -MF $(DEPDIR)/cdo-features.Tpo -c -o cdo-features.obj `if test -f 'features.c'; then $(CYGPATH_W) 'features.c'; else $(CYGPATH_W) '$(srcdir)/features.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-features.Tpo $(DEPDIR)/cdo-features.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='features.c' object='cdo-features.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-features.obj `if test -f 'features.c'; then $(CYGPATH_W) 'features.c'; else $(CYGPATH_W) '$(srcdir)/features.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-features.obj `if test -f 'features.c'; then $(CYGPATH_W) 'features.c'; else $(CYGPATH_W) '$(srcdir)/features.c'; fi`
 
 cdo-field.o: field.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field.o -MD -MP -MF $(DEPDIR)/cdo-field.Tpo -c -o cdo-field.o `test -f 'field.c' || echo '$(srcdir)/'`field.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-field.Tpo $(DEPDIR)/cdo-field.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='field.c' object='cdo-field.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field.o -MD -MP -MF $(DEPDIR)/cdo-field.Tpo -c -o cdo-field.o `test -f 'field.c' || echo '$(srcdir)/'`field.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-field.Tpo $(DEPDIR)/cdo-field.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='field.c' object='cdo-field.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field.o `test -f 'field.c' || echo '$(srcdir)/'`field.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field.o `test -f 'field.c' || echo '$(srcdir)/'`field.c
 
 cdo-field.obj: field.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field.obj -MD -MP -MF $(DEPDIR)/cdo-field.Tpo -c -o cdo-field.obj `if test -f 'field.c'; then $(CYGPATH_W) 'field.c'; else $(CYGPATH_W) '$(srcdir)/field.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-field.Tpo $(DEPDIR)/cdo-field.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='field.c' object='cdo-field.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field.obj -MD -MP -MF $(DEPDIR)/cdo-field.Tpo -c -o cdo-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)/cdo-field.Tpo $(DEPDIR)/cdo-field.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='field.c' object='cdo-field.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field.obj `if test -f 'field.c'; then $(CYGPATH_W) 'field.c'; else $(CYGPATH_W) '$(srcdir)/field.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field.obj `if test -f 'field.c'; then $(CYGPATH_W) 'field.c'; else $(CYGPATH_W) '$(srcdir)/field.c'; fi`
 
 cdo-field2.o: field2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field2.o -MD -MP -MF $(DEPDIR)/cdo-field2.Tpo -c -o cdo-field2.o `test -f 'field2.c' || echo '$(srcdir)/'`field2.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-field2.Tpo $(DEPDIR)/cdo-field2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='field2.c' object='cdo-field2.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field2.o -MD -MP -MF $(DEPDIR)/cdo-field2.Tpo -c -o cdo-field2.o `test -f 'field2.c' || echo '$(srcdir)/'`field2.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-field2.Tpo $(DEPDIR)/cdo-field2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='field2.c' object='cdo-field2.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field2.o `test -f 'field2.c' || echo '$(srcdir)/'`field2.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field2.o `test -f 'field2.c' || echo '$(srcdir)/'`field2.c
 
 cdo-field2.obj: field2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field2.obj -MD -MP -MF $(DEPDIR)/cdo-field2.Tpo -c -o cdo-field2.obj `if test -f 'field2.c'; then $(CYGPATH_W) 'field2.c'; else $(CYGPATH_W) '$(srcdir)/field2.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-field2.Tpo $(DEPDIR)/cdo-field2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='field2.c' object='cdo-field2.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-field2.obj -MD -MP -MF $(DEPDIR)/cdo-field2.Tpo -c -o cdo-field2.obj `if test -f 'field2.c'; then $(CYGPATH_W) 'field2.c'; else $(CYGPATH_W) '$(srcdir)/field2.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-field2.Tpo $(DEPDIR)/cdo-field2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='field2.c' object='cdo-field2.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field2.obj `if test -f 'field2.c'; then $(CYGPATH_W) 'field2.c'; else $(CYGPATH_W) '$(srcdir)/field2.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-field2.obj `if test -f 'field2.c'; then $(CYGPATH_W) 'field2.c'; else $(CYGPATH_W) '$(srcdir)/field2.c'; fi`
 
 cdo-fieldc.o: fieldc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldc.o -MD -MP -MF $(DEPDIR)/cdo-fieldc.Tpo -c -o cdo-fieldc.o `test -f 'fieldc.c' || echo '$(srcdir)/'`fieldc.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldc.Tpo $(DEPDIR)/cdo-fieldc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldc.c' object='cdo-fieldc.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldc.o -MD -MP -MF $(DEPDIR)/cdo-fieldc.Tpo -c -o cdo-fieldc.o `test -f 'fieldc.c' || echo '$(srcdir)/'`fieldc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldc.Tpo $(DEPDIR)/cdo-fieldc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldc.c' object='cdo-fieldc.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldc.o `test -f 'fieldc.c' || echo '$(srcdir)/'`fieldc.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldc.o `test -f 'fieldc.c' || echo '$(srcdir)/'`fieldc.c
 
 cdo-fieldc.obj: fieldc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldc.obj -MD -MP -MF $(DEPDIR)/cdo-fieldc.Tpo -c -o cdo-fieldc.obj `if test -f 'fieldc.c'; then $(CYGPATH_W) 'fieldc.c'; else $(CYGPATH_W) '$(srcdir)/fieldc.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldc.Tpo $(DEPDIR)/cdo-fieldc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldc.c' object='cdo-fieldc.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldc.obj -MD -MP -MF $(DEPDIR)/cdo-fieldc.Tpo -c -o cdo-fieldc.obj `if test -f 'fieldc.c'; then $(CYGPATH_W) 'fieldc.c'; else $(CYGPATH_W) '$(srcdir)/fieldc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldc.Tpo $(DEPDIR)/cdo-fieldc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldc.c' object='cdo-fieldc.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldc.obj `if test -f 'fieldc.c'; then $(CYGPATH_W) 'fieldc.c'; else $(CYGPATH_W) '$(srcdir)/fieldc.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldc.obj `if test -f 'fieldc.c'; then $(CYGPATH_W) 'fieldc.c'; else $(CYGPATH_W) '$(srcdir)/fieldc.c'; fi`
 
 cdo-fieldmem.o: fieldmem.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmem.o -MD -MP -MF $(DEPDIR)/cdo-fieldmem.Tpo -c -o cdo-fieldmem.o `test -f 'fieldmem.c' || echo '$(srcdir)/'`fieldmem.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldmem.Tpo $(DEPDIR)/cdo-fieldmem.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldmem.c' object='cdo-fieldmem.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmem.o -MD -MP -MF $(DEPDIR)/cdo-fieldmem.Tpo -c -o cdo-fieldmem.o `test -f 'fieldmem.c' || echo '$(srcdir)/'`fieldmem.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldmem.Tpo $(DEPDIR)/cdo-fieldmem.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldmem.c' object='cdo-fieldmem.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmem.o `test -f 'fieldmem.c' || echo '$(srcdir)/'`fieldmem.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmem.o `test -f 'fieldmem.c' || echo '$(srcdir)/'`fieldmem.c
 
 cdo-fieldmem.obj: fieldmem.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmem.obj -MD -MP -MF $(DEPDIR)/cdo-fieldmem.Tpo -c -o cdo-fieldmem.obj `if test -f 'fieldmem.c'; then $(CYGPATH_W) 'fieldmem.c'; else $(CYGPATH_W) '$(srcdir)/fieldmem.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldmem.Tpo $(DEPDIR)/cdo-fieldmem.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldmem.c' object='cdo-fieldmem.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmem.obj -MD -MP -MF $(DEPDIR)/cdo-fieldmem.Tpo -c -o cdo-fieldmem.obj `if test -f 'fieldmem.c'; then $(CYGPATH_W) 'fieldmem.c'; else $(CYGPATH_W) '$(srcdir)/fieldmem.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldmem.Tpo $(DEPDIR)/cdo-fieldmem.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldmem.c' object='cdo-fieldmem.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmem.obj `if test -f 'fieldmem.c'; then $(CYGPATH_W) 'fieldmem.c'; else $(CYGPATH_W) '$(srcdir)/fieldmem.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmem.obj `if test -f 'fieldmem.c'; then $(CYGPATH_W) 'fieldmem.c'; else $(CYGPATH_W) '$(srcdir)/fieldmem.c'; fi`
 
 cdo-fieldmer.o: fieldmer.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmer.o -MD -MP -MF $(DEPDIR)/cdo-fieldmer.Tpo -c -o cdo-fieldmer.o `test -f 'fieldmer.c' || echo '$(srcdir)/'`fieldmer.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldmer.Tpo $(DEPDIR)/cdo-fieldmer.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldmer.c' object='cdo-fieldmer.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmer.o -MD -MP -MF $(DEPDIR)/cdo-fieldmer.Tpo -c -o cdo-fieldmer.o `test -f 'fieldmer.c' || echo '$(srcdir)/'`fieldmer.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldmer.Tpo $(DEPDIR)/cdo-fieldmer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldmer.c' object='cdo-fieldmer.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmer.o `test -f 'fieldmer.c' || echo '$(srcdir)/'`fieldmer.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmer.o `test -f 'fieldmer.c' || echo '$(srcdir)/'`fieldmer.c
 
 cdo-fieldmer.obj: fieldmer.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmer.obj -MD -MP -MF $(DEPDIR)/cdo-fieldmer.Tpo -c -o cdo-fieldmer.obj `if test -f 'fieldmer.c'; then $(CYGPATH_W) 'fieldmer.c'; else $(CYGPATH_W) '$(srcdir)/fieldmer.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldmer.Tpo $(DEPDIR)/cdo-fieldmer.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldmer.c' object='cdo-fieldmer.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldmer.obj -MD -MP -MF $(DEPDIR)/cdo-fieldmer.Tpo -c -o cdo-fieldmer.obj `if test -f 'fieldmer.c'; then $(CYGPATH_W) 'fieldmer.c'; else $(CYGPATH_W) '$(srcdir)/fieldmer.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldmer.Tpo $(DEPDIR)/cdo-fieldmer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldmer.c' object='cdo-fieldmer.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmer.obj `if test -f 'fieldmer.c'; then $(CYGPATH_W) 'fieldmer.c'; else $(CYGPATH_W) '$(srcdir)/fieldmer.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldmer.obj `if test -f 'fieldmer.c'; then $(CYGPATH_W) 'fieldmer.c'; else $(CYGPATH_W) '$(srcdir)/fieldmer.c'; fi`
 
 cdo-fieldzon.o: fieldzon.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldzon.o -MD -MP -MF $(DEPDIR)/cdo-fieldzon.Tpo -c -o cdo-fieldzon.o `test -f 'fieldzon.c' || echo '$(srcdir)/'`fieldzon.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldzon.Tpo $(DEPDIR)/cdo-fieldzon.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldzon.c' object='cdo-fieldzon.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldzon.o -MD -MP -MF $(DEPDIR)/cdo-fieldzon.Tpo -c -o cdo-fieldzon.o `test -f 'fieldzon.c' || echo '$(srcdir)/'`fieldzon.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldzon.Tpo $(DEPDIR)/cdo-fieldzon.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldzon.c' object='cdo-fieldzon.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldzon.o `test -f 'fieldzon.c' || echo '$(srcdir)/'`fieldzon.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldzon.o `test -f 'fieldzon.c' || echo '$(srcdir)/'`fieldzon.c
 
 cdo-fieldzon.obj: fieldzon.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldzon.obj -MD -MP -MF $(DEPDIR)/cdo-fieldzon.Tpo -c -o cdo-fieldzon.obj `if test -f 'fieldzon.c'; then $(CYGPATH_W) 'fieldzon.c'; else $(CYGPATH_W) '$(srcdir)/fieldzon.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fieldzon.Tpo $(DEPDIR)/cdo-fieldzon.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fieldzon.c' object='cdo-fieldzon.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fieldzon.obj -MD -MP -MF $(DEPDIR)/cdo-fieldzon.Tpo -c -o cdo-fieldzon.obj `if test -f 'fieldzon.c'; then $(CYGPATH_W) 'fieldzon.c'; else $(CYGPATH_W) '$(srcdir)/fieldzon.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fieldzon.Tpo $(DEPDIR)/cdo-fieldzon.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fieldzon.c' object='cdo-fieldzon.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldzon.obj `if test -f 'fieldzon.c'; then $(CYGPATH_W) 'fieldzon.c'; else $(CYGPATH_W) '$(srcdir)/fieldzon.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fieldzon.obj `if test -f 'fieldzon.c'; then $(CYGPATH_W) 'fieldzon.c'; else $(CYGPATH_W) '$(srcdir)/fieldzon.c'; fi`
 
 cdo-fouriertrans.o: fouriertrans.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fouriertrans.o -MD -MP -MF $(DEPDIR)/cdo-fouriertrans.Tpo -c -o cdo-fouriertrans.o `test -f 'fouriertrans.c' || echo '$(srcdir)/'`fouriertrans.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fouriertrans.Tpo $(DEPDIR)/cdo-fouriertrans.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fouriertrans.c' object='cdo-fouriertrans.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fouriertrans.o -MD -MP -MF $(DEPDIR)/cdo-fouriertrans.Tpo -c -o cdo-fouriertrans.o `test -f 'fouriertrans.c' || echo '$(srcdir)/'`fouriertrans.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fouriertrans.Tpo $(DEPDIR)/cdo-fouriertrans.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fouriertrans.c' object='cdo-fouriertrans.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fouriertrans.o `test -f 'fouriertrans.c' || echo '$(srcdir)/'`fouriertrans.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fouriertrans.o `test -f 'fouriertrans.c' || echo '$(srcdir)/'`fouriertrans.c
 
 cdo-fouriertrans.obj: fouriertrans.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fouriertrans.obj -MD -MP -MF $(DEPDIR)/cdo-fouriertrans.Tpo -c -o cdo-fouriertrans.obj `if test -f 'fouriertrans.c'; then $(CYGPATH_W) 'fouriertrans.c'; else $(CYGPATH_W) '$(srcdir)/fouriertrans.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-fouriertrans.Tpo $(DEPDIR)/cdo-fouriertrans.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fouriertrans.c' object='cdo-fouriertrans.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-fouriertrans.obj -MD -MP -MF $(DEPDIR)/cdo-fouriertrans.Tpo -c -o cdo-fouriertrans.obj `if test -f 'fouriertrans.c'; then $(CYGPATH_W) 'fouriertrans.c'; else $(CYGPATH_W) '$(srcdir)/fouriertrans.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-fouriertrans.Tpo $(DEPDIR)/cdo-fouriertrans.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fouriertrans.c' object='cdo-fouriertrans.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fouriertrans.obj `if test -f 'fouriertrans.c'; then $(CYGPATH_W) 'fouriertrans.c'; else $(CYGPATH_W) '$(srcdir)/fouriertrans.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-fouriertrans.obj `if test -f 'fouriertrans.c'; then $(CYGPATH_W) 'fouriertrans.c'; else $(CYGPATH_W) '$(srcdir)/fouriertrans.c'; fi`
 
 cdo-gradsdeslib.o: gradsdeslib.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gradsdeslib.o -MD -MP -MF $(DEPDIR)/cdo-gradsdeslib.Tpo -c -o cdo-gradsdeslib.o `test -f 'gradsdeslib.c' || echo '$(srcdir)/'`gradsdeslib.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-gradsdeslib.Tpo $(DEPDIR)/cdo-gradsdeslib.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gradsdeslib.c' object='cdo-gradsdeslib.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gradsdeslib.o -MD -MP -MF $(DEPDIR)/cdo-gradsdeslib.Tpo -c -o cdo-gradsdeslib.o `test -f 'gradsdeslib.c' || echo '$(srcdir)/'`gradsdeslib.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-gradsdeslib.Tpo $(DEPDIR)/cdo-gradsdeslib.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gradsdeslib.c' object='cdo-gradsdeslib.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gradsdeslib.o `test -f 'gradsdeslib.c' || echo '$(srcdir)/'`gradsdeslib.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gradsdeslib.o `test -f 'gradsdeslib.c' || echo '$(srcdir)/'`gradsdeslib.c
 
 cdo-gradsdeslib.obj: gradsdeslib.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gradsdeslib.obj -MD -MP -MF $(DEPDIR)/cdo-gradsdeslib.Tpo -c -o cdo-gradsdeslib.obj `if test -f 'gradsdeslib.c'; then $(CYGPATH_W) 'gradsdeslib.c'; else $(CYGPATH_W) '$(srcdir)/gradsdeslib.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-gradsdeslib.Tpo $(DEPDIR)/cdo-gradsdeslib.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gradsdeslib.c' object='cdo-gradsdeslib.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gradsdeslib.obj -MD -MP -MF $(DEPDIR)/cdo-gradsdeslib.Tpo -c -o cdo-gradsdeslib.obj `if test -f 'gradsdeslib.c'; then $(CYGPATH_W) 'gradsdeslib.c'; else $(CYGPATH_W) '$(srcdir)/gradsdeslib.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-gradsdeslib.Tpo $(DEPDIR)/cdo-gradsdeslib.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gradsdeslib.c' object='cdo-gradsdeslib.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gradsdeslib.obj `if test -f 'gradsdeslib.c'; then $(CYGPATH_W) 'gradsdeslib.c'; else $(CYGPATH_W) '$(srcdir)/gradsdeslib.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gradsdeslib.obj `if test -f 'gradsdeslib.c'; then $(CYGPATH_W) 'gradsdeslib.c'; else $(CYGPATH_W) '$(srcdir)/gradsdeslib.c'; fi`
 
 cdo-grid.o: grid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid.o -MD -MP -MF $(DEPDIR)/cdo-grid.Tpo -c -o cdo-grid.o `test -f 'grid.c' || echo '$(srcdir)/'`grid.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid.Tpo $(DEPDIR)/cdo-grid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid.c' object='cdo-grid.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid.o -MD -MP -MF $(DEPDIR)/cdo-grid.Tpo -c -o cdo-grid.o `test -f 'grid.c' || echo '$(srcdir)/'`grid.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid.Tpo $(DEPDIR)/cdo-grid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid.c' object='cdo-grid.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid.o `test -f 'grid.c' || echo '$(srcdir)/'`grid.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid.o `test -f 'grid.c' || echo '$(srcdir)/'`grid.c
 
 cdo-grid.obj: grid.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid.obj -MD -MP -MF $(DEPDIR)/cdo-grid.Tpo -c -o cdo-grid.obj `if test -f 'grid.c'; then $(CYGPATH_W) 'grid.c'; else $(CYGPATH_W) '$(srcdir)/grid.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid.Tpo $(DEPDIR)/cdo-grid.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid.c' object='cdo-grid.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid.obj -MD -MP -MF $(DEPDIR)/cdo-grid.Tpo -c -o cdo-grid.obj `if test -f 'grid.c'; then $(CYGPATH_W) 'grid.c'; else $(CYGPATH_W) '$(srcdir)/grid.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid.Tpo $(DEPDIR)/cdo-grid.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid.c' object='cdo-grid.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid.obj `if test -f 'grid.c'; then $(CYGPATH_W) 'grid.c'; else $(CYGPATH_W) '$(srcdir)/grid.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid.obj `if test -f 'grid.c'; then $(CYGPATH_W) 'grid.c'; else $(CYGPATH_W) '$(srcdir)/grid.c'; fi`
 
 cdo-grid_area.o: grid_area.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_area.o -MD -MP -MF $(DEPDIR)/cdo-grid_area.Tpo -c -o cdo-grid_area.o `test -f 'grid_area.c' || echo '$(srcdir)/'`grid_area.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_area.Tpo $(DEPDIR)/cdo-grid_area.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_area.c' object='cdo-grid_area.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_area.o -MD -MP -MF $(DEPDIR)/cdo-grid_area.Tpo -c -o cdo-grid_area.o `test -f 'grid_area.c' || echo '$(srcdir)/'`grid_area.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_area.Tpo $(DEPDIR)/cdo-grid_area.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_area.c' object='cdo-grid_area.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_area.o `test -f 'grid_area.c' || echo '$(srcdir)/'`grid_area.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_area.o `test -f 'grid_area.c' || echo '$(srcdir)/'`grid_area.c
 
 cdo-grid_area.obj: grid_area.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_area.obj -MD -MP -MF $(DEPDIR)/cdo-grid_area.Tpo -c -o cdo-grid_area.obj `if test -f 'grid_area.c'; then $(CYGPATH_W) 'grid_area.c'; else $(CYGPATH_W) '$(srcdir)/grid_area.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_area.Tpo $(DEPDIR)/cdo-grid_area.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_area.c' object='cdo-grid_area.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_area.obj -MD -MP -MF $(DEPDIR)/cdo-grid_area.Tpo -c -o cdo-grid_area.obj `if test -f 'grid_area.c'; then $(CYGPATH_W) 'grid_area.c'; else $(CYGPATH_W) '$(srcdir)/grid_area.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_area.Tpo $(DEPDIR)/cdo-grid_area.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_area.c' object='cdo-grid_area.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_area.obj `if test -f 'grid_area.c'; then $(CYGPATH_W) 'grid_area.c'; else $(CYGPATH_W) '$(srcdir)/grid_area.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_area.obj `if test -f 'grid_area.c'; then $(CYGPATH_W) 'grid_area.c'; else $(CYGPATH_W) '$(srcdir)/grid_area.c'; fi`
 
 cdo-grid_gme.o: grid_gme.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_gme.o -MD -MP -MF $(DEPDIR)/cdo-grid_gme.Tpo -c -o cdo-grid_gme.o `test -f 'grid_gme.c' || echo '$(srcdir)/'`grid_gme.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_gme.Tpo $(DEPDIR)/cdo-grid_gme.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_gme.c' object='cdo-grid_gme.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_gme.o -MD -MP -MF $(DEPDIR)/cdo-grid_gme.Tpo -c -o cdo-grid_gme.o `test -f 'grid_gme.c' || echo '$(srcdir)/'`grid_gme.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_gme.Tpo $(DEPDIR)/cdo-grid_gme.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_gme.c' object='cdo-grid_gme.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_gme.o `test -f 'grid_gme.c' || echo '$(srcdir)/'`grid_gme.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_gme.o `test -f 'grid_gme.c' || echo '$(srcdir)/'`grid_gme.c
 
 cdo-grid_gme.obj: grid_gme.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_gme.obj -MD -MP -MF $(DEPDIR)/cdo-grid_gme.Tpo -c -o cdo-grid_gme.obj `if test -f 'grid_gme.c'; then $(CYGPATH_W) 'grid_gme.c'; else $(CYGPATH_W) '$(srcdir)/grid_gme.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_gme.Tpo $(DEPDIR)/cdo-grid_gme.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_gme.c' object='cdo-grid_gme.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_gme.obj -MD -MP -MF $(DEPDIR)/cdo-grid_gme.Tpo -c -o cdo-grid_gme.obj `if test -f 'grid_gme.c'; then $(CYGPATH_W) 'grid_gme.c'; else $(CYGPATH_W) '$(srcdir)/grid_gme.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_gme.Tpo $(DEPDIR)/cdo-grid_gme.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_gme.c' object='cdo-grid_gme.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_gme.obj `if test -f 'grid_gme.c'; then $(CYGPATH_W) 'grid_gme.c'; else $(CYGPATH_W) '$(srcdir)/grid_gme.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_gme.obj `if test -f 'grid_gme.c'; then $(CYGPATH_W) 'grid_gme.c'; else $(CYGPATH_W) '$(srcdir)/grid_gme.c'; fi`
 
 cdo-grid_lcc.o: grid_lcc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_lcc.o -MD -MP -MF $(DEPDIR)/cdo-grid_lcc.Tpo -c -o cdo-grid_lcc.o `test -f 'grid_lcc.c' || echo '$(srcdir)/'`grid_lcc.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_lcc.Tpo $(DEPDIR)/cdo-grid_lcc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_lcc.c' object='cdo-grid_lcc.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_lcc.o -MD -MP -MF $(DEPDIR)/cdo-grid_lcc.Tpo -c -o cdo-grid_lcc.o `test -f 'grid_lcc.c' || echo '$(srcdir)/'`grid_lcc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_lcc.Tpo $(DEPDIR)/cdo-grid_lcc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_lcc.c' object='cdo-grid_lcc.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_lcc.o `test -f 'grid_lcc.c' || echo '$(srcdir)/'`grid_lcc.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_lcc.o `test -f 'grid_lcc.c' || echo '$(srcdir)/'`grid_lcc.c
 
 cdo-grid_lcc.obj: grid_lcc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_lcc.obj -MD -MP -MF $(DEPDIR)/cdo-grid_lcc.Tpo -c -o cdo-grid_lcc.obj `if test -f 'grid_lcc.c'; then $(CYGPATH_W) 'grid_lcc.c'; else $(CYGPATH_W) '$(srcdir)/grid_lcc.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_lcc.Tpo $(DEPDIR)/cdo-grid_lcc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_lcc.c' object='cdo-grid_lcc.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_lcc.obj -MD -MP -MF $(DEPDIR)/cdo-grid_lcc.Tpo -c -o cdo-grid_lcc.obj `if test -f 'grid_lcc.c'; then $(CYGPATH_W) 'grid_lcc.c'; else $(CYGPATH_W) '$(srcdir)/grid_lcc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_lcc.Tpo $(DEPDIR)/cdo-grid_lcc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_lcc.c' object='cdo-grid_lcc.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_lcc.obj `if test -f 'grid_lcc.c'; then $(CYGPATH_W) 'grid_lcc.c'; else $(CYGPATH_W) '$(srcdir)/grid_lcc.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_lcc.obj `if test -f 'grid_lcc.c'; then $(CYGPATH_W) 'grid_lcc.c'; else $(CYGPATH_W) '$(srcdir)/grid_lcc.c'; fi`
 
 cdo-grid_rot.o: grid_rot.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_rot.o -MD -MP -MF $(DEPDIR)/cdo-grid_rot.Tpo -c -o cdo-grid_rot.o `test -f 'grid_rot.c' || echo '$(srcdir)/'`grid_rot.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_rot.Tpo $(DEPDIR)/cdo-grid_rot.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_rot.c' object='cdo-grid_rot.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_rot.o -MD -MP -MF $(DEPDIR)/cdo-grid_rot.Tpo -c -o cdo-grid_rot.o `test -f 'grid_rot.c' || echo '$(srcdir)/'`grid_rot.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_rot.Tpo $(DEPDIR)/cdo-grid_rot.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_rot.c' object='cdo-grid_rot.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_rot.o `test -f 'grid_rot.c' || echo '$(srcdir)/'`grid_rot.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_rot.o `test -f 'grid_rot.c' || echo '$(srcdir)/'`grid_rot.c
 
 cdo-grid_rot.obj: grid_rot.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_rot.obj -MD -MP -MF $(DEPDIR)/cdo-grid_rot.Tpo -c -o cdo-grid_rot.obj `if test -f 'grid_rot.c'; then $(CYGPATH_W) 'grid_rot.c'; else $(CYGPATH_W) '$(srcdir)/grid_rot.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_rot.Tpo $(DEPDIR)/cdo-grid_rot.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grid_rot.c' object='cdo-grid_rot.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_rot.obj -MD -MP -MF $(DEPDIR)/cdo-grid_rot.Tpo -c -o cdo-grid_rot.obj `if test -f 'grid_rot.c'; then $(CYGPATH_W) 'grid_rot.c'; else $(CYGPATH_W) '$(srcdir)/grid_rot.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_rot.Tpo $(DEPDIR)/cdo-grid_rot.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grid_rot.c' object='cdo-grid_rot.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_rot.obj `if test -f 'grid_rot.c'; then $(CYGPATH_W) 'grid_rot.c'; else $(CYGPATH_W) '$(srcdir)/grid_rot.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_rot.obj `if test -f 'grid_rot.c'; then $(CYGPATH_W) 'grid_rot.c'; else $(CYGPATH_W) '$(srcdir)/grid_rot.c'; fi`
 
 cdo-gridreference.o: gridreference.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gridreference.o -MD -MP -MF $(DEPDIR)/cdo-gridreference.Tpo -c -o cdo-gridreference.o `test -f 'gridreference.c' || echo '$(srcdir)/'`gridreference.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-gridreference.Tpo $(DEPDIR)/cdo-gridreference.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gridreference.c' object='cdo-gridreference.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gridreference.o -MD -MP -MF $(DEPDIR)/cdo-gridreference.Tpo -c -o cdo-gridreference.o `test -f 'gridreference.c' || echo '$(srcdir)/'`gridreference.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-gridreference.Tpo $(DEPDIR)/cdo-gridreference.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gridreference.c' object='cdo-gridreference.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gridreference.o `test -f 'gridreference.c' || echo '$(srcdir)/'`gridreference.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gridreference.o `test -f 'gridreference.c' || echo '$(srcdir)/'`gridreference.c
 
 cdo-gridreference.obj: gridreference.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gridreference.obj -MD -MP -MF $(DEPDIR)/cdo-gridreference.Tpo -c -o cdo-gridreference.obj `if test -f 'gridreference.c'; then $(CYGPATH_W) 'gridreference.c'; else $(CYGPATH_W) '$(srcdir)/gridreference.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-gridreference.Tpo $(DEPDIR)/cdo-gridreference.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gridreference.c' object='cdo-gridreference.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-gridreference.obj -MD -MP -MF $(DEPDIR)/cdo-gridreference.Tpo -c -o cdo-gridreference.obj `if test -f 'gridreference.c'; then $(CYGPATH_W) 'gridreference.c'; else $(CYGPATH_W) '$(srcdir)/gridreference.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-gridreference.Tpo $(DEPDIR)/cdo-gridreference.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gridreference.c' object='cdo-gridreference.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gridreference.obj `if test -f 'gridreference.c'; then $(CYGPATH_W) 'gridreference.c'; else $(CYGPATH_W) '$(srcdir)/gridreference.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-gridreference.obj `if test -f 'gridreference.c'; then $(CYGPATH_W) 'gridreference.c'; else $(CYGPATH_W) '$(srcdir)/gridreference.c'; fi`
 
 cdo-griddes.o: griddes.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes.o -MD -MP -MF $(DEPDIR)/cdo-griddes.Tpo -c -o cdo-griddes.o `test -f 'griddes.c' || echo '$(srcdir)/'`griddes.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-griddes.Tpo $(DEPDIR)/cdo-griddes.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='griddes.c' object='cdo-griddes.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes.o -MD -MP -MF $(DEPDIR)/cdo-griddes.Tpo -c -o cdo-griddes.o `test -f 'griddes.c' || echo '$(srcdir)/'`griddes.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-griddes.Tpo $(DEPDIR)/cdo-griddes.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='griddes.c' object='cdo-griddes.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes.o `test -f 'griddes.c' || echo '$(srcdir)/'`griddes.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes.o `test -f 'griddes.c' || echo '$(srcdir)/'`griddes.c
 
 cdo-griddes.obj: griddes.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes.obj -MD -MP -MF $(DEPDIR)/cdo-griddes.Tpo -c -o cdo-griddes.obj `if test -f 'griddes.c'; then $(CYGPATH_W) 'griddes.c'; else $(CYGPATH_W) '$(srcdir)/griddes.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-griddes.Tpo $(DEPDIR)/cdo-griddes.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='griddes.c' object='cdo-griddes.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes.obj -MD -MP -MF $(DEPDIR)/cdo-griddes.Tpo -c -o cdo-griddes.obj `if test -f 'griddes.c'; then $(CYGPATH_W) 'griddes.c'; else $(CYGPATH_W) '$(srcdir)/griddes.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-griddes.Tpo $(DEPDIR)/cdo-griddes.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='griddes.c' object='cdo-griddes.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes.obj `if test -f 'griddes.c'; then $(CYGPATH_W) 'griddes.c'; else $(CYGPATH_W) '$(srcdir)/griddes.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes.obj `if test -f 'griddes.c'; then $(CYGPATH_W) 'griddes.c'; else $(CYGPATH_W) '$(srcdir)/griddes.c'; fi`
 
 cdo-griddes_h5.o: griddes_h5.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_h5.o -MD -MP -MF $(DEPDIR)/cdo-griddes_h5.Tpo -c -o cdo-griddes_h5.o `test -f 'griddes_h5.c' || echo '$(srcdir)/'`griddes_h5.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-griddes_h5.Tpo $(DEPDIR)/cdo-griddes_h5.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='griddes_h5.c' object='cdo-griddes_h5.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_h5.o -MD -MP -MF $(DEPDIR)/cdo-griddes_h5.Tpo -c -o cdo-griddes_h5.o `test -f 'griddes_h5.c' || echo '$(srcdir)/'`griddes_h5.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-griddes_h5.Tpo $(DEPDIR)/cdo-griddes_h5.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='griddes_h5.c' object='cdo-griddes_h5.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_h5.o `test -f 'griddes_h5.c' || echo '$(srcdir)/'`griddes_h5.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_h5.o `test -f 'griddes_h5.c' || echo '$(srcdir)/'`griddes_h5.c
 
 cdo-griddes_h5.obj: griddes_h5.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_h5.obj -MD -MP -MF $(DEPDIR)/cdo-griddes_h5.Tpo -c -o cdo-griddes_h5.obj `if test -f 'griddes_h5.c'; then $(CYGPATH_W) 'griddes_h5.c'; else $(CYGPATH_W) '$(srcdir)/griddes_h5.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-griddes_h5.Tpo $(DEPDIR)/cdo-griddes_h5.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='griddes_h5.c' object='cdo-griddes_h5.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_h5.obj -MD -MP -MF $(DEPDIR)/cdo-griddes_h5.Tpo -c -o cdo-griddes_h5.obj `if test -f 'griddes_h5.c'; then $(CYGPATH_W) 'griddes_h5.c'; else $(CYGPATH_W) '$(srcdir)/griddes_h5.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-griddes_h5.Tpo $(DEPDIR)/cdo-griddes_h5.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='griddes_h5.c' object='cdo-griddes_h5.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_h5.obj `if test -f 'griddes_h5.c'; then $(CYGPATH_W) 'griddes_h5.c'; else $(CYGPATH_W) '$(srcdir)/griddes_h5.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_h5.obj `if test -f 'griddes_h5.c'; then $(CYGPATH_W) 'griddes_h5.c'; else $(CYGPATH_W) '$(srcdir)/griddes_h5.c'; fi`
 
 cdo-griddes_nc.o: griddes_nc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_nc.o -MD -MP -MF $(DEPDIR)/cdo-griddes_nc.Tpo -c -o cdo-griddes_nc.o `test -f 'griddes_nc.c' || echo '$(srcdir)/'`griddes_nc.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-griddes_nc.Tpo $(DEPDIR)/cdo-griddes_nc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='griddes_nc.c' object='cdo-griddes_nc.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_nc.o -MD -MP -MF $(DEPDIR)/cdo-griddes_nc.Tpo -c -o cdo-griddes_nc.o `test -f 'griddes_nc.c' || echo '$(srcdir)/'`griddes_nc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-griddes_nc.Tpo $(DEPDIR)/cdo-griddes_nc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='griddes_nc.c' object='cdo-griddes_nc.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_nc.o `test -f 'griddes_nc.c' || echo '$(srcdir)/'`griddes_nc.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_nc.o `test -f 'griddes_nc.c' || echo '$(srcdir)/'`griddes_nc.c
 
 cdo-griddes_nc.obj: griddes_nc.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_nc.obj -MD -MP -MF $(DEPDIR)/cdo-griddes_nc.Tpo -c -o cdo-griddes_nc.obj `if test -f 'griddes_nc.c'; then $(CYGPATH_W) 'griddes_nc.c'; else $(CYGPATH_W) '$(srcdir)/griddes_nc.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-griddes_nc.Tpo $(DEPDIR)/cdo-griddes_nc.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='griddes_nc.c' object='cdo-griddes_nc.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-griddes_nc.obj -MD -MP -MF $(DEPDIR)/cdo-griddes_nc.Tpo -c -o cdo-griddes_nc.obj `if test -f 'griddes_nc.c'; then $(CYGPATH_W) 'griddes_nc.c'; else $(CYGPATH_W) '$(srcdir)/griddes_nc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-griddes_nc.Tpo $(DEPDIR)/cdo-griddes_nc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='griddes_nc.c' object='cdo-griddes_nc.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_nc.obj `if test -f 'griddes_nc.c'; then $(CYGPATH_W) 'griddes_nc.c'; else $(CYGPATH_W) '$(srcdir)/griddes_nc.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-griddes_nc.obj `if test -f 'griddes_nc.c'; then $(CYGPATH_W) 'griddes_nc.c'; else $(CYGPATH_W) '$(srcdir)/griddes_nc.c'; fi`
 
 cdo-hetaeta.o: hetaeta.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-hetaeta.o -MD -MP -MF $(DEPDIR)/cdo-hetaeta.Tpo -c -o cdo-hetaeta.o `test -f 'hetaeta.c' || echo '$(srcdir)/'`hetaeta.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-hetaeta.Tpo $(DEPDIR)/cdo-hetaeta.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hetaeta.c' object='cdo-hetaeta.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-hetaeta.o -MD -MP -MF $(DEPDIR)/cdo-hetaeta.Tpo -c -o cdo-hetaeta.o `test -f 'hetaeta.c' || echo '$(srcdir)/'`hetaeta.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-hetaeta.Tpo $(DEPDIR)/cdo-hetaeta.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hetaeta.c' object='cdo-hetaeta.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-hetaeta.o `test -f 'hetaeta.c' || echo '$(srcdir)/'`hetaeta.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-hetaeta.o `test -f 'hetaeta.c' || echo '$(srcdir)/'`hetaeta.c
 
 cdo-hetaeta.obj: hetaeta.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-hetaeta.obj -MD -MP -MF $(DEPDIR)/cdo-hetaeta.Tpo -c -o cdo-hetaeta.obj `if test -f 'hetaeta.c'; then $(CYGPATH_W) 'hetaeta.c'; else $(CYGPATH_W) '$(srcdir)/hetaeta.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-hetaeta.Tpo $(DEPDIR)/cdo-hetaeta.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hetaeta.c' object='cdo-hetaeta.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-hetaeta.obj -MD -MP -MF $(DEPDIR)/cdo-hetaeta.Tpo -c -o cdo-hetaeta.obj `if test -f 'hetaeta.c'; then $(CYGPATH_W) 'hetaeta.c'; else $(CYGPATH_W) '$(srcdir)/hetaeta.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-hetaeta.Tpo $(DEPDIR)/cdo-hetaeta.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hetaeta.c' object='cdo-hetaeta.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-hetaeta.obj `if test -f 'hetaeta.c'; then $(CYGPATH_W) 'hetaeta.c'; else $(CYGPATH_W) '$(srcdir)/hetaeta.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-hetaeta.obj `if test -f 'hetaeta.c'; then $(CYGPATH_W) 'hetaeta.c'; else $(CYGPATH_W) '$(srcdir)/hetaeta.c'; fi`
 
 cdo-history.o: history.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-history.o -MD -MP -MF $(DEPDIR)/cdo-history.Tpo -c -o cdo-history.o `test -f 'history.c' || echo '$(srcdir)/'`history.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-history.Tpo $(DEPDIR)/cdo-history.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='history.c' object='cdo-history.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-history.o -MD -MP -MF $(DEPDIR)/cdo-history.Tpo -c -o cdo-history.o `test -f 'history.c' || echo '$(srcdir)/'`history.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-history.Tpo $(DEPDIR)/cdo-history.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='history.c' object='cdo-history.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-history.o `test -f 'history.c' || echo '$(srcdir)/'`history.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-history.o `test -f 'history.c' || echo '$(srcdir)/'`history.c
 
 cdo-history.obj: history.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-history.obj -MD -MP -MF $(DEPDIR)/cdo-history.Tpo -c -o cdo-history.obj `if test -f 'history.c'; then $(CYGPATH_W) 'history.c'; else $(CYGPATH_W) '$(srcdir)/history.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-history.Tpo $(DEPDIR)/cdo-history.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='history.c' object='cdo-history.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-history.obj -MD -MP -MF $(DEPDIR)/cdo-history.Tpo -c -o cdo-history.obj `if test -f 'history.c'; then $(CYGPATH_W) 'history.c'; else $(CYGPATH_W) '$(srcdir)/history.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-history.Tpo $(DEPDIR)/cdo-history.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='history.c' object='cdo-history.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-history.obj `if test -f 'history.c'; then $(CYGPATH_W) 'history.c'; else $(CYGPATH_W) '$(srcdir)/history.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-history.obj `if test -f 'history.c'; then $(CYGPATH_W) 'history.c'; else $(CYGPATH_W) '$(srcdir)/history.c'; fi`
 
 cdo-institution.o: institution.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-institution.o -MD -MP -MF $(DEPDIR)/cdo-institution.Tpo -c -o cdo-institution.o `test -f 'institution.c' || echo '$(srcdir)/'`institution.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-institution.Tpo $(DEPDIR)/cdo-institution.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='institution.c' object='cdo-institution.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-institution.o -MD -MP -MF $(DEPDIR)/cdo-institution.Tpo -c -o cdo-institution.o `test -f 'institution.c' || echo '$(srcdir)/'`institution.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-institution.Tpo $(DEPDIR)/cdo-institution.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='institution.c' object='cdo-institution.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-institution.o `test -f 'institution.c' || echo '$(srcdir)/'`institution.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-institution.o `test -f 'institution.c' || echo '$(srcdir)/'`institution.c
 
 cdo-institution.obj: institution.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-institution.obj -MD -MP -MF $(DEPDIR)/cdo-institution.Tpo -c -o cdo-institution.obj `if test -f 'institution.c'; then $(CYGPATH_W) 'institution.c'; else $(CYGPATH_W) '$(srcdir)/institution.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-institution.Tpo $(DEPDIR)/cdo-institution.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='institution.c' object='cdo-institution.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-institution.obj -MD -MP -MF $(DEPDIR)/cdo-institution.Tpo -c -o cdo-institution.obj `if test -f 'institution.c'; then $(CYGPATH_W) 'institution.c'; else $(CYGPATH_W) '$(srcdir)/institution.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-institution.Tpo $(DEPDIR)/cdo-institution.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='institution.c' object='cdo-institution.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-institution.obj `if test -f 'institution.c'; then $(CYGPATH_W) 'institution.c'; else $(CYGPATH_W) '$(srcdir)/institution.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-institution.obj `if test -f 'institution.c'; then $(CYGPATH_W) 'institution.c'; else $(CYGPATH_W) '$(srcdir)/institution.c'; fi`
 
 cdo-interpol.o: interpol.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-interpol.o -MD -MP -MF $(DEPDIR)/cdo-interpol.Tpo -c -o cdo-interpol.o `test -f 'interpol.c' || echo '$(srcdir)/'`interpol.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-interpol.Tpo $(DEPDIR)/cdo-interpol.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='interpol.c' object='cdo-interpol.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-interpol.o -MD -MP -MF $(DEPDIR)/cdo-interpol.Tpo -c -o cdo-interpol.o `test -f 'interpol.c' || echo '$(srcdir)/'`interpol.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-interpol.Tpo $(DEPDIR)/cdo-interpol.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='interpol.c' object='cdo-interpol.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-interpol.o `test -f 'interpol.c' || echo '$(srcdir)/'`interpol.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-interpol.o `test -f 'interpol.c' || echo '$(srcdir)/'`interpol.c
 
 cdo-interpol.obj: interpol.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-interpol.obj -MD -MP -MF $(DEPDIR)/cdo-interpol.Tpo -c -o cdo-interpol.obj `if test -f 'interpol.c'; then $(CYGPATH_W) 'interpol.c'; else $(CYGPATH_W) '$(srcdir)/interpol.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-interpol.Tpo $(DEPDIR)/cdo-interpol.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='interpol.c' object='cdo-interpol.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-interpol.obj -MD -MP -MF $(DEPDIR)/cdo-interpol.Tpo -c -o cdo-interpol.obj `if test -f 'interpol.c'; then $(CYGPATH_W) 'interpol.c'; else $(CYGPATH_W) '$(srcdir)/interpol.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-interpol.Tpo $(DEPDIR)/cdo-interpol.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='interpol.c' object='cdo-interpol.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-interpol.obj `if test -f 'interpol.c'; then $(CYGPATH_W) 'interpol.c'; else $(CYGPATH_W) '$(srcdir)/interpol.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-interpol.obj `if test -f 'interpol.c'; then $(CYGPATH_W) 'interpol.c'; else $(CYGPATH_W) '$(srcdir)/interpol.c'; fi`
 
 cdo-job.o: job.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-job.o -MD -MP -MF $(DEPDIR)/cdo-job.Tpo -c -o cdo-job.o `test -f 'job.c' || echo '$(srcdir)/'`job.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-job.Tpo $(DEPDIR)/cdo-job.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='job.c' object='cdo-job.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-job.o -MD -MP -MF $(DEPDIR)/cdo-job.Tpo -c -o cdo-job.o `test -f 'job.c' || echo '$(srcdir)/'`job.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-job.Tpo $(DEPDIR)/cdo-job.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='job.c' object='cdo-job.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-job.o `test -f 'job.c' || echo '$(srcdir)/'`job.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-job.o `test -f 'job.c' || echo '$(srcdir)/'`job.c
 
 cdo-job.obj: job.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-job.obj -MD -MP -MF $(DEPDIR)/cdo-job.Tpo -c -o cdo-job.obj `if test -f 'job.c'; then $(CYGPATH_W) 'job.c'; else $(CYGPATH_W) '$(srcdir)/job.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-job.Tpo $(DEPDIR)/cdo-job.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='job.c' object='cdo-job.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-job.obj -MD -MP -MF $(DEPDIR)/cdo-job.Tpo -c -o cdo-job.obj `if test -f 'job.c'; then $(CYGPATH_W) 'job.c'; else $(CYGPATH_W) '$(srcdir)/job.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-job.Tpo $(DEPDIR)/cdo-job.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='job.c' object='cdo-job.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-job.obj `if test -f 'job.c'; then $(CYGPATH_W) 'job.c'; else $(CYGPATH_W) '$(srcdir)/job.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-job.obj `if test -f 'job.c'; then $(CYGPATH_W) 'job.c'; else $(CYGPATH_W) '$(srcdir)/job.c'; fi`
 
 cdo-juldate.o: juldate.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-juldate.o -MD -MP -MF $(DEPDIR)/cdo-juldate.Tpo -c -o cdo-juldate.o `test -f 'juldate.c' || echo '$(srcdir)/'`juldate.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-juldate.Tpo $(DEPDIR)/cdo-juldate.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='juldate.c' object='cdo-juldate.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-juldate.o -MD -MP -MF $(DEPDIR)/cdo-juldate.Tpo -c -o cdo-juldate.o `test -f 'juldate.c' || echo '$(srcdir)/'`juldate.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-juldate.Tpo $(DEPDIR)/cdo-juldate.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='juldate.c' object='cdo-juldate.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-juldate.o `test -f 'juldate.c' || echo '$(srcdir)/'`juldate.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-juldate.o `test -f 'juldate.c' || echo '$(srcdir)/'`juldate.c
 
 cdo-juldate.obj: juldate.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-juldate.obj -MD -MP -MF $(DEPDIR)/cdo-juldate.Tpo -c -o cdo-juldate.obj `if test -f 'juldate.c'; then $(CYGPATH_W) 'juldate.c'; else $(CYGPATH_W) '$(srcdir)/juldate.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-juldate.Tpo $(DEPDIR)/cdo-juldate.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='juldate.c' object='cdo-juldate.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-juldate.obj -MD -MP -MF $(DEPDIR)/cdo-juldate.Tpo -c -o cdo-juldate.obj `if test -f 'juldate.c'; then $(CYGPATH_W) 'juldate.c'; else $(CYGPATH_W) '$(srcdir)/juldate.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-juldate.Tpo $(DEPDIR)/cdo-juldate.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='juldate.c' object='cdo-juldate.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-juldate.obj `if test -f 'juldate.c'; then $(CYGPATH_W) 'juldate.c'; else $(CYGPATH_W) '$(srcdir)/juldate.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-juldate.obj `if test -f 'juldate.c'; then $(CYGPATH_W) 'juldate.c'; else $(CYGPATH_W) '$(srcdir)/juldate.c'; fi`
 
 cdo-kvlist.o: kvlist.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-kvlist.o -MD -MP -MF $(DEPDIR)/cdo-kvlist.Tpo -c -o cdo-kvlist.o `test -f 'kvlist.c' || echo '$(srcdir)/'`kvlist.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-kvlist.Tpo $(DEPDIR)/cdo-kvlist.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='kvlist.c' object='cdo-kvlist.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-kvlist.o -MD -MP -MF $(DEPDIR)/cdo-kvlist.Tpo -c -o cdo-kvlist.o `test -f 'kvlist.c' || echo '$(srcdir)/'`kvlist.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-kvlist.Tpo $(DEPDIR)/cdo-kvlist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='kvlist.c' object='cdo-kvlist.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-kvlist.o `test -f 'kvlist.c' || echo '$(srcdir)/'`kvlist.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-kvlist.o `test -f 'kvlist.c' || echo '$(srcdir)/'`kvlist.c
 
 cdo-kvlist.obj: kvlist.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-kvlist.obj -MD -MP -MF $(DEPDIR)/cdo-kvlist.Tpo -c -o cdo-kvlist.obj `if test -f 'kvlist.c'; then $(CYGPATH_W) 'kvlist.c'; else $(CYGPATH_W) '$(srcdir)/kvlist.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-kvlist.Tpo $(DEPDIR)/cdo-kvlist.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='kvlist.c' object='cdo-kvlist.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-kvlist.obj -MD -MP -MF $(DEPDIR)/cdo-kvlist.Tpo -c -o cdo-kvlist.obj `if test -f 'kvlist.c'; then $(CYGPATH_W) 'kvlist.c'; else $(CYGPATH_W) '$(srcdir)/kvlist.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-kvlist.Tpo $(DEPDIR)/cdo-kvlist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='kvlist.c' object='cdo-kvlist.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-kvlist.obj `if test -f 'kvlist.c'; then $(CYGPATH_W) 'kvlist.c'; else $(CYGPATH_W) '$(srcdir)/kvlist.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-kvlist.obj `if test -f 'kvlist.c'; then $(CYGPATH_W) 'kvlist.c'; else $(CYGPATH_W) '$(srcdir)/kvlist.c'; fi`
 
 cdo-legendre.o: legendre.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-legendre.o -MD -MP -MF $(DEPDIR)/cdo-legendre.Tpo -c -o cdo-legendre.o `test -f 'legendre.c' || echo '$(srcdir)/'`legendre.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-legendre.Tpo $(DEPDIR)/cdo-legendre.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='legendre.c' object='cdo-legendre.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-legendre.o -MD -MP -MF $(DEPDIR)/cdo-legendre.Tpo -c -o cdo-legendre.o `test -f 'legendre.c' || echo '$(srcdir)/'`legendre.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-legendre.Tpo $(DEPDIR)/cdo-legendre.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='legendre.c' object='cdo-legendre.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-legendre.o `test -f 'legendre.c' || echo '$(srcdir)/'`legendre.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-legendre.o `test -f 'legendre.c' || echo '$(srcdir)/'`legendre.c
 
 cdo-legendre.obj: legendre.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-legendre.obj -MD -MP -MF $(DEPDIR)/cdo-legendre.Tpo -c -o cdo-legendre.obj `if test -f 'legendre.c'; then $(CYGPATH_W) 'legendre.c'; else $(CYGPATH_W) '$(srcdir)/legendre.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-legendre.Tpo $(DEPDIR)/cdo-legendre.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='legendre.c' object='cdo-legendre.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-legendre.obj -MD -MP -MF $(DEPDIR)/cdo-legendre.Tpo -c -o cdo-legendre.obj `if test -f 'legendre.c'; then $(CYGPATH_W) 'legendre.c'; else $(CYGPATH_W) '$(srcdir)/legendre.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-legendre.Tpo $(DEPDIR)/cdo-legendre.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='legendre.c' object='cdo-legendre.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-legendre.obj `if test -f 'legendre.c'; then $(CYGPATH_W) 'legendre.c'; else $(CYGPATH_W) '$(srcdir)/legendre.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-legendre.obj `if test -f 'legendre.c'; then $(CYGPATH_W) 'legendre.c'; else $(CYGPATH_W) '$(srcdir)/legendre.c'; fi`
 
 cdo-list.o: list.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-list.o -MD -MP -MF $(DEPDIR)/cdo-list.Tpo -c -o cdo-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-list.Tpo $(DEPDIR)/cdo-list.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='list.c' object='cdo-list.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-list.o -MD -MP -MF $(DEPDIR)/cdo-list.Tpo -c -o cdo-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-list.Tpo $(DEPDIR)/cdo-list.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='list.c' object='cdo-list.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
 
 cdo-list.obj: list.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-list.obj -MD -MP -MF $(DEPDIR)/cdo-list.Tpo -c -o cdo-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-list.Tpo $(DEPDIR)/cdo-list.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='list.c' object='cdo-list.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-list.obj -MD -MP -MF $(DEPDIR)/cdo-list.Tpo -c -o cdo-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)/cdo-list.Tpo $(DEPDIR)/cdo-list.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='list.c' object='cdo-list.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
 
 cdo-merge_sort2.o: merge_sort2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-merge_sort2.o -MD -MP -MF $(DEPDIR)/cdo-merge_sort2.Tpo -c -o cdo-merge_sort2.o `test -f 'merge_sort2.c' || echo '$(srcdir)/'`merge_sort2.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-merge_sort2.Tpo $(DEPDIR)/cdo-merge_sort2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='merge_sort2.c' object='cdo-merge_sort2.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-merge_sort2.o -MD -MP -MF $(DEPDIR)/cdo-merge_sort2.Tpo -c -o cdo-merge_sort2.o `test -f 'merge_sort2.c' || echo '$(srcdir)/'`merge_sort2.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-merge_sort2.Tpo $(DEPDIR)/cdo-merge_sort2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='merge_sort2.c' object='cdo-merge_sort2.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-merge_sort2.o `test -f 'merge_sort2.c' || echo '$(srcdir)/'`merge_sort2.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-merge_sort2.o `test -f 'merge_sort2.c' || echo '$(srcdir)/'`merge_sort2.c
 
 cdo-merge_sort2.obj: merge_sort2.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-merge_sort2.obj -MD -MP -MF $(DEPDIR)/cdo-merge_sort2.Tpo -c -o cdo-merge_sort2.obj `if test -f 'merge_sort2.c'; then $(CYGPATH_W) 'merge_sort2.c'; else $(CYGPATH_W) '$(srcdir)/merge_sort2.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-merge_sort2.Tpo $(DEPDIR)/cdo-merge_sort2.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='merge_sort2.c' object='cdo-merge_sort2.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-merge_sort2.obj -MD -MP -MF $(DEPDIR)/cdo-merge_sort2.Tpo -c -o cdo-merge_sort2.obj `if test -f 'merge_sort2.c'; then $(CYGPATH_W) 'merge_sort2.c'; else $(CYGPATH_W) '$(srcdir)/merge_sort2.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-merge_sort2.Tpo $(DEPDIR)/cdo-merge_sort2.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='merge_sort2.c' object='cdo-merge_sort2.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-merge_sort2.obj `if test -f 'merge_sort2.c'; then $(CYGPATH_W) 'merge_sort2.c'; else $(CYGPATH_W) '$(srcdir)/merge_sort2.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-merge_sort2.obj `if test -f 'merge_sort2.c'; then $(CYGPATH_W) 'merge_sort2.c'; else $(CYGPATH_W) '$(srcdir)/merge_sort2.c'; fi`
 
 cdo-modules.o: modules.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-modules.o -MD -MP -MF $(DEPDIR)/cdo-modules.Tpo -c -o cdo-modules.o `test -f 'modules.c' || echo '$(srcdir)/'`modules.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-modules.Tpo $(DEPDIR)/cdo-modules.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='modules.c' object='cdo-modules.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-modules.o -MD -MP -MF $(DEPDIR)/cdo-modules.Tpo -c -o cdo-modules.o `test -f 'modules.c' || echo '$(srcdir)/'`modules.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-modules.Tpo $(DEPDIR)/cdo-modules.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='modules.c' object='cdo-modules.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-modules.o `test -f 'modules.c' || echo '$(srcdir)/'`modules.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-modules.o `test -f 'modules.c' || echo '$(srcdir)/'`modules.c
 
 cdo-modules.obj: modules.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-modules.obj -MD -MP -MF $(DEPDIR)/cdo-modules.Tpo -c -o cdo-modules.obj `if test -f 'modules.c'; then $(CYGPATH_W) 'modules.c'; else $(CYGPATH_W) '$(srcdir)/modules.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-modules.Tpo $(DEPDIR)/cdo-modules.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='modules.c' object='cdo-modules.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-modules.obj -MD -MP -MF $(DEPDIR)/cdo-modules.Tpo -c -o cdo-modules.obj `if test -f 'modules.c'; then $(CYGPATH_W) 'modules.c'; else $(CYGPATH_W) '$(srcdir)/modules.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-modules.Tpo $(DEPDIR)/cdo-modules.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='modules.c' object='cdo-modules.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-modules.obj `if test -f 'modules.c'; then $(CYGPATH_W) 'modules.c'; else $(CYGPATH_W) '$(srcdir)/modules.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-modules.obj `if test -f 'modules.c'; then $(CYGPATH_W) 'modules.c'; else $(CYGPATH_W) '$(srcdir)/modules.c'; fi`
 
 cdo-namelist.o: namelist.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-namelist.o -MD -MP -MF $(DEPDIR)/cdo-namelist.Tpo -c -o cdo-namelist.o `test -f 'namelist.c' || echo '$(srcdir)/'`namelist.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-namelist.Tpo $(DEPDIR)/cdo-namelist.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='namelist.c' object='cdo-namelist.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-namelist.o -MD -MP -MF $(DEPDIR)/cdo-namelist.Tpo -c -o cdo-namelist.o `test -f 'namelist.c' || echo '$(srcdir)/'`namelist.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-namelist.Tpo $(DEPDIR)/cdo-namelist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='namelist.c' object='cdo-namelist.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-namelist.o `test -f 'namelist.c' || echo '$(srcdir)/'`namelist.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-namelist.o `test -f 'namelist.c' || echo '$(srcdir)/'`namelist.c
 
 cdo-namelist.obj: namelist.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-namelist.obj -MD -MP -MF $(DEPDIR)/cdo-namelist.Tpo -c -o cdo-namelist.obj `if test -f 'namelist.c'; then $(CYGPATH_W) 'namelist.c'; else $(CYGPATH_W) '$(srcdir)/namelist.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-namelist.Tpo $(DEPDIR)/cdo-namelist.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='namelist.c' object='cdo-namelist.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-namelist.obj -MD -MP -MF $(DEPDIR)/cdo-namelist.Tpo -c -o cdo-namelist.obj `if test -f 'namelist.c'; then $(CYGPATH_W) 'namelist.c'; else $(CYGPATH_W) '$(srcdir)/namelist.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-namelist.Tpo $(DEPDIR)/cdo-namelist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='namelist.c' object='cdo-namelist.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-namelist.obj `if test -f 'namelist.c'; then $(CYGPATH_W) 'namelist.c'; else $(CYGPATH_W) '$(srcdir)/namelist.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-namelist.obj `if test -f 'namelist.c'; then $(CYGPATH_W) 'namelist.c'; else $(CYGPATH_W) '$(srcdir)/namelist.c'; fi`
 
 cdo-normal.o: normal.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-normal.o -MD -MP -MF $(DEPDIR)/cdo-normal.Tpo -c -o cdo-normal.o `test -f 'normal.c' || echo '$(srcdir)/'`normal.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-normal.Tpo $(DEPDIR)/cdo-normal.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='normal.c' object='cdo-normal.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-normal.o -MD -MP -MF $(DEPDIR)/cdo-normal.Tpo -c -o cdo-normal.o `test -f 'normal.c' || echo '$(srcdir)/'`normal.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-normal.Tpo $(DEPDIR)/cdo-normal.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='normal.c' object='cdo-normal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-normal.o `test -f 'normal.c' || echo '$(srcdir)/'`normal.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-normal.o `test -f 'normal.c' || echo '$(srcdir)/'`normal.c
 
 cdo-normal.obj: normal.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-normal.obj -MD -MP -MF $(DEPDIR)/cdo-normal.Tpo -c -o cdo-normal.obj `if test -f 'normal.c'; then $(CYGPATH_W) 'normal.c'; else $(CYGPATH_W) '$(srcdir)/normal.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-normal.Tpo $(DEPDIR)/cdo-normal.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='normal.c' object='cdo-normal.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-normal.obj -MD -MP -MF $(DEPDIR)/cdo-normal.Tpo -c -o cdo-normal.obj `if test -f 'normal.c'; then $(CYGPATH_W) 'normal.c'; else $(CYGPATH_W) '$(srcdir)/normal.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-normal.Tpo $(DEPDIR)/cdo-normal.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='normal.c' object='cdo-normal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-normal.obj `if test -f 'normal.c'; then $(CYGPATH_W) 'normal.c'; else $(CYGPATH_W) '$(srcdir)/normal.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-normal.obj `if test -f 'normal.c'; then $(CYGPATH_W) 'normal.c'; else $(CYGPATH_W) '$(srcdir)/normal.c'; fi`
 
 cdo-nth_element.o: nth_element.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-nth_element.o -MD -MP -MF $(DEPDIR)/cdo-nth_element.Tpo -c -o cdo-nth_element.o `test -f 'nth_element.c' || echo '$(srcdir)/'`nth_element.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-nth_element.Tpo $(DEPDIR)/cdo-nth_element.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='nth_element.c' object='cdo-nth_element.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-nth_element.o -MD -MP -MF $(DEPDIR)/cdo-nth_element.Tpo -c -o cdo-nth_element.o `test -f 'nth_element.c' || echo '$(srcdir)/'`nth_element.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-nth_element.Tpo $(DEPDIR)/cdo-nth_element.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='nth_element.c' object='cdo-nth_element.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-nth_element.o `test -f 'nth_element.c' || echo '$(srcdir)/'`nth_element.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-nth_element.o `test -f 'nth_element.c' || echo '$(srcdir)/'`nth_element.c
 
 cdo-nth_element.obj: nth_element.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-nth_element.obj -MD -MP -MF $(DEPDIR)/cdo-nth_element.Tpo -c -o cdo-nth_element.obj `if test -f 'nth_element.c'; then $(CYGPATH_W) 'nth_element.c'; else $(CYGPATH_W) '$(srcdir)/nth_element.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-nth_element.Tpo $(DEPDIR)/cdo-nth_element.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='nth_element.c' object='cdo-nth_element.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-nth_element.obj -MD -MP -MF $(DEPDIR)/cdo-nth_element.Tpo -c -o cdo-nth_element.obj `if test -f 'nth_element.c'; then $(CYGPATH_W) 'nth_element.c'; else $(CYGPATH_W) '$(srcdir)/nth_element.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-nth_element.Tpo $(DEPDIR)/cdo-nth_element.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='nth_element.c' object='cdo-nth_element.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-nth_element.obj `if test -f 'nth_element.c'; then $(CYGPATH_W) 'nth_element.c'; else $(CYGPATH_W) '$(srcdir)/nth_element.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-nth_element.obj `if test -f 'nth_element.c'; then $(CYGPATH_W) 'nth_element.c'; else $(CYGPATH_W) '$(srcdir)/nth_element.c'; fi`
 
 cdo-par_io.o: par_io.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-par_io.o -MD -MP -MF $(DEPDIR)/cdo-par_io.Tpo -c -o cdo-par_io.o `test -f 'par_io.c' || echo '$(srcdir)/'`par_io.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-par_io.Tpo $(DEPDIR)/cdo-par_io.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='par_io.c' object='cdo-par_io.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-par_io.o -MD -MP -MF $(DEPDIR)/cdo-par_io.Tpo -c -o cdo-par_io.o `test -f 'par_io.c' || echo '$(srcdir)/'`par_io.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-par_io.Tpo $(DEPDIR)/cdo-par_io.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='par_io.c' object='cdo-par_io.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-par_io.o `test -f 'par_io.c' || echo '$(srcdir)/'`par_io.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-par_io.o `test -f 'par_io.c' || echo '$(srcdir)/'`par_io.c
 
 cdo-par_io.obj: par_io.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-par_io.obj -MD -MP -MF $(DEPDIR)/cdo-par_io.Tpo -c -o cdo-par_io.obj `if test -f 'par_io.c'; then $(CYGPATH_W) 'par_io.c'; else $(CYGPATH_W) '$(srcdir)/par_io.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-par_io.Tpo $(DEPDIR)/cdo-par_io.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='par_io.c' object='cdo-par_io.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-par_io.obj -MD -MP -MF $(DEPDIR)/cdo-par_io.Tpo -c -o cdo-par_io.obj `if test -f 'par_io.c'; then $(CYGPATH_W) 'par_io.c'; else $(CYGPATH_W) '$(srcdir)/par_io.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-par_io.Tpo $(DEPDIR)/cdo-par_io.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='par_io.c' object='cdo-par_io.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-par_io.obj `if test -f 'par_io.c'; then $(CYGPATH_W) 'par_io.c'; else $(CYGPATH_W) '$(srcdir)/par_io.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-par_io.obj `if test -f 'par_io.c'; then $(CYGPATH_W) 'par_io.c'; else $(CYGPATH_W) '$(srcdir)/par_io.c'; fi`
 
 cdo-percentiles.o: percentiles.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-percentiles.o -MD -MP -MF $(DEPDIR)/cdo-percentiles.Tpo -c -o cdo-percentiles.o `test -f 'percentiles.c' || echo '$(srcdir)/'`percentiles.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-percentiles.Tpo $(DEPDIR)/cdo-percentiles.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='percentiles.c' object='cdo-percentiles.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-percentiles.o -MD -MP -MF $(DEPDIR)/cdo-percentiles.Tpo -c -o cdo-percentiles.o `test -f 'percentiles.c' || echo '$(srcdir)/'`percentiles.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-percentiles.Tpo $(DEPDIR)/cdo-percentiles.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='percentiles.c' object='cdo-percentiles.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-percentiles.o `test -f 'percentiles.c' || echo '$(srcdir)/'`percentiles.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-percentiles.o `test -f 'percentiles.c' || echo '$(srcdir)/'`percentiles.c
 
 cdo-percentiles.obj: percentiles.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-percentiles.obj -MD -MP -MF $(DEPDIR)/cdo-percentiles.Tpo -c -o cdo-percentiles.obj `if test -f 'percentiles.c'; then $(CYGPATH_W) 'percentiles.c'; else $(CYGPATH_W) '$(srcdir)/percentiles.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-percentiles.Tpo $(DEPDIR)/cdo-percentiles.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='percentiles.c' object='cdo-percentiles.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-percentiles.obj -MD -MP -MF $(DEPDIR)/cdo-percentiles.Tpo -c -o cdo-percentiles.obj `if test -f 'percentiles.c'; then $(CYGPATH_W) 'percentiles.c'; else $(CYGPATH_W) '$(srcdir)/percentiles.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-percentiles.Tpo $(DEPDIR)/cdo-percentiles.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='percentiles.c' object='cdo-percentiles.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-percentiles.obj `if test -f 'percentiles.c'; then $(CYGPATH_W) 'percentiles.c'; else $(CYGPATH_W) '$(srcdir)/percentiles.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-percentiles.obj `if test -f 'percentiles.c'; then $(CYGPATH_W) 'percentiles.c'; else $(CYGPATH_W) '$(srcdir)/percentiles.c'; fi`
 
 cdo-pipe.o: pipe.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pipe.o -MD -MP -MF $(DEPDIR)/cdo-pipe.Tpo -c -o cdo-pipe.o `test -f 'pipe.c' || echo '$(srcdir)/'`pipe.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-pipe.Tpo $(DEPDIR)/cdo-pipe.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pipe.c' object='cdo-pipe.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pipe.o -MD -MP -MF $(DEPDIR)/cdo-pipe.Tpo -c -o cdo-pipe.o `test -f 'pipe.c' || echo '$(srcdir)/'`pipe.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-pipe.Tpo $(DEPDIR)/cdo-pipe.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pipe.c' object='cdo-pipe.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pipe.o `test -f 'pipe.c' || echo '$(srcdir)/'`pipe.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pipe.o `test -f 'pipe.c' || echo '$(srcdir)/'`pipe.c
 
 cdo-pipe.obj: pipe.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pipe.obj -MD -MP -MF $(DEPDIR)/cdo-pipe.Tpo -c -o cdo-pipe.obj `if test -f 'pipe.c'; then $(CYGPATH_W) 'pipe.c'; else $(CYGPATH_W) '$(srcdir)/pipe.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-pipe.Tpo $(DEPDIR)/cdo-pipe.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pipe.c' object='cdo-pipe.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pipe.obj -MD -MP -MF $(DEPDIR)/cdo-pipe.Tpo -c -o cdo-pipe.obj `if test -f 'pipe.c'; then $(CYGPATH_W) 'pipe.c'; else $(CYGPATH_W) '$(srcdir)/pipe.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-pipe.Tpo $(DEPDIR)/cdo-pipe.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pipe.c' object='cdo-pipe.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pipe.obj `if test -f 'pipe.c'; then $(CYGPATH_W) 'pipe.c'; else $(CYGPATH_W) '$(srcdir)/pipe.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pipe.obj `if test -f 'pipe.c'; then $(CYGPATH_W) 'pipe.c'; else $(CYGPATH_W) '$(srcdir)/pipe.c'; fi`
 
 cdo-process.o: process.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-process.o -MD -MP -MF $(DEPDIR)/cdo-process.Tpo -c -o cdo-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-process.Tpo $(DEPDIR)/cdo-process.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='process.c' object='cdo-process.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-process.o -MD -MP -MF $(DEPDIR)/cdo-process.Tpo -c -o cdo-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-process.Tpo $(DEPDIR)/cdo-process.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='process.c' object='cdo-process.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c
 
 cdo-process.obj: process.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-process.obj -MD -MP -MF $(DEPDIR)/cdo-process.Tpo -c -o cdo-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-process.Tpo $(DEPDIR)/cdo-process.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='process.c' object='cdo-process.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-process.obj -MD -MP -MF $(DEPDIR)/cdo-process.Tpo -c -o cdo-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-process.Tpo $(DEPDIR)/cdo-process.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='process.c' object='cdo-process.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi`
 
 cdo-pstream.o: pstream.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pstream.o -MD -MP -MF $(DEPDIR)/cdo-pstream.Tpo -c -o cdo-pstream.o `test -f 'pstream.c' || echo '$(srcdir)/'`pstream.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-pstream.Tpo $(DEPDIR)/cdo-pstream.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pstream.c' object='cdo-pstream.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pstream.o -MD -MP -MF $(DEPDIR)/cdo-pstream.Tpo -c -o cdo-pstream.o `test -f 'pstream.c' || echo '$(srcdir)/'`pstream.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-pstream.Tpo $(DEPDIR)/cdo-pstream.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pstream.c' object='cdo-pstream.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pstream.o `test -f 'pstream.c' || echo '$(srcdir)/'`pstream.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pstream.o `test -f 'pstream.c' || echo '$(srcdir)/'`pstream.c
 
 cdo-pstream.obj: pstream.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pstream.obj -MD -MP -MF $(DEPDIR)/cdo-pstream.Tpo -c -o cdo-pstream.obj `if test -f 'pstream.c'; then $(CYGPATH_W) 'pstream.c'; else $(CYGPATH_W) '$(srcdir)/pstream.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-pstream.Tpo $(DEPDIR)/cdo-pstream.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pstream.c' object='cdo-pstream.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pstream.obj -MD -MP -MF $(DEPDIR)/cdo-pstream.Tpo -c -o cdo-pstream.obj `if test -f 'pstream.c'; then $(CYGPATH_W) 'pstream.c'; else $(CYGPATH_W) '$(srcdir)/pstream.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-pstream.Tpo $(DEPDIR)/cdo-pstream.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pstream.c' object='cdo-pstream.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pstream.obj `if test -f 'pstream.c'; then $(CYGPATH_W) 'pstream.c'; else $(CYGPATH_W) '$(srcdir)/pstream.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pstream.obj `if test -f 'pstream.c'; then $(CYGPATH_W) 'pstream.c'; else $(CYGPATH_W) '$(srcdir)/pstream.c'; fi`
 
 cdo-pthread_debug.o: pthread_debug.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pthread_debug.o -MD -MP -MF $(DEPDIR)/cdo-pthread_debug.Tpo -c -o cdo-pthread_debug.o `test -f 'pthread_debug.c' || echo '$(srcdir)/'`pthread_debug.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-pthread_debug.Tpo $(DEPDIR)/cdo-pthread_debug.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pthread_debug.c' object='cdo-pthread_debug.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pthread_debug.o -MD -MP -MF $(DEPDIR)/cdo-pthread_debug.Tpo -c -o cdo-pthread_debug.o `test -f 'pthread_debug.c' || echo '$(srcdir)/'`pthread_debug.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-pthread_debug.Tpo $(DEPDIR)/cdo-pthread_debug.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pthread_debug.c' object='cdo-pthread_debug.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pthread_debug.o `test -f 'pthread_debug.c' || echo '$(srcdir)/'`pthread_debug.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pthread_debug.o `test -f 'pthread_debug.c' || echo '$(srcdir)/'`pthread_debug.c
 
 cdo-pthread_debug.obj: pthread_debug.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pthread_debug.obj -MD -MP -MF $(DEPDIR)/cdo-pthread_debug.Tpo -c -o cdo-pthread_debug.obj `if test -f 'pthread_debug.c'; then $(CYGPATH_W) 'pthread_debug.c'; else $(CYGPATH_W) '$(srcdir)/pthread_debug.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-pthread_debug.Tpo $(DEPDIR)/cdo-pthread_debug.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pthread_debug.c' object='cdo-pthread_debug.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-pthread_debug.obj -MD -MP -MF $(DEPDIR)/cdo-pthread_debug.Tpo -c -o cdo-pthread_debug.obj `if test -f 'pthread_debug.c'; then $(CYGPATH_W) 'pthread_debug.c'; else $(CYGPATH_W) '$(srcdir)/pthread_debug.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-pthread_debug.Tpo $(DEPDIR)/cdo-pthread_debug.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pthread_debug.c' object='cdo-pthread_debug.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pthread_debug.obj `if test -f 'pthread_debug.c'; then $(CYGPATH_W) 'pthread_debug.c'; else $(CYGPATH_W) '$(srcdir)/pthread_debug.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-pthread_debug.obj `if test -f 'pthread_debug.c'; then $(CYGPATH_W) 'pthread_debug.c'; else $(CYGPATH_W) '$(srcdir)/pthread_debug.c'; fi`
 
 cdo-readline.o: readline.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-readline.o -MD -MP -MF $(DEPDIR)/cdo-readline.Tpo -c -o cdo-readline.o `test -f 'readline.c' || echo '$(srcdir)/'`readline.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-readline.Tpo $(DEPDIR)/cdo-readline.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='readline.c' object='cdo-readline.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-readline.o -MD -MP -MF $(DEPDIR)/cdo-readline.Tpo -c -o cdo-readline.o `test -f 'readline.c' || echo '$(srcdir)/'`readline.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-readline.Tpo $(DEPDIR)/cdo-readline.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='readline.c' object='cdo-readline.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-readline.o `test -f 'readline.c' || echo '$(srcdir)/'`readline.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-readline.o `test -f 'readline.c' || echo '$(srcdir)/'`readline.c
 
 cdo-readline.obj: readline.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-readline.obj -MD -MP -MF $(DEPDIR)/cdo-readline.Tpo -c -o cdo-readline.obj `if test -f 'readline.c'; then $(CYGPATH_W) 'readline.c'; else $(CYGPATH_W) '$(srcdir)/readline.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-readline.Tpo $(DEPDIR)/cdo-readline.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='readline.c' object='cdo-readline.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-readline.obj -MD -MP -MF $(DEPDIR)/cdo-readline.Tpo -c -o cdo-readline.obj `if test -f 'readline.c'; then $(CYGPATH_W) 'readline.c'; else $(CYGPATH_W) '$(srcdir)/readline.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-readline.Tpo $(DEPDIR)/cdo-readline.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='readline.c' object='cdo-readline.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-readline.obj `if test -f 'readline.c'; then $(CYGPATH_W) 'readline.c'; else $(CYGPATH_W) '$(srcdir)/readline.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-readline.obj `if test -f 'readline.c'; then $(CYGPATH_W) 'readline.c'; else $(CYGPATH_W) '$(srcdir)/readline.c'; fi`
 
 cdo-realtime.o: realtime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-realtime.o -MD -MP -MF $(DEPDIR)/cdo-realtime.Tpo -c -o cdo-realtime.o `test -f 'realtime.c' || echo '$(srcdir)/'`realtime.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-realtime.Tpo $(DEPDIR)/cdo-realtime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='realtime.c' object='cdo-realtime.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-realtime.o -MD -MP -MF $(DEPDIR)/cdo-realtime.Tpo -c -o cdo-realtime.o `test -f 'realtime.c' || echo '$(srcdir)/'`realtime.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-realtime.Tpo $(DEPDIR)/cdo-realtime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='realtime.c' object='cdo-realtime.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-realtime.o `test -f 'realtime.c' || echo '$(srcdir)/'`realtime.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-realtime.o `test -f 'realtime.c' || echo '$(srcdir)/'`realtime.c
 
 cdo-realtime.obj: realtime.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-realtime.obj -MD -MP -MF $(DEPDIR)/cdo-realtime.Tpo -c -o cdo-realtime.obj `if test -f 'realtime.c'; then $(CYGPATH_W) 'realtime.c'; else $(CYGPATH_W) '$(srcdir)/realtime.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-realtime.Tpo $(DEPDIR)/cdo-realtime.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='realtime.c' object='cdo-realtime.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-realtime.obj -MD -MP -MF $(DEPDIR)/cdo-realtime.Tpo -c -o cdo-realtime.obj `if test -f 'realtime.c'; then $(CYGPATH_W) 'realtime.c'; else $(CYGPATH_W) '$(srcdir)/realtime.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-realtime.Tpo $(DEPDIR)/cdo-realtime.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='realtime.c' object='cdo-realtime.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-realtime.obj `if test -f 'realtime.c'; then $(CYGPATH_W) 'realtime.c'; else $(CYGPATH_W) '$(srcdir)/realtime.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-realtime.obj `if test -f 'realtime.c'; then $(CYGPATH_W) 'realtime.c'; else $(CYGPATH_W) '$(srcdir)/realtime.c'; fi`
 
 cdo-remaplib.o: remaplib.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remaplib.o -MD -MP -MF $(DEPDIR)/cdo-remaplib.Tpo -c -o cdo-remaplib.o `test -f 'remaplib.c' || echo '$(srcdir)/'`remaplib.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remaplib.Tpo $(DEPDIR)/cdo-remaplib.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remaplib.c' object='cdo-remaplib.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remaplib.o -MD -MP -MF $(DEPDIR)/cdo-remaplib.Tpo -c -o cdo-remaplib.o `test -f 'remaplib.c' || echo '$(srcdir)/'`remaplib.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remaplib.Tpo $(DEPDIR)/cdo-remaplib.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remaplib.c' object='cdo-remaplib.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remaplib.o `test -f 'remaplib.c' || echo '$(srcdir)/'`remaplib.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remaplib.o `test -f 'remaplib.c' || echo '$(srcdir)/'`remaplib.c
 
 cdo-remaplib.obj: remaplib.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remaplib.obj -MD -MP -MF $(DEPDIR)/cdo-remaplib.Tpo -c -o cdo-remaplib.obj `if test -f 'remaplib.c'; then $(CYGPATH_W) 'remaplib.c'; else $(CYGPATH_W) '$(srcdir)/remaplib.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remaplib.Tpo $(DEPDIR)/cdo-remaplib.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remaplib.c' object='cdo-remaplib.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remaplib.obj -MD -MP -MF $(DEPDIR)/cdo-remaplib.Tpo -c -o cdo-remaplib.obj `if test -f 'remaplib.c'; then $(CYGPATH_W) 'remaplib.c'; else $(CYGPATH_W) '$(srcdir)/remaplib.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remaplib.Tpo $(DEPDIR)/cdo-remaplib.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remaplib.c' object='cdo-remaplib.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remaplib.obj `if test -f 'remaplib.c'; then $(CYGPATH_W) 'remaplib.c'; else $(CYGPATH_W) '$(srcdir)/remaplib.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remaplib.obj `if test -f 'remaplib.c'; then $(CYGPATH_W) 'remaplib.c'; else $(CYGPATH_W) '$(srcdir)/remaplib.c'; fi`
 
 cdo-remapsort.o: remapsort.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remapsort.o -MD -MP -MF $(DEPDIR)/cdo-remapsort.Tpo -c -o cdo-remapsort.o `test -f 'remapsort.c' || echo '$(srcdir)/'`remapsort.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remapsort.Tpo $(DEPDIR)/cdo-remapsort.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remapsort.c' object='cdo-remapsort.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remapsort.o -MD -MP -MF $(DEPDIR)/cdo-remapsort.Tpo -c -o cdo-remapsort.o `test -f 'remapsort.c' || echo '$(srcdir)/'`remapsort.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remapsort.Tpo $(DEPDIR)/cdo-remapsort.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remapsort.c' object='cdo-remapsort.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remapsort.o `test -f 'remapsort.c' || echo '$(srcdir)/'`remapsort.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remapsort.o `test -f 'remapsort.c' || echo '$(srcdir)/'`remapsort.c
 
 cdo-remapsort.obj: remapsort.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remapsort.obj -MD -MP -MF $(DEPDIR)/cdo-remapsort.Tpo -c -o cdo-remapsort.obj `if test -f 'remapsort.c'; then $(CYGPATH_W) 'remapsort.c'; else $(CYGPATH_W) '$(srcdir)/remapsort.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remapsort.Tpo $(DEPDIR)/cdo-remapsort.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remapsort.c' object='cdo-remapsort.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remapsort.obj -MD -MP -MF $(DEPDIR)/cdo-remapsort.Tpo -c -o cdo-remapsort.obj `if test -f 'remapsort.c'; then $(CYGPATH_W) 'remapsort.c'; else $(CYGPATH_W) '$(srcdir)/remapsort.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remapsort.Tpo $(DEPDIR)/cdo-remapsort.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remapsort.c' object='cdo-remapsort.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remapsort.obj `if test -f 'remapsort.c'; then $(CYGPATH_W) 'remapsort.c'; else $(CYGPATH_W) '$(srcdir)/remapsort.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remapsort.obj `if test -f 'remapsort.c'; then $(CYGPATH_W) 'remapsort.c'; else $(CYGPATH_W) '$(srcdir)/remapsort.c'; fi`
 
 cdo-remap_scrip_io.o: remap_scrip_io.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_scrip_io.o -MD -MP -MF $(DEPDIR)/cdo-remap_scrip_io.Tpo -c -o cdo-remap_scrip_io.o `test -f 'remap_scrip_io.c' || echo '$(srcdir)/'`remap_scrip_io.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remap_scrip_io.Tpo $(DEPDIR)/cdo-remap_scrip_io.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remap_scrip_io.c' object='cdo-remap_scrip_io.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_scrip_io.o -MD -MP -MF $(DEPDIR)/cdo-remap_scrip_io.Tpo -c -o cdo-remap_scrip_io.o `test -f 'remap_scrip_io.c' || echo '$(srcdir)/'`remap_scrip_io.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_scrip_io.Tpo $(DEPDIR)/cdo-remap_scrip_io.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_scrip_io.c' object='cdo-remap_scrip_io.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_scrip_io.o `test -f 'remap_scrip_io.c' || echo '$(srcdir)/'`remap_scrip_io.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_scrip_io.o `test -f 'remap_scrip_io.c' || echo '$(srcdir)/'`remap_scrip_io.c
 
 cdo-remap_scrip_io.obj: remap_scrip_io.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_scrip_io.obj -MD -MP -MF $(DEPDIR)/cdo-remap_scrip_io.Tpo -c -o cdo-remap_scrip_io.obj `if test -f 'remap_scrip_io.c'; then $(CYGPATH_W) 'remap_scrip_io.c'; else $(CYGPATH_W) '$(srcdir)/remap_scrip_io.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remap_scrip_io.Tpo $(DEPDIR)/cdo-remap_scrip_io.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remap_scrip_io.c' object='cdo-remap_scrip_io.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_scrip_io.obj -MD -MP -MF $(DEPDIR)/cdo-remap_scrip_io.Tpo -c -o cdo-remap_scrip_io.obj `if test -f 'remap_scrip_io.c'; then $(CYGPATH_W) 'remap_scrip_io.c'; else $(CYGPATH_W) '$(srcdir)/remap_scrip_io.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_scrip_io.Tpo $(DEPDIR)/cdo-remap_scrip_io.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_scrip_io.c' object='cdo-remap_scrip_io.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_scrip_io.obj `if test -f 'remap_scrip_io.c'; then $(CYGPATH_W) 'remap_scrip_io.c'; else $(CYGPATH_W) '$(srcdir)/remap_scrip_io.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_scrip_io.obj `if test -f 'remap_scrip_io.c'; then $(CYGPATH_W) 'remap_scrip_io.c'; else $(CYGPATH_W) '$(srcdir)/remap_scrip_io.c'; fi`
+
+cdo-remap_search_reg2d.o: remap_search_reg2d.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_search_reg2d.o -MD -MP -MF $(DEPDIR)/cdo-remap_search_reg2d.Tpo -c -o cdo-remap_search_reg2d.o `test -f 'remap_search_reg2d.c' || echo '$(srcdir)/'`remap_search_reg2d.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_search_reg2d.Tpo $(DEPDIR)/cdo-remap_search_reg2d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_search_reg2d.c' object='cdo-remap_search_reg2d.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_search_reg2d.o `test -f 'remap_search_reg2d.c' || echo '$(srcdir)/'`remap_search_reg2d.c
+
+cdo-remap_search_reg2d.obj: remap_search_reg2d.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_search_reg2d.obj -MD -MP -MF $(DEPDIR)/cdo-remap_search_reg2d.Tpo -c -o cdo-remap_search_reg2d.obj `if test -f 'remap_search_reg2d.c'; then $(CYGPATH_W) 'remap_search_reg2d.c'; else $(CYGPATH_W) '$(srcdir)/remap_search_reg2d.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_search_reg2d.Tpo $(DEPDIR)/cdo-remap_search_reg2d.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_search_reg2d.c' object='cdo-remap_search_reg2d.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_search_reg2d.obj `if test -f 'remap_search_reg2d.c'; then $(CYGPATH_W) 'remap_search_reg2d.c'; else $(CYGPATH_W) '$(srcdir)/remap_search_reg2d.c'; fi`
 
 cdo-remap_search_latbins.o: remap_search_latbins.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_search_latbins.o -MD -MP -MF $(DEPDIR)/cdo-remap_search_latbins.Tpo -c -o cdo-remap_search_latbins.o `test -f 'remap_search_latbins.c' || echo '$(srcdir)/'`remap_search_latbins.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remap_search_latbins.Tpo $(DEPDIR)/cdo-remap_search_latbins.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remap_search_latbins.c' object='cdo-remap_search_latbins.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_search_latbins.o -MD -MP -MF $(DEPDIR)/cdo-remap_search_latbins.Tpo -c -o cdo-remap_search_latbins.o `test -f 'remap_search_latbins.c' || echo '$(srcdir)/'`remap_search_latbins.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_search_latbins.Tpo $(DEPDIR)/cdo-remap_search_latbins.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_search_latbins.c' object='cdo-remap_search_latbins.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_search_latbins.o `test -f 'remap_search_latbins.c' || echo '$(srcdir)/'`remap_search_latbins.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_search_latbins.o `test -f 'remap_search_latbins.c' || echo '$(srcdir)/'`remap_search_latbins.c
 
 cdo-remap_search_latbins.obj: remap_search_latbins.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_search_latbins.obj -MD -MP -MF $(DEPDIR)/cdo-remap_search_latbins.Tpo -c -o cdo-remap_search_latbins.obj `if test -f 'remap_search_latbins.c'; then $(CYGPATH_W) 'remap_search_latbins.c'; else $(CYGPATH_W) '$(srcdir)/remap_search_latbins.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-remap_search_latbins.Tpo $(DEPDIR)/cdo-remap_search_latbins.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remap_search_latbins.c' object='cdo-remap_search_latbins.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_search_latbins.obj -MD -MP -MF $(DEPDIR)/cdo-remap_search_latbins.Tpo -c -o cdo-remap_search_latbins.obj `if test -f 'remap_search_latbins.c'; then $(CYGPATH_W) 'remap_search_latbins.c'; else $(CYGPATH_W) '$(srcdir)/remap_search_latbins.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_search_latbins.Tpo $(DEPDIR)/cdo-remap_search_latbins.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_search_latbins.c' object='cdo-remap_search_latbins.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_search_latbins.obj `if test -f 'remap_search_latbins.c'; then $(CYGPATH_W) 'remap_search_latbins.c'; else $(CYGPATH_W) '$(srcdir)/remap_search_latbins.c'; fi`
+
+cdo-remap_store_link.o: remap_store_link.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_store_link.o -MD -MP -MF $(DEPDIR)/cdo-remap_store_link.Tpo -c -o cdo-remap_store_link.o `test -f 'remap_store_link.c' || echo '$(srcdir)/'`remap_store_link.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_store_link.Tpo $(DEPDIR)/cdo-remap_store_link.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_store_link.c' object='cdo-remap_store_link.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_store_link.o `test -f 'remap_store_link.c' || echo '$(srcdir)/'`remap_store_link.c
+
+cdo-remap_store_link.obj: remap_store_link.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_store_link.obj -MD -MP -MF $(DEPDIR)/cdo-remap_store_link.Tpo -c -o cdo-remap_store_link.obj `if test -f 'remap_store_link.c'; then $(CYGPATH_W) 'remap_store_link.c'; else $(CYGPATH_W) '$(srcdir)/remap_store_link.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_store_link.Tpo $(DEPDIR)/cdo-remap_store_link.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_store_link.c' object='cdo-remap_store_link.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_store_link.obj `if test -f 'remap_store_link.c'; then $(CYGPATH_W) 'remap_store_link.c'; else $(CYGPATH_W) '$(srcdir)/remap_store_link.c'; fi`
+
+cdo-remap_conserv.o: remap_conserv.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_conserv.o -MD -MP -MF $(DEPDIR)/cdo-remap_conserv.Tpo -c -o cdo-remap_conserv.o `test -f 'remap_conserv.c' || echo '$(srcdir)/'`remap_conserv.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_conserv.Tpo $(DEPDIR)/cdo-remap_conserv.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_conserv.c' object='cdo-remap_conserv.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_conserv.o `test -f 'remap_conserv.c' || echo '$(srcdir)/'`remap_conserv.c
+
+cdo-remap_conserv.obj: remap_conserv.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_conserv.obj -MD -MP -MF $(DEPDIR)/cdo-remap_conserv.Tpo -c -o cdo-remap_conserv.obj `if test -f 'remap_conserv.c'; then $(CYGPATH_W) 'remap_conserv.c'; else $(CYGPATH_W) '$(srcdir)/remap_conserv.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_conserv.Tpo $(DEPDIR)/cdo-remap_conserv.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_conserv.c' object='cdo-remap_conserv.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_conserv.obj `if test -f 'remap_conserv.c'; then $(CYGPATH_W) 'remap_conserv.c'; else $(CYGPATH_W) '$(srcdir)/remap_conserv.c'; fi`
+
+cdo-remap_conserv_scrip.o: remap_conserv_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_conserv_scrip.o -MD -MP -MF $(DEPDIR)/cdo-remap_conserv_scrip.Tpo -c -o cdo-remap_conserv_scrip.o `test -f 'remap_conserv_scrip.c' || echo '$(srcdir)/'`remap_conserv_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_conserv_scrip.Tpo $(DEPDIR)/cdo-remap_conserv_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_conserv_scrip.c' object='cdo-remap_conserv_scrip.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_conserv_scrip.o `test -f 'remap_conserv_scrip.c' || echo '$(srcdir)/'`remap_conserv_scrip.c
+
+cdo-remap_conserv_scrip.obj: remap_conserv_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_conserv_scrip.obj -MD -MP -MF $(DEPDIR)/cdo-remap_conserv_scrip.Tpo -c -o cdo-remap_conserv_scrip.obj `if test -f 'remap_conserv_scrip.c'; then $(CYGPATH_W) 'remap_conserv_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_conserv_scrip.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_conserv_scrip.Tpo $(DEPDIR)/cdo-remap_conserv_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_conserv_scrip.c' object='cdo-remap_conserv_scrip.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_conserv_scrip.obj `if test -f 'remap_conserv_scrip.c'; then $(CYGPATH_W) 'remap_conserv_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_conserv_scrip.c'; fi`
+
+cdo-remap_distwgt_scrip.o: remap_distwgt_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_distwgt_scrip.o -MD -MP -MF $(DEPDIR)/cdo-remap_distwgt_scrip.Tpo -c -o cdo-remap_distwgt_scrip.o `test -f 'remap_distwgt_scrip.c' || echo '$(srcdir)/'`remap_distwgt_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_distwgt_scrip.Tpo $(DEPDIR)/cdo-remap_distwgt_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_distwgt_scrip.c' object='cdo-remap_distwgt_scrip.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_distwgt_scrip.o `test -f 'remap_distwgt_scrip.c' || echo '$(srcdir)/'`remap_distwgt_scrip.c
+
+cdo-remap_distwgt_scrip.obj: remap_distwgt_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_distwgt_scrip.obj -MD -MP -MF $(DEPDIR)/cdo-remap_distwgt_scrip.Tpo -c -o cdo-remap_distwgt_scrip.obj `if test -f 'remap_distwgt_scrip.c'; then $(CYGPATH_W) 'remap_distwgt_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_distwgt_scrip.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_distwgt_scrip.Tpo $(DEPDIR)/cdo-remap_distwgt_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_distwgt_scrip.c' object='cdo-remap_distwgt_scrip.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_distwgt_scrip.obj `if test -f 'remap_distwgt_scrip.c'; then $(CYGPATH_W) 'remap_distwgt_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_distwgt_scrip.c'; fi`
+
+cdo-remap_bicubic_scrip.o: remap_bicubic_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_bicubic_scrip.o -MD -MP -MF $(DEPDIR)/cdo-remap_bicubic_scrip.Tpo -c -o cdo-remap_bicubic_scrip.o `test -f 'remap_bicubic_scrip.c' || echo '$(srcdir)/'`remap_bicubic_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_bicubic_scrip.Tpo $(DEPDIR)/cdo-remap_bicubic_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_bicubic_scrip.c' object='cdo-remap_bicubic_scrip.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_search_latbins.obj `if test -f 'remap_search_latbins.c'; then $(CYGPATH_W) 'remap_search_latbins.c'; else $(CYGPATH_W) '$(srcdir)/remap_search_latbins.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_bicubic_scrip.o `test -f 'remap_bicubic_scrip.c' || echo '$(srcdir)/'`remap_bicubic_scrip.c
+
+cdo-remap_bicubic_scrip.obj: remap_bicubic_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_bicubic_scrip.obj -MD -MP -MF $(DEPDIR)/cdo-remap_bicubic_scrip.Tpo -c -o cdo-remap_bicubic_scrip.obj `if test -f 'remap_bicubic_scrip.c'; then $(CYGPATH_W) 'remap_bicubic_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_bicubic_scrip.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_bicubic_scrip.Tpo $(DEPDIR)/cdo-remap_bicubic_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_bicubic_scrip.c' object='cdo-remap_bicubic_scrip.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_bicubic_scrip.obj `if test -f 'remap_bicubic_scrip.c'; then $(CYGPATH_W) 'remap_bicubic_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_bicubic_scrip.c'; fi`
+
+cdo-remap_bilinear_scrip.o: remap_bilinear_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_bilinear_scrip.o -MD -MP -MF $(DEPDIR)/cdo-remap_bilinear_scrip.Tpo -c -o cdo-remap_bilinear_scrip.o `test -f 'remap_bilinear_scrip.c' || echo '$(srcdir)/'`remap_bilinear_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_bilinear_scrip.Tpo $(DEPDIR)/cdo-remap_bilinear_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_bilinear_scrip.c' object='cdo-remap_bilinear_scrip.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_bilinear_scrip.o `test -f 'remap_bilinear_scrip.c' || echo '$(srcdir)/'`remap_bilinear_scrip.c
+
+cdo-remap_bilinear_scrip.obj: remap_bilinear_scrip.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-remap_bilinear_scrip.obj -MD -MP -MF $(DEPDIR)/cdo-remap_bilinear_scrip.Tpo -c -o cdo-remap_bilinear_scrip.obj `if test -f 'remap_bilinear_scrip.c'; then $(CYGPATH_W) 'remap_bilinear_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_bilinear_scrip.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-remap_bilinear_scrip.Tpo $(DEPDIR)/cdo-remap_bilinear_scrip.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='remap_bilinear_scrip.c' object='cdo-remap_bilinear_scrip.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-remap_bilinear_scrip.obj `if test -f 'remap_bilinear_scrip.c'; then $(CYGPATH_W) 'remap_bilinear_scrip.c'; else $(CYGPATH_W) '$(srcdir)/remap_bilinear_scrip.c'; fi`
 
 cdo-stdnametable.o: stdnametable.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-stdnametable.o -MD -MP -MF $(DEPDIR)/cdo-stdnametable.Tpo -c -o cdo-stdnametable.o `test -f 'stdnametable.c' || echo '$(srcdir)/'`stdnametable.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-stdnametable.Tpo $(DEPDIR)/cdo-stdnametable.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='stdnametable.c' object='cdo-stdnametable.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-stdnametable.o -MD -MP -MF $(DEPDIR)/cdo-stdnametable.Tpo -c -o cdo-stdnametable.o `test -f 'stdnametable.c' || echo '$(srcdir)/'`stdnametable.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-stdnametable.Tpo $(DEPDIR)/cdo-stdnametable.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='stdnametable.c' object='cdo-stdnametable.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-stdnametable.o `test -f 'stdnametable.c' || echo '$(srcdir)/'`stdnametable.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-stdnametable.o `test -f 'stdnametable.c' || echo '$(srcdir)/'`stdnametable.c
 
 cdo-stdnametable.obj: stdnametable.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-stdnametable.obj -MD -MP -MF $(DEPDIR)/cdo-stdnametable.Tpo -c -o cdo-stdnametable.obj `if test -f 'stdnametable.c'; then $(CYGPATH_W) 'stdnametable.c'; else $(CYGPATH_W) '$(srcdir)/stdnametable.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-stdnametable.Tpo $(DEPDIR)/cdo-stdnametable.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='stdnametable.c' object='cdo-stdnametable.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-stdnametable.obj -MD -MP -MF $(DEPDIR)/cdo-stdnametable.Tpo -c -o cdo-stdnametable.obj `if test -f 'stdnametable.c'; then $(CYGPATH_W) 'stdnametable.c'; else $(CYGPATH_W) '$(srcdir)/stdnametable.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-stdnametable.Tpo $(DEPDIR)/cdo-stdnametable.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='stdnametable.c' object='cdo-stdnametable.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-stdnametable.obj `if test -f 'stdnametable.c'; then $(CYGPATH_W) 'stdnametable.c'; else $(CYGPATH_W) '$(srcdir)/stdnametable.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-stdnametable.obj `if test -f 'stdnametable.c'; then $(CYGPATH_W) 'stdnametable.c'; else $(CYGPATH_W) '$(srcdir)/stdnametable.c'; fi`
 
 cdo-specspace.o: specspace.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-specspace.o -MD -MP -MF $(DEPDIR)/cdo-specspace.Tpo -c -o cdo-specspace.o `test -f 'specspace.c' || echo '$(srcdir)/'`specspace.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-specspace.Tpo $(DEPDIR)/cdo-specspace.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='specspace.c' object='cdo-specspace.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-specspace.o -MD -MP -MF $(DEPDIR)/cdo-specspace.Tpo -c -o cdo-specspace.o `test -f 'specspace.c' || echo '$(srcdir)/'`specspace.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-specspace.Tpo $(DEPDIR)/cdo-specspace.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='specspace.c' object='cdo-specspace.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-specspace.o `test -f 'specspace.c' || echo '$(srcdir)/'`specspace.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-specspace.o `test -f 'specspace.c' || echo '$(srcdir)/'`specspace.c
 
 cdo-specspace.obj: specspace.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-specspace.obj -MD -MP -MF $(DEPDIR)/cdo-specspace.Tpo -c -o cdo-specspace.obj `if test -f 'specspace.c'; then $(CYGPATH_W) 'specspace.c'; else $(CYGPATH_W) '$(srcdir)/specspace.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-specspace.Tpo $(DEPDIR)/cdo-specspace.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='specspace.c' object='cdo-specspace.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-specspace.obj -MD -MP -MF $(DEPDIR)/cdo-specspace.Tpo -c -o cdo-specspace.obj `if test -f 'specspace.c'; then $(CYGPATH_W) 'specspace.c'; else $(CYGPATH_W) '$(srcdir)/specspace.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-specspace.Tpo $(DEPDIR)/cdo-specspace.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='specspace.c' object='cdo-specspace.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-specspace.obj `if test -f 'specspace.c'; then $(CYGPATH_W) 'specspace.c'; else $(CYGPATH_W) '$(srcdir)/specspace.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-specspace.obj `if test -f 'specspace.c'; then $(CYGPATH_W) 'specspace.c'; else $(CYGPATH_W) '$(srcdir)/specspace.c'; fi`
 
 cdo-statistic.o: statistic.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-statistic.o -MD -MP -MF $(DEPDIR)/cdo-statistic.Tpo -c -o cdo-statistic.o `test -f 'statistic.c' || echo '$(srcdir)/'`statistic.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-statistic.Tpo $(DEPDIR)/cdo-statistic.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='statistic.c' object='cdo-statistic.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-statistic.o -MD -MP -MF $(DEPDIR)/cdo-statistic.Tpo -c -o cdo-statistic.o `test -f 'statistic.c' || echo '$(srcdir)/'`statistic.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-statistic.Tpo $(DEPDIR)/cdo-statistic.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='statistic.c' object='cdo-statistic.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-statistic.o `test -f 'statistic.c' || echo '$(srcdir)/'`statistic.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-statistic.o `test -f 'statistic.c' || echo '$(srcdir)/'`statistic.c
 
 cdo-statistic.obj: statistic.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-statistic.obj -MD -MP -MF $(DEPDIR)/cdo-statistic.Tpo -c -o cdo-statistic.obj `if test -f 'statistic.c'; then $(CYGPATH_W) 'statistic.c'; else $(CYGPATH_W) '$(srcdir)/statistic.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-statistic.Tpo $(DEPDIR)/cdo-statistic.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='statistic.c' object='cdo-statistic.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-statistic.obj -MD -MP -MF $(DEPDIR)/cdo-statistic.Tpo -c -o cdo-statistic.obj `if test -f 'statistic.c'; then $(CYGPATH_W) 'statistic.c'; else $(CYGPATH_W) '$(srcdir)/statistic.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-statistic.Tpo $(DEPDIR)/cdo-statistic.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='statistic.c' object='cdo-statistic.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-statistic.obj `if test -f 'statistic.c'; then $(CYGPATH_W) 'statistic.c'; else $(CYGPATH_W) '$(srcdir)/statistic.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-statistic.obj `if test -f 'statistic.c'; then $(CYGPATH_W) 'statistic.c'; else $(CYGPATH_W) '$(srcdir)/statistic.c'; fi`
 
 cdo-table.o: table.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-table.o -MD -MP -MF $(DEPDIR)/cdo-table.Tpo -c -o cdo-table.o `test -f 'table.c' || echo '$(srcdir)/'`table.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-table.Tpo $(DEPDIR)/cdo-table.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='table.c' object='cdo-table.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-table.o -MD -MP -MF $(DEPDIR)/cdo-table.Tpo -c -o cdo-table.o `test -f 'table.c' || echo '$(srcdir)/'`table.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-table.Tpo $(DEPDIR)/cdo-table.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='table.c' object='cdo-table.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-table.o `test -f 'table.c' || echo '$(srcdir)/'`table.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-table.o `test -f 'table.c' || echo '$(srcdir)/'`table.c
 
 cdo-table.obj: table.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-table.obj -MD -MP -MF $(DEPDIR)/cdo-table.Tpo -c -o cdo-table.obj `if test -f 'table.c'; then $(CYGPATH_W) 'table.c'; else $(CYGPATH_W) '$(srcdir)/table.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-table.Tpo $(DEPDIR)/cdo-table.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='table.c' object='cdo-table.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-table.obj -MD -MP -MF $(DEPDIR)/cdo-table.Tpo -c -o cdo-table.obj `if test -f 'table.c'; then $(CYGPATH_W) 'table.c'; else $(CYGPATH_W) '$(srcdir)/table.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-table.Tpo $(DEPDIR)/cdo-table.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='table.c' object='cdo-table.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-table.obj `if test -f 'table.c'; then $(CYGPATH_W) 'table.c'; else $(CYGPATH_W) '$(srcdir)/table.c'; fi`
+
+cdo-text.o: text.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-text.o -MD -MP -MF $(DEPDIR)/cdo-text.Tpo -c -o cdo-text.o `test -f 'text.c' || echo '$(srcdir)/'`text.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-text.Tpo $(DEPDIR)/cdo-text.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='text.c' object='cdo-text.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-table.obj `if test -f 'table.c'; then $(CYGPATH_W) 'table.c'; else $(CYGPATH_W) '$(srcdir)/table.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-text.o `test -f 'text.c' || echo '$(srcdir)/'`text.c
+
+cdo-text.obj: text.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-text.obj -MD -MP -MF $(DEPDIR)/cdo-text.Tpo -c -o cdo-text.obj `if test -f 'text.c'; then $(CYGPATH_W) 'text.c'; else $(CYGPATH_W) '$(srcdir)/text.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-text.Tpo $(DEPDIR)/cdo-text.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='text.c' object='cdo-text.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-text.obj `if test -f 'text.c'; then $(CYGPATH_W) 'text.c'; else $(CYGPATH_W) '$(srcdir)/text.c'; fi`
 
 cdo-timer.o: timer.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-timer.o -MD -MP -MF $(DEPDIR)/cdo-timer.Tpo -c -o cdo-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-timer.Tpo $(DEPDIR)/cdo-timer.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='timer.c' object='cdo-timer.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-timer.o -MD -MP -MF $(DEPDIR)/cdo-timer.Tpo -c -o cdo-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-timer.Tpo $(DEPDIR)/cdo-timer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timer.c' object='cdo-timer.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c
 
 cdo-timer.obj: timer.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-timer.obj -MD -MP -MF $(DEPDIR)/cdo-timer.Tpo -c -o cdo-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-timer.Tpo $(DEPDIR)/cdo-timer.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='timer.c' object='cdo-timer.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-timer.obj -MD -MP -MF $(DEPDIR)/cdo-timer.Tpo -c -o cdo-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)/cdo-timer.Tpo $(DEPDIR)/cdo-timer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timer.c' object='cdo-timer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`
+
+cdo-userlog.o: userlog.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-userlog.o -MD -MP -MF $(DEPDIR)/cdo-userlog.Tpo -c -o cdo-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-userlog.Tpo $(DEPDIR)/cdo-userlog.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='userlog.c' object='cdo-userlog.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
 
 cdo-userlog.obj: userlog.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-userlog.obj -MD -MP -MF $(DEPDIR)/cdo-userlog.Tpo -c -o cdo-userlog.obj `if test -f 'userlog.c'; then $(CYGPATH_W) 'userlog.c'; else $(CYGPATH_W) '$(srcdir)/userlog.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-userlog.Tpo $(DEPDIR)/cdo-userlog.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='userlog.c' object='cdo-userlog.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-userlog.obj -MD -MP -MF $(DEPDIR)/cdo-userlog.Tpo -c -o cdo-userlog.obj `if test -f 'userlog.c'; then $(CYGPATH_W) 'userlog.c'; else $(CYGPATH_W) '$(srcdir)/userlog.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-userlog.Tpo $(DEPDIR)/cdo-userlog.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='userlog.c' object='cdo-userlog.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-userlog.obj `if test -f 'userlog.c'; then $(CYGPATH_W) 'userlog.c'; else $(CYGPATH_W) '$(srcdir)/userlog.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-userlog.obj `if test -f 'userlog.c'; then $(CYGPATH_W) 'userlog.c'; else $(CYGPATH_W) '$(srcdir)/userlog.c'; fi`
 
 cdo-util.o: util.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-util.o -MD -MP -MF $(DEPDIR)/cdo-util.Tpo -c -o cdo-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-util.Tpo $(DEPDIR)/cdo-util.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='util.c' object='cdo-util.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-util.o -MD -MP -MF $(DEPDIR)/cdo-util.Tpo -c -o cdo-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-util.Tpo $(DEPDIR)/cdo-util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='cdo-util.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
 
 cdo-util.obj: util.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-util.obj -MD -MP -MF $(DEPDIR)/cdo-util.Tpo -c -o cdo-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-util.Tpo $(DEPDIR)/cdo-util.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='util.c' object='cdo-util.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-util.obj -MD -MP -MF $(DEPDIR)/cdo-util.Tpo -c -o cdo-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-util.Tpo $(DEPDIR)/cdo-util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='cdo-util.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
 
 cdo-vinterp.o: vinterp.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-vinterp.o -MD -MP -MF $(DEPDIR)/cdo-vinterp.Tpo -c -o cdo-vinterp.o `test -f 'vinterp.c' || echo '$(srcdir)/'`vinterp.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-vinterp.Tpo $(DEPDIR)/cdo-vinterp.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='vinterp.c' object='cdo-vinterp.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-vinterp.o -MD -MP -MF $(DEPDIR)/cdo-vinterp.Tpo -c -o cdo-vinterp.o `test -f 'vinterp.c' || echo '$(srcdir)/'`vinterp.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-vinterp.Tpo $(DEPDIR)/cdo-vinterp.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vinterp.c' object='cdo-vinterp.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-vinterp.o `test -f 'vinterp.c' || echo '$(srcdir)/'`vinterp.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-vinterp.o `test -f 'vinterp.c' || echo '$(srcdir)/'`vinterp.c
 
 cdo-vinterp.obj: vinterp.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-vinterp.obj -MD -MP -MF $(DEPDIR)/cdo-vinterp.Tpo -c -o cdo-vinterp.obj `if test -f 'vinterp.c'; then $(CYGPATH_W) 'vinterp.c'; else $(CYGPATH_W) '$(srcdir)/vinterp.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-vinterp.Tpo $(DEPDIR)/cdo-vinterp.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='vinterp.c' object='cdo-vinterp.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-vinterp.obj -MD -MP -MF $(DEPDIR)/cdo-vinterp.Tpo -c -o cdo-vinterp.obj `if test -f 'vinterp.c'; then $(CYGPATH_W) 'vinterp.c'; else $(CYGPATH_W) '$(srcdir)/vinterp.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-vinterp.Tpo $(DEPDIR)/cdo-vinterp.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vinterp.c' object='cdo-vinterp.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-vinterp.obj `if test -f 'vinterp.c'; then $(CYGPATH_W) 'vinterp.c'; else $(CYGPATH_W) '$(srcdir)/vinterp.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-vinterp.obj `if test -f 'vinterp.c'; then $(CYGPATH_W) 'vinterp.c'; else $(CYGPATH_W) '$(srcdir)/vinterp.c'; fi`
 
 cdo-zaxis.o: zaxis.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-zaxis.o -MD -MP -MF $(DEPDIR)/cdo-zaxis.Tpo -c -o cdo-zaxis.o `test -f 'zaxis.c' || echo '$(srcdir)/'`zaxis.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-zaxis.Tpo $(DEPDIR)/cdo-zaxis.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='zaxis.c' object='cdo-zaxis.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-zaxis.o -MD -MP -MF $(DEPDIR)/cdo-zaxis.Tpo -c -o cdo-zaxis.o `test -f 'zaxis.c' || echo '$(srcdir)/'`zaxis.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-zaxis.Tpo $(DEPDIR)/cdo-zaxis.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='zaxis.c' object='cdo-zaxis.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-zaxis.o `test -f 'zaxis.c' || echo '$(srcdir)/'`zaxis.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-zaxis.o `test -f 'zaxis.c' || echo '$(srcdir)/'`zaxis.c
 
 cdo-zaxis.obj: zaxis.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-zaxis.obj -MD -MP -MF $(DEPDIR)/cdo-zaxis.Tpo -c -o cdo-zaxis.obj `if test -f 'zaxis.c'; then $(CYGPATH_W) 'zaxis.c'; else $(CYGPATH_W) '$(srcdir)/zaxis.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-zaxis.Tpo $(DEPDIR)/cdo-zaxis.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='zaxis.c' object='cdo-zaxis.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-zaxis.obj -MD -MP -MF $(DEPDIR)/cdo-zaxis.Tpo -c -o cdo-zaxis.obj `if test -f 'zaxis.c'; then $(CYGPATH_W) 'zaxis.c'; else $(CYGPATH_W) '$(srcdir)/zaxis.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-zaxis.Tpo $(DEPDIR)/cdo-zaxis.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='zaxis.c' object='cdo-zaxis.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-zaxis.obj `if test -f 'zaxis.c'; then $(CYGPATH_W) 'zaxis.c'; else $(CYGPATH_W) '$(srcdir)/zaxis.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-zaxis.obj `if test -f 'zaxis.c'; then $(CYGPATH_W) 'zaxis.c'; else $(CYGPATH_W) '$(srcdir)/zaxis.c'; fi`
 
 cdo-clipping.o: clipping/clipping.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-clipping.o -MD -MP -MF $(DEPDIR)/cdo-clipping.Tpo -c -o cdo-clipping.o `test -f 'clipping/clipping.c' || echo '$(srcdir)/'`clipping/clipping.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-clipping.Tpo $(DEPDIR)/cdo-clipping.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/clipping.c' object='cdo-clipping.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-clipping.o -MD -MP -MF $(DEPDIR)/cdo-clipping.Tpo -c -o cdo-clipping.o `test -f 'clipping/clipping.c' || echo '$(srcdir)/'`clipping/clipping.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-clipping.Tpo $(DEPDIR)/cdo-clipping.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/clipping.c' object='cdo-clipping.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-clipping.o `test -f 'clipping/clipping.c' || echo '$(srcdir)/'`clipping/clipping.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-clipping.o `test -f 'clipping/clipping.c' || echo '$(srcdir)/'`clipping/clipping.c
 
 cdo-clipping.obj: clipping/clipping.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-clipping.obj -MD -MP -MF $(DEPDIR)/cdo-clipping.Tpo -c -o cdo-clipping.obj `if test -f 'clipping/clipping.c'; then $(CYGPATH_W) 'clipping/clipping.c'; else $(CYGPATH_W) '$(srcdir)/clipping/clipping.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-clipping.Tpo $(DEPDIR)/cdo-clipping.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/clipping.c' object='cdo-clipping.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-clipping.obj -MD -MP -MF $(DEPDIR)/cdo-clipping.Tpo -c -o cdo-clipping.obj `if test -f 'clipping/clipping.c'; then $(CYGPATH_W) 'clipping/clipping.c'; else $(CYGPATH_W) '$(srcdir)/clipping/clipping.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-clipping.Tpo $(DEPDIR)/cdo-clipping.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/clipping.c' object='cdo-clipping.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-clipping.obj `if test -f 'clipping/clipping.c'; then $(CYGPATH_W) 'clipping/clipping.c'; else $(CYGPATH_W) '$(srcdir)/clipping/clipping.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-clipping.obj `if test -f 'clipping/clipping.c'; then $(CYGPATH_W) 'clipping/clipping.c'; else $(CYGPATH_W) '$(srcdir)/clipping/clipping.c'; fi`
 
 cdo-area.o: clipping/area.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-area.o -MD -MP -MF $(DEPDIR)/cdo-area.Tpo -c -o cdo-area.o `test -f 'clipping/area.c' || echo '$(srcdir)/'`clipping/area.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-area.Tpo $(DEPDIR)/cdo-area.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/area.c' object='cdo-area.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-area.o -MD -MP -MF $(DEPDIR)/cdo-area.Tpo -c -o cdo-area.o `test -f 'clipping/area.c' || echo '$(srcdir)/'`clipping/area.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-area.Tpo $(DEPDIR)/cdo-area.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/area.c' object='cdo-area.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-area.o `test -f 'clipping/area.c' || echo '$(srcdir)/'`clipping/area.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-area.o `test -f 'clipping/area.c' || echo '$(srcdir)/'`clipping/area.c
 
 cdo-area.obj: clipping/area.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-area.obj -MD -MP -MF $(DEPDIR)/cdo-area.Tpo -c -o cdo-area.obj `if test -f 'clipping/area.c'; then $(CYGPATH_W) 'clipping/area.c'; else $(CYGPATH_W) '$(srcdir)/clipping/area.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-area.Tpo $(DEPDIR)/cdo-area.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/area.c' object='cdo-area.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-area.obj -MD -MP -MF $(DEPDIR)/cdo-area.Tpo -c -o cdo-area.obj `if test -f 'clipping/area.c'; then $(CYGPATH_W) 'clipping/area.c'; else $(CYGPATH_W) '$(srcdir)/clipping/area.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-area.Tpo $(DEPDIR)/cdo-area.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/area.c' object='cdo-area.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-area.obj `if test -f 'clipping/area.c'; then $(CYGPATH_W) 'clipping/area.c'; else $(CYGPATH_W) '$(srcdir)/clipping/area.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-area.obj `if test -f 'clipping/area.c'; then $(CYGPATH_W) 'clipping/area.c'; else $(CYGPATH_W) '$(srcdir)/clipping/area.c'; fi`
 
 cdo-ensure_array_size.o: clipping/ensure_array_size.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ensure_array_size.o -MD -MP -MF $(DEPDIR)/cdo-ensure_array_size.Tpo -c -o cdo-ensure_array_size.o `test -f 'clipping/ensure_array_size.c' || echo '$(srcdir)/'`clipping/ensure_array_size.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-ensure_array_size.Tpo $(DEPDIR)/cdo-ensure_array_size.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/ensure_array_size.c' object='cdo-ensure_array_size.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ensure_array_size.o -MD -MP -MF $(DEPDIR)/cdo-ensure_array_size.Tpo -c -o cdo-ensure_array_size.o `test -f 'clipping/ensure_array_size.c' || echo '$(srcdir)/'`clipping/ensure_array_size.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-ensure_array_size.Tpo $(DEPDIR)/cdo-ensure_array_size.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/ensure_array_size.c' object='cdo-ensure_array_size.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ensure_array_size.o `test -f 'clipping/ensure_array_size.c' || echo '$(srcdir)/'`clipping/ensure_array_size.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ensure_array_size.o `test -f 'clipping/ensure_array_size.c' || echo '$(srcdir)/'`clipping/ensure_array_size.c
 
 cdo-ensure_array_size.obj: clipping/ensure_array_size.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ensure_array_size.obj -MD -MP -MF $(DEPDIR)/cdo-ensure_array_size.Tpo -c -o cdo-ensure_array_size.obj `if test -f 'clipping/ensure_array_size.c'; then $(CYGPATH_W) 'clipping/ensure_array_size.c'; else $(CYGPATH_W) '$(srcdir)/clipping/ensure_array_size.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-ensure_array_size.Tpo $(DEPDIR)/cdo-ensure_array_size.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/ensure_array_size.c' object='cdo-ensure_array_size.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-ensure_array_size.obj -MD -MP -MF $(DEPDIR)/cdo-ensure_array_size.Tpo -c -o cdo-ensure_array_size.obj `if test -f 'clipping/ensure_array_size.c'; then $(CYGPATH_W) 'clipping/ensure_array_size.c'; else $(CYGPATH_W) '$(srcdir)/clipping/ensure_array_size.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-ensure_array_size.Tpo $(DEPDIR)/cdo-ensure_array_size.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/ensure_array_size.c' object='cdo-ensure_array_size.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ensure_array_size.obj `if test -f 'clipping/ensure_array_size.c'; then $(CYGPATH_W) 'clipping/ensure_array_size.c'; else $(CYGPATH_W) '$(srcdir)/clipping/ensure_array_size.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-ensure_array_size.obj `if test -f 'clipping/ensure_array_size.c'; then $(CYGPATH_W) 'clipping/ensure_array_size.c'; else $(CYGPATH_W) '$(srcdir)/clipping/ensure_array_size.c'; fi`
 
 cdo-geometry_tools.o: clipping/geometry_tools.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-geometry_tools.o -MD -MP -MF $(DEPDIR)/cdo-geometry_tools.Tpo -c -o cdo-geometry_tools.o `test -f 'clipping/geometry_tools.c' || echo '$(srcdir)/'`clipping/geometry_tools.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-geometry_tools.Tpo $(DEPDIR)/cdo-geometry_tools.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/geometry_tools.c' object='cdo-geometry_tools.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-geometry_tools.o -MD -MP -MF $(DEPDIR)/cdo-geometry_tools.Tpo -c -o cdo-geometry_tools.o `test -f 'clipping/geometry_tools.c' || echo '$(srcdir)/'`clipping/geometry_tools.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-geometry_tools.Tpo $(DEPDIR)/cdo-geometry_tools.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/geometry_tools.c' object='cdo-geometry_tools.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-geometry_tools.o `test -f 'clipping/geometry_tools.c' || echo '$(srcdir)/'`clipping/geometry_tools.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-geometry_tools.o `test -f 'clipping/geometry_tools.c' || echo '$(srcdir)/'`clipping/geometry_tools.c
 
 cdo-geometry_tools.obj: clipping/geometry_tools.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-geometry_tools.obj -MD -MP -MF $(DEPDIR)/cdo-geometry_tools.Tpo -c -o cdo-geometry_tools.obj `if test -f 'clipping/geometry_tools.c'; then $(CYGPATH_W) 'clipping/geometry_tools.c'; else $(CYGPATH_W) '$(srcdir)/clipping/geometry_tools.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-geometry_tools.Tpo $(DEPDIR)/cdo-geometry_tools.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/geometry_tools.c' object='cdo-geometry_tools.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-geometry_tools.obj -MD -MP -MF $(DEPDIR)/cdo-geometry_tools.Tpo -c -o cdo-geometry_tools.obj `if test -f 'clipping/geometry_tools.c'; then $(CYGPATH_W) 'clipping/geometry_tools.c'; else $(CYGPATH_W) '$(srcdir)/clipping/geometry_tools.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-geometry_tools.Tpo $(DEPDIR)/cdo-geometry_tools.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/geometry_tools.c' object='cdo-geometry_tools.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-geometry_tools.obj `if test -f 'clipping/geometry_tools.c'; then $(CYGPATH_W) 'clipping/geometry_tools.c'; else $(CYGPATH_W) '$(srcdir)/clipping/geometry_tools.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-geometry_tools.obj `if test -f 'clipping/geometry_tools.c'; then $(CYGPATH_W) 'clipping/geometry_tools.c'; else $(CYGPATH_W) '$(srcdir)/clipping/geometry_tools.c'; fi`
 
 cdo-grid_cell.o: clipping/grid_cell.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_cell.o -MD -MP -MF $(DEPDIR)/cdo-grid_cell.Tpo -c -o cdo-grid_cell.o `test -f 'clipping/grid_cell.c' || echo '$(srcdir)/'`clipping/grid_cell.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_cell.Tpo $(DEPDIR)/cdo-grid_cell.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/grid_cell.c' object='cdo-grid_cell.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_cell.o -MD -MP -MF $(DEPDIR)/cdo-grid_cell.Tpo -c -o cdo-grid_cell.o `test -f 'clipping/grid_cell.c' || echo '$(srcdir)/'`clipping/grid_cell.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_cell.Tpo $(DEPDIR)/cdo-grid_cell.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/grid_cell.c' object='cdo-grid_cell.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_cell.o `test -f 'clipping/grid_cell.c' || echo '$(srcdir)/'`clipping/grid_cell.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_cell.o `test -f 'clipping/grid_cell.c' || echo '$(srcdir)/'`clipping/grid_cell.c
 
 cdo-grid_cell.obj: clipping/grid_cell.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_cell.obj -MD -MP -MF $(DEPDIR)/cdo-grid_cell.Tpo -c -o cdo-grid_cell.obj `if test -f 'clipping/grid_cell.c'; then $(CYGPATH_W) 'clipping/grid_cell.c'; else $(CYGPATH_W) '$(srcdir)/clipping/grid_cell.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-grid_cell.Tpo $(DEPDIR)/cdo-grid_cell.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/grid_cell.c' object='cdo-grid_cell.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-grid_cell.obj -MD -MP -MF $(DEPDIR)/cdo-grid_cell.Tpo -c -o cdo-grid_cell.obj `if test -f 'clipping/grid_cell.c'; then $(CYGPATH_W) 'clipping/grid_cell.c'; else $(CYGPATH_W) '$(srcdir)/clipping/grid_cell.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-grid_cell.Tpo $(DEPDIR)/cdo-grid_cell.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/grid_cell.c' object='cdo-grid_cell.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_cell.obj `if test -f 'clipping/grid_cell.c'; then $(CYGPATH_W) 'clipping/grid_cell.c'; else $(CYGPATH_W) '$(srcdir)/clipping/grid_cell.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-grid_cell.obj `if test -f 'clipping/grid_cell.c'; then $(CYGPATH_W) 'clipping/grid_cell.c'; else $(CYGPATH_W) '$(srcdir)/clipping/grid_cell.c'; fi`
 
 cdo-intersection.o: clipping/intersection.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-intersection.o -MD -MP -MF $(DEPDIR)/cdo-intersection.Tpo -c -o cdo-intersection.o `test -f 'clipping/intersection.c' || echo '$(srcdir)/'`clipping/intersection.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-intersection.Tpo $(DEPDIR)/cdo-intersection.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/intersection.c' object='cdo-intersection.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-intersection.o -MD -MP -MF $(DEPDIR)/cdo-intersection.Tpo -c -o cdo-intersection.o `test -f 'clipping/intersection.c' || echo '$(srcdir)/'`clipping/intersection.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-intersection.Tpo $(DEPDIR)/cdo-intersection.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/intersection.c' object='cdo-intersection.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-intersection.o `test -f 'clipping/intersection.c' || echo '$(srcdir)/'`clipping/intersection.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-intersection.o `test -f 'clipping/intersection.c' || echo '$(srcdir)/'`clipping/intersection.c
 
 cdo-intersection.obj: clipping/intersection.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-intersection.obj -MD -MP -MF $(DEPDIR)/cdo-intersection.Tpo -c -o cdo-intersection.obj `if test -f 'clipping/intersection.c'; then $(CYGPATH_W) 'clipping/intersection.c'; else $(CYGPATH_W) '$(srcdir)/clipping/intersection.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-intersection.Tpo $(DEPDIR)/cdo-intersection.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/intersection.c' object='cdo-intersection.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-intersection.obj -MD -MP -MF $(DEPDIR)/cdo-intersection.Tpo -c -o cdo-intersection.obj `if test -f 'clipping/intersection.c'; then $(CYGPATH_W) 'clipping/intersection.c'; else $(CYGPATH_W) '$(srcdir)/clipping/intersection.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-intersection.Tpo $(DEPDIR)/cdo-intersection.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/intersection.c' object='cdo-intersection.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-intersection.obj `if test -f 'clipping/intersection.c'; then $(CYGPATH_W) 'clipping/intersection.c'; else $(CYGPATH_W) '$(srcdir)/clipping/intersection.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-intersection.obj `if test -f 'clipping/intersection.c'; then $(CYGPATH_W) 'clipping/intersection.c'; else $(CYGPATH_W) '$(srcdir)/clipping/intersection.c'; fi`
 
 cdo-utils.o: clipping/utils.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-utils.o -MD -MP -MF $(DEPDIR)/cdo-utils.Tpo -c -o cdo-utils.o `test -f 'clipping/utils.c' || echo '$(srcdir)/'`clipping/utils.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-utils.Tpo $(DEPDIR)/cdo-utils.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/utils.c' object='cdo-utils.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-utils.o -MD -MP -MF $(DEPDIR)/cdo-utils.Tpo -c -o cdo-utils.o `test -f 'clipping/utils.c' || echo '$(srcdir)/'`clipping/utils.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-utils.Tpo $(DEPDIR)/cdo-utils.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/utils.c' object='cdo-utils.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-utils.o `test -f 'clipping/utils.c' || echo '$(srcdir)/'`clipping/utils.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-utils.o `test -f 'clipping/utils.c' || echo '$(srcdir)/'`clipping/utils.c
 
 cdo-utils.obj: clipping/utils.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-utils.obj -MD -MP -MF $(DEPDIR)/cdo-utils.Tpo -c -o cdo-utils.obj `if test -f 'clipping/utils.c'; then $(CYGPATH_W) 'clipping/utils.c'; else $(CYGPATH_W) '$(srcdir)/clipping/utils.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-utils.Tpo $(DEPDIR)/cdo-utils.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='clipping/utils.c' object='cdo-utils.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-utils.obj -MD -MP -MF $(DEPDIR)/cdo-utils.Tpo -c -o cdo-utils.obj `if test -f 'clipping/utils.c'; then $(CYGPATH_W) 'clipping/utils.c'; else $(CYGPATH_W) '$(srcdir)/clipping/utils.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-utils.Tpo $(DEPDIR)/cdo-utils.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='clipping/utils.c' object='cdo-utils.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-utils.obj `if test -f 'clipping/utils.c'; then $(CYGPATH_W) 'clipping/utils.c'; else $(CYGPATH_W) '$(srcdir)/clipping/utils.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-utils.obj `if test -f 'clipping/utils.c'; then $(CYGPATH_W) 'clipping/utils.c'; else $(CYGPATH_W) '$(srcdir)/clipping/utils.c'; fi`
 
 cdo-Magplot.o: Magplot.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magplot.o -MD -MP -MF $(DEPDIR)/cdo-Magplot.Tpo -c -o cdo-Magplot.o `test -f 'Magplot.c' || echo '$(srcdir)/'`Magplot.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Magplot.Tpo $(DEPDIR)/cdo-Magplot.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Magplot.c' object='cdo-Magplot.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magplot.o -MD -MP -MF $(DEPDIR)/cdo-Magplot.Tpo -c -o cdo-Magplot.o `test -f 'Magplot.c' || echo '$(srcdir)/'`Magplot.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Magplot.Tpo $(DEPDIR)/cdo-Magplot.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Magplot.c' object='cdo-Magplot.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magplot.o `test -f 'Magplot.c' || echo '$(srcdir)/'`Magplot.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magplot.o `test -f 'Magplot.c' || echo '$(srcdir)/'`Magplot.c
 
 cdo-Magplot.obj: Magplot.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magplot.obj -MD -MP -MF $(DEPDIR)/cdo-Magplot.Tpo -c -o cdo-Magplot.obj `if test -f 'Magplot.c'; then $(CYGPATH_W) 'Magplot.c'; else $(CYGPATH_W) '$(srcdir)/Magplot.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Magplot.Tpo $(DEPDIR)/cdo-Magplot.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Magplot.c' object='cdo-Magplot.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magplot.obj -MD -MP -MF $(DEPDIR)/cdo-Magplot.Tpo -c -o cdo-Magplot.obj `if test -f 'Magplot.c'; then $(CYGPATH_W) 'Magplot.c'; else $(CYGPATH_W) '$(srcdir)/Magplot.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Magplot.Tpo $(DEPDIR)/cdo-Magplot.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Magplot.c' object='cdo-Magplot.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magplot.obj `if test -f 'Magplot.c'; then $(CYGPATH_W) 'Magplot.c'; else $(CYGPATH_W) '$(srcdir)/Magplot.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magplot.obj `if test -f 'Magplot.c'; then $(CYGPATH_W) 'Magplot.c'; else $(CYGPATH_W) '$(srcdir)/Magplot.c'; fi`
 
 cdo-Magvector.o: Magvector.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magvector.o -MD -MP -MF $(DEPDIR)/cdo-Magvector.Tpo -c -o cdo-Magvector.o `test -f 'Magvector.c' || echo '$(srcdir)/'`Magvector.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Magvector.Tpo $(DEPDIR)/cdo-Magvector.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Magvector.c' object='cdo-Magvector.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magvector.o -MD -MP -MF $(DEPDIR)/cdo-Magvector.Tpo -c -o cdo-Magvector.o `test -f 'Magvector.c' || echo '$(srcdir)/'`Magvector.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Magvector.Tpo $(DEPDIR)/cdo-Magvector.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Magvector.c' object='cdo-Magvector.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magvector.o `test -f 'Magvector.c' || echo '$(srcdir)/'`Magvector.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magvector.o `test -f 'Magvector.c' || echo '$(srcdir)/'`Magvector.c
 
 cdo-Magvector.obj: Magvector.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magvector.obj -MD -MP -MF $(DEPDIR)/cdo-Magvector.Tpo -c -o cdo-Magvector.obj `if test -f 'Magvector.c'; then $(CYGPATH_W) 'Magvector.c'; else $(CYGPATH_W) '$(srcdir)/Magvector.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Magvector.Tpo $(DEPDIR)/cdo-Magvector.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Magvector.c' object='cdo-Magvector.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Magvector.obj -MD -MP -MF $(DEPDIR)/cdo-Magvector.Tpo -c -o cdo-Magvector.obj `if test -f 'Magvector.c'; then $(CYGPATH_W) 'Magvector.c'; else $(CYGPATH_W) '$(srcdir)/Magvector.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Magvector.Tpo $(DEPDIR)/cdo-Magvector.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Magvector.c' object='cdo-Magvector.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magvector.obj `if test -f 'Magvector.c'; then $(CYGPATH_W) 'Magvector.c'; else $(CYGPATH_W) '$(srcdir)/Magvector.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Magvector.obj `if test -f 'Magvector.c'; then $(CYGPATH_W) 'Magvector.c'; else $(CYGPATH_W) '$(srcdir)/Magvector.c'; fi`
 
 cdo-Maggraph.o: Maggraph.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maggraph.o -MD -MP -MF $(DEPDIR)/cdo-Maggraph.Tpo -c -o cdo-Maggraph.o `test -f 'Maggraph.c' || echo '$(srcdir)/'`Maggraph.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Maggraph.Tpo $(DEPDIR)/cdo-Maggraph.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Maggraph.c' object='cdo-Maggraph.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maggraph.o -MD -MP -MF $(DEPDIR)/cdo-Maggraph.Tpo -c -o cdo-Maggraph.o `test -f 'Maggraph.c' || echo '$(srcdir)/'`Maggraph.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Maggraph.Tpo $(DEPDIR)/cdo-Maggraph.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Maggraph.c' object='cdo-Maggraph.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maggraph.o `test -f 'Maggraph.c' || echo '$(srcdir)/'`Maggraph.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maggraph.o `test -f 'Maggraph.c' || echo '$(srcdir)/'`Maggraph.c
 
 cdo-Maggraph.obj: Maggraph.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maggraph.obj -MD -MP -MF $(DEPDIR)/cdo-Maggraph.Tpo -c -o cdo-Maggraph.obj `if test -f 'Maggraph.c'; then $(CYGPATH_W) 'Maggraph.c'; else $(CYGPATH_W) '$(srcdir)/Maggraph.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-Maggraph.Tpo $(DEPDIR)/cdo-Maggraph.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Maggraph.c' object='cdo-Maggraph.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Maggraph.obj -MD -MP -MF $(DEPDIR)/cdo-Maggraph.Tpo -c -o cdo-Maggraph.obj `if test -f 'Maggraph.c'; then $(CYGPATH_W) 'Maggraph.c'; else $(CYGPATH_W) '$(srcdir)/Maggraph.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Maggraph.Tpo $(DEPDIR)/cdo-Maggraph.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Maggraph.c' object='cdo-Maggraph.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maggraph.obj `if test -f 'Maggraph.c'; then $(CYGPATH_W) 'Maggraph.c'; else $(CYGPATH_W) '$(srcdir)/Maggraph.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Maggraph.obj `if test -f 'Maggraph.c'; then $(CYGPATH_W) 'Maggraph.c'; else $(CYGPATH_W) '$(srcdir)/Maggraph.c'; fi`
 
 cdo-template_parser.o: template_parser.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-template_parser.o -MD -MP -MF $(DEPDIR)/cdo-template_parser.Tpo -c -o cdo-template_parser.o `test -f 'template_parser.c' || echo '$(srcdir)/'`template_parser.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-template_parser.Tpo $(DEPDIR)/cdo-template_parser.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='template_parser.c' object='cdo-template_parser.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-template_parser.o -MD -MP -MF $(DEPDIR)/cdo-template_parser.Tpo -c -o cdo-template_parser.o `test -f 'template_parser.c' || echo '$(srcdir)/'`template_parser.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-template_parser.Tpo $(DEPDIR)/cdo-template_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='template_parser.c' object='cdo-template_parser.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-template_parser.o `test -f 'template_parser.c' || echo '$(srcdir)/'`template_parser.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-template_parser.o `test -f 'template_parser.c' || echo '$(srcdir)/'`template_parser.c
 
 cdo-template_parser.obj: template_parser.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-template_parser.obj -MD -MP -MF $(DEPDIR)/cdo-template_parser.Tpo -c -o cdo-template_parser.obj `if test -f 'template_parser.c'; then $(CYGPATH_W) 'template_parser.c'; else $(CYGPATH_W) '$(srcdir)/template_parser.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-template_parser.Tpo $(DEPDIR)/cdo-template_parser.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='template_parser.c' object='cdo-template_parser.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-template_parser.obj -MD -MP -MF $(DEPDIR)/cdo-template_parser.Tpo -c -o cdo-template_parser.obj `if test -f 'template_parser.c'; then $(CYGPATH_W) 'template_parser.c'; else $(CYGPATH_W) '$(srcdir)/template_parser.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-template_parser.Tpo $(DEPDIR)/cdo-template_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='template_parser.c' object='cdo-template_parser.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-template_parser.obj `if test -f 'template_parser.c'; then $(CYGPATH_W) 'template_parser.c'; else $(CYGPATH_W) '$(srcdir)/template_parser.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-template_parser.obj `if test -f 'template_parser.c'; then $(CYGPATH_W) 'template_parser.c'; else $(CYGPATH_W) '$(srcdir)/template_parser.c'; fi`
 
 cdo-results_template_parser.o: results_template_parser.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-results_template_parser.o -MD -MP -MF $(DEPDIR)/cdo-results_template_parser.Tpo -c -o cdo-results_template_parser.o `test -f 'results_template_parser.c' || echo '$(srcdir)/'`results_template_parser.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-results_template_parser.Tpo $(DEPDIR)/cdo-results_template_parser.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='results_template_parser.c' object='cdo-results_template_parser.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-results_template_parser.o -MD -MP -MF $(DEPDIR)/cdo-results_template_parser.Tpo -c -o cdo-results_template_parser.o `test -f 'results_template_parser.c' || echo '$(srcdir)/'`results_template_parser.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-results_template_parser.Tpo $(DEPDIR)/cdo-results_template_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='results_template_parser.c' object='cdo-results_template_parser.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-results_template_parser.o `test -f 'results_template_parser.c' || echo '$(srcdir)/'`results_template_parser.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-results_template_parser.o `test -f 'results_template_parser.c' || echo '$(srcdir)/'`results_template_parser.c
 
 cdo-results_template_parser.obj: results_template_parser.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-results_template_parser.obj -MD -MP -MF $(DEPDIR)/cdo-results_template_parser.Tpo -c -o cdo-results_template_parser.obj `if test -f 'results_template_parser.c'; then $(CYGPATH_W) 'results_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/results_template_parser.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-results_template_parser.Tpo $(DEPDIR)/cdo-results_template_parser.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='results_template_parser.c' object='cdo-results_template_parser.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-results_template_parser.obj -MD -MP -MF $(DEPDIR)/cdo-results_template_parser.Tpo -c -o cdo-results_template_parser.obj `if test -f 'results_template_parser.c'; then $(CYGPATH_W) 'results_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/results_template_parser.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-results_template_parser.Tpo $(DEPDIR)/cdo-results_template_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='results_template_parser.c' object='cdo-results_template_parser.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-results_template_parser.obj `if test -f 'results_template_parser.c'; then $(CYGPATH_W) 'results_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/results_template_parser.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-results_template_parser.obj `if test -f 'results_template_parser.c'; then $(CYGPATH_W) 'results_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/results_template_parser.c'; fi`
 
 cdo-magics_template_parser.o: magics_template_parser.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-magics_template_parser.o -MD -MP -MF $(DEPDIR)/cdo-magics_template_parser.Tpo -c -o cdo-magics_template_parser.o `test -f 'magics_template_parser.c' || echo '$(srcdir)/'`magics_template_parser.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-magics_template_parser.Tpo $(DEPDIR)/cdo-magics_template_parser.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='magics_template_parser.c' object='cdo-magics_template_parser.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-magics_template_parser.o -MD -MP -MF $(DEPDIR)/cdo-magics_template_parser.Tpo -c -o cdo-magics_template_parser.o `test -f 'magics_template_parser.c' || echo '$(srcdir)/'`magics_template_parser.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-magics_template_parser.Tpo $(DEPDIR)/cdo-magics_template_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='magics_template_parser.c' object='cdo-magics_template_parser.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-magics_template_parser.o `test -f 'magics_template_parser.c' || echo '$(srcdir)/'`magics_template_parser.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-magics_template_parser.o `test -f 'magics_template_parser.c' || echo '$(srcdir)/'`magics_template_parser.c
 
 cdo-magics_template_parser.obj: magics_template_parser.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-magics_template_parser.obj -MD -MP -MF $(DEPDIR)/cdo-magics_template_parser.Tpo -c -o cdo-magics_template_parser.obj `if test -f 'magics_template_parser.c'; then $(CYGPATH_W) 'magics_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/magics_template_parser.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-magics_template_parser.Tpo $(DEPDIR)/cdo-magics_template_parser.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='magics_template_parser.c' object='cdo-magics_template_parser.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-magics_template_parser.obj -MD -MP -MF $(DEPDIR)/cdo-magics_template_parser.Tpo -c -o cdo-magics_template_parser.obj `if test -f 'magics_template_parser.c'; then $(CYGPATH_W) 'magics_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/magics_template_parser.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-magics_template_parser.Tpo $(DEPDIR)/cdo-magics_template_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='magics_template_parser.c' object='cdo-magics_template_parser.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-magics_template_parser.obj `if test -f 'magics_template_parser.c'; then $(CYGPATH_W) 'magics_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/magics_template_parser.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-magics_template_parser.obj `if test -f 'magics_template_parser.c'; then $(CYGPATH_W) 'magics_template_parser.c'; else $(CYGPATH_W) '$(srcdir)/magics_template_parser.c'; fi`
 
 cdo-StringUtilities.o: StringUtilities.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-StringUtilities.o -MD -MP -MF $(DEPDIR)/cdo-StringUtilities.Tpo -c -o cdo-StringUtilities.o `test -f 'StringUtilities.c' || echo '$(srcdir)/'`StringUtilities.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-StringUtilities.Tpo $(DEPDIR)/cdo-StringUtilities.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='StringUtilities.c' object='cdo-StringUtilities.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-StringUtilities.o -MD -MP -MF $(DEPDIR)/cdo-StringUtilities.Tpo -c -o cdo-StringUtilities.o `test -f 'StringUtilities.c' || echo '$(srcdir)/'`StringUtilities.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-StringUtilities.Tpo $(DEPDIR)/cdo-StringUtilities.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='StringUtilities.c' object='cdo-StringUtilities.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-StringUtilities.o `test -f 'StringUtilities.c' || echo '$(srcdir)/'`StringUtilities.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-StringUtilities.o `test -f 'StringUtilities.c' || echo '$(srcdir)/'`StringUtilities.c
 
 cdo-StringUtilities.obj: StringUtilities.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-StringUtilities.obj -MD -MP -MF $(DEPDIR)/cdo-StringUtilities.Tpo -c -o cdo-StringUtilities.obj `if test -f 'StringUtilities.c'; then $(CYGPATH_W) 'StringUtilities.c'; else $(CYGPATH_W) '$(srcdir)/StringUtilities.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-StringUtilities.Tpo $(DEPDIR)/cdo-StringUtilities.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='StringUtilities.c' object='cdo-StringUtilities.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-StringUtilities.obj -MD -MP -MF $(DEPDIR)/cdo-StringUtilities.Tpo -c -o cdo-StringUtilities.obj `if test -f 'StringUtilities.c'; then $(CYGPATH_W) 'StringUtilities.c'; else $(CYGPATH_W) '$(srcdir)/StringUtilities.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-StringUtilities.Tpo $(DEPDIR)/cdo-StringUtilities.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='StringUtilities.c' object='cdo-StringUtilities.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-StringUtilities.obj `if test -f 'StringUtilities.c'; then $(CYGPATH_W) 'StringUtilities.c'; else $(CYGPATH_W) '$(srcdir)/StringUtilities.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-StringUtilities.obj `if test -f 'StringUtilities.c'; then $(CYGPATH_W) 'StringUtilities.c'; else $(CYGPATH_W) '$(srcdir)/StringUtilities.c'; fi`
 
 cdo-CdoMagicsMapper.o: CdoMagicsMapper.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CdoMagicsMapper.o -MD -MP -MF $(DEPDIR)/cdo-CdoMagicsMapper.Tpo -c -o cdo-CdoMagicsMapper.o `test -f 'CdoMagicsMapper.c' || echo '$(srcdir)/'`CdoMagicsMapper.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CdoMagicsMapper.Tpo $(DEPDIR)/cdo-CdoMagicsMapper.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CdoMagicsMapper.c' object='cdo-CdoMagicsMapper.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CdoMagicsMapper.o -MD -MP -MF $(DEPDIR)/cdo-CdoMagicsMapper.Tpo -c -o cdo-CdoMagicsMapper.o `test -f 'CdoMagicsMapper.c' || echo '$(srcdir)/'`CdoMagicsMapper.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CdoMagicsMapper.Tpo $(DEPDIR)/cdo-CdoMagicsMapper.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CdoMagicsMapper.c' object='cdo-CdoMagicsMapper.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CdoMagicsMapper.o `test -f 'CdoMagicsMapper.c' || echo '$(srcdir)/'`CdoMagicsMapper.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CdoMagicsMapper.o `test -f 'CdoMagicsMapper.c' || echo '$(srcdir)/'`CdoMagicsMapper.c
 
 cdo-CdoMagicsMapper.obj: CdoMagicsMapper.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CdoMagicsMapper.obj -MD -MP -MF $(DEPDIR)/cdo-CdoMagicsMapper.Tpo -c -o cdo-CdoMagicsMapper.obj `if test -f 'CdoMagicsMapper.c'; then $(CYGPATH_W) 'CdoMagicsMapper.c'; else $(CYGPATH_W) '$(srcdir)/CdoMagicsMapper.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdo-CdoMagicsMapper.Tpo $(DEPDIR)/cdo-CdoMagicsMapper.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='CdoMagicsMapper.c' object='cdo-CdoMagicsMapper.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-CdoMagicsMapper.obj -MD -MP -MF $(DEPDIR)/cdo-CdoMagicsMapper.Tpo -c -o cdo-CdoMagicsMapper.obj `if test -f 'CdoMagicsMapper.c'; then $(CYGPATH_W) 'CdoMagicsMapper.c'; else $(CYGPATH_W) '$(srcdir)/CdoMagicsMapper.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdo-CdoMagicsMapper.Tpo $(DEPDIR)/cdo-CdoMagicsMapper.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='CdoMagicsMapper.c' object='cdo-CdoMagicsMapper.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CdoMagicsMapper.obj `if test -f 'CdoMagicsMapper.c'; then $(CYGPATH_W) 'CdoMagicsMapper.c'; else $(CYGPATH_W) '$(srcdir)/CdoMagicsMapper.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-CdoMagicsMapper.obj `if test -f 'CdoMagicsMapper.c'; then $(CYGPATH_W) 'CdoMagicsMapper.c'; else $(CYGPATH_W) '$(srcdir)/CdoMagicsMapper.c'; fi`
 
 cdotest-cdotest.o: cdotest.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdotest-cdotest.o -MD -MP -MF $(DEPDIR)/cdotest-cdotest.Tpo -c -o cdotest-cdotest.o `test -f 'cdotest.c' || echo '$(srcdir)/'`cdotest.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdotest-cdotest.Tpo $(DEPDIR)/cdotest-cdotest.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdotest.c' object='cdotest-cdotest.o' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdotest-cdotest.o -MD -MP -MF $(DEPDIR)/cdotest-cdotest.Tpo -c -o cdotest-cdotest.o `test -f 'cdotest.c' || echo '$(srcdir)/'`cdotest.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdotest-cdotest.Tpo $(DEPDIR)/cdotest-cdotest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdotest.c' object='cdotest-cdotest.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdotest-cdotest.o `test -f 'cdotest.c' || echo '$(srcdir)/'`cdotest.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdotest-cdotest.o `test -f 'cdotest.c' || echo '$(srcdir)/'`cdotest.c
 
 cdotest-cdotest.obj: cdotest.c
- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdotest-cdotest.obj -MD -MP -MF $(DEPDIR)/cdotest-cdotest.Tpo -c -o cdotest-cdotest.obj `if test -f 'cdotest.c'; then $(CYGPATH_W) 'cdotest.c'; else $(CYGPATH_W) '$(srcdir)/cdotest.c'; fi`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/cdotest-cdotest.Tpo $(DEPDIR)/cdotest-cdotest.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cdotest.c' object='cdotest-cdotest.obj' libtool=no @AMDEPBACKSLASH@
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdotest-cdotest.obj -MD -MP -MF $(DEPDIR)/cdotest-cdotest.Tpo -c -o cdotest-cdotest.obj `if test -f 'cdotest.c'; then $(CYGPATH_W) 'cdotest.c'; else $(CYGPATH_W) '$(srcdir)/cdotest.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cdotest-cdotest.Tpo $(DEPDIR)/cdotest-cdotest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cdotest.c' object='cdotest-cdotest.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdotest-cdotest.obj `if test -f 'cdotest.c'; then $(CYGPATH_W) 'cdotest.c'; else $(CYGPATH_W) '$(srcdir)/cdotest.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdotest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdotest-cdotest.obj `if test -f 'cdotest.c'; then $(CYGPATH_W) 'cdotest.c'; else $(CYGPATH_W) '$(srcdir)/cdotest.c'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -4517,26 +4758,15 @@ mostlyclean-libtool:
 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) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS) 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; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -4548,15 +4778,11 @@ TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	      $$unique; \
 	  fi; \
 	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS) 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; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -4565,6 +4791,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -4710,9 +4951,10 @@ uninstall-am: uninstall-binPROGRAMS
 
 .MAKE: all install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool clean-noinstPROGRAMS ctags \
-	distclean distclean-compile distclean-generic distclean-hdr \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libtool \
+	clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
+	distclean-compile distclean-generic distclean-hdr \
 	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 \
@@ -4722,13 +4964,8 @@ uninstall-am: uninstall-binPROGRAMS
 	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
-
+	tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
 
-cdo-userlog.o: userlog.c config.h
-	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.c
-cdo_static-userlog.o: userlog.c config.h
-	$(COMPILE) -DLOGPATH=${exec_prefix}/log -c -o cdo_static-userlog.o `test -f 'userlog.c' || echo '$(srcdir)/'`userlog.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.
diff --git a/src/Maskbox.c b/src/Maskbox.c
index f2034e6..c2b0d1a 100644
--- a/src/Maskbox.c
+++ b/src/Maskbox.c
@@ -145,8 +145,8 @@ void maskregion(int *mask, int gridID, double *xcoords, double *ycoords, int nof
   nlon = gridInqXsize(gridID);
   nlat = gridInqYsize(gridID);
 
-  xvals = malloc(nlon*sizeof(double));
-  yvals = malloc(nlat*sizeof(double));
+  xvals = (double*) malloc(nlon*sizeof(double));
+  yvals = (double*) malloc(nlat*sizeof(double));
 
   gridInqXvals(gridID, xvals);
   gridInqYvals(gridID, yvals);  
@@ -304,7 +304,7 @@ void *Maskbox(void *argument)
   vlistDefTaxis(vlistID2, taxisID2);
 
   nvars = vlistNvars(vlistID1);
-  vars  = malloc(nvars*sizeof(int));
+  vars  = (int*) malloc(nvars*sizeof(int));
   for ( varID = 0; varID < nvars; varID++ )
     {
       if ( gridID == vlistInqVarGrid(vlistID1, varID) )
@@ -318,8 +318,8 @@ void *Maskbox(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = gridInqSize(gridID);
-  array = malloc ( gridsize*sizeof(double) );
-  mask  = malloc ( gridsize*sizeof(int) );
+  array = (double*) malloc( gridsize*sizeof(double));
+  mask  = (int*) malloc( gridsize*sizeof(int));
   for( i=0;  i < gridsize; i++) mask[i] = 1;
  
   if ( operatorID == MASKLONLATBOX )
@@ -334,8 +334,8 @@ void *Maskbox(void *argument)
     }
   if ( operatorID == MASKREGION )
     {
-      xcoords = malloc( MAX_VALS*sizeof(double) );
-      ycoords = malloc( MAX_VALS*sizeof(double) );
+      xcoords = (double*) malloc( MAX_VALS*sizeof(double));
+      ycoords = (double*) malloc( MAX_VALS*sizeof(double));
       nfiles = operatorArgc();
      
       for ( i2 = 0; i2 < nfiles; i2++ )
diff --git a/src/Mastrfu.c b/src/Mastrfu.c
index 35fa006..8bf6b01 100644
--- a/src/Mastrfu.c
+++ b/src/Mastrfu.c
@@ -42,12 +42,12 @@ void mastrfu(int gridID, int zaxisID, double *array1, double *array2, int nmiss,
 
   nlat = gridInqSize(gridID);
   nlev = zaxisInqSize(zaxisID);
-  phi    = malloc(nlat*sizeof(double));
-  dummy  = malloc(nlat*sizeof(double));
-  cosphi = malloc(nlat*sizeof(double));
-  plevel = malloc(nlev*sizeof(double));
-  field1 = malloc(nlev*sizeof(double*));
-  field2 = malloc(nlev*sizeof(double*));
+  phi    = (double*) malloc(nlat*sizeof(double));
+  dummy  = (double*) malloc(nlat*sizeof(double));
+  cosphi = (double*) malloc(nlat*sizeof(double));
+  plevel = (double*) malloc(nlev*sizeof(double));
+  field1 = (double**) malloc(nlev*sizeof(double*));
+  field2 = (double**) malloc(nlev*sizeof(double*));
 
   zaxisInqLevels(zaxisID, plevel);
 
@@ -167,8 +167,8 @@ void *Mastrfu(void *argument)
 
   streamDefVlist(streamID2, vlistID2);
 
-  array1 = malloc(gridsize*nlev*sizeof(double));
-  array2 = malloc(gridsize*nlev*sizeof(double));
+  array1 = (double*) malloc(gridsize*nlev*sizeof(double));
+  array2 = (double*) malloc(gridsize*nlev*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Math.c b/src/Math.c
index 2b7e8e0..7a99a82 100644
--- a/src/Math.c
+++ b/src/Math.c
@@ -98,8 +98,8 @@ void *Math(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
 
@@ -132,7 +132,7 @@ void *Math(void *argument)
 	      break;
 	    case FNINT:
 	      for ( i = 0; i < gridsize; i++ )
-		array2[i] = DBL_IS_EQUAL(array1[i], missval1) ? missval1 : NINT(array1[i]);
+		array2[i] = DBL_IS_EQUAL(array1[i], missval1) ? missval1 : round(array1[i]);
 	      break;
 	    case SQR:
 	      for ( i = 0; i < gridsize; i++ )
diff --git a/src/Merge.c b/src/Merge.c
index 9005a02..1636743 100644
--- a/src/Merge.c
+++ b/src/Merge.c
@@ -62,7 +62,7 @@ void checkDupEntry(int vlistID1, int vlistID2, const char *filename)
       if ( nlev1 > mlev1 )
 	{
 	  mlev1 = nlev1;
-	  lev1 = realloc(lev1, mlev1*sizeof(double));
+	  lev1 = (double*) realloc(lev1, mlev1*sizeof(double));
 	}
       zaxisInqLevels(zaxisID1, lev1);
 
@@ -81,7 +81,7 @@ void checkDupEntry(int vlistID1, int vlistID2, const char *filename)
 	      if ( nlev2 > mlev2 )
 		{
 		  mlev2 = nlev2;
-		  lev2 = realloc(lev2, mlev2*sizeof(double));
+		  lev2 = (double*) realloc(lev2, mlev2*sizeof(double));
 		}
 	      zaxisInqLevels(zaxisID2, lev2);
 
@@ -168,8 +168,8 @@ void *Merge(void *argument)
       if ( !userFileOverwrite(ofilename) )
 	cdoAbort("Outputfile %s already exists!", ofilename);
 
-  streamIDs = malloc(nmerge*sizeof(int));
-  vlistIDs  = malloc(nmerge*sizeof(int));
+  streamIDs = (int*) malloc(nmerge*sizeof(int));
+  vlistIDs  = (int*) malloc(nmerge*sizeof(int));
 
   for ( index = 0; index < nmerge; index++ )
     {
@@ -208,7 +208,7 @@ void *Merge(void *argument)
   if ( ! lcopy )
     {
       gridsize = vlistGridsizeMax(vlistID2);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Mergegrid.c b/src/Mergegrid.c
index 0b2199d..33bb324 100644
--- a/src/Mergegrid.c
+++ b/src/Mergegrid.c
@@ -71,13 +71,13 @@ void gen_index(int gridID1, int gridID2, int *index)
       if ( ! (gridInqXvals(gridID2, NULL) && gridInqYvals(gridID2, NULL)) )
 	cdoAbort("Grid 2 has no values!");
 
-      xvals1 = malloc(nlon1*sizeof(double));
-      yvals1 = malloc(nlat1*sizeof(double));
-      xvals2 = malloc(nlon2*sizeof(double));
-      yvals2 = malloc(nlat2*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*sizeof(double));
+      yvals1 = (double*) malloc(nlat1*sizeof(double));
+      xvals2 = (double*) malloc(nlon2*sizeof(double));
+      yvals2 = (double*) malloc(nlat2*sizeof(double));
 
-      xindex = malloc(nlon2*sizeof(int));
-      yindex = malloc(nlat2*sizeof(int));
+      xindex = (int*) malloc(nlon2*sizeof(int));
+      yindex = (int*) malloc(nlat2*sizeof(int));
 
       gridInqXvals(gridID1, xvals1);
       gridInqYvals(gridID1, yvals1);
@@ -220,9 +220,9 @@ void *Mergegrid(void *argument)
   gridsize1 = gridInqSize(gridID1);
   gridsize2 = gridInqSize(gridID2);
 
-  array1 = malloc(gridsize1*sizeof(double));
-  array2 = malloc(gridsize2*sizeof(double));
-  gindex = malloc(gridsize2*sizeof(int));
+  array1 = (double*) malloc(gridsize1*sizeof(double));
+  array2 = (double*) malloc(gridsize2*sizeof(double));
+  gindex = (int*) malloc(gridsize2*sizeof(int));
 
   gen_index(gridID1, gridID2, gindex);
 
diff --git a/src/Mergetime.c b/src/Mergetime.c
index 0c75ccf..3d09547 100644
--- a/src/Mergetime.c
+++ b/src/Mergetime.c
@@ -80,7 +80,7 @@ void *Mergetime(void *argument)
 
   nfiles = cdoStreamCnt() - 1;
 
-  sf = malloc(nfiles*sizeof(sfile_t));
+  sf = (sfile_t*) malloc(nfiles*sizeof(sfile_t));
 
   for ( fileID = 0; fileID < nfiles; fileID++ )
     {
@@ -130,7 +130,7 @@ void *Mergetime(void *argument)
   if ( ! lcopy )
     {
       gridsize = vlistGridsizeMax(sf[0].vlistID);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   while ( TRUE )
diff --git a/src/Merstat.c b/src/Merstat.c
index e043f59..159fd9e 100644
--- a/src/Merstat.c
+++ b/src/Merstat.c
@@ -133,12 +133,12 @@ void *Merstat(void *argument)
   field_init(&field2);
 
   lim = vlistGridsizeMax(vlistID1);
-  field1.ptr    = malloc(lim*sizeof(double));
+  field1.ptr    = (double*) malloc(lim*sizeof(double));
   field1.weight = NULL;
   if ( needWeights )
-    field1.weight = malloc(lim*sizeof(double));
+    field1.weight = (double*) malloc(lim*sizeof(double));
 
-  field2.ptr  = malloc(nlonmax*sizeof(double));
+  field2.ptr  = (double*) malloc(nlonmax*sizeof(double));
   field2.grid = gridID2;
 
   tsID = 0;
diff --git a/src/Monarith.c b/src/Monarith.c
index 75bab6e..7c29718 100644
--- a/src/Monarith.c
+++ b/src/Monarith.c
@@ -72,8 +72,8 @@ void *Monarith(void *argument)
   field_init(&field1);
   field_init(&field2);
 
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   taxisID1 = vlistInqTaxis(vlistID1);
   taxisID2 = vlistInqTaxis(vlistID2);
@@ -86,15 +86,15 @@ void *Monarith(void *argument)
 
   nvars  = vlistNvars(vlistID2);
 
-  vardata2  = malloc(nvars*sizeof(double *));
-  varnmiss2 = malloc(nvars*sizeof(int *));
+  vardata2  = (double **) malloc(nvars*sizeof(double *));
+  varnmiss2 = (int **) malloc(nvars*sizeof(int *));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID));
       nlev     = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID));
-      vardata2[varID]  = malloc(nlev*gridsize*sizeof(double));
-      varnmiss2[varID] = malloc(nlev*sizeof(int));
+      vardata2[varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
+      varnmiss2[varID] = (int*) malloc(nlev*sizeof(int));
     }
 
   tsID  = 0;
diff --git a/src/Mrotuv.c b/src/Mrotuv.c
index adc0cf0..e459678 100644
--- a/src/Mrotuv.c
+++ b/src/Mrotuv.c
@@ -261,12 +261,12 @@ void *Mrotuv(void *argument)
   nlon    = gridInqXsize(gridID1);
   nlat    = gridInqYsize(gridID1);
 
-  grid1x  = malloc(gridsize*sizeof(double));
-  grid1y  = malloc(gridsize*sizeof(double));
-  gridux  = malloc(gridsize*sizeof(double));
-  griduy  = malloc(gridsize*sizeof(double));
-  gridvx  = malloc(gridsize*sizeof(double));
-  gridvy  = malloc(gridsize*sizeof(double));
+  grid1x  = (double*) malloc(gridsize*sizeof(double));
+  grid1y  = (double*) malloc(gridsize*sizeof(double));
+  gridux  = (double*) malloc(gridsize*sizeof(double));
+  griduy  = (double*) malloc(gridsize*sizeof(double));
+  gridvx  = (double*) malloc(gridsize*sizeof(double));
+  gridvy  = (double*) malloc(gridsize*sizeof(double));
 
   gridsizex = (nlon+2)*nlat;
 
@@ -331,19 +331,19 @@ void *Mrotuv(void *argument)
   missval1 = vlistInqVarMissval(vlistID1, uid);
   missval2 = vlistInqVarMissval(vlistID1, vid);
 
-  ufield  = malloc(gridsize*sizeof(double));
-  vfield  = malloc(gridsize*sizeof(double));
+  ufield  = (double*) malloc(gridsize*sizeof(double));
+  vfield  = (double*) malloc(gridsize*sizeof(double));
 
-  urfield  = malloc(nlevs*sizeof(double*));
-  vrfield  = malloc(nlevs*sizeof(double*));
+  urfield  = (double**) malloc(nlevs*sizeof(double*));
+  vrfield  = (double**) malloc(nlevs*sizeof(double*));
   for ( lid = 0; lid < nlevs; lid++ )
     {
-      urfield[lid] = malloc(gridsize*sizeof(double));
-      vrfield[lid] = malloc(gridsize*sizeof(double));
+      urfield[lid] = (double*) malloc(gridsize*sizeof(double));
+      vrfield[lid] = (double*) malloc(gridsize*sizeof(double));
     }
 
-  uhelp   = malloc(gridsizex*sizeof(double));
-  vhelp   = malloc(gridsizex*sizeof(double));
+  uhelp   = (double*) malloc(gridsizex*sizeof(double));
+  vhelp   = (double*) malloc(gridsizex*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Mrotuvb.c b/src/Mrotuvb.c
index 565d1a7..7f95af4 100644
--- a/src/Mrotuvb.c
+++ b/src/Mrotuvb.c
@@ -162,8 +162,8 @@ void uv_to_p_grid(int nlon, int nlat, double *grid1x, double *grid1y,
   double *gxhelp, *gyhelp;
 
   gridsizex = (nlon+2)*nlat;
-  gxhelp  = malloc(gridsizex*sizeof(double));
-  gyhelp  = malloc(gridsizex*sizeof(double));
+  gxhelp  = (double*) malloc(gridsizex*sizeof(double));
+  gyhelp  = (double*) malloc(gridsizex*sizeof(double));
 
   /* load to a help field */
   for ( j = 0; j < nlat; j++ )
@@ -323,12 +323,12 @@ void *Mrotuvb(void *argument)
   nlon    = gridInqXsize(gridID1);
   nlat    = gridInqYsize(gridID1);
 
-  grid1x  = malloc(gridsize*sizeof(double));
-  grid1y  = malloc(gridsize*sizeof(double));
-  grid2x  = malloc(gridsize*sizeof(double));
-  grid2y  = malloc(gridsize*sizeof(double));
-  grid3x  = malloc(gridsize*sizeof(double));
-  grid3y  = malloc(gridsize*sizeof(double));
+  grid1x  = (double*) malloc(gridsize*sizeof(double));
+  grid1y  = (double*) malloc(gridsize*sizeof(double));
+  grid2x  = (double*) malloc(gridsize*sizeof(double));
+  grid2y  = (double*) malloc(gridsize*sizeof(double));
+  grid3x  = (double*) malloc(gridsize*sizeof(double));
+  grid3y  = (double*) malloc(gridsize*sizeof(double));
 
   gridInqXvals(gridID1, grid1x);
   gridInqYvals(gridID1, grid1y);
@@ -407,16 +407,16 @@ void *Mrotuvb(void *argument)
   missval1 = vlistInqVarMissval(vlistID1, 0);
   missval2 = vlistInqVarMissval(vlistID2, 0);
 
-  ufield  = malloc(gridsize*sizeof(double));
-  vfield  = malloc(gridsize*sizeof(double));
-  urfield = malloc(gridsize*sizeof(double));
-  vrfield = malloc(gridsize*sizeof(double));
+  ufield  = (double*) malloc(gridsize*sizeof(double));
+  vfield  = (double*) malloc(gridsize*sizeof(double));
+  urfield = (double*) malloc(gridsize*sizeof(double));
+  vrfield = (double*) malloc(gridsize*sizeof(double));
 
   if ( gpint )
     {
       int gridsizex = (nlon+2)*nlat;
-      uhelp   = malloc(gridsizex*sizeof(double));
-      vhelp   = malloc(gridsizex*sizeof(double));
+      uhelp   = (double*) malloc(gridsizex*sizeof(double));
+      vhelp   = (double*) malloc(gridsizex*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Output.c b/src/Output.c
index 6cf1017..dfcb999 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -112,7 +112,7 @@ void *Output(void *argument)
 	for ( i = 0; i < npar; i++ )
 	  printf("key %d = %s\n", i+1, parnames[i]);
 
-      keys = malloc(npar*sizeof(int));
+      keys = (int*) malloc(npar*sizeof(int));
       nkeys = 0;
       nKeys = sizeof(Keynames)/sizeof(char *);
       for ( i = 0; i < npar; i++ )
@@ -156,7 +156,7 @@ void *Output(void *argument)
       gridsize = gridInqSize(gridID);
       gridtype = gridInqType(gridID);
 
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
 
       if ( operatorID == OUTPUTFLD || operatorID == OUTPUTXYZ || operatorID == OUTPUTTAB )
 	{
@@ -167,8 +167,8 @@ void *Output(void *argument)
 
 	  gridtype = gridInqType(gridID);
 
-	  grid_center_lon = malloc(gridsize*sizeof(double));
-	  grid_center_lat = malloc(gridsize*sizeof(double));
+	  grid_center_lon = (double*) malloc(gridsize*sizeof(double));
+	  grid_center_lat = (double*) malloc(gridsize*sizeof(double));
 	  gridInqXvals(gridID, grid_center_lon);
 	  gridInqYvals(gridID, grid_center_lat);
 
diff --git a/src/Outputgmt.c b/src/Outputgmt.c
index 4a39f53..77187c3 100644
--- a/src/Outputgmt.c
+++ b/src/Outputgmt.c
@@ -163,7 +163,7 @@ void verify_grid(int gridtype, int gridsize, int ncorner,
   double lon_bounds[MAX_CORNERS], lat_bounds[MAX_CORNERS];
   double area, sumarea;
 
-  alone_cell = malloc(gridsize*ncorner*sizeof(int));
+  alone_cell = (int*) malloc(gridsize*ncorner*sizeof(int));
 
   check_corners = 0; /* don't execute corner checking (last loop) */
   nout = 0;
@@ -671,7 +671,7 @@ void *Outputgmt(void *argument)
 
   if ( gridInqMaskGME(gridID, NULL) )
     {
-      grid_mask = malloc(gridsize*sizeof(int));
+      grid_mask = (int*) malloc(gridsize*sizeof(int));
       gridInqMaskGME(gridID, grid_mask);
     }
 
@@ -709,8 +709,8 @@ void *Outputgmt(void *argument)
 
   grid_is_circular = gridIsCircular(gridID);
 
-  grid_center_lat = malloc(gridsize*sizeof(double));
-  grid_center_lon = malloc(gridsize*sizeof(double));
+  grid_center_lat = (double*) malloc(gridsize*sizeof(double));
+  grid_center_lon = (double*) malloc(gridsize*sizeof(double));
 
   gridInqYvals(gridID, grid_center_lat);
   gridInqXvals(gridID, grid_center_lon);
@@ -731,8 +731,8 @@ void *Outputgmt(void *argument)
 
       gridsize2 = nlat*(nlon+1);
 
-      grid_center_lat2 = malloc(gridsize2*sizeof(double));
-      grid_center_lon2 = malloc(gridsize2*sizeof(double));
+      grid_center_lat2 = (double*) malloc(gridsize2*sizeof(double));
+      grid_center_lon2 = (double*) malloc(gridsize2*sizeof(double));
 
       make_cyclic(grid_center_lat, grid_center_lat2, nlon, nlat);
       make_cyclic(grid_center_lon, grid_center_lon2, nlon, nlat);
@@ -748,9 +748,9 @@ void *Outputgmt(void *argument)
       plat = grid_center_lat2;
     }
 
-  zaxis_center_lev = malloc(nlev*sizeof(double));
-  zaxis_lower_lev  = malloc(nlev*sizeof(double));
-  zaxis_upper_lev  = malloc(nlev*sizeof(double));
+  zaxis_center_lev = (double*) malloc(nlev*sizeof(double));
+  zaxis_lower_lev  = (double*) malloc(nlev*sizeof(double));
+  zaxis_upper_lev  = (double*) malloc(nlev*sizeof(double));
 
   zaxisInqLevels(zaxisID, zaxis_center_lev);
 
@@ -758,8 +758,8 @@ void *Outputgmt(void *argument)
     {
       if ( gridcorners == 0 ) cdoAbort("grid corner missing!");
       nalloc = gridcorners*gridsize;
-      grid_corner_lat = realloc(grid_corner_lat, nalloc*sizeof(double));
-      grid_corner_lon = realloc(grid_corner_lon, nalloc*sizeof(double));
+      grid_corner_lat = (double*) realloc(grid_corner_lat, nalloc*sizeof(double));
+      grid_corner_lon = (double*) realloc(grid_corner_lon, nalloc*sizeof(double));
 
       if ( gridInqYbounds(gridID, NULL) && gridInqXbounds(gridID, NULL) )
 	{
@@ -808,21 +808,21 @@ void *Outputgmt(void *argument)
 	}
     }
 
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
   parray = array;
 						
   if ( operatorID == OUTPUTCENTER2 && grid_is_circular )
     {
-      array2 = malloc(nlat*(nlon+1)*sizeof(double));
+      array2 = (double*) malloc(nlat*(nlon+1)*sizeof(double));
       parray = array2;
     }
 
   if ( operatorID == OUTPUTVECTOR )
     {
-      uf    = malloc(gridsize*sizeof(double));
-      vf    = malloc(gridsize*sizeof(double));
-      alpha = malloc(gridsize*sizeof(double));
-      auv   = malloc(gridsize*sizeof(double));
+      uf    = (double*) malloc(gridsize*sizeof(double));
+      vf    = (double*) malloc(gridsize*sizeof(double));
+      alpha = (double*) malloc(gridsize*sizeof(double));
+      auv   = (double*) malloc(gridsize*sizeof(double));
     }
 
   if ( operatorID == GRIDVERIFY )
diff --git a/src/Pack.c b/src/Pack.c
index 856e6fd..8b6e783 100644
--- a/src/Pack.c
+++ b/src/Pack.c
@@ -116,8 +116,8 @@ void *Pack(void *argument)
       if ( tsID >= nalloc )
 	{
 	  nalloc += NALLOC_INC;
-	  dtinfo = realloc(dtinfo, nalloc*sizeof(dtinfo_t));
-	  vars   = realloc(vars, nalloc*sizeof(field_t **));
+	  dtinfo = (dtinfo_t*) realloc(dtinfo, nalloc*sizeof(dtinfo_t));
+	  vars   = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	}
 
       taxisInqDTinfo(taxisID1, &dtinfo[tsID]);
@@ -129,7 +129,7 @@ void *Pack(void *argument)
 	  streamInqRecord(streamID1, &varID, &levelID);
 	  gridID   = vlistInqVarGrid(vlistID1, varID);
 	  gridsize = gridInqSize(gridID);
-	  vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+	  vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 	  streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
 	  vars[tsID][varID][levelID].nmiss = nmiss;
 	}
diff --git a/src/Pinfo.c b/src/Pinfo.c
index 113a1ab..e096792 100644
--- a/src/Pinfo.c
+++ b/src/Pinfo.c
@@ -74,8 +74,8 @@ void *Pinfo(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   indg = 0;
   tsID = 0;
diff --git a/src/Pressure.c b/src/Pressure.c
index 8db8a3a..089ab1d 100644
--- a/src/Pressure.c
+++ b/src/Pressure.c
@@ -116,7 +116,7 @@ void *Pressure(void *argument)
 	{
 	  double *level;
 	  int l;
-	  level = malloc(nlevel*sizeof(double));
+	  level = (double*) malloc(nlevel*sizeof(double));
 	  zaxisInqLevels(zaxisID, level);
 	  for ( l = 0; l < nlevel; l++ )
 	    {
@@ -140,7 +140,7 @@ void *Pressure(void *argument)
 		  nhlevf   = nhlev;
 		  nhlevh   = nhlevf + 1;
 	      
-		  vct = malloc(nvct*sizeof(double));
+		  vct = (double*) malloc(nvct*sizeof(double));
 		  zaxisInqVct(zaxisID, vct);
 		}
 	    }
@@ -154,7 +154,7 @@ void *Pressure(void *argument)
 		  nhlevf   = nhlev - 1;
 		  nhlevh   = nhlev;
 	      
-		  vct = malloc(nvct*sizeof(double));
+		  vct = (double*) malloc(nvct*sizeof(double));
 		  zaxisInqVct(zaxisID, vct);
 		}
 	    }
@@ -166,7 +166,7 @@ void *Pressure(void *argument)
 		  int voff = 4;
 		  double *rvct = NULL;
 
-		  rvct = malloc(nvct*sizeof(double));
+		  rvct = (double*) malloc(nvct*sizeof(double));
 		  zaxisInqVct(zaxisID,rvct);
 
 		  if ( (int)(rvct[0]+0.5) == 100000 && rvct[voff] < rvct[voff+1] )
@@ -178,7 +178,7 @@ void *Pressure(void *argument)
 		      nhlevh   = nhlev + 1;
 
 		      vctsize = 2*nhlevh;
-		      vct = malloc(vctsize*sizeof(double));
+		      vct = (double*) malloc(vctsize*sizeof(double));
 
 		      /* calculate VCT for LM */
 
@@ -213,13 +213,13 @@ void *Pressure(void *argument)
 
   if ( zaxisIDh != -1 && ngp > 0 )
     {
-      ps_prog    = malloc(ngp*sizeof(double));
-      deltap     = malloc(ngp*nhlevf*sizeof(double));
-      full_press = malloc(ngp*nhlevf*sizeof(double));
-      half_press = malloc(ngp*nhlevh*sizeof(double));
+      ps_prog    = (double*) malloc(ngp*sizeof(double));
+      deltap     = (double*) malloc(ngp*nhlevf*sizeof(double));
+      full_press = (double*) malloc(ngp*nhlevf*sizeof(double));
+      half_press = (double*) malloc(ngp*nhlevh*sizeof(double));
     }
   else
-    cdoAbort("No data on hybrid model level found!");
+    cdoAbort("No 3D variable with hybrid sigma pressure coordinate found!");
 
   if ( operatorID == PRESSURE_FL || operatorID == DELTAP )
     zaxisIDp = zaxisCreate(ZAXIS_HYBRID, nhlevf);
@@ -229,7 +229,7 @@ void *Pressure(void *argument)
   {
     double *level;
     int l;
-    level = malloc(nhlevh*sizeof(double));
+    level = (double*) malloc(nhlevh*sizeof(double));
     for ( l = 0; l < nhlevh; l++ ) level[l] = l+1;
     zaxisDefLevels(zaxisIDp, level);
     free(level);
@@ -351,7 +351,7 @@ void *Pressure(void *argument)
     cdoAbort("%s on spectral representation not supported!", var_stdname(surface_air_pressure));
 
   gridsize = gridInqSize(gridID);
-  pdata = malloc(gridsize*sizeof(double));
+  pdata = (double*) malloc(gridsize*sizeof(double));
 
 
   vlistID2 = vlistCreate();
diff --git a/src/Regres.c b/src/Regres.c
index 31dff3e..3364921 100644
--- a/src/Regres.c
+++ b/src/Regres.c
@@ -70,15 +70,15 @@ void *Regres(void *argument)
 
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   for ( w = 0; w < nwork; w++ )
     work[w] = field_calloc(vlistID1, FIELD_PTR);
diff --git a/src/Remap.c b/src/Remap.c
index 2f57a09..f534915 100644
--- a/src/Remap.c
+++ b/src/Remap.c
@@ -44,7 +44,7 @@
 
 
 enum {REMAPCON, REMAPCON2, REMAPBIL, REMAPBIC, REMAPDIS, REMAPNN, REMAPLAF, REMAPSUM,
-      GENCON, GENCON2, GENBIL, GENBIC, GENDIS, GENNN, GENLAF, REMAPXXX, REMAPCONS, GENCONS};
+      GENCON, GENCON2, GENBIL, GENBIC, GENDIS, GENNN, GENLAF, REMAPXXX, REMAPYCON, GENYCON};
 
 enum {HEAP_SORT, MERGE_SORT};
 
@@ -53,9 +53,9 @@ void get_map_type(int operfunc, int *map_type, int *submap_type, int *num_neighb
 {
   switch ( operfunc )
     {
-    case REMAPCONS:
-    case GENCONS:
-      *map_type = MAP_TYPE_CONSPHERE;
+    case REMAPYCON:
+    case GENYCON:
+      *map_type = MAP_TYPE_CONSERV_YAC;
       *remap_order = 1;
       break;
     case REMAPCON:
@@ -111,66 +111,111 @@ int maptype2operfunc(int map_type, int submap_type, int num_neighbors, int remap
       if ( submap_type == SUBMAP_TYPE_LAF )
 	{
 	  operfunc = REMAPLAF;
-	  cdoPrint("Using remaplaf");
+	  // cdoPrint("Using remaplaf");
 	}
       else
 	{
 	  if ( remap_order == 2 )
 	    {
 	      operfunc = REMAPCON2;
-	      cdoPrint("Using remapcon2");
+	      // cdoPrint("Using remapcon2");
 	    }
 	  else
 	    {
 	      operfunc = REMAPCON;
-	      cdoPrint("Using remapcon");
+	      // cdoPrint("Using remapcon");
 	    }
 	}
     }
-  else if ( map_type == MAP_TYPE_CONSPHERE )
+  else if ( map_type == MAP_TYPE_CONSERV_YAC )
     {
-      operfunc = REMAPCONS;
-      cdoPrint("Using remapcons");
+      operfunc = REMAPYCON;
+      // cdoPrint("Using remapycon");
     }
   else if ( map_type == MAP_TYPE_BILINEAR )
     {
       operfunc = REMAPBIL;
-      cdoPrint("Using remapbil");
+      // cdoPrint("Using remapbil");
     }
   else if ( map_type == MAP_TYPE_BICUBIC )
     {
       operfunc = REMAPBIC;
-      cdoPrint("Using remapbic");
+      // cdoPrint("Using remapbic");
     }
   else if ( map_type == MAP_TYPE_DISTWGT )
     {
       if ( num_neighbors == 1 )
 	{
 	  operfunc = REMAPNN;
-	  cdoPrint("Using remapnn");
+	  // cdoPrint("Using remapnn");
 	}
       else
 	{
 	  operfunc = REMAPDIS;
-	  cdoPrint("Using remapdis");
+	  // cdoPrint("Using remapdis");
 	}
     }
   else
     cdoAbort("Unsupported mapping method (map_type = %d)", map_type);
 
   return (operfunc);
+} 
+
+static
+void print_remap_info(int operfunc, remapgrid_t *src_grid, remapgrid_t *tgt_grid, int nmiss)
+{
+  char line[256];
+  char tmpstr[256];
+
+  line[0] = 0;
+
+  if      ( operfunc == REMAPBIL  || operfunc == GENBIL  )  strcpy(line, "SCRIP bilinear");
+  else if ( operfunc == REMAPBIC  || operfunc == GENBIC  )  strcpy(line, "SCRIP bicubic");
+  else if ( operfunc == REMAPNN   || operfunc == GENNN   )  strcpy(line, "SCRIP nearest neighbor");
+  else if ( operfunc == REMAPDIS  || operfunc == GENDIS  )  strcpy(line, "SCRIP distance-weighted average");
+  else if ( operfunc == REMAPCON  || operfunc == GENCON  )  strcpy(line, "SCRIP first order conservative");
+  else if ( operfunc == REMAPCON2 || operfunc == GENCON2 )  strcpy(line, "SCRIP second order conservative");
+  else if ( operfunc == REMAPLAF  || operfunc == GENLAF  )  strcpy(line, "SCRIP largest area fraction");
+  else if ( operfunc == REMAPYCON || operfunc == GENYCON )  strcpy(line, "YAC first order conservative");
+  else                                                      strcpy(line, "Unknown");
+
+  strcat(line, " remapping from ");
+  strcat(line, gridNamePtr(gridInqType(src_grid->gridID)));
+  if ( src_grid->rank == 2 )
+    sprintf(tmpstr, " (%dx%d)", src_grid->dims[0], src_grid->dims[1]);
+  else
+    sprintf(tmpstr, " (%d)", src_grid->dims[0]);
+  strcat(line, tmpstr);
+  strcat(line, " to ");
+  strcat(line, gridNamePtr(gridInqType(tgt_grid->gridID)));
+  if ( tgt_grid->rank == 2 )
+    sprintf(tmpstr, " (%dx%d)", tgt_grid->dims[0], tgt_grid->dims[1]);
+  else
+    sprintf(tmpstr, " (%d)", tgt_grid->dims[0]);
+  strcat(line, tmpstr);
+  strcat(line, " grid");
+
+  if ( nmiss > 0 )
+    {
+      sprintf(tmpstr, ", with source mask (%d)", gridInqSize(src_grid->gridID)-nmiss);
+      strcat(line, tmpstr);
+    }
+
+  cdoPrint(line);
 }
 
+
 double remap_threshhold = 2;
+double remap_search_radius = 180;
 int remap_test = 0;
 int remap_order = 1;
-int remap_store_link_fast = TRUE;
 int remap_non_global = FALSE;
 int remap_num_srch_bins = 180;
 int lremap_num_srch_bins = FALSE;
 int remap_extrapolate = FALSE;
+int remap_genweights = TRUE;
 int lextrapolate = FALSE;
-int max_remaps = 0;
+int max_remaps = -1;
 int sort_mode = HEAP_SORT;
 double remap_area_min = 0;
 
@@ -272,6 +317,26 @@ void get_remap_env(void)
 
   remap_set_threshhold(remap_threshhold);
 
+  envstr = getenv("CDO_REMAP_SEARCH_RADIUS");
+  if ( envstr )
+    {
+      double fval;
+      fval = atof(envstr);
+      if ( fval < 0 || fval > 180 )
+	{
+	  cdoAbort("CDO_REMAP_SEARCH_RADIUS=%g out of bounds (0-180)", fval);
+	}
+      else
+	{
+	  remap_search_radius = fval;
+	  if ( cdoVerbose )
+	    cdoPrint("Set CDO_REMAP_SEARCH_RADIUS to %g", remap_search_radius);
+	}
+    }
+  
+  if ( cdoVerbose )
+    cdoPrint("remap_search_radius = %g", remap_search_radius);
+
   envstr = getenv("REMAP_AREA_MIN");
   if ( envstr )
     {
@@ -312,6 +377,8 @@ void get_remap_env(void)
 	}
     }
 
+  int remap_store_link_fast = TRUE;
+
   envstr = getenv("REMAP_STORE_LINK_FAST");
   if ( envstr )
     {
@@ -354,6 +421,64 @@ void get_remap_env(void)
 	    }
 	}
     }
+
+  envstr = getenv("CDO_REMAP_GENWEIGHTS");
+  if ( envstr )
+    {
+      if ( *envstr )
+	{
+	  if ( memcmp(envstr, "ON", 2) == 0 || memcmp(envstr, "on", 2) == 0 )
+	    {
+	      remap_genweights = TRUE;
+	    }
+	  else if ( memcmp(envstr, "OFF", 3) == 0 || memcmp(envstr, "off", 3) == 0 )
+	    {
+	      remap_genweights = FALSE;
+	    }
+	  else
+	    cdoWarning("Environment variable CDO_REMAP_GENWEIGHTS has wrong value!");
+
+	  if ( cdoVerbose )
+	    {
+	      if ( remap_genweights == TRUE )
+		cdoPrint("Generation of weights enabled!");
+	      else if ( remap_genweights == FALSE )
+		cdoPrint("Generation of weights disabled!");
+	    }
+	}
+    }
+}
+
+static
+void set_halo_to_missval(int nx, int ny, double *array, double missval)
+{
+  int i, j;
+
+  for ( j = 0; j < ny+4; j++ ) array[j*(nx+4)+0]      = missval;
+  for ( j = 0; j < ny+4; j++ ) array[j*(nx+4)+1]      = missval;
+  for ( j = 0; j < ny+4; j++ ) array[j*(nx+4)+nx+2]   = missval;
+  for ( j = 0; j < ny+4; j++ ) array[j*(nx+4)+nx+3]   = missval;
+  for ( i = 0; i < nx+4; i++ ) array[     0*(nx+4)+i] = missval;
+  for ( i = 0; i < nx+4; i++ ) array[     1*(nx+4)+i] = missval;
+  for ( i = 0; i < nx+4; i++ ) array[(ny+2)*(nx+4)+i] = missval;
+  for ( i = 0; i < nx+4; i++ ) array[(ny+3)*(nx+4)+i] = missval;
+}
+
+static
+int is_global_grid(int gridID)
+{
+  int global_grid = TRUE;
+  int non_global = remap_non_global || !gridIsCircular(gridID);
+  int gridtype = gridInqType(gridID);
+
+  if ( (gridtype == GRID_LONLAT && gridIsRotated(gridID)) ||
+       (gridtype == GRID_LONLAT && non_global) ||
+       (gridtype == GRID_LCC) ||
+       (gridtype == GRID_LAEA) ||
+       (gridtype == GRID_SINUSOIDAL) ||
+       (gridtype == GRID_CURVILINEAR && non_global) ) global_grid = FALSE;
+
+  return (global_grid);
 }
 
 static
@@ -380,10 +505,184 @@ void scale_gridbox_area(long gridsize, const double *restrict array1, long grids
     }
 }
 
+static
+int set_remapgrids(int vlistID, int ngrids, int *remapgrids)
+{
+  int index, gridID, gridtype;
+
+  for ( index = 0; index < ngrids; index++ )
+    {
+      remapgrids[index] = TRUE;
+
+      gridID = vlistGrid(vlistID, index);
+      gridtype = gridInqType(gridID);
+
+      if ( gridtype != GRID_LONLAT      &&
+	   gridtype != GRID_GAUSSIAN    &&
+	   gridtype != GRID_LCC         &&
+	   gridtype != GRID_LAEA        &&
+	   gridtype != GRID_SINUSOIDAL  &&
+	   gridtype != GRID_GME         &&
+	   gridtype != GRID_CURVILINEAR &&
+	   gridtype != GRID_UNSTRUCTURED )
+	{
+	  if ( gridtype == GRID_GAUSSIAN_REDUCED )
+	    cdoAbort("Unsupported grid type: %s, use CDO option -R to convert reduced to regular grid!", gridNamePtr(gridtype));
+	  else if ( gridtype == GRID_GENERIC && gridInqSize(gridID) == 1 )
+	    remapgrids[index] = FALSE;
+	  else
+	    cdoAbort("Unsupported grid type: %s", gridNamePtr(gridtype));
+	}
+    }
+
+  for ( index = 0; index < ngrids; index++ )
+    if ( remapgrids[index] == TRUE ) break;
+
+  if ( index == ngrids ) cdoAbort("No remappable grid found!");
+
+  return (index);
+}
+
+static
+int set_max_remaps(int vlistID)
+{
+  int max_remaps = 0;
+  int nzaxis, nvars, index;
+  int zaxisID, zaxissize;
+
+  nzaxis = vlistNzaxis(vlistID);
+  for ( index = 0; index < nzaxis; index++ )
+    {
+      zaxisID = vlistZaxis(vlistID, index);
+      zaxissize = zaxisInqSize(zaxisID);
+      if ( zaxissize > max_remaps ) max_remaps = zaxissize;
+    }
+  
+  nvars = vlistNvars(vlistID);
+  if ( nvars > max_remaps ) max_remaps = nvars;
+
+  max_remaps++;
+
+  if ( cdoVerbose ) cdoPrint("Set max_remaps to %d", max_remaps);
+
+  return (max_remaps);
+}
+
+static
+int get_norm_opt()
+{
+  int norm_opt = NORM_OPT_FRACAREA;
+  char *envstr = getenv("CDO_REMAP_NORMALIZE_OPT");
+
+  if ( envstr && *envstr )
+    {
+      if      ( memcmp(envstr, "frac", 4) == 0 )
+	norm_opt = NORM_OPT_FRACAREA;
+      else if ( memcmp(envstr, "dest", 4) == 0 )
+	norm_opt = NORM_OPT_DESTAREA;
+      else if ( memcmp(envstr, "none", 4) == 0 )
+	norm_opt = NORM_OPT_NONE;
+      else
+	cdoWarning("CDO_REMAP_NORMALIZE_OPT=%s unsupported!", envstr);
+    }
+
+  if ( cdoVerbose )
+    {
+      if ( norm_opt == NORM_OPT_FRACAREA )
+	cdoPrint("Normalization option: frac");
+      else if ( norm_opt == NORM_OPT_DESTAREA )
+	cdoPrint("Normalization option: dest");
+      else
+	cdoPrint("Normalization option: none");
+    }
+
+  return (norm_opt);
+}
+
+static
+void remap_normalize(int norm_opt, int gridsize, double *array, double missval, remapgrid_t *tgt_grid)
+{
+  int i;
+  double grid_err;
+
+  if ( norm_opt == NORM_OPT_NONE )
+    {
+      for ( i = 0; i < gridsize; i++ )
+	{
+	  if ( !DBL_IS_EQUAL(array[i], missval) )
+	    {
+	      grid_err = tgt_grid->cell_frac[i]*tgt_grid->cell_area[i];
+	      if ( fabs(grid_err) > 0 )
+		array[i] = array[i]/grid_err;
+	      else
+		array[i] = missval;
+	    }
+	}
+    }
+  else if ( norm_opt == NORM_OPT_DESTAREA )
+    {
+      for ( i = 0; i < gridsize; i++ )
+	{
+	  if ( !DBL_IS_EQUAL(array[i], missval) )
+	    {
+	      if ( fabs(tgt_grid->cell_frac[i]) > 0 )
+		array[i] = array[i]/tgt_grid->cell_frac[i];
+	      else
+		array[i] = missval;
+	    }
+	}
+    }
+
+  if ( remap_area_min > 0 )
+    {
+      for ( i = 0; i < gridsize; i++ )
+	{
+	  //printf("%d %g %g\n", i, remaps[r].tgt_grid.cell_frac[i], remaps[r].tgt_grid.cell_area[i]);
+	  if ( tgt_grid->cell_frac[i] < remap_area_min ) array[i] = missval;
+	}
+    }
+}
+
 
 int timer_remap, timer_remap_init, timer_remap_sort;
 int timer_remap_bil, timer_remap_nn, timer_remap_con, timer_remap_con_l1, timer_remap_con_l2;
 
+static
+void init_remap_timer(void)
+{
+  timer_remap        = timer_new("remap");
+  timer_remap_init   = timer_new("remap init");
+  timer_remap_sort   = timer_new("remap sort");
+  timer_remap_bil    = timer_new("remap bil");
+  timer_remap_nn     = timer_new("remap nn");
+  timer_remap_con    = timer_new("remap con");
+  timer_remap_con_l1 = timer_new("remap con loop1");
+  timer_remap_con_l2 = timer_new("remap con loop2");
+}
+
+static
+void sort_remap_add(remapvars_t *remapvars)
+{
+  if ( cdoTimer ) timer_start(timer_remap_sort);
+  if ( sort_mode == MERGE_SORT )
+    { /* 
+      ** use a combination of the old sort_add and a split and merge approach.
+      ** The chunk size is determined by MERGE_SORT_LIMIT_SIZE in remaplib.c. 
+      ** OpenMP parallelism is supported
+      */   
+      sort_iter(remapvars->num_links, remapvars->num_wts,
+		remapvars->tgt_grid_add, remapvars->src_grid_add,
+		remapvars->wts, ompNumThreads);
+    }
+  else
+    { /* use a pure heap sort without any support of parallelism */
+      sort_add(remapvars->num_links, remapvars->num_wts,
+	       remapvars->tgt_grid_add, remapvars->src_grid_add,
+	       remapvars->wts);
+    }
+  if ( cdoTimer ) timer_stop(timer_remap_sort);
+}
+
 
 void *Remap(void *argument)
 {
@@ -391,16 +690,13 @@ void *Remap(void *argument)
   int operfunc;
   int streamID1, streamID2 = -1;
   int nrecs, ngrids;
-  int nzaxis, zaxisID, zaxissize;
-  int nvars;
   int index;
   int tsID, recID, varID, levelID;
   int gridsize, gridsize2;
   int vlistID1, vlistID2;
   int taxisID1, taxisID2;
   int gridID1 = -1, gridID2;
-  int gridtype;
-  int nmiss1, nmiss2, i, j, r;
+  int nmiss1, nmiss2, i, j, r = -1;
   int *imask = NULL;
   int nremaps = 0;
   int norm_opt = NORM_OPT_NONE;
@@ -408,29 +704,17 @@ void *Remap(void *argument)
   int submap_type = SUBMAP_TYPE_NONE;
   int num_neighbors = 4;
   int need_gradiants = FALSE;
-  int non_global;
   int grid1sizemax;
-  short *remapgrids = NULL;
+  int *remapgrids = NULL;
   char varname[CDI_MAX_NAME];
   double missval;
   double *array1 = NULL, *array2 = NULL;
   double *grad1_lat = NULL, *grad1_lon = NULL, *grad1_latlon = NULL;
-  remap_t *remaps;
-  char *envstr;
+  remap_t *remaps = NULL;
   char *remap_file = NULL;
   int lwrite_remap;
 
-  if ( cdoTimer )
-    {
-      timer_remap        = timer_new("remap");
-      timer_remap_init   = timer_new("remap init");
-      timer_remap_sort   = timer_new("remap sort");
-      timer_remap_bil    = timer_new("remap bil");
-      timer_remap_nn     = timer_new("remap nn");
-      timer_remap_con    = timer_new("remap con");
-      timer_remap_con_l1 = timer_new("remap con loop1");
-      timer_remap_con_l2 = timer_new("remap con loop2");
-    }
+  if ( cdoTimer ) init_remap_timer();
 
   cdoInitialize(argument);
 
@@ -450,8 +734,8 @@ void *Remap(void *argument)
   cdoOperatorAdd("gennn",        GENNN,        1, NULL);
   cdoOperatorAdd("genlaf",       GENLAF,       1, NULL);
   cdoOperatorAdd("remap",        REMAPXXX,     0, NULL);
-  cdoOperatorAdd("remapcons",    REMAPCONS,    0, NULL);
-  cdoOperatorAdd("gencons",      GENCONS,      1, NULL);
+  cdoOperatorAdd("remapycon",    REMAPYCON,    0, NULL);
+  cdoOperatorAdd("genycon",      GENYCON,      1, NULL);
 
   operatorID   = cdoOperatorID();
   operfunc     = cdoOperatorF1(operatorID);
@@ -475,7 +759,7 @@ void *Remap(void *argument)
 
   if ( operfunc == REMAPXXX )
     {
-      operatorInputArg("grid description file or name, remap file (SCRIP netCDF)");
+      operatorInputArg("grid description file or name, remap weights file (SCRIP netCDF)");
       operatorCheckArgc(2);
       gridID2 = cdoDefineGrid(operatorArgv()[0]);
       remap_file = operatorArgv()[1];
@@ -497,70 +781,29 @@ void *Remap(void *argument)
   vlistDefTaxis(vlistID2, taxisID2);
 
   ngrids = vlistNgrids(vlistID1);
-  remapgrids = malloc(ngrids*sizeof(short));
-  for ( index = 0; index < ngrids; index++ )
-    {
-      remapgrids[index] = TRUE;
-
-      gridID1 = vlistGrid(vlistID1, index);
-      gridtype = gridInqType(gridID1);
-
-      if ( gridtype != GRID_LONLAT      &&
-	   gridtype != GRID_GAUSSIAN    &&
-	   gridtype != GRID_LCC         &&
-	   gridtype != GRID_LAEA        &&
-	   gridtype != GRID_SINUSOIDAL  &&
-	   gridtype != GRID_GME         &&
-	   gridtype != GRID_CURVILINEAR &&
-	   gridtype != GRID_UNSTRUCTURED )
-	{
-	  if ( gridInqType(gridID1) == GRID_GAUSSIAN_REDUCED )
-	    cdoAbort("Unsupported grid type: %s, use CDO option -R to convert reduced to regular grid!",
-		     gridNamePtr(gridInqType(gridID1)));
-	  else if ( gridInqType(gridID1) == GRID_GENERIC && gridInqSize(gridID1) == 1 )
-	    remapgrids[index] = FALSE;
-	  else
-	    cdoAbort("Unsupported grid type: %s", gridNamePtr(gridInqType(gridID1)));
-	}
-
-      if ( remapgrids[index] )
-	vlistChangeGridIndex(vlistID2, index, gridID2);
-    }
+  remapgrids = (int*) malloc(ngrids*sizeof(int));
+  index = set_remapgrids(vlistID1, ngrids, remapgrids);
+  gridID1 = vlistGrid(vlistID1, index);
 
   for ( index = 0; index < ngrids; index++ )
-    if ( remapgrids[index] == TRUE ) break;
-
-  if ( index == ngrids )
-    cdoAbort("No remappable grid found!");
+    if ( remapgrids[index] )
+      vlistChangeGridIndex(vlistID2, index, gridID2);
 
-  gridID1 = vlistGrid(vlistID1, index);
+  if ( max_remaps == -1 ) max_remaps = set_max_remaps(vlistID1);
 
-  if ( max_remaps == 0 )
+  if ( max_remaps > 0 )
     {
-      nzaxis = vlistNzaxis(vlistID1);
-      for ( index = 0; index < nzaxis; index++ )
-        {
-	  zaxisID = vlistZaxis(vlistID1, index);
-	  zaxissize = zaxisInqSize(zaxisID);
-          if ( zaxissize > max_remaps ) max_remaps = zaxissize;
+      remaps = (remap_t*) malloc(max_remaps*sizeof(remap_t));
+      for ( r = 0; r < max_remaps; r++ )
+	{
+	  remaps[r].gridID   = -1;
+	  remaps[r].gridsize = 0;
+	  remaps[r].nmiss    = 0;
 	}
-
-      nvars = vlistNvars(vlistID1);
-      if ( nvars > max_remaps ) max_remaps = nvars;
-
-      max_remaps++;
-
-      if ( cdoVerbose )
-        cdoPrint("Set max_remaps to %d", max_remaps);
     }
 
-  remaps = malloc(max_remaps*sizeof(remap_t));
-  for ( r = 0; r < max_remaps; r++ )
-    {
-      remaps[r].gridID   = -1;
-      remaps[r].gridsize = 0;
-      remaps[r].nmiss    = 0;
-    }
+  if ( lwrite_remap || operfunc == REMAPXXX )
+    remap_genweights = TRUE;
 
   if ( operfunc == REMAPXXX )
     {
@@ -577,15 +820,7 @@ void *Remap(void *argument)
       if ( map_type == MAP_TYPE_DISTWGT && !lextrapolate ) remap_extrapolate = TRUE;
       if ( gridIsCircular(gridID1)      && !lextrapolate ) remap_extrapolate = TRUE;
 
-      non_global = remap_non_global || !gridIsCircular(gridID1);
-      if ( !remap_extrapolate && gridInqSize(gridID1) > 1 &&
-	   map_type == MAP_TYPE_DISTWGT &&
-	   ((gridInqType(gridID1) == GRID_LONLAT && gridIsRotated(gridID1)) ||
-	    (gridInqType(gridID1) == GRID_LONLAT && non_global) ||
-	    (gridInqType(gridID1) == GRID_LCC) ||
-	    (gridInqType(gridID1) == GRID_LAEA) ||
-	    (gridInqType(gridID1) == GRID_SINUSOIDAL) ||
-	    (gridInqType(gridID1) == GRID_CURVILINEAR && non_global)) )
+      if ( map_type == MAP_TYPE_DISTWGT && !remap_extrapolate && gridInqSize(gridID1) > 1 &&  !is_global_grid(gridID1) )
 	{
 	  remaps[0].gridsize += 4*(gridInqXsize(gridID1)+2) + 4*(gridInqYsize(gridID1)+2);
 	  remaps[0].src_grid.non_global = TRUE;
@@ -608,7 +843,7 @@ void *Remap(void *argument)
 	  int gridID2_gme;
 	  int isize = 0;
 	  remaps[0].tgt_grid.nvgp = gridInqSize(gridID2);
-	  remaps[0].tgt_grid.vgpm = realloc(remaps[0].tgt_grid.vgpm, gridInqSize(gridID2)*sizeof(int));
+	  remaps[0].tgt_grid.vgpm = (int*) realloc(remaps[0].tgt_grid.vgpm, gridInqSize(gridID2)*sizeof(int));
 	  gridID2_gme = gridToUnstructured(gridID2, 1);
 	  gridInqMaskGME(gridID2_gme, remaps[0].tgt_grid.vgpm);
 	  for ( i = 0; i < gridsize2; ++i )
@@ -625,38 +860,16 @@ void *Remap(void *argument)
 
       if ( remap_test ) reorder_links(&remaps[0].vars);
     }
-
-  get_map_type(operfunc, &map_type, &submap_type, &num_neighbors, &remap_order);
-
-  if ( map_type == MAP_TYPE_CONSERV ||map_type == MAP_TYPE_CONSPHERE )
+  else
     {
-      norm_opt = NORM_OPT_FRACAREA;
-
-      envstr = getenv("NORMALIZE_OPT");
-
-      if ( envstr && *envstr )
-        {
-	  if      ( memcmp(envstr, "frac", 4) == 0 )
-	    norm_opt = NORM_OPT_FRACAREA;
-	  else if ( memcmp(envstr, "dest", 4) == 0 )
-	    norm_opt = NORM_OPT_DESTAREA;
-	  else if ( memcmp(envstr, "none", 4) == 0 )
-	    norm_opt = NORM_OPT_NONE;
-	  else
-	    cdoWarning("NORMALIZE_OPT=%s unsupported!", envstr);
-	}
-
-      if ( cdoVerbose )
-        {
-	  if ( norm_opt == NORM_OPT_FRACAREA )
-	    cdoPrint("Normalization option: frac");
-	  else if ( norm_opt == NORM_OPT_DESTAREA )
-	    cdoPrint("Normalization option: dest");
-	  else
-	    cdoPrint("Normalization option: none");
-	}
+      get_map_type(operfunc, &map_type, &submap_type, &num_neighbors, &remap_order);
     }
 
+  if ( remap_genweights == FALSE && map_type != MAP_TYPE_BILINEAR && map_type != MAP_TYPE_BICUBIC && map_type != MAP_TYPE_CONSERV_YAC )
+    remap_genweights = TRUE;
+
+  if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSERV_YAC ) norm_opt = get_norm_opt();
+
   grid1sizemax = vlistGridsizeMax(vlistID1);
 
   if ( map_type == MAP_TYPE_BICUBIC ) need_gradiants = TRUE;
@@ -670,21 +883,20 @@ void *Remap(void *argument)
 
   if ( need_gradiants )
     {
-      grad1_lat    = malloc(grid1sizemax*sizeof(double));
-      grad1_lon    = malloc(grid1sizemax*sizeof(double));
-      grad1_latlon = malloc(grid1sizemax*sizeof(double));
+      grad1_lat    = (double*) malloc(grid1sizemax*sizeof(double));
+      grad1_lon    = (double*) malloc(grid1sizemax*sizeof(double));
+      grad1_latlon = (double*) malloc(grid1sizemax*sizeof(double));
     }
 
-  array1 = malloc(grid1sizemax*sizeof(double));
-  imask  = malloc(grid1sizemax*sizeof(int));
+  array1 = (double*) malloc(grid1sizemax*sizeof(double));
+  imask  = (int*) malloc(grid1sizemax*sizeof(int));
 
   gridsize = gridInqSize(gridID2);
-  array2   = malloc(gridsize*sizeof(double));
+  array2   = (double*) malloc(gridsize*sizeof(double));
 
   if ( ! lwrite_remap )
     {
       streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
-
       streamDefVlist(streamID2, vlistID2);
     }
 
@@ -714,7 +926,7 @@ void *Remap(void *argument)
 		}
 	    }
 
-	  if ( map_type != MAP_TYPE_CONSERV && map_type != MAP_TYPE_CONSPHERE && 
+	  if ( map_type != MAP_TYPE_CONSERV && map_type != MAP_TYPE_CONSERV_YAC && 
 	       gridInqType(gridID1) == GRID_GME && gridInqType(gridID2) == GRID_GME )
 	    cdoAbort("Only conservative remapping is available to remap between GME grids!");
 	  /*
@@ -725,15 +937,7 @@ void *Remap(void *argument)
 	  gridsize = gridInqSize(gridID1);
 
 	  if ( gridIsCircular(gridID1) && !lextrapolate ) remap_extrapolate = TRUE;
-	  non_global = remap_non_global || !gridIsCircular(gridID1);
-	  if ( !remap_extrapolate && gridInqSize(gridID1) > 1 &&
-	       map_type == MAP_TYPE_DISTWGT  &&
-	       ((gridInqType(gridID1) == GRID_LONLAT && gridIsRotated(gridID1)) ||
-		(gridInqType(gridID1) == GRID_LONLAT && non_global) ||
-		(gridInqType(gridID1) == GRID_LCC) ||
-		(gridInqType(gridID1) == GRID_LAEA) ||
-		(gridInqType(gridID1) == GRID_SINUSOIDAL) ||
-		(gridInqType(gridID1) == GRID_CURVILINEAR && non_global)) )
+	  if ( map_type == MAP_TYPE_DISTWGT && !remap_extrapolate && gridInqSize(gridID1) > 1 && !is_global_grid(gridID1) )
 	    {
 	      int gridsize_new;
 	      int nx, ny;
@@ -743,14 +947,14 @@ void *Remap(void *argument)
 	      if ( gridsize_new > grid1sizemax )
 		{
 		  grid1sizemax = gridsize_new;
-		  array1 = realloc(array1, grid1sizemax*sizeof(double));
-		  imask  = realloc(imask, grid1sizemax*sizeof(int));
+		  array1 = (double*) realloc(array1, grid1sizemax*sizeof(double));
+		  imask  = (int*) realloc(imask, grid1sizemax*sizeof(int));
 
 		  if ( need_gradiants )
 		    {
-		      grad1_lat    = realloc(grad1_lat, grid1sizemax*sizeof(double));
-		      grad1_lon    = realloc(grad1_lon, grid1sizemax*sizeof(double));
-		      grad1_latlon = realloc(grad1_latlon, grid1sizemax*sizeof(double));
+		      grad1_lat    = (double*) realloc(grad1_lat, grid1sizemax*sizeof(double));
+		      grad1_lon    = (double*) realloc(grad1_lon, grid1sizemax*sizeof(double));
+		      grad1_latlon = (double*) realloc(grad1_latlon, grid1sizemax*sizeof(double));
 		    }
 		}
 	      
@@ -758,14 +962,7 @@ void *Remap(void *argument)
 		for ( i = nx-1; i >= 0; i-- )
 		  array1[(j+2)*(nx+4)+i+2] = array1[j*nx+i];
 
-	      for ( j = 0; j < ny+4; j++ ) array1[j*(nx+4)+0]      = missval;
-	      for ( j = 0; j < ny+4; j++ ) array1[j*(nx+4)+1]      = missval;
-	      for ( j = 0; j < ny+4; j++ ) array1[j*(nx+4)+nx+2]   = missval;
-	      for ( j = 0; j < ny+4; j++ ) array1[j*(nx+4)+nx+3]   = missval;
-	      for ( i = 0; i < nx+4; i++ ) array1[     0*(nx+4)+i] = missval;
-	      for ( i = 0; i < nx+4; i++ ) array1[     1*(nx+4)+i] = missval;
-	      for ( i = 0; i < nx+4; i++ ) array1[(ny+2)*(nx+4)+i] = missval;
-	      for ( i = 0; i < nx+4; i++ ) array1[(ny+3)*(nx+4)+i] = missval;
+	      set_halo_to_missval(nx, ny, array1, missval);
 
 	      gridsize = gridsize_new;
 	      nmiss1 += 4*(nx+2) + 4*(ny+2);
@@ -804,15 +1001,7 @@ void *Remap(void *argument)
 		{
 		  if ( gridIsCircular(gridID1) && !lextrapolate ) remap_extrapolate = TRUE;
 		  remaps[r].src_grid.non_global = FALSE;
-		  non_global = remap_non_global || !gridIsCircular(gridID1);
-		  if ( !remap_extrapolate && gridInqSize(gridID1) > 1 &&
-		       map_type == MAP_TYPE_DISTWGT &&
-		       ((gridInqType(gridID1) == GRID_LONLAT && gridIsRotated(gridID1)) ||
-			(gridInqType(gridID1) == GRID_LONLAT && non_global) ||
-			(gridInqType(gridID1) == GRID_LCC) ||
-			(gridInqType(gridID1) == GRID_LAEA) ||
-			(gridInqType(gridID1) == GRID_SINUSOIDAL) ||
-			(gridInqType(gridID1) == GRID_CURVILINEAR && non_global)) )
+		  if ( map_type == MAP_TYPE_DISTWGT && !remap_extrapolate && gridInqSize(gridID1) > 1 && !is_global_grid(gridID1) )
 		    {
 		      remaps[r].src_grid.non_global = TRUE;
 		    }
@@ -863,7 +1052,7 @@ void *Remap(void *argument)
 
 	      memcpy(remaps[r].src_grid.mask, imask, remaps[r].src_grid.size*sizeof(int));
 
-	      if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSPHERE )
+	      if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSERV_YAC )
 		{
 		  memset(remaps[r].src_grid.cell_area, 0, remaps[r].src_grid.size*sizeof(double));
 		  memset(remaps[r].src_grid.cell_frac, 0, remaps[r].src_grid.size*sizeof(double));
@@ -876,40 +1065,25 @@ void *Remap(void *argument)
 	      remap_vars_init(map_type, remaps[r].src_grid.size, remaps[r].tgt_grid.size, &remaps[r].vars);
 	      if ( cdoTimer ) timer_stop(timer_remap_init);
 
-	      if      ( map_type == MAP_TYPE_CONSERV   ) remap_conserv(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
-	      else if ( map_type == MAP_TYPE_BILINEAR  ) remap_bilin(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
-	      else if ( map_type == MAP_TYPE_BICUBIC   ) remap_bicub(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
-	      else if ( map_type == MAP_TYPE_DISTWGT   ) remap_distwgt(num_neighbors, &remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
-	      else if ( map_type == MAP_TYPE_CONSPHERE ) remap_consphere(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
+	      if ( remap_genweights )
+		{
+		  print_remap_info(operfunc, &remaps[r].src_grid, &remaps[r].tgt_grid, nmiss1);
 
-	      if ( remaps[r].vars.num_links != remaps[r].vars.max_links )
-		resize_remap_vars(&remaps[r].vars, remaps[r].vars.num_links-remaps[r].vars.max_links);
+		  if      ( map_type == MAP_TYPE_CONSERV   ) scrip_remap_weights_conserv(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
+		  else if ( map_type == MAP_TYPE_BILINEAR  ) scrip_remap_weights_bilinear(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
+		  else if ( map_type == MAP_TYPE_BICUBIC   ) scrip_remap_weights_bicubic(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
+		  else if ( map_type == MAP_TYPE_DISTWGT   ) scrip_remap_weights_distwgt(num_neighbors, &remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
+		  else if ( map_type == MAP_TYPE_CONSERV_YAC ) remap_weights_conserv(&remaps[r].src_grid, &remaps[r].tgt_grid, &remaps[r].vars);
 
-	      if ( remaps[r].vars.sort_add )
-		{
-		  if ( cdoTimer ) timer_start(timer_remap_sort);
-		  if ( sort_mode == MERGE_SORT )
-		    { /* 
-		      ** use a combination of the old sort_add and a split and merge approach.
-		      ** The chunk size is determined by MERGE_SORT_LIMIT_SIZE in remaplib.c. 
-		      ** OpenMP parallelism is supported
-		      */   
-		      sort_iter(remaps[r].vars.num_links, remaps[r].vars.num_wts,
-				remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add,
-				remaps[r].vars.wts, ompNumThreads);
-		    }
-		  else
-		    { /* use a pure heap sort without any support of parallelism */
-		      sort_add(remaps[r].vars.num_links, remaps[r].vars.num_wts,
-			       remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add,
-			       remaps[r].vars.wts);
-		    }
-		  if ( cdoTimer ) timer_stop(timer_remap_sort);
-		}
+		  if ( remaps[r].vars.num_links != remaps[r].vars.max_links )
+		    resize_remap_vars(&remaps[r].vars, remaps[r].vars.num_links-remaps[r].vars.max_links);
+		  
+		  if ( remaps[r].vars.sort_add ) sort_remap_add(&remaps[r].vars);
 
-	      if ( lwrite_remap ) goto WRITE_REMAP;
+		  if ( lwrite_remap ) goto WRITE_REMAP;
 
-	      if ( remap_test ) reorder_links(&remaps[r].vars);
+		  if ( remap_test ) reorder_links(&remaps[r].vars);
+		}
 	    }
 
 	  if ( gridInqType(gridID1) == GRID_GME )
@@ -919,63 +1093,39 @@ void *Remap(void *argument)
 		if ( remaps[r].src_grid.vgpm[i] ) array1[j++] = array1[i];
 	    }
 	  
-	  if ( need_gradiants )
+	  if ( remap_genweights )
 	    {
-	      if ( remaps[r].src_grid.rank != 2 && remap_order == 2 )
-		cdoAbort("Second order remapping is only available for 2D grids!");
+	      if ( need_gradiants )
+		{
+		  if ( remaps[r].src_grid.rank != 2 && remap_order == 2 )
+		    cdoAbort("Second order remapping is not only available for unstructured grids!");
 
-	      remap_gradients(remaps[r].src_grid, array1, grad1_lat, grad1_lon, grad1_latlon);
-	    }
+		  remap_gradients(remaps[r].src_grid, array1, grad1_lat, grad1_lon, grad1_latlon);
+		}
 
-	  if ( operfunc == REMAPLAF )
-	    remap_laf(array2, missval, gridInqSize(gridID2), remaps[r].vars.num_links, remaps[r].vars.wts,
-		  remaps[r].vars.num_wts, remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add, array1);
-	  else if ( operfunc == REMAPSUM )
-	    remap_sum(array2, missval, gridInqSize(gridID2), remaps[r].vars.num_links, remaps[r].vars.wts,
-		  remaps[r].vars.num_wts, remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add, array1);
+	      if ( operfunc == REMAPLAF )
+		remap_laf(array2, missval, gridInqSize(gridID2), remaps[r].vars.num_links, remaps[r].vars.wts,
+			  remaps[r].vars.num_wts, remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add, array1);
+	      else if ( operfunc == REMAPSUM )
+		remap_sum(array2, missval, gridInqSize(gridID2), remaps[r].vars.num_links, remaps[r].vars.wts,
+			  remaps[r].vars.num_wts, remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add, array1);
+	      else
+		remap(array2, missval, gridInqSize(gridID2), remaps[r].vars.num_links, remaps[r].vars.wts,
+		      remaps[r].vars.num_wts, remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add,
+		      array1, grad1_lat, grad1_lon, grad1_latlon, remaps[r].vars.links);
+	    }
 	  else
-	    remap(array2, missval, gridInqSize(gridID2), remaps[r].vars.num_links, remaps[r].vars.wts,
-		  remaps[r].vars.num_wts, remaps[r].vars.tgt_grid_add, remaps[r].vars.src_grid_add,
-		  array1, grad1_lat, grad1_lon, grad1_latlon, remaps[r].vars.links);
+	    {
+	      if      ( map_type == MAP_TYPE_BILINEAR    ) scrip_remap_bilinear(&remaps[r].src_grid, &remaps[r].tgt_grid, array1, array2, missval);
+	      else if ( map_type == MAP_TYPE_BICUBIC     ) scrip_remap_bicubic(&remaps[r].src_grid, &remaps[r].tgt_grid, array1, array2, missval);
+	      else if ( map_type == MAP_TYPE_CONSERV_YAC ) remap_conserv(&remaps[r].src_grid, &remaps[r].tgt_grid, array1, array2, missval);
+	    }
 
 	  gridsize2 = gridInqSize(gridID2);
 
 	  /* used only to check the result of remapcon */
-	  if ( operfunc == REMAPCON || operfunc == REMAPCON2|| operfunc == REMAPCONS )
-	    {
-	      double grid2_err;
-
-	      if ( remaps[r].vars.norm_opt == NORM_OPT_NONE )
-		{
-		  for ( i = 0; i < gridsize2; i++ )
-		    {
-		      grid2_err = remaps[r].tgt_grid.cell_frac[i]*remaps[r].tgt_grid.cell_area[i];
-		      if ( fabs(grid2_err) > 0 )
-			array2[i] = array2[i]/grid2_err;
-		      else
-			array2[i] = missval;
-		    }
-		}
-	      else if ( remaps[r].vars.norm_opt == NORM_OPT_DESTAREA )
-		{
-		  for ( i = 0; i < gridsize2; i++ )
-		    {
-		      if ( fabs(remaps[r].tgt_grid.cell_frac[i]) > 0 )
-			array2[i] = array2[i]/remaps[r].tgt_grid.cell_frac[i];
-		      else
-			array2[i] = missval;
-		    }
-		}
-
-	      if ( remap_area_min > 0 )
-		{
-		  for ( i = 0; i < gridsize2; i++ )
-		    {
-		      //printf("%d %g %g\n", i, remaps[r].tgt_grid.cell_frac[i], remaps[r].tgt_grid.cell_area[i]);
-		      if ( remaps[r].tgt_grid.cell_frac[i] < remap_area_min ) array2[i] = missval;
-		    }
-		}
-	    }
+	  if ( operfunc == REMAPCON || operfunc == REMAPCON2 || operfunc == REMAPYCON )
+	    remap_normalize(remaps[r].vars.norm_opt, gridsize2, array2, missval, &remaps[r].tgt_grid);
 
 	  if ( operfunc == REMAPSUM )
 	    {
@@ -996,7 +1146,7 @@ void *Remap(void *argument)
 	    }
 
 	  vlistInqVarName(vlistID1, varID, varname);
-	  if ( operfunc == REMAPCON || operfunc == REMAPCON2 || operfunc == REMAPCONS )
+	  if ( operfunc == REMAPCON || operfunc == REMAPCON2 || operfunc == REMAPYCON )
 	    if ( strcmp(varname, "gridbox_area") == 0 )
 	      {
 		scale_gridbox_area(gridsize, array1, gridsize2, array2, remaps[r].tgt_grid.cell_area);
@@ -1050,15 +1200,18 @@ void *Remap(void *argument)
   if ( grad1_lon ) free(grad1_lon);
   if ( grad1_lat ) free(grad1_lat);
 
-  for ( r = 0; r < nremaps; r++ )
+  if ( max_remaps > 0 )
     {
-      remapVarsFree(&remaps[r].vars);
-      remapGridFree(&remaps[r].src_grid);
-      remapGridFree(&remaps[r].tgt_grid);
+      for ( r = 0; r < nremaps; r++ )
+	{
+	  remapVarsFree(&remaps[r].vars);
+	  remapGridFree(&remaps[r].src_grid);
+	  remapGridFree(&remaps[r].tgt_grid);
+	}
+      
+      if ( remaps ) free(remaps);
     }
 
-  if ( remaps ) free(remaps);
-
   cdoFinish();
 
   return (0);
diff --git a/src/Remapeta.c b/src/Remapeta.c
index f8039b3..300ebd8 100644
--- a/src/Remapeta.c
+++ b/src/Remapeta.c
@@ -111,7 +111,7 @@ double *vctFromFile(const char *filename, int *nvct)
   fp = fopen(filename, "r");
   if ( fp == NULL ) { perror(filename); exit(EXIT_FAILURE); }
 
-  vct2 = malloc(maxvct*sizeof(double));
+  vct2 = (double*) malloc(maxvct*sizeof(double));
 
   while ( readline(fp, line, 1024) )
     {
@@ -141,7 +141,7 @@ double *vctFromFile(const char *filename, int *nvct)
   for ( i = 0; i < nlevh2+1; ++i )
     vct2[i+nvct2/2] = vct2[i+maxvct/2];
   
-  vct2 = realloc(vct2, nvct2*sizeof(double));
+  vct2 = (double*) realloc(vct2, nvct2*sizeof(double));
 
   *nvct = nvct2;
 
@@ -194,9 +194,9 @@ void *Remapeta(void *argument)
   int ngrids, gridID, zaxisID;
   int nlevel;
   int nvct1, nvct2 = 0;
-  int geopID = -1, tempID = -1, sqID = -1, psID = -1, lnpsID = -1, presID = -1;
+  int sgeopotID = -1, tempID = -1, sqID = -1, psID = -1, lnpsID = -1, presID = -1;
   int code;
-  char varname[CDI_MAX_NAME];
+  char varname[CDI_MAX_NAME], stdname[CDI_MAX_NAME];
   double *single2;
   int taxisID1, taxisID2;
   int lhavevct;
@@ -260,29 +260,33 @@ void *Remapeta(void *argument)
     for ( i = 0; i < nhlevf2+1; ++i )
       cdoPrint("vct2: %5d %25.17f %25.17f", i, vct2[i], vct2[nvct2/2+i]);
 
+  streamID1 = streamOpenRead(cdoStreamName(0));
+
   if ( operatorArgc() == 2 )
     {
+      int streamID;
+
       lfis2 = TRUE;
       fname = operatorArgv()[1];
       
       argument_t *fileargument = file_argument_new(fname);
-      streamID1 = streamOpenRead(fileargument);
+      streamID = streamOpenRead(fileargument);
       file_argument_free(fileargument);
 
-      vlistID1 = streamInqVlist(streamID1);
+      vlistID1 = streamInqVlist(streamID);
 
-      streamInqRecord(streamID1, &varID, &levelID);
+      streamInqRecord(streamID, &varID, &levelID);
       gridID  = vlistInqVarGrid(vlistID1, varID);
       nfis2gp = gridInqSize(gridID);
 
-      fis2 = malloc(nfis2gp*sizeof(double));
+      fis2 = (double*) malloc(nfis2gp*sizeof(double));
 
-      streamReadRecord(streamID1, fis2, &nmiss);
+      streamReadRecord(streamID, fis2, &nmiss);
 
       if ( nmiss )
 	{
 	  missval = vlistInqVarMissval(vlistID1, varID);
-	  imiss = malloc (nfis2gp*sizeof(int));
+	  imiss = (int*) malloc (nfis2gp*sizeof(int));
 	  for ( i = 0; i < nfis2gp; ++i )
 	    {
 	      if ( DBL_IS_EQUAL(fis2[i], missval) )
@@ -302,11 +306,9 @@ void *Remapeta(void *argument)
       if ( minval < -1.e10 || maxval > 1.e10 )
 	cdoAbort("%s out of range!", var_stdname(surface_geopotential));
 
-      streamClose(streamID1); 
+      streamClose(streamID); 
     }
 
-  streamID1 = streamOpenRead(cdoStreamName(0));
-
   vlistID1 = streamInqVlist(streamID1);
   vlistID2 = vlistDuplicate(vlistID1);
 
@@ -341,7 +343,7 @@ void *Remapeta(void *argument)
     }
 
   zaxisID2 = zaxisCreate(ZAXIS_HYBRID, nhlevf2);
-  lev2 = malloc(nhlevf2*sizeof(double));
+  lev2 = (double*) malloc(nhlevf2*sizeof(double));
   for ( i = 0; i < nhlevf2; ++i ) lev2[i] = i+1;
   zaxisDefLevels(zaxisID2, lev2);
   free(lev2);
@@ -381,7 +383,7 @@ void *Remapeta(void *argument)
                       if ( cdoVerbose )
                         cdoPrint("lhavevct=TRUE  zaxisIDh = %d, nhlevf1   = %d", zaxisIDh, nlevel);
  
-		      vct1 = malloc(nvct1*sizeof(double));
+		      vct1 = (double*) malloc(nvct1*sizeof(double));
 		      zaxisInqVct(zaxisID, vct1);
 		      
 		      vlistChangeZaxisIndex(vlistID2, i, zaxisID2);
@@ -401,7 +403,9 @@ void *Remapeta(void *argument)
               else 
                 {
 		  if ( cdoVerbose )
-		    cdoPrint("nlevel /= (nvct1/2 - 1): nlevel = %d", nlevel);
+		    cdoPrint("nlevel = (nvct1/2 - 1): nlevel = %d", nlevel);
+		  if ( nlevel < (nvct1/2 - 1) )
+		    cdoPrint("z-axis %d has only %d of %d hybrid sigma pressure levels!", i+1, nlevel, (nvct1/2 - 1));
                 }
 	    }
 	  else
@@ -422,7 +426,7 @@ void *Remapeta(void *argument)
 
 
   if ( zaxisIDh == -1 )
-    cdoWarning("No data on hybrid model level found!");
+    cdoWarning("No 3D variable with hybrid sigma pressure coordinate found!");
 
   nvars = vlistNvars(vlistID1);
 
@@ -434,32 +438,32 @@ void *Remapeta(void *argument)
 
       code = vlistInqVarCode(vlistID1, varID);
       /* code = -1; */
-      if ( code <= 0 )
+      if ( code <= 0 || code == 255 )
 	{
 	  vlistInqVarName(vlistID1, varID, varname);
-
 	  strtolower(varname);
 
-	  if ( nlevel == 1 )
-	    {
-	      if      ( strcmp(varname, "geosp")   == 0 ) code = 129;
-	      else if ( strcmp(varname, "aps")     == 0 ) code = 134;
-	      else if ( strcmp(varname, "ps")      == 0 ) code = 134;
-	      else if ( strcmp(varname, "lsp")     == 0 ) code = 152;
-	    }
+	  vlistInqVarStdname(vlistID1, varID, stdname);
+	  strtolower(stdname);
+
+	  code = echamcode_from_stdname(stdname);
 
-	  if ( nlevel == nhlevf1 )
+	  if ( code == -1 )
 	    {
-	      if      ( strcmp(varname, "t")       == 0 ) code = 130;
-	      else if ( strcmp(varname, "q")       == 0 ) code = 133;
+	      /*                                  ECHAM                            ECMWF       */
+	      if      ( sgeopotID == -1 && (strcmp(varname, "geosp") == 0 || strcmp(varname, "z")    == 0) ) code = 129;
+	      else if ( tempID    == -1 && (strcmp(varname, "st")    == 0 || strcmp(varname, "t")    == 0) ) code = 130;
+	      else if ( psID      == -1 && (strcmp(varname, "aps")   == 0 || strcmp(varname, "ps"  ) == 0) ) code = 134;
+	      else if ( lnpsID    == -1 && (strcmp(varname, "lsp")   == 0 || strcmp(varname, "lnsp") == 0) ) code = 152;
+	      else if ( sqID      == -1 && (strcmp(varname, "q")     == 0 ) ) code = 133;
 	    }
 	}
 
-      if      ( code == 129 ) geopID    = varID;
-      else if ( code == 130 ) tempID    = varID;
-      else if ( code == 133 ) sqID      = varID;
-      else if ( code == 134 ) psID      = varID;
-      else if ( code == 152 ) lnpsID    = varID;
+      if      ( code == 129 && nlevel == 1       ) sgeopotID = varID;
+      else if ( code == 130 && nlevel == nhlevf1 ) tempID    = varID;
+      else if ( code == 133 && nlevel == nhlevf1 ) sqID      = varID;
+      else if ( code == 134 && nlevel == 1       ) psID      = varID;
+      else if ( code == 152 && nlevel == 1       ) lnpsID    = varID;
 
       if ( gridInqType(gridID) == GRID_SPECTRAL && zaxisInqType(zaxisID) == ZAXIS_HYBRID )
 	cdoAbort("Spectral data on model level unsupported!");
@@ -467,7 +471,6 @@ void *Remapeta(void *argument)
       if ( gridInqType(gridID) == GRID_SPECTRAL )
 	cdoAbort("Spectral data unsupported!");
 
-
       if ( zaxisInqType(zaxisID) == ZAXIS_HYBRID && zaxisIDh != -1 && nlevel == nhlevf1 )
 	{
 	  if ( ! (code == 130 || code == 133) )
@@ -480,6 +483,16 @@ void *Remapeta(void *argument)
 	}
     }
 
+  if ( cdoVerbose )
+    {
+      cdoPrint("Found:");
+      if ( tempID    != -1 ) cdoPrint("  %s", var_stdname(air_temperature));
+      if ( psID      != -1 ) cdoPrint("  %s", var_stdname(surface_air_pressure));
+      if ( lnpsID    != -1 ) cdoPrint("  LOG(%s)", var_stdname(surface_air_pressure));
+      if ( sgeopotID != -1 ) cdoPrint("  %s", var_stdname(surface_geopotential));
+      if ( sqID      != -1 ) cdoPrint("  %s", var_stdname(specific_humidity));
+    }
+
   if ( tempID != -1 && sqID != -1 )
     {
       ltq = TRUE;
@@ -495,59 +508,61 @@ void *Remapeta(void *argument)
       cdoWarning("Temperature and Humidity not found!");
     }
   */
+  if ( operatorID == REMAPETA ) {}
+
   if ( operatorID == REMAPETAS || operatorID == REMAPETAZ)
     {
-      sum1 = malloc(ngp*sizeof(double));
-      sum2 = malloc(ngp*sizeof(double));
+      sum1 = (double*) malloc(ngp*sizeof(double));
+      sum2 = (double*) malloc(ngp*sizeof(double));
     }
 
   if ( operatorID == REMAPETAZ )
     {
-      deltap1 = malloc(ngp*nhlevf1*sizeof(double));
-      deltap2 = malloc(ngp*nhlevf2*sizeof(double));
-      half_press1 = malloc(ngp*(nhlevf1+1)*sizeof(double));
-      half_press2 = malloc(ngp*(nhlevf2+1)*sizeof(double));
+      deltap1 = (double*) malloc(ngp*nhlevf1*sizeof(double));
+      deltap2 = (double*) malloc(ngp*nhlevf2*sizeof(double));
+      half_press1 = (double*) malloc(ngp*(nhlevf1+1)*sizeof(double));
+      half_press2 = (double*) malloc(ngp*(nhlevf2+1)*sizeof(double));
     }
 
-  array = malloc(ngp*sizeof(double));
+  array = (double*) malloc(ngp*sizeof(double));
 
-  fis1  = malloc(ngp*sizeof(double));
-  ps1   = malloc(ngp*sizeof(double));
+  fis1  = (double*) malloc(ngp*sizeof(double));
+  ps1   = (double*) malloc(ngp*sizeof(double));
 
-  if ( lfis2 == FALSE ) fis2  = malloc(ngp*sizeof(double));
+  if ( lfis2 == FALSE ) fis2  = (double*) malloc(ngp*sizeof(double));
   if ( lfis2 == TRUE && ngp != nfis2gp ) cdoAbort("Orographies have different grid size!");
 
-  ps2   = malloc(ngp*sizeof(double));
+  ps2   = (double*) malloc(ngp*sizeof(double));
 
   if ( ltq )
     {
-      tscor = malloc(ngp*sizeof(double));
-      pscor = malloc(ngp*sizeof(double));
-      secor = malloc(ngp*sizeof(double));
+      tscor = (double*) malloc(ngp*sizeof(double));
+      pscor = (double*) malloc(ngp*sizeof(double));
+      secor = (double*) malloc(ngp*sizeof(double));
 
-      t1    = malloc(ngp*nhlevf1*sizeof(double));
-      q1    = malloc(ngp*nhlevf1*sizeof(double));
+      t1    = (double*) malloc(ngp*nhlevf1*sizeof(double));
+      q1    = (double*) malloc(ngp*nhlevf1*sizeof(double));
 
-      t2    = malloc(ngp*nhlevf2*sizeof(double));
-      q2    = malloc(ngp*nhlevf2*sizeof(double));
+      t2    = (double*) malloc(ngp*nhlevf2*sizeof(double));
+      q2    = (double*) malloc(ngp*nhlevf2*sizeof(double));
     }
 
   if ( nvars3D )
     {
-      vars1  = malloc(nvars*sizeof(double));
-      vars2  = malloc(nvars*sizeof(double));
+      vars1  = (double**) malloc(nvars*sizeof(double*));
+      vars2  = (double**) malloc(nvars*sizeof(double*));
 
       for ( varID = 0; varID < nvars3D; ++varID )
 	{
-	  vars1[varID] = malloc(ngp*nhlevf1*sizeof(double));
-	  vars2[varID] = malloc(ngp*nhlevf2*sizeof(double));
+	  vars1[varID] = (double*) malloc(ngp*nhlevf1*sizeof(double));
+	  vars2[varID] = (double*) malloc(ngp*nhlevf2*sizeof(double));
 	}
     }
 
-  if ( zaxisIDh != -1 && geopID == -1 )
+  if ( zaxisIDh != -1 && sgeopotID == -1 )
     {
       if ( ltq )
-	cdoWarning("%s not found - using zero %s!", var_stdname(surface_geopotential), var_stdname(surface_geopotential));
+	cdoWarning("%s not found - set to zero!", var_stdname(surface_geopotential));
 
       memset(fis1, 0, ngp*sizeof(double));
     }
@@ -555,11 +570,18 @@ void *Remapeta(void *argument)
   presID = lnpsID;
   if ( zaxisIDh != -1 && lnpsID == -1 )
     {
-      presID = psID;
-      if ( psID != -1 )
-	cdoWarning("LOG(%s) not found - using %s!", var_stdname(surface_air_pressure), var_stdname(surface_air_pressure));
-      else
+      if ( psID == -1 )
 	cdoAbort("%s not found!", var_stdname(surface_air_pressure));
+      else
+	presID = psID;
+    }
+
+  if ( cdoVerbose )
+    {
+      if ( presID == lnpsID )
+	cdoPrint("using LOG(%s)", var_stdname(surface_air_pressure));      
+      else
+	cdoPrint("using %s", var_stdname(surface_air_pressure));
     }
 
   if ( cdoVerbose ) cdoPrint("nvars3D = %d   ltq = %d", nvars3D, ltq);
@@ -582,7 +604,7 @@ void *Remapeta(void *argument)
 
 	  if ( zaxisIDh != -1 )
 	    {
-	      if ( varID == geopID )
+	      if ( varID == sgeopotID )
 		memcpy(fis1, array, ngp*sizeof(double));
 	      else if ( varID == presID )
 		{
@@ -685,19 +707,19 @@ void *Remapeta(void *argument)
       if ( cptop > 0 )
 	nctop = ncctop(cptop, (long) nhlevf2, (long) nhlevf2+1, a2, b2);
 
-      if ( geopID != -1 )
+      if ( zaxisIDh != -1 && sgeopotID != -1 )
 	{
-	  varID   = geopID;
+	  varID   = sgeopotID;
 	  levelID = 0;
 	  setmissval(ngp, imiss, missval, fis2);
 	  streamDefRecord(streamID2, varID, levelID);
 	  streamWriteRecord(streamID2, fis2, nmissout);
 	}
 
-      if ( lnpsID != -1 )
+      if ( zaxisIDh != -1 && lnpsID != -1 )
 	for ( i = 0; i < ngp; ++i ) ps2[i] = log(ps2[i]);
 
-      if ( presID != -1 )
+      if ( zaxisIDh != -1 && presID != -1 )
 	{
 	  varID   = presID;
 	  levelID = 0;
diff --git a/src/Replace.c b/src/Replace.c
index dacb7a9..61f8404 100644
--- a/src/Replace.c
+++ b/src/Replace.c
@@ -127,9 +127,9 @@ void *Replace(void *argument)
 
   if ( nchvars )
     {
-      vardata2  = malloc(nchvars*sizeof(double *));
-      varnmiss2 = malloc(nchvars*sizeof(int *));
-      varlevel  = malloc(nchvars*sizeof(int *));
+      vardata2  = (double **) malloc(nchvars*sizeof(double *));
+      varnmiss2 = (int **) malloc(nchvars*sizeof(int *));
+      varlevel  = (int **) malloc(nchvars*sizeof(int *));
       for ( idx = 0; idx < nchvars; idx++ )
 	{
 	  varID1 = varlist1[idx];
@@ -137,17 +137,17 @@ void *Replace(void *argument)
 	  nlevel1  = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID1));
 	  nlevel2  = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID2));
 	  gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID2));
-	  vardata2[idx]  = malloc(nlevel2*gridsize*sizeof(double));
-	  varnmiss2[idx] = malloc(nlevel2*sizeof(int));
-	  varlevel[idx] = malloc(nlevel1*sizeof(int));
+	  vardata2[idx]  = (double*) malloc(nlevel2*gridsize*sizeof(double));
+	  varnmiss2[idx] = (int*) malloc(nlevel2*sizeof(int));
+	  varlevel[idx] = (int*) malloc(nlevel1*sizeof(int));
 	  /*
 	  for ( levelID = 0; levelID < nlevel1; levelID++ )
 	    varlevel[idx][levelID] = levelID;
 	  */
 	  if ( nlevel2 <= nlevel1 )
 	    {
-	      double *level1 = malloc(nlevel1*sizeof(double));
-	      double *level2 = malloc(nlevel2*sizeof(double));
+	      double *level1 = (double*) malloc(nlevel1*sizeof(double));
+	      double *level2 = (double*) malloc(nlevel2*sizeof(double));
 	      zaxisInqLevels(vlistInqVarZaxis(vlistID1, varID1), level1);
 	      zaxisInqLevels(vlistInqVarZaxis(vlistID2, varID2), level2);
 
@@ -181,7 +181,7 @@ void *Replace(void *argument)
   streamDefVlist(streamID3, vlistID3);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   nts2 = vlistNtsteps(vlistID2);
 
diff --git a/src/Replacevalues.c b/src/Replacevalues.c
index 0712c7a..ee0e504 100644
--- a/src/Replacevalues.c
+++ b/src/Replacevalues.c
@@ -112,7 +112,7 @@ void *Replacevalues(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Rhopot.c b/src/Rhopot.c
index 3d622b6..2c59f33 100644
--- a/src/Rhopot.c
+++ b/src/Rhopot.c
@@ -246,7 +246,7 @@ void *Rhopot(void *argument)
   if ( nlevel1 != nlevel2 ) cdoAbort("temperature and salinity have different number of levels!");
   nlevel = nlevel1;
 
-  pressure = malloc(nlevel*sizeof(double));
+  pressure = (double*) malloc(nlevel*sizeof(double));
   zaxisInqLevels(zaxisID, pressure);
 
   if ( pin >= 0 ) 
@@ -264,9 +264,9 @@ void *Rhopot(void *argument)
   field_init(&to);
   field_init(&sao);
   field_init(&rho);
-  to.ptr = malloc(gridsize*nlevel*sizeof(double));
-  sao.ptr = malloc(gridsize*nlevel*sizeof(double));
-  rho.ptr = malloc(gridsize*nlevel*sizeof(double));
+  to.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
+  sao.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
+  rho.ptr = (double*) malloc(gridsize*nlevel*sizeof(double));
 
   to.nmiss = 0;
   sao.nmiss = 0;
diff --git a/src/Rotuv.c b/src/Rotuv.c
index 87324c2..94cee5a 100644
--- a/src/Rotuv.c
+++ b/src/Rotuv.c
@@ -46,8 +46,8 @@ void rot_uv_back(int gridID, double *us, double *vs)
   ypole = gridInqYpole(gridID);
   angle = gridInqAngle(gridID);
 
-  xvals = malloc(nlon*sizeof(double));
-  yvals = malloc(nlat*sizeof(double));
+  xvals = (double*) malloc(nlon*sizeof(double));
+  yvals = (double*) malloc(nlat*sizeof(double));
 
   gridInqXvals(gridID, xvals);
   gridInqYvals(gridID, yvals);
@@ -137,11 +137,11 @@ void *Rotuv(void *argument)
   nvars = vlistNvars(vlistID1);
   nrecs = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecs*sizeof(int));
-  recLevelID = malloc(nrecs*sizeof(int));
+  recVarID   = (int*) malloc(nrecs*sizeof(int));
+  recLevelID = (int*) malloc(nrecs*sizeof(int));
 
-  varnmiss   = malloc(nvars*sizeof(int *));
-  vardata    = malloc(nvars*sizeof(double *));
+  varnmiss   = (int **) malloc(nvars*sizeof(int *));
+  vardata    = (double **) malloc(nvars*sizeof(double *));
 
   for ( i = 0; i < nch; i++ ) lfound[i] = FALSE;
 
@@ -176,8 +176,8 @@ void *Rotuv(void *argument)
 
       gridsize = gridInqSize(gridID);
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      varnmiss[varID] = malloc(nlevel*sizeof(int));
-      vardata[varID]  = malloc(gridsize*nlevel*sizeof(double));
+      varnmiss[varID] = (int*) malloc(nlevel*sizeof(int));
+      vardata[varID]  = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   taxisID1 = vlistInqTaxis(vlistID1);
diff --git a/src/Runpctl.c b/src/Runpctl.c
index 25b2b48..bdd3044 100644
--- a/src/Runpctl.c
+++ b/src/Runpctl.c
@@ -82,12 +82,12 @@ void *Runpctl(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
-  dtinfo = malloc((ndates+1)*sizeof(dtinfo_t));
-  vars1 = malloc((ndates+1)*sizeof(field_t **));
-  array = malloc(ndates*sizeof(double));
+  dtinfo = (dtinfo_t*) malloc((ndates+1)*sizeof(dtinfo_t));
+  vars1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
+  array = (double*) malloc(ndates*sizeof(double));
   
   for ( its = 0; its < ndates; its++ )
     {
diff --git a/src/Runstat.c b/src/Runstat.c
index 38fee38..2ed860e 100644
--- a/src/Runstat.c
+++ b/src/Runstat.c
@@ -59,7 +59,7 @@ void datetime_avg_dtinfo(int calendar, int ndates, dtinfo_t *dtinfo)
       juldate2 = juldate_encode(calendar, vdate, vtime);
 
       seconds = juldate_to_seconds(juldate_sub(juldate2, juldate1)) / 2;
-      juldatem = juldate_add_seconds(NINT(seconds), juldate1);
+      juldatem = juldate_add_seconds(lround(seconds), juldate1);
       juldate_decode(calendar, juldatem, &vdate, &vtime);
     }
   else
@@ -100,7 +100,7 @@ void datetime_avg(int calendar, int ndates, datetime_t *datetime)
       juldate2 = juldate_encode(calendar, vdate, vtime);
 
       seconds = juldate_to_seconds(juldate_sub(juldate2, juldate1)) / 2;
-      juldatem = juldate_add_seconds(NINT(seconds), juldate1);
+      juldatem = juldate_add_seconds(lround(seconds), juldate1);
       juldate_decode(calendar, juldatem, &vdate, &vtime);
     }
   else
@@ -227,15 +227,15 @@ void *Runstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
-  dtinfo = malloc((ndates+1)*sizeof(dtinfo_t));
-  vars1 = malloc((ndates+1)*sizeof(field_t **));
+  dtinfo = (dtinfo_t*) malloc((ndates+1)*sizeof(dtinfo_t));
+  vars1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
   if ( !runstat_nomiss )
-    samp1 = malloc((ndates+1)*sizeof(field_t **));
+    samp1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
   if ( lvarstd )
-    vars2 = malloc((ndates+1)*sizeof(field_t **));
+    vars2 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
 
   for ( its = 0; its < ndates; its++ )
     {
@@ -247,7 +247,7 @@ void *Runstat(void *argument)
     }
 
   gridsizemax = vlistGridsizeMax(vlistID1);
-  imask = malloc(gridsizemax*sizeof(int));
+  imask = (int*) malloc(gridsizemax*sizeof(int));
 
   for ( tsID = 0; tsID < ndates; tsID++ )
     {
diff --git a/src/SSOpar.c b/src/SSOpar.c
index 16cf885..a29af35 100644
--- a/src/SSOpar.c
+++ b/src/SSOpar.c
@@ -42,10 +42,10 @@ void data_treat(double *zdata, double *xdata, double *ydata, long nx, long ny)
   int *iscale = NULL;
   long i, j;
 
-  zwork = malloc(3*nx*ny*sizeof(double));
-  xwork = malloc(3*nx*sizeof(double));
-  xscale = malloc(ny*sizeof(double));
-  iscale = malloc(ny*sizeof(int));
+  zwork  = (double*) malloc(3*nx*ny*sizeof(double));
+  xwork  = (double*) malloc(3*nx*sizeof(double));
+  xscale = (double*) malloc(ny*sizeof(double));
+  iscale = (int*) malloc(ny*sizeof(int));
 
   double pi2 = 2*acos(-1.);
   for ( i = 0; i < nx; ++i )
@@ -784,7 +784,7 @@ void *SSOpar(void *argument)
                       if ( cdoVerbose )
                         cdoPrint("lhavevct=TRUE  zaxisIDh = %d, nhlevf   = %d", zaxisIDh, nlevel);
  
-		      vct = malloc(nvct*sizeof(double));
+		      vct = (double*) malloc(nvct*sizeof(double));
 		      zaxisInqVct(zaxisID, vct);
 
 		      if ( cdoVerbose )
@@ -802,7 +802,7 @@ void *SSOpar(void *argument)
     }
 
   if ( zaxisIDh == -1 )
-    cdoAbort("No data on hybrid model level found!");
+    cdoAbort("No 3D variable with hybrid sigma pressure coordinate found!");
 
   nvars = vlistNvars(vlistID1);
 
@@ -866,23 +866,23 @@ void *SSOpar(void *argument)
 
   if ( tempID == -1 ) cdoAbort("Temperature not found!");
 
-  array  = malloc(ngp*sizeof(double));
+  array  = (double*) malloc(ngp*sizeof(double));
 
-  geop   = malloc(ngp*sizeof(double));
-  ps     = malloc(ngp*sizeof(double));
+  geop   = (double*) malloc(ngp*sizeof(double));
+  ps     = (double*) malloc(ngp*sizeof(double));
 
-  temp   = malloc(ngp*nhlevf*sizeof(double));
-  hum    = malloc(ngp*nhlevf*sizeof(double));
-  lwater = malloc(ngp*nhlevf*sizeof(double));
-  iwater = malloc(ngp*nhlevf*sizeof(double));
+  temp   = (double*) malloc(ngp*nhlevf*sizeof(double));
+  hum    = (double*) malloc(ngp*nhlevf*sizeof(double));
+  lwater = (double*) malloc(ngp*nhlevf*sizeof(double));
+  iwater = (double*) malloc(ngp*nhlevf*sizeof(double));
 
-  half_press   = malloc(ngp*(nhlevf+1)*sizeof(double));
-  geopotheight = malloc(ngp*(nhlevf+1)*sizeof(double));
+  half_press   = (double*) malloc(ngp*(nhlevf+1)*sizeof(double));
+  geopotheight = (double*) malloc(ngp*(nhlevf+1)*sizeof(double));
 
   if ( zaxisIDh != -1 && geopID == -1 )
     {
       if ( ltq )
-	cdoWarning("Orography (surf. geopotential) not found - using zero orography!");
+	cdoWarning("Orography (surf. geopotential) not found - set to zero!");
 
       memset(geop, 0, ngp*sizeof(double));
     }
diff --git a/src/Scatter.c b/src/Scatter.c
index 8ab95a8..f349597 100644
--- a/src/Scatter.c
+++ b/src/Scatter.c
@@ -41,11 +41,11 @@ void genGrids(int gridID1, int *gridIDs, int nxvals, int nyvals, int nxblocks, i
   nx = gridInqXsize(gridID1);
   ny = gridInqYsize(gridID1);
 
-  xvals = malloc(nx*sizeof(double));
-  yvals = malloc(ny*sizeof(double));
+  xvals = (double*) malloc(nx*sizeof(double));
+  yvals = (double*) malloc(ny*sizeof(double));
 
-  xlsize = malloc(nxblocks*sizeof(int));
-  ylsize = malloc(nyblocks*sizeof(int));
+  xlsize = (int*) malloc(nxblocks*sizeof(int));
+  ylsize = (int*) malloc(nyblocks*sizeof(int));
 
   gridInqXvals(gridID1, xvals);
   gridInqYvals(gridID1, yvals);
@@ -65,7 +65,7 @@ void genGrids(int gridID1, int *gridIDs, int nxvals, int nyvals, int nxblocks, i
 	offset = iy*nyvals*nx + ix*nxvals;
 
 	gridsize2 = xlsize[ix]*ylsize[iy];
-	gridindex[index] = malloc(gridsize2*sizeof(int));
+	gridindex[index] = (int*) malloc(gridsize2*sizeof(int));
 
 	gridsize2 = 0;
         // printf("iy %d, ix %d offset %d\n", iy, ix,  offset);
@@ -207,19 +207,19 @@ void *Scatter(void *argument)
   nsplit = nxblocks*nyblocks;
   if ( nsplit > MAX_BLOCKS ) cdoAbort("Too many blocks (max = %d)!", MAX_BLOCKS);
 
-  array1 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
 
-  vlistIDs  = malloc(nsplit*sizeof(int));
-  streamIDs = malloc(nsplit*sizeof(int));
+  vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+  streamIDs = (int*) malloc(nsplit*sizeof(int));
 
-  grids = malloc(ngrids*sizeof(sgrid_t));
+  grids = (sgrid_t*) malloc(ngrids*sizeof(sgrid_t));
   for ( i = 0; i < ngrids; i++ )
     {  
       gridID1 = vlistGrid(vlistID1, i);
       grids[i].gridID    = vlistGrid(vlistID1, i);
-      grids[i].gridIDs   = malloc(nsplit*sizeof(int));
-      grids[i].gridsize  = malloc(nsplit*sizeof(int));
-      grids[i].gridindex = malloc(nsplit*sizeof(int*));
+      grids[i].gridIDs   = (int*) malloc(nsplit*sizeof(int));
+      grids[i].gridsize  = (int*) malloc(nsplit*sizeof(int));
+      grids[i].gridindex = (int**) malloc(nsplit*sizeof(int*));
 
       for ( index = 0; index < nsplit; index++ ) grids[i].gridindex[index] = NULL;
     }
@@ -246,7 +246,7 @@ void *Scatter(void *argument)
   for ( index = 0; index < nsplit; index++ )
     if ( grids[0].gridsize[index] > gridsize2max ) gridsize2max = grids[0].gridsize[index];
 
-  array2 = malloc(gridsize2max*sizeof(double));
+  array2 = (double*) malloc(gridsize2max*sizeof(double));
 
   strcpy(filename, cdoStreamName(1)->args);
   nchars = strlen(filename);
diff --git a/src/Seascount.c b/src/Seascount.c
index 8581896..1318c18 100644
--- a/src/Seascount.c
+++ b/src/Seascount.c
@@ -71,14 +71,14 @@ void *Seascount(void *argument)
 
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
 
diff --git a/src/Seaspctl.c b/src/Seaspctl.c
index b8de942..54b220a 100644
--- a/src/Seaspctl.c
+++ b/src/Seaspctl.c
@@ -95,14 +95,14 @@ void *Seaspctl(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords * sizeof(int));
-  recLevelID = malloc(nrecords * sizeof(int));
+  recVarID   = (int*) malloc(nrecords * sizeof(int));
+  recLevelID = (int*) malloc(nrecords * sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
-  vars1 = malloc(nvars * sizeof(field_t *));
+  vars1 = (field_t **) malloc(nvars * sizeof(field_t *));
   hset = hsetCreate(nvars);
 
   for ( varID = 0; varID < nvars; varID++ )
@@ -112,7 +112,7 @@ void *Seaspctl(void *argument)
       nlevels   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
       missval  = vlistInqVarMissval(vlistID1, varID);
 
-      vars1[varID] = malloc(nlevels * sizeof(field_t));
+      vars1[varID] = (field_t*) malloc(nlevels * sizeof(field_t));
       hsetCreateVarLevels(hset, varID, nlevels, gridID);
 
       for ( levelID = 0; levelID < nlevels; levelID++ )
@@ -120,7 +120,7 @@ void *Seaspctl(void *argument)
 	  vars1[varID][levelID].grid    = gridID;
 	  vars1[varID][levelID].nmiss   = 0;
 	  vars1[varID][levelID].missval = missval;
-	  vars1[varID][levelID].ptr     = malloc(gridsize * sizeof(double));
+	  vars1[varID][levelID].ptr     = (double*) malloc(gridsize * sizeof(double));
 	}
     }
 
diff --git a/src/Seasstat.c b/src/Seasstat.c
index a715848..b64334f 100644
--- a/src/Seasstat.c
+++ b/src/Seasstat.c
@@ -94,13 +94,13 @@ void *Seasstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
   samp1 = field_malloc(vlistID1, FIELD_NONE);
@@ -178,7 +178,7 @@ void *Seasstat(void *argument)
 		  if ( nmiss > 0 || samp1[varID][levelID].ptr )
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
-			samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
+			samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		      for ( i = 0; i < gridsize; i++ )
 			if ( DBL_IS_EQUAL(vars1[varID][levelID].ptr[i],
@@ -198,7 +198,7 @@ void *Seasstat(void *argument)
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
 			{
-			  samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
+			  samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 			  for ( i = 0; i < gridsize; i++ )
 			    samp1[varID][levelID].ptr[i] = nsets;
 			}
diff --git a/src/Selbox.c b/src/Selbox.c
index 272d407..9e1f54a 100644
--- a/src/Selbox.c
+++ b/src/Selbox.c
@@ -108,6 +108,7 @@ int gengrid(int gridID1, int lat1, int lat2, int lon11, int lon12, int lon21, in
     {
       gridDefXpole(gridID2, gridInqXpole(gridID1));
       gridDefYpole(gridID2, gridInqYpole(gridID1));
+      gridDefAngle(gridID2, gridInqAngle(gridID1));
     }
 
   lxvals = gridInqXvals(gridID1, NULL);
@@ -117,18 +118,18 @@ int gengrid(int gridID1, int lat1, int lat2, int lon11, int lon12, int lon21, in
     {
       if ( lxvals && lyvals )
 	{
-	  xvals1 = malloc(nlon1*nlat1*sizeof(double));
-	  yvals1 = malloc(nlon1*nlat1*sizeof(double));
-	  xvals2 = malloc(nlon2*nlat2*sizeof(double));
-	  yvals2 = malloc(nlon2*nlat2*sizeof(double));
+	  xvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+	  yvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+	  xvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
+	  yvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
 	}
     }
   else
     {
-      if ( lxvals ) xvals1 = malloc(nlon1*sizeof(double));
-      if ( lyvals ) yvals1 = malloc(nlat1*sizeof(double));
-      if ( lxvals ) xvals2 = malloc(nlon2*sizeof(double));
-      if ( lyvals ) yvals2 = malloc(nlat2*sizeof(double));
+      if ( lxvals ) xvals1 = (double*) malloc(nlon1*sizeof(double));
+      if ( lyvals ) yvals1 = (double*) malloc(nlat1*sizeof(double));
+      if ( lxvals ) xvals2 = (double*) malloc(nlon2*sizeof(double));
+      if ( lyvals ) yvals2 = (double*) malloc(nlat2*sizeof(double));
     }
 
   pxvals2 = xvals2;
@@ -160,7 +161,7 @@ int gengrid(int gridID1, int lat1, int lat2, int lon11, int lon12, int lon21, in
 	{
 	  for ( i = lon21; i <= lon22; i++ ) *pxvals2++ = xvals1[i];
 	  for ( i = lon11; i <= lon12; i++ ) *pxvals2++ = xvals1[i];
-	  if ( memcmp(xunits, "degree", 6) == 0 ) correct_xvals(nlon2, 1, xvals2);
+	  if ( strncmp(xunits, "degree", 6) == 0 ) correct_xvals(nlon2, 1, xvals2);
 	}
       
       if ( lyvals ) for ( i = lat1;  i <= lat2;  i++ ) *pyvals2++ = yvals1[i];
@@ -181,17 +182,17 @@ int gengrid(int gridID1, int lat1, int lat2, int lon11, int lon12, int lon21, in
     {
       if ( gridtype == GRID_CURVILINEAR )
 	{
-	  xbounds1 = malloc(4*nlon1*nlat1*sizeof(double));
-	  ybounds1 = malloc(4*nlon1*nlat1*sizeof(double));
-	  xbounds2 = malloc(4*nlon2*nlat2*sizeof(double));
-	  ybounds2 = malloc(4*nlon2*nlat2*sizeof(double));
+	  xbounds1 = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+	  ybounds1 = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+	  xbounds2 = (double*) malloc(4*nlon2*nlat2*sizeof(double));
+	  ybounds2 = (double*) malloc(4*nlon2*nlat2*sizeof(double));
 	}
       else
 	{
-	  xbounds1 = malloc(2*nlon1*sizeof(double));
-	  ybounds1 = malloc(2*nlat1*sizeof(double));
-	  xbounds2 = malloc(2*nlon2*sizeof(double));
-	  ybounds2 = malloc(2*nlat2*sizeof(double));
+	  xbounds1 = (double*) malloc(2*nlon1*sizeof(double));
+	  ybounds1 = (double*) malloc(2*nlat1*sizeof(double));
+	  xbounds2 = (double*) malloc(2*nlon2*sizeof(double));
+	  ybounds2 = (double*) malloc(2*nlat2*sizeof(double));
 	}
 
       pxbounds2 = xbounds2;
@@ -224,7 +225,7 @@ int gengrid(int gridID1, int lat1, int lat2, int lon11, int lon12, int lon21, in
 	  for ( i = 2*lon11; i < 2*(lon12+1); i++ ) *pxbounds2++ = xbounds1[i];
 	  for ( i = 2*lat1;  i < 2*(lat2+1);  i++ ) *pybounds2++ = ybounds1[i];
 
-	  if ( memcmp(xunits, "degree", 6) == 0 )
+	  if ( strncmp(xunits, "degree", 6) == 0 )
 	    {
 	      correct_xvals(nlon2, 2, xbounds2);
 	      correct_xvals(nlon2, 2, xbounds2+1);
@@ -284,10 +285,10 @@ int gengridcell(int gridID1, int gridsize2, int *cellidx)
 
   if ( gridInqXvals(gridID1, NULL) && gridInqYvals(gridID1, NULL) )
     {
-      xvals1 = malloc(gridsize1*sizeof(double));
-      yvals1 = malloc(gridsize1*sizeof(double));
-      xvals2 = malloc(gridsize2*sizeof(double));
-      yvals2 = malloc(gridsize2*sizeof(double));
+      xvals1 = (double*) malloc(gridsize1*sizeof(double));
+      yvals1 = (double*) malloc(gridsize1*sizeof(double));
+      xvals2 = (double*) malloc(gridsize2*sizeof(double));
+      yvals2 = (double*) malloc(gridsize2*sizeof(double));
 
       gridInqXvals(gridID1, xvals1);
       gridInqYvals(gridID1, yvals1);
@@ -314,10 +315,10 @@ int gengridcell(int gridID1, int gridsize2, int *cellidx)
     {
       nv = gridInqNvertex(gridID1);
 
-      xbounds1 = malloc(nv*gridsize1*sizeof(double));
-      ybounds1 = malloc(nv*gridsize1*sizeof(double));
-      xbounds2 = malloc(nv*gridsize2*sizeof(double));
-      ybounds2 = malloc(nv*gridsize2*sizeof(double));
+      xbounds1 = (double*) malloc(nv*gridsize1*sizeof(double));
+      ybounds1 = (double*) malloc(nv*gridsize1*sizeof(double));
+      xbounds2 = (double*) malloc(nv*gridsize2*sizeof(double));
+      ybounds2 = (double*) malloc(nv*gridsize2*sizeof(double));
 
       gridInqXbounds(gridID1, xbounds1);
       gridInqYbounds(gridID1, ybounds1);
@@ -444,13 +445,13 @@ void genlonlatbox(int argc_offset, int gridID1, int *lat1, int *lat2, int *lon11
 
   if ( gridtype == GRID_CURVILINEAR )
     {
-      xvals1 = malloc(nlon1*nlat1*sizeof(double));
-      yvals1 = malloc(nlon1*nlat1*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+      yvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
     }
   else
     {
-      xvals1 = malloc(nlon1*sizeof(double));
-      yvals1 = malloc(nlat1*sizeof(double));
+      xvals1 = (double*) malloc(nlon1*sizeof(double));
+      yvals1 = (double*) malloc(nlat1*sizeof(double));
     }
 
   gridInqXvals(gridID1, xvals1);
@@ -459,8 +460,8 @@ void genlonlatbox(int argc_offset, int gridID1, int *lat1, int *lat2, int *lon11
   gridInqXunits(gridID1, xunits);
   gridInqYunits(gridID1, yunits);
 
-  if ( memcmp(xunits, "radian", 6) == 0 ) xfact = RAD2DEG;
-  if ( memcmp(yunits, "radian", 6) == 0 ) yfact = RAD2DEG;
+  if ( strncmp(xunits, "radian", 6) == 0 ) xfact = RAD2DEG;
+  if ( strncmp(yunits, "radian", 6) == 0 ) yfact = RAD2DEG;
 
   if ( gridtype == GRID_CURVILINEAR )
     {
@@ -592,7 +593,7 @@ int gencellgrid(int gridID1, int *gridsize2, int **cellidx)
   int cellinc = 4096;
   char xunits[CDI_MAX_NAME];
   char yunits[CDI_MAX_NAME];
-  double xfact, yfact;
+  double xfact = 1, yfact = 1;
   int argc_offset = 0;
 
   operatorCheckArgc(argc_offset+4);
@@ -611,8 +612,8 @@ int gencellgrid(int gridID1, int *gridsize2, int **cellidx)
 
   if ( gridtype != GRID_UNSTRUCTURED ) cdoAbort("Internal problem, wrong grid type!");
 
-  xvals1 = malloc(gridsize1*sizeof(double));
-  yvals1 = malloc(gridsize1*sizeof(double));
+  xvals1 = (double*) malloc(gridsize1*sizeof(double));
+  yvals1 = (double*) malloc(gridsize1*sizeof(double));
 
   gridInqXvals(gridID1, xvals1);
   gridInqYvals(gridID1, yvals1);
@@ -620,15 +621,8 @@ int gencellgrid(int gridID1, int *gridsize2, int **cellidx)
   gridInqXunits(gridID1, xunits);
   gridInqYunits(gridID1, yunits);
 
-  if ( memcmp(xunits, "radian", 6) == 0 )
-    xfact = RAD2DEG;
-  else
-    xfact = 1;
-
-  if ( memcmp(yunits, "radian", 6) == 0 )
-    yfact = RAD2DEG;
-  else
-    yfact = 1;
+  if ( strncmp(xunits, "radian", 6) == 0 ) xfact = RAD2DEG;
+  if ( strncmp(yunits, "radian", 6) == 0 ) yfact = RAD2DEG;
 
   /* find gridsize2 */
   *cellidx = NULL;
@@ -645,7 +639,7 @@ int gencellgrid(int gridID1, int *gridsize2, int **cellidx)
 	    if ( nvals > maxcell )
 	      {
 		maxcell += cellinc;
-		*cellidx = realloc(*cellidx, maxcell*sizeof(int));
+		*cellidx = (int*) realloc(*cellidx, maxcell*sizeof(int));
 	      }
 	    (*cellidx)[nvals-1] = i;
 	  }
@@ -859,11 +853,11 @@ void *Selbox(void *argument)
   vlistDefTaxis(vlistID2, taxisID2);
 
   nvars = vlistNvars(vlistID1);
-  vars  = malloc(nvars*sizeof(int));
+  vars  = (int*) malloc(nvars*sizeof(int));
   for ( varID = 0; varID < nvars; varID++ ) vars[varID] = FALSE;
 
   ngrids = vlistNgrids(vlistID1);
-  sbox = malloc(ngrids*sizeof(sbox_t));
+  sbox = (sbox_t*) malloc(ngrids*sizeof(sbox_t));
 
   for ( index = 0; index < ngrids; index++ )
     {
@@ -925,11 +919,11 @@ void *Selbox(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-  array1 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
 
   gridsize2 = vlistGridsizeMax(vlistID2);
   if ( vlistNumber(vlistID2) != CDI_REAL ) gridsize2 *= 2;
-  array2 = malloc(gridsize2*sizeof(double));
+  array2 = (double*) malloc(gridsize2*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Select.c b/src/Select.c
index 7138843..854624a 100644
--- a/src/Select.c
+++ b/src/Select.c
@@ -130,7 +130,7 @@ pml_t *pmlNew(const char *name)
 {
   pml_t *pml;
 
-  pml = malloc(sizeof(pml_t));
+  pml = (pml_t*) malloc(sizeof(pml_t));
 
   pml_init(pml, name);
 
@@ -196,7 +196,7 @@ int pmlAdd(pml_t *pml, const char *name, int type, int dis, void *ptr, size_t si
       return (-1);
     }
 
-  pml_entry = malloc(sizeof(pml_entry_t));
+  pml_entry = (pml_entry_t*) malloc(sizeof(pml_entry_t));
 
   pml_entry->name = strdup(name);
   pml_entry->len  = strlen(name);
@@ -283,7 +283,6 @@ int pml_add_entry(pml_entry_t *entry, char *arg)
 void pmlProcess(pml_entry_t *entry, int argc, char **argv)
 {
   int i;
-  int len;
   char *parg;
   char *epos;
 
@@ -328,7 +327,7 @@ int pmlRead(pml_t *pml, int argc, char **argv)
       bufsize += len+1;
     }
 
-  parbuf = malloc(bufsize*sizeof(char));
+  parbuf = (char*) malloc(bufsize*sizeof(char));
   memset(parbuf, 0, bufsize*sizeof(char));
 
   istart = 0;
@@ -593,7 +592,7 @@ void *Select(void *argument)
 
 	  vlistClearFlag(vlistID1);
 	  nvars = vlistNvars(vlistID1);
-	  vars  = malloc(nvars*sizeof(int));
+	  vars  = (int*) malloc(nvars*sizeof(int));
 
 	  if ( operatorID == DELETE )
 	    {
@@ -606,7 +605,7 @@ void *Select(void *argument)
 		    vlistDefFlag(vlistID1, varID, levID, TRUE);
 		}
 	    }
-	  else
+	  else if ( operatorID == SELECT )
 	    {
 	      result = TRUE;
 	    }
@@ -764,36 +763,50 @@ void *Select(void *argument)
 
 	  //if ( cdoVerbose ) vlistPrint(vlistID2);
 
-	  nvars2 = vlistNvars(vlistID2);
-
-	  for ( varID = 0; varID < nvars2; ++varID )
-	    if ( vlistInqVarTsteptype(vlistID2, varID) != TSTEP_CONSTANT ) break;
-	  if ( varID == nvars2 ) vlistDefNtsteps(vlistID2, 0);
-
 	  taxisID2 = taxisDuplicate(taxisID1);
 	  vlistDefTaxis(vlistID2, taxisID2);
 
 	  ntsteps = vlistNtsteps(vlistID1);
 
-	  if ( ntsteps == 1 )
+	  nvars2 = vlistNvars(vlistID2);
+
+	  if ( ntsteps == 1 && nfiles == 1 )
 	    {
 	      for ( varID = 0; varID < nvars2; ++varID )
-		if ( vlistInqVarTsteptype(vlistID1, varID) != TSTEP_CONSTANT ) break;
-	      
+		if ( vlistInqVarTsteptype(vlistID2, varID) != TSTEP_CONSTANT ) break;
+
 	      if ( varID == nvars2 ) ntsteps = 0;
 	    }
 
+	  if ( operatorID == SELECT && npar_timestep == 1 ) ntsteps = 1;
+	  
+	  if ( ntsteps == 0 || ntsteps == 1 ) vlistDefNtsteps(vlistID2, ntsteps);
+
 	  if ( ntsteps == 0 && nfiles > 1 )
 	    {	      
 	      for ( varID = 0; varID < nvars2; ++varID )
 		vlistDefVarTsteptype(vlistID2, varID, TSTEP_INSTANT);
 	    }
 
+	  /* add support for negative timestep values */
+	  if ( npar_timestep > 0 && ntsteps > 0 && nfiles == 1 )
+	    {
+	      for ( i = 0; i < npar_timestep; i++ )
+		{
+		  if ( par_timestep[i] < 0 )
+		    {
+		      if ( cdoVerbose )
+			cdoPrint("timestep %d changed to %d", par_timestep[i], ntsteps + 1 + par_timestep[i]);
+		      par_timestep[i] = ntsteps + 1 + par_timestep[i];
+		    }
+		}
+	    }
+
 	  if ( ! lcopy )
 	    {
 	      gridsize = vlistGridsizeMax(vlistID1);
 	      if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-	      array = malloc(gridsize*sizeof(double));
+	      array = (double*) malloc(gridsize*sizeof(double));
 	    }
 	}
       else
@@ -816,6 +829,8 @@ void *Select(void *argument)
 	      copytimestep = FALSE;
 	      timestep = tsID1 + 1;
 
+	      if ( operatorID == SELECT && npar_timestep > 0 && timestep > par_timestep[npar_timestep-1] ) break;
+
 	      vdate = taxisInqVdate(taxisID1);
 	      vtime = taxisInqVtime(taxisID1);
 	      cdiDecodeDate(vdate, &year, &month, &day);
diff --git a/src/Seloperator.c b/src/Seloperator.c
index e48ec04..bed0735 100644
--- a/src/Seloperator.c
+++ b/src/Seloperator.c
@@ -107,7 +107,7 @@ void *Seloperator(void *argument)
   if ( ! lcopy )
     {
       gridsize = vlistGridsizeMax(vlistID1);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Seltime.c b/src/Seltime.c
index 9d7c0da..79cba16 100644
--- a/src/Seltime.c
+++ b/src/Seltime.c
@@ -211,7 +211,7 @@ void *Seltime(void *argument)
   LIST *ilist = listNew(INT_LIST);
   LIST *flist = listNew(FLT_LIST);
   int gridID;
-  int nvars, nlevel;
+  int nvars, nlevel, ntsteps;
   int nconst, lconstout = FALSE;
   int process_nts1 = FALSE, process_nts2 = FALSE;
   int *vdate_list = NULL, *vtime_list = NULL;
@@ -301,19 +301,10 @@ void *Seltime(void *argument)
 
   if ( nsel )
     {
-      selfound = malloc(nsel*sizeof(int));
+      selfound = (int*) malloc(nsel*sizeof(int));
       for ( i = 0; i < nsel; i++ ) selfound[i] = FALSE;
     }
 
-  if ( cdoVerbose )
-    {
-      for ( i = 0; i < nsel; i++ )
-	if ( operatorID == SELDATE )
-	  cdoPrint("fltarr entry: %d %14.4f", i+1, fltarr[i]);
-	else
-	  cdoPrint("intarr entry: %d %d", i+1, intarr[i]);
-    }
-
   streamID1 = streamOpenRead(cdoStreamName(0));
 
   vlistID1 = streamInqVlist(streamID1);
@@ -330,7 +321,32 @@ void *Seltime(void *argument)
     {
       gridsize = vlistGridsizeMax(vlistID1);
       if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
+    }
+
+  ntsteps = vlistNtsteps(vlistID1);
+
+  /* add support for negative timestep values */
+  if ( operatorID == SELTIMESTEP && ntsteps > 0 )
+    {
+      for ( i = 0; i < nsel; i++ )
+	{
+	  if ( intarr[i] < 0 )
+	    {
+	      if ( cdoVerbose )
+		cdoPrint("timestep %d changed to %d", intarr[i], ntsteps + 1 + intarr[i]);
+	      intarr[i] = ntsteps + 1 + intarr[i];
+	    }
+	}
+    }
+
+  if ( cdoVerbose )
+    {
+      for ( i = 0; i < nsel; i++ )
+	if ( operatorID == SELDATE )
+	  cdoPrint("fltarr entry: %d %14.4f", i+1, fltarr[i]);
+	else
+	  cdoPrint("intarr entry: %d %d", i+1, intarr[i]);
     }
 
   nvars = vlistNvars(vlistID1);
@@ -344,15 +360,15 @@ void *Seltime(void *argument)
     {
       if ( lnts1 )
 	{
-	  vdate_list = malloc(nts1*sizeof(int));
-	  vtime_list = malloc(nts1*sizeof(int));
+	  vdate_list = (int*) malloc(nts1*sizeof(int));
+	  vtime_list = (int*) malloc(nts1*sizeof(int));
 	}
       else
 	{
 	  nts1 = 1;
 	}
 
-      vars  = malloc(nts1*sizeof(field_t **));
+      vars  = (field_t ***) malloc(nts1*sizeof(field_t **));
 
       for ( tsID = 0; tsID < nts1; tsID++ )
 	{
@@ -368,7 +384,7 @@ void *Seltime(void *argument)
 		  
 		  for ( levelID = 0; levelID < nlevel; levelID++ )
 		    {
-		      vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		      vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 		    }
 		}
 	    }
diff --git a/src/Selvar.c b/src/Selvar.c
index ed5b90f..49ecb4f 100644
--- a/src/Selvar.c
+++ b/src/Selvar.c
@@ -150,7 +150,7 @@ void *Selvar(void *argument)
 
   if ( nsel )
     {
-      selfound = malloc(nsel*sizeof(int));
+      selfound = (int*) malloc(nsel*sizeof(int));
       for ( i = 0; i < nsel; i++ ) selfound[i] = FALSE;
     }
 
@@ -407,7 +407,7 @@ void *Selvar(void *argument)
     {
       gridsize = vlistGridsizeMax(vlistID1);
       if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Set.c b/src/Set.c
index 2067698..53278c8 100644
--- a/src/Set.c
+++ b/src/Set.c
@@ -147,7 +147,7 @@ void *Set(void *argument)
 	  zaxisID1 = vlistZaxis(vlistID2, index);
 	  zaxisID2 = zaxisDuplicate(zaxisID1);
 	  nlevs = zaxisInqSize(zaxisID2);
-	  levels = malloc(nlevs*sizeof(double));
+	  levels = (double*) malloc(nlevs*sizeof(double));
 	  zaxisInqLevels(zaxisID2, levels);
 	  levels[0] = newlevel;
 	  zaxisDefLevels(zaxisID2, levels);
@@ -163,10 +163,9 @@ void *Set(void *argument)
 	  zaxisID1 = vlistZaxis(vlistID2, index);
 	  zaxisID2 = zaxisDuplicate(zaxisID1);
 
-	  zaxistype = ltype2ztype(newval);
-
+	  zaxistype = ZAXIS_GENERIC;
 	  zaxisChangeType(zaxisID2, zaxistype);
-	  if ( zaxistype == ZAXIS_GENERIC ) zaxisDefLtype(zaxisID2, newval);
+	  zaxisDefLtype(zaxisID2, newval);
 	  vlistChangeZaxis(vlistID2, zaxisID1, zaxisID2);
 	}
     }
@@ -178,7 +177,7 @@ void *Set(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID1 = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID1)) )
diff --git a/src/Setbox.c b/src/Setbox.c
index 327fc49..6a73dc9 100644
--- a/src/Setbox.c
+++ b/src/Setbox.c
@@ -125,7 +125,7 @@ void *Setbox(void *argument)
   vlistDefTaxis(vlistID2, taxisID2);
 
   nvars = vlistNvars(vlistID1);
-  vars  = malloc(nvars*sizeof(int));
+  vars  = (int*) malloc(nvars*sizeof(int));
   for ( varID = 0; varID < nvars; varID++ )
     {
       if ( gridID == vlistInqVarGrid(vlistID1, varID) )
@@ -139,7 +139,7 @@ void *Setbox(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = gridInqSize(gridID);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Setgatt.c b/src/Setgatt.c
index ffc7d87..ad4154b 100644
--- a/src/Setgatt.c
+++ b/src/Setgatt.c
@@ -121,7 +121,7 @@ void *Setgatt(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Setgrid.c b/src/Setgrid.c
index 6aae60e..3a99071 100644
--- a/src/Setgrid.c
+++ b/src/Setgrid.c
@@ -113,7 +113,7 @@ void *Setgrid(void *argument)
 
       gridID = vlistInqVarGrid(vlistID, varID);
       areasize = gridInqSize(gridID);
-      areaweight = malloc(areasize*sizeof(double));
+      areaweight = (double*) malloc(areasize*sizeof(double));
   
       streamReadRecord(streamID, areaweight, &nmiss);
 
@@ -157,7 +157,7 @@ void *Setgrid(void *argument)
       missval  = vlistInqVarMissval(vlistID, varID);
       gridID   = vlistInqVarGrid(vlistID, varID);
       masksize = gridInqSize(gridID);
-      gridmask = malloc(masksize*sizeof(double));
+      gridmask = (double*) malloc(masksize*sizeof(double));
   
       streamReadRecord(streamID, gridmask, &nmiss);
 
@@ -249,6 +249,8 @@ void *Setgrid(void *argument)
 	  gridID1 = vlistGrid(vlistID1, index);
 	  gridID2 = -1;
 
+	  if ( gridInqType(gridID1) == GRID_GENERIC && gridInqSize(gridID1) == 1 ) continue;
+	  
 	  if ( lregular )
 	    {
 	      if ( gridInqType(gridID1) == GRID_GAUSSIAN_REDUCED )
@@ -256,7 +258,7 @@ void *Setgrid(void *argument)
 		  gridID2 = gridToRegular(gridID1);
 		}
 	    }
-	  else if ( ldereference    )
+	  else if ( ldereference )
 	    {
 	      gridID2 = referenceToGrid(gridID1);
 	      if ( gridID2 == -1 ) cdoAbort("Reference to horizontal grid not found!");
@@ -275,7 +277,7 @@ void *Setgrid(void *argument)
 		  if ( ligme )
 		    {
 		      grid2_nvgp = gridInqSize(gridID2);
-		      grid2_vgpm = malloc(grid2_nvgp*sizeof(int));
+		      grid2_vgpm = (int*) malloc(grid2_nvgp*sizeof(int));
 		      gridInqMaskGME(gridID2, grid2_vgpm);
 		      gridCompress(gridID2);
 		    }
@@ -322,13 +324,13 @@ void *Setgrid(void *argument)
 	  if ( gridsize == masksize )
 	    {
 	      int *mask;
-	      mask = malloc(masksize*sizeof(int));
+	      mask = (int*) malloc(masksize*sizeof(int));
 	      for ( i = 0; i < masksize; i++ )
 		{
 		  if ( gridmask[i] < 0 || gridmask[i] > 255 )
 		    mask[i] = 0;
 		  else
-		    mask[i] = NINT(gridmask[i]);
+		    mask[i] = lround(gridmask[i]);
 		}
 	      gridID2 = gridDuplicate(gridID1);
 	      gridDefMask(gridID2, mask);
@@ -358,7 +360,7 @@ void *Setgrid(void *argument)
     gridsize = vlistGridsizeMax(vlistID1);
 
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Sethalo.c b/src/Sethalo.c
index ac895c5..fef8dc1 100644
--- a/src/Sethalo.c
+++ b/src/Sethalo.c
@@ -75,10 +75,10 @@ int gentpngrid(int gridID1)
     {
       if ( gridtype == GRID_CURVILINEAR )
 	{
-	  xvals1 = malloc(nlon1*nlat1*sizeof(double));
-	  yvals1 = malloc(nlon1*nlat1*sizeof(double));
-	  xvals2 = malloc(nlon2*nlat2*sizeof(double));
-	  yvals2 = malloc(nlon2*nlat2*sizeof(double));
+	  xvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+	  yvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+	  xvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
+	  yvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
 
 	  gridInqXvals(gridID1, xvals1);
 	  gridInqYvals(gridID1, yvals1);
@@ -115,10 +115,10 @@ int gentpngrid(int gridID1)
     {
       if ( gridtype == GRID_CURVILINEAR )
 	{
-	  xbounds1 = malloc(4*nlon1*nlat1*sizeof(double));
-	  ybounds1 = malloc(4*nlon1*nlat1*sizeof(double));
-	  xbounds2 = malloc(4*nlon2*nlat2*sizeof(double));
-	  ybounds2 = malloc(4*nlon2*nlat2*sizeof(double));
+	  xbounds1 = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+	  ybounds1 = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+	  xbounds2 = (double*) malloc(4*nlon2*nlat2*sizeof(double));
+	  ybounds2 = (double*) malloc(4*nlon2*nlat2*sizeof(double));
 
 	  gridInqXbounds(gridID1, xbounds1);
 	  gridInqYbounds(gridID1, ybounds1);
@@ -238,17 +238,17 @@ int gengrid(int gridID1, int lhalo, int rhalo)
     {
       if ( gridtype == GRID_CURVILINEAR )
 	{
-	  xvals1 = malloc(nlon1*nlat1*sizeof(double));
-	  yvals1 = malloc(nlon1*nlat1*sizeof(double));
-	  xvals2 = malloc(nlon2*nlat2*sizeof(double));
-	  yvals2 = malloc(nlon2*nlat2*sizeof(double));
+	  xvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+	  yvals1 = (double*) malloc(nlon1*nlat1*sizeof(double));
+	  xvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
+	  yvals2 = (double*) malloc(nlon2*nlat2*sizeof(double));
 	}
       else
 	{
-	  xvals1 = malloc(nlon1*sizeof(double));
-	  yvals1 = malloc(nlat1*sizeof(double));
-	  xvals2 = malloc(nlon2*sizeof(double));
-	  yvals2 = malloc(nlat2*sizeof(double));
+	  xvals1 = (double*) malloc(nlon1*sizeof(double));
+	  yvals1 = (double*) malloc(nlat1*sizeof(double));
+	  xvals2 = (double*) malloc(nlon2*sizeof(double));
+	  yvals2 = (double*) malloc(nlat2*sizeof(double));
 	}
 
       pxvals2 = xvals2;
@@ -305,17 +305,17 @@ int gengrid(int gridID1, int lhalo, int rhalo)
     {
       if ( gridtype == GRID_CURVILINEAR )
 	{
-	  xbounds1 = malloc(4*nlon1*nlat1*sizeof(double));
-	  ybounds1 = malloc(4*nlon1*nlat1*sizeof(double));
-	  xbounds2 = malloc(4*nlon2*nlat2*sizeof(double));
-	  ybounds2 = malloc(4*nlon2*nlat2*sizeof(double));
+	  xbounds1 = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+	  ybounds1 = (double*) malloc(4*nlon1*nlat1*sizeof(double));
+	  xbounds2 = (double*) malloc(4*nlon2*nlat2*sizeof(double));
+	  ybounds2 = (double*) malloc(4*nlon2*nlat2*sizeof(double));
 	}
       else
 	{
-	  xbounds1 = malloc(2*nlon1*sizeof(double));
-	  ybounds1 = malloc(2*nlat1*sizeof(double));
-	  xbounds2 = malloc(2*nlon2*sizeof(double));
-	  ybounds2 = malloc(2*nlat2*sizeof(double));
+	  xbounds1 = (double*) malloc(2*nlon1*sizeof(double));
+	  ybounds1 = (double*) malloc(2*nlat1*sizeof(double));
+	  xbounds2 = (double*) malloc(2*nlon2*sizeof(double));
+	  ybounds2 = (double*) malloc(2*nlat2*sizeof(double));
 	}
 
       pxbounds2 = xbounds2;
@@ -547,7 +547,7 @@ void *Sethalo(void *argument)
     }
 
   nvars = vlistNvars(vlistID1);
-  vars  = malloc(nvars*sizeof(int));
+  vars  = (int*) malloc(nvars*sizeof(int));
   for ( varID = 0; varID < nvars; varID++ )
     {
       if ( gridID1 == vlistInqVarGrid(vlistID1, varID) )
@@ -561,10 +561,10 @@ void *Sethalo(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = gridInqSize(gridID1);
-  array1 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
 
   gridsize2 = gridInqSize(gridID2);
-  array2 = malloc(gridsize2*sizeof(double));
+  array2 = (double*) malloc(gridsize2*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Setmiss.c b/src/Setmiss.c
index e57083b..90970df 100644
--- a/src/Setmiss.c
+++ b/src/Setmiss.c
@@ -132,7 +132,7 @@ void *Setmiss(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Setpartab.c b/src/Setpartab.c
index e093dc2..3f5ea98 100644
--- a/src/Setpartab.c
+++ b/src/Setpartab.c
@@ -45,6 +45,7 @@
 #include "util.h"
 #include "namelist.h"
 
+int stringToParam(const char *paramstr);
 
 typedef enum {CODE_NUMBER, PARAMETER_ID, VARIABLE_NAME, STANDARD_NAME} pt_mode_t;
 
@@ -173,7 +174,7 @@ void *get_converter(char *src_unit_str, char *tgt_unit_str, int *rstatus)
 
 typedef struct
 {
-  int delete;
+  int remove;
   // missing value
   int changemissval;
   double missval_old;
@@ -257,6 +258,7 @@ void defineVarUnits(var_t *vars, int vlistID2, int varID, char *units, char *nam
 		}
 	    }
 #else
+	  UNUSED(name);
 	  if ( lwarn_udunits )
 	    {
 	      cdoWarning("Can't convert units, UDUNITS2 support not compiled in!");
@@ -276,23 +278,24 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
 {
   FILE *fp;
   namelist_t *nml;
-  int nml_code, nml_out_code, nml_table, nml_param, nml_chunktype, nml_datatype, nml_type, nml_name, nml_out_name, nml_stdname;
+  int nml_code, nml_out_code, nml_table, nml_param, nml_out_param, nml_chunktype, nml_datatype, nml_type, nml_name, nml_out_name, nml_stdname;
   int nml_longname, nml_units, nml_comment, nml_ltype, nml_delete, nml_missval, nml_factor;
   int nml_cell_methods, nml_cell_measures;
   int nml_valid_min, nml_valid_max, nml_ok_min_mean_abs, nml_ok_max_mean_abs;
   int locc, i;
-  int code, out_code, table, ltype, delete;
+  int code, out_code, table, ltype, remove;
   int nml_index = 0;
   int codenum, tabnum, levtype, param;
   int varID, tableID;
   int num_pt_files;
-  double param_dp;
   double missval, factor;
   double valid_min, valid_max, ok_min_mean_abs, ok_max_mean_abs;
   char *partab = NULL;
   char *chunktypestr = NULL;
   char *datatypestr = NULL;
   char *typestr = NULL;
+  char *paramstr = NULL;
+  char *out_paramstr = NULL;
   char *name = NULL, *out_name = NULL, *stdname = NULL, longname[CDI_MAX_NAME] = "", units[CDI_MAX_NAME] = "";
   char cell_methods[CDI_MAX_NAME] = "", cell_measures[CDI_MAX_NAME] = "";
   char varname[CDI_MAX_NAME];
@@ -314,14 +317,15 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
       nml_out_code        = namelistAdd(nml, "out_code",        NML_INT,  0, &out_code, 1);
       nml_table           = namelistAdd(nml, "table",           NML_INT,  0, &table, 1);
       nml_ltype           = namelistAdd(nml, "ltype",           NML_INT,  0, &ltype, 1);
-      nml_delete          = namelistAdd(nml, "delete",          NML_INT,  0, &delete, 1);
+      nml_delete          = namelistAdd(nml, "delete",          NML_INT,  0, &remove, 1);
       nml_missval         = namelistAdd(nml, "missing_value",   NML_FLT,  0, &missval, 1);
       nml_factor          = namelistAdd(nml, "factor",          NML_FLT,  0, &factor, 1);
       nml_valid_min       = namelistAdd(nml, "valid_min",       NML_FLT,  0, &valid_min, 1);
       nml_valid_max       = namelistAdd(nml, "valid_max",       NML_FLT,  0, &valid_max, 1);
       nml_ok_min_mean_abs = namelistAdd(nml, "ok_min_mean_abs", NML_FLT,  0, &ok_min_mean_abs, 1);
       nml_ok_max_mean_abs = namelistAdd(nml, "ok_max_mean_abs", NML_FLT,  0, &ok_max_mean_abs, 1);
-      nml_param           = namelistAdd(nml, "param",           NML_FLT,  0, &param_dp, 1);
+      nml_param           = namelistAdd(nml, "param",           NML_WORD, 0, &paramstr, 1);
+      nml_out_param       = namelistAdd(nml, "out_param",       NML_WORD, 0, &out_paramstr, 1);
       nml_chunktype       = namelistAdd(nml, "chunktype",       NML_WORD, 0, &chunktypestr, 1);
       nml_datatype        = namelistAdd(nml, "datatype",        NML_WORD, 0, &datatypestr, 1);
       nml_type            = namelistAdd(nml, "type",            NML_WORD, 0, &typestr, 1);
@@ -333,13 +337,15 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
       nml_comment         = namelistAdd(nml, "comment",         NML_TEXT, 0, comment, sizeof(comment));
       nml_cell_methods    = namelistAdd(nml, "cell_methods",    NML_TEXT, 0, cell_methods, sizeof(cell_methods));
       nml_cell_measures   = namelistAdd(nml, "cell_measures",   NML_TEXT, 0, cell_measures, sizeof(cell_measures));
-	      
+
       while ( ! feof(fp) )
 	{
 	  namelistReset(nml);
 
 	  namelistRead(fp, nml);
 
+	  if ( cdoVerbose ) namelistPrint(nml);
+
 	  locc = FALSE;
 	  for ( i = 0; i < nml->size; i++ )
 	    {
@@ -356,7 +362,7 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
 		{
 		  if ( nml->entry[nml_code]->occ == 0 )
 		    {
-		      cdoPrint("Parameter entry %d (table %d) skipped, code number not found!", nml_index, fileID+1);
+		      cdoPrint("Parameter entry %d (parameter table %d) skipped, code number not found!", nml_index, fileID+1);
 		      continue;
 		    }
 		}
@@ -364,7 +370,7 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
 		{
 		  if ( nml->entry[nml_param]->occ == 0 )
 		    {
-		      cdoWarning("Parameter entry %d (table %d) skipped, parameter ID not found!", nml_index, fileID+1);
+		      cdoWarning("Parameter entry %d (parameter table %d) skipped, parameter ID not found!", nml_index, fileID+1);
 		      continue;
 		    }
 		}
@@ -372,7 +378,7 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
 		{
 		  if ( nml->entry[nml_name]->occ == 0 )
 		    {
-		      cdoWarning("Parameter entry %d (table %d) skipped, variable name not found!", nml_index, fileID+1);
+		      cdoWarning("Parameter entry %d (parameter table %d) skipped, variable name not found!", nml_index, fileID+1);
 		      continue;
 		    }
 		}
@@ -386,7 +392,7 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
 		      tabnum  = tableInqNum(tableID);
 		      levtype = zaxisInqLtype(vlistInqVarZaxis(vlistID2, varID));
 		      
-		      //	printf("code = %d  tabnum = %d  ltype = %d\n", codenum, tabnum, levtype);
+		      // printf("code = %d  tabnum = %d  ltype = %d\n", codenum, tabnum, levtype);
 		      
 		      if ( nml->entry[nml_table]->occ == 0 ) table = tabnum;
 		      if ( nml->entry[nml_ltype]->occ == 0 ) ltype = levtype;
@@ -395,21 +401,14 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
 		    }
 		  else if ( ptmode == PARAMETER_ID )
 		    {
+		      int paramid = stringToParam(paramstr);
+
 		      param   = vlistInqVarParam(vlistID2, varID);
-		      codenum = vlistInqVarCode(vlistID2, varID);
-		      tableID = vlistInqVarTable(vlistID2, varID);
-		      tabnum  = tableInqNum(tableID);
 		      levtype = zaxisInqLtype(vlistInqVarZaxis(vlistID2, varID));
-		      
-		      //	printf("code = %d  tabnum = %d  ltype = %d\n", codenum, tabnum, levtype);
-		      code  = (int) param_dp;
-		      table = (param_dp-code)*1000;
-		      printf("code = %d  tabnum = %d  ltype = %d\n", code, table, levtype);
-		      
-		      if ( nml->entry[nml_table]->occ == 0 ) table = tabnum;
+
 		      if ( nml->entry[nml_ltype]->occ == 0 ) ltype = levtype;
 		  
-		      if ( codenum == code && tabnum == table && levtype == ltype ) break;
+		      if ( param == paramid && levtype == ltype ) break;
 		    }
 		  else if ( ptmode == VARIABLE_NAME )
 		    {
@@ -430,9 +429,11 @@ void read_partab(pt_mode_t ptmode, int nvars, int vlistID2, var_t *vars)
 		  if ( nml->entry[nml_longname]->occ ) vlistDefVarLongname(vlistID2, varID, longname);
 		  if ( nml->entry[nml_units]->occ    ) defineVarUnits(vars, vlistID2, varID, units, name);
 		  if ( nml->entry[nml_comment]->occ  ) defineVarAttText(vlistID2, varID, "comment", comment);
-		  if ( nml->entry[nml_cell_methods]->occ  )  defineVarAttText(vlistID2, varID, "cell_methods", cell_methods);
-		  if ( nml->entry[nml_cell_measures]->occ  ) defineVarAttText(vlistID2, varID, "cell_measures", cell_measures);
-		  if ( nml->entry[nml_delete]->occ && delete == 1 ) vars[varID].delete = TRUE;
+		  if ( nml->entry[nml_cell_methods]->occ  ) defineVarAttText(vlistID2, varID, "cell_methods", cell_methods);
+		  if ( nml->entry[nml_cell_measures]->occ ) defineVarAttText(vlistID2, varID, "cell_measures", cell_measures);
+		  if ( nml->entry[nml_delete]->occ && remove == 1 ) vars[varID].remove = TRUE;
+		  if ( nml->entry[nml_param]->occ )     vlistDefVarParam(vlistID2, varID, stringToParam(paramstr));
+		  if ( nml->entry[nml_out_param]->occ ) vlistDefVarParam(vlistID2, varID, stringToParam(out_paramstr));
 		  if ( nml->entry[nml_datatype]->occ )
 		    {
 		      int datatype = str2datatype(datatypestr);
@@ -613,7 +614,7 @@ void *Setpartab(void *argument)
 
   if ( operatorArgc() < 1 ) cdoAbort("Too few arguments!");
 
-  if      ( operatorID == SETPARTAB )  ptmode = CODE_NUMBER;
+  if      ( operatorID == SETPARTAB  ) ptmode = CODE_NUMBER;
   else if ( operatorID == SETPARTABC ) ptmode = CODE_NUMBER;
   else if ( operatorID == SETPARTABP ) ptmode = PARAMETER_ID;
   else if ( operatorID == SETPARTABN ) ptmode = VARIABLE_NAME;
@@ -623,7 +624,6 @@ void *Setpartab(void *argument)
       FILE *fp;
       size_t fsize;
       char *parbuf = NULL;
-      size_t nbytes;
 
       partab = operatorArgv()[0];
       fp = fopen(partab, "r");
@@ -631,9 +631,9 @@ void *Setpartab(void *argument)
 	{
 	  fseek(fp, 0L, SEEK_END);
 	  fsize = (size_t) ftell(fp);
-	  parbuf = malloc(fsize+1);
+	  parbuf = (char*) malloc(fsize+1);
 	  fseek(fp, 0L, SEEK_SET);
-	  nbytes = fread(parbuf, fsize, 1, fp);
+	  fread(parbuf, fsize, 1, fp);
 	  parbuf[fsize] = 0;
 	  fseek(fp, 0L, SEEK_SET);
 
@@ -661,7 +661,7 @@ void *Setpartab(void *argument)
   /* vlistPrint(vlistID2);*/
 
   nvars = vlistNvars(vlistID2);
-  vars = malloc(nvars*sizeof(var_t));
+  vars = (var_t*) malloc(nvars*sizeof(var_t));
   memset(vars, 0, nvars*sizeof(var_t));
 
   if ( tableformat == 0 )
@@ -674,7 +674,7 @@ void *Setpartab(void *argument)
       read_partab(ptmode, nvars, vlistID2, vars);
 
       for ( varID = 0; varID < nvars; ++varID )
-	if ( vars[varID].delete ) break;
+	if ( vars[varID].remove ) break;
 
       if ( varID < nvars ) delvars = TRUE;
 
@@ -693,7 +693,7 @@ void *Setpartab(void *argument)
 		{
 		  vlistDefFlag(vlistID1, varID, levID, TRUE);
 		  vlistDefFlag(vlistID2, varID, levID, TRUE);
-		  if ( vars[varID].delete )
+		  if ( vars[varID].remove )
 		    {
 		      vlistDefFlag(vlistID1, varID, levID, FALSE);
 		      vlistDefFlag(vlistID2, varID, levID, FALSE);
@@ -721,7 +721,7 @@ void *Setpartab(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID1 = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID1)) )
@@ -739,7 +739,7 @@ void *Setpartab(void *argument)
 
 	  if ( delvars )
 	    {
-	      if ( vars[varID].delete ) continue;
+	      if ( vars[varID].remove ) continue;
 
 	      if ( vlistInqFlag(vlistID1, varID, levelID) == TRUE )
 		{
diff --git a/src/Setrcaname.c b/src/Setrcaname.c
index f6f1efb..649321d 100644
--- a/src/Setrcaname.c
+++ b/src/Setrcaname.c
@@ -121,7 +121,7 @@ void *Setrcaname(void *argument)
   if ( ! lcopy )
     {
       gridsize = vlistGridsizeMax(vlistID1);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Settime.c b/src/Settime.c
index 425b804..272e04f 100644
--- a/src/Settime.c
+++ b/src/Settime.c
@@ -374,7 +374,7 @@ void *Settime(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID1 = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID1)) )
diff --git a/src/Setzaxis.c b/src/Setzaxis.c
index 8e4b221..aedb277 100644
--- a/src/Setzaxis.c
+++ b/src/Setzaxis.c
@@ -88,7 +88,7 @@ void *Setzaxis(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Sinfo.c b/src/Sinfo.c
index d52e546..f7681ff 100644
--- a/src/Sinfo.c
+++ b/src/Sinfo.c
@@ -29,8 +29,6 @@
 
 #include "printinfo.h"
 
-#define MAXCHARS 82
-
 const char * tunit2str(int tunits)
 {
   if      ( tunits == TUNIT_YEAR )    return ("years");
@@ -46,7 +44,7 @@ const char * tunit2str(int tunits)
 }
 
 
-const char * calendar2str(int calendar)
+const char* calendar2str(int calendar)
 {
   if      ( calendar == CALENDAR_STANDARD )  return ("standard");
   else if ( calendar == CALENDAR_PROLEPTIC ) return ("proleptic_gregorian");
@@ -56,6 +54,22 @@ const char * calendar2str(int calendar)
   else                                       return ("unknown");
 }
 
+static
+void limit_string_length(char* string)
+{
+  size_t len = strlen(string);
+
+  if ( len > 10 )
+    {
+      for ( size_t i = 3; i < len; ++i )
+	if ( string[i] == ' ' )
+	  {
+	    string[i] = 0;
+	    break;
+	  }
+    }
+}
+
 
 void *Sinfo(void *argument)
 {
@@ -66,20 +80,14 @@ void *Sinfo(void *argument)
   int varID;
   int gridsize = 0;
   int gridID, zaxisID, code, tabnum, param;
-  int zaxistype, ltype;
   int vdate, vtime;
-  int nrecs, nvars, nzaxis, ntsteps;
-  int levelID, levelsize;
-  int tsID, ntimeout;
+  int nvars, ntsteps;
+  int levelsize;
   int tsteptype, taxisID;
-  int nbyte, nbyte0;
-  int index;
+  char tmpname[CDI_MAX_NAME];
   char varname[CDI_MAX_NAME];
-  char longname[CDI_MAX_NAME];
-  char units[CDI_MAX_NAME];
   char paramstr[32];
   char vdatestr[32], vtimestr[32];
-  double level;
   char *modelptr, *instptr;
   int streamID = 0;
   int vlistID;
@@ -108,19 +116,24 @@ void *Sinfo(void *argument)
 
       vlistID = streamInqVlist(streamID);
 
-      fprintf(stdout, "   File format: ");
+      set_text_color(stdout, BRIGHT, BLACK);
+      fprintf(stdout, "   File format");
+      reset_text_color(stdout);
+      fprintf(stdout, " : ");
       printFiletype(streamID, vlistID);
 
+      set_text_color(stdout, BRIGHT, BLACK);
       if ( lensemble )
-	fprintf(stdout, "%6d : Institut Source   Ttype    Einfo Levels Num  Gridsize Num Dtype : ",  -(indf+1));
+	fprintf(stdout, "%6d : Institut Source   Ttype    Einfo Levels Num    Points Num Dtype : ",  -(indf+1));
       else
-	fprintf(stdout, "%6d : Institut Source   Ttype    Levels Num  Gridsize Num Dtype : ",  -(indf+1));
+	fprintf(stdout, "%6d : Institut Source   Ttype    Levels Num    Points Num Dtype : ",  -(indf+1));
 
       if      ( operfunc == func_name ) fprintf(stdout, "Parameter name");
       else if ( operfunc == func_code ) fprintf(stdout, "Table Code");
       else                              fprintf(stdout, "Parameter ID");
 
       if ( cdoVerbose ) fprintf(stdout, " : Extra" );              
+      reset_text_color(stdout);
       fprintf(stdout, "\n" );              
 
       nvars = vlistNvars(vlistID);
@@ -133,31 +146,27 @@ void *Sinfo(void *argument)
 	  gridID  = vlistInqVarGrid(vlistID, varID);
 	  zaxisID = vlistInqVarZaxis(vlistID, varID);
 
-	  fprintf(stdout, "%6d : ", varID + 1);
-
+	  set_text_color(stdout, BRIGHT, BLACK);
+	  fprintf(stdout, "%6d", varID+1);
+	  reset_text_color(stdout);
+	  set_text_color(stdout, RESET, BLACK);
+	  fprintf(stdout, " : ");
+	  reset_text_color(stdout);
+	      
+	  set_text_color(stdout, RESET, BLUE);
 	  /* institute info */
 	  instptr = institutInqNamePtr(vlistInqVarInstitut(vlistID, varID));
-	  if ( instptr )
-	    fprintf(stdout, "%-8s ", instptr);
-	  else
-	    fprintf(stdout, "unknown  ");
+	  strcpy(tmpname, "unknown");
+	  if ( instptr ) strcpy(tmpname, instptr);
+	  limit_string_length(tmpname);
+	  fprintf(stdout, "%-8s ", tmpname);
 
 	  /* source info */
 	  modelptr = modelInqNamePtr(vlistInqVarModel(vlistID, varID));
-	  if ( modelptr )
-	    {
-	      size_t len = strlen(modelptr);
-	      if ( len > 10 )
-		for ( size_t i = 3; i < len; ++i )
-		  if ( modelptr[i] == ' ' )
-		    {
-		      modelptr[i] = 0;
-		      break;
-		    }
-	      fprintf(stdout, "%-8s ", modelptr);
-	    }
-	  else
-	    fprintf(stdout, "unknown  ");
+	  strcpy(tmpname, "unknown");
+	  if ( modelptr ) strcpy(tmpname, modelptr);
+	  limit_string_length(tmpname);
+	  fprintf(stdout, "%-8s ", tmpname);
 
 	  /* tsteptype */
 	  tsteptype = vlistInqVarTsteptype(vlistID, varID);
@@ -201,19 +210,25 @@ void *Sinfo(void *argument)
 	  else
 	    fprintf(stdout, "z ");
 
-	  /* parameter info */
+	  reset_text_color(stdout);
+	      
+	  set_text_color(stdout, RESET, BLACK);
 	  fprintf(stdout, ": ");
+	  reset_text_color(stdout);
 
+	  /* parameter info */
 	  cdiParamToString(param, paramstr, sizeof(paramstr));
 
 	  if ( operfunc == func_name ) vlistInqVarName(vlistID, varID, varname);
 
+	  set_text_color(stdout, BRIGHT, GREEN);
 	  if ( operfunc == func_name )
 	    fprintf(stdout, "%-14s", varname);
 	  else if ( operfunc == func_code )
 	    fprintf(stdout, "%4d %4d   ", tabnum, code);
 	  else
 	    fprintf(stdout, "%-14s", paramstr);
+	  reset_text_color(stdout);
 
 	  if ( cdoVerbose )
 	    {
@@ -225,100 +240,37 @@ void *Sinfo(void *argument)
 	  fprintf(stdout, "\n");
 	}
 
-      fprintf(stdout, "   Grid coordinates :\n");
+      set_text_color(stdout, BRIGHT, BLACK);
+      fprintf(stdout, "   Grid coordinates");
+      reset_text_color(stdout);
+      fprintf(stdout, " :\n");
+
       printGridInfo(vlistID);
 
-      nzaxis = vlistNzaxis(vlistID);
-      fprintf(stdout, "   Vertical coordinates :\n");
-      for ( index = 0; index < nzaxis; index++)
-	{
-	  zaxisID   = vlistZaxis(vlistID, index);
-	  zaxistype = zaxisInqType(zaxisID);
-	  ltype     = zaxisInqLtype(zaxisID);
-	  levelsize = zaxisInqSize(zaxisID);
-	  /* zaxisInqLongname(zaxisID, longname); */
-	  zaxisName(zaxistype, longname);
-	  longname[18] = 0;
-	  zaxisInqUnits(zaxisID, units);
-	  units[12] = 0;
-	  if ( zaxistype == ZAXIS_GENERIC && ltype != 0 )
-	    nbyte0    = fprintf(stdout, "  %4d : %-11s  (ltype=%3d) : ", vlistZaxisIndex(vlistID, zaxisID)+1, longname, ltype);
-	  else
-	    nbyte0    = fprintf(stdout, "  %4d : %-18s %5s : ", vlistZaxisIndex(vlistID, zaxisID)+1, longname, units);
-	  nbyte = nbyte0;
-	  for ( levelID = 0; levelID < levelsize; levelID++ )
-	    {
-	      if ( nbyte > MAXCHARS )
-		{
-		  fprintf(stdout, "\n");
-		  fprintf(stdout, "%*s", nbyte0, "");
-		  nbyte = nbyte0;
-		}
-	      level = zaxisInqLevel(zaxisID, levelID);
-	      nbyte += fprintf(stdout, "%.9g ", level);
-	    }
-	  fprintf(stdout, "\n");
-	  if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
-	    {
-	      double level1, level2;
-	      nbyte = nbyte0;
-	      fprintf(stdout, "%33s : ", "bounds");
-	      for ( levelID = 0; levelID < levelsize; levelID++ )
-		{
-		  if ( nbyte > MAXCHARS )
-		    {
-		      fprintf(stdout, "\n");
-		      fprintf(stdout, "%*s", nbyte0, "");
-		      nbyte = nbyte0;
-		    }
-		  level1 = zaxisInqLbound(zaxisID, levelID);
-		  level2 = zaxisInqUbound(zaxisID, levelID);
-		  nbyte += fprintf(stdout, "%.9g-%.9g ", level1, level2);
-		}
-	      fprintf(stdout, "\n");
-	    }
+      set_text_color(stdout, BRIGHT, BLACK);
+      fprintf(stdout, "   Vertical coordinates");
+      reset_text_color(stdout);
+      fprintf(stdout, " :\n");
 
-          if ( zaxistype == ZAXIS_REFERENCE )
-            {
-              int number   = zaxisInqNumber(zaxisID);
-
-              if ( number > 0 )
-                {
-                  fprintf(stdout, "%33s : ", "zaxis");
-                  fprintf(stdout, "number = %d\n", number);
-                }
-
-              char uuidOfVGrid[17];
-              zaxisInqUUID(zaxisID, uuidOfVGrid);
-              if ( uuidOfVGrid[0] != 0 )
-                {
-                  char uuidOfVGridStr[37];
-                  uuid2str(uuidOfVGrid, uuidOfVGridStr);
-                  if ( uuidOfVGridStr[0] != 0  && strlen(uuidOfVGridStr) == 36 )
-                    {
-                      fprintf(stdout, "%33s : ", "uuid");
-                      fprintf(stdout, "%s\n", uuidOfVGridStr);
-                    }
-                }
-            }
-	}
+      printZaxisInfo(vlistID);
 
       taxisID = vlistInqTaxis(vlistID);
       ntsteps = vlistNtsteps(vlistID);
 
       if ( ntsteps != 0 )
 	{
+	  set_text_color(stdout, BRIGHT, BLACK);
+	  fprintf(stdout, "   Time coordinate");
+	  reset_text_color(stdout);
 	  if ( ntsteps == CDI_UNDEFID )
-	    fprintf(stdout, "   Time coordinate :  unlimited steps\n");
+	    fprintf(stdout, " :  unlimited steps\n");
 	  else
-	    fprintf(stdout, "   Time coordinate :  %d step%s\n", ntsteps, ntsteps == 1 ? "" : "s");
+	    fprintf(stdout, " :  %d step%s\n", ntsteps, ntsteps == 1 ? "" : "s");
 
 	  if ( taxisID != CDI_UNDEFID )
 	    {
-	      if ( taxisInqType(taxisID) == TAXIS_RELATIVE )
+	      if ( taxisInqType(taxisID) != TAXIS_ABSOLUTE )
 		{
-		  int calendar, tunits;
-
 		  vdate = taxisInqRdate(taxisID);
 		  vtime = taxisInqRtime(taxisID);
 
@@ -327,42 +279,38 @@ void *Sinfo(void *argument)
 
 		  fprintf(stdout, "     RefTime = %s %s", vdatestr, vtimestr);
 		      
-		  tunits = taxisInqTunit(taxisID);
+		  int tunits = taxisInqTunit(taxisID);
 		  if ( tunits != CDI_UNDEFID )  fprintf(stdout, "  Units = %s", tunit2str(tunits));
 	      
-		  calendar = taxisInqCalendar(taxisID);
+		  int calendar = taxisInqCalendar(taxisID);
 		  if ( calendar != CDI_UNDEFID )  fprintf(stdout, "  Calendar = %s", calendar2str(calendar));
 
 		  if ( taxisHasBounds(taxisID) )
 		    fprintf(stdout, "  Bounds = true");
 
 		  fprintf(stdout, "\n");
-		}
-	    }
 
-	  fprintf(stdout, "  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss\n");
+		  if ( taxisInqType(taxisID) == TAXIS_FORECAST )
+		    {
+		      vdate = taxisInqFdate(taxisID);
+		      vtime = taxisInqFtime(taxisID);
 
-	  ntimeout = 0;
-	  tsID = 0;
-	  while ( (nrecs = streamInqTimestep(streamID, tsID)) )
-	    {
-	      if ( ntimeout == 4 )
-		{
-		  ntimeout = 0;
-		  fprintf(stdout, "\n");
+		      date2str(vdate, vdatestr, sizeof(vdatestr));
+		      time2str(vtime, vtimestr, sizeof(vtimestr));
+
+		      fprintf(stdout, "     ForecastRefTime = %s %s", vdatestr, vtimestr);
+		      fprintf(stdout, "\n");
+		    }
 		}
+	    }
 
-	      vdate = taxisInqVdate(taxisID);
-	      vtime = taxisInqVtime(taxisID);
+	  fprintf(stdout, "  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss\n");
 
-	      date2str(vdate, vdatestr, sizeof(vdatestr));
-	      time2str(vtime, vtimestr, sizeof(vtimestr));
+	  set_text_color(stdout, RESET, MAGENTA);
 
-	      fprintf(stdout, " %s %s", vdatestr, vtimestr);
+	  printTimesteps(streamID, taxisID, cdoVerbose);
 
-	      ntimeout++;
-	      tsID++;
-	    }
+	  reset_text_color(stdout);
 	  fprintf(stdout, "\n");
 	}
 
diff --git a/src/Smooth9.c b/src/Smooth9.c
index 397bd5d..f6d9080 100644
--- a/src/Smooth9.c
+++ b/src/Smooth9.c
@@ -67,7 +67,7 @@ void *Smooth9(void *argument)
   vlistDefTaxis(vlistID2, taxisID2);
 
   nvars = vlistNvars(vlistID1);
-  varIDs  = malloc(nvars*sizeof(int)); 
+  varIDs  = (int*) malloc(nvars*sizeof(int)); 
 
   for ( varID = 0; varID < nvars; ++varID )
     {
@@ -87,9 +87,9 @@ void *Smooth9(void *argument)
     }
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize *sizeof(double));
-  mask   = malloc(gridsize *sizeof(int));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize *sizeof(double));
+  mask   = (int*) malloc(gridsize *sizeof(int));
  
   streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
 
diff --git a/src/Sort.c b/src/Sort.c
index e6922c7..4755414 100644
--- a/src/Sort.c
+++ b/src/Sort.c
@@ -164,21 +164,21 @@ void *Sort(void *argument)
 
   nvars   = vlistNvars(vlistID1);
 
-  varInfo = malloc(nvars*sizeof(varinfo_t));
+  varInfo = (varinfo_t*) malloc(nvars*sizeof(varinfo_t));
   for ( varID = 0; varID < nvars; ++varID )
     {
       nlevs = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
       varInfo[varID].nlevs = nlevs;
-      varInfo[varID].levInfo = malloc(nlevs*sizeof(levinfo_t));
+      varInfo[varID].levInfo = (levinfo_t*) malloc(nlevs*sizeof(levinfo_t));
     }
 
-  vardata = malloc(nvars*sizeof(double*));
+  vardata = (double**) malloc(nvars*sizeof(double*));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
       nlevs    = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      vardata[varID] = malloc(gridsize*nlevs*sizeof(double));
+      vardata[varID] = (double*) malloc(gridsize*nlevs*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Sorttimestamp.c b/src/Sorttimestamp.c
index f83af93..0875ae4 100644
--- a/src/Sorttimestamp.c
+++ b/src/Sorttimestamp.c
@@ -105,9 +105,9 @@ void *Sorttimestamp(void *argument)
 	  if ( xtsID >= nalloc )
 	    {
 	      nalloc += NALLOC_INC;
-	      vdate = realloc(vdate, nalloc*sizeof(int));
-	      vtime = realloc(vtime, nalloc*sizeof(int));
-	      vars  = realloc(vars, nalloc*sizeof(field_t **));
+	      vdate = (int*) realloc(vdate, nalloc*sizeof(int));
+	      vtime = (int*) realloc(vtime, nalloc*sizeof(int));
+	      vars  = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	    }
 
 	  vdate[xtsID] = taxisInqVdate(taxisID1);
@@ -120,7 +120,7 @@ void *Sorttimestamp(void *argument)
 	      streamInqRecord(streamID1, &varID, &levelID);
 	      gridID   = vlistInqVarGrid(vlistID1, varID);
 	      gridsize = gridInqSize(gridID);
-	      vars[xtsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+	      vars[xtsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 	      streamReadRecord(streamID1, vars[xtsID][varID][levelID].ptr, &nmiss);
 	      vars[xtsID][varID][levelID].nmiss = nmiss;
 	    }
@@ -134,7 +134,7 @@ void *Sorttimestamp(void *argument)
 
   nts = xtsID;
 
-  timeinfo= malloc(nts*sizeof(timeinfo_t));
+  timeinfo= (timeinfo_t*) malloc(nts*sizeof(timeinfo_t));
 
   for ( tsID = 0; tsID < nts; tsID++ )
     {
diff --git a/src/Specinfo.c b/src/Specinfo.c
index e03d1c3..222d9c2 100644
--- a/src/Specinfo.c
+++ b/src/Specinfo.c
@@ -137,7 +137,7 @@ int ngp2ntr(int ngp)
 {
   int ntr, nlatl, nlonl;
 
-  ntr = NINT(sqrt(0.25+ngp)-1.5);
+  ntr = lround(sqrt(0.25+ngp)-1.5);
   nlatl = ntr2nlat_linear(ntr);
   nlonl = compnlon(nlatl);
   nlatl = nlonl/2;
diff --git a/src/Spectral.c b/src/Spectral.c
index 9d53913..8c1382e 100644
--- a/src/Spectral.c
+++ b/src/Spectral.c
@@ -210,7 +210,7 @@ void *Spectral(void *argument)
 	  maxntr = 1+gridInqTrunc(gridID1);
 	  ncut = args2intlist(operatorArgc(), operatorArgv(), ilist);
 	  wnums = (int *) listArrayPtr(ilist);
-	  waves = malloc(maxntr*sizeof(int));
+	  waves = (int*) malloc(maxntr*sizeof(int));
 	  for ( i = 0; i < maxntr; i++ ) waves[i] = 1;
 	  for ( i = 0; i < ncut; i++ )
 	    {
@@ -227,7 +227,7 @@ void *Spectral(void *argument)
     }
 
   nvars = vlistNvars(vlistID2);
-  vars  = malloc(nvars*sizeof(int));
+  vars  = (int*) malloc(nvars*sizeof(int));
   for ( varID = 0; varID < nvars; varID++ )
     {
       if ( gridID1 == vlistInqVarGrid(vlistID1, varID) )
@@ -243,12 +243,12 @@ void *Spectral(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
 
   if ( gridID2 != -1 )
     {
       gridsize = gridInqSize(gridID2);
-      array2 = malloc(gridsize*sizeof(double));
+      array2 = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Spectrum.c b/src/Spectrum.c
index a97caf1..b3b7c8f 100644
--- a/src/Spectrum.c
+++ b/src/Spectrum.c
@@ -30,7 +30,7 @@
 #include "statistic.h"
 
 
-#define  NALLOC_INC  1000
+#define  NALLOC_INC  1024
 
 
 static
@@ -40,6 +40,7 @@ void spectrum(int nrec, double *data, double *spectrum, double *real, double *im
   int k;
   double sumx, sumkx;
   double a, b;
+  double *work_r = NULL, *work_i = NULL;
   int seg_i, offset;
   int bit;
 
@@ -66,6 +67,12 @@ void spectrum(int nrec, double *data, double *spectrum, double *real, double *im
       for (k = 0; k < nrec; k++)
 	data[k] -= a + b * k;
     }
+
+  if ( bit != 1 )
+    {
+      work_r = (double*) malloc(seg_l*sizeof(double));
+      work_i = (double*) malloc(seg_l*sizeof(double));
+    }
 	
   for (seg_i = 0; seg_i < seg_n; seg_i += 2)
     {
@@ -123,9 +130,9 @@ void spectrum(int nrec, double *data, double *spectrum, double *real, double *im
 	  imag[k] = 0;
       
       if (bit == 1)	/* seg_l is a power of 2 */
-	fft (real, imag, seg_l, 1);
+	fft(real, imag, seg_l, 1);
       else
-	ft (real, imag, seg_l, 1);
+	ft_r(real, imag, seg_l, 1, work_r, work_i);
 	
       spectrum[0] += real[0] * real[0] + imag[0] * imag[0];
       
@@ -139,6 +146,12 @@ void spectrum(int nrec, double *data, double *spectrum, double *real, double *im
 	  real[seg_l / 2] * real[seg_l / 2] +
 	  imag[seg_l / 2] * imag[seg_l / 2];
     }
+
+  if ( bit != 1 )
+    {
+      free(work_r);
+      free(work_i);
+    }
 	
   for (k = 0; k <= seg_l / 2; k++)
     spectrum[k] *= seg_l / (seg_n * wssum);
@@ -194,9 +207,9 @@ void *Spectrum(void *argument)
       if ( tsID >= nalloc )
 	{
 	  nalloc += NALLOC_INC;
-	  vdate = realloc(vdate, nalloc*sizeof(int));
-	  vtime = realloc(vtime, nalloc*sizeof(int));
-	  vars  = realloc(vars, nalloc*sizeof(field_t **));
+	  vdate = (int*) realloc(vdate, nalloc*sizeof(int));
+	  vtime = (int*) realloc(vtime, nalloc*sizeof(int));
+	  vars  = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	}
 
       vdate[tsID] = taxisInqVdate(taxisID1);
@@ -209,7 +222,7 @@ void *Spectrum(void *argument)
 	  streamInqRecord(streamID1, &varID, &levelID);
 	  gridID   = vlistInqVarGrid(vlistID1, varID);
 	  gridsize = gridInqSize(gridID);
-	  vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+	  vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 	  streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
 	  vars[tsID][varID][levelID].nmiss = nmiss;
 
@@ -251,15 +264,15 @@ void *Spectrum(void *argument)
 
   nfreq = seg_l/2 + 1;
 
-  vars2 = malloc(nfreq*sizeof(field_t **));
+  vars2 = (field_t ***) malloc(nfreq*sizeof(field_t **));
   for ( freq = 0; freq < nfreq; freq++ )
     vars2[freq] = field_malloc(vlistID1, FIELD_PTR);
 
-  array1  = malloc(nts   * sizeof(double));
-  array2  = malloc(nfreq * sizeof(double));
-  real    = malloc(seg_l * sizeof(double));
-  imag    = malloc(seg_l * sizeof(double));
-  window  = malloc(seg_l * sizeof(double));
+  array1  = (double*) malloc(nts   * sizeof(double));
+  array2  = (double*) malloc(nfreq * sizeof(double));
+  real    = (double*) malloc(seg_l * sizeof(double));
+  imag    = (double*) malloc(seg_l * sizeof(double));
+  window  = (double*) malloc(seg_l * sizeof(double));
   	   
   switch (which_window)
     {
diff --git a/src/Split.c b/src/Split.c
index 882c4d0..5dd01bf 100644
--- a/src/Split.c
+++ b/src/Split.c
@@ -123,9 +123,9 @@ void *Split(void *argument)
 	    }
 	}
 
-      codes     = malloc(nsplit*sizeof(int));
-      vlistIDs  = malloc(nsplit*sizeof(int));
-      streamIDs = malloc(nsplit*sizeof(int));
+      codes     = (int*) malloc(nsplit*sizeof(int));
+      vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+      streamIDs = (int*) malloc(nsplit*sizeof(int));
       memcpy(codes, itmp, nsplit*sizeof(int));
 
       for ( index = 0; index < nsplit; index++ )
@@ -192,9 +192,9 @@ void *Split(void *argument)
 	    }
 	}
 
-      params    = malloc(nsplit*sizeof(int));
-      vlistIDs  = malloc(nsplit*sizeof(int));
-      streamIDs = malloc(nsplit*sizeof(int));
+      params    = (int*) malloc(nsplit*sizeof(int));
+      vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+      streamIDs = (int*) malloc(nsplit*sizeof(int));
       memcpy(params, itmp, nsplit*sizeof(int));
 
       for ( index = 0; index < nsplit; index++ )
@@ -250,9 +250,9 @@ void *Split(void *argument)
 	    }
 	}
 
-      tabnums   = malloc(nsplit*sizeof(int));
-      vlistIDs  = malloc(nsplit*sizeof(int));
-      streamIDs = malloc(nsplit*sizeof(int));
+      tabnums   = (int*) malloc(nsplit*sizeof(int));
+      vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+      streamIDs = (int*) malloc(nsplit*sizeof(int));
       memcpy(tabnums, itmp, nsplit*sizeof(int));
 
       for ( index = 0; index < nsplit; index++ )
@@ -292,8 +292,8 @@ void *Split(void *argument)
       char varname[CDI_MAX_NAME];
       nsplit = nvars;
 
-      vlistIDs  = malloc(nsplit*sizeof(int));
-      streamIDs = malloc(nsplit*sizeof(int));
+      vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+      streamIDs = (int*) malloc(nsplit*sizeof(int));
 
       for ( index = 0; index < nsplit; index++ )
 	{
@@ -342,9 +342,9 @@ void *Split(void *argument)
 	    }
 	}
 
-      levels    = malloc(nsplit*sizeof(double));
-      vlistIDs  = malloc(nsplit*sizeof(int));
-      streamIDs = malloc(nsplit*sizeof(int));
+      levels    = (double*) malloc(nsplit*sizeof(double));
+      vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+      streamIDs = (int*) malloc(nsplit*sizeof(int));
       memcpy(levels, ftmp, nsplit*sizeof(double));
 
       for ( index = 0; index < nsplit; index++ )
@@ -385,9 +385,9 @@ void *Split(void *argument)
 
       nsplit = vlistNgrids(vlistID1);
 
-      gridIDs   = malloc(nsplit*sizeof(int));
-      vlistIDs  = malloc(nsplit*sizeof(int));
-      streamIDs = malloc(nsplit*sizeof(int));
+      gridIDs   = (int*) malloc(nsplit*sizeof(int));
+      vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+      streamIDs = (int*) malloc(nsplit*sizeof(int));
 
       for ( index = 0; index < nsplit; index++ )
 	gridIDs[index] = vlistGrid(vlistID1, index);
@@ -430,9 +430,9 @@ void *Split(void *argument)
 
       nsplit = vlistNzaxis(vlistID1);
 
-      zaxisIDs  = malloc(nsplit*sizeof(int));
-      vlistIDs  = malloc(nsplit*sizeof(int));
-      streamIDs = malloc(nsplit*sizeof(int));
+      zaxisIDs  = (int*) malloc(nsplit*sizeof(int));
+      vlistIDs  = (int*) malloc(nsplit*sizeof(int));
+      streamIDs = (int*) malloc(nsplit*sizeof(int));
 
       for ( index = 0; index < nsplit; index++ )
 	zaxisIDs[index] = vlistZaxis(vlistID1, index);
@@ -477,7 +477,7 @@ void *Split(void *argument)
     {
       gridsize = vlistGridsizeMax(vlistID1);
       if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Splitrec.c b/src/Splitrec.c
index 3536211..7cdfbf6 100644
--- a/src/Splitrec.c
+++ b/src/Splitrec.c
@@ -66,7 +66,7 @@ void *Splitrec(void *argument)
     {
       gridsize = vlistGridsizeMax(vlistID1);
       if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   index = 0;
diff --git a/src/Splitsel.c b/src/Splitsel.c
index 6712e4f..182a1d1 100644
--- a/src/Splitsel.c
+++ b/src/Splitsel.c
@@ -101,7 +101,7 @@ void *Splitsel(void *argument)
     {
       gridsize = vlistGridsizeMax(vlistID1);
       if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   nvars = vlistNvars(vlistID1);
@@ -111,7 +111,7 @@ void *Splitsel(void *argument)
 
   if ( nconst )
     {
-      vars = malloc(nvars*sizeof(field_t *));
+      vars = (field_t **) malloc(nvars*sizeof(field_t *));
 
       for ( varID = 0; varID < nvars; varID++ )
 	{
@@ -121,13 +121,13 @@ void *Splitsel(void *argument)
 	      nlevel  = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
 	      gridsize = gridInqSize(gridID);
 		  
-	      vars[varID] = malloc(nlevel*sizeof(field_t));
+	      vars[varID] = (field_t*) malloc(nlevel*sizeof(field_t));
 
 	      for ( levelID = 0; levelID < nlevel; levelID++ )
 		{
 		  field_init(&vars[varID][levelID]);
 		  vars[varID][levelID].grid    = gridID;
-		  vars[varID][levelID].ptr     = malloc(gridsize*sizeof(double));
+		  vars[varID][levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 		}
 	    }
 	}
diff --git a/src/Splittime.c b/src/Splittime.c
index 53f5373..446b842 100644
--- a/src/Splittime.c
+++ b/src/Splittime.c
@@ -128,7 +128,7 @@ void *Splittime(void *argument)
     {
       gridsize = vlistGridsizeMax(vlistID1);
       if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   nvars = vlistNvars(vlistID1);
@@ -138,7 +138,7 @@ void *Splittime(void *argument)
 
   if ( nconst )
     {
-      vars = malloc(nvars*sizeof(field_t *));
+      vars = (field_t **) malloc(nvars*sizeof(field_t *));
 
       for ( varID = 0; varID < nvars; varID++ )
 	{
@@ -148,13 +148,13 @@ void *Splittime(void *argument)
 	      nlevel  = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
 	      gridsize = gridInqSize(gridID);
 		  
-	      vars[varID] = malloc(nlevel*sizeof(field_t));
+	      vars[varID] = (field_t*) malloc(nlevel*sizeof(field_t));
 
 	      for ( levelID = 0; levelID < nlevel; levelID++ )
 		{
 		  field_init(&vars[varID][levelID]);
 		  vars[varID][levelID].grid    = gridID;
-		  vars[varID][levelID].ptr     = malloc(gridsize*sizeof(double));
+		  vars[varID][levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 		}
 	    }
 	}
diff --git a/src/Splityear.c b/src/Splityear.c
index 6fcfb70..6189b5e 100644
--- a/src/Splityear.c
+++ b/src/Splityear.c
@@ -74,7 +74,7 @@ void *Splityear(void *argument)
     {
       gridsize = vlistGridsizeMax(vlistID1);
       if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   taxisID1 = vlistInqTaxis(vlistID1);
diff --git a/src/StringUtilities.c b/src/StringUtilities.c
index 125aa2e..07d5f88 100644
--- a/src/StringUtilities.c
+++ b/src/StringUtilities.c
@@ -25,7 +25,7 @@ int StringSplitWithSeperator(  char *source_string, char *seperator, char*** ptr
 		   sep_count++;
 	  }	
  
-	temp_list  = malloc ( sizeof( char* ) * (sep_count+1) );
+	temp_list  = (char**) malloc( sizeof( char* ) * (sep_count+1));
 	
 	if( DBG )
 	  fprintf(stderr, "Input str %s , seperator %s  sep count %d\n", duplicate_src, seperator, sep_count );
diff --git a/src/Subtrend.c b/src/Subtrend.c
index 7122874..e30c5da 100644
--- a/src/Subtrend.c
+++ b/src/Subtrend.c
@@ -68,8 +68,8 @@ void *Subtrend(void *argument)
 
   field_init(&field1);
   field_init(&field4);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field4.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field4.ptr = (double*) malloc(gridsize*sizeof(double));
 
   vars2 = field_malloc(vlistID1, FIELD_PTR);
   vars3 = field_malloc(vlistID1, FIELD_PTR);
diff --git a/src/Tee.c b/src/Tee.c
index 981fd98..568eeee 100644
--- a/src/Tee.c
+++ b/src/Tee.c
@@ -58,7 +58,7 @@ void *Tee(void *argument)
   streamDefVlist(streamID3, vlistID3);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Templates.c b/src/Templates.c
index a4251a1..60e6885 100644
--- a/src/Templates.c
+++ b/src/Templates.c
@@ -52,7 +52,7 @@ void *Template1(void *argument)
   if ( ! lcopy )
     {
       gridsize = vlistGridsizeMax(vlistID1);
-      array = malloc(gridsize*sizeof(double));
+      array = (double*) malloc(gridsize*sizeof(double));
     }
 
   tsID = 0;
@@ -122,7 +122,7 @@ void *Template2(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Test.c b/src/Test.c
index 9189699..4083116 100644
--- a/src/Test.c
+++ b/src/Test.c
@@ -99,11 +99,11 @@ void *Testdata(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array = malloc(gridsize*sizeof(double));
-  fval = malloc(gridsize*sizeof(float));
-  ival = malloc(gridsize*sizeof(int));
-  cval = malloc(gridsize*sizeof(unsigned char)*4);
-  cval2 = malloc(gridsize*sizeof(unsigned char)*4);
+  array = (double*) malloc(gridsize*sizeof(double));
+  fval = (float*) malloc(gridsize*sizeof(float));
+  ival = (int*) malloc(gridsize*sizeof(int));
+  cval = (unsigned char*) malloc(gridsize*sizeof(unsigned char)*4);
+  cval2 = (unsigned char*) malloc(gridsize*sizeof(unsigned char)*4);
 
   fp = fopen("testdata", "w");
 
diff --git a/src/Tests.c b/src/Tests.c
index 7f85ff7..f0ae377 100644
--- a/src/Tests.c
+++ b/src/Tests.c
@@ -98,8 +98,8 @@ void *Tests(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Timcount.c b/src/Timcount.c
index cf4b76b..6caa34e 100644
--- a/src/Timcount.c
+++ b/src/Timcount.c
@@ -86,14 +86,14 @@ void *Timcount(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   nrecords = vlistNrecs(vlistID1);
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
 
diff --git a/src/Timpctl.c b/src/Timpctl.c
index 5f81a7d..2d7d4ef 100644
--- a/src/Timpctl.c
+++ b/src/Timpctl.c
@@ -95,13 +95,13 @@ void timpctl(int operatorID)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords * sizeof(int));
-  recLevelID = malloc(nrecords * sizeof(int));
+  recVarID   = (int*) malloc(nrecords * sizeof(int));
+  recLevelID = (int*) malloc(nrecords * sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr = malloc(gridsize * sizeof(double));
+  field.ptr = (double*) malloc(gridsize * sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
   hset = hsetCreate(nvars);
diff --git a/src/Timselpctl.c b/src/Timselpctl.c
index 7ba367b..2299afa 100644
--- a/src/Timselpctl.c
+++ b/src/Timselpctl.c
@@ -100,13 +100,13 @@ void *Timselpctl(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr = malloc(gridsize * sizeof(double));
+  field.ptr = (double*) malloc(gridsize * sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
   hset = hsetCreate(nvars);
diff --git a/src/Timselstat.c b/src/Timselstat.c
index 7177730..9a49500 100644
--- a/src/Timselstat.c
+++ b/src/Timselstat.c
@@ -110,13 +110,13 @@ void *Timselstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
   samp1 = field_malloc(vlistID1, FIELD_NONE);
@@ -190,7 +190,7 @@ void *Timselstat(void *argument)
 		  if ( nmiss > 0 || samp1[varID][levelID].ptr )
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
-			samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
+			samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		      for ( i = 0; i < gridsize; i++ )
 			if ( DBL_IS_EQUAL(vars1[varID][levelID].ptr[i],
@@ -210,7 +210,7 @@ void *Timselstat(void *argument)
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
 			{
-			  samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
+			  samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 			  for ( i = 0; i < gridsize; i++ )
 			    samp1[varID][levelID].ptr[i] = nsets;
 			}
diff --git a/src/Timsort.c b/src/Timsort.c
index b8668e1..e3b2fe9 100644
--- a/src/Timsort.c
+++ b/src/Timsort.c
@@ -89,9 +89,9 @@ void *Timsort(void *argument)
       if ( tsID >= nalloc )
 	{
 	  nalloc += NALLOC_INC;
-	  vdate = realloc(vdate, nalloc*sizeof(int));
-	  vtime = realloc(vtime, nalloc*sizeof(int));
-	  vars  = realloc(vars, nalloc*sizeof(field_t **));
+	  vdate = (int*) realloc(vdate, nalloc*sizeof(int));
+	  vtime = (int*) realloc(vtime, nalloc*sizeof(int));
+	  vars  = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	}
 
       vdate[tsID] = taxisInqVdate(taxisID1);
@@ -104,7 +104,7 @@ void *Timsort(void *argument)
 	  streamInqRecord(streamID1, &varID, &levelID);
 	  gridID   = vlistInqVarGrid(vlistID1, varID);
 	  gridsize = gridInqSize(gridID);
-	  vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+	  vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 	  streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
 	  vars[tsID][varID][levelID].nmiss = nmiss;
 	}
@@ -114,9 +114,9 @@ void *Timsort(void *argument)
 
   nts = tsID;
 
-  sarray = malloc(ompNumThreads*sizeof(double *));
+  sarray = (double **) malloc(ompNumThreads*sizeof(double *));
   for ( i = 0; i < ompNumThreads; i++ )
-    sarray[i] = malloc(nts*sizeof(double));
+    sarray[i] = (double*) malloc(nts*sizeof(double));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
diff --git a/src/Timstat.c b/src/Timstat.c
index 528b038..d81080f 100644
--- a/src/Timstat.c
+++ b/src/Timstat.c
@@ -187,8 +187,9 @@ void *Timstat(void *argument)
   if ( cdoOperatorF2(operatorID) == 31 ) vlistDefNtsteps(vlistID2, 1);
 
   taxisID1 = vlistInqTaxis(vlistID1);
-  taxis_has_bounds = taxisHasBounds(taxisID1);
   taxisID2 = taxisDuplicate(taxisID1);
+  if ( taxisInqType(taxisID2) == TAXIS_FORECAST ) taxisDefType(taxisID2, TAXIS_RELATIVE);
+  taxis_has_bounds = taxisHasBounds(taxisID1);
   vlistDefTaxis(vlistID2, taxisID2);
 
   streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
@@ -225,14 +226,14 @@ void *Timstat(void *argument)
       streamDefVlist(streamID3, vlistID3);
     }
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   if ( vlistNumber(vlistID1) != CDI_REAL ) gridsize *= 2;
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
   samp1 = field_malloc(vlistID1, FIELD_NONE);
@@ -292,7 +293,7 @@ void *Timstat(void *argument)
 		  if ( nmiss > 0 || samp1[varID][levelID].ptr )
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
-			samp1[varID][levelID].ptr = malloc(nwpv*gridsize*sizeof(double));
+			samp1[varID][levelID].ptr = (double*) malloc(nwpv*gridsize*sizeof(double));
 
 		      for ( i = 0; i < nwpv*gridsize; i++ )
 			if ( DBL_IS_EQUAL(vars1[varID][levelID].ptr[i], vars1[varID][levelID].missval) )
@@ -311,7 +312,7 @@ void *Timstat(void *argument)
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
 			{
-			  samp1[varID][levelID].ptr = malloc(nwpv*gridsize*sizeof(double));
+			  samp1[varID][levelID].ptr = (double*) malloc(nwpv*gridsize*sizeof(double));
 			  for ( i = 0; i < nwpv*gridsize; i++ )
 			    samp1[varID][levelID].ptr[i] = nsets;
 			}
diff --git a/src/Timstat2.c b/src/Timstat2.c
index 750ecf8..2995429 100644
--- a/src/Timstat2.c
+++ b/src/Timstat2.c
@@ -148,8 +148,9 @@ void *Timstat2(void *argument)
   nvars  = vlistNvars(vlistID1);
   nrecs  = vlistNrecs(vlistID1);
   nrecs3 = nrecs;
-  recVarID   = malloc(nrecs*sizeof(int));
-  recLevelID = malloc(nrecs*sizeof(int));
+  recVarID   = (int*) malloc(nrecs*sizeof(int));
+  recLevelID = (int*) malloc(nrecs*sizeof(int));
+
   taxisID1 = vlistInqTaxis(vlistID1);
   taxisID2 = vlistInqTaxis(vlistID2);
   taxisID3 = taxisDuplicate(taxisID1);
@@ -161,11 +162,11 @@ void *Timstat2(void *argument)
  
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1  = malloc(gridsize*sizeof(double));
-  array2  = malloc(gridsize*sizeof(double));
+  array1  = (double*) malloc(gridsize*sizeof(double));
+  array2  = (double*) malloc(gridsize*sizeof(double));
   				 
-  work    = malloc(nvars*sizeof(double ***));
-  nofvals = malloc(nvars*sizeof(int **));
+  work    = (double ****) malloc(nvars*sizeof(double ***));
+  nofvals = (int ***) malloc(nvars*sizeof(int **));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
@@ -173,18 +174,18 @@ void *Timstat2(void *argument)
       gridsize = gridInqSize(gridID);
       nlevs    = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
 
-      work[varID]    = malloc(nlevs*sizeof(double **));
-      nofvals[varID] = malloc(nlevs*sizeof(int *));  
+      work[varID]    = (double ***) malloc(nlevs*sizeof(double **));
+      nofvals[varID] = (int **) malloc(nlevs*sizeof(int *));  
 
       for ( levelID = 0; levelID < nlevs; levelID++ )
 	{
-	  nofvals[varID][levelID] = malloc(gridsize*sizeof(int));
+	  nofvals[varID][levelID] = (int*) malloc(gridsize*sizeof(int));
 	  memset(nofvals[varID][levelID], 0, gridsize*sizeof(int));
       
-	  work[varID][levelID] = malloc(nwork*sizeof(double *));
+	  work[varID][levelID] = (double **) malloc(nwork*sizeof(double *));
 	  for ( i = 0; i < nwork; i++ )
 	    {
-	      work[varID][levelID][i] = malloc(gridsize*sizeof(double));
+	      work[varID][levelID][i] = (double*) malloc(gridsize*sizeof(double));
 	      memset(work[varID][levelID][i], 0, gridsize*sizeof(double));
 	    }
 	}
diff --git a/src/Timstat3.c b/src/Timstat3.c
index 6a20840..3d4e005 100644
--- a/src/Timstat3.c
+++ b/src/Timstat3.c
@@ -100,8 +100,9 @@ void *Timstat3(void *argument)
   nvars = vlistNvars(vlistID[0]);
   nrecs = vlistNrecs(vlistID[0]);
   nrecs3 = nrecs;
-  recVarID   = malloc(nrecs*sizeof(int));
-  recLevelID = malloc(nrecs*sizeof(int));
+  recVarID   = (int*) malloc(nrecs*sizeof(int));
+  recLevelID = (int*) malloc(nrecs*sizeof(int));
+
   taxisID1 = vlistInqTaxis(vlistID[0]);
   taxisID3 = taxisDuplicate(taxisID1);
  
@@ -115,19 +116,19 @@ void *Timstat3(void *argument)
   for ( i = 0; i < NIN; ++i )
     {
       field_init(&in[i]);
-      in[i].ptr = malloc(gridsize*sizeof(double));
+      in[i].ptr = (double*) malloc(gridsize*sizeof(double));
     }
 				 
   for ( i = 0; i < NOUT; ++i )
     {
       field_init(&out[i]);
-      out[i].ptr = malloc(gridsize*sizeof(double));
+      out[i].ptr = (double*) malloc(gridsize*sizeof(double));
     }
 				 
   for ( iw = 0; iw < NFWORK; ++iw )
-    fwork[iw] = malloc(nvars*sizeof(field_t *));
+    fwork[iw] = (field_t **) malloc(nvars*sizeof(field_t *));
   for ( iw = 0; iw < NIWORK; ++iw )
-    iwork[iw] = malloc(nvars*sizeof(int **));
+    iwork[iw] = (int ***) malloc(nvars*sizeof(int **));
 
   for ( varID = 0; varID < nvars; ++varID )
     {
@@ -138,9 +139,9 @@ void *Timstat3(void *argument)
       missval2 = vlistInqVarMissval(vlistID[1], varID); 
 
       for ( iw = 0; iw < NFWORK; ++iw )
-	fwork[iw][varID] = malloc(nlevs*sizeof(field_t));
+	fwork[iw][varID] = (field_t*) malloc(nlevs*sizeof(field_t));
       for ( iw = 0; iw < NIWORK; ++iw )
-	iwork[iw][varID] = malloc(nlevs*sizeof(int *));  
+	iwork[iw][varID] = (int **) malloc(nlevs*sizeof(int *));  
 
       for ( levelID = 0; levelID < nlevs; ++levelID )
 	{
@@ -150,13 +151,13 @@ void *Timstat3(void *argument)
 	      fwork[iw][varID][levelID].grid    = gridID;
 	      fwork[iw][varID][levelID].nmiss   = 0;
 	      fwork[iw][varID][levelID].missval = missval;
-	      fwork[iw][varID][levelID].ptr     = malloc(gridsize*sizeof(double));
+	      fwork[iw][varID][levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 	      memset(fwork[iw][varID][levelID].ptr, 0, gridsize*sizeof(double));
 	    }
 
 	  for ( iw = 0; iw < NIWORK; ++iw )
 	    {
-	      iwork[iw][varID][levelID] = malloc(gridsize*sizeof(int));
+	      iwork[iw][varID][levelID] = (int*) malloc(gridsize*sizeof(int));
 	      memset(iwork[iw][varID][levelID], 0, gridsize*sizeof(int));
 	    }
 	}
diff --git a/src/Tinfo.c b/src/Tinfo.c
index 927539e..b7a3c1e 100644
--- a/src/Tinfo.c
+++ b/src/Tinfo.c
@@ -222,6 +222,7 @@ void *Tinfo(void *argument)
   int vdate_first = 0, vtime_first = 0;
   int vdate0 = 0, vtime0 = 0;
   int vdate = 0, vtime = 0;
+  int fdate = 0, ftime = 0;
   int nrecs, ntsteps;
   int tsID = 0, ntimeout;
   int taxisID;
@@ -230,6 +231,7 @@ void *Tinfo(void *argument)
   int year0, month0, day0;
   int year, month, day;
   int calendar, unit;
+  int lforecast = FALSE;
   int incperiod0 = 0, incunit0 = 0;
   int incperiod = 0, incunit = 0;
   int its = 0, igap;
@@ -264,7 +266,7 @@ void *Tinfo(void *argument)
 
       if ( taxisID != CDI_UNDEFID )
 	{
-	  if ( taxisInqType(taxisID) == TAXIS_RELATIVE )
+	  if ( taxisInqType(taxisID) != TAXIS_ABSOLUTE )
 	    {
 	      vdate = taxisInqRdate(taxisID);
 	      vtime = taxisInqRtime(taxisID);
@@ -284,15 +286,41 @@ void *Tinfo(void *argument)
 		fprintf(stdout, "  Bounds = true");
 
 	      fprintf(stdout, "\n");
+
+	      if ( taxisInqType(taxisID) == TAXIS_FORECAST )
+		{
+		  fdate = taxisInqFdate(taxisID);
+		  ftime = taxisInqFtime(taxisID);
+	      
+		  date2str(fdate, vdatestr, sizeof(vdatestr));
+		  time2str(ftime, vtimestr, sizeof(vtimestr));
+
+		  fprintf(stdout, "     Forecast RefTime = %s %s", vdatestr, vtimestr);
+		      
+		  unit = taxisInqForecastTunit(taxisID);
+		  if ( unit != CDI_UNDEFID )  fprintf(stdout, "  Units = %s", tunit2str(unit));
+
+		  fprintf(stdout, "\n");
+
+		  lforecast = TRUE;
+		}
 	    }
 	}
 
       calendar = taxisInqCalendar(taxisID);
 
+      fprintf(stdout, "\n");
+      fprintf(stdout, "         Verification Time              ");
+      if ( lforecast ) fprintf(stdout, " Forecast Reference Time     ");
       if ( taxisHasBounds(taxisID) )
-	fprintf(stdout, "\nTimestep YYYY-MM-DD hh:mm:ss   Increment YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  Difference\n");
-      else
-	fprintf(stdout, "\nTimestep YYYY-MM-DD hh:mm:ss   Increment\n");
+	fprintf(stdout, " lower bound          upper bound");
+      fprintf(stdout, "\n");
+
+      fprintf(stdout, "Timestep YYYY-MM-DD hh:mm:ss   Increment");
+      if ( lforecast ) fprintf(stdout, " YYYY-MM-DD hh:mm:ss   Period");
+      if ( taxisHasBounds(taxisID) )
+	fprintf(stdout, " YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  Difference");
+      fprintf(stdout, "\n");
 
       tsID = 0;
       while ( (nrecs = streamInqTimestep(streamID, tsID)) )
@@ -328,6 +356,20 @@ void *Tinfo(void *argument)
 	      fprintf(stdout, "   --------");
 	    }
 
+	  if ( lforecast )
+	    {
+	      fdate = taxisInqFdate(taxisID);
+	      ftime = taxisInqFtime(taxisID);
+	      
+	      date2str(fdate, vdatestr, sizeof(vdatestr));
+	      time2str(ftime, vtimestr, sizeof(vtimestr));
+
+	      fprintf(stdout, " %s %s", vdatestr, vtimestr);
+
+	      double fc_period = taxisInqForecastPeriod(taxisID);
+	      fprintf(stdout, " %7g", fc_period);
+	    }
+
 	  if ( taxisHasBounds(taxisID) ) printBounds(taxisID, calendar);
 
 	  if (  tsID > 1 && (incperiod != incperiod0 || incunit != incunit0) )
diff --git a/src/Tocomplex.c b/src/Tocomplex.c
index 818b164..398710b 100644
--- a/src/Tocomplex.c
+++ b/src/Tocomplex.c
@@ -70,8 +70,8 @@ void *Tocomplex(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(2*gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(2*gridsize*sizeof(double));
       
   tsID  = 0;
   tsID2 = 0;
diff --git a/src/Transpose.c b/src/Transpose.c
index db2dbf0..1f1761d 100644
--- a/src/Transpose.c
+++ b/src/Transpose.c
@@ -37,8 +37,8 @@ void transxy(int gridID, double *array1, double *array2)
   nx = gridInqXsize(gridID);
   ny = gridInqYsize(gridID);
 
-  a2D1 = malloc(ny*sizeof(double *));
-  a2D2 = malloc(nx*sizeof(double *));
+  a2D1 = (double **) malloc(ny*sizeof(double *));
+  a2D2 = (double **) malloc(nx*sizeof(double *));
 
   for ( j = 0; j < ny; ++j ) a2D1[j] = array1+j*nx;
   for ( i = 0; i < nx; ++i ) a2D2[i] = array2+i*ny;
@@ -98,8 +98,8 @@ void *Transpose(void *argument)
 
   gridsize = vlistGridsizeMax(vlistID1);
 
-  array1 = malloc(gridsize*sizeof(double));
-  array2 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
+  array2 = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Trend.c b/src/Trend.c
index 0f3e121..e422196 100644
--- a/src/Trend.c
+++ b/src/Trend.c
@@ -73,16 +73,16 @@ void *Trend(void *argument)
   streamDefVlist(streamID2, vlistID2);
   streamDefVlist(streamID3, vlistID2);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field1);
   field_init(&field2);
 
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   for ( w = 0; w < nwork; w++ )
     work[w] = field_calloc(vlistID1, FIELD_PTR);
diff --git a/src/Trms.c b/src/Trms.c
index 56d5f26..d5c95ca 100644
--- a/src/Trms.c
+++ b/src/Trms.c
@@ -170,19 +170,19 @@ void *Trms(void *argument)
 
   streamDefVlist(streamID3, vlistID3);
 
-  vardata1 = malloc(nvars*sizeof(double*));
-  vardata2 = malloc(nvars*sizeof(double*));
+  vardata1 = (double**) malloc(nvars*sizeof(double*));
+  vardata2 = (double**) malloc(nvars*sizeof(double*));
 
   gridsize = gridInqSize(vlistInqVarGrid(vlistID1, pvarID));
   nlevel   = vctsize/2 - 1;
-  dp = malloc(gridsize*nlevel*sizeof(double));
+  dp = (double*) malloc(gridsize*nlevel*sizeof(double));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
-      vardata2[varID] = malloc(gridsize*nlevel*sizeof(double));
+      vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
+      vardata2[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   field_init(&field1);
@@ -192,7 +192,7 @@ void *Trms(void *argument)
   lim = vlistGridsizeMax(vlistID1);
   field1.weight = NULL;
   if ( needWeights )
-    field1.weight = malloc(lim*sizeof(double));
+    field1.weight = (double*) malloc(lim*sizeof(double));
 
   field2.weight = NULL;
 
diff --git a/src/Tstepcount.c b/src/Tstepcount.c
index 157a1f8..7aba987 100644
--- a/src/Tstepcount.c
+++ b/src/Tstepcount.c
@@ -111,7 +111,7 @@ void *Tstepcount(void *argument)
       if ( tsID >= nalloc )
 	{
 	  nalloc += NALLOC_INC;
-	  vars  = realloc(vars, nalloc*sizeof(field_t **));
+	  vars  = (field_t ***) realloc(vars, nalloc*sizeof(field_t **));
 	}
 
       vdate = taxisInqVdate(taxisID1);
@@ -124,7 +124,7 @@ void *Tstepcount(void *argument)
 	  streamInqRecord(streamID1, &varID, &levelID);
 	  gridID   = vlistInqVarGrid(vlistID1, varID);
 	  gridsize = gridInqSize(gridID);
-	  vars[tsID][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+	  vars[tsID][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 	  streamReadRecord(streamID1, vars[tsID][varID][levelID].ptr, &nmiss);
 	  vars[tsID][varID][levelID].nmiss = nmiss;
 	}
@@ -134,10 +134,10 @@ void *Tstepcount(void *argument)
 
   nts = tsID;
 
-  mem = malloc(ompNumThreads*sizeof(memory_t));
+  mem = (memory_t*) malloc(ompNumThreads*sizeof(memory_t));
   for ( i = 0; i < ompNumThreads; i++ )
     {
-      mem[i].array1 = malloc(nts*sizeof(double));
+      mem[i].array1 = (double*) malloc(nts*sizeof(double));
     }
 
   for ( varID = 0; varID < nvars; varID++ )
diff --git a/src/Vardup.c b/src/Vardup.c
index d30a16c..ef115a0 100644
--- a/src/Vardup.c
+++ b/src/Vardup.c
@@ -79,20 +79,20 @@ void *Vardup(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array    = malloc(gridsize*sizeof(double));
-  vardata  = malloc(nvars*sizeof(double *));
-  varnmiss = malloc(nvars*sizeof(int *));
+  array    = (double*) malloc(gridsize*sizeof(double));
+  vardata  = (double **) malloc(nvars*sizeof(double *));
+  varnmiss = (int **) malloc(nvars*sizeof(int *));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      vardata[varID]  = malloc(gridsize*nlevel*sizeof(double));
-      varnmiss[varID] = malloc(nlevel*sizeof(int));
+      vardata[varID]  = (double*) malloc(gridsize*nlevel*sizeof(double));
+      varnmiss[varID] = (int*) malloc(nlevel*sizeof(int));
     }
 
   for ( i = 1; i < nmul; i++ )
diff --git a/src/Vargen.c b/src/Vargen.c
index 6e1440c..d7062fa 100644
--- a/src/Vargen.c
+++ b/src/Vargen.c
@@ -34,6 +34,7 @@
 #include "cdo_int.h"
 #include "pstream.h"
 #include "list.h"
+#include "grid.h"
 #include "stdnametable.h"
 
 
@@ -88,7 +89,7 @@ std_atm_pressure(double height)
 
 void *Vargen(void *argument)
 {
-  int RANDOM, SINCOS, CONST, FOR, TOPO, TEMP, MASK, STDATM;
+  int RANDOM, SINCOS, COSHILL, CONST, FOR, TOPO, TEMP, MASK, STDATM;
   int operatorID;
   int streamID;
   int nvars, ntimesteps, nlevels = 1;
@@ -104,14 +105,15 @@ void *Vargen(void *argument)
 
   cdoInitialize(argument);
 
-  RANDOM = cdoOperatorAdd("random", 0, 0, "grid description file or name, <seed>");
-  SINCOS = cdoOperatorAdd("sincos", 0, 0, "grid description file or name");
-  CONST  = cdoOperatorAdd("const",  0, 0, "constant value, grid description file or name");
-  FOR    = cdoOperatorAdd("for",    0, 0, "start, end, <increment>");
-  TOPO   = cdoOperatorAdd("topo",   0, 0, NULL);
-  TEMP   = cdoOperatorAdd("temp",   0, 0, NULL);
-  MASK   = cdoOperatorAdd("mask",   0, 0, NULL);
-  STDATM = cdoOperatorAdd("stdatm", 0, 0, "levels");
+  RANDOM  = cdoOperatorAdd("random",  0, 0, "grid description file or name, <seed>");
+  SINCOS  = cdoOperatorAdd("sincos",  0, 0, "grid description file or name");
+  COSHILL = cdoOperatorAdd("coshill", 0, 0, "grid description file or name");
+  CONST   = cdoOperatorAdd("const",   0, 0, "constant value, grid description file or name");
+  FOR     = cdoOperatorAdd("for",     0, 0, "start, end, <increment>");
+  TOPO    = cdoOperatorAdd("topo",    0, 0, NULL);
+  TEMP    = cdoOperatorAdd("temp",    0, 0, NULL);
+  MASK    = cdoOperatorAdd("mask",    0, 0, NULL);
+  STDATM  = cdoOperatorAdd("stdatm",  0, 0, "height levels [m]");
 
   operatorID = cdoOperatorID();
 
@@ -132,7 +134,7 @@ void *Vargen(void *argument)
         }
       srand(seed);
     }
-  else if ( operatorID == SINCOS )
+  else if ( operatorID == SINCOS || operatorID == COSHILL )
     {
       operatorInputArg(cdoOperatorEnter(operatorID));
       operatorCheckArgc(1);
@@ -190,7 +192,7 @@ void *Vargen(void *argument)
       double lon = 0, lat = 0;
       LIST *flist = listNew(FLT_LIST);
 
-      operatorInputArg("levels");
+      operatorInputArg(cdoOperatorEnter(operatorID));
       nlevels = args2fltlist(operatorArgc(), operatorArgv(), flist);
       levels  = (double *) listArrayPtr(flist);
       //listDelete(flist);
@@ -260,7 +262,7 @@ void *Vargen(void *argument)
   taxisID = taxisCreate(TAXIS_RELATIVE);
   vlistDefTaxis(vlistID, taxisID);
 
-  if ( operatorID == RANDOM || operatorID == SINCOS || operatorID == CONST || operatorID == TOPO ||
+  if ( operatorID == RANDOM || operatorID == SINCOS || operatorID == COSHILL || operatorID == CONST || operatorID == TOPO ||
        operatorID == TEMP || operatorID == MASK || operatorID == STDATM )
     vlistDefNtsteps(vlistID, 1);
 
@@ -269,7 +271,7 @@ void *Vargen(void *argument)
   streamDefVlist(streamID, vlistID);
 
   gridsize = gridInqSize(gridID);
-  array = malloc(gridsize*sizeof(double));
+  array = (double*) malloc(gridsize*sizeof(double));
 
   if ( operatorID == FOR )
     ntimesteps = 1.001 + ((rstop-rstart)/rinc);
@@ -304,22 +306,39 @@ void *Vargen(void *argument)
                   for ( i = 0; i < gridsize; i++ )
                     array[i] = rand()/(RAND_MAX+1.0);
                 }
-              else if ( operatorID == SINCOS )
+              else if ( operatorID == SINCOS || operatorID == COSHILL )
                 {
-		  int nlon = gridInqXsize(gridID);
-		  int nlat = gridInqYsize(gridID);
-		  double dlon = 360./nlon;
-		  double dlat = 180./nlat;
-		  double lon0 = 0;
-		  double lat0 = -90 + dlat/2;
+		  double *xvals = (double*) malloc(gridsize*sizeof(double));
+		  double *yvals = (double*) malloc(gridsize*sizeof(double));
 
-                  for ( i = 0; i < gridsize; i++ )
+		  if ( gridInqType(gridID) == GRID_GME ) gridID = gridToUnstructured(gridID, 0);
+
+		  if ( gridInqType(gridID) != GRID_UNSTRUCTURED && gridInqType(gridID) != GRID_CURVILINEAR )
+		    gridID = gridToCurvilinear(gridID, 0);
+
+		  gridInqXvals(gridID, xvals);
+		  gridInqYvals(gridID, yvals);
+
+		  /* Convert lat/lon units if required */
+		  char units[CDI_MAX_NAME];
+		  gridInqXunits(gridID, units);
+		  grid_to_radian(units, gridsize, xvals, "grid center lon");
+		  gridInqYunits(gridID, units);
+		  grid_to_radian(units, gridsize, yvals, "grid center lat");
+
+		  if ( operatorID == SINCOS )
 		    {
-		      int ilat = (i%gridsize)/ nlon;
-		      int ilon = i%nlon;
-		      array[i] = cos(2.0 * M_PI * (lon0 + ilon*dlon)/360)
-		   	       * sin(2.0 * M_PI * (lat0 + ilat*dlat)/180);
+		      for ( i = 0; i < gridsize; i++ )
+			array[i] = cos(1.0 * xvals[i]) * sin(2.0 * yvals[i]);
 		    }
+		  else if ( operatorID == COSHILL )
+		    {		     
+		      for ( i = 0; i < gridsize; i++ )
+			array[i] = 2 - cos(acos(cos(xvals[i]) * cos(yvals[i]))/1.2);
+		    }
+
+		  free(xvals);
+		  free(yvals);
 		}
               else if ( operatorID == CONST )
                 {
diff --git a/src/Varrms.c b/src/Varrms.c
index a65473e..8a274b6 100644
--- a/src/Varrms.c
+++ b/src/Varrms.c
@@ -98,15 +98,15 @@ void *Varrms(void *argument)
 
   streamDefVlist(streamID3, vlistID3);
 
-  vardata1 = malloc(nvars*sizeof(double*));
-  vardata2 = malloc(nvars*sizeof(double*));
+  vardata1 = (double**) malloc(nvars*sizeof(double*));
+  vardata2 = (double**) malloc(nvars*sizeof(double*));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
       gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
       nlevel   = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
-      vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
-      vardata2[varID] = malloc(gridsize*nlevel*sizeof(double));
+      vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
+      vardata2[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
     }
 
   field_init(&field1);
@@ -116,7 +116,7 @@ void *Varrms(void *argument)
   lim = vlistGridsizeMax(vlistID1);
   field1.weight = NULL;
   if ( needWeights )
-    field1.weight = malloc(lim*sizeof(double));
+    field1.weight = (double*) malloc(lim*sizeof(double));
 
   field2.weight = NULL;
 
diff --git a/src/Vertint.c b/src/Vertint.c
index 5afb701..10c982e 100644
--- a/src/Vertint.c
+++ b/src/Vertint.c
@@ -44,7 +44,6 @@ void *Vertint(void *argument)
   enum {ECHAM_MODE, WMO_MODE};
   enum {func_pl, func_hl};
   enum {type_lin, type_log};
-  int geop_code = 0, temp_code = 0, ps_code = 0, lsp_code = 0;
   int streamID1, streamID2;
   int vlistID1, vlistID2;
   int gridsize, ngp = 0;
@@ -57,11 +56,11 @@ void *Vertint(void *argument)
   int nplev, nhlev = 0, nhlevf = 0, nhlevh = 0, nlevel, maxlev;
   int *vert_index = NULL;
   int nvct;
-  int geop_needed = FALSE;
-  int geopID = -1, tempID = -1, psID = -1, lnpsID = -1, gheightID = -1;
+  int sgeopot_needed = FALSE;
+  int sgeopotID = -1, geopotID = -1, tempID = -1, psID = -1, lnpsID = -1, presID = -1, gheightID = -1;
   int code, param;
   int pnum, pcat, pdis;
-  int sortlevels = TRUE;
+  //int sortlevels = TRUE;
   int **varnmiss = NULL, *pnmiss = NULL;
   int *varinterp = NULL;
   char paramstr[32];
@@ -73,7 +72,7 @@ void *Vertint(void *argument)
   double *rvct = NULL; /* reduced VCT for LM */
   double *single1, *single2;
   double **vardata1 = NULL, **vardata2 = NULL;
-  double *geop = NULL, *ps_prog = NULL, *full_press = NULL, *half_press = NULL;
+  double *sgeopot = NULL, *ps_prog = NULL, *full_press = NULL, *half_press = NULL;
   double *hyb_press = NULL;
   int Extrapolate = 0;
   int taxisID1, taxisID2;
@@ -82,6 +81,7 @@ void *Vertint(void *argument)
   int instNum, tableNum;
   int useTable;
   int operfunc, opertype;
+  gribcode_t gribcodes = {0};
   LIST *flist = listNew(FLT_LIST);
 
   cdoInitialize(argument);
@@ -114,7 +114,7 @@ void *Vertint(void *argument)
 	    }
 	}
     }
-  else
+  else if ( operatorID == ML2PLX || operatorID == ML2HLX || operatorID == ML2PLX_LP || operatorID == ML2HLX_LP )
     {
       Extrapolate = 1;
     }
@@ -175,7 +175,7 @@ void *Vertint(void *argument)
 	{
 	  double *level;
 	  int l;
-	  level = malloc(nlevel*sizeof(double));
+	  level = (double*) malloc(nlevel*sizeof(double));
 	  zaxisInqLevels(zaxisID, level);
 	  for ( l = 0; l < nlevel; l++ )
 	    {
@@ -199,7 +199,7 @@ void *Vertint(void *argument)
 		  nhlevf   = nhlev;
 		  nhlevh   = nhlevf + 1;
 	      
-		  vct = malloc(nvct*sizeof(double));
+		  vct = (double*) malloc(nvct*sizeof(double));
 		  zaxisInqVct(zaxisID, vct);
 
 		  vlistChangeZaxisIndex(vlistID2, i, zaxisIDp);
@@ -220,7 +220,7 @@ void *Vertint(void *argument)
 		  nhlevf   = nhlev - 1;
 		  nhlevh   = nhlev;
 	      
-		  vct = malloc(nvct*sizeof(double));
+		  vct = (double*) malloc(nvct*sizeof(double));
 		  zaxisInqVct(zaxisID, vct);
 
 		  vlistChangeZaxisIndex(vlistID2, i, zaxisIDp);
@@ -238,7 +238,7 @@ void *Vertint(void *argument)
 		  int vctsize;
 		  int voff = 4;
 		  
-		  rvct = malloc(nvct*sizeof(double));
+		  rvct = (double*) malloc(nvct*sizeof(double));
 		  zaxisInqVct(zaxisID, rvct);
 
 		  if ( (int)(rvct[0]+0.5) == 100000 && rvct[voff] < rvct[voff+1] )
@@ -250,7 +250,7 @@ void *Vertint(void *argument)
 		      nhlevh   = nhlev + 1;
 
 		      vctsize = 2*nhlevh;
-		      vct = malloc(vctsize*sizeof(double));
+		      vct = (double*) malloc(vctsize*sizeof(double));
 
 		      vlistChangeZaxisIndex(vlistID2, i, zaxisIDp);
 
@@ -288,16 +288,16 @@ void *Vertint(void *argument)
 
   nvars = vlistNvars(vlistID1);
 
-  vars      = malloc(nvars*sizeof(int));
-  vardata1  = malloc(nvars*sizeof(double*));
-  vardata2  = malloc(nvars*sizeof(double*));
-  varnmiss  = malloc(nvars*sizeof(int*));
-  varinterp = malloc(nvars*sizeof(int));
+  vars      = (int*) malloc(nvars*sizeof(int));
+  vardata1  = (double**) malloc(nvars*sizeof(double*));
+  vardata2  = (double**) malloc(nvars*sizeof(double*));
+  varnmiss  = (int**) malloc(nvars*sizeof(int*));
+  varinterp = (int*) malloc(nvars*sizeof(int));
 
   maxlev   = nhlevh > nplev ? nhlevh : nplev;
 
   if ( Extrapolate == 0 )
-    pnmiss   = malloc(nplev*sizeof(int));
+    pnmiss = (int*) malloc(nplev*sizeof(int));
 
   // check levels
   if ( zaxisIDh != -1 )
@@ -311,7 +311,7 @@ void *Vertint(void *argument)
 	{
 	  if ( (ilev+1) != (int)levels[ilev] )
 	    {
-	      sortlevels = FALSE;
+	      //sortlevels = FALSE;
 	      break;
 	    }
 	}
@@ -319,17 +319,17 @@ void *Vertint(void *argument)
 
   if ( zaxisIDh != -1 && ngp > 0 )
     {
-      vert_index = malloc(ngp*nplev*sizeof(int));
-      ps_prog    = malloc(ngp*sizeof(double));
-      full_press = malloc(ngp*nhlevf*sizeof(double));
-      half_press = malloc(ngp*nhlevh*sizeof(double));
+      vert_index = (int*) malloc(ngp*nplev*sizeof(int));
+      ps_prog    = (double*) malloc(ngp*sizeof(double));
+      full_press = (double*) malloc(ngp*nhlevf*sizeof(double));
+      half_press = (double*) malloc(ngp*nhlevh*sizeof(double));
     }
   else
-    cdoWarning("No data on hybrid model level found!");
+    cdoWarning("No 3D variable with hybrid sigma pressure coordinate found!");
 
   if ( operfunc == func_hl )
     {
-      phlev = malloc(nplev*sizeof(double));
+      phlev = (double*) malloc(nplev*sizeof(double));
       h2p(phlev, plev, nplev);
 
       if ( cdoVerbose )
@@ -377,17 +377,12 @@ void *Vertint(void *argument)
 	  if ( tableNum == 2 )
 	    {
 	      mode = WMO_MODE;
-	      geop_code  =   6;
-	      temp_code  =  11;
-	      ps_code    =   1;
+	      wmo_gribcodes(&gribcodes);
 	    }
 	  else if ( tableNum == 128 || tableNum == 0 )
 	    {
 	      mode = ECHAM_MODE;
-	      geop_code  = 129;
-	      temp_code  = 130;
-	      ps_code    = 134;
-	      lsp_code   = 152;
+	      echam_gribcodes(&gribcodes);
 	    }
 	  else
 	    mode = -1;
@@ -395,10 +390,7 @@ void *Vertint(void *argument)
       else
 	{
 	  mode = ECHAM_MODE;
-	  geop_code  = 129;
-	  temp_code  = 130;
-	  ps_code    = 134;
-	  lsp_code   = 152;
+	  echam_gribcodes(&gribcodes);
 	}
 
       if ( cdoVerbose )
@@ -414,30 +406,33 @@ void *Vertint(void *argument)
 
 	  code = echamcode_from_stdname(stdname);
 
-	  if ( code < 0 )
+	  if ( code == -1 )
 	    {
 	      /*                                  ECHAM                            ECMWF       */
-	      if      ( geopID == -1  && (strcmp(varname, "geosp") == 0 || strcmp(varname, "z")    == 0) ) code = 129;
-	      else if ( tempID == -1  && (strcmp(varname, "st")    == 0 || strcmp(varname, "t")    == 0) ) code = 130;
-	      else if ( psID   == -1  && (strcmp(varname, "aps")   == 0 || strcmp(varname, "sp"  ) == 0) ) code = 134;
-	      else if ( lnpsID == -1  && (strcmp(varname, "lsp")   == 0 || strcmp(varname, "lnsp") == 0) ) code = 152;
+	      if      ( sgeopotID == -1 && (strcmp(varname, "geosp") == 0 || strcmp(varname, "z")    == 0) ) code = gribcodes.geopot;
+	      else if ( tempID    == -1 && (strcmp(varname, "st")    == 0 || strcmp(varname, "t")    == 0) ) code = gribcodes.temp;
+	      else if ( psID      == -1 && (strcmp(varname, "aps")   == 0 || strcmp(varname, "sp"  ) == 0) ) code = gribcodes.ps;
+	      else if ( lnpsID    == -1 && (strcmp(varname, "lsp")   == 0 || strcmp(varname, "lnsp") == 0) ) code = gribcodes.lsp;
+	      else if ( geopotID  == -1 && strcmp(stdname, "geopotential_full") == 0 ) code = gribcodes.geopot;
 	      /* else if ( strcmp(varname, "geopoth") == 0 ) code = 156; */
 	    }
 	}
 
       if ( mode == ECHAM_MODE )
 	{
-	  if      ( code == geop_code  && nlevel == 1      ) geopID    = varID;
-	  else if ( code == temp_code  && nlevel == nhlevf ) tempID    = varID;
-	  else if ( code == ps_code    && nlevel == 1      ) psID      = varID;
-	  else if ( code == lsp_code   && nlevel == 1      ) lnpsID    = varID;
-	  else if ( code == 156        && nlevel == nhlevf ) gheightID = varID;
+	  if      ( code == gribcodes.geopot  && nlevel == 1      ) sgeopotID = varID;
+	  else if ( code == gribcodes.geopot  && nlevel == nhlevf ) geopotID  = varID;
+	  else if ( code == gribcodes.temp    && nlevel == nhlevf ) tempID    = varID;
+	  else if ( code == gribcodes.ps      && nlevel == 1      ) psID      = varID;
+	  else if ( code == gribcodes.lsp     && nlevel == 1      ) lnpsID    = varID;
+	  else if ( code == gribcodes.gheight && nlevel == nhlevf ) gheightID = varID;
 	}
       else if ( mode == WMO_MODE )
 	{
-	  if      ( code == geop_code  && nlevel == 1      ) geopID  = varID;
-	  else if ( code == temp_code  && nlevel == nhlevf ) tempID  = varID;
-	  else if ( code == ps_code    && nlevel == 1      ) psID    = varID;
+	  if      ( code == gribcodes.geopot  && nlevel == 1      ) sgeopotID = varID;
+	  else if ( code == gribcodes.geopot  && nlevel == nhlevf ) geopotID  = varID;
+	  else if ( code == gribcodes.temp    && nlevel == nhlevf ) tempID    = varID;
+	  else if ( code == gribcodes.ps      && nlevel == 1      ) psID      = varID;
 	}
 
       if ( gridInqType(gridID) == GRID_SPECTRAL && zaxisInqType(zaxisID) == ZAXIS_HYBRID )
@@ -447,17 +442,17 @@ void *Vertint(void *argument)
 	cdoAbort("Spectral data unsupported!");
 
       if ( varID == gheightID )
-	vardata1[varID] = malloc(gridsize*(nlevel+1)*sizeof(double));
+	vardata1[varID] = (double*) malloc(gridsize*(nlevel+1)*sizeof(double));
       else
-	vardata1[varID] = malloc(gridsize*nlevel*sizeof(double));
+	vardata1[varID] = (double*) malloc(gridsize*nlevel*sizeof(double));
 
       /* if ( zaxisInqType(zaxisID) == ZAXIS_HYBRID && zaxisIDh != -1 && nlevel == nhlev ) */
       if ( zaxisID == zaxisIDh ||
 	   (zaxisInqType(zaxisID) == ZAXIS_HYBRID && zaxisIDh != -1 && (nlevel == nhlevh || nlevel == nhlevf)) )
 	{
 	  varinterp[varID] = TRUE;
-	  vardata2[varID]  = malloc(gridsize*nplev*sizeof(double));
-	  varnmiss[varID]  = malloc(maxlev*sizeof(int));
+	  vardata2[varID]  = (double*) malloc(gridsize*nplev*sizeof(double));
+	  varnmiss[varID]  = (int*) malloc(maxlev*sizeof(int));
 	  memset(varnmiss[varID], 0, maxlev*sizeof(int));
 	}
       else
@@ -467,45 +462,55 @@ void *Vertint(void *argument)
 		       varID+1, paramstr, nlevel);
 	  varinterp[varID] = FALSE;
 	  vardata2[varID]  = vardata1[varID];
-	  varnmiss[varID]  = malloc(nlevel*sizeof(int));
+	  varnmiss[varID]  = (int*) malloc(nlevel*sizeof(int));
 	}
     }
 
   if ( cdoVerbose )
     {
       cdoPrint("Found:");
-      if ( tempID != -1 )    cdoPrint("  %s", var_stdname(air_temperature));
-      if ( psID   != -1 )    cdoPrint("  %s", var_stdname(surface_air_pressure));
-      if ( geopID != -1 )    cdoPrint("  %s", var_stdname(surface_geopotential));
+      if ( tempID    != -1 ) cdoPrint("  %s", var_stdname(air_temperature));
+      if ( psID      != -1 ) cdoPrint("  %s", var_stdname(surface_air_pressure));
+      if ( lnpsID    != -1 ) cdoPrint("  LOG(%s)", var_stdname(surface_air_pressure));
+      if ( sgeopotID != -1 ) cdoPrint("  %s", var_stdname(surface_geopotential));
+      if ( geopotID  != -1 ) cdoPrint("  %s", var_stdname(geopotential));
       if ( gheightID != -1 ) cdoPrint("  %s", var_stdname(geopotential_height));
     }
 
-  if ( tempID != -1 || gheightID != -1 ) geop_needed = TRUE;
+  if ( tempID != -1 || gheightID != -1 ) sgeopot_needed = TRUE;
 
-  if ( zaxisIDh != -1 && geop_needed )
+  if ( zaxisIDh != -1 && sgeopot_needed )
     {
-      geop = malloc(ngp*sizeof(double));
-      if ( geopID == -1 )
+      sgeopot = (double*) malloc(ngp*sizeof(double));
+      if ( sgeopotID == -1 )
 	{
-	  cdoWarning("%s not found - using zero %s!", var_stdname(surface_geopotential), var_stdname(surface_geopotential));
-	  memset(geop, 0, ngp*sizeof(double));
+	  if ( geopotID == -1 )
+	    cdoWarning("%s not found - set to zero!", var_stdname(surface_geopotential));
+	  else
+	    cdoPrint("%s not found - using bottom layer of %s!", var_stdname(surface_geopotential), var_stdname(geopotential));
+
+	  memset(sgeopot, 0, ngp*sizeof(double));
 	}
     }
 
   if ( zaxisIDh != -1 && gheightID != -1 && tempID == -1 )
     cdoAbort("Temperature not found, needed to compute geopotheight!");
 
+  presID = lnpsID;
   if ( zaxisIDh != -1 && lnpsID == -1 )
     {
-      if ( psID != -1 )
-	{
-	  param = vlistInqVarParam(vlistID1, psID);
-	  cdiParamToString(param, paramstr, sizeof(paramstr));
-	  if ( cdoVerbose )
-	    cdoWarning("LOG(%s) not found - using %s!", var_stdname(surface_air_pressure), var_stdname(surface_air_pressure));
-	}
-      else
+      if ( psID == -1 )
 	cdoAbort("%s not found!", var_stdname(surface_air_pressure));
+      else
+	presID = psID;
+    }
+
+  if ( cdoVerbose )
+    {
+      if ( presID == lnpsID )
+	cdoPrint("using LOG(%s)", var_stdname(surface_air_pressure));      
+      else
+	cdoPrint("using %s", var_stdname(surface_air_pressure));
     }
 
   streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
@@ -543,16 +548,22 @@ void *Vertint(void *argument)
 
       if ( zaxisIDh != -1 )
 	{
-	  if ( geop_needed && geopID != -1 )
+	  if ( sgeopot_needed )
 	    {
-	      memcpy(geop, vardata1[geopID], ngp*sizeof(double));
-
-	      /* check range of geop */
-	      minmaxval(ngp, geop, NULL, &minval, &maxval);
-	      if ( minval < MIN_FIS || maxval > MAX_FIS )
-		cdoWarning("Surface geopotential out of range (min=%g max=%g)!", minval, maxval);
-	      if ( minval >= 0 && maxval <= 9000 )
-		cdoWarning("Surface geopotential has an unexpected range (min=%g max=%g)!", minval, maxval);
+	      if ( sgeopotID != -1 )
+		memcpy(sgeopot, vardata1[sgeopotID], ngp*sizeof(double));
+	      else if ( geopotID != -1 )
+		memcpy(sgeopot, vardata1[geopotID]+ngp*(nhlevf-1), ngp*sizeof(double));
+
+	      /* check range of surface geopot */
+	      if ( sgeopotID != -1 || geopotID != -1 )
+		{
+		  minmaxval(ngp, sgeopot, NULL, &minval, &maxval);
+		  if ( minval < MIN_FIS || maxval > MAX_FIS )
+		    cdoWarning("Surface geopotential out of range (min=%g max=%g)!", minval, maxval);
+		  if ( ngp > 1 && minval >= 0 && maxval <= 9000 )
+		    cdoWarning("Surface geopotential has an unexpected range (min=%g max=%g)!", minval, maxval);
+		}
 	    }
 
 	  if ( lnpsID != -1 )
@@ -644,16 +655,16 @@ void *Vertint(void *argument)
 		      if ( opertype == type_log && Extrapolate )
 			cdoAbort("Log. extrapolation of temperature unsupported!");
 
-		      interp_T(geop, vardata1[varID], vardata2[varID],
+		      interp_T(sgeopot, vardata1[varID], vardata2[varID],
 			       full_press, half_press, vert_index,
 			       plev, nplev, ngp, nlevel, missval);
 		    }
 		  else if ( varID == gheightID )
 		    {
 		      for ( i = 0; i < ngp; ++i )
-			vardata1[varID][ngp*nlevel+i] = geop[i]/C_EARTH_GRAV;
+			vardata1[varID][ngp*nlevel+i] = sgeopot[i]/C_EARTH_GRAV;
 
-		      interp_Z(geop, vardata1[varID], vardata2[varID],
+		      interp_Z(sgeopot, vardata1[varID], vardata2[varID],
 			       full_press, half_press, vert_index, vardata1[tempID],
 			       plev, nplev, ngp, nlevel, missval);
 		    }
@@ -706,7 +717,7 @@ void *Vertint(void *argument)
 
   if ( pnmiss     ) free(pnmiss);
 
-  if ( geop       ) free(geop);
+  if ( sgeopot    ) free(sgeopot);
   if ( ps_prog    ) free(ps_prog);
   if ( vert_index ) free(vert_index);
   if ( full_press ) free(full_press);
diff --git a/src/Vertstat.c b/src/Vertstat.c
index cfcfaab..117c280 100644
--- a/src/Vertstat.c
+++ b/src/Vertstat.c
@@ -94,12 +94,12 @@ void *Vertstat(void *argument)
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
-  vars1 = malloc(nvars*sizeof(field_t));
-  samp1 = malloc(nvars*sizeof(field_t));
+  vars1 = (field_t*) malloc(nvars*sizeof(field_t));
+  samp1 = (field_t*) malloc(nvars*sizeof(field_t));
   if ( operfunc == func_std || operfunc == func_var )
-    vars2 = malloc(nvars*sizeof(field_t));
+    vars2 = (field_t*) malloc(nvars*sizeof(field_t));
 
   for ( varID = 0; varID < nvars; varID++ )
     {
@@ -113,7 +113,7 @@ void *Vertstat(void *argument)
       vars1[varID].nsamp   = 0;
       vars1[varID].nmiss   = 0;
       vars1[varID].missval = missval;
-      vars1[varID].ptr     = malloc(gridsize*sizeof(double));
+      vars1[varID].ptr     = (double*) malloc(gridsize*sizeof(double));
       samp1[varID].grid    = gridID;
       samp1[varID].nmiss   = 0;
       samp1[varID].missval = missval;
@@ -124,7 +124,7 @@ void *Vertstat(void *argument)
 	  vars2[varID].grid    = gridID;
 	  vars2[varID].nmiss   = 0;
 	  vars2[varID].missval = missval;
-	  vars2[varID].ptr     = malloc(gridsize*sizeof(double));
+	  vars2[varID].ptr     = (double*) malloc(gridsize*sizeof(double));
 	}
     }
 
@@ -151,7 +151,7 @@ void *Vertstat(void *argument)
 	      if ( nmiss > 0 || samp1[varID].ptr )
 		{
 		  if ( samp1[varID].ptr == NULL )
-		    samp1[varID].ptr = malloc(gridsize*sizeof(double));
+		    samp1[varID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		  for ( i = 0; i < gridsize; i++ )
 		    if ( DBL_IS_EQUAL(vars1[varID].ptr[i], vars1[varID].missval) )
@@ -170,7 +170,7 @@ void *Vertstat(void *argument)
 		{
 		  if ( samp1[varID].ptr == NULL )
 		    {
-		      samp1[varID].ptr = malloc(gridsize*sizeof(double));
+		      samp1[varID].ptr = (double*) malloc(gridsize*sizeof(double));
 		      for ( i = 0; i < gridsize; i++ )
 			samp1[varID].ptr[i] = vars1[varID].nsamp;
 		    }
diff --git a/src/Vertwind.c b/src/Vertwind.c
index 511e20d..e88f4fc 100644
--- a/src/Vertwind.c
+++ b/src/Vertwind.c
@@ -142,14 +142,14 @@ void *Vertwind(void *argument)
 
   gridsize = gridInqSize(gridID);
   nlevel = zaxisInqSize(zaxisID);
-  level  = malloc(nlevel*sizeof(double));
+  level  = (double*) malloc(nlevel*sizeof(double));
   zaxisInqLevels(zaxisID, level);
 
-  temp    = malloc(gridsize*nlevel*sizeof(double));
-  sq      = malloc(gridsize*nlevel*sizeof(double));
-  omega   = malloc(gridsize*nlevel*sizeof(double));
-  wms     = malloc(gridsize*nlevel*sizeof(double));
-  fpress  = malloc(gridsize*nlevel*sizeof(double));
+  temp    = (double*) malloc(gridsize*nlevel*sizeof(double));
+  sq      = (double*) malloc(gridsize*nlevel*sizeof(double));
+  omega   = (double*) malloc(gridsize*nlevel*sizeof(double));
+  wms     = (double*) malloc(gridsize*nlevel*sizeof(double));
+  fpress  = (double*) malloc(gridsize*nlevel*sizeof(double));
 
 
   if ( zaxisInqType(zaxisID) == ZAXIS_PRESSURE )
@@ -163,13 +163,13 @@ void *Vertwind(void *argument)
     }
   else if ( zaxisInqType(zaxisID) == ZAXIS_HYBRID )
     {
-      ps_prog = malloc(gridsize*sizeof(double));
-      hpress  = malloc(gridsize*(nlevel+1)*sizeof(double));
+      ps_prog = (double*) malloc(gridsize*sizeof(double));
+      hpress  = (double*) malloc(gridsize*(nlevel+1)*sizeof(double));
   
       nvct = zaxisInqVctSize(zaxisID);
       if ( nlevel == (nvct/2 - 1) )
 	{
-	  vct = malloc(nvct*sizeof(double));
+	  vct = (double*) malloc(nvct*sizeof(double));
 	  zaxisInqVct(zaxisID, vct);
 	}
       else
diff --git a/src/Wct.c b/src/Wct.c
index ca22ea3..53a2557 100755
--- a/src/Wct.c
+++ b/src/Wct.c
@@ -112,8 +112,8 @@ void *Wct(void *argument)
   field_init(&field1);
   field_init(&field2);
 
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   if ( cdoVerbose )
     cdoPrint("Number of timesteps: file1 %d, file2 %d", vlistNtsteps(vlistID1), vlistNtsteps(vlistID2));
diff --git a/src/Wind.c b/src/Wind.c
index 437d74a..5a0a2e7 100644
--- a/src/Wind.c
+++ b/src/Wind.c
@@ -304,19 +304,19 @@ void *Wind(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1 = malloc(gridsize*sizeof(double));
+  array1 = (double*) malloc(gridsize*sizeof(double));
 
   if ( varID1 != -1 && varID2 != -1 )
     {
       nlev     = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID1));
 
       gridsize = gridInqSize(gridID1);
-      ivar1 = malloc(nlev*gridsize*sizeof(double));
-      ivar2 = malloc(nlev*gridsize*sizeof(double));
+      ivar1 = (double*) malloc(nlev*gridsize*sizeof(double));
+      ivar2 = (double*) malloc(nlev*gridsize*sizeof(double));
   
       gridsize = gridInqSize(gridID2);
-      ovar1 = malloc(nlev*gridsize*sizeof(double));
-      ovar2 = malloc(nlev*gridsize*sizeof(double));
+      ovar1 = (double*) malloc(nlev*gridsize*sizeof(double));
+      ovar2 = (double*) malloc(nlev*gridsize*sizeof(double));
     }
 
   tsID = 0;
diff --git a/src/Writegrid.c b/src/Writegrid.c
index 3e12d95..fe49e98 100644
--- a/src/Writegrid.c
+++ b/src/Writegrid.c
@@ -55,7 +55,7 @@ void *Writegrid(void *argument)
   if ( gridInqXbounds(gridID, NULL) == 0 || gridInqYbounds(gridID, NULL) == 0 )
     cdoAbort("Grid corner missing!");
 
-  mask = malloc(gridsize*sizeof(int));
+  mask = (int*) malloc(gridsize*sizeof(int));
 
   if ( gridInqMask(gridID, NULL) )
     {
diff --git a/src/Writerandom.c b/src/Writerandom.c
index 66e6532..506afdb 100644
--- a/src/Writerandom.c
+++ b/src/Writerandom.c
@@ -62,11 +62,11 @@ void *Writerandom(void *argument)
 
       streamDefTimestep(streamID2, tsID);
 
-      recdata    = malloc(nrecs*sizeof(double*));
-      recvarID   = malloc(nrecs*sizeof(int));
-      reclevelID = malloc(nrecs*sizeof(int));
-      recnmiss   = malloc(nrecs*sizeof(int));
-      recindex   = malloc(nrecs*sizeof(int));
+      recdata    = (double**) malloc(nrecs*sizeof(double*));
+      recvarID   = (int*) malloc(nrecs*sizeof(int));
+      reclevelID = (int*) malloc(nrecs*sizeof(int));
+      recnmiss   = (int*) malloc(nrecs*sizeof(int));
+      recindex   = (int*) malloc(nrecs*sizeof(int));
 
       for ( recID = 0; recID < nrecs; recID++ )
 	{
@@ -74,7 +74,7 @@ void *Writerandom(void *argument)
 	  gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
 	  recvarID[recID] = varID;
 	  reclevelID[recID] = levelID;
-	  recdata[recID] = malloc(gridsize*sizeof(double));
+	  recdata[recID] = (double*) malloc(gridsize*sizeof(double));
 	  streamReadRecord(streamID1, recdata[recID], &recnmiss[recID]);
 	}
 
diff --git a/src/YAR.c b/src/YAR.c
index c935705..d685a5f 100644
--- a/src/YAR.c
+++ b/src/YAR.c
@@ -139,77 +139,6 @@ void set_source_data(double * source_data, double init_value,
 }
 
 
-static
-long find_ij_weights(double plon, double plat, double *restrict src_lats, double *restrict src_lons, double *ig, double *jg)
-{
-#define  THREE    3.0
-#define  HALF     0.5
-  long    Max_Iter = 100;
-  double  converge = 1.e-10;            /* Convergence criterion */
-  long iter;                     /*  iteration counters   */
-  double iguess, jguess;         /*  current guess for bilinear coordinate  */
-  double deli, delj;             /*  corrections to i,j                     */
-  double dth1, dth2, dth3;       /*  some latitude  differences             */
-  double dph1, dph2, dph3;       /*  some longitude differences             */
-  double dthp, dphp;             /*  difference between point and sw corner */
-  double mat1, mat2, mat3, mat4; /*  matrix elements                        */
-  double determinant;            /*  matrix determinant                     */
-
-  /* Iterate to find i,j for bilinear approximation  */
-
-  dth1 = src_lats[1] - src_lats[0];
-  dth2 = src_lats[3] - src_lats[0];
-  dth3 = src_lats[2] - src_lats[1] - dth2;
-
-  dph1 = src_lons[1] - src_lons[0];
-  dph2 = src_lons[3] - src_lons[0];
-  dph3 = src_lons[2] - src_lons[1];
-
-  if ( dph1 >  THREE*PIH ) dph1 -= PI2;
-  if ( dph2 >  THREE*PIH ) dph2 -= PI2;
-  if ( dph3 >  THREE*PIH ) dph3 -= PI2;
-  if ( dph1 < -THREE*PIH ) dph1 += PI2;
-  if ( dph2 < -THREE*PIH ) dph2 += PI2;
-  if ( dph3 < -THREE*PIH ) dph3 += PI2;
-
-  dph3 = dph3 - dph2;
-
-  iguess = HALF;
-  jguess = HALF;
-
-  for ( iter = 0; iter < Max_Iter; ++iter )
-    {
-      dthp = plat - src_lats[0] - dth1*iguess - dth2*jguess - dth3*iguess*jguess;
-      dphp = plon - src_lons[0];
-      
-      if ( dphp >  THREE*PIH ) dphp -= PI2;
-      if ( dphp < -THREE*PIH ) dphp += PI2;
-
-      dphp = dphp - dph1*iguess - dph2*jguess - dph3*iguess*jguess;
-
-      mat1 = dth1 + dth3*jguess;
-      mat2 = dth2 + dth3*iguess;
-      mat3 = dph1 + dph3*jguess;
-      mat4 = dph2 + dph3*iguess;
-
-      determinant = mat1*mat4 - mat2*mat3;
-
-      deli = (dthp*mat4 - dphp*mat2)/determinant;
-      delj = (dphp*mat1 - dthp*mat3)/determinant;
-
-      if ( fabs(deli) < converge && fabs(delj) < converge ) break;
-
-      iguess += deli;
-      jguess += delj;
-    }
-
-  *ig = iguess;
-  *jg = jguess;
-
-  return (iter);
-}
-
-
 void yar_remap_bil(field_t *field1, field_t *field2)
 {
   int nlonIn, nlatIn;
@@ -255,15 +184,15 @@ void yar_remap_bil(field_t *field1, field_t *field2)
   nlonIn = gridInqXsize(gridIDin);
   nlatIn = gridInqYsize(gridIDin);
   gridsize1 = gridInqSize(gridIDin);
-  lonIn = malloc(nlonIn*sizeof(double));
-  latIn = malloc(nlatIn*sizeof(double));
+  lonIn = (double*) malloc(nlonIn*sizeof(double));
+  latIn = (double*) malloc(nlatIn*sizeof(double));
   gridInqXvals(gridIDin, lonIn);
   gridInqYvals(gridIDin, latIn);
   for ( int i = 0; i < nlonIn; ++i ) lonIn[i] *= DEG2RAD;
   for ( int i = 0; i < nlatIn; ++i ) latIn[i] *= DEG2RAD;
 
-  xlonIn = malloc((nlonIn+1)*sizeof(double));
-  xlatIn = malloc((nlatIn+1)*sizeof(double));
+  xlonIn = (double*) malloc((nlonIn+1)*sizeof(double));
+  xlatIn = (double*) malloc((nlatIn+1)*sizeof(double));
   gridInqXvals(gridIDin, xlonIn);
   gridInqYvals(gridIDin, xlatIn);
   dxIn = xlonIn[1] - xlonIn[0];
@@ -280,15 +209,15 @@ void yar_remap_bil(field_t *field1, field_t *field2)
   nlonOut = gridInqXsize(gridIDout);
   nlatOut = gridInqYsize(gridIDout);
   gridsize2 = gridInqSize(gridIDout);
-  lonOut = malloc(nlonOut*sizeof(double));
-  latOut = malloc(nlatOut*sizeof(double));
+  lonOut = (double*) malloc(nlonOut*sizeof(double));
+  latOut = (double*) malloc(nlatOut*sizeof(double));
   gridInqXvals(gridIDout, lonOut);
   gridInqYvals(gridIDout, latOut);
   for ( int i = 0; i < nlonOut; ++i ) lonOut[i] *= DEG2RAD;
   for ( int i = 0; i < nlatOut; ++i ) latOut[i] *= DEG2RAD;
 
-  xlonOut = malloc((nlonOut+1)*sizeof(double));
-  xlatOut = malloc((nlatOut+1)*sizeof(double));
+  xlonOut = (double*) malloc((nlonOut+1)*sizeof(double));
+  xlatOut = (double*) malloc((nlatOut+1)*sizeof(double));
   gridInqXvals(gridIDout, xlonOut);
   gridInqYvals(gridIDout, xlatOut);
   dxOut = xlonOut[1] - xlonOut[0];
@@ -352,6 +281,12 @@ void yar_remap_bil(field_t *field1, field_t *field2)
 
   search = bucket_search_new(source_grid);
   /*
+  search = sphere_part_search_new(source_grid);
+  printf("search %p\n", search);
+  printf("search->vtable %p\n", search->vtable);
+  printf("search->vtable->do_point_search_p3 %d\n", search->vtable->do_point_search_p3);
+  */
+  /*
 
   printf("total_num_dependencies: %d\n", get_total_num_dependencies(deps));
 
@@ -416,7 +351,7 @@ void yar_remap_bil(field_t *field1, field_t *field2)
 	    }
 
 	  // try it with do_point_search_p3
-	  if ( find_ij_weights(plon, plat, src_lats, src_lons, &iguess, &jguess) < 100 )
+	  if ( find_ij_weights(plon, plat, src_lats, src_lons, &iguess, &jguess) )
 	    {
 
 	      wgts[0] = (1.-iguess)*(1.-jguess);
@@ -498,12 +433,12 @@ void yar_remap_con(field_t *field1, field_t *field2)
   nlonIn = gridInqXsize(gridIDin);
   nlatIn = gridInqYsize(gridIDin);
   gridsize1 = gridInqSize(gridIDin);
-  lonIn = malloc((nlonIn+1)*sizeof(double));
-  latIn = malloc((nlatIn+1)*sizeof(double));
+  lonIn = (double*) malloc((nlonIn+1)*sizeof(double));
+  latIn = (double*) malloc((nlatIn+1)*sizeof(double));
   gridInqXvals(gridIDin, lonIn);
   gridInqYvals(gridIDin, latIn);
-  xlonIn = malloc((nlonIn)*sizeof(double));
-  xlatIn = malloc((nlatIn)*sizeof(double));
+  xlonIn = (double*) malloc((nlonIn)*sizeof(double));
+  xlatIn = (double*) malloc((nlatIn)*sizeof(double));
   gridInqXvals(gridIDin, xlonIn);
   gridInqYvals(gridIDin, xlatIn);
   dxIn = lonIn[1] - lonIn[0];
@@ -520,12 +455,12 @@ void yar_remap_con(field_t *field1, field_t *field2)
   nlonOut = gridInqXsize(gridIDout);
   nlatOut = gridInqYsize(gridIDout);
   gridsize2 = gridInqSize(gridIDout);
-  lonOut = malloc((nlonOut+1)*sizeof(double));
-  latOut = malloc((nlatOut+1)*sizeof(double));
+  lonOut = (double*) malloc((nlonOut+1)*sizeof(double));
+  latOut = (double*) malloc((nlatOut+1)*sizeof(double));
   gridInqXvals(gridIDout, lonOut);
   gridInqYvals(gridIDout, latOut);
-  xlonOut = malloc((nlonOut+1)*sizeof(double));
-  xlatOut = malloc((nlatOut+1)*sizeof(double));
+  xlonOut = (double*) malloc((nlonOut+1)*sizeof(double));
+  xlatOut = (double*) malloc((nlatOut+1)*sizeof(double));
   gridInqXvals(gridIDout, xlonOut);
   gridInqYvals(gridIDout, xlatOut);
   dxOut = lonOut[1] - lonOut[0];
@@ -605,20 +540,20 @@ void yar_remap_con(field_t *field1, field_t *field2)
   double const epsilon = 1.0e-10; // relative precision 
 
   double *weight;
-  weight = malloc(gridsize1*sizeof(double));
+  weight = (double*) malloc(gridsize1*sizeof(double));
 
   double tgt_area;
   double *area;
-  area = malloc(gridsize1*sizeof(double));
+  area = (double*) malloc(gridsize1*sizeof(double));
 
   struct grid_cell *SourceCell;
-  SourceCell = malloc (gridsize1  * sizeof(*SourceCell) );
+  SourceCell = (struct grid_cell*) malloc(gridsize1  * sizeof(struct grid_cell));
 
   for ( int n = 0; n <  gridsize1; n++ ) {
     SourceCell[n].num_corners   = 4;
     SourceCell[n].edge_type     = quad_type;
-    SourceCell[n].coordinates_x = malloc ( 4 * sizeof(SourceCell[n].coordinates_x[0]) );
-    SourceCell[n].coordinates_y = malloc ( 4 * sizeof(SourceCell[n].coordinates_y[0]) );
+    SourceCell[n].coordinates_x = (double*) malloc( 4 * sizeof(double));
+    SourceCell[n].coordinates_y = (double*) malloc( 4 * sizeof(double));
   }
 
   struct grid_cell  TargetCell;
@@ -626,8 +561,8 @@ void yar_remap_con(field_t *field1, field_t *field2)
   TargetCell.num_corners   = 4;
   TargetCell.edge_type     = quad_type;
 
-  TargetCell.coordinates_x = malloc ( 4 * sizeof(*TargetCell.coordinates_x) );
-  TargetCell.coordinates_y = malloc ( 4 * sizeof(*TargetCell.coordinates_y) );
+  TargetCell.coordinates_x = (double*) malloc( 4 * sizeof(double));
+  TargetCell.coordinates_y = (double*) malloc( 4 * sizeof(double));
 
   unsigned const * curr_deps;
   //struct polygons polygons;
@@ -838,10 +773,10 @@ void *YAR(void *argument)
   streamDefVlist(streamID2, vlistID2);
 
   gridsize = vlistGridsizeMax(vlistID1);
-  array1   = malloc(gridsize*sizeof(double));
+  array1   = (double*) malloc(gridsize*sizeof(double));
 
   gridsize = gridInqSize(gridID2);
-  array2   = malloc(gridsize*sizeof(double));
+  array2   = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
diff --git a/src/Ydayarith.c b/src/Ydayarith.c
index cc5ccbf..9bce4e4 100644
--- a/src/Ydayarith.c
+++ b/src/Ydayarith.c
@@ -72,8 +72,8 @@ void *Ydayarith(void *argument)
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   taxisID1 = vlistInqTaxis(vlistID1);
   taxisID2 = vlistInqTaxis(vlistID2);
@@ -99,15 +99,15 @@ void *Ydayarith(void *argument)
 
       if ( vardata2[day] != NULL ) cdoAbort("Day %d already allocatd!", day);
 
-      vardata2[day]  = malloc(nvars*sizeof(double *));
-      varnmiss2[day] = malloc(nvars*sizeof(int *));
+      vardata2[day]  = (double **) malloc(nvars*sizeof(double *));
+      varnmiss2[day] = (int **) malloc(nvars*sizeof(int *));
 
       for ( varID = 0; varID < nvars; varID++ )
 	{
 	  gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID));
 	  nlev     = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID));
-	  vardata2[day][varID]  = malloc(nlev*gridsize*sizeof(double));
-	  varnmiss2[day][varID] = malloc(nlev*sizeof(int));
+	  vardata2[day][varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
+	  varnmiss2[day][varID] = (int*) malloc(nlev*sizeof(int));
 	}
 
       for ( recID = 0; recID < nrecs; recID++ )
diff --git a/src/Ydaypctl.c b/src/Ydaypctl.c
index 881a824..595382f 100644
--- a/src/Ydaypctl.c
+++ b/src/Ydaypctl.c
@@ -100,12 +100,12 @@ void *Ydaypctl(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID2, tsID)) )
diff --git a/src/Ydaystat.c b/src/Ydaystat.c
index 8d01652..83ccc63 100644
--- a/src/Ydaystat.c
+++ b/src/Ydaystat.c
@@ -109,12 +109,12 @@ void *Ydaystat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   otsID = 0;
@@ -166,7 +166,7 @@ void *Ydaystat(void *argument)
 	      if ( nmiss > 0 || samp1[dayoy][varID][levelID].ptr )
 		{
 		  if ( samp1[dayoy][varID][levelID].ptr == NULL )
-		    samp1[dayoy][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		    samp1[dayoy][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		  for ( i = 0; i < gridsize; i++ )
 		    if ( DBL_IS_EQUAL(vars1[dayoy][varID][levelID].ptr[i],
@@ -186,7 +186,7 @@ void *Ydaystat(void *argument)
 		{
 		  if ( samp1[dayoy][varID][levelID].ptr == NULL )
 		    {
-		      samp1[dayoy][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		      samp1[dayoy][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 		      for ( i = 0; i < gridsize; i++ )
 			samp1[dayoy][varID][levelID].ptr[i] = nsets[dayoy];
 		    }
diff --git a/src/Ydrunpctl.c b/src/Ydrunpctl.c
index 455ad5d..0bba504 100644
--- a/src/Ydrunpctl.c
+++ b/src/Ydrunpctl.c
@@ -109,16 +109,16 @@ void *Ydrunpctl(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
-  datetime = malloc((ndates+1)*sizeof(datetime_t));
+  datetime = (datetime_t*) malloc((ndates+1)*sizeof(datetime_t));
   
-  vars1 = malloc((ndates+1)*sizeof(field_t **));
+  vars1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
   
   for ( its = 0; its < ndates; its++ )
     {
diff --git a/src/Ydrunstat.c b/src/Ydrunstat.c
index 7e59f99..166b04a 100644
--- a/src/Ydrunstat.c
+++ b/src/Ydrunstat.c
@@ -128,15 +128,15 @@ void *Ydrunstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
-  datetime = malloc((ndates+1)*sizeof(datetime_t));
+  datetime = (datetime_t*) malloc((ndates+1)*sizeof(datetime_t));
   
   stats = ydstatCreate(vlistID1);
-  vars1 = malloc((ndates+1)*sizeof(field_t **));
+  vars1 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
   if ( lvarstd )
-    vars2 = malloc((ndates+1)*sizeof(field_t **));
+    vars2 = (field_t ***) malloc((ndates+1)*sizeof(field_t **));
   
   for ( its = 0; its < ndates; its++ )
     {
@@ -298,7 +298,7 @@ YDAY_STATS *ydstatCreate(int vlistID)
 {
   int dayoy;
   
-  YDAY_STATS *stats = malloc(sizeof(YDAY_STATS));
+  YDAY_STATS *stats = (YDAY_STATS*) malloc(sizeof(YDAY_STATS));
   
   for ( dayoy = 0; dayoy < NDAY; dayoy++ )
     {
diff --git a/src/Yearmonstat.c b/src/Yearmonstat.c
index e8e0593..870d4be 100644
--- a/src/Yearmonstat.c
+++ b/src/Yearmonstat.c
@@ -86,13 +86,13 @@ void *Yearmonstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
 
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   vars1 = field_malloc(vlistID1, FIELD_PTR);
   samp1 = field_malloc(vlistID1, FIELD_NONE);
@@ -149,7 +149,7 @@ void *Yearmonstat(void *argument)
 		  if ( nmiss > 0 || samp1[varID][levelID].ptr )
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
-			samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
+			samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		      for ( i = 0; i < gridsize; i++ )
 			if ( DBL_IS_EQUAL(vars1[varID][levelID].ptr[i], vars1[varID][levelID].missval) )
@@ -170,7 +170,7 @@ void *Yearmonstat(void *argument)
 		    {
 		      if ( samp1[varID][levelID].ptr == NULL )
 			{
-			  samp1[varID][levelID].ptr = malloc(gridsize*sizeof(double));
+			  samp1[varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 			  for ( i = 0; i < gridsize; i++ )
 			    samp1[varID][levelID].ptr[i] = dsets;
 			}
diff --git a/src/Yhourarith.c b/src/Yhourarith.c
index 8f5c963..2ac4ce5 100644
--- a/src/Yhourarith.c
+++ b/src/Yhourarith.c
@@ -99,8 +99,8 @@ void *Yhourarith(void *argument)
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   taxisID1 = vlistInqTaxis(vlistID1);
   taxisID2 = vlistInqTaxis(vlistID2);
@@ -124,15 +124,15 @@ void *Yhourarith(void *argument)
       houroy = hour_of_year(vdate, vtime);
       if ( vardata2[houroy] != NULL ) cdoAbort("Hour of year %d already allocatd!", houroy);
 
-      vardata2[houroy]  = malloc(nvars*sizeof(double *));
-      varnmiss2[houroy] = malloc(nvars*sizeof(int *));
+      vardata2[houroy]  = (double **) malloc(nvars*sizeof(double *));
+      varnmiss2[houroy] = (int **) malloc(nvars*sizeof(int *));
 
       for ( varID = 0; varID < nvars; varID++ )
 	{
 	  gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID));
 	  nlev     = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID));
-	  vardata2[houroy][varID]  = malloc(nlev*gridsize*sizeof(double));
-	  varnmiss2[houroy][varID] = malloc(nlev*sizeof(int));
+	  vardata2[houroy][varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
+	  varnmiss2[houroy][varID] = (int*) malloc(nlev*sizeof(int));
 	}
 
       for ( recID = 0; recID < nrecs; recID++ )
diff --git a/src/Yhourstat.c b/src/Yhourstat.c
index 47df90d..b1ac1a4 100644
--- a/src/Yhourstat.c
+++ b/src/Yhourstat.c
@@ -134,12 +134,12 @@ void *Yhourstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   otsID = 0;
@@ -183,7 +183,7 @@ void *Yhourstat(void *argument)
 	      if ( nmiss > 0 || samp1[houroy][varID][levelID].ptr )
 		{
 		  if ( samp1[houroy][varID][levelID].ptr == NULL )
-		    samp1[houroy][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		    samp1[houroy][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		  for ( i = 0; i < gridsize; i++ )
 		    if ( DBL_IS_EQUAL(vars1[houroy][varID][levelID].ptr[i],
@@ -203,7 +203,7 @@ void *Yhourstat(void *argument)
 		{
 		  if ( samp1[houroy][varID][levelID].ptr == NULL )
 		    {
-		      samp1[houroy][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		      samp1[houroy][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 		      for ( i = 0; i < gridsize; i++ )
 			samp1[houroy][varID][levelID].ptr[i] = nsets[houroy];
 		    }
diff --git a/src/Ymonarith.c b/src/Ymonarith.c
index 17defa5..ded19c3 100644
--- a/src/Ymonarith.c
+++ b/src/Ymonarith.c
@@ -72,8 +72,8 @@ void *Ymonarith(void *argument)
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   taxisID1 = vlistInqTaxis(vlistID1);
   taxisID2 = vlistInqTaxis(vlistID2);
@@ -98,15 +98,15 @@ void *Ymonarith(void *argument)
 
       if ( vardata2[mon] != NULL ) cdoAbort("Month %d already allocatd!", mon);
 
-      vardata2[mon]  = malloc(nvars*sizeof(double *));
-      varnmiss2[mon] = malloc(nvars*sizeof(int *));
+      vardata2[mon]  = (double **) malloc(nvars*sizeof(double *));
+      varnmiss2[mon] = (int **) malloc(nvars*sizeof(int *));
 
       for ( varID = 0; varID < nvars; varID++ )
 	{
 	  gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID));
 	  nlev     = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID));
-	  vardata2[mon][varID]  = malloc(nlev*gridsize*sizeof(double));
-	  varnmiss2[mon][varID] = malloc(nlev*sizeof(int));
+	  vardata2[mon][varID]  = (double*) malloc(nlev*gridsize*sizeof(double));
+	  varnmiss2[mon][varID] = (int*) malloc(nlev*sizeof(int));
 	}
 
       for ( recID = 0; recID < nrecs; recID++ )
diff --git a/src/Ymonpctl.c b/src/Ymonpctl.c
index fb857de..af5b304 100644
--- a/src/Ymonpctl.c
+++ b/src/Ymonpctl.c
@@ -98,12 +98,12 @@ void *Ymonpctl(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID2, tsID)) )
diff --git a/src/Ymonstat.c b/src/Ymonstat.c
index bce334d..b701456 100644
--- a/src/Ymonstat.c
+++ b/src/Ymonstat.c
@@ -126,12 +126,12 @@ void *Ymonstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   otsID = 0;
@@ -179,7 +179,7 @@ void *Ymonstat(void *argument)
 	      if ( nmiss > 0 || samp1[month][varID][levelID].ptr )
 		{
 		  if ( samp1[month][varID][levelID].ptr == NULL )
-		    samp1[month][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		    samp1[month][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		  for ( i = 0; i < gridsize; i++ )
 		    if ( DBL_IS_EQUAL(vars1[month][varID][levelID].ptr[i],
@@ -199,7 +199,7 @@ void *Ymonstat(void *argument)
 		{
 		  if ( samp1[month][varID][levelID].ptr == NULL )
 		    {
-		      samp1[month][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		      samp1[month][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 		      for ( i = 0; i < gridsize; i++ )
 			samp1[month][varID][levelID].ptr[i] = nsets[month];
 		    }
@@ -235,6 +235,13 @@ void *Ymonstat(void *argument)
       tsID++;
     }
 
+  if ( nmon == 12 )
+    {
+      int smon = 0;
+      for ( month = 1; month <= 12; month++ ) if ( nsets[month] ) smon++;
+      if ( smon == 12 ) for ( month = 1; month <= 12; month++ ) mon[month-1] = month;
+    }
+
   /* sort output time steps */
   /*
   nmon = 0;
diff --git a/src/Yseaspctl.c b/src/Yseaspctl.c
index bf0c69a..2aa2c8f 100644
--- a/src/Yseaspctl.c
+++ b/src/Yseaspctl.c
@@ -101,12 +101,12 @@ void *Yseaspctl(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   while ( (nrecs = streamInqTimestep(streamID2, tsID)) )
diff --git a/src/Yseasstat.c b/src/Yseasstat.c
index 24f5de7..c9b4a15 100644
--- a/src/Yseasstat.c
+++ b/src/Yseasstat.c
@@ -125,12 +125,12 @@ void *Yseasstat(void *argument)
   nvars    = vlistNvars(vlistID1);
   nrecords = vlistNrecs(vlistID1);
 
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = vlistGridsizeMax(vlistID1);
   field_init(&field);
-  field.ptr = malloc(gridsize*sizeof(double));
+  field.ptr = (double*) malloc(gridsize*sizeof(double));
 
   tsID = 0;
   otsID = 0;
@@ -190,7 +190,7 @@ void *Yseasstat(void *argument)
 	      if ( nmiss > 0 || samp1[seas][varID][levelID].ptr )
 		{
 		  if ( samp1[seas][varID][levelID].ptr == NULL )
-		    samp1[seas][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		    samp1[seas][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 
 		  for ( i = 0; i < gridsize; i++ )
 		    if ( DBL_IS_EQUAL(vars1[seas][varID][levelID].ptr[i],
@@ -210,7 +210,7 @@ void *Yseasstat(void *argument)
 		{
 		  if ( samp1[seas][varID][levelID].ptr == NULL )
 		    {
-		      samp1[seas][varID][levelID].ptr = malloc(gridsize*sizeof(double));
+		      samp1[seas][varID][levelID].ptr = (double*) malloc(gridsize*sizeof(double));
 		      for ( i = 0; i < gridsize; i++ )
 			samp1[seas][varID][levelID].ptr[i] = nsets[seas];
 		    }
diff --git a/src/Zonstat.c b/src/Zonstat.c
index 213535e..8d0c021 100644
--- a/src/Zonstat.c
+++ b/src/Zonstat.c
@@ -115,18 +115,26 @@ void *Zonstat(void *argument)
     }
   if ( ndiffgrids > 0 ) cdoAbort("Too many different grids!");
 
-  if ( gridInqType(gridID1) == GRID_LONLAT   ||
-       gridInqType(gridID1) == GRID_GAUSSIAN ||
-       gridInqType(gridID1) == GRID_GENERIC )
+  if ( gridID1 != -1 )
     {
-      if ( zongridID != -1 && gridInqYsize(zongridID) == gridInqYsize(gridID1) )
-	gridID2 = zongridID;
+      if ( gridInqType(gridID1) == GRID_LONLAT   ||
+	   gridInqType(gridID1) == GRID_GAUSSIAN ||
+	   gridInqType(gridID1) == GRID_GENERIC )
+	{
+	  if ( zongridID != -1 && gridInqYsize(zongridID) == gridInqYsize(gridID1) )
+	    gridID2 = zongridID;
+	  else
+	    gridID2 = gridToZonal(gridID1);
+	}
       else
-	gridID2 = gridToZonal(gridID1);
+	{
+	  cdoAbort("Unsupported gridtype: %s", gridNamePtr(gridInqType(gridID1)));
+	}
     }
   else
     {
-      cdoAbort("Unsupported gridtype: %s", gridNamePtr(gridInqType(gridID1)));
+      gridID2 = zongridID;
+      cdoWarning("Input stream contains only zonal data!");
     }
 
   for ( index = 0; index < ngrids; index++ )
@@ -142,8 +150,8 @@ void *Zonstat(void *argument)
   lim = vlistGridsizeMax(vlistID1);
   field_init(&field2);
   field_init(&field2);
-  field1.ptr  = malloc(lim*sizeof(double));
-  field2.ptr  = malloc(nlatmax*sizeof(double));
+  field1.ptr  = (double*) malloc(lim*sizeof(double));
+  field2.ptr  = (double*) malloc(nlatmax*sizeof(double));
   field2.grid = gridID2;
 
   tsID = 0;
diff --git a/src/cdo.c b/src/cdo.c
index 2dadaf7..4f09885 100644
--- a/src/cdo.c
+++ b/src/cdo.c
@@ -19,12 +19,17 @@
 #  include "config.h"
 #endif
 
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 /* gethostname */
+#endif
+
 #include <limits.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
 /*#include <malloc.h>*/ /* mallopt and malloc_stats */
+#include <sys/stat.h>
 #if defined(HAVE_GETRLIMIT)
 #if defined(HAVE_SYS_RESOURCE_H)
 #include <sys/time.h>       /* getrlimit */
@@ -44,6 +49,10 @@
 #include "cdo.h"
 #include "cdo_int.h"
 
+#include "cdo_getopt.h"
+extern int   CDO_optind;
+extern char *CDO_optarg;
+
 
 #if defined(HAVE_LIBPTHREAD)
 #include "pstream_int.h"
@@ -64,12 +73,15 @@
 
 char CDO_Version[] = "Climate Data Operators version "VERSION" (http://code.zmaw.de/projects/cdo)";
 
-
 char *Progname;
 
 int ompNumThreads = 1;
 
-char *cdoGridSearchDir   = NULL;
+int stdin_is_tty  = 0;
+int stdout_is_tty = 0;
+int stderr_is_tty = 0;
+
+char* cdoGridSearchDir   = NULL;
 int cdoDefaultFileType   = CDI_UNDEFID;
 int cdoDefaultDataType   = CDI_UNDEFID;
 int cdoDefaultTimeType   = CDI_UNDEFID;
@@ -79,8 +91,11 @@ int cdoDefaultTableID    = CDI_UNDEFID;
 int cdoLockIO            = FALSE;
 int cdoCheckDatarange    = FALSE;
 
+int CDO_Color            = FALSE;
+int CDO_Use_FFTW         = TRUE;
 int cdoDiag              = FALSE;
-int cdoDisableHistory    = FALSE;
+int CDO_Append_History   = TRUE;
+int CDO_Reset_History    = FALSE;
 int cdoCompType          = COMPRESS_NONE;  // compression type
 int cdoCompLevel         = 0;              // compression level
 int cdoChunkType         = CDI_UNDEFID;
@@ -96,11 +111,13 @@ int cdoInteractive       = FALSE;
 int cdoParIO             = FALSE;
 int cdoRegulargrid       = FALSE;
 
+int CDO_netcdf_hdr_pad   = 0;
+
 #define MAX_NUM_VARNAMES 256
 int cdoNumVarnames       = 0;
 char **cdoVarnames       = NULL;
 
-char cdo_file_suffix[32];
+char CDO_File_Suffix[32];
 
 
 static int Debug = 0;
@@ -142,16 +159,16 @@ int timer_total, timer_read, timer_write;
 void printFeatures(void);
 void printLibraries(void);
 
+
 static
 void cdo_version(void)
 {
-  int   filetypes[] = {FILETYPE_SRV, FILETYPE_EXT, FILETYPE_IEG, FILETYPE_GRB, FILETYPE_GRB2, FILETYPE_NC, FILETYPE_NC2, FILETYPE_NC4, FILETYPE_NC4C};
-  char *typenames[] = {        "srv",        "ext",        "ieg",        "grb",        "grb2",        "nc",        "nc2",        "nc4",        "nc4c"};
+  const int   filetypes[] = {FILETYPE_SRV, FILETYPE_EXT, FILETYPE_IEG, FILETYPE_GRB, FILETYPE_GRB2, FILETYPE_NC, FILETYPE_NC2, FILETYPE_NC4, FILETYPE_NC4C};
+  const char* typenames[] = {        "srv",        "ext",        "ieg",        "grb",        "grb2",        "nc",        "nc2",        "nc4",        "nc4c"};
 
   fprintf(stderr, "%s\n", CDO_Version);
 #if defined(USER_NAME) && defined(HOST_NAME) && defined(SYSTEM_TYPE)
-  fprintf(stderr, "Compiled: by %s on %s (%s) %s %s\n",
-	  USER_NAME, HOST_NAME, SYSTEM_TYPE, __DATE__, __TIME__);
+  fprintf(stderr, "Compiled: by %s on %s (%s) %s %s\n", USER_NAME, HOST_NAME, SYSTEM_TYPE, __DATE__, __TIME__);
 #endif
 #if defined(COMPILER)
   fprintf(stderr, "Compiler: %s\n", COMPILER);
@@ -164,8 +181,10 @@ void cdo_version(void)
   printLibraries();
 
   fprintf(stderr, "Filetypes: ");
+  set_text_color(stderr, BRIGHT, GREEN);
   for ( size_t i = 0; i < sizeof(filetypes)/sizeof(int); ++i )
     if ( cdiHaveFiletype(filetypes[i]) ) fprintf(stderr, "%s ", typenames[i]);
+  reset_text_color(stderr);
   fprintf(stderr, "\n");
 
   cdiPrintVersion();
@@ -173,7 +192,7 @@ void cdo_version(void)
 }
 
 static
-void usage(void)
+void cdo_usage(void)
 {
   int id = 0;
   char *name;
@@ -183,14 +202,19 @@ void usage(void)
   fprintf(stderr, "usage : cdo  [Options]  Operator1  [-Operator2  [-OperatorN]]\n");
   fprintf(stderr, "\n");
   fprintf(stderr, "  Options:\n");
+  set_text_color(stderr, RESET, BLUE);
   fprintf(stderr, "    -a             Generate an absolute time axis\n");
   fprintf(stderr, "    -b <nbits>     Set the number of bits for the output precision\n");
   fprintf(stderr, "                   (I8/I16/I32/F32/F64 for nc/nc2/nc4/nc4c; F32/F64 for grb2/srv/ext/ieg; P1 - P24 for grb/grb2)\n");
   fprintf(stderr, "                   Add L or B to set the byteorder to Little or Big endian\n");
-  fprintf(stderr, "    -f <format>    Format of the output file. (grb/grb2/nc/nc2/nc4/nc4c/srv/ext/ieg)\n");
+  fprintf(stderr, "    -f, --format <format>\n");
+  fprintf(stderr, "                   Format of the output file. (grb/grb2/nc/nc2/nc4/nc4c/srv/ext/ieg)\n");
   fprintf(stderr, "    -g <grid>      Set default grid name or file. Available grids: \n");
   fprintf(stderr, "                   n<N>, t<RES>, tl<RES>, global_<DXY>, r<NX>x<NY>, g<NX>x<NY>, gme<NI>, lon=<LON>/lat=<LAT>\n");
-  fprintf(stderr, "    -h             Help information for the operators\n");
+  fprintf(stderr, "    -h, --help     Help information for the operators\n");
+  fprintf(stderr, "    --history      Do not append to netCDF \"history\" global attribute\n");
+  fprintf(stderr, "    --netcdf_hdr_pad, --hdr_pad, --header_pad <nbr>\n");
+  fprintf(stderr, "                   Pad netCDF output header with nbr bytes\n");
   /*
   fprintf(stderr, "    -i <inst>      Institution name/file\n");
   fprintf(stderr, "                   Predefined instituts: ");
@@ -209,11 +233,11 @@ void usage(void)
   fprintf(stderr, "    -P <nthreads>  Set number of OpenMP threads\n");
 #endif
   fprintf(stderr, "    -Q             Alphanumeric sorting of netCDF parameter names\n");
-  fprintf(stderr, "    -R             Convert GRIB1 data from reduced to regular grid (only with cgribex)\n");
+  fprintf(stderr, "    -R, --regular  Convert GRIB1 data from reduced to regular grid (only with cgribex)\n");
   fprintf(stderr, "    -r             Generate a relative time axis\n");
   fprintf(stderr, "    -S             Create an extra output stream for the module TIMSTAT. This stream\n");
   fprintf(stderr, "                   contains the number of non missing values for each output period.\n");
-  fprintf(stderr, "    -s             Silent mode\n");
+  fprintf(stderr, "    -s, --silent   Silent mode\n");
   fprintf(stderr, "    -t <partab>    Set default parameter table name or file\n");
   fprintf(stderr, "                   Predefined tables: ");
   for ( id = 0; id < tableInqNumber(); id++ )
@@ -221,16 +245,19 @@ void usage(void)
       fprintf(stderr, " %s", name);
   fprintf(stderr, "\n");
 
-  fprintf(stderr, "    -V             Print the version number\n");
-  fprintf(stderr, "    -v             Print extra details for some operators\n");
+  fprintf(stderr, "    -V, --version  Print the version number\n");
+  fprintf(stderr, "    -v, --verbose  Print extra details for some operators\n");
   fprintf(stderr, "    -W             Print extra warning messages\n");
   fprintf(stderr, "    -z szip        SZIP compression of GRIB1 records\n");
   fprintf(stderr, "       jpeg        JPEG compression of GRIB2 records\n");
   fprintf(stderr, "        zip[_1-9]  Deflate compression of netCDF4 variables\n");
+  reset_text_color(stderr);
   fprintf(stderr, "\n");
 
   fprintf(stderr, "  Operators:\n");
+  set_text_color(stderr, RESET, GREEN);
   operatorPrintAll();
+  reset_text_color(stderr);
 
   fprintf(stderr, "\n");
   fprintf(stderr, "  CDO version %s, Copyright (C) 2003-2014 Uwe Schulzweida\n", VERSION);
@@ -240,6 +267,18 @@ void usage(void)
 }
 
 static
+void cdo_init_is_tty(void)
+{
+  struct stat statbuf;
+  fstat(0, &statbuf);
+  if ( S_ISCHR(statbuf.st_mode) ) stdin_is_tty = 1;  
+  fstat(1, &statbuf);
+  if ( S_ISCHR(statbuf.st_mode) ) stdout_is_tty = 1;  
+  fstat(2, &statbuf);
+  if ( S_ISCHR(statbuf.st_mode) ) stderr_is_tty = 1;  
+}
+
+static
 void cdoPrintHelp(char *phelp[]/*, char *xoperator*/)
 {
   if ( phelp == NULL )
@@ -254,7 +293,31 @@ void cdoPrintHelp(char *phelp[]/*, char *xoperator*/)
 	    if ( *(phelp+1) )
 	      if ( *(phelp+1)[0] == ' ' ) lprint = FALSE;
 	  
-	  if ( lprint ) fprintf(stdout, "%s\n", *phelp);
+	  if ( lprint )
+	    {
+	      if ( COLOR_STDOUT )
+		{
+		  if ( (strcmp(*phelp, "NAME")        == 0) ||
+		       (strcmp(*phelp, "SYNOPSIS")    == 0) ||
+		       (strcmp(*phelp, "DESCRIPTION") == 0) ||
+		       (strcmp(*phelp, "OPERATORS")   == 0) ||
+		       (strcmp(*phelp, "ENVIRONMENT") == 0) ||
+		       (strcmp(*phelp, "PARAMETER")   == 0) ||
+		       (strcmp(*phelp, "EXAMPLES")    == 0) )
+		    {
+		      set_text_color(stdout, BRIGHT, BLACK);
+		      fprintf(stdout, "%s", *phelp);
+		      reset_text_color(stdout);
+		      fprintf(stdout, "\n");
+		    }
+		  else
+		    fprintf(stdout, "%s\n", *phelp);
+		}
+	      else
+		{
+		  fprintf(stdout, "%s\n", *phelp);
+		}
+	    }
 
 	  phelp++;
 	}
@@ -264,11 +327,11 @@ void cdoPrintHelp(char *phelp[]/*, char *xoperator*/)
 
 void cdoGenFileSuffix(char *filesuffix, size_t maxlen, int filetype, int vlistID, const char *refname)
 {
-  if ( strncmp(cdo_file_suffix, "NULL", 4) != 0 )
+  if ( strncmp(CDO_File_Suffix, "NULL", 4) != 0 )
     {
-      if ( cdo_file_suffix[0] != 0 )
+      if ( CDO_File_Suffix[0] != 0 )
 	{
-	  strncat(filesuffix, cdo_file_suffix, maxlen-1);
+	  strncat(filesuffix, CDO_File_Suffix, maxlen-1);
 	}
       else
 	{
@@ -347,57 +410,6 @@ void cdoSetDebug(int level)
 #endif
 }
 
-static int cdoOptind = 1;
-static char *cdoOptarg;
-
-static
-int cdoGetopt(int argc, char * const argv[], const char *optstring)
-{
-  static int optpos = 0;
-  int optval = -1, value;
-  int opthasarg = 0;
-  int optstrlen = strlen(optstring);
-  int iargc;
-
-  cdoOptarg = NULL;
-
-  while ( optpos < optstrlen && cdoOptind < argc )
-    {
-      value = optstring[optpos];
-      optpos++;
-      if ( optstring[optpos] == ':' )
-	{
-	  opthasarg = 1;
-	  optpos++;
-	}
-      else
-	opthasarg = 0;
-
-      for ( iargc = 1; iargc < argc; iargc++ )
-	{
-	  if ( *argv[iargc] == '-' && strlen(argv[iargc]) == 2 )
-	    {
-	      if ( (argv[iargc][1]) == value )
-		{
-		  optval = value;
-		  cdoOptind++;
-		  if ( opthasarg )
-		    {
-		      cdoOptarg = argv[iargc+1];
-		      cdoOptind++;
-		    }
-		  break;
-		}
-	    }
-	}
-      if ( iargc < argc ) break;
-    }
-
-  if ( opthasarg && cdoOptarg == NULL ) optval = ':';
-
-  return (optval);
-}
-
 #undef  IsBigendian
 #define IsBigendian()  ( u_byteorder.c[sizeof(long) - 1] )
 
@@ -642,7 +654,7 @@ int getMemAlignment(void)
 
   for ( i = 0; i < NTESTS; ++i )
     {
-      ptr[i] = malloc(tsize[i]);
+      ptr[i] = (double*) malloc(tsize[i]);
       iptr = (int64_t) ptr[i];
       for ( k = 0; k < 4; ++k ) if ( iptr%ma_check[k] ) ma_result[k] = 0; 
     }
@@ -650,7 +662,7 @@ int getMemAlignment(void)
 
   for ( i = NTESTS-1; i >= 0; i-- )
     {
-      ptr[i] = malloc(tsize[i]+5);
+      ptr[i] = (double*)malloc(tsize[i]+5);
       iptr = (int64_t) ptr[i];
       for ( k = 0; k < 4; ++k ) if ( iptr%ma_check[k] ) ma_result[k] = 0; 
     }
@@ -737,7 +749,7 @@ void defineVarnames(const char *arg)
     {
       char *commapos;
       
-      cdoVarnames = malloc(MAX_NUM_VARNAMES*sizeof(char *));
+      cdoVarnames = (char **) malloc(MAX_NUM_VARNAMES*sizeof(char *));
 
       pbuf = strdup(arg+istart);
       cdoVarnames[cdoNumVarnames++] = pbuf;    
@@ -773,7 +785,7 @@ void get_env_vars(void)
       if ( len > 0 )
 	{
 	  len += 2;
-	  cdoGridSearchDir = malloc(len);
+	  cdoGridSearchDir = (char*) malloc(len);
 	  memcpy(cdoGridSearchDir, envstr, len-1);
 	  if ( cdoGridSearchDir[len-3] != '/' )
 	    {
@@ -799,20 +811,31 @@ void get_env_vars(void)
     {
       if ( atoi(envstr) == 1 )
 	{
-	  cdoDisableHistory = TRUE;
+	  CDO_Reset_History = TRUE;
 	  if ( cdoVerbose )
 	    fprintf(stderr, "CDO_DISABLE_HISTORY = %s\n", envstr);
 	}
     }
 
-  cdo_file_suffix[0] = 0;
+  envstr = getenv("CDO_RESET_HISTORY");
+  if ( envstr )
+    {
+      if ( atoi(envstr) == 1 )
+	{
+	  CDO_Reset_History = TRUE;
+	  if ( cdoVerbose )
+	    fprintf(stderr, "CDO_RESET_HISTORY = %s\n", envstr);
+	}
+    }
+
+  CDO_File_Suffix[0] = 0;
 
   envstr = getenv("CDO_FILE_SUFFIX");
   if ( envstr )
     {
       if ( envstr[0] )
 	{
-	  strncat(cdo_file_suffix, envstr, sizeof(cdo_file_suffix)-1);
+	  strncat(CDO_File_Suffix, envstr, sizeof(CDO_File_Suffix)-1);
 	  if ( cdoVerbose )
 	    fprintf(stderr, "CDO_FILE_SUFFIX = %s\n", envstr);
 	}
@@ -823,7 +846,7 @@ void get_env_vars(void)
     {
       if ( atoi(envstr) == 1 )
 	{
-	  strcat(cdo_file_suffix, "NULL");
+	  strcat(CDO_File_Suffix, "NULL");
 	  if ( cdoVerbose )
 	    fprintf(stderr, "CDO_DISABLE_FILESUFFIX = %s\n", envstr);
 	}
@@ -839,6 +862,44 @@ void get_env_vars(void)
 	    fprintf(stderr, "CDO_DIAG = %s\n", envstr);
 	}
     }
+
+  envstr = getenv("CDO_USE_FFTW");
+  if ( envstr )
+    {
+      int ival = atoi(envstr);
+      if ( ival == 0 || ival == 1 )
+	{
+	  CDO_Use_FFTW = ival;
+	  if ( cdoVerbose )
+	    fprintf(stderr, "CDO_Use_FFTW = %s\n", envstr);
+	}
+    }
+
+  envstr = getenv("CDO_COLOR");
+  if ( envstr )
+    {
+      int ival = atoi(envstr);
+      if ( ival == 0 || ival == 1 )
+	{
+	  CDO_Color = ival;
+	  if ( cdoVerbose )
+	    fprintf(stderr, "CDO_COLOR = %s\n", envstr);
+	}
+    }
+  else
+    {
+      if ( CDO_Color == FALSE )
+	{
+	  char *username;
+	  username = getenv("LOGNAME");
+	  if ( username == NULL )
+	    {
+	      username = getenv("USER");
+	      if ( username == NULL ) username = "unknown";
+	    }
+	  if ( strcmp(username, "\x6d\x32\x31\x34\x30\x30\x33") == 0 ) CDO_Color = TRUE;
+	}
+    }
 }
 
 static
@@ -849,6 +910,9 @@ void print_system_info()
   if ( DebugLevel == 0 ) DebugLevel = 1;
   cdoSetDebug(DebugLevel);
   fprintf(stderr, "\n");
+  fprintf(stderr, "CDO_Color           = %d\n", CDO_Color);
+  fprintf(stderr, "CDO_Reset_History   = %d\n", CDO_Reset_History);
+  fprintf(stderr, "CDO_File_Suffix     = %s\n", CDO_File_Suffix);
   fprintf(stderr, "cdoDefaultFileType  = %d\n", cdoDefaultFileType);
   fprintf(stderr, "cdoDefaultDataType  = %d\n", cdoDefaultDataType);
   fprintf(stderr, "cdoDefaultByteorder = %d\n", cdoDefaultByteorder);
@@ -901,6 +965,8 @@ void print_system_info()
 #if defined(_OPENACC)
   fprintf(stderr, "OPENACC VERSION     = %d\n", _OPENACC);
 #endif
+  /* OPENMP 3:  201107 */
+  /* OPENMP 4:  201307 gcc 4.9 */
 #if defined(_OPENMP)
   fprintf(stderr, "OPENMP VERSION      = %d\n", _OPENMP);
 #endif
@@ -1007,23 +1073,130 @@ void check_stacksize()
 }
 
 static
-void parse_options(int argc, char *argv[])
+void cdo_set_options(void)
+{
+  if ( Debug )
+    {
+      fprintf(stderr, "CDO_netcdf_hdr_pad  = %d\n", CDO_netcdf_hdr_pad);
+      fprintf(stderr, "\n");
+    }
+  
+  if ( CDO_netcdf_hdr_pad > 0 ) cdiDefGlobal("NETCDF_HDR_PAD", CDO_netcdf_hdr_pad);
+}
+
+
+long str_to_int(char *intstring)
+{
+  long intval = -1;
+  long fact = 1;
+
+  if ( intstring )
+    {
+      int loop, len;
+
+      len = (int) strlen(intstring);
+      for ( loop = 0; loop < len; loop++ )
+	{
+	  if ( ! isdigit((int) intstring[loop]) )
+	    {
+	      switch ( tolower((int) intstring[loop]) )
+		{
+		case 'k':  fact = 1024;        break;
+		case 'm':  fact = 1048576;     break;
+		case 'g':  fact = 1073741824;  break;
+		default:   fact = 0;           break;
+		}
+	      break;
+	    }
+	}
+
+      if ( fact ) intval = fact*atol(intstring);
+    }
+
+  return (intval);
+}
+
+static
+int parse_options_long(int argc, char *argv[])
 {
   int c;
+  int lnetcdf_hdr_pad;
+  int luse_fftw;
+  int lremap_genweights;
 
-  while ( (c = cdoGetopt(argc, argv, "f:b:e:P:p:g:i:k:l:m:n:t:D:z:aBcdhLMOQRrsSTuVvWXZ")) != -1 )
+  struct cdo_option opt_long[] =
     {
+      { "netcdf_hdr_pad",    required_argument,    &lnetcdf_hdr_pad,  1 },
+      { "header_pad",        required_argument,    &lnetcdf_hdr_pad,  1 },
+      { "hdr_pad",           required_argument,    &lnetcdf_hdr_pad,  1 },
+      { "use_fftw",          required_argument,          &luse_fftw,  1 },
+      { "remap_genweights",  required_argument,  &lremap_genweights,  1 },
+      { "format",            required_argument,                NULL, 'f' },
+      { "help",                    no_argument,                NULL, 'h' },
+      { "history",                 no_argument,                NULL, 'H' },
+      { "regular",                 no_argument,                NULL, 'R' },
+      { "silent",                  no_argument,                NULL, 's' },
+      { "table",             required_argument,                NULL, 't' },
+      { "verbose",                 no_argument,                NULL, 'v' },
+      { "version",                 no_argument,                NULL, 'V' },
+      { NULL,                                0,                NULL,  0  }
+    };
+
+  extern int CDO_opterr;
+  CDO_opterr = 1;
+
+  while ( 1 )
+    {
+      lnetcdf_hdr_pad = 0;
+      luse_fftw = 0;
+      lremap_genweights = 0;
+
+      c = cdo_getopt_long(argc, argv, "f:b:e:P:p:g:i:k:l:m:n:t:D:z:aBCcdhHLMOQRrsSTuVvWXZ", opt_long, NULL);
+      if ( c == -1 ) break;
+
       switch (c)
 	{
+	case '?':
+	  //cdo_usage();
+	  //fprintf(stderr, "Illegal option!\n");
+	  return (-1);
+	  break;
+	case ':':
+	  //cdo_usage();
+	  //fprintf(stderr, "Option requires an argument!\n");
+	  return (-1);
+	  break;
+	case 0:
+	  if ( lnetcdf_hdr_pad )
+	    {
+	      int netcdf_hdr_pad = str_to_int(CDO_optarg);
+	      if ( netcdf_hdr_pad >= 0 ) CDO_netcdf_hdr_pad = netcdf_hdr_pad;
+	    }
+	  else if ( luse_fftw )
+	    {
+	      int use_fftw = str_to_int(CDO_optarg);
+	      if ( use_fftw != 0 && use_fftw != 1 )
+		cdoAbort("Unsupported value for option --use_fftw=%d [range: 0-1]", use_fftw);
+	      CDO_Use_FFTW = use_fftw;
+	    }
+	  else if ( lremap_genweights )
+	    {
+	      extern int remap_genweights;
+	      remap_genweights = str_to_int(CDO_optarg);
+	    }
+	  break;
 	case 'a':
 	  cdoDefaultTimeType = TAXIS_ABSOLUTE;
 	  break;
 	case 'b':
-	  setDefaultDataType(cdoOptarg);
+	  setDefaultDataType(CDO_optarg);
 	  break;
 	case 'B':
 	  cdoBenchmark = TRUE;
 	  break;
+	case 'C':
+	  CDO_Color = TRUE;
+	  break;
 	case 'c':
 	  cdoCheckDatarange = TRUE;
 	  break;
@@ -1032,14 +1205,14 @@ void parse_options(int argc, char *argv[])
 	  break;
 	case 'D':
 	  Debug = 1;
-	  DebugLevel = atoi(cdoOptarg);
+	  DebugLevel = atoi(CDO_optarg);
 	  break;
 	case 'e':
 	  {
 #if defined(HAVE_GETHOSTNAME)
 	  char host[1024];
 	  gethostname(host, sizeof(host));
-	  cdoExpName = cdoOptarg;
+	  cdoExpName = CDO_optarg;
 	  /* printf("host: %s %s\n", host, cdoExpName); */
 	  if ( strcmp(host, cdoExpName) == 0 )
 	    cdoExpMode = CDO_EXP_REMOTE;
@@ -1052,49 +1225,52 @@ void parse_options(int argc, char *argv[])
           break;
 	  }
 	case 'f':
-	  setDefaultFileType(cdoOptarg, 1);
+	  setDefaultFileType(CDO_optarg, 1);
 	  break;
 	case 'g':
-	  defineGrid(cdoOptarg);
+	  defineGrid(CDO_optarg);
 	  break;
 	case 'h':	
 	  Help = 1;
 	  break;
+	case 'H':	
+	  CDO_Append_History = FALSE;
+	  break;
 	case 'i':
-	  defineInstitution(cdoOptarg);
+	  defineInstitution(CDO_optarg);
 	  break;
 	case 'k':
-	  defineChunktype(cdoOptarg);
+	  defineChunktype(CDO_optarg);
 	  break;
 	case 'L':	
 	  cdoLockIO = TRUE;
 	  break;
 	case 'l':
-	  defineZaxis(cdoOptarg);
+	  defineZaxis(CDO_optarg);
 	  break;
 	case 'm':
-	  cdiDefMissval(atof(cdoOptarg));
+	  cdiDefMissval(atof(CDO_optarg));
 	  break;
 	case 'M':
 	  cdiDefGlobal("HAVE_MISSVAL", TRUE);
 	  break;
 	case 'n':
-	  defineVarnames(cdoOptarg);
+	  defineVarnames(CDO_optarg);
 	  break;
 	case 'O':
 	  cdoOverwriteMode = TRUE;
 	  break;
 	case 'P':
-	  if ( *cdoOptarg < '1' || *cdoOptarg > '9' )
+	  if ( *CDO_optarg < '1' || *CDO_optarg > '9' )
 	    {
-	      fprintf(stderr, "Unexpected character in number of OpenMP threads (-P <nthreads>): %s!\n", cdoOptarg);
+	      fprintf(stderr, "Unexpected character in number of OpenMP threads (-P <nthreads>): %s!\n", CDO_optarg);
 	      exit(EXIT_FAILURE);
 	    }
-	  numThreads = atoi(cdoOptarg);
+	  numThreads = atoi(CDO_optarg);
 	  break;
 	case 'p':
 	  fprintf(stderr, "CDO option -p is obsolete and will be removed in the next release, please switch to -b <bits>!\n");
-	  setDefaultDataTypeByte(cdoOptarg);
+	  setDefaultDataTypeByte(CDO_optarg);
 	  break;
 	case 'Q':
 	  cdiDefGlobal("SORTNAME", TRUE);
@@ -1116,7 +1292,7 @@ void parse_options(int argc, char *argv[])
 	  cdoTimer = TRUE;
 	  break;
 	case 't':
-	  cdoDefaultTableID = defineTable(cdoOptarg);
+	  cdoDefaultTableID = defineTable(CDO_optarg);
 	  break;
 	case 'u':
 	  cdoInteractive = TRUE;
@@ -1137,7 +1313,152 @@ void parse_options(int argc, char *argv[])
 	  cdoCompress = TRUE;
           break;
 	case 'z':
-	  defineCompress(cdoOptarg);
+	  defineCompress(CDO_optarg);
+          break;
+	}
+    }
+
+  return (0);
+}
+
+static
+int parse_options(int argc, char *argv[])
+{
+  int c;
+
+  while ( (c = cdo_getopt(argc, argv, "f:b:e:P:p:g:i:k:l:m:n:t:D:z:aBCcdhHLMOQRrsSTuVvWXZ")) != -1 )
+    {
+      switch (c)
+	{
+	case 'a':
+	  cdoDefaultTimeType = TAXIS_ABSOLUTE;
+	  break;
+	case 'b':
+	  setDefaultDataType(CDO_optarg);
+	  break;
+	case 'B':
+	  cdoBenchmark = TRUE;
+	  break;
+	case 'C':
+	  CDO_Color = TRUE;
+	  break;
+	case 'c':
+	  cdoCheckDatarange = TRUE;
+	  break;
+	case 'd':
+	  Debug = 1;
+	  break;
+	case 'D':
+	  Debug = 1;
+	  DebugLevel = atoi(CDO_optarg);
+	  break;
+	case 'e':
+	  {
+#if defined(HAVE_GETHOSTNAME)
+	  char host[1024];
+	  gethostname(host, sizeof(host));
+	  cdoExpName = CDO_optarg;
+	  /* printf("host: %s %s\n", host, cdoExpName); */
+	  if ( strcmp(host, cdoExpName) == 0 )
+	    cdoExpMode = CDO_EXP_REMOTE;
+	  else
+            cdoExpMode = CDO_EXP_LOCAL;
+#else
+          fprintf(stderr, "Function gethostname not available!\n");
+	  exit(EXIT_FAILURE);
+#endif
+          break;
+	  }
+	case 'f':
+	  setDefaultFileType(CDO_optarg, 1);
+	  break;
+	case 'g':
+	  defineGrid(CDO_optarg);
+	  break;
+	case 'h':	
+	  Help = 1;
+	  break;
+	case 'H':	
+	  CDO_Append_History = FALSE;
+	  break;
+	case 'i':
+	  defineInstitution(CDO_optarg);
+	  break;
+	case 'k':
+	  defineChunktype(CDO_optarg);
+	  break;
+	case 'L':	
+	  cdoLockIO = TRUE;
+	  break;
+	case 'l':
+	  defineZaxis(CDO_optarg);
+	  break;
+	case 'm':
+	  cdiDefMissval(atof(CDO_optarg));
+	  break;
+	case 'M':
+	  cdiDefGlobal("HAVE_MISSVAL", TRUE);
+	  break;
+	case 'n':
+	  defineVarnames(CDO_optarg);
+	  break;
+	case 'O':
+	  cdoOverwriteMode = TRUE;
+	  break;
+	case 'P':
+	  if ( *CDO_optarg < '1' || *CDO_optarg > '9' )
+	    {
+	      fprintf(stderr, "Unexpected character in number of OpenMP threads (-P <nthreads>): %s!\n", CDO_optarg);
+	      exit(EXIT_FAILURE);
+	    }
+	  numThreads = atoi(CDO_optarg);
+	  break;
+	case 'p':
+	  fprintf(stderr, "CDO option -p is obsolete and will be removed in the next release, please switch to -b <bits>!\n");
+	  setDefaultDataTypeByte(CDO_optarg);
+	  break;
+	case 'Q':
+	  cdiDefGlobal("SORTNAME", TRUE);
+	  break;
+	case 'R':
+	  cdoRegulargrid = TRUE;
+	  cdiDefGlobal("REGULARGRID", TRUE);
+	  break;
+	case 'r':
+	  cdoDefaultTimeType = TAXIS_RELATIVE;
+	  break;
+	case 'S':
+	  cdoDiag = TRUE;
+	  break;
+	case 's':
+	  cdoSilentMode = TRUE;
+	  break;
+	case 'T':
+	  cdoTimer = TRUE;
+	  break;
+	case 't':
+	  cdoDefaultTableID = defineTable(CDO_optarg);
+	  break;
+	case 'u':
+	  cdoInteractive = TRUE;
+	  break;
+	case 'V':
+	  Version = 1;
+	  break;
+	case 'v':
+	  cdoVerbose = TRUE;
+	  break;
+	case 'W': /* Warning messages */
+	  _Verbose = 1;
+	  break;
+	case 'X': /* multi threaded I/O */
+	  cdoParIO = TRUE;
+	  break;
+	case 'Z':
+	  cdoCompress = TRUE;
+          break;
+	case 'z':
+	  defineCompress(CDO_optarg);
           break;
 	case ':':
 	  fprintf(stderr, "\nmissing parameter for one of the options\n\n");	  
@@ -1145,6 +1466,8 @@ void parse_options(int argc, char *argv[])
 	  break;
 	}
     }
+
+  return (0);
 }
 
 
@@ -1158,11 +1481,11 @@ int main(int argc, char *argv[])
   extern int dmemory_ExitOnError;
   argument_t *argument = NULL;
 
-  init_is_tty();
+  cdo_init_is_tty();
 
   dmemory_ExitOnError = 1;
 
-  _Verbose = 0;
+  _Verbose = 1;
 
   /* mallopt(M_MMAP_MAX, 0); */
  
@@ -1174,10 +1497,17 @@ int main(int argc, char *argv[])
 
   if ( noff ) setDefaultFileType(Progname+noff, 0);
 
-  parse_options(argc, argv);
-
   get_env_vars();
 
+  if ( 1 )
+    status = parse_options_long(argc, argv);
+  else
+    status = parse_options(argc, argv);
+
+  if ( status != 0 ) return (-1);
+
+  cdo_set_options();
+
   if ( Debug || Version ) cdo_version();
 
   if ( Debug ) print_system_info();
@@ -1205,22 +1535,22 @@ int main(int argc, char *argv[])
 #endif
 
 
-  if ( cdoOptind < argc )
+  if ( CDO_optind < argc )
     {
-      operatorArg = argv[cdoOptind];
-      argument = argument_new(argc-cdoOptind, 0);
-      argument_fill(argument, argc-cdoOptind, &argv[cdoOptind]);
+      operatorArg = argv[CDO_optind];
+      argument = argument_new(argc-CDO_optind, 0);
+      argument_fill(argument, argc-CDO_optind, &argv[CDO_optind]);
     }
   else
     {
       if ( ! Version && ! Help )
 	{
 	  fprintf(stderr, "\nNo operator given!\n\n");
-	  usage();
+	  cdo_usage();
 	  status = 1;
 	}
 
-      if ( Help ) usage();
+      if ( Help ) cdo_usage();
       lstop = TRUE;
     }
 
diff --git a/src/cdo.h b/src/cdo.h
index 221ecbf..e45e053 100644
--- a/src/cdo.h
+++ b/src/cdo.h
@@ -22,6 +22,10 @@
 #include <stdbool.h>
 #include "dmemory.h"
 #include "util.h"
+#include "text.h"
+
+/* dummy use of unused parameters to silence compiler warnings */
+#define  UNUSED(x) (void)x
 
 #undef   TRUE
 #define  TRUE   1
@@ -32,16 +36,18 @@
 #define  MIN(a,b)  ((a) < (b) ? (a) : (b))
 #undef   MAX
 #define  MAX(a,b)  ((a) > (b) ? (a) : (b))
-#undef   NINT
-#define  NINT(x)   ((x) < 0 ? (int)((x)-0.5) : (int)((x)+0.5))
-#undef   NINTD
-#define  NINTD(x)   ((x) < 0 ? ((x)-0.5) : ((x)+0.5))
+
+#define  ADD_PLURAL(n)  ((n)>1 ? "s" : "")
 
 #define  UNCHANGED_RECORD  (processSelf() == 0 && cdoStreamName(0)->argv[0][0] != '-' && cdoRegulargrid == FALSE && cdoDefaultFileType == -1 && cdoDefaultDataType == -1 && cdoDefaultByteorder == -1 )
 
 
 extern int ompNumThreads;
 
+extern int stdin_is_tty;
+extern int stdout_is_tty;
+extern int stderr_is_tty;
+
 extern int cdoDefaultFileType;
 extern int cdoDefaultDataType;
 extern int cdoDefaultByteorder;
@@ -69,6 +75,8 @@ extern int cdoChunkType;
 
 extern int cdoExpMode;
 
+extern int CDO_Color;
+extern int CDO_Use_FFTW;
 extern int cdoDiag;
 
 extern int cdoNumVarnames;
diff --git a/src/cdo_getopt.c b/src/cdo_getopt.c
new file mode 100644
index 0000000..b7e8b04
--- /dev/null
+++ b/src/cdo_getopt.c
@@ -0,0 +1,248 @@
+/*
+  This file is part of CDO. CDO is a collection of Operators to
+  manipulate and analyse Climate model Data.
+
+  Copyright (C) 2003-2014 Uwe Schulzweida, Uwe.Schulzweida at zmaw.de
+  See COPYING file for copying and redistribution conditions.
+
+  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; version 2 of the License.
+
+  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.
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "cdo_getopt.h"
+
+char *CDO_optarg = NULL;
+int CDO_optind = 1;
+int CDO_optopt = 0;
+int CDO_opterr = 0;
+int CDO_optreset = 0;
+
+int cdo_getopt(int argc, char * const *argv, const char *optstring)
+{
+  static int optpos = 0;
+  int optval = -1, value;
+  int opthasarg = 0;
+  int optstrlen = strlen(optstring);
+  int iargc;
+
+  assert(argv != NULL);
+  assert(optstring != NULL);
+
+  CDO_optarg = NULL;
+
+  while ( optpos < optstrlen && CDO_optind < argc )
+    {
+      value = optstring[optpos];
+      optpos++;
+      if ( optstring[optpos] == ':' )
+	{
+	  opthasarg = 1;
+	  optpos++;
+	}
+      else
+	opthasarg = 0;
+
+      for ( iargc = 1; iargc < argc; iargc++ )
+	{
+	  if ( *argv[iargc] == '-' && argv[iargc][2] == 0 )
+	    {
+	      if ( (argv[iargc][1]) == value )
+		{
+		  optval = value;
+		  CDO_optind++;
+		  if ( opthasarg )
+		    {
+		      CDO_optarg = argv[iargc+1];
+		      CDO_optind++;
+		    }
+		  break;
+		}
+	    }
+	}
+
+      if ( iargc < argc ) break;
+    }
+
+  if ( opthasarg && CDO_optarg == NULL ) optval = ':';
+
+  return (optval);
+}
+
+/* http://www.opensource.apple.com/source/Kerberos/Kerberos-47/KerberosFramework/Kerberos5/Sources/util/windows/getopt_long.c */
+
+static
+char *__progname(char *nargv0)
+{
+  char * tmp;
+
+  assert(nargv0 != NULL);
+
+  tmp = strrchr(nargv0, '/');
+  if (tmp)
+    tmp++;
+  else
+    tmp = nargv0;
+  
+  return(tmp);
+}
+
+#define	BADCH	(int)'?'
+#define	BADARG	(int)':'
+#define	EMSG	""
+
+static
+int cdo_getopt_internal(int nargc, char * const *nargv, const char *ostr)
+{
+  static char *place = EMSG;		/* option letter processing */
+  char *oli;				/* option letter list index */
+
+  assert(nargv != NULL);
+  assert(ostr != NULL);
+
+  if ( CDO_optreset || !*place )
+    {		/* update scanning pointer */
+      CDO_optreset = 0;
+      if ( CDO_optind >= nargc || *(place = nargv[CDO_optind]) != '-' )
+	{
+	  place = EMSG;
+	  return (-1);
+	}
+      
+      if ( place[1] && *++place == '-' )
+	{	/* found "--" */
+	  /* ++CDO_optind; */
+	  place = EMSG;
+	  return (-2);
+	}
+
+      if ( place[1] ) return (-1);
+    } 
+
+  /* option letter okay? */
+  if ( (CDO_optopt = (int)*place++) == (int)':' || !(oli = strchr(ostr, CDO_optopt)) )
+    {
+      /* if the user didn't specify '-' as an option, assume it means -1. */
+      if ( CDO_optopt == (int)'-' ) return (-1);
+
+      if ( !*place ) ++CDO_optind;
+
+      if ( CDO_opterr && *ostr != ':' )
+	(void)fprintf(stderr, "%s: illegal option -- %c\n", __progname(nargv[0]), CDO_optopt);
+
+      return (BADCH);
+    }
+
+  if ( *++oli != ':' )
+    {		        	/* don't need argument */
+      CDO_optarg = NULL;
+      if (!*place)
+	++CDO_optind;
+    }
+  else
+    {				/* need an argument */
+      if ( *place )		/* no white space */
+	CDO_optarg = place;
+      else if (nargc <= ++CDO_optind)
+	{               	/* no arg */
+	  place = EMSG;
+	  if ( (CDO_opterr) && (*ostr != ':') )
+	    fprintf(stderr, "%s: option requires an argument -- %c\n", __progname(nargv[0]), CDO_optopt);
+	  return (BADARG);
+	}
+      else  /* white space */
+	CDO_optarg = nargv[CDO_optind];
+
+      place = EMSG;
+      ++CDO_optind;
+    }
+ 
+  return (CDO_optopt);		/* dump back option letter */
+}
+
+int cdo_getopt_long(int argc, char * const *argv, const char *optstring, const struct cdo_option *longopts, int *longindex)
+{
+  int retval;
+
+  assert(argv != NULL);
+  assert(optstring != NULL);
+  assert(longopts != NULL);
+  /* index may be NULL */
+
+  if ( (retval = cdo_getopt_internal(argc, argv, optstring)) == -2 )
+    {
+      char *current_argv = argv[CDO_optind++] + 2, *has_equal;
+      int i, current_argv_len, match = -1;
+
+      if ( *current_argv == '\0' ) return(-1);
+
+      if ( (has_equal = strchr(current_argv, '=')) != NULL )
+	{
+	  current_argv_len = has_equal - current_argv;
+	  has_equal++;
+	}
+      else
+	current_argv_len = strlen(current_argv);
+
+      for ( i = 0; longopts[i].name; i++ )
+	{ 
+	  if ( strncmp(current_argv, longopts[i].name, current_argv_len) )
+	    continue;
+
+	  if ( strlen(longopts[i].name) == (unsigned)current_argv_len )
+	    { 
+	      match = i;
+	      break;
+	    }
+
+	  if ( match == -1 ) match = i;
+	}
+	
+      if ( match != -1 )
+	{
+	  if ( longopts[match].has_arg == required_argument ||
+	       longopts[match].has_arg == optional_argument )
+	    {
+	      if ( has_equal )
+		CDO_optarg = has_equal;
+	      else
+		CDO_optarg = argv[CDO_optind++];
+	    }
+	  
+	  if ( (longopts[match].has_arg == required_argument) && (CDO_optarg == NULL) )
+	    {
+	      /* Missing argument, leading: indicates no error should be generated */
+	      if ( (CDO_opterr) && (*optstring != ':') )
+		fprintf(stderr, "%s: option requires an argument -- %s\n", __progname(argv[0]), current_argv);
+	      return (BADARG);
+	    }
+	}
+      else
+	{ /* No matching argument */
+	  if ( (CDO_opterr) && (*optstring != ':') )
+	    fprintf(stderr, "%s: illegal option -- %s\n", __progname(argv[0]), current_argv);
+
+	  return (BADCH);
+	}
+	
+      if ( longopts[match].flag )
+	{
+	  *longopts[match].flag = longopts[match].val;
+	  retval = 0;
+	}
+      else 
+	retval = longopts[match].val;
+  
+      if ( longindex ) *longindex = match;
+    }
+  
+  return (retval);
+}
diff --git a/src/cdo_getopt.h b/src/cdo_getopt.h
new file mode 100644
index 0000000..c9a8619
--- /dev/null
+++ b/src/cdo_getopt.h
@@ -0,0 +1,43 @@
+/*
+  This file is part of CDO. CDO is a collection of Operators to
+  manipulate and analyse Climate model Data.
+
+  Copyright (C) 2003-2014 Uwe Schulzweida, Uwe.Schulzweida at zmaw.de
+  See COPYING file for copying and redistribution conditions.
+
+  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; version 2 of the License.
+
+  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.
+*/
+
+#ifndef _CDO_GETOPT_H
+#define _CDO_GETOPT_H
+
+struct cdo_option {
+  /* name of long option */
+  const char *name;
+  /*
+   * one of no_argument, required_argument, and optional_argument:
+   * whether option takes an argument
+   */
+  int has_arg;
+  /* if not NULL, set *flag to val when option found */
+  int *flag;
+  /* if flag not NULL, value to set *flag to; else return value */
+  int val;
+};
+
+
+#define  no_argument        1   // no argument to the option is expect
+#define  required_argument  2   // an argument to the option is required
+#define  optional_argument  3   // an argument to the option may be presented.
+
+int cdo_getopt(int argc, char * const *argv, const char *optstring);
+int cdo_getopt_long(int argc, char * const *argv, const char *optstring, const struct cdo_option *longopts, int *longindex);
+
+#endif  /* _CDO_GETOPT_H */
diff --git a/src/cdo_int.h b/src/cdo_int.h
index e7d0410..0f8bb4c 100644
--- a/src/cdo_int.h
+++ b/src/cdo_int.h
@@ -35,6 +35,8 @@
 #include "process.h"
 #include "const.h"
 
+#define  OPENMP4  201307
+
 #ifndef strdupx
 #ifndef strdup
 char *strdup(const char *s);
@@ -51,6 +53,8 @@ char *strdup(const char *s);
 */
 #endif
 
+#define strcompare(s1, s2)  (strncmp(s1, s2, strlen(s2)))
+
 
 /* sxxxYYYYMMDDhhmm0 */
 #define  DATE_LEN  31        /* YYYYMMDDhhmmss allocate DTLEN+1 !!!! */
@@ -116,8 +120,6 @@ char   *commandLine(void);
 int     readline(FILE *fp, char *line, int len);
 
 int zaxis2ltype(int zaxisID);
-int ztype2ltype(int zaxistype);
-int ltype2ztype(int ltype);
 
 
 int nfc2nlat(int nfc, int ntr);
diff --git a/src/cdo_vlist.c b/src/cdo_vlist.c
index ff51725..906bc29 100644
--- a/src/cdo_vlist.c
+++ b/src/cdo_vlist.c
@@ -20,12 +20,106 @@
 #include "cdo_int.h"
 #include "error.h"
 
+
+static
+void compare_lat_reg2d(int ysize, int gridID1, int gridID2)
+{
+  if ( ysize > 1 )
+    {
+      double *yvals1, *yvals2;
+      
+      yvals1 = (double*) malloc(ysize*sizeof(double));
+      yvals2 = (double*) malloc(ysize*sizeof(double));
+
+      gridInqYvals(gridID1, yvals1);
+      gridInqYvals(gridID2, yvals2);
+		
+      if ( IS_EQUAL(yvals1[0], yvals2[ysize-1]) &&
+	   IS_EQUAL(yvals1[ysize-1], yvals2[0]) )
+	{
+	  if ( yvals1[0] > yvals2[0] )
+	    cdoWarning("Latitude orientation differ! First grid: N->S; second grid: S->N");
+	  else
+	    cdoWarning("Latitude orientation differ! First grid: S->N; second grid: N->S");
+	}
+      else
+	{
+	  for ( int i = 0; i < ysize; ++i )
+	    if ( fabs(yvals1[i] - yvals2[i]) > 1.e-5 )
+	      {
+		// printf("lat %g %g %g\n", yvals1[i], yvals2[i], yvals1[i] - yvals2[i]);
+		cdoWarning("Grid latitudes differ!");
+		break;
+	      }
+	}
+
+      free(yvals1);
+      free(yvals2);
+    }
+}
+
+static
+void compare_lon_reg2d(int xsize, int gridID1, int gridID2)
+{
+  if ( xsize > 1 )
+    {
+      double *xvals1, *xvals2;
+
+      xvals1 = (double*) malloc(xsize*sizeof(double));
+      xvals2 = (double*) malloc(xsize*sizeof(double));
+
+      gridInqXvals(gridID1, xvals1);
+      gridInqXvals(gridID2, xvals2);
+		  
+      for ( int i = 0; i < xsize; ++i )
+	if ( fabs(xvals1[i] - xvals2[i]) > 1.e-5 )
+	  {
+	    cdoWarning("Grid longitudes differ!");
+	    break;
+	  }
+      
+      free(xvals1);
+      free(xvals2);
+    }
+}
+
+static
+void compare_grid_unstructured(int gridID1, int gridID2)
+{
+  double *xvals1, *xvals2;
+  double *yvals1, *yvals2;
+  int gridsize;
+
+  gridsize = gridInqSize(gridID1);
+
+  xvals1 = (double*) malloc(gridsize*sizeof(double));
+  xvals2 = (double*) malloc(gridsize*sizeof(double));
+  yvals1 = (double*) malloc(gridsize*sizeof(double));
+  yvals2 = (double*) malloc(gridsize*sizeof(double));
+
+  gridInqXvals(gridID1, xvals1);
+  gridInqXvals(gridID2, xvals2);
+  gridInqYvals(gridID1, yvals1);
+  gridInqYvals(gridID2, yvals2);
+		  
+  for ( int i = 0; i < gridsize; ++i )
+    if ( fabs(xvals1[i] - xvals2[i]) > 1.e-5 || fabs(yvals1[i] - yvals2[i]) > 1.e-5 )
+      {
+	cdoWarning("Geographic location of some grid points differ!");
+	break;
+      }
+      
+  free(xvals1);
+  free(xvals2);
+  free(yvals1); 
+  free(yvals2); 
+}
+
 static
 void compareGrids(int gridID1, int gridID2)
 {
   /* compare grids of first variable */
   int xsize, ysize;
-  int i;
 
   if ( gridInqType(gridID1) == gridInqType(gridID2) )
     {
@@ -35,68 +129,18 @@ void compareGrids(int gridID1, int gridID2)
 	  ysize = gridInqYsize(gridID1);
 		
 	  if ( ysize == gridInqYsize(gridID2) )
-	    {
-	      if ( ysize > 1 )
-		{
-		  double *yvals1, *yvals2;
-
-		  yvals1 = malloc(ysize*sizeof(double));
-		  yvals2 = malloc(ysize*sizeof(double));
-
-		  gridInqYvals(gridID1, yvals1);
-		  gridInqYvals(gridID2, yvals2);
-		
-		  if ( IS_EQUAL(yvals1[0], yvals2[ysize-1]) &&
-		       IS_EQUAL(yvals1[ysize-1], yvals2[0]) )
-		    {
-		      if ( yvals1[0] > yvals2[0] )
-			cdoWarning("Grid orientation differ! First grid: N->S; second grid: S->N");
-		      else
-			cdoWarning("Grid orientation differ! First grid: S->N; second grid: N->S");
-		    }
-		  else
-		    {
-		      for ( i = 0; i < ysize; ++i )
-			if ( fabs(yvals1[i] - yvals2[i]) > 1.e-5 )
-			  {
-			    // printf("lat %g %g %g\n", yvals1[i], yvals2[i], yvals1[i] - yvals2[i]);
-			    cdoWarning("Grid latitudes differ!");
-			    break;
-			  }
-		    }
-
-		  free(yvals1);
-		  free(yvals2);
-		}
-	    }
+	    compare_lat_reg2d(ysize, gridID1, gridID2);
 	  else
 	    cdoWarning("ysize of input grids differ!");
 		
 	  if ( xsize == gridInqXsize(gridID2) )
-	    {
-	      if ( xsize > 1 )
-		{
-		  double *xvals1, *xvals2;
-
-		  xvals1 = malloc(xsize*sizeof(double));
-		  xvals2 = malloc(xsize*sizeof(double));
-
-		  gridInqXvals(gridID1, xvals1);
-		  gridInqXvals(gridID2, xvals2);
-		
-		  for ( i = 0; i < xsize; ++i )
-		    if ( fabs(xvals1[i] - xvals2[i]) > 1.e-5 )
-		      {
-			cdoWarning("Grid longitudes differ!");
-			break;
-		      }
-
-		  free(xvals1);
-		  free(xvals2);
-		}
-	    }
+	    compare_lon_reg2d(xsize, gridID1, gridID2);
 	  else
-	    cdoWarning("ysize of input grids differ!");
+	    cdoWarning("xsize of input grids differ!");
+	}
+      else if ( gridInqType(gridID1) == GRID_CURVILINEAR || gridInqType(gridID1) == GRID_UNSTRUCTURED )
+	{
+	  compare_grid_unstructured(gridID1, gridID2);
 	}
     }
   else
diff --git a/src/cdotest.c b/src/cdotest.c
index 5910409..9d4f241 100755
--- a/src/cdotest.c
+++ b/src/cdotest.c
@@ -154,8 +154,8 @@ void writeNcFile(const char path[], const double array[], int length)
 static
 double **createVars(int nvars, int nts)
 {  
-  double *array = malloc(nvars*nts*sizeof(double));
-  double **vars = malloc(nvars*sizeof(double));
+  double *array = (double*) malloc(nvars*nts*sizeof(double));
+  double **vars = (double**) malloc(nvars*sizeof(double*));
   
   int i;
   
@@ -204,7 +204,7 @@ static
 int submitCdoCommand(const char *argument)
 {  
   const char *cdoPath = getCdoPath();
-  char *cdoCommand = malloc(strlen(cdoPath) + strlen(argument) + 8);
+  char *cdoCommand = (char*) malloc(strlen(cdoPath) + strlen(argument) + 8);
   
   int status;
   
diff --git a/src/clipping/area.c b/src/clipping/area.c
index 248bef8..e5614bd 100644
--- a/src/clipping/area.c
+++ b/src/clipping/area.c
@@ -41,14 +41,13 @@
 #include "utils.h"
 #include "ensure_array_size.h"
 
-// area tolerance (100 m*m = 0.0001 km*km)
-const double area_tol = 1e-4;
+// area tolerance (10 m^2 = 0.0001 km^2)
+const double area_tol = 0.02*0.02; // 20m*20m
 
-static double scalar_product(double a[], double b[]);
+static inline double scalar_product(double a[], double b[]);
 
-static void cross_product(double a[], double b[], double cross[]);
-
-static double inner_angle ( double plat, double plon, double qlon, double qlat );
+static inline double inner_angle ( double plat, double plon,
+                                   double qlon, double qlat );
 
 static double partial_area ( double a_lon, double a_lat,
                              double b_lon, double b_lat,
@@ -86,7 +85,7 @@ double triangle_area ( struct grid_cell cell ) {
   double ca1, ca2, ca3;
   double a1, a2, a3;
 
-  double triangle[3][3];
+  double * triangle[3];
   double u01[3], u12[3], u20[3];
 
   if ( cell.num_corners != 3 ) {
@@ -94,16 +93,15 @@ double triangle_area ( struct grid_cell cell ) {
     return -1;
   }
 
-  /* Convert into cartesian coordinates */
-
-  for (int m = 0; m < 3; m++ )
-    LLtoXYZ(cell.coordinates_x[m], cell.coordinates_y[m], triangle[m]);
+  triangle[0] = cell.coordinates_xyz + 0*3;
+  triangle[1] = cell.coordinates_xyz + 1*3;
+  triangle[2] = cell.coordinates_xyz + 2*3;
 
   /* First, compute cross products Uij = Vi x Vj. */
 
-  cross_product(triangle[0], triangle[1], u01);
-  cross_product(triangle[1], triangle[2], u12);
-  cross_product(triangle[2], triangle[0], u20);
+  crossproduct_ld(triangle[0], triangle[1], u01);
+  crossproduct_ld(triangle[1], triangle[2], u12);
+  crossproduct_ld(triangle[2], triangle[0], u20);
 
   /*  Normalize Uij to unit vectors. */
 
@@ -172,18 +170,16 @@ double cell_area ( struct grid_cell cell ) {
   double ca[cell.num_corners];
   double a[cell.num_corners];
 
-  double p[cell.num_corners][3];
+  double * p[cell.num_corners];
   double u[cell.num_corners][3];
 
-  /* Convert into cartesian coordinates */
-
-  for (int m = 0; m < M; m++ )
-    LLtoXYZ( cell.coordinates_x[m], cell.coordinates_y[m], p[m]);
+  for (int i = 0; i < cell.num_corners; ++i)
+    p[i] = cell.coordinates_xyz + i * 3;
 
   /* First, compute cross products Uij = Vi x Vj. */
 
   for (int m = 0; m < M; m++ )
-    cross_product (p[m], p[(m+1)%M], u[m]);
+    crossproduct_ld (p[m], p[(m+1)%M], u[m]);
 
   /*  Normalize Uij to unit vectors. */
 
@@ -304,14 +300,12 @@ double cell3d_area( struct grid_cell cell ) {
 
    int  coord;           // coord to ignore: 1=x[1], 2=x[2], 3=x[3]
 
-   double V[cell.num_corners][3];
+   double * V[cell.num_corners];
    double Norm[3];
    double edge[2][3];
 
-   /* transform vertices into cartesian coordinates on the earth surface
-      must be done already here to avoid round-off errors later */
-   for (int i = 0; i < M; i++ )
-      LLtoXYZ( cell.coordinates_x[i], cell.coordinates_y[i], V[i]);
+   for (int i = 0; i < cell.num_corners; ++i)
+      V[i] = cell.coordinates_xyz + i * 3;
 
    /* compute normal vector */
    edge[0][0] = V[0][0] - V[1][0];
@@ -321,7 +315,7 @@ double cell3d_area( struct grid_cell cell ) {
    edge[1][1] = V[0][1] - V[2][1];
    edge[1][2] = V[0][2] - V[2][2];
 
-   cross_product(edge[0], edge[1], Norm);
+   crossproduct_ld(edge[0], edge[1], Norm);
 
    /* select largest abs coordinate to ignore for projection */
    ax = (Norm[0]>0 ? Norm[0] : -Norm[0]);    // abs x-coord
@@ -405,20 +399,132 @@ double cell3d_area( struct grid_cell cell ) {
   * Prediction, Los Alamos National Laboratory, Argonne National Laboratory,
   * NASA Goddard Space Flight Center.
   * Licensed under the University of Illinois-NCSA License.
+  *
+  * \remark all edges are on great circle
   */
 static double
 tri_area(double u[3], double v[3], double w[3]) {
 
-  double a = get_vector_angle(u,v);
-  double b = get_vector_angle(u,w);
-  double c = get_vector_angle(w,v);
+  double a_ = get_vector_angle(u,v);
+  double b_ = get_vector_angle(u,w);
+  double c_ = get_vector_angle(w,v);
+
+  double a, b, c;
+
+  if (a_ < b_) {
+    if (a_ < c_) {
+      if (b_ < c_) {
+        a = a_, b = b_, c = c_;
+      } else {
+        a = a_, b = c_, c = b_;
+      }
+    } else {
+      a = c_, b = a_, c = b_;
+    }
+  } else {
+    if (b_ < c_) {
+      if (a_ < c_) {
+        a = b_, b = a_, c = c_;
+      } else {
+        a = b_, b = c_, c = a_;
+      }
+    } else {
+      a = c_, b = b_, c = a_;
+    }
+  }
+
+  // see: http://en.wikipedia.org/wiki/Heron%27s_formula#Numerical_stability
+  // see also: http://www.eecs.berkeley.edu/~wkahan/Triangle.pdf
+
+  // the tolerance value is determined empirically
+  if ((a + (b - c)) < c * 1e-14) return 0.0;
+
+  double t = tan(0.25 * (a + (b + c))) * tan(0.25 * (c - (a - b))) *
+             tan(0.25 * (c + (a - b))) * tan(0.25 * (a + (b - c)));
+
+  return fabs(4.0 * atan(sqrt(fabs(t))));
+}
+
+static inline int compute_norm_vector(double a[], double b[], double norm[]) {
+
+  crossproduct_ld(a, b, norm);
 
-  double s=0.5*(a+b+c);
+  double scale = sqrt(norm[0] * norm[0] + norm[1] * norm[1] + norm[2] * norm[2]);
 
-  double t = tan ( s / 2.0 ) * tan ( ( s - a ) / 2.0 ) *
-             tan ( ( s - b ) / 2.0 ) * tan ( ( s - c ) / 2.0 );
+  if (scale == 0) return 1;
 
-  return fabs ( 4.0 * atan ( sqrt (fabs ( t ) ) ) );;
+  scale = 1.0 / scale;
+
+  norm[0] *= scale;
+  norm[1] *= scale;
+  norm[2] *= scale;
+
+  return 0;
+}
+
+static double
+lat_edge_correction(double base_point[3], double a[3], double b[3],
+                    double lon_a, double lon_b) {
+
+  double const tol = 1e-8;
+
+  if (fabs(a[2] - b[2]) > tol)
+    abort_message("ERROR: latitude of both corners is not identical\n",
+                  __FILE__, __LINE__);
+
+  double h = fabs(a[2]);
+
+  // if we are at the equator or at a pole
+  if (h < tol || fabs(1.0 - h) < tol)
+    return 0.0;
+
+  double lat_area = fabs((1.0 - h) * get_angle(lon_a, lon_b));
+
+  double pole[3] = {0, 0, (a[2] >= 0.0)?1:-1};
+  double gc_area = tri_area(a, b, pole);
+
+  double correction = MAX(lat_area - gc_area, 0.0);
+
+  double middle_lat[3] = {a[0]+b[0], a[1]+b[1], a[2]};
+  double scale = sqrt(middle_lat[0]*middle_lat[0]+middle_lat[1]*middle_lat[1]);
+
+  if (scale == 0) abort_message("internal error", __FILE__, __LINE__);
+
+  scale = sqrt(1.0 - a[2]*a[2]) / scale;
+
+  middle_lat[0] *= scale;
+  middle_lat[1] *= scale;
+
+  double norm_ab[3];
+
+  // if the angle between a and b is to small to compute a norm vector
+  if (compute_norm_vector(a, b, norm_ab)) return 0.0;
+
+  double scalar_base = scalar_product(norm_ab, base_point);
+  double scalar_middle_lat = scalar_product(norm_ab, middle_lat);
+
+  // if the base point is on the same plane as a and b
+  if (fabs(scalar_base) < 1e-11) {
+
+    double norm_middle[3];
+    double pole[3] = {0,0,((a[2]>0)?1:-1)};
+
+    if (compute_norm_vector(middle_lat, pole, norm_middle)) return 0.0;
+
+    double scalar_a = scalar_product(norm_middle, a);
+
+    if (scalar_a > 0)
+      return correction;
+    else
+      return - correction;
+
+  } else {
+
+    if (scalar_middle_lat < 0)
+      return correction;
+    else
+      return - correction;
+  }
 }
 
 double pole_area ( struct grid_cell cell ) {
@@ -450,11 +556,11 @@ double pole_area ( struct grid_cell cell ) {
 
     if (cell.edge_type[i] == GREAT_CIRCLE || cell.edge_type[i] == LON_CIRCLE) {
 
-      double a[3];
-      double b[3];
+      double * a;
+      double * b;
 
-      LLtoXYZ(cell.coordinates_x[i], cell.coordinates_y[i], a);
-      LLtoXYZ(cell.coordinates_x[(i+1)%M], cell.coordinates_y[(i+1)%M], b);
+      a = cell.coordinates_xyz + i * 3;
+      b = cell.coordinates_xyz + ((i+1)%M) * 3;
 
       double edge_direction = a[0]*b[1]-a[1]*b[0]; // 3. component of cross product
 
@@ -495,109 +601,71 @@ double pole_area ( struct grid_cell cell ) {
   return fabs(area * EarthRadius * EarthRadius);
 }
 
-static double
-lat_edge_correction(double a[3], double b[3], double lon_a, double lon_b) {
-
-  double const tol = 1e-8;
-
-  if (fabs(a[2] - b[2]) > tol)
-    abort_message("ERROR: latitude of both corners is not identical\n",
-                  __FILE__, __LINE__);
-
-  double h = fabs(a[2]);
-
-  // if we are at the equator or at a pole
-  if (h < tol || fabs(1.0 - h) < tol)
-    return 0.0;
-
-  double lat_area = fabs((1.0 - h) * get_angle(lon_a, lon_b));
-
-  double pole[3] = {0, 0, (a[2] >= 0.0)?1:-1};
-  double gc_area = tri_area(a, b, pole);
-
-  double correction = lat_area - gc_area;
-
-  if (correction < 0) return 0;
-  else return correction;
-}
-
  /*
   * source code is originally based on code by Robert Oehmke of Earth System Modeling
   * Framework (www.earthsystemmodeling.org)
   *
   * it has be extended to support YAC data structures and two types of
   * grid cell edges (great circle and circle of latitude)
+  *
   */
 double huiliers_area(struct grid_cell cell) {
 
-  double tmp_points[cell.num_corners][3];
-  double const tol = 1e-8;
-
   if (cell.num_corners < 2) return 0;
 
-  // convert lon-lat to xyz
+  int lat_flag = 0;
+
   for (int i = 0; i < cell.num_corners; i++)
-    LLtoXYZ(cell.coordinates_x[i], cell.coordinates_y[i], tmp_points[i]);
+    lat_flag |= cell.edge_type[i] == LAT_CIRCLE;
+
+  if (cell.num_corners == 3 && !lat_flag)
+    return fabs(tri_area(cell.coordinates_xyz + 0*3,
+                         cell.coordinates_xyz + 1*3,
+                         cell.coordinates_xyz + 2*3) *
+                EarthRadius * EarthRadius);
 
   // sum areas around cell
   double sum = 0.0;
 
-  for (int i = 2; i < cell.num_corners; i++)
-    sum += tri_area(tmp_points[0], tmp_points[i-1], tmp_points[i]);
-
-  // check for edges of latitude
-  unsigned num_lat_circle_edges = 0;
-  for (unsigned i = 0; i < cell.num_corners; ++i)
-    if (cell.edge_type[i] == LAT_CIRCLE)
-      num_lat_circle_edges++;
-
-  if (num_lat_circle_edges > 2)
-    abort_message("ERROR: invalid cell (has more than two edges that are "
-                  "latitude circles)\n", __FILE__, __LINE__);
+  for (int i = 2; i < cell.num_corners; ++i) {
 
-  if (num_lat_circle_edges > 0) {
+    double tmp_area = tri_area(cell.coordinates_xyz + 0*3,
+                               cell.coordinates_xyz + (i-1)*3,
+                               cell.coordinates_xyz + i * 3);
 
-    // compute minimum and maximum height of cell
-    double min = cell.coordinates_y[0], max = cell.coordinates_y[0];
+    double norm[3];
 
-    for (int i = 1; i < cell.num_corners; ++i)
-      if (cell.coordinates_y[i] < min) min = cell.coordinates_y[i];
-      else if (cell.coordinates_y[i] > max) max = cell.coordinates_y[i];
+    if (compute_norm_vector(cell.coordinates_xyz + (i-1) * 3,
+                            cell.coordinates_xyz + i * 3, norm)) continue;
 
-    double min_factor = 1.0;
+    double scalar_base = scalar_product(norm, cell.coordinates_xyz + 0*3);
 
-    if (max <= 0.0) {
-
-      double tmp = max;
-      max = min;
-      min = tmp;
+    if (scalar_base > 0)
+      sum += tmp_area;
+    else
+      sum -= tmp_area;
+  }
 
-    } else if (signbit(min) != signbit(max))
-      min_factor = -1.0;
+  // if there is at least on latitude circle edge
+  if (lat_flag) {
 
     for (int i = 0; i < cell.num_corners; ++i) {
 
       if (cell.edge_type[i] == LAT_CIRCLE) {
 
-        double correction =
-          lat_edge_correction(tmp_points[i],
-                              tmp_points[(i+1)%cell.num_corners],
-                              cell.coordinates_x[i],
-                              cell.coordinates_x[(i+1)%cell.num_corners]);
+        int i_ = (i+1)%cell.num_corners;
 
-        if (fabs(cell.coordinates_y[i] - min) < tol)
-          sum += min_factor * correction;
-        else if (fabs(cell.coordinates_y[i] - max) < tol)
-          sum -= correction;
-        else
-          abort_message("ERROR: internal error...should have not occured\n",
-                        __FILE__, __LINE__);
+        sum += lat_edge_correction(cell.coordinates_xyz + 0 * 3,
+                                   cell.coordinates_xyz + i * 3,
+                                   cell.coordinates_xyz + i_ * 3,
+                                   cell.coordinates_x[i],
+                                   cell.coordinates_x[i_]);
       }
     }
   }
 
   // return area
-  return sum * EarthRadius * EarthRadius;
+  return fabs(sum * EarthRadius * EarthRadius);
 }
 
 /* ----------------------------------- */
@@ -622,7 +690,8 @@ double partial_area ( double a_lon, double a_lat,
 
 /* ----------------------------------- */
 
-double inner_angle ( double plat, double plon, double qlat, double qlon ) {
+static double inline inner_angle ( double plat, double plon,
+                                   double qlat, double qlon ) {
 
   double t = sin((qlon-plon))*cos(qlat);
 
@@ -634,14 +703,8 @@ double inner_angle ( double plat, double plon, double qlat, double qlon ) {
 
 /* ----------------------------------- */
 
-static double scalar_product(double a[], double b[]) {
+static inline double scalar_product(double a[], double b[]) {
   return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]);
 }
 
 /* ----------------------------------- */
-
-static void cross_product(double a[], double b[], double cross[]) {
-  cross[0] = a[1]*b[2] - a[2]*b[1];
-  cross[1] = a[2]*b[0] - a[0]*b[2];
-  cross[2] = a[0]*b[1] - a[1]*b[0];
-}
diff --git a/src/clipping/clipping.c b/src/clipping/clipping.c
index f1bcdf2..fb2e4b5 100644
--- a/src/clipping/clipping.c
+++ b/src/clipping/clipping.c
@@ -47,6 +47,7 @@ static double const tol = 1.0e-12;
 
 enum cell_type {
   LON_LAT_CELL,
+  LAT_CELL,
   GREAT_CIRCLE_CELL,
   MIXED_CELL
 };
@@ -78,6 +79,7 @@ static struct point_list_element *
 get_free_point_list_element(struct point_list * list);
 
 static void remove_points(struct point_list * list);
+static unsigned remove_zero_length_edges(struct point_list * list);
 
 static void free_point_list(struct point_list * list);
 
@@ -117,7 +119,9 @@ void compute_overlap_areas(unsigned N,
 
   for (unsigned n = 0; n < N; n++) {
     partial_areas[n] = huiliers_area (overlap_buffer[n]);
-    free_grid_cell(overlap_buffer + n);
+    // we cannot use pole_area because it is rather inaccurate for great circle
+    // edges that are nearly circles of longitude
+    //partial_areas[n] = pole_area (overlap_buffer[n]);
   }
 
 #ifdef VERBOSE
@@ -128,15 +132,6 @@ void compute_overlap_areas(unsigned N,
 
 /* ------------------------- */
 
-static void crossproduct (double a[], double b[], double cross[]) {
-
-/* cross-product in cartesian coordinates */
-
-  cross[0] = a[1] * b[2] - a[2] * b[1];
-  cross[1] = a[2] * b[0] - a[0] * b[2];
-  cross[2] = a[0] * b[1] - a[1] * b[0];
-}
-
 static double dotproduct(double a[], double b[]) {
 
   return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
@@ -144,7 +139,7 @@ static double dotproduct(double a[], double b[]) {
 
 static void compute_norm_vector(double a[], double b[], double norm[]) {
 
-  crossproduct(a, b, norm);
+  crossproduct_ld(a, b, norm);
 
   if ((fabs(norm[0]) < tol) &&
       (fabs(norm[1]) < tol) &&
@@ -163,7 +158,7 @@ static void compute_lat_circle_z_value(double a[], double b[], double z[]) {
 
   double temp[3];
 
-  crossproduct(a, b, temp);
+  crossproduct_ld(a, b, temp);
 
   z[0] = 0;
   z[1] = 0;
@@ -195,7 +190,7 @@ static unsigned is_inside_gc(double point[], double norm_vec[]) {
   dot = dotproduct(point, norm_vec);
 
   // if the point is on the line
-  if (fabs(dot) < tol)
+  if (fabs(dot) <= angle_tol * 1e-3)
     return 2;
 
   return dot < 0;
@@ -205,7 +200,7 @@ static unsigned is_inside_latc(double point[], double z) {
 
   double temp = fabs(point[2] + z);
 
-  if (fabs(1.0 - temp) < tol) return 2;
+  if (fabs(1.0 - temp) <= angle_tol * 1e-3) return 2;
   else return temp < 1.0;
 }
 
@@ -234,6 +229,8 @@ static unsigned is_inside(double point[], double help_vec[],
 
 static enum cell_type get_cell_type(struct grid_cell target_cell) {
 
+  int count_lat_edges = 0, count_great_circle_edges = 0;
+
    if ((target_cell.num_corners == 4) &&
        ((target_cell.edge_type[0] == LAT_CIRCLE &&
          target_cell.edge_type[1] == LON_CIRCLE &&
@@ -246,289 +243,352 @@ static enum cell_type get_cell_type(struct grid_cell target_cell) {
       return LON_LAT_CELL;
    else
       for (unsigned i = 0; i < target_cell.num_corners; ++i)
-         if (target_cell.edge_type[i] != LON_CIRCLE &&
-             target_cell.edge_type[i] != GREAT_CIRCLE)
-            return MIXED_CELL;
-
-   return GREAT_CIRCLE_CELL;
+         if (target_cell.edge_type[i] == LON_CIRCLE ||
+             target_cell.edge_type[i] == GREAT_CIRCLE)
+            count_great_circle_edges++;
+         else
+            count_lat_edges++;
+
+   if (count_lat_edges && count_great_circle_edges)
+      return MIXED_CELL;
+   else if (count_lat_edges)
+      return LAT_CELL;
+   else
+      return GREAT_CIRCLE_CELL;
 }
 
-/**
- * cell clipping using Sutherland–Hodgman algorithm;
- */
-void cell_clipping(unsigned N,
-                   struct grid_cell * source_cell,
-                   struct grid_cell target_cell,
-                   struct grid_cell * overlap_buffer) {
+static void get_edge_middle_point_lat(double a[3], double b[3],
+                                      double middle[3]) {
 
-  unsigned ncs;               /* number of vertices of source cell */
-  unsigned nct;               /* number of vertices of target cell */
+  middle[0] = a[0] + b[0];
+  middle[1] = a[1] + b[1];
+  middle[2] = a[2];
 
-  struct point_list target_list, source_list;
+  double length = sqrt(middle[0] * middle[0] + middle[1] * middle[1]);
 
-  unsigned target_ordering; /* ordering of target cell corners */
-  unsigned source_ordering; /* ordering of source cell corners */
+  if (length < tol) {
 
-  double * norm_vec; /* norm vector for temporary target edge plane */
+    length = 1;
+    middle[0] = 1;
+    middle[1] = 0;
+  }
 
-  nct = target_cell.num_corners;
+  double scale = sqrt(1.0 - middle[2] * middle[2]) / length;
 
-  enum cell_type tgt_cell_type = get_cell_type(target_cell);
+  middle[0] *= scale;
+  middle[1] *= scale;
+}
 
-  if (tgt_cell_type == MIXED_CELL)
-    abort_message("invalid target cell type (cell contains edges consisting "
-                  "of great circles and circles of latitude)\n", __FILE__,
-                  __LINE__);
+static void get_edge_middle_point_gc(double a[3], double b[3],
+                                     double middle[3]) {
 
-  // generate point list for target cell (clip cell)
-  init_point_list(&target_list);
-  generate_point_list(&target_list, target_cell);
+  middle[0] = a[0] + b[0];
+  middle[1] = a[1] + b[1];
+  middle[2] = a[2] + b[2];
 
-  // if there is no target cell (e.g. if all edges of target cell have a length
-  // of zero)
-  if (target_list.first == NULL) {
-    free_point_list(&target_list);
+  double length = sqrt(middle[0] * middle[0] +
+                       middle[1] * middle[1] +
+                       middle[2] * middle[2]);
+
+  if (length < tol) {
+
+    middle[0] = 1;
+    middle[1] = 0;
+    middle[2] = 0;
     return;
   }
 
-  struct point_list_element * prev_tgt_point = target_list.first;
-  struct point_list_element * curr_tgt_point = target_list.first->next;
+  double scale = 1.0 / length;
 
-  norm_vec = malloc(3 * nct * sizeof(*norm_vec));
+  middle[0] *= scale;
+  middle[1] *= scale;
+  middle[2] *= scale;
+}
 
-  // compute norm vectors for all edges
-  // or for lat circle edges a special z value
-  for (unsigned i = 0; i < nct; ++i) {
+static void get_edge_middle_point(double a[3], double b[3],
+                                  enum edge_type edge_type, double middle[3]) {
 
-    switch (prev_tgt_point->edge_type) {
+  switch (edge_type) {
 
-      case (LON_CIRCLE) :
-      case (GREAT_CIRCLE) :
-        compute_norm_vector(prev_tgt_point->vec_coords, curr_tgt_point->vec_coords,
-                            norm_vec + 3 * i);
-        break;
-      case (LAT_CIRCLE):
-        compute_lat_circle_z_value(prev_tgt_point->vec_coords, curr_tgt_point->vec_coords,
-                            norm_vec + 3 * i);
-        break;
-      default:
-        abort_message("invalid edge type\n", __FILE__, __LINE__);
-    };
-    prev_tgt_point = curr_tgt_point;
-    curr_tgt_point = curr_tgt_point->next;
-  }
+    case (LAT_CIRCLE):
 
-  // compute target direction
-  target_ordering = get_cell_points_ordering(&target_list);
+      get_edge_middle_point_lat(a, b, middle);
+      break;
 
-  init_point_list(&source_list);
+    case (LON_CIRCLE):
+    case (GREAT_CIRCLE):
 
-  // for all source cells
-  for (unsigned n = 0; n < N; n++ ) {
+      get_edge_middle_point_gc(a, b, middle);
+      break;
 
-    if (get_cell_type(source_cell[n]) == MIXED_CELL)
-      abort_message("invalid source cell type (cell contains edges consisting "
-                    "of great circles and circles of latitude)\n", __FILE__,
-                    __LINE__);
+    default:
+      abort_message("ERROR: invalid edge type\n", __FILE__, __LINE__);
+  };
+}
 
-    ncs = source_cell[n].num_corners;
+static struct grid_cell curr_target_cell;
+static struct grid_cell curr_source_cell;
 
-    if (ncs < 2)
-      continue;
+/**
+ * cell clipping using Sutherland–Hodgman algorithm;
+ */
+void point_list_clipping(struct point_list * source_list, int source_ordering,
+                         struct point_list target_list, int target_ordering,
+                         unsigned nct, double * tgt_edge_norm_vec) {
 
-    // generate point list for current source list
-    generate_point_list(&source_list, source_cell[n]);
+  struct point_list_element * prev_tgt_point = target_list.first;
+  struct point_list_element * curr_tgt_point = target_list.first->next;
 
-    // compute source direction
-    source_ordering = get_cell_points_ordering(&source_list);
+  for (int i = 0; i < nct; ++i) {
 
-    prev_tgt_point = target_list.first;
-    curr_tgt_point = target_list.first->next;
+    struct point_list_element * curr_src_point = source_list->first;
+    struct point_list_element * prev_src_point = source_list->last;
 
-    for (int i = 0; i < nct; ++i) {
+    unsigned prev_is_inside, curr_is_inside;
 
-      struct point_list_element * curr_src_point = source_list.first;
-      struct point_list_element * prev_src_point = source_list.last;
+    prev_is_inside = is_inside(prev_src_point->vec_coords,
+                               tgt_edge_norm_vec + 3 * i,
+                               prev_tgt_point->edge_type, target_ordering);
 
-      unsigned prev_is_inside, curr_is_inside;
+    // for all edges of the target cell
+    do {
 
-      prev_is_inside = is_inside(prev_src_point->vec_coords, norm_vec + 3 * i,
+      curr_is_inside = is_inside(curr_src_point->vec_coords,
+                                 tgt_edge_norm_vec + 3 * i,
                                  prev_tgt_point->edge_type, target_ordering);
 
-      // for all edges of the target cell
-      do {
+      double p[3], q[3];
+      int intersect;
+
+      if ((curr_is_inside + prev_is_inside == 1) ||
+          (((prev_src_point->edge_type == LAT_CIRCLE) ^
+            (prev_tgt_point->edge_type == LAT_CIRCLE)) && 
+           (prev_is_inside + curr_is_inside < 4))) {
+
+        // get intersection points
+        intersect = intersect_vec(prev_src_point->edge_type,
+                                  prev_src_point->vec_coords,
+                                  curr_src_point->vec_coords,
+                                  prev_tgt_point->edge_type,
+                                  prev_tgt_point->vec_coords,
+                                  curr_tgt_point->vec_coords,
+                                  p, q);
+
+        // if both edges are on an identical great circle
+        if ((intersect != -1) && (intersect & (1 << 4))) {
+
+          prev_is_inside = 2;
+          curr_is_inside = 2;
+        }
+      }
+
+      // if the current edges change from inside/outside to outside/inside
+      if (curr_is_inside + prev_is_inside == 1) {
+
+        // if there is an no intersection
+        if ((intersect == -1) || ((intersect & 3) == 0)) {
+
+          if (intersect == -1) intersect = 0;
+
+          intersect |= 1;
+
+          // which of the two end points of the source edge is closer to the
+          // target edge
+
+          struct point_list_element * temp_src_point;
+
+          switch (prev_tgt_point->edge_type) {
+
+            case (LON_CIRCLE) :
+            case (GREAT_CIRCLE) :
+              temp_src_point =
+                (fabs(dotproduct(prev_src_point->vec_coords,
+                                 tgt_edge_norm_vec + 3 * i)) <
+                 fabs(dotproduct(curr_src_point->vec_coords,
+                                 tgt_edge_norm_vec + 3 * i)))?
+                prev_src_point:curr_src_point;
+              break;
+            case (LAT_CIRCLE) :
+              temp_src_point =
+                (fabs(1.0 - fabs(prev_src_point->vec_coords[2] +
+                                 tgt_edge_norm_vec[3 * i + 2])) < 
+                 fabs(1.0 - fabs(curr_src_point->vec_coords[2] +
+                                 tgt_edge_norm_vec[3 * i + 2])))?
+                prev_src_point:curr_src_point;
+              break;
+            default:
+              abort_message("invalid edge type\n", __FILE__, __LINE__);
+          };
+
+          p[0] = temp_src_point->vec_coords[0];
+          p[1] = temp_src_point->vec_coords[1];
+          p[2] = temp_src_point->vec_coords[2];
+        }
+
+        // if there are two intersection points with the source edge
+        if ((intersect & ((1 << 0) | (1 << 1))) == ((1 << 0) | (1 << 1))) {
+
+          if (!((prev_src_point->edge_type == LAT_CIRCLE) ^
+                (prev_tgt_point->edge_type == LAT_CIRCLE))) {
 
-        curr_is_inside = is_inside(curr_src_point->vec_coords, norm_vec + 3 * i,
-                                   prev_tgt_point->edge_type, target_ordering);
+            abort_message("ERROR: ...this should not have happened...\n",
+                          __FILE__, __LINE__);
+          }
 
-        // if the current edges change from inside/outside to outside/inside
-        if (((curr_is_inside == 0) ^ (prev_is_inside == 0)) &&
-            ((curr_is_inside != 2) && (prev_is_inside != 2))) {
+          if (((get_vector_angle(prev_src_point->vec_coords, p) < angle_tol) &&
+               (get_vector_angle(curr_src_point->vec_coords, q) < angle_tol)) ||
+              ((get_vector_angle(prev_src_point->vec_coords, q) < angle_tol) &&
+               (get_vector_angle(curr_src_point->vec_coords, p) < angle_tol))) {
+
+            prev_is_inside = 2;
+            curr_is_inside = 2;
+
+          } else {
+
+            // which of the two end points of the source edge is closer to the
+            // target edge
+
+            int prev_is_closer;
+
+            switch (prev_tgt_point->edge_type) {
+
+              case (LON_CIRCLE) :
+              case (GREAT_CIRCLE) :
+                prev_is_closer =
+                  fabs(dotproduct(prev_src_point->vec_coords,
+                                  tgt_edge_norm_vec + 3 * i)) <
+                  fabs(dotproduct(curr_src_point->vec_coords,
+                                  tgt_edge_norm_vec + 3 * i));
+                break;
+              case (LAT_CIRCLE) :
+                prev_is_closer =
+                  fabs(1.0 - fabs(prev_src_point->vec_coords[2] +
+                                  tgt_edge_norm_vec[3 * i + 2])) < 
+                  fabs(1.0 - fabs(curr_src_point->vec_coords[2] +
+                                  tgt_edge_norm_vec[3 * i + 2]));
+                break;
+              default:
+                abort_message("invalid edge type\n", __FILE__, __LINE__);
+            };
+
+            if (prev_is_closer)
+              prev_is_inside = curr_is_inside;
+            else
+              curr_is_inside = prev_is_inside;
+          }
 
-          double p[3], q[3];
-          int intersect;
+        // if p or q is on the source edge
+        } else {
 
           struct point_list_element * intersect_point;
 
           // if the previous point was inside or current edge is the last one
           if (prev_is_inside ||
-              (curr_is_inside && (prev_src_point == source_list.last))) {
+              (curr_is_inside && (prev_src_point == source_list->last))) {
 
-            intersect_point = get_free_point_list_element(&source_list);
+            intersect_point = get_free_point_list_element(source_list);
             prev_src_point->next = intersect_point;
             intersect_point->next = curr_src_point;
 
-            if (prev_src_point == source_list.last)
-              source_list.last = intersect_point;
+            if (prev_src_point == source_list->last)
+              source_list->last = intersect_point;
 
           } else
             intersect_point = prev_src_point;
 
-          // get intersection points
-          intersect = intersect_vec(prev_src_point->edge_type,
-                                    prev_src_point->vec_coords,
-                                    curr_src_point->vec_coords,
-                                    prev_tgt_point->edge_type,
-                                    prev_tgt_point->vec_coords,
-                                    curr_tgt_point->vec_coords,
-                                    p, q);
-
-          // if there is an intersection
-          if (intersect != -1) {
+          if (prev_is_inside)
+            intersect_point->edge_type = prev_tgt_point->edge_type;
+          else
+            intersect_point->edge_type = prev_src_point->edge_type;
 
-            // if both edges are on an identical great circle
-            if (intersect & (1 << 4))
-              abort_message("ERROR: edges on identical circle, this case should"
-                            " have been handled somewhere else\n", __FILE__, __LINE__);
+          if (intersect & (1 << 0)) {
 
-            // if there are two intersection points with the source edge
-            if ((intersect & ((1 << 0) | (1 << 1))) == ((1 << 0) | (1 << 1))) {
+            intersect_point->vec_coords[0] = p[0];
+            intersect_point->vec_coords[1] = p[1];
+            intersect_point->vec_coords[2] = p[2];
 
-              abort_message("ERROR: more than one intersections with the "
-                            "source edges", __FILE__, __LINE__);
+          // if q is on the source edge
+          } else if (intersect & (1 << 1)) {
 
-            // if p or q is on the source edge
-            } else {
-
-              if (prev_is_inside)
-                intersect_point->edge_type = prev_tgt_point->edge_type;
-              else
-                intersect_point->edge_type = prev_src_point->edge_type;
-
-              if (intersect & (1 << 0)) {
-
-                intersect_point->vec_coords[0] = p[0];
-                intersect_point->vec_coords[1] = p[1];
-                intersect_point->vec_coords[2] = p[2];
-
-              // if q is on the source edge
-              } else if (intersect & (1 << 1)) {
-
-                intersect_point->vec_coords[0] = q[0];
-                intersect_point->vec_coords[1] = q[1];
-                intersect_point->vec_coords[2] = q[2];
-
-              } else {
-
-              for (int i = 0; i < source_cell[n].num_corners; ++i) {
-                fprintf(stderr, "src: %d, %lf, %lf\n", i,
-                        source_cell[n].coordinates_x[i],
-                        source_cell[n].coordinates_y[i]);
-              }
-
-              for (int i = 0; i < target_cell.num_corners; ++i) {
-                fprintf(stderr, "tgt: %d, %lf, %lf\n", i,
-                        target_cell.coordinates_x[i],
-                        target_cell.coordinates_y[i]);
-              }
+            intersect_point->vec_coords[0] = q[0];
+            intersect_point->vec_coords[1] = q[1];
+            intersect_point->vec_coords[2] = q[2];
 
-                abort_message("ERROR: no intersection with source edge was found\n",
-                              __FILE__, __LINE__);
-              }
-            }
           }
 
           if (intersect_point == prev_src_point)
             prev_is_inside = 1;
+        }
+      }
+
+      // if the one edge is a circle of latitude while the other is not
+      // and both corners are not directly on the edge
+      if (((prev_src_point->edge_type == LAT_CIRCLE) ^
+           (prev_tgt_point->edge_type == LAT_CIRCLE)) && 
+          ((prev_is_inside + curr_is_inside == 0) ||
+           (prev_is_inside + curr_is_inside == 2) ||
+           (prev_is_inside + curr_is_inside == 3))) {
+
+        // if there is an intersection possible
+        if ((intersect != -1) && (intersect != 0)) {
 
-        // if the one edge is a circle of latitude while the other is not
-        // and both corners are not directly on the edge
-        } else if (((prev_src_point->edge_type == LAT_CIRCLE) ^
-                    (prev_tgt_point->edge_type == LAT_CIRCLE)) && 
-                   !((prev_is_inside == 2) && (curr_is_inside == 2))) {
+          // if there are two intersection points with the source edge
+          if ((intersect & ((1 << 0) | (1 << 1))) == ((1 << 0) | (1 << 1))) {
 
-          double p[3], q[3];
-          int intersect;
+            struct point_list_element * intersect_points[2];
 
-          // get intersection points
-          intersect = intersect_vec(prev_src_point->edge_type,
-                                    prev_src_point->vec_coords,
-                                    curr_src_point->vec_coords,
-                                    prev_tgt_point->edge_type,
-                                    prev_tgt_point->vec_coords,
-                                    curr_tgt_point->vec_coords,
-                                    p, q);
+            // if the previous point was inside or current edge is the last one
+            if ((prev_is_inside || prev_src_point == source_list->last) &&
+                (prev_is_inside != 2)) {
 
-          // if there is an intersection possible
-          if (intersect != -1) {
+              intersect_points[0] = get_free_point_list_element(source_list);
+              prev_src_point->next = intersect_points[0];
+              intersect_points[0]->next = curr_src_point;
 
-            // if both edges are on an identical great circle
-            if (intersect & (1 << 4))
-              abort_message("ERROR: edges on identical circle, this case should"
-                            " have been handled somewhere else\n", __FILE__, __LINE__);
+              if (prev_src_point == source_list->last)
+                source_list->last = intersect_points[0];
 
-            // if there are two intersection points with the source edge
-            if ((intersect & ((1 << 0) | (1 << 1))) == ((1 << 0) | (1 << 1))) {
+            } else {
+              intersect_points[0] = prev_src_point;
+              intersect_points[0]->to_be_removed = 0;
+            }
 
-              struct point_list_element * intersect_points[2];
+            // second intersection point
+            intersect_points[1] = get_free_point_list_element(source_list);
 
-              // if the previous point was inside or current edge is the last one
-              if ((prev_is_inside || prev_src_point == source_list.last) &&
-                  (prev_is_inside != 2)) {
+            if (intersect_points[0] == source_list->last)
+              source_list->first = intersect_points[1];
 
-                intersect_points[0] = get_free_point_list_element(&source_list);
-                prev_src_point->next = intersect_points[0];
-                intersect_points[0]->next = curr_src_point;
+            intersect_points[1]->next = intersect_points[0]->next;
+            intersect_points[0]->next = intersect_points[1];
 
-                if (prev_src_point == source_list.last)
-                  source_list.last = intersect_points[0];
+            int p_is_first = get_vector_angle(prev_src_point->vec_coords, p) <
+                             get_vector_angle(prev_src_point->vec_coords, q);
+            enum edge_type prev_src_point_edge_type =
+              prev_src_point->edge_type;
 
-              } else {
-                intersect_points[0] = prev_src_point;
-                intersect_points[0]->to_be_removed = 0;
-              }
+            intersect_points[!p_is_first]->vec_coords[0] = p[0];
+            intersect_points[!p_is_first]->vec_coords[1] = p[1];
+            intersect_points[!p_is_first]->vec_coords[2] = p[2];
+            intersect_points[p_is_first]->vec_coords[0] = q[0];
+            intersect_points[p_is_first]->vec_coords[1] = q[1];
+            intersect_points[p_is_first]->vec_coords[2] = q[2];
+            intersect_points[(prev_is_inside != 0) &&
+                             (curr_is_inside != 0)]->edge_type =
+              prev_src_point->edge_type;
+            intersect_points[(prev_is_inside == 0) ||
+                             (curr_is_inside == 0)]->edge_type =
+              prev_tgt_point->edge_type;
 
-              // second intersection point
-              intersect_points[1] = get_free_point_list_element(&source_list);
-
-              if (intersect_points[0] == source_list.last)
-                source_list.first = intersect_points[1];
-
-              intersect_points[1]->next = intersect_points[0]->next;
-              intersect_points[0]->next = intersect_points[1];
-
-              int p_is_first = get_vector_angle(prev_src_point->vec_coords, p) <
-                               get_vector_angle(prev_src_point->vec_coords, q);
-              enum edge_type prev_src_point_edge_type =
-                prev_src_point->edge_type;
-
-              intersect_points[!p_is_first]->vec_coords[0] = p[0];
-              intersect_points[!p_is_first]->vec_coords[1] = p[1];
-              intersect_points[!p_is_first]->vec_coords[2] = p[2];
-              intersect_points[p_is_first]->vec_coords[0] = q[0];
-              intersect_points[p_is_first]->vec_coords[1] = q[1];
-              intersect_points[p_is_first]->vec_coords[2] = q[2];
-              intersect_points[(prev_is_inside != 0) &&
-                               (curr_is_inside != 0)]->edge_type =
-                prev_src_point->edge_type;
-              intersect_points[(prev_is_inside == 0) ||
-                               (curr_is_inside == 0)]->edge_type =
-                prev_tgt_point->edge_type;
+            if (prev_is_inside == 2 || curr_is_inside == 2) {
 
               int tgt_edge_inside_src;
 
-              if ((prev_is_inside + curr_is_inside == 3) ||
-                  (prev_is_inside == 0 && curr_is_inside == 2)) {
+              {
+                double edge_middle[3];
+
+                get_edge_middle_point(p, q, prev_tgt_point->edge_type,
+                                      edge_middle);
 
                 double norm_vec[3];
 
@@ -546,14 +606,13 @@ void cell_clipping(unsigned N,
                                                norm_vec);
                     break;
                   default:
+                    norm_vec[0] = 0.0, norm_vec[1] = 0.0, norm_vec[2] = 0.0;
                     abort_message("invalid edge type\n", __FILE__, __LINE__);
                 };
 
-                tgt_edge_inside_src =
-                  (is_inside(prev_tgt_point->vec_coords, norm_vec,
-                             prev_src_point_edge_type, source_ordering) == 1) ||
-                  (is_inside(curr_tgt_point->vec_coords, norm_vec,
-                             prev_src_point_edge_type, source_ordering) == 1);
+                tgt_edge_inside_src = is_inside(edge_middle, norm_vec,
+                                                prev_src_point_edge_type,
+                                                source_ordering) != 1;
               }
 
               // if one source point is on the target edge and the other is inside
@@ -566,10 +625,10 @@ void cell_clipping(unsigned N,
                 if (curr_is_inside == 2)
                   intersect_points[1]->to_be_removed = 1;
 
-                if (curr_is_inside == 2 && tgt_edge_inside_src)
-                  curr_src_point->to_be_removed = 1;
-                if (prev_is_inside == 2 && tgt_edge_inside_src)
-                  prev_src_point->to_be_removed = 1;
+                if (curr_is_inside == 2)
+                  curr_src_point->to_be_removed = tgt_edge_inside_src;
+                if (prev_is_inside == 2)
+                  prev_src_point->to_be_removed = tgt_edge_inside_src;
               }
               if (prev_is_inside == 0 && curr_is_inside == 2) {
                 if (tgt_edge_inside_src)
@@ -577,89 +636,260 @@ void cell_clipping(unsigned N,
                 else
                   curr_src_point->to_be_removed = 1;
               }
-
-              // if the previous point has been reused for an intersection
-              if (intersect_points[0] == prev_src_point)
-                prev_is_inside = 1;
-
-            // if there is only one intersection point
-            } else if (((intersect & ((1 << 0) || (1 << 1))) != 0) &&
-                       (curr_is_inside != 2) && (prev_is_inside != 2)) {
-            
-                abort_message("ERROR: one intersection with source edge. this should"
-                              " not have happened\n", __FILE__, __LINE__);
             }
-          }
 
-        // if the one edge is a circle of latitude while the other is not
-        // and both corners are directly on the edge
-        } else if (((prev_src_point->edge_type == LAT_CIRCLE) ^
-                    (prev_tgt_point->edge_type == LAT_CIRCLE)) && 
-                   (prev_is_inside == 2) && (curr_is_inside == 2)) {
-
-          double cross_src_z, cross_tgt_z;
-
-          cross_src_z = prev_src_point->vec_coords[0] *
-                        curr_src_point->vec_coords[1] -
-                        prev_src_point->vec_coords[1] *
-                        curr_src_point->vec_coords[0];
-          cross_tgt_z = prev_tgt_point->vec_coords[0] *
-                        curr_tgt_point->vec_coords[1] -
-                        prev_tgt_point->vec_coords[1] *
-                        curr_tgt_point->vec_coords[0];
-
-          int same_ordering = source_ordering == target_ordering;
-          int same_direction = (cross_src_z > 0) == (cross_tgt_z > 0);
-
-          // if source and target cell have the same ordering and both
-          // edges have the same direction or if both cells have different
-          // ordering and the edges have different directions, then we might
-          // have to change the edge type of the source edge
-          if (same_ordering == same_direction) {
-
-            // well...it works...do not ask  ;-)
-            // ((edge is on south hemisphere) XOR (direction of source edge) XOR
-            //  (ordering of source cell))
-            if ((curr_src_point->vec_coords[2] > 0) ^
-                (cross_src_z < 0) ^ source_ordering)
-              prev_src_point->edge_type = LAT_CIRCLE;
-            else
-              prev_src_point->edge_type = GREAT_CIRCLE;
+            // if the previous point has been reused for an intersection
+            if (intersect_points[0] == prev_src_point)
+              prev_is_inside = 1;
           }
         }
 
-        // if the previous points was on the target edge and the current
-        // one is outside
-        if (prev_is_inside == 2 && curr_is_inside == 0)
-          prev_src_point->edge_type = prev_tgt_point->edge_type;
+      // if the one edge is a circle of latitude while the other is not
+      // and both corners are directly on the edge
+      } else if (((prev_src_point->edge_type == LAT_CIRCLE) ^
+                  (prev_tgt_point->edge_type == LAT_CIRCLE)) && 
+                 (prev_is_inside == 2) && (curr_is_inside == 2)) {
+
+        double cross_src_z, cross_tgt_z;
+
+        cross_src_z = (long double)prev_src_point->vec_coords[0] *
+                      (long double)curr_src_point->vec_coords[1] -
+                      (long double)prev_src_point->vec_coords[1] *
+                      (long double)curr_src_point->vec_coords[0];
+        cross_tgt_z = (long double)prev_tgt_point->vec_coords[0] *
+                      (long double)curr_tgt_point->vec_coords[1] -
+                      (long double)prev_tgt_point->vec_coords[1] *
+                      (long double)curr_tgt_point->vec_coords[0];
+
+        int same_ordering = source_ordering == target_ordering;
+        int same_direction = (cross_src_z > 0) == (cross_tgt_z > 0);
+
+        // if source and target cell have the same ordering and both
+        // edges have the same direction or if both cells have different
+        // ordering and the edges have different directions, then we might
+        // have to change the edge type of the source edge
+        if (same_ordering == same_direction) {
+
+          // well...it works...do not ask  ;-)
+          // ((edge is on south hemisphere) XOR (direction of source edge) XOR
+          //  (ordering of source cell))
+          if ((curr_src_point->vec_coords[2] > 0) ^
+              (cross_src_z < 0) ^ source_ordering)
+            prev_src_point->edge_type = LAT_CIRCLE;
+          else
+            prev_src_point->edge_type = GREAT_CIRCLE;
+        }
+      }
+
+      // if the previous points was on the target edge and the current
+      // one is outside
+      if (prev_is_inside == 2 && curr_is_inside == 0)
+        prev_src_point->edge_type = prev_tgt_point->edge_type;
+
+      if (!prev_is_inside)
+        prev_src_point->to_be_removed = 1;
+
+      prev_src_point = curr_src_point;
+      curr_src_point = curr_src_point->next;
+      prev_is_inside = curr_is_inside;
+
+    } while ((prev_src_point != source_list->last) &&
+             (source_list->first != NULL));
+
+    // remove all points that are to be deleted
+    remove_points(source_list);
 
-        if (!prev_is_inside)
-          prev_src_point->to_be_removed = 1;
+    // if there are no more corners in the source cell
+    if (source_list->first == NULL) break;
 
-        prev_src_point = curr_src_point;
-        curr_src_point = curr_src_point->next;
-        prev_is_inside = curr_is_inside;
+    prev_tgt_point = curr_tgt_point;
+    curr_tgt_point = curr_tgt_point->next;
+  }
+}
+
+static void copy_point_list(struct point_list in, struct point_list * out) {
 
-      } while ((prev_src_point != source_list.last) &&
-               (source_list.first != NULL));
+  reset_point_list(out);
 
-      // remove all points that are to be deleted
-      remove_points(&source_list);
+  struct point_list_element * curr = in.first;
+
+  if (curr == NULL) return;
+
+  struct point_list_element * newelem = get_free_point_list_element(out);
+  out->first = newelem;
+  *newelem = *curr;
+  curr = curr->next;
 
-      // if there are no more corners in the source cell
-      if (source_list.first == NULL) break;
+  do {
+
+    newelem->next = get_free_point_list_element(out);
+    newelem = newelem->next;    
+    *newelem = *curr;
+    curr = curr->next;
+    
+  } while (curr != in.first);
+
+  newelem->next = out->first;
+  out->last = newelem;
+}
+
+void cell_clipping(unsigned N,
+                   struct grid_cell * source_cell,
+                   struct grid_cell target_cell,
+                   struct grid_cell * overlap_buffer) {
+
+  unsigned ncs;               /* number of vertices of source cell */
+  unsigned nct;               /* number of vertices of target cell */
+
+  struct point_list target_list, source_list, temp_list;
+
+  unsigned target_ordering; /* ordering of target cell corners */
+  unsigned source_ordering; /* ordering of source cell corners */
+
+  double * norm_vec; /* norm vector for temporary target edge plane */
+
+  nct = target_cell.num_corners;
+
+  enum cell_type tgt_cell_type = get_cell_type(target_cell);
 
-      prev_tgt_point = curr_tgt_point;
-      curr_tgt_point = curr_tgt_point->next;
+  if (tgt_cell_type == MIXED_CELL)
+    abort_message("invalid target cell type (cell contains edges consisting "
+                  "of great circles and circles of latitude)\n", __FILE__,
+                  __LINE__);
+
+  init_point_list(&temp_list);
+
+  // generate point list for target cell (clip cell)
+  init_point_list(&target_list);
+  generate_point_list(&target_list, target_cell);
+
+  // if there is no target cell (e.g. if all edges of target cell have a length
+  // of zero)
+  if (target_list.first == NULL) {
+    free_point_list(&target_list);
+    for (unsigned i = 0; i < N; ++i)
+      overlap_buffer[i].num_corners = 0;
+    return;
+  }
+
+  struct point_list_element * prev_tgt_point = target_list.first;
+  struct point_list_element * curr_tgt_point = target_list.first->next;
+
+  norm_vec = malloc(3 * nct * sizeof(*norm_vec));
+
+  // compute norm vectors for all edges
+  // or for lat circle edges a special z value
+  for (unsigned i = 0; i < nct; ++i) {
+
+    switch (prev_tgt_point->edge_type) {
+
+      case (LON_CIRCLE) :
+      case (GREAT_CIRCLE) :
+        compute_norm_vector(prev_tgt_point->vec_coords, curr_tgt_point->vec_coords,
+                            norm_vec + 3 * i);
+        break;
+      case (LAT_CIRCLE):
+        compute_lat_circle_z_value(prev_tgt_point->vec_coords, curr_tgt_point->vec_coords,
+                            norm_vec + 3 * i);
+        break;
+      default:
+        abort_message("invalid edge type\n", __FILE__, __LINE__);
+    };
+    prev_tgt_point = curr_tgt_point;
+    curr_tgt_point = curr_tgt_point->next;
+  }
+
+  // compute target direction
+  target_ordering = get_cell_points_ordering(&target_list);
+
+  init_point_list(&source_list);
+
+  // for all source cells
+  for (unsigned n = 0; n < N; n++ ) {
+
+    overlap_buffer[n].num_corners = 0;
+
+    enum cell_type src_cell_type = get_cell_type(source_cell[n]);
+
+    if (src_cell_type == MIXED_CELL)
+      abort_message("invalid source cell type (cell contains edges consisting "
+                    "of great circles and circles of latitude)\n", __FILE__,
+                    __LINE__);
+
+    ncs = source_cell[n].num_corners;
+
+    if (ncs < 2)
+      continue;
+
+    // generate point list for current source list
+    generate_point_list(&source_list, source_cell[n]);
+
+    // compute source direction
+    source_ordering = get_cell_points_ordering(&source_list);
+
+    struct point_list * overlap;
+
+    // in this case there can be some problems if the great circle cell includes
+    // a pole, but this only occurs if the lon-lat cell is the target cell
+    if ((((tgt_cell_type == LON_LAT_CELL) || (tgt_cell_type == LAT_CELL)) &&
+         src_cell_type == GREAT_CIRCLE_CELL) ||
+        ((tgt_cell_type == LAT_CELL) && (src_cell_type == LAT_CELL) &&
+         (fabs(target_cell.coordinates_y[0]) >
+          fabs(source_cell[n].coordinates_y[0])))) {
+
+      curr_target_cell = source_cell[n];
+      curr_source_cell = target_cell;
+
+      copy_point_list(target_list, &temp_list);
+
+      double temp_norm_vec[3*ncs];
+      struct point_list_element * src_point = source_list.first;
+
+
+      for (unsigned i = 0; i < ncs; ++i) {
+        switch (src_point->edge_type) {
+
+          case (LON_CIRCLE) :
+          case (GREAT_CIRCLE) :
+            compute_norm_vector(src_point->vec_coords,
+                                src_point->next->vec_coords,
+                                temp_norm_vec + 3 * i);
+            break;
+          case (LAT_CIRCLE):
+            compute_lat_circle_z_value(src_point->vec_coords,
+                                       src_point->next->vec_coords,
+                                       temp_norm_vec + 3 * i);
+            break;
+          default:
+            abort_message("invalid edge type\n", __FILE__, __LINE__);
+        };
+        src_point = src_point->next;
+      }
+
+      point_list_clipping(&temp_list, target_ordering,
+                          source_list, source_ordering, ncs, temp_norm_vec);
+
+      overlap = &temp_list;
+
+    } else {
+
+      curr_target_cell = target_cell;
+      curr_source_cell = source_cell[n];
+
+      point_list_clipping(&source_list, source_ordering,
+                          target_list, target_ordering, nct, norm_vec);
+
+      overlap = &source_list;
     }
 
-    if (source_list.first != NULL)
-      generate_overlap_cell(&source_list, overlap_buffer + n);
+    if (overlap->first != NULL)
+      generate_overlap_cell(overlap, overlap_buffer + n);
   }
 
   free(norm_vec);
   free_point_list(&source_list);
   free_point_list(&target_list);
+  free_point_list(&temp_list);
 }
 
 /* ---------------------------------------------------- */
@@ -801,12 +1031,8 @@ static void remove_points(struct point_list * list) {
 //! returns number of edges/corners
 static unsigned remove_zero_length_edges(struct point_list * list) {
 
-#define DOT_PRODUCT(a,b) (a->vec_coords[0] * b->vec_coords[0] + \
-                          a->vec_coords[1] * b->vec_coords[1] + \
-                          a->vec_coords[2] * b->vec_coords[2])
-
   struct point_list_element * curr = list->first;
-  double const tol = 1e-8;
+  double const tol = 1e-10;
 
   if (curr == NULL) return 0;
 
@@ -824,9 +1050,19 @@ static unsigned remove_zero_length_edges(struct point_list * list) {
   for (unsigned i = 0; i < num_edges; ++i) {
 
     // if both points are nearly identical (angle between them is very small)
-    if (get_vector_angle(curr->vec_coords, curr->next->vec_coords) < tol) {
+    if (!curr->to_be_removed &&
+        (get_vector_angle(curr->vec_coords, curr->next->vec_coords) < tol)) {
       curr->to_be_removed = 1;
       temp_num_edges--;
+    } else if (curr->edge_type == LAT_CIRCLE &&
+               curr->next->edge_type == LAT_CIRCLE &&
+               (fabs(get_angle(atan2(curr->vec_coords[1] ,
+                                     curr->vec_coords[0]),
+                               atan2(curr->next->next->vec_coords[1] ,
+                                     curr->next->next->vec_coords[0]))) <
+                M_PI_2)) {
+      curr->next->to_be_removed = 1;
+      temp_num_edges--;
     }
 
     curr = curr->next;
@@ -847,21 +1083,19 @@ static void generate_point_list(struct point_list * list,
   struct point_list_element * curr = get_free_point_list_element(list);
 
   list->first = curr;
-  LLtoXYZ(cell.coordinates_x[0], cell.coordinates_y[0], curr->vec_coords);
+  curr->vec_coords[0] = cell.coordinates_xyz[0+0*3];
+  curr->vec_coords[1] = cell.coordinates_xyz[1+0*3];
+  curr->vec_coords[2] = cell.coordinates_xyz[2+0*3];
 
   for (unsigned i = 1; i < cell.num_corners; ++i) {
 
-    double vec_coords[3];
-
-    LLtoXYZ(cell.coordinates_x[i], cell.coordinates_y[i], vec_coords);
-
     curr->next = get_free_point_list_element(list);
     curr->edge_type = cell.edge_type[i - 1];
     curr = curr->next;
 
-    curr->vec_coords[0] = vec_coords[0];
-    curr->vec_coords[1] = vec_coords[1];
-    curr->vec_coords[2] = vec_coords[2];
+    curr->vec_coords[0] = cell.coordinates_xyz[0+i*3];
+    curr->vec_coords[1] = cell.coordinates_xyz[1+i*3];
+    curr->vec_coords[2] = cell.coordinates_xyz[2+i*3];
     curr->edge_type = cell.edge_type[i];
   }
 
@@ -928,17 +1162,6 @@ static void free_point_list(struct point_list * list) {
   list->free_elements = NULL;
 }
 
-static int is_lat_cell(struct point_list * list, unsigned num_edges) {
-
-  struct point_list_element * curr = list->first;
-  int lat_cell = 1;
-
-  for (unsigned i = 0; i < num_edges; ++i, curr = curr->next)
-    lat_cell &= curr->edge_type == LAT_CIRCLE;
-
-  return lat_cell;
-}
-
 static int is_empty_gc_cell(struct point_list * list, unsigned num_edges) {
 
   double const tol = 1e-6;
@@ -989,36 +1212,35 @@ static void generate_overlap_cell(struct point_list * list,
   unsigned num_edges = remove_zero_length_edges(list);
 
   if ((num_edges < 2) ||
-      is_lat_cell(list, num_edges) ||
       is_empty_gc_cell(list, num_edges)){
 
     reset_point_list(list);
+    cell->num_corners = 0;
     return;
   }
-  /*
-  if ( num_edges > cell->num_corners )
-    {
-      cell->coordinates_x = realloc(cell->coordinates_x, num_edges * sizeof(*cell->coordinates_x));
-      cell->coordinates_y = realloc(cell->coordinates_y, num_edges * sizeof(*cell->coordinates_y));
-      cell->edge_type = realloc(cell->edge_type, num_edges * sizeof(*cell->edge_type));
-      cell->num_corners = num_edges;
-    }
-  */
-  cell->coordinates_x = malloc(num_edges * sizeof(*cell->coordinates_x));
-  cell->coordinates_y = malloc(num_edges * sizeof(*cell->coordinates_y));
-  cell->edge_type = malloc(num_edges * sizeof(*cell->edge_type));
+
+  if (num_edges > cell->array_size) {
+    free(cell->coordinates_x);
+    free(cell->coordinates_y);
+    free(cell->coordinates_xyz);
+    free(cell->edge_type);
+    cell->coordinates_x = malloc(num_edges * sizeof(*cell->coordinates_x));
+    cell->coordinates_y = malloc(num_edges * sizeof(*cell->coordinates_y));
+    cell->coordinates_xyz = malloc(3 * num_edges * sizeof(*cell->coordinates_xyz));
+    cell->edge_type = malloc(num_edges * sizeof(*cell->edge_type));
+    cell->array_size = num_edges;
+  }
   cell->num_corners = num_edges;
 
   struct point_list_element * curr = list->first;
 
   for (unsigned i = 0; i < num_edges; ++i) {
 
-    struct point p;
-
-    XYZtoLL(curr->vec_coords, &p.lon, &p.lat);
 
-    cell->coordinates_x[i] = p.lon;
-    cell->coordinates_y[i] = p.lat;
+    XYZtoLL(curr->vec_coords, cell->coordinates_x+i, cell->coordinates_y+i);
+    cell->coordinates_xyz[0+i*3] = curr->vec_coords[0];
+    cell->coordinates_xyz[1+i*3] = curr->vec_coords[1];
+    cell->coordinates_xyz[2+i*3] = curr->vec_coords[2];
     cell->edge_type[i] = curr->edge_type;
 
     curr = curr->next;
diff --git a/src/clipping/clipping.h b/src/clipping/clipping.h
index fbbb278..78f8b4b 100644
--- a/src/clipping/clipping.h
+++ b/src/clipping/clipping.h
@@ -58,7 +58,12 @@
   * @param[in] overlap_buffer buffer for the overlaps between the target and
   *                           the source cells
   *
-  * \remark Valid for convex cells only!
+  * \remark source and target cells have to be convex
+  * \remark cells in overlap_buffer can be concave
+  * \remark overlap_buffer must contain valid grid_cells (have to be initialised
+  *         using \ref init_grid_cell; initialisation have to be done only once,
+  *         in consecutive calls, the cells can be reused with have to be
+  *         reinitialised)
   *
  **/
 void cell_clipping ( unsigned N,
@@ -82,17 +87,13 @@ void cell_clipping ( unsigned N,
   * covered by N source cells the N partial areas should add up to the area of
   * the target cell.
   *
-  * The vertices of source and target cells can be either provided in a clockwise
-  * or anticlockwise sense. However, the same sense must be used for source and
-  * target cells.
-  *
   * @param[in]  N             number of source cells
   * @param[in]  source_cell   list of source cells
   * @param[in]  target_cell   target cell
   * @param[out] partial_areas list of N partial weights, one weight for each
   *                           source-target intersection
   *
-  * \remark Valid for convex cells only!
+  * \remark source and target cell have to be convex
   *
  **/
 void compute_overlap_areas(unsigned N,
diff --git a/src/clipping/geometry.h b/src/clipping/geometry.h
index 8d8d3a5..645f650 100644
--- a/src/clipping/geometry.h
+++ b/src/clipping/geometry.h
@@ -41,6 +41,9 @@
 #define GEOMETRY_H
 
 #include "grid.h"
+#include "utils.h"
+
+extern const double angle_tol;
 
 struct line {
    struct {
@@ -106,10 +109,12 @@ int check_overlap_cells2 (struct grid_cell const cell_a,
 /**
  * checks whether a given point is within a given cell \n
  * @param[in] point
+ * @param[in] point_coords
  * @param[in] cell
  * @return 0 if the point is not in the cell
  */
-int point_in_cell (struct point point, struct grid_cell cell);
+int point_in_cell (struct point point, double point_coords[3],
+                   struct grid_cell cell);
 
 /** \example test_point_in_cell.c
  * This contains examples on how to use point_in_cell.
@@ -118,12 +123,13 @@ int point_in_cell (struct point point, struct grid_cell cell);
 /**
  * checks whether a given point is within a given cell \n
  * @param[in] point
+ * @param[in] point_coords
  * @param[in] cell
  * @param[in] bnd_circle
  * @return 0 if the point is not in the cell
  */
-int point_in_cell2 (struct point point, struct grid_cell cell,
-                    struct bounding_circle bnd_circle);
+int point_in_cell2 (struct point point,  double point_coords[3],
+                    struct grid_cell cell, struct bounding_circle bnd_circle);
 
 /**
  * computes the angle between two longitude coordinates (in rad) \n
@@ -132,7 +138,10 @@ int point_in_cell2 (struct point point, struct grid_cell cell,
  * @param[in] b_lon
  * @return angle between both coordinates (in rad)
  */
-double get_angle(double a_lon, double b_lon);
+static inline double get_angle (double a_lon, double b_lon) {
+   double diff = a_lon - b_lon;
+   return diff - round(diff / (2.0 * M_PI)) * (2.0 * M_PI);
+}
 
 /** \example test_find_overlap.c
  * This contains an example on how to use find_overlapping_cells.
@@ -200,6 +209,7 @@ void find_overlapping_cells_s (struct grid_cell src_cell,
  * @param[out] p intersection point
  * @param[out] q intersection point
  * @return  0 if the intersection points are neither on edge a or b \n
+ *          -1 if an error occurred \n
  *          1st bit will be set if p is on edge a \n
  *          2nd bit will be set if q is on edge a \n
  *          3rd bit will be set if p is on edge b \n
@@ -221,6 +231,7 @@ int gcxgc (struct edge edge_a, struct edge edge_b,
  * @param[out] p intersection point
  * @param[out] q intersection point
  * @return  0 if the intersection points are neither on edge a or b \n
+ *          -1 if an error occurred \n
  *          1st bit will be set if p is on edge a \n
  *          2nd bit will be set if q is on edge a \n
  *          3rd bit will be set if p is on edge b \n
@@ -543,12 +554,31 @@ unsigned point_in_bounding_circle(struct point point,
                                   struct bounding_circle * bnd_circle);
 
 /**
+ * checks whether a point is within a bounding circle
+ * @param[in] point_vector point to be checked
+ * @param[in] bnd_circle bounding circle
+ * @return 0 if point is not within the bounding circle
+ */
+unsigned point_in_bounding_circle_vec(double point_vector[3],
+                                      struct bounding_circle * bnd_circle);
+
+/**
  * converts lon-lat coordinates into xyz ones
+ *
+ * Further information:
+ * http://en.wikipedia.org/wiki/List_of_common_coordinate_transformations
+ *
  * @param[in]  lon   longitude coordinates in radian
  * @param[in]  lat   latitude coordinates in radian
  * @param[out] p_out xyz coordinates
  */
-void LLtoXYZ(double lon, double lat, double p_out[]);
+static inline void LLtoXYZ(double lon, double lat, double p_out[]) {
+
+   double cos_lat = cos(lat);
+   p_out[0] = cos_lat * cos(lon);
+   p_out[1] = cos_lat * sin(lon);
+   p_out[2] = sin(lat);
+}
 
 /**
  * converts lon-lat coordinates into xyz ones
@@ -556,23 +586,73 @@ void LLtoXYZ(double lon, double lat, double p_out[]);
  * @param[in]  lat   latitude coordinates in deg
  * @param[out] p_out xyz coordinates
  */
-void LLtoXYZ_deg(double lon, double lat, double p_out[]);
+static inline void LLtoXYZ_deg(double lon, double lat, double p_out[]) {
+   LLtoXYZ(lon*rad, lat*rad, p_out);
+}
 
 /**
  * converts lon-lat coordinates into xyz ones
+ *
+ * Further information:
+ * http://en.wikipedia.org/wiki/List_of_common_coordinate_transformations
+ *
  * @param[in]  p_in xyz coordinates
  * @param[out] lon  longitude coordinate in radian
  * @param[out] lat  latitude coordinate in radian
  */
-void XYZtoLL(double p_in[], double * lon, double * lat);
+static inline void XYZtoLL (double p_in[], double * lon, double * lat) {
+
+   *lon = atan2(p_in[1] , p_in[0]);
+   *lat = M_PI_2 - acos(p_in[2]);
+}
+
+static inline void crossproduct_ld (double a[], double b[], double cross[]) {
+
+/* crossproduct in Cartesian coordinates */
+
+   long double a_[3] = {a[0], a[1], a[2]};
+   long double b_[3] = {b[0], b[1], b[2]};
+
+   cross[0] = a_[1] * b_[2] - a_[2] * b_[1];
+   cross[1] = a_[2] * b_[0] - a_[0] * b_[2];
+   cross[2] = a_[0] * b_[1] - a_[1] * b_[0];
+}
+
+/**
+ * for small angles <= 1e-?8? the crossproduct is inaccurate\n
+ * use \ref crossproduct_ld for these cases
+ */
+static inline void crossproduct_d (double a[], double b[], double cross[]) {
+
+/* crossproduct in Cartesian coordinates */
+
+   cross[0] = a[1] * b[2] - a[2] * b[1];
+   cross[1] = a[2] * b[0] - a[0] * b[2];
+   cross[2] = a[0] * b[1] - a[1] * b[0];
+}
 
 /**
  * computes the great circle distance in rad for two points given in xyz coordinates
- * @param[in] a_vector point coordinates of point a
- * @param[in] b_vector point coordinates of point b
+ * taken from http://johnblackburne.blogspot.de/2012/05/angle-between-two-3d-vectors.html
+ * @param[in] a point coordinates of point a
+ * @param[in] b point coordinates of point b
  * @return great circle distance in rad between both points
  */
-double get_vector_angle(double a_vector[3], double b_vector[3]);
+static inline double get_vector_angle(double a[3], double b[3]) {
+   double cross[3], dot, cross_abs;
+
+   crossproduct_ld(a, b, cross);
+   dot = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+   cross_abs = sqrt(cross[0]*cross[0] + cross[1]*cross[1] + cross[2]*cross[2]);
+
+   //   return fabs(atan2(cross_abs, dot));
+   double asin_tmp = asin(cross_abs);
+
+   if (dot < 0.0) // if the angle is bigger than (PI / 2)
+     return M_PI - asin_tmp;
+   else
+     return asin_tmp;
+}
 
 /**
  * computes the great circle distance in rad for two points given in lon-lat coordinates
@@ -582,4 +662,18 @@ double get_vector_angle(double a_vector[3], double b_vector[3]);
  */
 double get_point_angle(struct point * a, struct point * b);
 
+/**
+ * determines whether two edges intersect
+ * @param[in] edge_a first edge
+ * @param[in] a      3d coordinate of first point of first edge
+ * @param[in] b      3d coordinate of second point of first edge
+ * @param[in] edge_b second edge
+ * @param[in] c      3d coordinate of first point of second edge
+ * @param[in] d      3d coordinate of second point of second edge
+ * @return 0 if edges do not intersect\n
+ *         1 if edges intersect
+ */
+int do_intersect (struct edge edge_a, double a[3], double b[3],
+                  struct edge edge_b, double c[3], double d[3]);
+
 #endif // GEOMETRY_H
diff --git a/src/clipping/geometry_tools.c b/src/clipping/geometry_tools.c
index 7961ca8..f60f7a3 100644
--- a/src/clipping/geometry_tools.c
+++ b/src/clipping/geometry_tools.c
@@ -1,120 +1,39 @@
-/**
- * @file geometry_tools.c
- * @brief Set of functions to work with coordinates
- *
- * Note: Not all functions are documented by Doxygen. See the source code
- * and \ref geometry.h for further details.
- *
- * @copyright Copyright  (C)  2013 Moritz Hanke <hanke at dkrz.de>
- *                                 Rene Redler <rene.redler at mpimet.mpg.de>
- *
- * @version 1.0
- * @author Moritz Hanke <hanke at dkrz.de>
- *         Rene Redler <rene.redler at mpimet.mpg.de>
- */
-/*
- * Keywords:
- * Maintainer: Moritz Hanke <hanke at dkrz.de>
- *             Rene Redler <rene.redler at mpimet.mpg.de>
- * URL: https://redmine.dkrz.de/doc/YAC/html/index.html
- *
- * This file is part of YAC.
- *
- * YAC 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 3 of the License, or
- * (at your option) any later version.
- *
- * YAC 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 YAC.  If not, see <http://www.gnu.org/licenses/gpl.txt>.
- */
-
-#include <math.h>
-
-#include "geometry.h"
-
-double get_vector_angle(double a_vector[3], double b_vector[3]) {
-
-   double dot_product = a_vector[0]*b_vector[0]+a_vector[1]*b_vector[1]+a_vector[2]*b_vector[2];
-
-   double angle;
-
-   // the acos most accurate in the range [-0.5;0.5]
-   if (fabs(dot_product) <= 0.5) // the range in which the acos is most accurate
-      angle = acos(dot_product);
-   else {
-
-#define CROSS_PRODUCT3D(out,a,b) \
-  out[0]=a[1]*b[2]-a[2]*b[1]; \
-  out[1]=a[2]*b[0]-a[0]*b[2]; \
-  out[2]=a[0]*b[1]-a[1]*b[0];
-#define NORM(a) sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])
-
-      double temp_vector[3];
-
-      CROSS_PRODUCT3D(temp_vector, a_vector, b_vector);
-
-      double asin_tmp = asin(NORM(temp_vector));
-
-      if (dot_product < 0.0) // if the angle is bigger than (PI / 2)
-         angle = M_PI - asin_tmp;
-      else
-         angle = asin_tmp;
-
-#undef NORM
-#undef CROSS_PRODUCT3D
-   }
-
-   if (angle < 0.0) return 0;
-   if (angle > M_PI) return M_PI;
-   return angle;
-}
-
-  /* Taken from http://www.geoclub.de/viewtopic.php?f=54&t=29689
-
-     Further information:
-     http://en.wikipedia.org/wiki/List_of_common_coordinate_transformations */
-
-void LLtoXYZ(double lon, double lat, double p_out[]) {
-
-   double cos_lat = cos(lat);
-   p_out[0] = cos_lat * cos(lon);
-   p_out[1] = cos_lat * sin(lon);
-   p_out[2] = sin(lat);
-}
-
-void LLtoXYZ_deg(double lon, double lat, double p_out[]) {
-
-   lon *= rad;
-   lat *= rad;
-
-   LLtoXYZ(lon, lat, p_out);
-}
-
-/** \brief compute longitude angle between two points in radian 
-**/
-double get_angle (double a_lon, double b_lon) {
-
-   while (a_lon - b_lon >   M_PI) b_lon += 2 * M_PI;
-   while (a_lon - b_lon < - M_PI) b_lon -= 2 * M_PI;
-
-   return a_lon - b_lon;
-}
-
-void XYZtoLL (double p_in[], double * lon, double * lat) {
-
-/*  convert from cartesian to spherical coordinates
-    taken from:
-    http://www.geoclub.de/viewtopic.php?f=54&t=29689
-
-    Further information:
-    http://en.wikipedia.org/wiki/List_of_common_coordinate_transformations */
-
-   *lon = atan2(p_in[1] , p_in[0]);
-   *lat = M_PI_2 - acos(p_in[2]);
-}
+/**
+ * @file geometry_tools.c
+ * @brief Set of functions to work with coordinates
+ *
+ * Note: Not all functions are documented by Doxygen. See the source code
+ * and \ref geometry.h for further details.
+ *
+ * @copyright Copyright  (C)  2013 Moritz Hanke <hanke at dkrz.de>
+ *                                 Rene Redler <rene.redler at mpimet.mpg.de>
+ *
+ * @version 1.0
+ * @author Moritz Hanke <hanke at dkrz.de>
+ *         Rene Redler <rene.redler at mpimet.mpg.de>
+ */
+/*
+ * Keywords:
+ * Maintainer: Moritz Hanke <hanke at dkrz.de>
+ *             Rene Redler <rene.redler at mpimet.mpg.de>
+ * URL: https://redmine.dkrz.de/doc/YAC/html/index.html
+ *
+ * This file is part of YAC.
+ *
+ * YAC 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * YAC 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 YAC.  If not, see <http://www.gnu.org/licenses/gpl.txt>.
+ */
+
+#include <math.h>
+
+#include "geometry.h"
diff --git a/src/clipping/grid.h b/src/clipping/grid.h
index 92c2697..779c88f 100644
--- a/src/clipping/grid.h
+++ b/src/clipping/grid.h
@@ -48,6 +48,14 @@
 #include "math.h"
 #include "grid_cell.h"
 
+#ifndef  M_PI
+#define  M_PI        3.14159265358979323846264338327950288  /* pi */
+#endif
+
+#ifndef  M_PI_2
+#define  M_PI_2      1.57079632679489661923132169163975144  /* pi/2 */
+#endif
+
 #define EARTH_RADIUS 6371.2290
 
 static double const EarthRadius  = EARTH_RADIUS;
@@ -101,7 +109,7 @@ struct grid_vtable {
    void (*pack_grid)(struct grid *, double **, unsigned, unsigned *, unsigned *,
                      unsigned **, unsigned, unsigned *, unsigned *);
    struct grid_search * (*get_grid_search)(struct grid * grid);
-   void (*delete)(struct grid *);
+   void (*xdelete)(struct grid *);
 };
 
 struct grid {
@@ -458,7 +466,9 @@ struct grid * unpack_grid(double * dble_buf, unsigned * dble_buf_data_size,
 /**
  * generates a grid search object for the given grid
  * @param[in] grid
- * @return 
+ * @return grid_search object for the provided grid
+ * @remark the grid_search object returned by this routine is deleted by
+ *         \ref delete_grid
  */
 struct grid_search * get_grid_search(struct grid * grid);
 
diff --git a/src/clipping/grid_cell.c b/src/clipping/grid_cell.c
index f099f68..3d8c36f 100644
--- a/src/clipping/grid_cell.c
+++ b/src/clipping/grid_cell.c
@@ -35,49 +35,48 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "grid_cell.h"
 #include "utils.h"
 #include "ensure_array_size.h"
+#include "geometry.h"
 
 void init_grid_cell(struct grid_cell * cell) {
 
    cell->coordinates_x = NULL;
    cell->coordinates_y = NULL;
+   cell->coordinates_xyz = NULL;
    cell->edge_type = NULL;
    cell->num_corners = 0;
+   cell->array_size = 0;
 }
 
 void copy_grid_cell(struct grid_cell in_cell, struct grid_cell * out_cell) {
 
-   int flag;
-
-   flag = ((out_cell->coordinates_x == NULL) << 0) +
-          ((out_cell->coordinates_y == NULL) << 1) +
-          ((out_cell->edge_type == NULL)     << 2);
-
-   if (flag != 0 && flag != 7)
-      abort_message("ERROR: inconsistent grid_cell data structure\n",
-                    __FILE__, __LINE__);
-
-   if ((out_cell->coordinates_x == NULL) ||
-       (in_cell.num_corners > out_cell->num_corners)) {
+   if (in_cell.num_corners > out_cell->array_size) {
 
       free(out_cell->coordinates_x);
       free(out_cell->coordinates_y);
+      free(out_cell->coordinates_xyz);
       free(out_cell->edge_type);
       out_cell->coordinates_x = malloc(in_cell.num_corners *
                                        sizeof(*(out_cell->coordinates_x)));
       out_cell->coordinates_y = malloc(in_cell.num_corners *
                                        sizeof(*(out_cell->coordinates_y)));
+      out_cell->coordinates_xyz = malloc(3 * in_cell.num_corners *
+                                         sizeof(*(out_cell->coordinates_xyz)));
       out_cell->edge_type = malloc(in_cell.num_corners *
                                    sizeof(*(out_cell->edge_type)));
+      out_cell->array_size = in_cell.num_corners;
    }
 
    memcpy(out_cell->coordinates_x, in_cell.coordinates_x,
           in_cell.num_corners * sizeof(*(out_cell->coordinates_x)));
    memcpy(out_cell->coordinates_y, in_cell.coordinates_y,
           in_cell.num_corners * sizeof(*(out_cell->coordinates_y)));
+   memcpy(out_cell->coordinates_xyz, in_cell.coordinates_xyz,
+          3 * in_cell.num_corners * sizeof(*(out_cell->coordinates_xyz)));
    memcpy(out_cell->edge_type, in_cell.edge_type,
           in_cell.num_corners * sizeof(*(out_cell->edge_type)));
    out_cell->num_corners = in_cell.num_corners;
@@ -87,6 +86,7 @@ void free_grid_cell(struct grid_cell * cell) {
 
    if (cell->coordinates_x != NULL) free(cell->coordinates_x);
    if (cell->coordinates_y != NULL) free(cell->coordinates_y);
+   if (cell->coordinates_xyz != NULL) free(cell->coordinates_xyz);
    if (cell->edge_type != NULL) free(cell->edge_type);
 
    init_grid_cell(cell);
@@ -132,10 +132,19 @@ void unpack_grid_cell(struct grid_cell * cell, double * dble_buf,
    *dble_buf_data_size = 2 * num_corners;
    *uint_buf_data_size = num_corners + 1;
 
-   if (num_corners != cell->num_corners) {
-      cell->coordinates_x = realloc (cell->coordinates_x, num_corners * sizeof(cell->coordinates_x[0]));
-      cell->coordinates_y = realloc (cell->coordinates_y, num_corners * sizeof(cell->coordinates_y[0]));
-      cell->edge_type = realloc (cell->edge_type, num_corners * sizeof(cell->edge_type[0]));
+   if (num_corners > cell->array_size) {
+      cell->coordinates_x = realloc(cell->coordinates_x,
+                                    num_corners *
+                                    sizeof(cell->coordinates_x[0]));
+      cell->coordinates_y = realloc(cell->coordinates_y,
+                                    num_corners *
+                                    sizeof(cell->coordinates_y[0]));
+      cell->coordinates_xyz = realloc(cell->coordinates_xyz,
+                                      3 * num_corners *
+                                      sizeof(cell->coordinates_xyz[0]));
+      cell->edge_type = realloc(cell->edge_type,
+                                num_corners * sizeof(cell->edge_type[0]));
+      cell->array_size = num_corners;
    }
 
    cell->num_corners = num_corners;
@@ -143,6 +152,47 @@ void unpack_grid_cell(struct grid_cell * cell, double * dble_buf,
    memcpy(cell->coordinates_y, dble_buf+num_corners, num_corners * sizeof(double));
 
    unsigned i;
-   for (i = 1; i <= num_corners; ++i)
+   for (i = 1; i <= num_corners; ++i) {
      cell->edge_type[i-1] = (enum edge_type)uint_buf[i];
+     LLtoXYZ(cell->coordinates_x[i], cell->coordinates_y[i],
+             cell->coordinates_xyz + 3*i);
+   }
+}
+
+void print_grid_cell(FILE * stream, struct grid_cell cell, char * name) {
+
+  char * out = NULL;
+  unsigned out_array_size = 0;
+  unsigned out_size = 0;
+
+  if (name != NULL) {
+
+    out_size = strlen(name) + 1 + 1 + 1;
+    ENSURE_ARRAY_SIZE(out, out_array_size, out_size);
+
+    strcpy(out, name);
+    strcat(out, ":\n");
+  }
+
+  for (unsigned i = 0; i < cell.num_corners; ++i) {
+
+    char buffer[1024];
+
+    sprintf(buffer, "%d x %.16f y %.16f %s\n", i, cell.coordinates_x[i],
+           cell.coordinates_y[i],
+           (cell.edge_type[i] == LAT_CIRCLE)?("LAT_CIRCLE"):
+           ((cell.edge_type[i] == LON_CIRCLE)?("LON_CIRCLE"):
+                                              ("GREAT_CIRCLE")));
+
+    out_size += strlen(buffer);
+
+    ENSURE_ARRAY_SIZE(out, out_array_size, out_size);
+
+    strcat(out, buffer);
+  }
+
+  if (out != NULL)
+    fputs(out, stream);
+
+  free(out);
 }
diff --git a/src/clipping/grid_cell.h b/src/clipping/grid_cell.h
index 64d9a43..6e50c23 100644
--- a/src/clipping/grid_cell.h
+++ b/src/clipping/grid_cell.h
@@ -31,6 +31,8 @@
  * along with YAC.  If not, see <http://www.gnu.org/licenses/gpl.txt>.
  */
 
+#include <stdio.h>
+
 #ifndef GRID_CELL_H
 #define GRID_CELL_H
 
@@ -42,8 +44,11 @@ enum edge_type {
 
 struct grid_cell {
    double * coordinates_x, * coordinates_y;
+   double * coordinates_xyz;
    enum edge_type * edge_type;
    unsigned num_corners;
+   unsigned array_size; //!< size in elements of the arrays: coordinates_x,
+                        //!< coordinates_y, edge_type and 1/3 of coordinates_xyz
 };
 
 /**
@@ -81,4 +86,6 @@ void unpack_grid_cell(struct grid_cell * cell, double * dble_buf,
                       unsigned * dble_buf_data_size, unsigned * uint_buf,
                       unsigned * uint_buf_data_size);
 
+void print_grid_cell(FILE * stream, struct grid_cell cell, char * name);
+
 #endif // GRID_CELL_H
diff --git a/src/clipping/intersection.c b/src/clipping/intersection.c
index 5aac186..84f3d9e 100644
--- a/src/clipping/intersection.c
+++ b/src/clipping/intersection.c
@@ -36,74 +36,58 @@
 
 #include <stdlib.h>
 #include <math.h>
+#include <stdio.h>
 
 #include "utils.h"
 #include "geometry.h"
 
-static double const tol = 1.0e-12;
+// angle tolerance
+const double angle_tol = 1e-9;
+static double const tol = 1.0e-10;
 
-static void crossproduct (double a[], double b[], double cross[]) {
+static int vector_is_between (double a[], double b[], double p[],
+                              double * angle_ab, double dot_ab) {
 
-/* crossproduct in cartesian coordinates */
+   double dot_ap = a[0]*p[0] + a[1]*p[1] + a[2]*p[2];
+   double dot_pb = p[0]*b[0] + p[1]*b[1] + p[2]*b[2];
 
-   cross[0] = a[1] * b[2] - a[2] * b[1];
-   cross[1] = a[2] * b[0] - a[0] * b[2];
-   cross[2] = a[0] * b[1] - a[1] * b[0];
-}
+   // catches most obvious false-cases
+   if ((dot_ap < dot_ab - 0.1) ||
+       (dot_pb < dot_ab - 0.1))
+   return 0;
 
-static int vector_is_between (double a[], double b[], double p[], double e_ab[]) {
+   if (*angle_ab < 0)
+      *angle_ab = get_vector_angle(a, b);
 
 /* determines whether p is between a and b
    (a, b, p are in the same plane AB)
-   e_ab is the crossproduct of a and b */
-
-   // if a and b are the same point
-   if (fabs(e_ab[0]) < tol && fabs(e_ab[1]) < tol && fabs(e_ab[2]) < tol) {
-
-      return fabs(a[0]-p[0]) < tol &&
-             fabs(a[1]-p[1]) < tol &&
-             fabs(a[2]-p[2]) < tol;
-   }
-
-   double cross_ap, cross_pb; // we only need one element of the cross product
-   int needed_index;
+   angle_ab is the angle between a and b */
 
-   needed_index = 0;
-   if (fabs(e_ab[1]) > fabs(e_ab[0])) needed_index |= 1;
-   if (fabs(e_ab[2]) > fabs(e_ab[0])) needed_index |= 2;
-   if (fabs(e_ab[2]) > fabs(e_ab[1])) needed_index |= 4;
-
-   switch (needed_index) {
-      case (0): // index 0 is biggest value in e_ab
-      case (4):
-         cross_ap = a[1] * p[2] - a[2] * p[1];
-         cross_pb = p[1] * b[2] - p[2] * b[1];
+   return fabs(get_vector_angle(a, p) +
+               get_vector_angle(b, p) -
+               *angle_ab) < angle_tol;
+}
 
-         return (e_ab[0] > - tol && cross_ap > - tol && cross_pb > - tol) ||
-                (e_ab[0] < + tol && cross_ap < + tol && cross_pb < + tol);
+static int vector_is_between_lat (double a[], double b[], double p[]) {
 
-      case (1): // index 1 is biggest value in e_ab
-      case (3):
-         cross_ap = a[2] * p[0] - a[0] * p[2];
-         cross_pb = p[2] * b[0] - p[0] * b[2];
+/* determines whether p is between a and b
+   (a, b, p have the same latitude)*/
 
-         return (e_ab[1] > - tol && cross_ap > - tol && cross_pb > - tol) ||
-                (e_ab[1] < + tol && cross_ap < + tol && cross_pb < + tol);
+   if (fabs(fabs(a[2]) - 1.0) < tol) return 1;
 
-      case (6): // index 2 is biggest value in e_ab
-      case (7):
-         cross_ap = a[0] * p[1] - a[1] * p[0];
-         cross_pb = p[0] * b[1] - p[1] * b[0];
+   long double a_0 = a[0], a_1 = a[1];
+   long double b_0 = b[0], b_1 = b[1];
+   long double p_0 = p[0], p_1 = p[1];
 
+   if (((a_0*p_0+a_1*p_1) < 0) || ((b_0*p_0+b_1*p_1) < 0))
+    return 0;
 
-         return (e_ab[2] > - tol && cross_ap > - tol && cross_pb > - tol) ||
-                (e_ab[2] < + tol && cross_ap < + tol && cross_pb < + tol);
+   double cross_ab = fabs(a_0*b_1-a_1*b_0);
+   double cross_ap = fabs(a_0*p_1-a_1*p_0);
+   double cross_bp = fabs(b_0*p_1-b_1*p_0);
 
-      default:
-         abort_message("internal error", __FILE__, __LINE__);
-         // this function should never reach this point...
-         return -1;
-   };
+   // maybe this should be the cross_** should be scaled by z at some point
+   return (cross_ap < cross_ab + tol) && (cross_bp < cross_ab + tol);
 }
 
 /** \brief compute the intersection points of two great circles
@@ -112,6 +96,7 @@ static int vector_is_between (double a[], double b[], double p[], double e_ab[])
   *
   * the return value is :
   *    -  0 if the intersection points are neither between (a and b) or (c and d)
+  *    - -1 if an error occurred
   *    - 1st bit will be set if p is between a and b
   *    - 2nd bit will be set if q is between a and b
   *    - 3rd bit will be set if p is between c and d
@@ -146,6 +131,7 @@ static int vector_is_between (double a[], double b[], double p[], double e_ab[])
   *
   * the return value is :
   *    -  0 if the intersection points are neither between (a and b) or (c and d)
+  *    - -1 if an error occurred
   *    - 1st bit will be set if p is between a and b
   *    - 2nd bit will be set if q is between a and b
   *    - 3rd bit will be set if p is between c and d
@@ -160,42 +146,125 @@ static int vector_is_between (double a[], double b[], double p[], double e_ab[])
 
    double e_ab[3], e_cd[3], n;
    double cross_ab[3], cross_cd[3];
+   int ab_is_point, cd_is_point;
 
    // compute unit vector of ab plane
-   crossproduct(a, b, cross_ab);
-   n = 1.0 / sqrt(cross_ab[0] * cross_ab[0] +
-                  cross_ab[1] * cross_ab[1] +
-                  cross_ab[2] * cross_ab[2]);
-   e_ab[0] = cross_ab[0] * n;
-   e_ab[1] = cross_ab[1] * n;
-   e_ab[2] = cross_ab[2] * n;
+   crossproduct_ld(a, b, cross_ab);
+   n = sqrt(cross_ab[0] * cross_ab[0] +
+            cross_ab[1] * cross_ab[1] +
+            cross_ab[2] * cross_ab[2]);
+
+   ab_is_point = n < tol;
+
+   if (!ab_is_point) {
+
+      n = 1.0 / n;
+      e_ab[0] = cross_ab[0] * n;
+      e_ab[1] = cross_ab[1] * n;
+      e_ab[2] = cross_ab[2] * n;
+   }
 
    // compute unit vector of cd plane
-   crossproduct(c, d, cross_cd);
-   n = 1.0 / sqrt(cross_cd[0] * cross_cd[0] +
-                  cross_cd[1] * cross_cd[1] +
-                  cross_cd[2] * cross_cd[2]);
-   e_cd[0] = cross_cd[0] * n;
-   e_cd[1] = cross_cd[1] * n;
-   e_cd[2] = cross_cd[2] * n;
+   crossproduct_ld(c, d, cross_cd);
+   n = sqrt(cross_cd[0] * cross_cd[0] +
+            cross_cd[1] * cross_cd[1] +
+            cross_cd[2] * cross_cd[2]);
+   cd_is_point = n < tol;
+
+   if (!cd_is_point) {
+      n = 1.0 / n;
+      e_cd[0] = cross_cd[0] * n;
+      e_cd[1] = cross_cd[1] * n;
+      e_cd[2] = cross_cd[2] * n;
+   }
+
+   if (ab_is_point && cd_is_point) {
+
+      double angle = get_vector_angle(a, c);
+
+      if (p != NULL) p[0] = a[0], p[1] = a[1], p[2] = a[2];
+      if (q != NULL) q[0] = -a[0], q[1] = -a[1], q[2] = -a[2];
+
+      // if points are identically
+      if (angle < tol)
+         return 1 + 4;
+      // if the points are directly opposit of each other
+      else if (fabs(angle - M_PI) < tol)
+         return 1 + 8;
+      else
+         return -1;
+
+   } else if (ab_is_point) {
+
+      if (p != NULL) p[0] = a[0], p[1] = a[1], p[2] = a[2];
+      if (q != NULL) q[0] = -a[0], q[1] = -a[1], q[2] = -a[2];
 
-   double f1, f2;
+      // if ab is on the plane of cd
+      if (fabs(get_vector_angle(a, e_cd) - M_PI_2) < tol) {
 
-   // compute cos between e and c_/d_ times length of e
-   f1 = e_ab[0] * c[0] + e_ab[1] * c[1] + e_ab[2] * c[2];
-   f2 = e_ab[0] * d[0] + e_ab[1] * d[1] + e_ab[2] * d[2];
+         int result = 1;
+         double angle_cd = -1;
+         double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
+	 double an[3] = {-a[0], -a[1], -a[2]};
+
+         if (vector_is_between(c, d, a, &angle_cd, dot_cd))
+            result |= 1 << 2;
+         if (vector_is_between(c, d, an, &angle_cd,
+                               dot_cd)) result |= 1 << 3;
+
+         return result;
+      }
+
+      return -1;
+
+   } else if (cd_is_point) {
+
+      if (p != NULL) p[0] = c[0], p[1] = c[1], p[2] = c[2];
+      if (q != NULL) q[0] = -c[0], q[1] = -c[1], q[2] = -c[2];
+
+      // if cd is on the plane of ab
+      if (fabs(get_vector_angle(c, e_ab) - M_PI_2) < tol) {
+
+         int result = 4;
+
+         double angle_ab = -1;
+         double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+	 double cn[3] = {-c[0], -c[1], -c[2]};
+
+         if (vector_is_between(a, b, c, &angle_ab, dot_ab))
+            result |= 1 << 0;
+         if (vector_is_between(a, b, cn, &angle_ab,
+                               dot_ab)) result |= 1 << 1;
+
+         return result;
+      }
+
+      return -1;
+   }
+
+   double temp_cross[3];
+
+   // compute unit vector of ab plane
+   crossproduct_ld(e_ab, e_cd, temp_cross);
+   n = sqrt(temp_cross[0] * temp_cross[0] +
+            temp_cross[1] * temp_cross[1] +
+            temp_cross[2] * temp_cross[2]);
 
    // if both great circles are nearly identically
-   if ((fabs(f1) < tol) && (fabs(f2) < tol)) {
+   if (n < tol) {
 
       int ret_value = 1 << 4;
 
       int a_between_cd, b_between_cd, c_between_ab, d_between_ab;
+      double angle_ab = -1;
+      double angle_cd = -1;
+      double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+      double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
 
-      a_between_cd = vector_is_between(c, d, a, cross_cd) << 0;
-      b_between_cd = vector_is_between(c, d, b, cross_cd) << 1;
-      c_between_ab = vector_is_between(a, b, c, cross_ab) << 2;
-      d_between_ab = vector_is_between(a, b, d, cross_ab) << 3;
+      a_between_cd = vector_is_between(c, d, a, &angle_cd, dot_cd) << 0;
+      b_between_cd = vector_is_between(c, d, b, &angle_cd, dot_cd) << 1;
+      c_between_ab = vector_is_between(a, b, c, &angle_ab, dot_ab) << 2;
+      d_between_ab = vector_is_between(a, b, d, &angle_ab, dot_ab) << 3;
 
       switch (a_between_cd + b_between_cd + c_between_ab + d_between_ab) {
 
@@ -245,65 +314,151 @@ static int vector_is_between (double a[], double b[], double p[], double e_ab[])
       return ret_value;
    }
 
-   double g[3];
+    n = 1.0 / n;
+    // determine p and q
+    double p_[3], q_[3];
+
+    p_[0]= temp_cross[0] * n;
+    p_[1]= temp_cross[1] * n;
+    p_[2]= temp_cross[2] * n;
+
+    q_[0]=-p_[0];
+    q_[1]=-p_[1];
+    q_[2]=-p_[2];
+
+    // set p and q
+    if (p != 0) {
+       p[0] = p_[0];
+       p[1] = p_[1];
+       p[2] = p_[2];
+    }
+    if (q != 0) {
+       q[0] = q_[0];
+       q[1] = q_[1];
+       q[2] = q_[2];
+    }
+
+    int result;
+    double angle_ab = -1;
+    double angle_cd = -1;
+    double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+    double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
+
+    result = 0;
+    if (vector_is_between(a, b, p_, &angle_ab, dot_ab)) result |= 1 << 0;
+    if (vector_is_between(a, b, q_, &angle_ab, dot_ab)) result |= 1 << 1;
+    if (vector_is_between(c, d, p_, &angle_cd, dot_cd)) result |= 1 << 2;
+    if (vector_is_between(c, d, q_, &angle_cd, dot_cd)) result |= 1 << 3;
+
+    return result;
+}
 
-   // compute line intersection of both planes defined by the two great circles
-   if (fabs(f1) > fabs(f2)) {
+int gcxgc_vec_ (double a[3], double b[3], double c[3], double d[3]) {
 
-      n = - (f2 / f1);
+   double e_ab[3] = {0, 0, 0}, e_cd[3] = {0, 0, 0}, n;
+   double cross_ab[3], cross_cd[3];
+   int ab_is_point, cd_is_point;
 
-      g[0] = n * c[0] + d[0];
-      g[1] = n * c[1] + d[1];
-      g[2] = n * c[2] + d[2];
+   // compute unit vector of ab plane
+   crossproduct_ld(a, b, cross_ab);
+   n = sqrt(cross_ab[0] * cross_ab[0] +
+            cross_ab[1] * cross_ab[1] +
+            cross_ab[2] * cross_ab[2]);
 
-   } else {
+   ab_is_point = n < tol;
 
-      n = - (f1 / f2);
+   if (!ab_is_point) {
 
-      g[0] = c[0] + n * d[0];
-      g[1] = c[1] + n * d[1];
-      g[2] = c[2] + n * d[2];
+      n = 1.0 / n;
+      e_ab[0] = cross_ab[0] * n;
+      e_ab[1] = cross_ab[1] * n;
+      e_ab[2] = cross_ab[2] * n;
+   }
+
+   // compute unit vector of cd plane
+   crossproduct_ld(c, d, cross_cd);
+   n = sqrt(cross_cd[0] * cross_cd[0] +
+            cross_cd[1] * cross_cd[1] +
+            cross_cd[2] * cross_cd[2]);
+   cd_is_point = n < tol;
+
+   if (!cd_is_point) {
+      n = 1.0 / n;
+      e_cd[0] = cross_cd[0] * n;
+      e_cd[1] = cross_cd[1] * n;
+      e_cd[2] = cross_cd[2] * n;
    }
 
-   // normalise g
-   n = 1.0 / sqrt(g[0] * g[0] + g[1] * g[1] + g[2] * g[2]);
+   if (ab_is_point && cd_is_point) {
 
-   g[0]=g[0]*n;
-   g[1]=g[1]*n;
-   g[2]=g[2]*n;
+      return get_vector_angle(a, c) < tol;
 
-   // determine p and q
-   double p_[3], q_[3];
+   } else if (ab_is_point) {
 
-   p_[0]= g[0];
-   p_[1]= g[1];
-   p_[2]= g[2];
+      // if ab is not on the plane of cd
+      if (fabs(get_vector_angle(a, e_cd) - M_PI_2) > tol)
+         return 0;
 
-   q_[0]=-p_[0];
-   q_[1]=-p_[1];
-   q_[2]=-p_[2];
+      double angle_cd = -1;
+      double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
 
-   // set p and q
-   if (p != 0) {
-      p[0] = p_[0];
-      p[1] = p_[1];
-      p[2] = p_[2];
+      return vector_is_between(c, d, a, &angle_cd, dot_cd);
+
+   } else if (cd_is_point) {
+
+      // if cd is not on the plane of ab
+      if (fabs(get_vector_angle(c, e_ab) - M_PI_2) > tol) return 0;
+
+      double angle_ab = -1;
+      double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+
+      return vector_is_between(a, b, c, &angle_ab, dot_ab);
    }
-   if (q != 0) {
-      q[0] = q_[0];
-      q[1] = q_[1];
-      q[2] = q_[2];
+
+   double temp_cross[3];
+
+   // compute unit vector of ab plane
+   crossproduct_ld(e_ab, e_cd, temp_cross);
+   n = sqrt(temp_cross[0] * temp_cross[0] +
+            temp_cross[1] * temp_cross[1] +
+            temp_cross[2] * temp_cross[2]);
+
+   // if both great circles are nearly identically
+   if (n < tol) {
+
+      double angle_ab = -1;
+      double angle_cd = -1;
+      double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+      double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
+
+      return vector_is_between(c, d, a, &angle_cd, dot_cd) ||
+             vector_is_between(c, d, b, &angle_cd, dot_cd) ||
+             vector_is_between(a, b, c, &angle_ab, dot_ab) ||
+             vector_is_between(a, b, d, &angle_ab, dot_ab);
    }
 
-   int result;
+    n = 1.0 / n;
+    double p_[3];
+    p_[0] = temp_cross[0] * n;
+    p_[1] = temp_cross[1] * n;
+    p_[2] = temp_cross[2] * n;
 
-   result = 0;
-   if (vector_is_between(a, b, p_, e_ab)) result |= 1 << 0;
-   if (vector_is_between(a, b, q_, e_ab)) result |= 1 << 1;
-   if (vector_is_between(c, d, p_, e_cd)) result |= 1 << 2;
-   if (vector_is_between(c, d, q_, e_cd)) result |= 1 << 3;
+    double angle_ab = -1;
+    double angle_cd = -1;
+    double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+    double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
 
-   return result;
+    if (vector_is_between(a, b, p_, &angle_ab, dot_ab) &&
+        vector_is_between(c, d, p_, &angle_cd, dot_cd))
+       return 1;
+
+    double q_[3];
+    q_[0]=-p_[0];
+    q_[1]=-p_[1];
+    q_[2]=-p_[2];
+
+    return vector_is_between(a, b, q_, &angle_ab, dot_ab) &&
+           vector_is_between(c, d, q_, &angle_cd, dot_cd);
 }
 
 /** \brief compute the intersection point two circles of latitude
@@ -438,22 +593,12 @@ int latcxlatc_vec (double a[3], double b[3], double c[3], double d[3],
 
    int result = 16;
 
-   double cross_ab[3], cross_cd[3];
-
-   crossproduct(a, b, cross_ab);
-   crossproduct(c, d, cross_cd);
-
-   double a_[3] = {a[0], a[1], 0};
-   double b_[3] = {b[0], b[1], 0};
-   double c_[3] = {c[0], c[1], 0};
-   double d_[3] = {d[0], d[1], 0};
-
    int a_between_cd, b_between_cd, c_between_ab, d_between_ab;
 
-   a_between_cd = vector_is_between(c_, d_, a_, cross_cd);
-   b_between_cd = vector_is_between(c_, d_, b_, cross_cd);
-   c_between_ab = vector_is_between(a_, b_, c_, cross_ab);
-   d_between_ab = vector_is_between(a_, b_, d_, cross_ab);
+   a_between_cd = vector_is_between_lat(c, d, a);
+   b_between_cd = vector_is_between_lat(c, d, b);
+   c_between_ab = vector_is_between_lat(a, b, c);
+   d_between_ab = vector_is_between_lat(a, b, d);
 
    if (a_between_cd && b_between_cd && c_between_ab && d_between_ab) {
 
@@ -501,6 +646,35 @@ int latcxlatc_vec (double a[3], double b[3], double c[3], double d[3],
    return result;
 }
 
+static int latcxlatc_(struct edge edge_a, struct edge edge_b) {
+
+   // if both edges are on the same circle of latitude
+   if (fabs(edge_a.points[0].lat - edge_b.points[0].lat) > tol)
+      return 0;
+
+   // if both edges are on the pole
+   if (fabs(fabs(edge_a.points[0].lat) - M_PI_2) < tol)
+      return 1;
+
+   double angle_ab = fabs(get_angle(edge_a.points[0].lon,
+                                    edge_a.points[1].lon)) + tol;
+   double angle_cd = fabs(get_angle(edge_b.points[0].lon,
+                                    edge_b.points[1].lon)) + tol;
+   double angle_ac = fabs(get_angle(edge_a.points[0].lon,
+                                    edge_b.points[0].lon));
+   double angle_ad = fabs(get_angle(edge_a.points[0].lon,
+                                    edge_b.points[1].lon));
+   double angle_bc = fabs(get_angle(edge_a.points[1].lon,
+                                    edge_b.points[0].lon));
+   double angle_bd = fabs(get_angle(edge_a.points[1].lon,
+                                    edge_b.points[1].lon));
+
+   return ((angle_ac + angle_bc) < angle_ab) ||
+          ((angle_ad + angle_bd) < angle_ab) ||
+          ((angle_ac + angle_ad) < angle_cd) ||
+          ((angle_bc + angle_bd) < angle_cd);
+}
+
 /** \brief compute the intersection point two circles of longitude
  *
  * compute the intersection points of two circle of longitude
@@ -665,14 +839,16 @@ int loncxlonc_vec (double a[3], double b[3], double c[3], double d[3],
 
    double cross_ab[3], cross_cd[3];
 
-   crossproduct(a, b, cross_ab);
-   crossproduct(c, d, cross_cd);
+   crossproduct_ld(a, b, cross_ab);
+   crossproduct_ld(c, d, cross_cd);
 
    double abs_norm_cross_ab[2], abs_norm_cross_cd[2];
 
    // abs_norm_cross_ab[2] = 0;
    // abs_norm_cross_cd[2] = 0;
 
+   int edge_is_pole_point = 0;
+
    double * ref_point;
 
    ref_point = (fabs(a[2]) > fabs(b[2]))?b:a;
@@ -680,13 +856,16 @@ int loncxlonc_vec (double a[3], double b[3], double c[3], double d[3],
    if (fabs(ref_point[2]) > 1.0-tol) {
       abs_norm_cross_ab[0] = 1;
       abs_norm_cross_ab[1] = 0;
-      ret_value |= 16;
+      edge_is_pole_point = 1;
    } else {
       double scale = 1.0 / sqrt(ref_point[0]*ref_point[0] +
                                 ref_point[1]*ref_point[1]);
       abs_norm_cross_ab[0] = ref_point[1] * scale;
       abs_norm_cross_ab[1] = ref_point[0] * scale;
-      if (abs_norm_cross_ab[0] < 0) {
+      double max_abs_val = (fabs(abs_norm_cross_ab[0]) >
+                            fabs(abs_norm_cross_ab[1]))?(abs_norm_cross_ab[0]):
+                                                        (abs_norm_cross_ab[1]);
+      if (max_abs_val < 0) {
          abs_norm_cross_ab[0] *= -1.0;
          abs_norm_cross_ab[1] *= -1.0;
       }
@@ -695,32 +874,41 @@ int loncxlonc_vec (double a[3], double b[3], double c[3], double d[3],
    ref_point = (fabs(c[2]) > fabs(d[2]))?d:c;
    // if both points are at the pole
    if (fabs(ref_point[2]) > 1.0-tol) {
-      abs_norm_cross_cd[0] = 1;
-      abs_norm_cross_cd[1] = 0;
-      ret_value |= 16;
+      abs_norm_cross_cd[0] = 0;
+      abs_norm_cross_cd[1] = 1;
+      edge_is_pole_point = 1;
    } else {
       double scale = 1.0 / sqrt(ref_point[0]*ref_point[0] +
                                 ref_point[1]*ref_point[1]);
       abs_norm_cross_cd[0] = ref_point[1] * scale;
       abs_norm_cross_cd[1] = ref_point[0] * scale;
-      if (abs_norm_cross_cd[0] < 0) {
+      double max_abs_val = (fabs(abs_norm_cross_cd[0]) >
+                            fabs(abs_norm_cross_cd[1]))?(abs_norm_cross_cd[0]):
+                                                        (abs_norm_cross_cd[1]);
+      if (max_abs_val < 0) {
          abs_norm_cross_cd[0] *= -1.0;
          abs_norm_cross_cd[1] *= -1.0;
       }
    }
 
+   double angle_ab = -1;
+   double angle_cd = -1;
+
    // if both edges are on the same circle of longitude
    if (fabs(abs_norm_cross_ab[0] - abs_norm_cross_cd[0]) < tol &&
        fabs(abs_norm_cross_ab[1] - abs_norm_cross_cd[1]) < tol) {
 
-      ret_value |= 16;
+      if (!edge_is_pole_point)
+         ret_value |= 16;
 
       int a_between_cd, b_between_cd, c_between_ab, d_between_ab;
+      double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+      double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
 
-      a_between_cd = vector_is_between(c, d, a, cross_cd) << 0;
-      b_between_cd = vector_is_between(c, d, b, cross_cd) << 1;
-      c_between_ab = vector_is_between(a, b, c, cross_ab) << 2;
-      d_between_ab = vector_is_between(a, b, d, cross_ab) << 3;
+      a_between_cd = vector_is_between(c, d, a, &angle_cd, dot_cd) << 0;
+      b_between_cd = vector_is_between(c, d, b, &angle_cd, dot_cd) << 1;
+      c_between_ab = vector_is_between(a, b, c, &angle_ab, dot_ab) << 2;
+      d_between_ab = vector_is_between(a, b, d, &angle_ab, dot_ab) << 3;
 
       switch (a_between_cd + b_between_cd + c_between_ab + d_between_ab) {
 
@@ -770,14 +958,96 @@ int loncxlonc_vec (double a[3], double b[3], double c[3], double d[3],
       q[0] = 0, q[1] = 0; q[2] = -1;
    }
 
-   if (vector_is_between(a, b, p, cross_ab)) ret_value |= 1;
-   if (vector_is_between(a, b, q, cross_ab)) ret_value |= 2;
-   if (vector_is_between(c, d, p, cross_cd)) ret_value |= 4;
-   if (vector_is_between(c, d, q, cross_cd)) ret_value |= 8;
+   double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+   double dot_cd = c[0]*d[0] + c[1]*d[1] + c[2]*d[2];
+
+   if (ret_value & 16) {
+      if (vector_is_between(a, b, p, &angle_ab, dot_ab)) ret_value |= 1;
+      if (vector_is_between(a, b, q, &angle_ab, dot_ab)) ret_value |= 2;
+      if (vector_is_between(c, d, p, &angle_cd, dot_cd)) ret_value |= 4;
+      if (vector_is_between(c, d, q, &angle_cd, dot_cd)) ret_value |= 8;
+   } else {
+      if (vector_is_between(a, b, p, &angle_ab, dot_ab)) ret_value |= 1;
+      else if (vector_is_between(a, b, q, &angle_ab, dot_ab)) ret_value |= 2;
+      if (vector_is_between(c, d, p, &angle_cd, dot_cd)) ret_value |= 4;
+      else if (vector_is_between(c, d, q, &angle_cd, dot_cd)) ret_value |= 8;
+   }
 
    return ret_value;
 }
 
+int loncxlonc_ (struct edge edge_a, struct edge edge_b) {
+
+   // if edge goes across pole
+   if (fabs(get_angle(edge_a.points[0].lon, edge_a.points[1].lon)) > tol) {
+
+      double lat = (edge_a.points[0].lat > 0)?M_PI_2:-M_PI_2;
+
+      return
+         loncxlonc_(
+            (struct edge){
+               .edge_type = LON_CIRCLE,
+               .points = {{.lon = edge_a.points[0].lon,
+                           .lat = edge_a.points[0].lat},
+                          {.lon = edge_a.points[0].lon,
+                           .lat = lat}}}, edge_b)
+         ||
+         loncxlonc_(
+            (struct edge){
+               .edge_type = LON_CIRCLE,
+               .points = {{.lon = edge_a.points[1].lon,
+                           .lat = edge_a.points[1].lat},
+                          {.lon = edge_a.points[1].lon,
+                           .lat = lat}}}, edge_b);
+
+   } else if (fabs(get_angle(edge_b.points[0].lon,
+                             edge_b.points[1].lon)) > tol) {
+
+      double lat = (edge_b.points[0].lat > 0)?M_PI_2:-M_PI_2;
+
+      return
+         loncxlonc_(edge_a,
+            (struct edge){
+               .edge_type = LON_CIRCLE,
+               .points = {{.lon = edge_b.points[0].lon,
+                           .lat = edge_b.points[0].lat},
+                          {.lon = edge_b.points[0].lon,
+                           .lat = lat}}})
+         ||
+         loncxlonc_(edge_a,
+            (struct edge){
+               .edge_type = LON_CIRCLE,
+               .points = {{.lon = edge_b.points[1].lon,
+                           .lat = edge_b.points[1].lat},
+                          {.lon = edge_b.points[1].lon,
+                           .lat = lat}}});
+   }
+
+   // if both edges touch a pole
+   if (((fabs(fabs(edge_a.points[0].lat) - M_PI_2) < tol) ||
+        (fabs(fabs(edge_a.points[1].lat) - M_PI_2) < tol)) &&
+       ((fabs(fabs(edge_b.points[0].lat) - M_PI_2) < tol) ||
+        (fabs(fabs(edge_b.points[1].lat) - M_PI_2) < tol))) {
+
+      return !((edge_a.points[0].lat > 0) ^ (edge_b.points[0].lat > 0));
+   }
+
+   if (fabs(get_angle(edge_a.points[0].lon, edge_b.points[0].lon)) > tol)
+      return 0;
+
+   double angle_ab = fabs(edge_a.points[0].lat - edge_a.points[1].lat) + tol;
+   double angle_cd = fabs(edge_b.points[0].lat - edge_b.points[1].lat) + tol;
+   double angle_ac = fabs(edge_a.points[0].lat - edge_b.points[0].lat);
+   double angle_ad = fabs(edge_a.points[0].lat - edge_b.points[1].lat);
+   double angle_bc = fabs(edge_a.points[1].lat - edge_b.points[0].lat);
+   double angle_bd = fabs(edge_a.points[1].lat - edge_b.points[1].lat);
+
+   return ((angle_ac + angle_bc) < angle_ab) ||
+          ((angle_ad + angle_bd) < angle_ab) ||
+          ((angle_ac + angle_ad) < angle_cd) ||
+          ((angle_bc + angle_bd) < angle_cd);
+}
+
 /** \brief compute the intersection point of a meridian and a parallel
  *
  * compute the intersection points of a circle of longitude (defined by a and b)
@@ -901,13 +1171,22 @@ int loncxlatc_vec (double a[3], double b[3], double c[3], double d[3],
 
    ret_value = 0;
 
-   if (fabs(a[0] * b[1] - a[1] * b[0]) > tol)
+   // this test is not very accurate but should catch the most obvious cases
+   // the accuracy of this test is not allowed to be higher than the one in then
+   // routine is_inside_gc
+   if ((fabs(a[0] * b[1] - a[1] * b[0]) > 1e-7) &&
+       (fabs(fabs(a[2]) - 1.0) > tol) &&
+       (fabs(fabs(b[2]) - 1.0) > tol)) {
+
       abort_message("edge is not a circle of longitude", __FILE__, __LINE__);
+   }
 
    unsigned ab_goes_across_pole;
    unsigned cd_is_on_pole;
    unsigned ab_is_point;
    unsigned cd_is_point;
+   double angle_ab = get_vector_angle(a, b);
+   double angle_cd = get_vector_angle(c, d);
 
    ab_goes_across_pole =
       ((fabs(1.0 - fabs(a[2])) < tol || fabs(1.0 - fabs(b[2])) < tol) ||
@@ -915,13 +1194,9 @@ int loncxlatc_vec (double a[3], double b[3], double c[3], double d[3],
 
    cd_is_on_pole = fabs(1.0 - fabs(c[2])) < tol;
 
-   ab_is_point = fabs(a[0]-b[0]) < tol &&
-                 fabs(a[1]-b[1]) < tol &&
-                 fabs(a[2]-b[2]) < tol;
+   ab_is_point = angle_ab < tol;
 
-   cd_is_point = fabs(c[0]-d[0]) < tol &&
-                 fabs(c[1]-d[1]) < tol &&
-                 fabs(c[2]-d[2]) < tol;
+   cd_is_point = angle_cd < tol;
 
    if (cd_is_on_pole) {
 
@@ -936,6 +1211,15 @@ int loncxlatc_vec (double a[3], double b[3], double c[3], double d[3],
 
       ret_value |= 4;
 
+   } else if (ab_goes_across_pole && ab_is_point) {
+
+      if (p != NULL)
+         p[0] = c[0], p[1] = c[1], p[2] = c[2];
+      if (q != NULL)
+         q[0] = -p[0], q[1] = -p[1], q[2] = p[2];
+
+      ret_value |= 4;
+
    } else {
 
       /*
@@ -962,10 +1246,12 @@ int loncxlatc_vec (double a[3], double b[3], double c[3], double d[3],
       */
       {
 
-         if (fabs(a[2]) < fabs(b[2])) {
+        double tmp_scale_a = a[0] * a[0] + a[1] * a[1];
+        double tmp_scale_b = b[0] * b[0] + b[1] * b[1];
+
+         if (tmp_scale_a > tmp_scale_b) {
 
-            double scale = sqrt((1.0 - c[2] * c[2])/
-                                (a[0] * a[0] + a[1] * a[1]));
+            double scale = sqrt((1.0 - c[2] * c[2])/tmp_scale_a);
 
             if (p != NULL)
                p[0] = a[0] * scale, p[1] = a[1] * scale, p[2] = c[2];
@@ -974,8 +1260,7 @@ int loncxlatc_vec (double a[3], double b[3], double c[3], double d[3],
 
          } else {
 
-            double scale = sqrt((1.0 - c[2] * c[2])/
-                                (b[0] * b[0] + b[1] * b[1]));
+            double scale = sqrt((1.0 - c[2] * c[2])/tmp_scale_b);
 
             if (p != NULL)
                p[0] = b[0] * scale, p[1] = b[1] * scale, p[2] = c[2];
@@ -997,19 +1282,9 @@ int loncxlatc_vec (double a[3], double b[3], double c[3], double d[3],
 
       } else {
 
-         double angle_cd, angle_cp, angle_dp, angle_cq, angle_dq;
-
-         angle_cd = get_vector_angle(c, d);
-         angle_cp = get_vector_angle(c, p);
-         angle_dp = get_vector_angle(d, p);
-         angle_cq = get_vector_angle(c, q);
-         angle_dq = get_vector_angle(d, q);
-
-         if (angle_cp < tol || angle_dp < tol ||
-             (angle_cp < angle_cd + tol && angle_dp < angle_cd + tol))
+         if (vector_is_between_lat(c, d, p))
             ret_value |= 1 << 2;
-         if (angle_cq < tol || angle_dq < tol ||
-             (angle_cq < angle_cd + tol && angle_dq < angle_cd + tol))
+         if (vector_is_between_lat(c, d, q))
             ret_value |= 1 << 3;
       }
 
@@ -1022,18 +1297,61 @@ int loncxlatc_vec (double a[3], double b[3], double c[3], double d[3],
              fabs(a[2]-q[2]) < tol) ret_value |= 1 << 1;
       } else {
 
-         double cross_ab[3];
-
-         crossproduct(a, b, cross_ab);
+         double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
 
-         if (vector_is_between(a, b, p, cross_ab)) ret_value |= 1 << 0;
-         if (vector_is_between(a, b, q, cross_ab)) ret_value |= 1 << 1;
+         if (vector_is_between(a, b, p, &angle_ab, dot_ab)) ret_value |= 1 << 0;
+         if (vector_is_between(a, b, q, &angle_ab, dot_ab)) ret_value |= 1 << 1;
       }
    }
 
    return ret_value;
 }
 
+static int loncxlatc_ (struct edge edge_a, struct edge edge_b) {
+
+   // if edge goes across pole
+   if (fabs(get_angle(edge_a.points[0].lon, edge_a.points[1].lon)) > tol) {
+
+      double lat = (edge_a.points[0].lat > 0)?M_PI_2:-M_PI_2;
+
+      return
+         loncxlatc_(
+            (struct edge){
+               .edge_type = LON_CIRCLE,
+               .points = {{.lon = edge_a.points[0].lon,
+                           .lat = edge_a.points[0].lat},
+                          {.lon = edge_a.points[0].lon,
+                           .lat = lat}}}, edge_b)
+         ||
+         loncxlatc_(
+            (struct edge){
+               .edge_type = LON_CIRCLE,
+               .points = {{.lon = edge_a.points[1].lon,
+                           .lat = edge_a.points[1].lat},
+                          {.lon = edge_a.points[1].lon,
+                           .lat = lat}}}, edge_b);
+   }
+
+   // if edge b is at the pole
+   if (fabs(fabs(edge_b.points[0].lat) - M_PI_2) < tol) {
+
+      return (fabs(edge_a.points[0].lat - edge_b.points[0].lat) < tol) ||
+             (fabs(edge_a.points[1].lat - edge_b.points[0].lat) < tol);
+   }
+
+   double lat_diff = fabs(edge_a.points[0].lat - edge_a.points[1].lat) + tol;
+
+   if ((fabs(edge_a.points[0].lat - edge_b.points[0].lat) > lat_diff) ||
+       (fabs(edge_a.points[1].lat - edge_b.points[0].lat) > lat_diff))
+      return 0;
+
+   double lon_diff = fabs(get_angle(edge_b.points[0].lon,
+                                    edge_b.points[1].lon)) + tol;
+
+   return (fabs(edge_a.points[0].lon - edge_b.points[0].lon) < lon_diff) &&
+          (fabs(edge_a.points[0].lon - edge_b.points[1].lon) < lon_diff);
+}
+
 /** \brief compute the intersection of a great circle with the parallel
  *
  *  compute the intersection points of a great circle (defined by a and b)
@@ -1115,7 +1433,7 @@ int gcxlatc_vec(double a[3], double b[3], double c[3], double d[3],
 
    double cross_ab[3], scale;
    
-   crossproduct(a, b, cross_ab);
+   crossproduct_ld(a, b, cross_ab);
    scale = sqrt(cross_ab[0]*cross_ab[0]+
                 cross_ab[1]*cross_ab[1]+
                 cross_ab[2]*cross_ab[2]);
@@ -1126,7 +1444,9 @@ int gcxlatc_vec(double a[3], double b[3], double c[3], double d[3],
       return latcxlatc_vec(a, b, c, d, p, q);
 
    // if the great circle is  a circle of longitude
-   } else if (scale < tol || fabs(cross_ab[2]/scale) < tol) {
+   } else if (scale < tol || fabs(cross_ab[2]/scale) < tol ||
+              fabs(fabs(a[2])-1.0) < 1e-13 ||
+              fabs(fabs(b[2])-1.0) < 1e-13) {
 
       return loncxlatc_vec(a, b, c, d, p, q);
    }
@@ -1199,13 +1519,11 @@ int gcxlatc_vec(double a[3], double b[3], double c[3], double d[3],
       p[1] = t[1] + n[0] * s[1];
       p[2] = t[2] + n[0] * s[2];
 
-      double cross_cd[3] = {0, 0, c[0]*d[1]-c[1]*d[0]};
-      double temp_c[3] = {c[0], c[1], 0};
-      double temp_d[3] = {d[0], d[1], 0};
-      double temp_p[3] = {p[0], p[1], 0};
+      double angle_ab = -1;
+      double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
 
-      if (vector_is_between(a, b, p, cross_ab)) result |= 1;
-      if (vector_is_between(temp_c, temp_d, temp_p, cross_cd)) result |= 4;
+      if (vector_is_between(a, b, p, &angle_ab, dot_ab)) result |= 1;
+      if (vector_is_between_lat(c, d, p)) result |= 4;
 
       if (fabs(n[0] - n[1]) >= tol) {
 
@@ -1213,10 +1531,8 @@ int gcxlatc_vec(double a[3], double b[3], double c[3], double d[3],
          q[1] = t[1] + n[1] * s[1];
          q[2] = t[2] + n[1] * s[2];
 
-         double temp_q[3] = {q[0], q[1], 0};
-
-         if (vector_is_between(a, b, q, cross_ab)) result |= 2;
-         if (vector_is_between(temp_c, temp_d, temp_q, cross_cd)) result |= 8;
+         if (vector_is_between(a, b, q, &angle_ab, dot_ab)) result |= 2;
+         if (vector_is_between_lat(c, d, q)) result |= 8;
       } else
          q[0] = p[0], q[1] = p[1], q[2] = p[2];
    }
@@ -1224,6 +1540,124 @@ int gcxlatc_vec(double a[3], double b[3], double c[3], double d[3],
    return result;
 }
 
+static int gcxlatc_vec_(double a[3], double b[3], double c[3], double d[3]) {
+
+   double angle_ab = get_vector_angle(a, b);
+   double angle_cd = get_vector_angle(c, d);
+
+   // if ab is a point
+   if (angle_ab < tol) {
+
+      return (fabs(a[2] - c[2]) < tol) && vector_is_between_lat(c, d, a);
+
+   } else if (angle_cd < tol) {
+
+      double cross_ab[3];
+
+      crossproduct_ld(a, b, cross_ab);
+
+      double n = 1.0 / sqrt(cross_ab[0] * cross_ab[0] +
+                            cross_ab[1] * cross_ab[1] +
+                            cross_ab[2] * cross_ab[2]);
+      cross_ab[0] *= n;
+      cross_ab[1] *= n;
+      cross_ab[2] *= n;
+
+      double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+
+      return (fabs(get_vector_angle(cross_ab, c) - M_PI_2) < tol) &&
+             vector_is_between(a, b, c, &angle_ab, dot_ab);
+   }
+
+   double t[3], s[3];
+
+   if (fabs(a[2]) > fabs(b[2])) {
+
+      double scale = c[2] / a[2];
+
+      t[0] = scale * a[0];
+      t[1] = scale * a[1];
+      
+   } else {
+
+      double scale = c[2] / b[2];
+
+      t[0] = scale * b[0];
+      t[1] = scale * b[1];
+   }
+
+   t[2] = c[2];
+
+   s[2] = 0;
+
+   if (fabs(a[2]) < tol)
+      s[0] = a[0], s[1] = a[1];
+   else if (fabs(b[2]) < tol)
+      s[0] = b[0], s[1] = b[1];
+   else if (fabs(a[2]) > fabs(b[2])) {
+      double scale = b[2] / a[2];
+      s[0] = b[0] - scale * a[0];
+      s[1] = b[1] - scale * a[1];
+   } else {
+      double scale = a[2] / b[2];
+      s[0] = a[0] - scale * b[0];
+      s[1] = a[1] - scale * b[1];
+   }
+
+   if (fabs(s[0]) < tol && fabs(s[1]) < tol)
+      abort_message("internal error", __FILE__, __LINE__);
+
+   {
+      // the intersection of the planes of both circles is defined by:
+      // x = t + n * s
+
+      // x_0^2 + x_1^2 + x_2^2 = 1
+      // x_2 = c_2
+
+      double a_ = s[0] * s[0] + s[1] * s[1];
+      double b_ = 2.0 * (t[0] * s[0] + t[1] * s[1]);
+      double c_ = t[0] * t[0] + t[1] * t[1] + c[2] * c[2] - 1.0;
+
+      double temp = b_ * b_ - 4.0 * a_ * c_;
+
+      // no intersection possible
+      if (temp < 0.0) {
+        if (temp < -tol)
+          return 0;
+        else
+          temp = 0;
+      }
+
+      double n[2];
+
+      n[0] = - (b_ + sqrt(temp)) / (2.0 * a_);
+      n[1] = - (b_ - sqrt(temp)) / (2.0 * a_);
+
+      double p[3];
+
+      p[0] = t[0] + n[0] * s[0];
+      p[1] = t[1] + n[0] * s[1];
+      p[2] = t[2] + n[0] * s[2];
+
+      double dot_ab = a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
+
+      if (vector_is_between(a, b, p, &angle_ab, dot_ab) &&
+          vector_is_between_lat(c, d, p))
+         return 1;
+
+      if (fabs(n[0] - n[1]) >= tol) {
+
+         p[0] = t[0] + n[1] * s[0];
+         p[1] = t[1] + n[1] * s[1];
+         p[2] = t[2] + n[1] * s[2];
+
+         return vector_is_between(a, b, p, &angle_ab, dot_ab) &&
+                vector_is_between_lat(c, d, p);
+      }  else
+         return 0;
+   }
+}
+
 int intersect (struct edge const edge_a, struct edge const edge_b,
                struct point * intersection) {
 
@@ -1393,3 +1827,37 @@ int intersect_vec (enum edge_type edge_type_a, double a[3], double b[3],
 
    return ret_value;
 }
+
+int do_intersect (struct edge edge_a, double a[3], double b[3],
+                  struct edge edge_b, double c[3], double d[3]) {
+
+   int flag = ((edge_a.edge_type == LAT_CIRCLE)   << 0) |
+              ((edge_a.edge_type == LON_CIRCLE)   << 1) |
+              ((edge_a.edge_type == GREAT_CIRCLE) << 2) |
+              ((edge_b.edge_type == LAT_CIRCLE)   << 3) |
+              ((edge_b.edge_type == LON_CIRCLE)   << 4) |
+              ((edge_b.edge_type == GREAT_CIRCLE) << 5);
+
+   switch (flag) {
+
+      case ((1 << 0) | (1 << 3)):
+         return latcxlatc_(edge_a, edge_b);
+      case ((1 << 0) | (1 << 4)):
+         return loncxlatc_(edge_b, edge_a);
+      case ((1 << 0) | (1 << 5)):
+         return gcxlatc_vec_(c, d, a, b);
+      case ((1 << 1) | (1 << 3)):
+         return loncxlatc_(edge_a, edge_b);
+      case ((1 << 1) | (1 << 4)):
+         return loncxlonc_(edge_a, edge_b);
+      case ((1 << 1) | (1 << 5)):
+      case ((1 << 2) | (1 << 4)):
+      case ((1 << 2) | (1 << 5)):
+         return gcxgc_vec_(a, b, c, d);
+      case ((1 << 2) | (1 << 3)):
+         return gcxlatc_vec_(a, b, c, d);
+      default:
+         abort_message ( "ERROR: unknown edge type.", __FILE__, __LINE__ );
+         exit(EXIT_FAILURE);
+   };
+}
diff --git a/src/clipping/utils.c b/src/clipping/utils.c
index 1fdc995..5f001c7 100644
--- a/src/clipping/utils.c
+++ b/src/clipping/utils.c
@@ -69,6 +69,10 @@ void abort_message ( char * text, char * file, int line )
   exit(EXIT_FAILURE);
 }
 
+void yac_abort_message ( char * text, char * file, int line ) {
+	abort_message ( text, file, line );
+}
+
 /* ------------------------------------
 
    Source: http://www.cse.yorku.ca/~oz/hash.html 
diff --git a/src/clipping/utils.h b/src/clipping/utils.h
index 301ca70..e945267 100644
--- a/src/clipping/utils.h
+++ b/src/clipping/utils.h
@@ -39,6 +39,12 @@
 #ifndef UTILS_H
 #define UTILS_H
 
+#include <stdlib.h>
+
+#ifdef __WITHOUT_ISO_C_BINDING
+#include "cfortran.h"
+#endif
+
 /**
  * gives a unique index for a given pointer
  * @param[in] pointer
@@ -69,25 +75,36 @@ void free_pointer_unique_lookup();
  */
 void abort_message ( char * text, char * file, int line );
 
+#ifdef __WITHOUT_ISO_C_BINDING
+     FCALLSCSUB3 ( yac_abort_message, YAC_ABORT_MESSAGE, yac_abort_message, STRING, STRING, PINT )
+#endif
+
 /** \example test_quicksort.c
  * This contains an example of how to use quicksort_index.
  */
 
 void quicksort_index ( int * a, int n, int * idx);
 
-/* --------------------------------------------------------------------
-
-   Hash function
-
-   This algorithm (k=33) was first reported by dan bernstein many
-   years ago in comp.lang.c. another version of this algorithm (now
-   favored by bernstein) uses xor: hash(i) = hash(i - 1) * 33 ^
-   str[i]; the magic of number 33 (why it works better than many other
-   constants, prime or not) has never been adequately explained.
-
-   Source: http://www.cse.yorku.ca/~oz/hash.html 
+/** \example test_mergesort.c
+ *
+ * Natural Merge sort *
+ *
+ */
+void yac_mergesort(void* base, size_t num, size_t size,
+                   int (*compar)(const void*,const void*));
 
-   --------------------------------------------------------------------- */
+/**
+ *
+ * Hash function
+ *
+ * This algorithm (k=33) was first reported by dan bernstein many
+ * years ago in comp.lang.c. another version of this algorithm (now
+ * favored by bernstein) uses xor: hash(i) = hash(i - 1) * 33 ^
+ * str[i]; the magic of number 33 (why it works better than many other
+ * constants, prime or not) has never been adequately explained.
+ *
+ * Source: http://www.cse.yorku.ca/~oz/hash.html 
+ */
 
 unsigned int hash(const char *str);
 
diff --git a/src/color.c b/src/color.c
index f49cf5f..89ffafd 100644
--- a/src/color.c
+++ b/src/color.c
@@ -171,7 +171,7 @@ int cptRead(FILE *fp, CPT *cpt)
 	
   cptInit(cpt);
 
-  cpt->lut = calloc(1, n_alloc*sizeof(LUT));
+  cpt->lut = (LUT*) calloc(1, n_alloc*sizeof(LUT));
 	
   /* Save the original setting since it may be modified by settings in the CPT file */
   color_model = RGB; 
@@ -320,7 +320,7 @@ int cptRead(FILE *fp, CPT *cpt)
       if (n == n_alloc) {
 	i = n_alloc;
 	n_alloc += small_chunk;
-	cpt->lut = realloc((void *)cpt->lut, (size_t)n_alloc*sizeof (LUT));
+	cpt->lut = (LUT*) realloc((void *)cpt->lut, (size_t)n_alloc*sizeof (LUT));
 	memset ((void *)&cpt->lut[i], 0, (size_t)(small_chunk * sizeof (LUT)));  /* Initialize new structs to zero */
       }
     }
@@ -339,7 +339,7 @@ int cptRead(FILE *fp, CPT *cpt)
       return (READERR);
     }
 		
-  cpt->lut = realloc((void *)cpt->lut, (size_t)n*sizeof (LUT));
+  cpt->lut = (LUT*) realloc((void *)cpt->lut, (size_t)n*sizeof (LUT));
   ncolors = n;
   for (i = annot = 0, gap = FALSE; i < ncolors - 1; i++) {
     if ( fabs(cpt->lut[i].z_high - cpt->lut[i+1].z_low) > 0 ) gap = TRUE;
diff --git a/src/config.h.in b/src/config.h.in
index 93535f3..8783c6f 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -200,9 +200,6 @@
    */
 #undef LT_OBJDIR
 
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
 /* Name of package */
 #undef PACKAGE
 
diff --git a/src/const.h b/src/const.h
index 0626b36..9adc539 100644
--- a/src/const.h
+++ b/src/const.h
@@ -18,16 +18,16 @@
 #ifndef _CONST_H
 #define _CONST_H
 
-#define  MIN_PS      20000
-#define  MAX_PS     120000
+#define  MIN_PS      20000.
+#define  MAX_PS     120000.
 
-#define  MIN_FIS   -100000
-#define  MAX_FIS    100000
+#define  MIN_FIS   -100000.
+#define  MAX_FIS    100000.
 
-#define  MIN_T         150
-#define  MAX_T         400
+#define  MIN_T         150.
+#define  MAX_T         400.
 
-#define  MIN_Q           0
+#define  MIN_Q         0.0
 #define  MAX_Q         0.1
 
 #endif  /* _CONST_H */
diff --git a/src/dmemory.h b/src/dmemory.h
index 5922c39..1a17b00 100644
--- a/src/dmemory.h
+++ b/src/dmemory.h
@@ -29,15 +29,15 @@ extern void    Free   (const char *caller, const char *file, int line, void *ptr
 #endif
 
 #if  defined  WITH_CALLER_NAME
-#  define  realloc(p, s)  Realloc(__func__, __FILE__, __LINE__, p, (size_t)s)
-#  define   calloc(n, s)   Calloc(__func__, __FILE__, __LINE__, n, (size_t)s)
-#  define   malloc(s)      Malloc(__func__, __FILE__, __LINE__, (size_t)s)
-#  define     free(p)        Free(__func__, __FILE__, __LINE__, p)
+#  define  realloc(p, s)  Realloc(__func__, __FILE__, __LINE__, (p), (s))
+#  define   calloc(n, s)   Calloc(__func__, __FILE__, __LINE__, (n), (s))
+#  define   malloc(s)      Malloc(__func__, __FILE__, __LINE__, (s))
+#  define     free(p)        Free(__func__, __FILE__, __LINE__, (p))
 #else
-#  define  realloc(p, s)  Realloc((void *) NULL, __FILE__, __LINE__, p, (size_t)s)
-#  define   calloc(n, s)   Calloc((void *) NULL, __FILE__, __LINE__, n, (size_t)s)
-#  define   malloc(s)      Malloc((void *) NULL, __FILE__, __LINE__, (size_t)s)
-#  define     free(p)        Free((void *) NULL, __FILE__, __LINE__, p)
+#  define  realloc(p, s)  Realloc((void *) NULL, __FILE__, __LINE__, (p), (s))
+#  define   calloc(n, s)   Calloc((void *) NULL, __FILE__, __LINE__, (n), (s))
+#  define   malloc(s)      Malloc((void *) NULL, __FILE__, __LINE__, (s))
+#  define     free(p)        Free((void *) NULL, __FILE__, __LINE__, (p))
 #endif
 
 #endif /* DEBUG_MEMORY */
diff --git a/src/ecacore.c b/src/ecacore.c
index 93edbeb..64bab31 100755
--- a/src/ecacore.c
+++ b/src/ecacore.c
@@ -108,32 +108,32 @@ void eca1(const ECA_REQUEST_1 *request)
   streamDefVlist(ostreamID, ovlistID);
 
   nrecords   = vlistNrecs(ivlistID);
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = gridInqSize(gridID);
 
   field_init(&field1);
   field_init(&field2);
 
-  field1.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
   if ( IS_SET(request->var2.h2) || IS_SET(request->var2.h3) ) 
-    field2.ptr = malloc(gridsize*sizeof(double));
+    field2.ptr = (double*) malloc(gridsize*sizeof(double));
   else
     field2.ptr = NULL;
 
   nlevels = zaxisInqSize(zaxisID);
 
-  var12 = malloc(nlevels*sizeof(field_t));
-  samp1 = malloc(nlevels*sizeof(field_t));
-  samp2 = malloc(nlevels*sizeof(field_t));
+  var12 = (field_t*) malloc(nlevels*sizeof(field_t));
+  samp1 = (field_t*) malloc(nlevels*sizeof(field_t));
+  samp2 = (field_t*) malloc(nlevels*sizeof(field_t));
   if ( IS_SET(request->var1.f3) ) 
-    var13 = malloc(nlevels*sizeof(field_t));
+    var13 = (field_t*) malloc(nlevels*sizeof(field_t));
     
   if ( IS_SET(request->var2.h2) ) 
-    var21 = malloc(nlevels*sizeof(field_t));
+    var21 = (field_t*) malloc(nlevels*sizeof(field_t));
   if ( IS_SET(request->var2.h3) ) 
-    var23 = malloc(nlevels*sizeof(field_t));
+    var23 = (field_t*) malloc(nlevels*sizeof(field_t));
       
   for ( levelID = 0; levelID < nlevels; levelID++ )
     {
@@ -141,13 +141,13 @@ void eca1(const ECA_REQUEST_1 *request)
       var12[levelID].grid    = gridID;
       var12[levelID].nmiss   = 0;
       var12[levelID].missval = missval;
-      var12[levelID].ptr     = malloc(gridsize*sizeof(double));
+      var12[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 
       field_init(&samp1[levelID]);
       samp1[levelID].grid    = gridID;
       samp1[levelID].nmiss   = 0;
       samp1[levelID].missval = missval;
-      samp1[levelID].ptr     = malloc(gridsize*sizeof(double));
+      samp1[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 
       field_init(&samp2[levelID]);
       samp2[levelID].grid    = gridID;
@@ -161,7 +161,7 @@ void eca1(const ECA_REQUEST_1 *request)
           var13[levelID].grid    = gridID;
           var13[levelID].nmiss   = 0;
           var13[levelID].missval = missval;
-          var13[levelID].ptr     = malloc(gridsize*sizeof(double));
+          var13[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
         }
       if ( IS_SET(request->var2.h2) )
         {
@@ -169,7 +169,7 @@ void eca1(const ECA_REQUEST_1 *request)
           var21[levelID].grid    = gridID;
           var21[levelID].nmiss   = 0;
           var21[levelID].missval = missval;
-          var21[levelID].ptr     = malloc(gridsize*sizeof(double));
+          var21[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
         }
       if ( IS_SET(request->var2.h3) )
         {
@@ -177,7 +177,7 @@ void eca1(const ECA_REQUEST_1 *request)
           var23[levelID].grid    = gridID;
           var23[levelID].nmiss   = 0;
           var23[levelID].missval = missval;
-          var23[levelID].ptr     = malloc(gridsize*sizeof(double));
+          var23[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
         }
     }
 
@@ -246,7 +246,7 @@ void eca1(const ECA_REQUEST_1 *request)
                 {
                   if ( IS_NOT_SET(samp2[levelID].ptr) )
                     {
-                      samp2[levelID].ptr = malloc(gridsize*sizeof(double));
+                      samp2[levelID].ptr = (double*) malloc(gridsize*sizeof(double));
                       for ( i = 0; i < gridsize; i++ )
                         samp2[levelID].ptr[i] = nsets;
                     }
@@ -480,29 +480,29 @@ void eca2(const ECA_REQUEST_2 *request)
   streamDefVlist(ostreamID, ovlistID);
 
   nrecords   = vlistNrecs(ivlistID1);
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = gridInqSize(gridID);
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   nlevels = zaxisInqSize(zaxisID);
   
-  var14 = malloc(nlevels*sizeof(field_t));
-  samp1 = malloc(nlevels*sizeof(field_t));
-  samp2 = malloc(nlevels*sizeof(field_t));
-  samp3 = malloc(nlevels*sizeof(field_t));
+  var14 = (field_t*) malloc(nlevels*sizeof(field_t));
+  samp1 = (field_t*) malloc(nlevels*sizeof(field_t));
+  samp2 = (field_t*) malloc(nlevels*sizeof(field_t));
+  samp3 = (field_t*) malloc(nlevels*sizeof(field_t));
   
   if ( request->var1.epilog == PERCENT_OF_TOTAL_AMOUNT )
-    total = malloc(nlevels*sizeof(field_t));
+    total = (field_t*) malloc(nlevels*sizeof(field_t));
   if ( IS_SET(request->var1.f5) )
-    var15 = malloc(nlevels*sizeof(field_t));
+    var15 = (field_t*) malloc(nlevels*sizeof(field_t));
   if ( IS_SET(request->var2.h2) )
-    var22 = malloc(nlevels*sizeof(field_t));
+    var22 = (field_t*) malloc(nlevels*sizeof(field_t));
       
   for ( levelID = 0; levelID < nlevels; levelID++ )
     {
@@ -510,19 +510,19 @@ void eca2(const ECA_REQUEST_2 *request)
       var14[levelID].grid    = gridID;
       var14[levelID].nmiss   = 0;
       var14[levelID].missval = missval1;
-      var14[levelID].ptr     = malloc(gridsize*sizeof(double));
+      var14[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
       
       field_init(&samp1[levelID]);
       samp1[levelID].grid    = gridID;
       samp1[levelID].nmiss   = 0;
       samp1[levelID].missval = missval1;
-      samp1[levelID].ptr     = malloc(gridsize*sizeof(double));
+      samp1[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 
       field_init(&samp2[levelID]);
       samp2[levelID].grid    = gridID;
       samp2[levelID].nmiss   = 0;
       samp2[levelID].missval = missval1;
-      samp2[levelID].ptr     = malloc(gridsize*sizeof(double));
+      samp2[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 
       field_init(&samp3[levelID]);
       samp3[levelID].grid    = gridID;
@@ -536,7 +536,7 @@ void eca2(const ECA_REQUEST_2 *request)
           total[levelID].grid    = gridID;
           total[levelID].nmiss   = 0;
           total[levelID].missval = missval1;
-          total[levelID].ptr     = malloc(gridsize*sizeof(double));
+          total[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
         }
       if ( IS_SET(request->var1.f5) )
         {
@@ -544,7 +544,7 @@ void eca2(const ECA_REQUEST_2 *request)
           var15[levelID].grid    = gridID;
           var15[levelID].nmiss   = 0;
           var15[levelID].missval = missval1;
-          var15[levelID].ptr     = malloc(gridsize*sizeof(double));
+          var15[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
         }
       if ( IS_SET(request->var2.h2) )
         {
@@ -552,7 +552,7 @@ void eca2(const ECA_REQUEST_2 *request)
           var22[levelID].grid    = gridID;
           var22[levelID].nmiss   = 0;
           var22[levelID].missval = missval1;
-          var22[levelID].ptr     = malloc(gridsize*sizeof(double));
+          var22[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
         }
     }
 
@@ -637,7 +637,7 @@ void eca2(const ECA_REQUEST_2 *request)
                 {
                   if ( IS_NOT_SET(samp3[levelID].ptr) )
                     {
-                      samp3[levelID].ptr = malloc(gridsize*sizeof(double));
+                      samp3[levelID].ptr = (double*) malloc(gridsize*sizeof(double));
                       for ( i = 0; i < gridsize; i++ )
                         samp3[levelID].ptr[i] = nsets;
                     }
@@ -854,20 +854,20 @@ void eca3(const ECA_REQUEST_3 *request)
   streamDefVlist(ostreamID, ovlistID);
 
   nrecords   = vlistNrecs(ivlistID1);
-  recVarID   = malloc(nrecords*sizeof(int));
-  recLevelID = malloc(nrecords*sizeof(int));
+  recVarID   = (int*) malloc(nrecords*sizeof(int));
+  recLevelID = (int*) malloc(nrecords*sizeof(int));
 
   gridsize = gridInqSize(gridID);
 
   field_init(&field1);
   field_init(&field2);
-  field1.ptr = malloc(gridsize*sizeof(double));
-  field2.ptr = malloc(gridsize*sizeof(double));
+  field1.ptr = (double*) malloc(gridsize*sizeof(double));
+  field2.ptr = (double*) malloc(gridsize*sizeof(double));
 
   nlevels = zaxisInqSize(zaxisID);
 
-  var1 = malloc(nlevels*sizeof(field_t));
-  var2 = malloc(nlevels*sizeof(field_t));
+  var1 = (field_t*) malloc(nlevels*sizeof(field_t));
+  var2 = (field_t*) malloc(nlevels*sizeof(field_t));
         
   for ( levelID = 0; levelID < nlevels; levelID++ )
     {
@@ -875,13 +875,13 @@ void eca3(const ECA_REQUEST_3 *request)
       var1[levelID].grid    = gridID;
       var1[levelID].nmiss   = 0;
       var1[levelID].missval = missval;
-      var1[levelID].ptr     = malloc(gridsize*sizeof(double));
+      var1[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
             
       field_init(&var2[levelID]);
       var2[levelID].grid    = gridID;
       var2[levelID].nmiss   = 0;
       var2[levelID].missval = missval;
-      var2[levelID].ptr     = malloc(gridsize*sizeof(double));
+      var2[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
     }
 
   itsID   = 0;
@@ -1074,8 +1074,8 @@ void eca4(const ECA_REQUEST_4 *request)
   streamDefVlist(ostreamID, ovlistID);
 
   nrecords    = vlistNrecs(ivlistID1);
-  recVarID    = malloc(nrecords*sizeof(int));
-  recLevelID  = malloc(nrecords*sizeof(int));
+  recVarID    = (int*) malloc(nrecords*sizeof(int));
+  recLevelID  = (int*) malloc(nrecords*sizeof(int));
 
   gridtype = gridInqType(gridID);
   if ( gridtype != GRID_UNSTRUCTURED && gridtype != GRID_CURVILINEAR ) 
@@ -1087,34 +1087,34 @@ void eca4(const ECA_REQUEST_4 *request)
     }
   gridsize    = gridInqSize(gridID);
   /* for later check on northern\southern hemisphere */
-  yvals   = malloc(gridsize*sizeof(double));
+  yvals   = (double*) malloc(gridsize*sizeof(double));
   gridInqYvals(gridID,yvals);
 
   /* Two fields are needed because of the definition of gsl for northern and
   * southern hemisphere                                                      */
   field_init(&fieldGt);
   field_init(&fieldLt);
-  fieldGt.ptr = malloc(gridsize*sizeof(double));
-  fieldLt.ptr = malloc(gridsize*sizeof(double));
+  fieldGt.ptr = (double*) malloc(gridsize*sizeof(double));
+  fieldLt.ptr = (double*) malloc(gridsize*sizeof(double));
 
   /* field for the land-water-distribution */
   field_init(&mask);
-  mask.ptr    = malloc(gridsize*sizeof(double));
+  mask.ptr    = (double*) malloc(gridsize*sizeof(double));
 
   nlevels     = zaxisInqSize(zaxisID);
 
-  startCount  = malloc(nlevels*sizeof(field_t));
-  endCount    = malloc(nlevels*sizeof(field_t));
-  gslDuration = malloc(nlevels*sizeof(field_t));
-  gslFirstDay = malloc(nlevels*sizeof(field_t));
+  startCount  = (field_t*) malloc(nlevels*sizeof(field_t));
+  endCount    = (field_t*) malloc(nlevels*sizeof(field_t));
+  gslDuration = (field_t*) malloc(nlevels*sizeof(field_t));
+  gslFirstDay = (field_t*) malloc(nlevels*sizeof(field_t));
 
   /* because of the different definitions for northern and southern hemisphere,
    * the values of the last year have to be present
    * THE LAST YEAR HAS THE INDEX 1 */
   for ( int h = 0; h < 2; h++ )
   {
-    startDateWithHist[h] = malloc(nlevels*sizeof(field_t));
-    endDateWithHist[h]   = malloc(nlevels*sizeof(field_t));
+    startDateWithHist[h] = (field_t*) malloc(nlevels*sizeof(field_t));
+    endDateWithHist[h]   = (field_t*) malloc(nlevels*sizeof(field_t));
   }
 
   for ( levelID = 0; levelID < nlevels; levelID++ )
@@ -1124,7 +1124,7 @@ void eca4(const ECA_REQUEST_4 *request)
     startCount[levelID].size     = gridsize;
     startCount[levelID].nmiss    = 0;
     startCount[levelID].missval  = missval;
-    startCount[levelID].ptr      = malloc(gridsize*sizeof(double));
+    startCount[levelID].ptr      = (double*) malloc(gridsize*sizeof(double));
     memset(startCount[levelID].ptr, 0, gridsize*sizeof(double));
 
     field_init(&endCount[levelID]);
@@ -1132,7 +1132,7 @@ void eca4(const ECA_REQUEST_4 *request)
     endCount[levelID].size       = gridsize;
     endCount[levelID].nmiss      = 0;
     endCount[levelID].missval    = missval;
-    endCount[levelID].ptr        = malloc(gridsize*sizeof(double));
+    endCount[levelID].ptr        = (double*) malloc(gridsize*sizeof(double));
     memset(endCount[levelID].ptr, 0, gridsize*sizeof(double));
 
     field_init(&gslDuration[levelID]);
@@ -1140,14 +1140,14 @@ void eca4(const ECA_REQUEST_4 *request)
     gslDuration[levelID].size    = gridsize;
     gslDuration[levelID].nmiss   = 0;
     gslDuration[levelID].missval = missval;
-    gslDuration[levelID].ptr     = malloc(gridsize*sizeof(double));
+    gslDuration[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 
     field_init(&gslFirstDay[levelID]);
     gslFirstDay[levelID].grid    = gridID;
     gslFirstDay[levelID].size    = gridsize;
     gslFirstDay[levelID].nmiss   = 0;
     gslFirstDay[levelID].missval = missval;
-    gslFirstDay[levelID].ptr     = malloc(gridsize*sizeof(double));
+    gslFirstDay[levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 
     for ( int h = 0; h < 2; h++ )
     {
@@ -1156,14 +1156,14 @@ void eca4(const ECA_REQUEST_4 *request)
       startDateWithHist[h][levelID].size    = gridsize;
       startDateWithHist[h][levelID].nmiss   = 0;
       startDateWithHist[h][levelID].missval = missval;
-      startDateWithHist[h][levelID].ptr     = malloc(gridsize*sizeof(double));
+      startDateWithHist[h][levelID].ptr     = (double*) malloc(gridsize*sizeof(double));
 
       field_init(&endDateWithHist[h][levelID]);
       endDateWithHist[h][levelID].grid      = gridID;
       endDateWithHist[h][levelID].size      = gridsize;
       endDateWithHist[h][levelID].nmiss     = 0;
       endDateWithHist[h][levelID].missval   = missval;
-      endDateWithHist[h][levelID].ptr       = malloc(gridsize*sizeof(double));
+      endDateWithHist[h][levelID].ptr       = (double*) malloc(gridsize*sizeof(double));
     }
   }
 
diff --git a/src/exception.c b/src/exception.c
index 4a0eb89..8e3b092 100644
--- a/src/exception.c
+++ b/src/exception.c
@@ -15,8 +15,12 @@ void cdiError(int cdiErrno, const char *fmt, ...)
   va_start(args, fmt);
 
   printf("\n");
+  set_text_color(stderr, RESET, RED);
    fprintf(stderr, "%s: ", processInqPrompt());
+  reset_text_color(stderr);
+  set_text_color(stderr, RESET, BLACK);
   vfprintf(stderr, fmt, args);
+  reset_text_color(stderr);
    fprintf(stderr, "\n");
 
   va_end(args);
@@ -34,8 +38,12 @@ void cdoAbort(const char *fmt, ...)
   va_start(args, fmt);
 
   printf("\n");
+  set_text_color(stderr, RESET, RED);
    fprintf(stderr, "%s (Abort): ", processInqPrompt());
+  reset_text_color(stderr);
+  set_text_color(stderr, RESET, BLACK);
   vfprintf(stderr, fmt, args);
+  reset_text_color(stderr);
    fprintf(stderr, "\n");
 
   va_end(args);
@@ -50,8 +58,12 @@ void cdoWarning(const char *fmt, ...)
 
   va_start(args, fmt);
 
+  set_text_color(stderr, BRIGHT, YELLOW);
    fprintf(stderr, "%s (Warning): ", processInqPrompt());
+  reset_text_color(stderr);
+  set_text_color(stderr, RESET, BLACK);
   vfprintf(stderr, fmt, args);
+  reset_text_color(stderr);
    fprintf(stderr, "\n");
 
   va_end(args);
@@ -66,8 +78,12 @@ void cdoPrint(const char *fmt, ...)
     {
       va_start(args, fmt);
 
+      set_text_color(stderr, RESET, GREEN);
       fprintf(stderr, "%s: ", processInqPrompt());
+      reset_text_color(stderr);
+      set_text_color(stderr, RESET, BLACK);
       vfprintf(stderr, fmt, args);
+      reset_text_color(stderr);
       fprintf(stderr, "\n");
 
       va_end(args);
diff --git a/src/expr.c b/src/expr.c
index 90c8000..ceadab2 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -14,7 +14,7 @@
 
 static double f_abs(double x)  { return (fabs(x));  }
 static double f_int(double x)  { return ((int)(x)); }
-static double f_nint(double x) { return (NINT(x));  }
+static double f_nint(double x) { return (round(x));  }
 static double f_sqr(double x)  { return (x*x);      }
 
 typedef struct {
@@ -70,7 +70,7 @@ nodeType *expr_con_con(int oper, nodeType *p1, nodeType *p2)
 {
   nodeType *p;
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type = typeCon;
 
@@ -106,7 +106,7 @@ nodeType *expr_con_var(int oper, nodeType *p1, nodeType *p2)
   ngp  = gridInqSize(gridID);
   nlev = zaxisInqSize(zaxisID);
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type     = typeVar;
   p->tmpvar   = 1;
@@ -115,7 +115,7 @@ nodeType *expr_con_var(int oper, nodeType *p1, nodeType *p2)
   p->zaxisID  = zaxisID;
   p->missval  = missval1;
 
-  p->data = malloc(ngp*nlev*sizeof(double));
+  p->data = (double*) malloc(ngp*nlev*sizeof(double));
 
   switch ( oper )
     {
@@ -208,7 +208,7 @@ nodeType *expr_var_con(int oper, nodeType *p1, nodeType *p2)
   ngp  = gridInqSize(gridID);
   nlev = zaxisInqSize(zaxisID);
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type     = typeVar;
   p->tmpvar   = 1;
@@ -217,7 +217,7 @@ nodeType *expr_var_con(int oper, nodeType *p1, nodeType *p2)
   p->zaxisID  = zaxisID;
   p->missval  = missval1;
 
-  p->data = malloc(ngp*nlev*sizeof(double));
+  p->data = (double*) malloc(ngp*nlev*sizeof(double));
 
   switch ( oper )
     {
@@ -323,7 +323,7 @@ nodeType *expr_var_var(int oper, nodeType *p1, nodeType *p2)
   nlev1 = zaxisInqSize(p1->zaxisID);
   nlev2 = zaxisInqSize(p2->zaxisID);
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type     = typeVar;
   p->tmpvar   = 1;
@@ -353,7 +353,7 @@ nodeType *expr_var_var(int oper, nodeType *p1, nodeType *p2)
       p->missval = p1->missval;
     }
 
-  p->data = malloc(ngp*nlev*sizeof(double));
+  p->data = (double*) malloc(ngp*nlev*sizeof(double));
 
   for ( k = 0; k < nlev; k++ )
     {
@@ -517,7 +517,7 @@ nodeType *ex_fun_con(char *fun, nodeType *p1)
   int i;
   int funcID = -1;
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type = typeCon;
 
@@ -556,7 +556,7 @@ nodeType *ex_fun_var(char *fun, nodeType *p1)
   ngp  = gridInqSize(gridID);
   nlev = zaxisInqSize(zaxisID);
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type     = typeVar;
   p->tmpvar   = 1;
@@ -565,7 +565,7 @@ nodeType *ex_fun_var(char *fun, nodeType *p1)
   p->zaxisID  = zaxisID;
   p->missval  = missval;
 
-  p->data = malloc(ngp*nlev*sizeof(double));
+  p->data = (double*) malloc(ngp*nlev*sizeof(double));
 
   for ( i = 0; i < NumFunc; i++)
     if ( strcmp(fun, fun_sym_tbl[i].name) == 0 )
@@ -648,7 +648,7 @@ nodeType *ex_uminus_var(nodeType *p1)
   ngp  = gridInqSize(gridID);
   nlev = zaxisInqSize(zaxisID);
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type     = typeVar;
   p->tmpvar   = 1;
@@ -657,7 +657,7 @@ nodeType *ex_uminus_var(nodeType *p1)
   p->zaxisID  = zaxisID;
   p->missval  = missval;
 
-  p->data = malloc(ngp*nlev*sizeof(double));
+  p->data = (double*) malloc(ngp*nlev*sizeof(double));
 
   if ( nmiss > 0 )
     {
@@ -680,7 +680,7 @@ nodeType *ex_uminus_con(nodeType *p1)
 {
   nodeType *p;
 
-  p = malloc(sizeof(nodeType));
+  p = (nodeType*) malloc(sizeof(nodeType));
 
   p->type = typeCon;
 
diff --git a/src/expr_yacc.c b/src/expr_yacc.c
index f1c5e8d..b0c3c44 100644
--- a/src/expr_yacc.c
+++ b/src/expr_yacc.c
@@ -1830,7 +1830,7 @@ nodeType *expr_con(double value)
 
   /* allocate node */
   nodeSize = SIZEOF_NODETYPE + sizeof(conNodeType);
-  if ((p = malloc(nodeSize)) == NULL)
+  if ((p = (nodeType*) malloc(nodeSize)) == NULL)
     yyerror(NULL, NULL, "Out of memory");
 
   /* copy information */
@@ -1847,7 +1847,7 @@ nodeType *expr_var(char *nm)
 
   /* allocate node */
   nodeSize = SIZEOF_NODETYPE + sizeof(varNodeType);
-  if ((p = malloc(nodeSize)) == NULL)
+  if ((p = (nodeType*) malloc(nodeSize)) == NULL)
     yyerror(NULL, NULL, "Out of memory");
 
   /* copy information */
@@ -1864,7 +1864,7 @@ nodeType *expr_fun(char *fname, nodeType *op)
 
   /* allocate node */
   nodeSize = SIZEOF_NODETYPE + sizeof(funNodeType);
-  if ((p = malloc(nodeSize)) == NULL)
+  if ((p = (nodeType*) malloc(nodeSize)) == NULL)
     yyerror(NULL, NULL, "Out of memory");
 
   /* copy information */
@@ -1884,7 +1884,7 @@ nodeType *expr_opr(int oper, int nops, ...)
 
   /* allocate node */
   nodeSize = SIZEOF_NODETYPE + sizeof(oprNodeType) + (nops - 1)*sizeof(nodeType*);
-  if ((p = malloc(nodeSize)) == NULL)
+  if ((p = (nodeType*) malloc(nodeSize)) == NULL)
     yyerror(NULL, NULL, "Out of memory");
 
   /* copy information */
diff --git a/src/features.c b/src/features.c
index 85cf4a5..493dddc 100644
--- a/src/features.c
+++ b/src/features.c
@@ -63,6 +63,9 @@ void printFeatures(void)
 #if defined(HAVE_LIBCURL)
   fprintf(stderr, " CURL");
 #endif
+#if defined(HAVE_LIBFFTW3)
+  fprintf(stderr, " FFTW3");
+#endif
   fprintf(stderr, "\n");
 }
 
diff --git a/src/field.c b/src/field.c
index a81ebee..6f02404 100644
--- a/src/field.c
+++ b/src/field.c
@@ -560,7 +560,7 @@ double fldpctl(field_t field, const int p)
     {
       if ( nmiss > 0 )
         {
-          array2 = malloc((len - nmiss)*sizeof(double));
+          array2 = (double*) malloc((len - nmiss)*sizeof(double));
 
           for ( i = 0, j = 0; i < len; i++ ) 
             if ( !DBL_IS_EQUAL(array[i], missval) )
diff --git a/src/field2.c b/src/field2.c
index c1c1ca1..836d0f1 100644
--- a/src/field2.c
+++ b/src/field2.c
@@ -39,7 +39,7 @@ void farfun(field_t *field1, field_t field2, const int function)
 }
 
 static
-void arradd(const size_t n, double * const restrict a, const double * const restrict b)
+void arradd(const size_t n, double * restrict a, const double * restrict b)
 {
   size_t i;
  
diff --git a/src/fieldmem.c b/src/fieldmem.c
index 4bdfdf7..3ca10a8 100644
--- a/src/fieldmem.c
+++ b/src/fieldmem.c
@@ -24,7 +24,7 @@ field_t **field_allocate(int vlistID, int ptype, int init)
 
   nvars = vlistNvars(vlistID);
 
-  field = malloc(nvars*sizeof(field_t *));
+  field = (field_t **) malloc(nvars*sizeof(field_t *));
 
   for ( varID = 0; varID < nvars; ++varID )
     {
@@ -35,7 +35,7 @@ field_t **field_allocate(int vlistID, int ptype, int init)
       nlevel   = zaxisInqSize(zaxisID);
       missval  = vlistInqVarMissval(vlistID, varID);
 
-      field[varID] = malloc(nlevel*sizeof(field_t));
+      field[varID] = (field_t*) malloc(nlevel*sizeof(field_t));
       for ( levelID = 0; levelID < nlevel; ++levelID )
 	{
 	  field_init(&field[varID][levelID]);
@@ -50,13 +50,13 @@ field_t **field_allocate(int vlistID, int ptype, int init)
 
 	  if ( ptype == FIELD_ALL || ptype == FIELD_PTR )
 	    {
-	      field[varID][levelID].ptr = malloc(nwpv*gridsize*sizeof(double));
+	      field[varID][levelID].ptr = (double*) malloc(nwpv*gridsize*sizeof(double));
 	      if ( init ) memset(field[varID][levelID].ptr, 0, nwpv*gridsize*sizeof(double));
 	    }
 
 	  if ( ptype == FIELD_ALL || ptype == FIELD_PTR )
 	    {
-	      field[varID][levelID].weight = malloc(nwpv*gridsize*sizeof(double));
+	      field[varID][levelID].weight = (double*) malloc(nwpv*gridsize*sizeof(double));
 	      if ( init ) memset(field[varID][levelID].weight, 0, nwpv*gridsize*sizeof(double));
 	    }    
 	}
diff --git a/src/fieldmer.c b/src/fieldmer.c
index 6b53fd0..41e6da6 100644
--- a/src/fieldmer.c
+++ b/src/fieldmer.c
@@ -366,7 +366,7 @@ void merpctl(field_t field1, field_t *field2, int p)
   nx = gridInqXsize(grid);
   ny = gridInqYsize(grid);
   
-  array2 = malloc(nx*sizeof(double));
+  array2 = (double*) malloc(nx*sizeof(double));
   
   if ( nmiss > 0 )
     {
diff --git a/src/fieldzon.c b/src/fieldzon.c
index 4f0ba58..cea66bc 100644
--- a/src/fieldzon.c
+++ b/src/fieldzon.c
@@ -422,7 +422,7 @@ void zonpctl(field_t field1, field_t *field2, int p)
   
   if ( nmiss > 0 )
     {
-      array2 = malloc(nx*sizeof(double));
+      array2 = (double*) malloc(nx*sizeof(double));
       
       for ( j = 0; j < ny; j++ )
         {
diff --git a/src/fouriertrans.c b/src/fouriertrans.c
index a17cb01..07efff1 100644
--- a/src/fouriertrans.c
+++ b/src/fouriertrans.c
@@ -2005,9 +2005,9 @@ void fc2gp(double *trig, long *ifax, double *fc, double *gp, long nlat, long nlo
   jump = (nlon + 2);
   lot  = nlev * nlat;
 
-  wfc = malloc(lot*jump*sizeof(double));
+  wfc = (double*) malloc(lot*jump*sizeof(double));
 #if ! defined(_OPENMP)
-  wgp = malloc(lot*jump*sizeof(double));
+  wgp = (double*) malloc(lot*jump*sizeof(double));
 #endif
 
   for ( lev = 0; lev < nlev; ++lev )
@@ -2033,7 +2033,7 @@ void fc2gp(double *trig, long *ifax, double *fc, double *gp, long nlat, long nlo
   nvex  = lot - (nblox-1)*NFFT;
   nvex0 = nvex;
 
-  istartv = malloc(nblox*sizeof(long));
+  istartv = (long*) malloc(nblox*sizeof(long));
 
   istart = 0;
   for ( nb = 0; nb < nblox; nb++ )
@@ -2049,7 +2049,7 @@ void fc2gp(double *trig, long *ifax, double *fc, double *gp, long nlat, long nlo
   for ( nb = 0; nb < nblox; nb++ )
     {
 #if defined(_OPENMP)
-      wgp = malloc(lot*jump*sizeof(double));
+      wgp = (double*) malloc(lot*jump*sizeof(double));
 #endif
       istart = istartv[nb];
       if ( nb == 0 ) nvex = nvex0;
@@ -2174,8 +2174,8 @@ void gp2fc(double *trig, long *ifax, double *gp, double *fc, long nlat, long nlo
   jump = (nlon + 2);
   lot  = nlev * nlat;
 
-  wfc = malloc(lot * jump * sizeof(double));
-  wgp = malloc(lot * jump * sizeof(double));
+  wfc = (double*) malloc(lot * jump * sizeof(double));
+  wgp = (double*) malloc(lot * jump * sizeof(double));
 
   rix = 0;
   wix = 0;
diff --git a/src/grid.c b/src/grid.c
index 28329df..db37cc9 100644
--- a/src/grid.c
+++ b/src/grid.c
@@ -55,11 +55,11 @@ void scale_vec(double scalefactor, long nvals, double *restrict values)
 
 void grid_to_radian(const char *units, long nvals, double *restrict values, const char *description)
 {
-  if ( memcmp(units, "degree", 6) == 0 )
+  if ( strcompare(units, "degree") == 0 )
     {
       scale_vec(DEG2RAD, nvals, values);
     }
-  else if ( memcmp(units, "radian", 6) == 0 )
+  else if ( strcompare(units, "radian") == 0 )
     {
       /* No conversion necessary */
     }
@@ -72,11 +72,11 @@ void grid_to_radian(const char *units, long nvals, double *restrict values, cons
 
 void grid_to_degree(const char *units, long nvals, double *restrict values, const char *description)
 {
-  if ( memcmp(units, "radian", 6) == 0 )
+  if ( strcompare(units, "radian") == 0 )
     {
       for ( long n = 0; n < nvals; ++n ) values[n] *= RAD2DEG;
     }
-  else if ( memcmp(units, "degree", 6) == 0 )
+  else if ( strcompare(units, "degree") == 0 )
     {
       /* No conversion necessary */
     }
@@ -109,7 +109,7 @@ int gridToZonal(int gridID1)
 
       if ( gridInqYvals(gridID1, NULL) )
 	{
-	  yvals = malloc(gridsize*sizeof(double));
+	  yvals = (double*) malloc(gridsize*sizeof(double));
 
 	  gridInqYvals(gridID1, yvals);
 	  gridDefYvals(gridID2, yvals);
@@ -146,7 +146,7 @@ int gridToMeridional(int gridID1)
 
       if ( gridInqXvals(gridID1, NULL) )
 	{
-	  xvals = malloc(gridsize*sizeof(double));
+	  xvals = (double*) malloc(gridsize*sizeof(double));
 
 	  gridInqXvals(gridID1, xvals);
 	  gridDefXvals(gridID2, xvals);
@@ -451,7 +451,7 @@ char *gen_param(const char *fmt, ...)
   va_end(args);
 
   len++;
-  rstr = malloc(len*sizeof(char));
+  rstr = (char*) malloc(len*sizeof(char));
   memcpy(rstr, str, len*sizeof(char));
 
   return (rstr);
@@ -721,8 +721,8 @@ int qu2reg_subarea(int gridsize, int np, double xfirst, double xlast,
 
   for ( j = 0; j < ny; ++j ) nwork += rowlon[j];
 
-  pwork = malloc(ny*sizeof(double *));
-  work  = malloc(ny*np4*sizeof(double));
+  pwork = (double **) malloc(ny*sizeof(double *));
+  work  = (double*) malloc(ny*np4*sizeof(double));
   wlen = 0;
   pwork[0] = work;
   for ( j = 1; j < ny; ++j )
@@ -809,7 +809,7 @@ void field2regular(int gridID1, int gridID2, double missval, double *array, int
   ny = gridInqYsize(gridID1);
   np = gridInqNP(gridID1);
 
-  rowlon = malloc(ny*sizeof(int));
+  rowlon = (int*) malloc(ny*sizeof(int));
   gridInqRowlon(gridID1, rowlon);
 
   xfirstandlast[0] = 0.;
@@ -851,7 +851,7 @@ int gridToRegular(int gridID1)
   ny = gridInqYsize(gridID1);
   np = gridInqNP(gridID1);
 
-  yvals = malloc(ny*sizeof(double));
+  yvals = (double*) malloc(ny*sizeof(double));
   gridInqYvals(gridID1, yvals);
 
   xfirstandlast[0] = 0.;
@@ -873,7 +873,7 @@ int gridToRegular(int gridID1)
       grib_get_reduced_row(np4, xfirst, xlast, &row_count, &ilon_first, &ilon_last);
 
       nx = row_count;
-      xvals = malloc(nx*sizeof(double));
+      xvals = (double*) malloc(nx*sizeof(double));
       for ( i = 0; i < nx; ++i )
 	{
 	  xvals[i] = ((ilon_first+i)*360.)/np4;
@@ -885,7 +885,7 @@ int gridToRegular(int gridID1)
   else
     {
       nx = 2*ny;
-      xvals = malloc(nx*sizeof(double));
+      xvals = (double*) malloc(nx*sizeof(double));
       for ( i = 0; i < nx; ++i ) xvals[i] = i * 360./nx;
     }
 
@@ -912,7 +912,7 @@ void gridCopyMask(int gridID1, int gridID2, long gridsize)
   if ( gridInqMask(gridID1, NULL) )
     {
       int *mask;
-      mask = malloc(gridsize*sizeof(int));
+      mask = (int*) malloc(gridsize*sizeof(int));
       gridInqMask(gridID1, mask);
       gridDefMask(gridID2, mask);
       free(mask);
@@ -997,8 +997,8 @@ int gridToCurvilinear(int gridID1, int lbounds)
 	gridDefXsize(gridID2, nx);
 	gridDefYsize(gridID2, ny);
 
-	xvals2D = malloc(gridsize*sizeof(double));
-	yvals2D = malloc(gridsize*sizeof(double));
+	xvals2D = (double*) malloc(gridsize*sizeof(double));
+	yvals2D = (double*) malloc(gridsize*sizeof(double));
 
 
 	if ( gridtype == GRID_LCC )
@@ -1017,8 +1017,8 @@ int gridToCurvilinear(int gridID1, int lbounds)
 	    if ( ! (gridInqXvals(gridID1, NULL) && gridInqYvals(gridID1, NULL)) )
 	      Error("Grid has no values");
 
-	    xvals = malloc(nx*sizeof(double));
-	    yvals = malloc(ny*sizeof(double));
+	    xvals = (double*) malloc(nx*sizeof(double));
+	    yvals = (double*) malloc(ny*sizeof(double));
 
 	    gridInqXvals(gridID1, xvals);
 	    gridInqYvals(gridID1, yvals);
@@ -1073,8 +1073,8 @@ int gridToCurvilinear(int gridID1, int lbounds)
 
 	if ( gridtype == GRID_LCC )
 	  {		
-	    xbounds2D = malloc(4*gridsize*sizeof(double));
-	    ybounds2D = malloc(4*gridsize*sizeof(double));
+	    xbounds2D = (double*) malloc(4*gridsize*sizeof(double));
+	    ybounds2D = (double*) malloc(4*gridsize*sizeof(double));
 
 	    for ( j = 0; j < ny; j++ )
 	      for ( i = 0; i < nx; i++ )
@@ -1106,7 +1106,7 @@ int gridToCurvilinear(int gridID1, int lbounds)
 	  {
 	    if ( gridInqXbounds(gridID1, NULL) )
 	      {
-		xbounds = malloc(2*nx*sizeof(double));
+		xbounds = (double*) malloc(2*nx*sizeof(double));
 		gridInqXbounds(gridID1, xbounds);
 		if ( gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN )
 		  if ( check_range(2*nx, xbounds, -720, 720) )
@@ -1118,13 +1118,13 @@ int gridToCurvilinear(int gridID1, int lbounds)
 	      }
 	    else if ( nx > 1 )
 	      {
-		xbounds = malloc(2*nx*sizeof(double));
+		xbounds = (double*) malloc(2*nx*sizeof(double));
 		grid_gen_bounds(nx, xvals, xbounds);
 	      }
 
 	    if ( gridInqYbounds(gridID1, NULL) )
 	      {
-		ybounds = malloc(2*ny*sizeof(double));
+		ybounds = (double*) malloc(2*ny*sizeof(double));
 		gridInqYbounds(gridID1, ybounds);
 		if ( gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN )
 		  if ( check_range(2*ny, ybounds, -180, 180) )
@@ -1136,7 +1136,7 @@ int gridToCurvilinear(int gridID1, int lbounds)
 	      }
 	    else if ( ny > 1 )
 	      {
-		ybounds = malloc(2*ny*sizeof(double));
+		ybounds = (double*) malloc(2*ny*sizeof(double));
 		if ( gridtype == GRID_SINUSOIDAL || 
 		     gridtype == GRID_LAEA       || 
 		     gridtype == GRID_LCC2 )
@@ -1150,8 +1150,8 @@ int gridToCurvilinear(int gridID1, int lbounds)
 
 	    if ( xbounds && ybounds )
 	      {
-		xbounds2D = malloc(4*gridsize*sizeof(double));
-		ybounds2D = malloc(4*gridsize*sizeof(double));
+		xbounds2D = (double*) malloc(4*gridsize*sizeof(double));
+		ybounds2D = (double*) malloc(4*gridsize*sizeof(double));
 
 		if ( gridIsRotated(gridID1) )
 		  {
@@ -1185,7 +1185,7 @@ int gridToCurvilinear(int gridID1, int lbounds)
 			  {
 			    sinusoidal_to_geo(4*gridsize, xbounds2D, ybounds2D);
 			    /*
-			    xvals2D = malloc(gridsize*sizeof(double));
+			    xvals2D = (double*) malloc(gridsize*sizeof(double));
 			    for ( j = 0; j < 4; ++j )
 			      {
 				for ( i = 0; i < gridsize; ++i ) xvals2D[i] = xbounds2D[i*4+j];
@@ -1272,11 +1272,11 @@ int gridToUnstructured(int gridID1, int lbounds)
 	gridDefXsize(gridID2, gridsize);
 	gridDefYsize(gridID2, gridsize);
 
-	xvals = malloc(nx*sizeof(double));
-	yvals = malloc(ny*sizeof(double));
+	xvals = (double*) malloc(nx*sizeof(double));
+	yvals = (double*) malloc(ny*sizeof(double));
 
-	xvals2D = malloc(gridsize*sizeof(double));
-	yvals2D = malloc(gridsize*sizeof(double));
+	xvals2D = (double*) malloc(gridsize*sizeof(double));
+	yvals2D = (double*) malloc(gridsize*sizeof(double));
 
 	gridInqXvals(gridID1, xvals);
 	gridInqYvals(gridID1, yvals);
@@ -1319,31 +1319,31 @@ int gridToUnstructured(int gridID1, int lbounds)
 
 	    if ( gridInqXbounds(gridID1, NULL) )
 	      {
-		xbounds = malloc(2*nx*sizeof(double));
+		xbounds = (double*) malloc(2*nx*sizeof(double));
 		gridInqXbounds(gridID1, xbounds);
 	      }
 	    else if ( nx > 1 )
 	      {
-		xbounds = malloc(2*nx*sizeof(double));
+		xbounds = (double*) malloc(2*nx*sizeof(double));
 		grid_gen_bounds(nx, xvals, xbounds);
 	      }
 
 	    if ( gridInqYbounds(gridID1, NULL) )
 	      {
-		ybounds = malloc(2*ny*sizeof(double));
+		ybounds = (double*) malloc(2*ny*sizeof(double));
 		gridInqYbounds(gridID1, ybounds);
 	      }
 	    else if ( ny > 1 )
 	      {
-		ybounds = malloc(2*ny*sizeof(double));
+		ybounds = (double*) malloc(2*ny*sizeof(double));
 		grid_gen_bounds(ny, yvals, ybounds);
 		grid_check_lat_borders(2*ny, ybounds);
 	      }
 
 	    if ( xbounds && ybounds )
 	      {
-		xbounds2D = malloc(4*gridsize*sizeof(double));
-		ybounds2D = malloc(4*gridsize*sizeof(double));
+		xbounds2D = (double*) malloc(4*gridsize*sizeof(double));
+		ybounds2D = (double*) malloc(4*gridsize*sizeof(double));
 
 		if ( gridIsRotated(gridID1) )
 		  {
@@ -1395,13 +1395,13 @@ int gridToUnstructured(int gridID1, int lbounds)
 	ni2 = gridInqGMEni2(gridID1);
 	ni3 = gridInqGMEni3(gridID1);
 
-	imask   = malloc(gridsize*sizeof(int));
-	xvals   = malloc(gridsize*sizeof(double));
-	yvals   = malloc(gridsize*sizeof(double));
+	imask   = (int*) malloc(gridsize*sizeof(int));
+	xvals   = (double*) malloc(gridsize*sizeof(double));
+	yvals   = (double*) malloc(gridsize*sizeof(double));
 	if ( lbounds )
 	  {
-	    xbounds = malloc(nv*gridsize*sizeof(double));
-	    ybounds = malloc(nv*gridsize*sizeof(double));
+	    xbounds = (double*) malloc(nv*gridsize*sizeof(double));
+	    ybounds = (double*) malloc(nv*gridsize*sizeof(double));
 	  }
 
 	gme_grid(lbounds, gridsize, xvals, yvals, xbounds, ybounds, imask, ni, nd, ni2, ni3);
@@ -1479,14 +1479,14 @@ int gridCurvilinearToRegular(int gridID1)
   nx = gridInqXsize(gridID1);
   ny = gridInqYsize(gridID1);
 	
-  xvals2D = malloc(gridsize*sizeof(double));
-  yvals2D = malloc(gridsize*sizeof(double));
+  xvals2D = (double*) malloc(gridsize*sizeof(double));
+  yvals2D = (double*) malloc(gridsize*sizeof(double));
 
   gridInqXvals(gridID1, xvals2D);
   gridInqYvals(gridID1, yvals2D);
 
-  xvals = malloc(nx*sizeof(double));
-  yvals = malloc(ny*sizeof(double));
+  xvals = (double*) malloc(nx*sizeof(double));
+  yvals = (double*) malloc(ny*sizeof(double));
 
   for ( i = 0; i < nx; i++ ) xvals[i] = xvals2D[i];
   for ( j = 0; j < ny; j++ ) yvals[j] = yvals2D[j*nx];
@@ -1556,7 +1556,7 @@ int gridGenWeights(int gridID, double *grid_area, double *grid_wgts)
   if ( gridtype == GRID_GME )
     {
       gridID = gridToUnstructured(gridID, 1);	  
-      grid_mask = malloc(gridsize*sizeof(int));
+      grid_mask = (int*) malloc(gridsize*sizeof(int));
       gridInqMaskGME(gridID, grid_mask);
     }
 
@@ -1686,7 +1686,7 @@ int gridWeights(int gridID, double *grid_wgts)
   gridtype = gridInqType(gridID);
   gridsize = gridInqSize(gridID);
   
-  grid_area = malloc(gridsize*sizeof(double));
+  grid_area = (double*) malloc(gridsize*sizeof(double));
 
   a_status = 0;
 
diff --git a/src/grid_area.c b/src/grid_area.c
index 5ebdc62..b71bb42 100644
--- a/src/grid_area.c
+++ b/src/grid_area.c
@@ -257,7 +257,7 @@ int gridGenArea(int gridID, double* area)
 	{
 	  lgriddestroy = TRUE;
 	  gridID = gridToUnstructured(gridID, 1);
-	  grid_mask = malloc(gridsize*sizeof(int));
+	  grid_mask = (int*) malloc(gridsize*sizeof(int));
 	  gridInqMaskGME(gridID, grid_mask);
 	}
       else
@@ -302,8 +302,8 @@ int gridGenArea(int gridID, double* area)
       return (status);
     }
 
-  grid_corner_lon = malloc(nv*gridsize*sizeof(double));
-  grid_corner_lat = malloc(nv*gridsize*sizeof(double));
+  grid_corner_lon = (double*) malloc(nv*gridsize*sizeof(double));
+  grid_corner_lat = (double*) malloc(nv*gridsize*sizeof(double));
 
   if ( gridInqYbounds(gridID, NULL) && gridInqXbounds(gridID, NULL) )
     {
@@ -324,8 +324,8 @@ int gridGenArea(int gridID, double* area)
 	  double *grid_center_lon = NULL;
 	  double *grid_center_lat = NULL;
 
-	  grid_center_lon = malloc(gridsize*sizeof(double));
-	  grid_center_lat = malloc(gridsize*sizeof(double));
+	  grid_center_lon = (double*) malloc(gridsize*sizeof(double));
+	  grid_center_lat = (double*) malloc(gridsize*sizeof(double));
 
 	  gridInqXvals(gridID, grid_center_lon);
 	  gridInqYvals(gridID, grid_center_lat);
diff --git a/src/grid_gme.c b/src/grid_gme.c
index 7fbeba4..1507d22 100644
--- a/src/grid_gme.c
+++ b/src/grid_gme.c
@@ -758,7 +758,7 @@ void glo_coor(double *pxn, double *prlon, double *prlat,
    * icosahedral triangles into mni equal parts.                 
    */  
 
-  if ((mcosv = malloc (knd*sizeof(int))) == NULL ) 
+  if ( (mcosv = (int*) malloc(knd*sizeof(int))) == NULL ) 
     {
       perror("malloc mcosv");
       exit (-1);
@@ -1341,9 +1341,9 @@ void gme_grid(int lbounds, int gridsize, double *rlon, double *rlat,
       exit (-1);
     }
 
-  xn    = malloc(gridsize*3*sizeof(double));
-  rlonx = malloc((ni+3)*(ni+3)*nd*sizeof(double));
-  rlatx = malloc((ni+3)*(ni+3)*nd*sizeof(double));
+  xn    = (double*) malloc(gridsize*3*sizeof(double));
+  rlonx = (double*) malloc((ni+3)*(ni+3)*nd*sizeof(double));
+  rlatx = (double*) malloc((ni+3)*(ni+3)*nd*sizeof(double));
 
   im1s = 0;
   im1e = ni;
@@ -1361,7 +1361,7 @@ void gme_grid(int lbounds, int gridsize, double *rlon, double *rlat,
     {
       struct polygon *poly;
       
-      poly  = malloc((ni+1)*(ni+1)*nd*sizeof(struct polygon));
+      poly  = (struct polygon*) malloc((ni+1)*(ni+1)*nd*sizeof(struct polygon));
 
       neighbours(rlonx,rlatx,im1s-1,im1e+1,im2s-1,im2e+1,nd, poly,im1s,im1e,im2s,im2e,nd);
 
@@ -1415,42 +1415,42 @@ int main(int argc, char *argv[])
 
   factorni(ni, &ni2, &ni3);  
 
-  if (( poly  = malloc((ni+1)*(ni+1)*nd*sizeof(struct polygon))) == NULL) {
+  if (( poly  = (struct polygon*) malloc((ni+1)*(ni+1)*nd*sizeof(struct polygon))) == NULL) {
     perror("malloc poly");
     exit (-1);
   } 
   
-  if (( xn  = malloc((ni+1)*(ni+1)*3*nd*sizeof(double))) == NULL) {
+  if (( xn  = (double*) malloc((ni+1)*(ni+1)*3*nd*sizeof(double))) == NULL) {
     perror("malloc xn");
     exit (-1);
   } 
   
-  if ((rlon = malloc((ni+1)*(ni+1)*nd*sizeof(double))) == NULL) {
+  if ((rlon = (double*) malloc((ni+1)*(ni+1)*nd*sizeof(double))) == NULL) {
     perror("malloc rlon");
     exit (-1);
   } 
   
-  if ((rlat = malloc((ni+1)*(ni+1)*nd*sizeof(double))) == NULL) {
+  if ((rlat = (double*) malloc((ni+1)*(ni+1)*nd*sizeof(double))) == NULL) {
     perror("malloc rlat");
     exit (-1);
   } 
 
-  if ((rlonx = malloc((ni+3)*(ni+3)*nd*sizeof(double))) == NULL) {
+  if ((rlonx = (double*) malloc((ni+3)*(ni+3)*nd*sizeof(double))) == NULL) {
     perror("malloc rlonx");
     exit (-1);
   } 
   
-  if ((rlatx = malloc((ni+3)*(ni+3)*nd*sizeof(double))) == NULL) {
+  if ((rlatx = (double*) malloc((ni+3)*(ni+3)*nd*sizeof(double))) == NULL) {
     perror("malloc rlatx");
     exit (-1);
   } 
 
-  if ((mask = malloc((ni+1)*(ni+1)*nd*sizeof(int))) == NULL) {
+  if ((mask = (int*) malloc((ni+1)*(ni+1)*nd*sizeof(int))) == NULL) {
     perror("malloc mask");
     exit (-1);
   } 
 
-  if (( area  = malloc((ni+1)*(ni+1)*nd*sizeof(double))) == NULL) {
+  if (( area  = (double*) malloc((ni+1)*(ni+1)*nd*sizeof(double))) == NULL) {
     perror("malloc area");
     exit (-1);
   } 
diff --git a/src/grid_rot.c b/src/grid_rot.c
index 2d1a110..a17c00f 100644
--- a/src/grid_rot.c
+++ b/src/grid_rot.c
@@ -7,12 +7,10 @@
 double lamrot_to_lam(double phirot, double lamrot, double polphi, double pollam, double polgam)
 {
   /*
-    This function converts lambda from one rotated system to lambda in another
-    system. If the optional argument polgam is present, the other system
-    can also be a rotated one, where polgam is the angle between the two
-    north poles.
-    If polgam is not present, the other system is the real geographical
-    system.
+    This function converts lambda from one rotated system to lambda in another system. 
+    If the optional argument polgam is present, the other system can also be a rotated one, 
+    where polgam is the angle between the two north poles.
+    If polgam is not present, the other system is the real geographical system.
 
     phirot : latitude in the rotated system
     lamrot : longitude in the rotated system (E>0)
@@ -24,6 +22,7 @@ double lamrot_to_lam(double phirot, double lamrot, double polphi, double pollam,
   double zsinpol, zcospol, zlampol;
   double zphirot, zlamrot, zarg1, zarg2;
   double zgam;
+  double result = 0;
 
   zsinpol = sin(DEG2RAD*polphi);
   zcospol = cos(DEG2RAD*polphi);
@@ -49,16 +48,17 @@ double lamrot_to_lam(double phirot, double lamrot, double polphi, double pollam,
   else
     {
       zarg1 = sin(zlampol)*(- zsinpol*cos(zlamrot)*cos(zphirot)  +
-      		              zcospol*           sin(zphirot)) -
+      		              zcospol*             sin(zphirot)) -
 	      cos(zlampol)*           sin(zlamrot)*cos(zphirot);
       zarg2 = cos(zlampol)*(- zsinpol*cos(zlamrot)*cos(zphirot)  +
-                              zcospol*           sin(zphirot)) +
+                              zcospol*             sin(zphirot)) +
               sin(zlampol)*           sin(zlamrot)*cos(zphirot);
     }
 
-  if ( fabs(zarg2) < 1.0e-20 ) zarg2 = 1.0e-20;
+  if ( fabs(zarg2) > 0 ) result = RAD2DEG*atan2(zarg1, zarg2);
+  if ( fabs(result) < 9.e-14 ) result = 0;
 
-  return (RAD2DEG*atan2(zarg1, zarg2));
+  return (result);
 }
 
 
diff --git a/src/griddes.c b/src/griddes.c
index 69d952d..06004b2 100644
--- a/src/griddes.c
+++ b/src/griddes.c
@@ -204,13 +204,13 @@ int gridDefine(griddes_t grid)
 
 	if ( (grid.def_xfirst || grid.def_xlast || grid.def_xinc) && grid.xvals == NULL )
 	  {
-	    grid.xvals = malloc(grid.xsize*sizeof(double));
+	    grid.xvals = (double*) malloc(grid.xsize*sizeof(double));
 	    gridGenXvals(grid.xsize, grid.xfirst, grid.xlast, grid.xinc, grid.xvals);
 
 	    if ( grid.genBounds && grid.xbounds == NULL && grid.xsize > 1 )
 	      {
 		grid.nvertex = 2;
-		grid.xbounds = malloc(grid.xsize*grid.nvertex*sizeof(double));
+		grid.xbounds = (double*) malloc(grid.xsize*grid.nvertex*sizeof(double));
 		for ( i = 0; i < (int) grid.xsize-1; i++ )
 		  {
 		    grid.xbounds[2*i+1]   = 0.5*(grid.xvals[i] + grid.xvals[i+1]);
@@ -224,13 +224,13 @@ int gridDefine(griddes_t grid)
 	if ( (grid.def_yfirst || grid.def_ylast || grid.def_yinc) && grid.yvals == NULL )
 	  {
 	    if ( ! grid.def_ylast ) grid.ylast = grid.yfirst;
-	    grid.yvals = malloc(grid.ysize*sizeof(double));
+	    grid.yvals = (double*) malloc(grid.ysize*sizeof(double));
 	    gridGenYvals(grid.type, grid.ysize, grid.yfirst, grid.ylast, grid.yinc, grid.yvals);
 
 	    if ( grid.genBounds && grid.ybounds == NULL && grid.ysize > 1 )
 	      {
 		grid.nvertex = 2;
-		grid.ybounds = malloc(grid.ysize*grid.nvertex*sizeof(double));
+		grid.ybounds = (double*) malloc(grid.ysize*grid.nvertex*sizeof(double));
 		for ( i = 0; i < (int) grid.ysize-1; i++ )
 		  {
 		    grid.ybounds[2*i+1]   = 0.5*(grid.yvals[i] + grid.yvals[i+1]);
@@ -281,6 +281,7 @@ int gridDefine(griddes_t grid)
 	  {
 	    gridDefXpole(gridID, grid.xpole);
 	    gridDefYpole(gridID, grid.ypole);
+	    gridDefAngle(gridID, grid.angle);
 	  }
 
 	if ( grid.mask )
@@ -416,14 +417,14 @@ int gridDefine(griddes_t grid)
 
 	if ( grid.def_xfirst && grid.def_xinc && grid.xvals == NULL )
 	  {
-	    grid.xvals = malloc(grid.xsize*sizeof(double));
+	    grid.xvals = (double*) malloc(grid.xsize*sizeof(double));
 	    for ( i = 0; i < grid.xsize; ++i )
 	      grid.xvals[i] = grid.xfirst + i*grid.xinc;
 	  }
 
 	if ( grid.def_yfirst && grid.def_yinc && grid.yvals == NULL )
 	  {
-	    grid.yvals = malloc(grid.ysize*sizeof(double));
+	    grid.yvals = (double*) malloc(grid.ysize*sizeof(double));
 	    for ( i = 0; i < grid.ysize; ++i )
 	      grid.yvals[i] = grid.yfirst + i*grid.yinc;
 	  }
@@ -595,7 +596,7 @@ double *readfield(griddes_t *grid, int record, char *format, char *filename)
   if ( format == NULL )   Error("format undefined!");
   if ( filename == NULL ) Error("file name undefined!");
 
-  vals = malloc(grid->size*sizeof(double));
+  vals = (double*) malloc(grid->size*sizeof(double));
 
   if ( strcmp(format, "extra") == 0 )
     {
@@ -630,7 +631,7 @@ double *readfield4(griddes_t *grid, int record, char *format, char *filename)
   if ( format == NULL )   Error("format undefined!");
   if ( filename == NULL ) Error("file name undefined!");
 
-  vals  = malloc(4*grid->size*sizeof(double));
+  vals  = (double*) malloc(4*grid->size*sizeof(double));
 
   if ( strcmp(format, "extra") == 0 )
     {
@@ -930,10 +931,6 @@ int gridFromFile(FILE *gfp, const char *dname)
 	  else
 	    cdoAbort("Invalid projection : %s (grid description file: %s)", pline, dname);
 	}
-      else if ( cmpstr(pline, "a", len)  == 0 )
-	{
-	  grid.a = readflt(dname, "a", skipSeparator(pline + len));
-	}
       else if ( cmpstr(pline, "lon_0", len)  == 0 )
 	{
 	  grid.lon_0 = readflt(dname, "lon_0", skipSeparator(pline + len));
@@ -974,14 +971,23 @@ int gridFromFile(FILE *gfp, const char *dname)
 	  grid.ypole = readflt(dname, "latpole", skipSeparator(pline + len));
 	  grid.isRotated = TRUE;
 	}
+      else if ( cmpstr(pline, "angle", len)  == 0 )
+	{
+	  grid.angle = readflt(dname, "angle", skipSeparator(pline + len));
+	  grid.isRotated = TRUE;
+	}
+      else if ( cmpstr(pline, "a", len)  == 0 )
+	{
+	  grid.a = readflt(dname, "a", skipSeparator(pline + len));
+	}
       else if ( cmpstr(pline, "gridlatlon", len)  == 0 )
 	{
 	  int i;
 	  double flat = 0, flon = 0;
 	  if ( grid.size == 0 ) grid.size = grid.xsize * grid.ysize;
 	  
-	  grid.xvals = malloc(grid.size*sizeof(double));
-	  grid.yvals = malloc(grid.size*sizeof(double));
+	  grid.xvals = (double*) malloc(grid.size*sizeof(double));
+	  grid.yvals = (double*) malloc(grid.size*sizeof(double));
 	  for ( i = 0; i < (int) grid.size; i++ )
 	    {
 	      if ( ! readline(gfp, line, MAX_LINE_LEN) )
@@ -1004,7 +1010,7 @@ int gridFromFile(FILE *gfp, const char *dname)
 	    {
 	      long count = 0;
 	      pline = skipSeparator(pline + len);
-	      grid.mask = malloc(size*sizeof(int));
+	      grid.mask = (int*) malloc(size*sizeof(int));
 
 	      for ( i = 0; i < size; i++ )
 		{
@@ -1046,7 +1052,7 @@ int gridFromFile(FILE *gfp, const char *dname)
 	  if ( size > 0 )
 	    {
 	      pline = skipSeparator(pline + len);
-	      grid.xvals = malloc(size*sizeof(double));
+	      grid.xvals = (double*) malloc(size*sizeof(double));
 
 	      for ( i = 0; i < size; i++ )
 		{
@@ -1081,7 +1087,7 @@ int gridFromFile(FILE *gfp, const char *dname)
 	  if ( size > 0 )
 	    {
 	      pline = skipSeparator(pline + len);
-	      grid.yvals = malloc(size*sizeof(double));
+	      grid.yvals = (double*) malloc(size*sizeof(double));
 
 	      for ( i = 0; i < size; i++ )
 		{
@@ -1121,7 +1127,7 @@ int gridFromFile(FILE *gfp, const char *dname)
 	  if ( size > 0 && grid.nvertex > 0 )
 	    {	  
 	      pline = skipSeparator(pline + len);
-	      grid.xbounds = malloc(size*grid.nvertex*sizeof(double));
+	      grid.xbounds = (double*) malloc(size*grid.nvertex*sizeof(double));
 
 	      for ( i = 0; i < (int) (size*grid.nvertex); i++ )
 		{
@@ -1164,7 +1170,7 @@ int gridFromFile(FILE *gfp, const char *dname)
 	  if ( size > 0 && grid.nvertex > 0 )
 	    {	  
 	      pline = skipSeparator(pline + len);
-	      grid.ybounds = malloc(size*grid.nvertex*sizeof(double));
+	      grid.ybounds = (double*) malloc(size*grid.nvertex*sizeof(double));
 
 	      for ( i = 0; i < (int) (size*grid.nvertex); i++ )
 		{
@@ -1284,8 +1290,8 @@ int gridFromPingo(FILE *gfp, const char *dname)
       grid.xsize = nlon;
       grid.ysize = nlat;
 
-      grid.xvals = malloc(grid.xsize*sizeof(double));
-      grid.yvals = malloc(grid.ysize*sizeof(double));
+      grid.xvals = (double*) malloc(grid.xsize*sizeof(double));
+      grid.yvals = (double*) malloc(grid.ysize*sizeof(double));
 
       if ( ! input_ival(gfp, &nlon) ) return (gridID);
       if ( nlon == 2 )
@@ -1353,8 +1359,8 @@ int gridFromPingo(FILE *gfp, const char *dname)
       if ( nlat > 2 ) /* check if gaussian */
 	{
 	  double *yvals, *yw;
-	  yvals = malloc(grid.ysize*sizeof(double));
-	  yw    = malloc(grid.ysize*sizeof(double));
+	  yvals = (double*) malloc(grid.ysize*sizeof(double));
+	  yw    = (double*) malloc(grid.ysize*sizeof(double));
 	  gaussaw(yvals, yw, grid.ysize);
 	  free(yw);
 	  for ( i = 0; i < (int) grid.ysize; i++ )
@@ -1415,11 +1421,11 @@ int ntr2nlat(int ntr)
 {
   int nlat, nlat2;
 
-  nlat = NINT((ntr*3.+1.)/2.);
+  nlat = lround((ntr*3.+1.)/2.);
   if ( (nlat % 2) > 0 )
     {
       nlat  = nlat + 1;
-      nlat2 = NINT(((ntr+1)*3.+1.)/2.);
+      nlat2 = lround(((ntr+1)*3.+1.)/2.);
       /*
       if ( nlat == nlat2 )
 	Error("Computation of latitudes failed for truncation %d", ntr);
@@ -1434,11 +1440,11 @@ int ntr2nlat_linear(int ntr)
 {
   int nlat, nlat2;
 
-  nlat = NINT((ntr*2.+1.)/2.);
+  nlat = lround((ntr*2.+1.)/2.);
   if ( (nlat % 2) > 0 )
     {
       nlat  = nlat + 1;
-      nlat2 = NINT(((ntr+1)*2.+1.)/2.);
+      nlat2 = lround(((ntr+1)*2.+1.)/2.);
       /*
       if ( nlat == nlat2 )
 	Error("Computation of latitudes failed for truncation %d", ntr);
@@ -1511,8 +1517,8 @@ void gen_grid_lonlat(griddes_t *grid, const char *pline, double inc, double lon1
   grid->xsize = nlon;
   grid->ysize = nlat;
 
-  grid->xvals = malloc(grid->xsize*sizeof(double));
-  grid->yvals = malloc(grid->ysize*sizeof(double));
+  grid->xvals = (double*) malloc(grid->xsize*sizeof(double));
+  grid->yvals = (double*) malloc(grid->ysize*sizeof(double));
 
   for ( i = 0; i < nlon; ++i ) grid->xvals[i] = lon1 + inc/2 + i*inc;
   for ( i = 0; i < nlat; ++i ) grid->yvals[i] = lat1 + inc/2 + i*inc;
@@ -1611,8 +1617,8 @@ int gridFromName(const char *gridname)
 	  grid.type = GRID_LONLAT;
 	  grid.xsize = 1;
 	  grid.ysize = 1;
-	  grid.xvals = malloc(sizeof(double));
-	  grid.yvals = malloc(sizeof(double));
+	  grid.xvals = (double*) malloc(sizeof(double));
+	  grid.yvals = (double*) malloc(sizeof(double));
 	  grid.xvals[0] = atof(pline);
 	  while ( isdigit((int) *pline) || ispunct((int) *pline) || *pline == '-' ) pline++;
 	  if ( *pline == '_' ) pline++;
diff --git a/src/griddes_h5.c b/src/griddes_h5.c
index e314665..7184d75 100644
--- a/src/griddes_h5.c
+++ b/src/griddes_h5.c
@@ -386,8 +386,8 @@ int gridFromH5file(const char *gridfile)
       grid.ysize = (int)dims_out[0];
       grid.size  = grid.xsize*grid.ysize;
 
-      grid.xvals = malloc(grid.size*sizeof(double));
-      grid.yvals = malloc(grid.size*sizeof(double));
+      grid.xvals = (double*) malloc(grid.size*sizeof(double));
+      grid.yvals = (double*) malloc(grid.size*sizeof(double));
 
       if ( ftype )
 	{
@@ -397,7 +397,7 @@ int gridFromH5file(const char *gridfile)
       else
 	{
 	  int *iarray, i;
-	  iarray = malloc(grid.size*sizeof(int));
+	  iarray = (int*) malloc(grid.size*sizeof(int));
 	  status = H5Dread(lon_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, iarray);
 	  for ( i = 0; i < grid.size; ++i ) grid.xvals[i] = iarray[i];
 	  status = H5Dread(lat_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, iarray);
@@ -512,8 +512,8 @@ int gridFromH5file(const char *gridfile)
 	  grid.ysize = (int)dims_out[0];
 	  grid.size  = grid.xsize*grid.ysize;
 
-	  grid.xvals = malloc(grid.size*sizeof(double));
-	  grid.yvals = malloc(grid.size*sizeof(double));
+	  grid.xvals = (double*) malloc(grid.size*sizeof(double));
+	  grid.yvals = (double*) malloc(grid.size*sizeof(double));
 
 	  if ( ftype )
 	    {
@@ -523,7 +523,7 @@ int gridFromH5file(const char *gridfile)
 	  else
 	    {
 	      int *iarray, i;
-	      iarray = malloc(grid.size*sizeof(int));
+	      iarray = (int*) malloc(grid.size*sizeof(int));
 	      status = H5Dread(lon_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, iarray);
 	      for ( i = 0; i < grid.size; ++i ) grid.xvals[i] = iarray[i];
 	      status = H5Dread(lat_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, iarray);
diff --git a/src/griddes_nc.c b/src/griddes_nc.c
index 7bd5f7a..02db5ea 100644
--- a/src/griddes_nc.c
+++ b/src/griddes_nc.c
@@ -108,10 +108,10 @@ int gridFromNCfile(const char *gridfile)
 
       /* allocate grid coordinates and read data */
 
-      grid.xvals   = malloc(grid.size*sizeof(double));
-      grid.yvals   = malloc(grid.size*sizeof(double));
-      grid.xbounds = malloc(grid.nvertex*grid.size*sizeof(double));
-      grid.ybounds = malloc(grid.nvertex*grid.size*sizeof(double));
+      grid.xvals   = (double*) malloc(grid.size*sizeof(double));
+      grid.yvals   = (double*) malloc(grid.size*sizeof(double));
+      grid.xbounds = (double*) malloc(grid.nvertex*grid.size*sizeof(double));
+      grid.ybounds = (double*) malloc(grid.nvertex*grid.size*sizeof(double));
 
       nce(nc_inq_vartype(nc_file_id, nc_gridlat_id, &xtype));
       if ( xtype == NC_FLOAT )  grid.prec = DATATYPE_FLT32;
@@ -132,7 +132,7 @@ int gridFromNCfile(const char *gridfile)
       if ( nc_inq_varid(nc_file_id, "grid_imask", &nc_gridmask_id) == NC_NOERR )
 	{
 	  int i;
-	  grid.mask = malloc(grid.size*sizeof(int));
+	  grid.mask = (int*) malloc(grid.size*sizeof(int));
 	  nce(nc_get_var_int(nc_file_id, nc_gridmask_id, grid.mask));
 	  for ( i = 0; i < grid.size; ++i )
 	    if ( grid.mask[i] != 1 ) break;
@@ -308,7 +308,7 @@ void writeNCgrid(const char *gridfile, int gridID, int *grid_imask)
 
   nce(nc_put_var_int(nc_file_id, nc_grdimask_id, grid_imask));
 
-  vals = malloc(gridInqNvertex(gridID)*gridsize*sizeof(double));
+  vals = (double*) malloc(gridInqNvertex(gridID)*gridsize*sizeof(double));
 
   gridInqYvals(gridID, vals);
   nce(nc_put_var_double(nc_file_id, nc_gridlat_id, vals));
diff --git a/src/hetaeta.c b/src/hetaeta.c
index 1566347..f8c839d 100644
--- a/src/hetaeta.c
+++ b/src/hetaeta.c
@@ -513,67 +513,67 @@ void hetaeta(int ltq, int ngp, const int *imiss,
   nlev2p1 = nlev2+1;
 
 #if defined(_OPENMP)
-  ph1_2    = malloc(ompNumThreads*sizeof(double *));
-  lnph1_2  = malloc(ompNumThreads*sizeof(double *));
-  fi1_2    = malloc(ompNumThreads*sizeof(double *));
-
-  pf1_2    = malloc(ompNumThreads*sizeof(double *));
-  lnpf1_2  = malloc(ompNumThreads*sizeof(double *));
-  tv1_2    = malloc(ompNumThreads*sizeof(double *));
-  theta1_2 = malloc(ompNumThreads*sizeof(double *));
-  rh1_2    = malloc(ompNumThreads*sizeof(double *));
-  zvar_2   = malloc(ompNumThreads*sizeof(double *));
-
-  ph2_2    = malloc(ompNumThreads*sizeof(double *));
-  lnph2_2  = malloc(ompNumThreads*sizeof(double *));
-  fi2_2    = malloc(ompNumThreads*sizeof(double *));
-
-  pf2_2    = malloc(ompNumThreads*sizeof(double *));
-  rh2_2    = malloc(ompNumThreads*sizeof(double *));
-  wgt_2    = malloc(ompNumThreads*sizeof(double *));
-  idx_2    = malloc(ompNumThreads*sizeof(long *));
+  ph1_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  lnph1_2  = (double **) malloc(ompNumThreads*sizeof(double *));
+  fi1_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+
+  pf1_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  lnpf1_2  = (double **) malloc(ompNumThreads*sizeof(double *));
+  tv1_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  theta1_2 = (double **) malloc(ompNumThreads*sizeof(double *));
+  rh1_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  zvar_2   = (double **) malloc(ompNumThreads*sizeof(double *));
+
+  ph2_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  lnph2_2  = (double **) malloc(ompNumThreads*sizeof(double *));
+  fi2_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+
+  pf2_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  rh2_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  wgt_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+  idx_2    = (long **) malloc(ompNumThreads*sizeof(long *));
 
   if ( ltq )
     {
-      zt2_2       = malloc(ompNumThreads*sizeof(double *));
-      zq2_2       = malloc(ompNumThreads*sizeof(double *));
-      rh_pbl_2    = malloc(ompNumThreads*sizeof(double *));
-      theta_pbl_2 = malloc(ompNumThreads*sizeof(double *));
+      zt2_2       = (double **) malloc(ompNumThreads*sizeof(double *));
+      zq2_2       = (double **) malloc(ompNumThreads*sizeof(double *));
+      rh_pbl_2    = (double **) malloc(ompNumThreads*sizeof(double *));
+      theta_pbl_2 = (double **) malloc(ompNumThreads*sizeof(double *));
     }
 
   if ( nvars > 0 )
     {
-      vars_pbl_2  = malloc(ompNumThreads*sizeof(double **));
+      vars_pbl_2  = (double ***) malloc(ompNumThreads*sizeof(double **));
     }
 
   for ( i = 0; i < ompNumThreads; i++ )
     {
-      ph1_2[i]    = malloc(nlev1p1*sizeof(double));
-      lnph1_2[i]  = malloc(nlev1p1*sizeof(double));
-      fi1_2[i]    = malloc(nlev1p1*sizeof(double));
-
-      pf1_2[i]    = malloc(nlev1*sizeof(double));
-      lnpf1_2[i]  = malloc(nlev1*sizeof(double));
-      tv1_2[i]    = malloc(nlev1*sizeof(double));
-      theta1_2[i] = malloc(nlev1*sizeof(double));
-      rh1_2[i]    = malloc(nlev1*sizeof(double));
-      zvar_2[i]   = malloc(nlev1*sizeof(double));
-
-      ph2_2[i]    = malloc(nlev2p1*sizeof(double));
-      lnph2_2[i]  = malloc(nlev2p1*sizeof(double));
-      fi2_2[i]    = malloc(nlev2p1*sizeof(double));
-
-      pf2_2[i]    = malloc(nlev2*sizeof(double));
-      rh2_2[i]    = malloc(nlev2*sizeof(double));
-      wgt_2[i]    = malloc(nlev2*sizeof(double));
-      idx_2[i]    = malloc(nlev2*sizeof(long));
+      ph1_2[i]    = (double*) malloc(nlev1p1*sizeof(double));
+      lnph1_2[i]  = (double*) malloc(nlev1p1*sizeof(double));
+      fi1_2[i]    = (double*) malloc(nlev1p1*sizeof(double));
+
+      pf1_2[i]    = (double*) malloc(nlev1*sizeof(double));
+      lnpf1_2[i]  = (double*) malloc(nlev1*sizeof(double));
+      tv1_2[i]    = (double*) malloc(nlev1*sizeof(double));
+      theta1_2[i] = (double*) malloc(nlev1*sizeof(double));
+      rh1_2[i]    = (double*) malloc(nlev1*sizeof(double));
+      zvar_2[i]   = (double*) malloc(nlev1*sizeof(double));
+
+      ph2_2[i]    = (double*) malloc(nlev2p1*sizeof(double));
+      lnph2_2[i]  = (double*) malloc(nlev2p1*sizeof(double));
+      fi2_2[i]    = (double*) malloc(nlev2p1*sizeof(double));
+
+      pf2_2[i]    = (double*) malloc(nlev2*sizeof(double));
+      rh2_2[i]    = (double*) malloc(nlev2*sizeof(double));
+      wgt_2[i]    = (double*) malloc(nlev2*sizeof(double));
+      idx_2[i]    = (long*) malloc(nlev2*sizeof(long));
 
       if ( ltq )
 	{
-	  zt2_2[i]       = malloc(nlev2*sizeof(double));
-	  zq2_2[i]       = malloc(nlev2*sizeof(double));
-	  rh_pbl_2[i]    = malloc(nlev2*sizeof(double));
-	  theta_pbl_2[i] = malloc(nlev2*sizeof(double));
+	  zt2_2[i]       = (double*) malloc(nlev2*sizeof(double));
+	  zq2_2[i]       = (double*) malloc(nlev2*sizeof(double));
+	  rh_pbl_2[i]    = (double*) malloc(nlev2*sizeof(double));
+	  theta_pbl_2[i] = (double*) malloc(nlev2*sizeof(double));
 	}
 
       if ( nvars > 0 )
@@ -583,64 +583,64 @@ void hetaeta(int ltq, int ngp, const int *imiss,
 	      fprintf(stderr, "Too many vars (max = %d)!\n", MAX_VARS);
 	      exit(-1);
 	    }
-	  vars_pbl_2[i]  = malloc(nvars*sizeof(double *));
+	  vars_pbl_2[i]  = (double **) malloc(nvars*sizeof(double *));
 	  for ( iv = 0; iv < nvars; ++iv )
-	    vars_pbl_2[i][iv] = malloc(nlev2*sizeof(double));
+	    vars_pbl_2[i][iv] = (double*) malloc(nlev2*sizeof(double));
 	}
     }
 #else
-  /* etah1  = malloc(nlev1p1*sizeof(double)); */
-  ph1    = malloc(nlev1p1*sizeof(double));
-  lnph1  = malloc(nlev1p1*sizeof(double));
-  fi1    = malloc(nlev1p1*sizeof(double));
-
-  pf1    = malloc(nlev1*sizeof(double));
-  lnpf1  = malloc(nlev1*sizeof(double));
-  tv1    = malloc(nlev1*sizeof(double));
-  theta1 = malloc(nlev1*sizeof(double));
-  rh1    = malloc(nlev1*sizeof(double));
-  zvar   = malloc(nlev1*sizeof(double));
-
-  ph2    = malloc(nlev2p1*sizeof(double));
-  lnph2  = malloc(nlev2p1*sizeof(double));
-  fi2    = malloc(nlev2p1*sizeof(double));
-
-  pf2    = malloc(nlev2*sizeof(double));
-  /* lnpf2  = malloc(nlev2*sizeof(double)); */
-  rh2    = malloc(nlev2*sizeof(double));
-  wgt    = malloc(nlev2*sizeof(double));
-  idx    = malloc(nlev2*sizeof(long));
+  /* etah1  = (double*) malloc(nlev1p1*sizeof(double)); */
+  ph1    = (double*) malloc(nlev1p1*sizeof(double));
+  lnph1  = (double*) malloc(nlev1p1*sizeof(double));
+  fi1    = (double*) malloc(nlev1p1*sizeof(double));
+
+  pf1    = (double*) malloc(nlev1*sizeof(double));
+  lnpf1  = (double*) malloc(nlev1*sizeof(double));
+  tv1    = (double*) malloc(nlev1*sizeof(double));
+  theta1 = (double*) malloc(nlev1*sizeof(double));
+  rh1    = (double*) malloc(nlev1*sizeof(double));
+  zvar   = (double*) malloc(nlev1*sizeof(double));
+
+  ph2    = (double*) malloc(nlev2p1*sizeof(double));
+  lnph2  = (double*) malloc(nlev2p1*sizeof(double));
+  fi2    = (double*) malloc(nlev2p1*sizeof(double));
+
+  pf2    = (double*) malloc(nlev2*sizeof(double));
+  /* lnpf2  = (double*) malloc(nlev2*sizeof(double)); */
+  rh2    = (double*) malloc(nlev2*sizeof(double));
+  wgt    = (double*) malloc(nlev2*sizeof(double));
+  idx    = (long*) malloc(nlev2*sizeof(long));
 
   if ( ltq )
     {
-      zt2       = malloc(nlev2*sizeof(double));
-      zq2       = malloc(nlev2*sizeof(double));
-      rh_pbl    = malloc(nlev2*sizeof(double));
-      theta_pbl = malloc(nlev2*sizeof(double));
+      zt2       = (double*) malloc(nlev2*sizeof(double));
+      zq2       = (double*) malloc(nlev2*sizeof(double));
+      rh_pbl    = (double*) malloc(nlev2*sizeof(double));
+      theta_pbl = (double*) malloc(nlev2*sizeof(double));
     }
 
   if ( nvars > 0 )
     {
-      vars_pbl  = malloc(nvars*sizeof(double *));
+      vars_pbl  = (double **) malloc(nvars*sizeof(double *));
       for ( iv = 0; iv < nvars; ++iv )
-	vars_pbl[iv] = malloc(nlev2*sizeof(double));
+	vars_pbl[iv] = (double*) malloc(nlev2*sizeof(double));
     }
 #endif
   
-  af1    = malloc(nlev1*sizeof(double));
-  bf1    = malloc(nlev1*sizeof(double));
-  etaf1  = malloc(nlev1*sizeof(double));
+  af1    = (double*) malloc(nlev1*sizeof(double));
+  bf1    = (double*) malloc(nlev1*sizeof(double));
+  etaf1  = (double*) malloc(nlev1*sizeof(double));
 
-  etah2  = malloc(nlev2p1*sizeof(double));
+  etah2  = (double*) malloc(nlev2p1*sizeof(double));
 
-  af2    = malloc(nlev2*sizeof(double));
-  bf2    = malloc(nlev2*sizeof(double));
-  etaf2  = malloc(nlev2*sizeof(double));
+  af2    = (double*) malloc(nlev2*sizeof(double));
+  bf2    = (double*) malloc(nlev2*sizeof(double));
+  etaf2  = (double*) malloc(nlev2*sizeof(double));
 
-  w1     = malloc(nlev2*sizeof(double));
-  w2     = malloc(nlev2*sizeof(double));
-  jl1    = malloc(nlev2*sizeof(long));
-  jl2    = malloc(nlev2*sizeof(long));
+  w1     = (double*) malloc(nlev2*sizeof(double));
+  w2     = (double*) malloc(nlev2*sizeof(double));
+  jl1    = (long*) malloc(nlev2*sizeof(long));
+  jl2    = (long*) malloc(nlev2*sizeof(long));
 
 
   /******* set coordinate system ETA's, A's, B's
@@ -1027,30 +1027,30 @@ int main (int argc, char *argv[])
   int ij, k;
   int ltq = 1;
 
-  fis1 = malloc(NGP*sizeof(double));
-  ps1  = malloc(NGP*sizeof(double));
-  fis2 = malloc(NGP*sizeof(double));
-  ps2  = malloc(NGP*sizeof(double));
-
-  tscor  = malloc(NGP*sizeof(double));
-  pscor  = malloc(NGP*sizeof(double));
-  secor  = malloc(NGP*sizeof(double));
-
-  t1  = malloc(NGP*19*sizeof(double));
-  q1  = malloc(NGP*19*sizeof(double));
-  u1  = malloc(NGP*19*sizeof(double));
-  v1  = malloc(NGP*19*sizeof(double));
-  cl1 = malloc(NGP*19*sizeof(double));
-  ci1 = malloc(NGP*19*sizeof(double));
-  cc1 = malloc(NGP*19*sizeof(double));
-
-  t2  = malloc(NGP*40*sizeof(double));
-  q2  = malloc(NGP*40*sizeof(double));
-  u2  = malloc(NGP*40*sizeof(double));
-  v2  = malloc(NGP*40*sizeof(double));
-  cl2 = malloc(NGP*40*sizeof(double));
-  ci2 = malloc(NGP*40*sizeof(double));
-  cc2 = malloc(NGP*40*sizeof(double));
+  fis1 = (double*) malloc(NGP*sizeof(double));
+  ps1  = (double*) malloc(NGP*sizeof(double));
+  fis2 = (double*) malloc(NGP*sizeof(double));
+  ps2  = (double*) malloc(NGP*sizeof(double));
+
+  tscor  = (double*) malloc(NGP*sizeof(double));
+  pscor  = (double*) malloc(NGP*sizeof(double));
+  secor  = (double*) malloc(NGP*sizeof(double));
+
+  t1  = (double*) malloc(NGP*19*sizeof(double));
+  q1  = (double*) malloc(NGP*19*sizeof(double));
+  u1  = (double*) malloc(NGP*19*sizeof(double));
+  v1  = (double*) malloc(NGP*19*sizeof(double));
+  cl1 = (double*) malloc(NGP*19*sizeof(double));
+  ci1 = (double*) malloc(NGP*19*sizeof(double));
+  cc1 = (double*) malloc(NGP*19*sizeof(double));
+
+  t2  = (double*) malloc(NGP*40*sizeof(double));
+  q2  = (double*) malloc(NGP*40*sizeof(double));
+  u2  = (double*) malloc(NGP*40*sizeof(double));
+  v2  = (double*) malloc(NGP*40*sizeof(double));
+  cl2 = (double*) malloc(NGP*40*sizeof(double));
+  ci2 = (double*) malloc(NGP*40*sizeof(double));
+  cc2 = (double*) malloc(NGP*40*sizeof(double));
 
   for ( ij = 0; ij < NGP; ++ij )
     {
diff --git a/src/history.c b/src/history.c
index f582a39..4ac56b2 100644
--- a/src/history.c
+++ b/src/history.c
@@ -64,7 +64,7 @@ void cdoInqHistory(int fileID)
   if ( ghistorysize > 0 )
     {
       size_t len;
-      ghistory = malloc(ghistorysize+1);
+      ghistory = (char*) malloc(ghistorysize+1);
       ghistory[ghistorysize] = 0;
       streamInqHistoryString(fileID, ghistory);
       len = strlen(ghistory);
@@ -77,29 +77,44 @@ void cdoInqHistory(int fileID)
 }
 
 
-void cdoDefHistory(int fileID, char *histstring)
+void cdoDefHistory(int fileID, char* histstring)
 {
-  char *history = NULL;
+  char* strtimeptr = NULL;
+  char* history = NULL;
   size_t historysize = 0;
-  char *strtimeptr;
-  extern int cdoDisableHistory;
+  extern int CDO_Append_History;
+  extern int CDO_Reset_History;
 
-  strtimeptr = get_strtimeptr();
-  
-  historysize = ghistorysize+strlen(strtimeptr)+strlen(histstring)+2;
-  history = malloc(historysize);
+  if ( !CDO_Reset_History ) historysize += ghistorysize+1;
+
+  if ( CDO_Append_History )
+    {
+      strtimeptr = get_strtimeptr();
+      historysize += strlen(strtimeptr)+strlen(histstring)+1;
+    }
+
+  if ( historysize )
+    {
+      history = (char*) malloc(historysize);
+      history[0] = 0;
+    }
 
-  strcpy(history, strtimeptr);
-  strcat(history, histstring);
+  if ( CDO_Append_History )
+    {
+      strcpy(history, strtimeptr);
+      strcat(history, histstring);
+    }
 
-  if ( cdoDisableHistory == FALSE )
+  if ( !CDO_Reset_History )
     if ( ghistory )
       {
-	strcat(history, "\n");
+	if ( CDO_Append_History ) strcat(history, "\n");
 	strcat(history, ghistory);
       }
-
-  streamDefHistory(fileID, strlen(history), history);
   
-  free(history);
+  if ( historysize )
+    {
+      streamDefHistory(fileID, strlen(history), history);
+      free(history);
+    }
 }
diff --git a/src/interpol.c b/src/interpol.c
index b26007c..4cf343c 100644
--- a/src/interpol.c
+++ b/src/interpol.c
@@ -129,48 +129,51 @@ int rect_grid_search2(long *imin, long *imax, double xmin, double xmax, long nxm
 {
   int lfound = 0;
   int lascend = 0;
-  long i;
+  long i1, i2;
   *imin = nxm;
   *imax = -1;
   
   if ( xm[0] < xm[nxm-1] ) lascend = 1;
 
-  i = find_element(xmin, nxm, xm);
-
-  if ( i > 0 && i < nxm )
+  i1 = find_element(xmin, nxm, xm);
+  i2 = find_element(xmax, nxm, xm);
+      
+  if ( i1 > 0 && i1 < nxm )
     {
       lfound = 1;
 
       if ( lascend )
 	{
-	  if ( i > 1 && xmin <= xm[i-1] ) i--;
-	  *imin = i-1;
-	  *imax = i-1;
+	  if ( i1 > 1 && xmin <= xm[i1-1] ) i1--;
+	  *imin = i1-1;
+	  *imax = i1-1;
 	}
       else
 	{
-	  if ( i > 1 && i < nxm-2 && xmin <= xm[i+1] ) i++;   
-	  *imin = i-1;
-	  *imax = i-1;
+	  if ( i1 < nxm-1 && xmin <= xm[i1] ) i1++;   
+	  *imin = i1-1;
+	  *imax = i1-1;
 	}
+    }
+  
+  if ( i2 > 0 && i2 < nxm )
+    {
+      lfound = 1;
 
-      i = find_element(xmax, nxm, xm);
-
-      if ( i > 0 && i < nxm )
+      if ( lascend )
 	{
-	  if ( lascend )
-	    {
-	      if ( i > 1 && i < nxm-2 && xmax >= xm[i+1] ) i++;   
-	      *imax = i-1;
-	    }
-	  else
-	    {
-	      if ( i > 1 && xmax >= xm[i-1] ) i--;
-	      *imin = i-1;
-	    }
+	  if ( i2 < nxm-1 && xmax >= xm[i2] ) i2++;   
+	  *imax = i2-1;
+	  if ( *imin == nxm ) *imin = *imax;
+	}
+      else
+	{
+	  if ( i2 > 1 && xmax >= xm[i2-1] ) i2--;
+	  *imin = i2-1;
+	  if ( *imax == -1 ) *imax = *imin;
 	}
     }
-  
+
   return (lfound);
 }
 
@@ -236,7 +239,7 @@ void intlinarr2(double missval, int lon_is_circular,
   if ( lon_is_circular ) nlon1--;
   gridsize1 = nlon1*nym;
 
-  grid1_mask = calloc(1, gridsize1*sizeof(int));
+  grid1_mask = (int*) calloc(1, gridsize1*sizeof(int));
   for ( jj = 0; jj < nym; ++jj )
     for ( ii = 0; ii < nlon1; ++ii )
       {
@@ -382,9 +385,9 @@ void intconarr2(double missval, int lon_is_circular,
   //if ( lon_is_circular ) nlon1--;
   gridsize1 = nx*ny;
 
-  deps = malloc(gridsize1*sizeof(int));
+  deps = (int*) malloc(gridsize1*sizeof(int));
 
-  grid1_mask = calloc(1, gridsize1*sizeof(int));
+  grid1_mask = (int*) calloc(1, gridsize1*sizeof(int));
   for ( jj = 0; jj < ny; ++jj )
     for ( ii = 0; ii < nx; ++ii )
       {
@@ -412,28 +415,28 @@ void intconarr2(double missval, int lon_is_circular,
   double weight_sum;
 
   double *weight;
-  weight = malloc(gridsize1*sizeof(double));
+  weight = (double*) malloc(gridsize1*sizeof(double));
 
   double tgt_area;
   double *area;
-  area = malloc(gridsize1*sizeof(double));
+  area = (double*) malloc(gridsize1*sizeof(double));
 
   struct grid_cell *SourceCell;
-  SourceCell = malloc (gridsize1  * sizeof(*SourceCell) );
+  SourceCell = (struct grid_cell*) malloc(gridsize1  * sizeof(struct grid_cell));
 
   for ( int n = 0; n <  gridsize1; n++ ) {
     SourceCell[n].num_corners   = 4;
     SourceCell[n].edge_type     = quad_type;
-    SourceCell[n].coordinates_x = malloc (4 * sizeof(SourceCell[n].coordinates_x[0]) );
-    SourceCell[n].coordinates_y = malloc (4 * sizeof(SourceCell[n].coordinates_y[0]) );
+    SourceCell[n].coordinates_x = (double*) malloc(4 * sizeof(double));
+    SourceCell[n].coordinates_y = (double*) malloc(4 * sizeof(double));
   }
 
   struct grid_cell  TargetCell;
 
   TargetCell.num_corners   = nc2;
   TargetCell.edge_type     = quad_type;
-  TargetCell.coordinates_x = malloc (nc2 * sizeof(*TargetCell.coordinates_x) );
-  TargetCell.coordinates_y = malloc (nc2 * sizeof(*TargetCell.coordinates_y) );
+  TargetCell.coordinates_x = (double*) malloc(nc2 * sizeof(double));
+  TargetCell.coordinates_y = (double*) malloc(nc2 * sizeof(double));
 
   unsigned const * curr_deps;
 #endif
@@ -720,13 +723,13 @@ void intgridbil(field_t *field1, field_t *field2)
   nlon1 = gridInqXsize(gridID1);
   nlat1 = gridInqYsize(gridID1);
 
-  array1_2D = malloc(nlat1*sizeof(double *));
+  array1_2D = (double **) malloc(nlat1*sizeof(double *));
   for ( ilat = 0; ilat < nlat1; ilat++ )
     array1_2D[ilat] = array1 + ilat*nlon1;
 
   if ( lon_is_circular ) nlon1 += 1;
-  lon1 = malloc(nlon1*sizeof(double));
-  lat1 = malloc(nlat1*sizeof(double));
+  lon1 = (double*) malloc(nlon1*sizeof(double));
+  lat1 = (double*) malloc(nlat1*sizeof(double));
   gridInqXvals(gridID1, lon1);
   gridInqYvals(gridID1, lat1);
   if ( lon_is_circular ) lon1[nlon1-1] = 0;
@@ -758,9 +761,9 @@ void intgridbil(field_t *field1, field_t *field2)
       if ( lon2 > lon1[nlon1-1] )
 	{
 	  field  = array1_2D;
-	  array1_2D = malloc(nlat1*sizeof(double *));
-	  lon1 = realloc(lon1, (nlon1+1)*sizeof(double));
-	  array = malloc(nlat1*(nlon1+1)*sizeof(double));
+	  array1_2D = (double **) malloc(nlat1*sizeof(double *));
+	  lon1 = (double*) realloc(lon1, (nlon1+1)*sizeof(double));
+	  array = (double*) malloc(nlat1*(nlon1+1)*sizeof(double));
 
 	  for ( ilat = 0; ilat < nlat1; ilat++ )
 	    {
@@ -800,8 +803,8 @@ void intgridbil(field_t *field1, field_t *field2)
 
       gridsize2 = gridInqSize(gridID2);
 
-      lon2 = malloc(gridsize2*sizeof(double));
-      lat2 = malloc(gridsize2*sizeof(double));
+      lon2 = (double*) malloc(gridsize2*sizeof(double));
+      lat2 = (double*) malloc(gridsize2*sizeof(double));
       gridInqXvals(gridID2, lon2);
       gridInqYvals(gridID2, lat2);
 
@@ -869,8 +872,8 @@ void intgridcon(field_t *field1, field_t *field2)
   nlon1 = gridInqXsize(gridID1);
   nlat1 = gridInqYsize(gridID1);
 
-  lon1 = malloc(nlon1*sizeof(double));
-  lat1 = malloc(nlat1*sizeof(double));
+  lon1 = (double*) malloc(nlon1*sizeof(double));
+  lat1 = (double*) malloc(nlat1*sizeof(double));
   gridInqXvals(gridID1, lon1);
   gridInqYvals(gridID1, lat1);
 
@@ -881,8 +884,8 @@ void intgridcon(field_t *field1, field_t *field2)
 
   nlon1b = nlon1 + 1;
   nlat1b = nlat1 + 1;
-  lon1bounds = malloc(nlon1b*sizeof(double));
-  lat1bounds = malloc(nlat1b*sizeof(double));
+  lon1bounds = (double*) malloc(nlon1b*sizeof(double));
+  lat1bounds = (double*) malloc(nlat1b*sizeof(double));
 
   grid_gen_corners(nlon1, lon1, lon1bounds);
   grid_gen_corners(nlat1, lat1, lat1bounds);
@@ -921,8 +924,8 @@ void intgridcon(field_t *field1, field_t *field2)
 
   if ( gridInqYbounds(gridID2, NULL) && gridInqXbounds(gridID2, NULL) )
     {
-      grid2_corner_lon = malloc(nc2*gridsize2*sizeof(double));
-      grid2_corner_lat = malloc(nc2*gridsize2*sizeof(double));
+      grid2_corner_lon = (double*) malloc(nc2*gridsize2*sizeof(double));
+      grid2_corner_lat = (double*) malloc(nc2*gridsize2*sizeof(double));
       gridInqXbounds(gridID2, grid2_corner_lon);
       gridInqYbounds(gridID2, grid2_corner_lat);
     }
@@ -1011,8 +1014,8 @@ void interpolate(field_t *field1, field_t *field2)
   out_nlon = gridInqXsize(gridIDo);
   out_nlat = gridInqYsize(gridIDo);
 
-  lon_array = malloc((nlon + 2) * sizeof(double));
-  lat_array = malloc((nlat + 2) * sizeof(double));
+  lon_array = (double*) malloc((nlon + 2) * sizeof(double));
+  lat_array = (double*) malloc((nlat + 2) * sizeof(double));
   lon = lon_array + 1;
   lat = lat_array + 1;
 
@@ -1063,9 +1066,9 @@ void interpolate(field_t *field1, field_t *field2)
   if ( lat[nlat] < -90 ) lat[nlat] = -99;
   if ( lat[nlat] >  90 ) lat[nlat] =  99;
 
-  lono_array = malloc((out_nlon < 2 ? 4 : out_nlon + 2) * sizeof(double));
+  lono_array = (double*) malloc((out_nlon < 2 ? 4 : out_nlon + 2) * sizeof(double));
   lono = lono_array + 1;
-  lato_array = malloc((out_nlat < 2 ? 4 : out_nlat + 2) * sizeof(double));
+  lato_array = (double*) malloc((out_nlat < 2 ? 4 : out_nlat + 2) * sizeof(double));
   lato = lato_array + 1;
 
   gridInqXvals(gridIDo, lono);
@@ -1137,13 +1140,13 @@ void interpolate(field_t *field1, field_t *field2)
 
   nxlon = 2*nlon + 1;
   nxlat = 2*nlat + 1;
-  xin_array = malloc(nxlon * nxlat * sizeof(double));
-  xin = malloc(nxlat * sizeof(double *));
+  xin_array = (double*) malloc(nxlon * nxlat * sizeof(double));
+  xin = (double **) malloc(nxlat * sizeof(double *));
 
   for (ilat = 0; ilat < nxlat; ilat++)
     xin[ilat] = xin_array + ilat * nxlon;
 
-  xlon = malloc(nxlon * sizeof (double));
+  xlon = (double *) malloc(nxlon * sizeof(double));
   for ( ilon = 0; ilon < nlon; ilon++ )
     {
       xlon[2*ilon + 1] = lon[ilon];
@@ -1151,7 +1154,7 @@ void interpolate(field_t *field1, field_t *field2)
     }
   xlon[2 * nlon] = (lon[nlon - 1] + lon[nlon]) / 2;
 
-  xlat = malloc((2 * nlat + 1) * sizeof (double));
+  xlat = (double*) malloc((2 * nlat + 1) * sizeof(double));
   for ( ilat = 0; ilat < nlat; ilat++ )
     {
       xlat[2*ilat + 1] = lat[ilat];
@@ -1159,18 +1162,18 @@ void interpolate(field_t *field1, field_t *field2)
     }
   xlat[2 * nlat] = (lat[nlat - 1] + lat[nlat]) / 2;
 
-  in0 = malloc(nlat * sizeof (double *));
+  in0 = (double**) malloc(nlat * sizeof(double*));
   for (ilat = 0; ilat < nlat; ilat++)
     in0[ilat] = arrayIn + ilat * nlon;
 
-  ilon11 = malloc(out_nlon * sizeof(long));
-  ilon12 = malloc(out_nlon * sizeof(long));
-  ilon21 = malloc(out_nlon * sizeof(long));
-  ilon22 = malloc(out_nlon * sizeof(long));
-  volon11 = malloc(out_nlon * sizeof(double));
-  volon12 = malloc(out_nlon * sizeof(double));
-  volon21 = malloc(out_nlon * sizeof(double));
-  volon22 = malloc(out_nlon * sizeof(double));
+  ilon11 = (long*) malloc(out_nlon * sizeof(long));
+  ilon12 = (long*) malloc(out_nlon * sizeof(long));
+  ilon21 = (long*) malloc(out_nlon * sizeof(long));
+  ilon22 = (long*) malloc(out_nlon * sizeof(long));
+  volon11 = (double*) malloc(out_nlon * sizeof(double));
+  volon12 = (double*) malloc(out_nlon * sizeof(double));
+  volon21 = (double*) malloc(out_nlon * sizeof(double));
+  volon22 = (double*) malloc(out_nlon * sizeof(double));
 
   for (olon = 0; olon < out_nlon; olon++)
     {
@@ -1195,8 +1198,8 @@ void interpolate(field_t *field1, field_t *field2)
       ilon22[olon] = l22;
     }
 
-  ilat1 = malloc(out_nlat * sizeof(long));
-  ilat2 = malloc(out_nlat * sizeof(long));
+  ilat1 = (long*) malloc(out_nlat * sizeof(long));
+  ilat2 = (long*) malloc(out_nlat * sizeof(long));
 
   xlat_is_ascending = xlat[0] <= xlat[nxlat - 1];
   for ( olat = 0; olat < out_nlat; olat++ )
@@ -1234,7 +1237,7 @@ void interpolate(field_t *field1, field_t *field2)
       ilat2[olat] = l2;
     }
 
-  xout = malloc(out_nlat * sizeof (double *));
+  xout = (double**) malloc(out_nlat * sizeof(double*));
   for (olat = 0; olat < out_nlat; olat++)
     xout[olat] = arrayOut + olat * out_nlon;
 
@@ -1539,17 +1542,17 @@ void contrast(void)
 
   if (rec == 1)
     {
-      xin_array = malloc((nlat + 2) * (nlon + 2) * sizeof(double));
-      xin = malloc((nlat + 2) * sizeof(double *));
+      xin_array = (double*) malloc((nlat + 2) * (nlon + 2) * sizeof(double));
+      xin = (double **) malloc((nlat + 2) * sizeof(double *));
       *xin = *(xin + 1);
       for (ilat = -1; ilat <= nlat; ilat++)
 	xin[ilat] = xin_array + (ilat + 1) * (nlon + 2) + 1;
-      xout = malloc(nlat * sizeof(double *));
+      xout = (double **) malloc(nlat * sizeof(double *));
       for (ilat = 0; ilat < nlat; ilat++)
 	xout[ilat] = out[0] + ilat * nlon;
       for (j = 0; j < 17; j++)
 	{
-	  xwork[j] = malloc(nlat * sizeof(double *));
+	  xwork[j] = (double **) malloc(nlat * sizeof(double *));
 	  for (ilat = 0; ilat < nlat; ilat++)
 	    xwork[j][ilat] = work[j] + ilat * nlon;
 	}
diff --git a/src/job.c b/src/job.c
index f53dc0a..88c45bc 100644
--- a/src/job.c
+++ b/src/job.c
@@ -2,6 +2,10 @@
 #  include "config.h"
 #endif
 
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 /* gethostname */
+#endif
+
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
@@ -55,7 +59,7 @@ static drmaa_job_template_t *create_job_template(const char *expname, const char
   /* determine current path */
 
   size = pathconf(".", _PC_PATH_MAX);
-  if ( (dir = malloc((size_t)size)) != NULL )
+  if ( (dir = (char*) malloc((size_t)size)) != NULL )
     {
       ptr = getcwd(dir, (size_t)size);
     }
@@ -67,7 +71,7 @@ static drmaa_job_template_t *create_job_template(const char *expname, const char
   len2 = strlen(GRID_TMPDIR);
   len = len1+len2+2;
 
-  output_path = malloc(len*sizeof(char));
+  output_path = (char*) malloc(len*sizeof(char));
   /*
   strcpy(output_path, host);
   strcat(output_path, ":");
diff --git a/src/kvlist.c b/src/kvlist.c
index 8c36694..bc1192d 100644
--- a/src/kvlist.c
+++ b/src/kvlist.c
@@ -46,6 +46,10 @@
     valid_max:         1.119e+05
 */
 
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 /* strdup */
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -284,7 +288,7 @@ void *kvlParseFile(const char *filename)
   filesize = (size_t) ftell(fp);
   fseek(fp, 0L, SEEK_SET);
 
-  buffer = malloc(filesize);
+  buffer = (char*) malloc(filesize);
   nitems = fread(buffer, 1, filesize, fp);
 
   fclose(fp);
@@ -295,7 +299,7 @@ void *kvlParseFile(const char *filename)
       return (kvl);
     }
  
-  kvl = calloc(1, sizeof(kvl_t));
+  kvl = (kvl_t*) calloc(1, sizeof(kvl_t));
   kvl->buffer = buffer;
   kvl->buffersize = filesize;
   kvl->filename = strdup(filename);
diff --git a/src/list.c b/src/list.c
index 5268455..32d3448 100644
--- a/src/list.c
+++ b/src/list.c
@@ -45,7 +45,7 @@ LIST *listNew(int type)
     }
   else
     {
-      list = malloc(sizeof(LIST));
+      list = (LIST*) malloc(sizeof(LIST));
       listInit(list, type);
     }
 
@@ -75,9 +75,9 @@ static void listCheck(LIST *list, int num)
     {
       list->nalloc += list->allinc;
       if ( list->type == INT_LIST )
-	list->array = realloc(list->array, list->nalloc*sizeof(int));
+	list->array = (int*) realloc(list->array, list->nalloc*sizeof(int));
       else
-	list->array = realloc(list->array, list->nalloc*sizeof(double));
+	list->array = (double*) realloc(list->array, list->nalloc*sizeof(double));
     }
 }
 
diff --git a/src/magics_template_parser.c b/src/magics_template_parser.c
index d6d7a5a..4c48f78 100644
--- a/src/magics_template_parser.c
+++ b/src/magics_template_parser.c
@@ -165,7 +165,7 @@ int SetMagicsParameterValue( char *param_name, char *param_type, char *param_val
 		split_str_count = StringSplitWithSeperator( param_value, sep_char, &split_str );
 		if( split_str_count )
 		  {
-			float_param_list = malloc ( sizeof( double ) * split_str_count );
+		    float_param_list = (double*) malloc(sizeof(double) * split_str_count );
 			for( i = 0; i < split_str_count; i++ )
 			  {
 #if 0
@@ -194,7 +194,7 @@ int SetMagicsParameterValue( char *param_name, char *param_type, char *param_val
 		split_str_count = StringSplitWithSeperator( param_value, sep_char, &split_str );
 		if( split_str_count )
 		  {
-			int_param_list = malloc ( sizeof( int ) * split_str_count );
+		    int_param_list = (double*) malloc(sizeof( int ) * split_str_count );
 			for( i = 0; i < split_str_count; i++ )
 			{
 				int_param_list[i] = atoi( split_str[i] );			
diff --git a/src/merge_sort2.c b/src/merge_sort2.c
index 2607328..ffcfe3d 100644
--- a/src/merge_sort2.c
+++ b/src/merge_sort2.c
@@ -71,7 +71,7 @@ void sort_par(long num_links, double *restrict add1, int parent, int par_depth)
 	     "       in this implementation of merge sort\n");
     }
 
-  idx = malloc(num_links*sizeof(long));
+  idx = (long*) malloc(num_links*sizeof(long));
 
   /* SPLIT AND SORT THE DATA FRAGMENTS */
   add_srt[0] = 0;                  add_srt[1] = num_links/nsplit;
@@ -127,7 +127,7 @@ void sort_par(long num_links, double *restrict add1, int parent, int par_depth)
     //    merge_time += end-start;
   }
 
-  tmp = malloc(num_links*sizeof(double));
+  tmp = (double*) malloc(num_links*sizeof(double));
 
 #if defined(_OPENMP)
 #pragma omp parallel for if ( depth < par_depth /* && num_links > 4096*/ ) \
diff --git a/src/modules.c b/src/modules.c
index a9b6485..97bf974 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -293,9 +293,9 @@ void *Maggraph(void *argument);
 #define  ConsecstatOperators    {"consects", "consecsum"}
 #define  CopyOperators          {"copy", "selall", "szip"}
 #define  DeltimeOperators       {"delday", "del29feb"}
-#define  DeriveparOperators     {"geopotheight", "sealevelpressure"}
+#define  DeriveparOperators     {"gheight", "sealevelpressure"}
 #define  DetrendOperators       {"detrend"}
-#define  DiffOperators          {"diff", "diff2", "diffp", "diffn", "diffc"}
+#define  DiffOperators          {"diff", "diffp", "diffn", "diffc"}
 #define  DuplicateOperators     {"duplicate"}
 #define  Echam5iniOperators     {"import_e5ml", "import_e5res", \
                                  "export_e5ml", "export_e5res"}
@@ -369,8 +369,8 @@ void *Maggraph(void *argument);
 #define  PressureOperators      {"pressure_fl", "pressure_hl", "deltap"}
 #define  RegresOperators        {"regres"}
 #define  RemapOperators         {"remap"}
-#define    RemapgridOperators   {"remapcons", "remapcon", "remapbil", "remapbic", "remapdis", "remapnn", "remaplaf", "remapcon2", "remapsum"}
-#define    GenweightsOperators  {"gencons", "gencon", "genbil", "genbic", "gendis", "gennn", "genlaf", "gencon2"}
+#define    RemapgridOperators   {"remapycon", "remapcon", "remapbil", "remapbic", "remapdis", "remapnn", "remaplaf", "remapcon2", "remapsum"}
+#define    GenweightsOperators  {"genycon", "gencon", "genbil", "genbic", "gendis", "gennn", "genlaf", "gencon2"}
 #define  RemapetaOperators      {"remapeta", "remapeta_s", "remapeta_z"}
 #define  ReplaceOperators       {"replace"}
 #define  ReplacevaluesOperators {"setvals", "setrtoc", "setrtoc2"}
@@ -389,13 +389,13 @@ void *Maggraph(void *argument);
 #define  SelrecOperators        {"selrec"}
 #define  SeltimeOperators       {"seltimestep", "selyear", "selseas", "selmon", "selday", "selhour", "seldate", \
                                  "seltime", "selsmon"}
-#define  SetOperators           {"setcode", "setparam", "setname", "setunit", "setlevel", "setltype", "settabnum"}
+#define  SetOperators           {"setpartab", "setcode", "setparam", "setname", "setunit", "setlevel", "setltype", "settabnum"}
 #define  SetboxOperators        {"setclonlatbox", "setcindexbox"}
 #define  SetgattOperators       {"setgatt", "setgatts"}
 #define  SetgridOperators       {"setgrid", "setgridtype", "setgridarea", "setgridmask", "unsetgridmask", "setgridnumber", "setgriduri"}
 #define  SethaloOperators       {"sethalo", "tpnhalo"}
 #define  SetmissOperators       {"setmissval", "setctomiss", "setmisstoc", "setrtomiss", "setvrange"}
-#define  SetpartabOperators     {"setpartab", "setpartabc", "setpartabp", "setpartabn"}
+#define  SetpartabOperators     {"setpartabc", "setpartabp", "setpartabn"}
 #define  SetrcanameOperators    {"setrcaname"}
 #define  SettimeOperators       {"setyear", "setmon", "setday", "setdate", "settime", "settunits", \
                                  "settaxis", "setreftime", "setcalendar", "shifttime"}
@@ -452,7 +452,7 @@ void *Maggraph(void *argument);
 #define  TrmsOperators          {"trms"}
 #define  TstepcountOperators    {"tstepcount"}
 #define  VardupOperators        {"pardup", "parmul"}
-#define  VargenOperators        {"random", "const", "sincos", "for", "topo", "temp", "mask", "stdatm"}
+#define  VargenOperators        {"random", "const", "sincos", "coshill", "for", "topo", "temp", "mask", "stdatm"}
 #define  VarrmsOperators        {"varrms"}
 #define  VertintOperators       {"ml2pl", "ml2hl", "ml2plx", "ml2hlx", \
                                  "ml2pl_lp", "ml2hl_lp", "ml2plx_lp", "ml2hlx_lp"}
@@ -562,7 +562,7 @@ static modules_t Modules[] =
   { Consecstat,     ConsecstatHelp,    ConsecstatOperators,    CDI_REAL,  1,  1 },
   { Copy,           CopyHelp,          CopyOperators,          CDI_REAL, -1,  1 },
   { Deltime,        NULL,              DeltimeOperators,       CDI_REAL,  1,  1 },
-  { Derivepar,      NULL,              DeriveparOperators,     CDI_REAL,  1,  1 },
+  { Derivepar,      DeriveparHelp,     DeriveparOperators,     CDI_REAL,  1,  1 },
   { Detrend,        DetrendHelp,       DetrendOperators,       CDI_REAL,  1,  1 },
   { Diff,           DiffHelp,          DiffOperators,          CDI_REAL,  2,  0 },
   { Duplicate,      DuplicateHelp,     DuplicateOperators,     CDI_REAL,  1,  1 },
@@ -655,7 +655,7 @@ static modules_t Modules[] =
   { Setgrid,        SetgridHelp,       SetgridOperators,       CDI_BOTH,  1,  1 },
   { Sethalo,        SethaloHelp,       SethaloOperators,       CDI_REAL,  1,  1 },
   { Setmiss,        SetmissHelp,       SetmissOperators,       CDI_REAL,  1,  1 },
-  { Setpartab,      SetHelp,           SetpartabOperators,     CDI_REAL,  1,  1 },
+  { Setpartab,      SetpartabHelp,     SetpartabOperators,     CDI_REAL,  1,  1 },
   { Setrcaname,     NULL,              SetrcanameOperators,    CDI_REAL,  1,  1 },
   { Settime,        SettimeHelp,       SettimeOperators,       CDI_BOTH,  1,  1 },
   { Setzaxis,       SetzaxisHelp,      SetzaxisOperators,      CDI_BOTH,  1,  1 },
@@ -790,6 +790,7 @@ static char *opalias[][2] =
   {"diffv",               "diffn"      },
   {"covar0",              "timcovar"   },
   {"covar0r",             "fldcovar"   },
+  {"geopotheight",        "gheight"    },
   {"ggstat",              "info"       },
   {"ggstats",             "sinfo"      },
   {"globavg",             "fldavg"     },
diff --git a/src/namelist.c b/src/namelist.c
index e931170..37c4ed1 100644
--- a/src/namelist.c
+++ b/src/namelist.c
@@ -51,15 +51,6 @@ int readline(FILE *fp, char *line, int len);
 #define  MIN(a,b)  ((a) < (b) ? (a) : (b))
 #undef   MAX
 #define  MAX(a,b)  ((a) > (b) ? (a) : (b))
-#undef   NINT
-#define  NINT(x)   ((x) < 0 ? (int)((x)-0.5) : (int)((x)+0.5))
-
-struct PGMSTAT
-{
-  int intract;
-};
-
-struct PGMSTAT pgmstat;
 
 
 static void namelist_init(namelist_t *namelist, const char *name)
@@ -74,7 +65,7 @@ namelist_t *namelistNew(const char *name)
 {
   namelist_t *namelist;
 
-  namelist = malloc(sizeof(namelist_t));
+  namelist = (namelist_t*) malloc(sizeof(namelist_t));
 
   namelist_init(namelist, name);
 
@@ -190,7 +181,7 @@ int namelistAdd(namelist_t *nml, const char *name, int type, int dis, void *ptr,
       return (-1);
     }
 
-  nml_entry = malloc(sizeof(nml_entry_t));
+  nml_entry = (nml_entry_t*) malloc(sizeof(nml_entry_t));
 
   nml_entry->name = strdup(name);
   nml_entry->type = type;
@@ -229,8 +220,8 @@ int namelistNum(namelist_t *nml, const char *name)
   return (nocc);
 }
 
-
-static void getnite(FILE *nmlfp, namelist_t *nml)
+static
+void getnite(FILE *nmlfp, namelist_t *nml)
 {
   int nst, i, j;
   int linelen;
@@ -241,27 +232,27 @@ static void getnite(FILE *nmlfp, namelist_t *nml)
     {
       for ( i = nst; i < MAX_LINE_LEN; i++ )
 	{
-	  if ( nml->line.linelc[i] == 0 ) break;
-
-          if      (   nml->line.linelc[i] == ' ' ) continue;
-	  else if (   nml->line.linelc[i] == '=' ) continue;
-          else if (   nml->line.linelc[i] == ',' ) continue;
-          else if ( ((nml->line.linelc[i] >= 'a')  &&
-		     (nml->line.linelc[i] <= 'z')) ||
-	             (nml->line.linelc[i] == '_')  ||
-	             (nml->line.linelc[i] == '/')  ||
-	             (nml->line.linelc[i] == '$')  ||
-		     (nml->line.linelc[i] == '&') )
+	  char *linelc = nml->line.linelc;
+	  int ch = (int) linelc[i];
+
+	  if ( ch == 0 ) break;
+
+          if      (   ch == ' ' ) continue;
+	  else if (   ch == '=' ) continue;
+          else if (   ch == ',' ) continue;
+          else if ( ((ch >= 'a')  && (ch <= 'z')) ||
+	             (ch == '_')  || (ch == '/')  ||
+	             (ch == '$')  || (ch == '&') )
 	    {
 	      nml->line.nptype = NML_KEYWORD;
 	      nml->line.namitf = i;
 	      for ( j = nml->line.namitf+1; j < MAX_LINE_LEN; j++ )
 		{
-		  if ( !(islower((int) nml->line.linelc[j]) ||
-			 (((int) nml->line.linelc[j]) == '_') ||
-			 (((int) nml->line.linelc[j]) == '-') ||
-			 (((int) nml->line.linelc[j]) == '+') ||
-			 isdigit((int) nml->line.linelc[j])) )
+		  if ( !(islower((int) linelc[j]) ||
+			 (((int) linelc[j]) == '_') ||
+			 (((int) linelc[j]) == '-') ||
+			 (((int) linelc[j]) == '+') ||
+			 isdigit((int) linelc[j])) )
 		    {
 		      nml->line.namitl = j - 1;
 		      return;
@@ -270,14 +261,14 @@ static void getnite(FILE *nmlfp, namelist_t *nml)
 	      nml->line.namitl = MAX_LINE_LEN;
 	      return;
 	    }
-          else if ( nml->line.linelc[i] == '\'' ||
-		    nml->line.linelc[i] == '\"' ||
-		    nml->line.linelc[i] == '`')
+          else if ( ch == '\'' ||
+		    ch == '\"' ||
+		    ch == '`')
 	    {
 	      nml->line.nptype = NML_TEXT;
 	      nml->line.namitf = i;
 	      for ( j = nml->line.namitf+1; j < MAX_LINE_LEN; j++ )
-		if (nml->line.linelc[j] == nml->line.linelc[nml->line.namitf])
+		if ( linelc[j] == linelc[nml->line.namitf])
 		  {
  		    nml->line.namitl = j;
 		    return;
@@ -285,21 +276,18 @@ static void getnite(FILE *nmlfp, namelist_t *nml)
 	      nml->line.namitl = MAX_LINE_LEN + 1;
 	      return;
 	    }
-          else if ( (nml->line.linelc[i] >= '0'  &&
-		     nml->line.linelc[i] <= '9') ||
-		     nml->line.linelc[i] == '+'  ||
-		     nml->line.linelc[i] == '-'  ||
-		     nml->line.linelc[i] == '.' )
+          else if ( (ch >= '0'  && ch <= '9') ||
+		     ch == '+'  || ch == '-'  || ch == '.' )
 	    {
 	      nml->line.nptype = NML_NUMBER;
 	      nml->line.namitf = i;
 	      for ( j = i+1; j < MAX_LINE_LEN; j++)
 		{
-		  if ( nml->line.linelc[j] >= '0' && nml->line.linelc[j] <= '9' ) continue;
-	          else if ( nml->line.linelc[j] == '+' ) continue;
-		  else if ( nml->line.linelc[j] == '-' ) continue;
-         	  else if ( nml->line.linelc[j] == '.' ) continue;
-		  else if ( nml->line.linelc[j] == 'e' ) continue;
+		  if ( linelc[j] >= '0' && linelc[j] <= '9' ) continue;
+	          else if ( linelc[j] == '+' ) continue;
+		  else if ( linelc[j] == '-' ) continue;
+         	  else if ( linelc[j] == '.' ) continue;
+		  else if ( linelc[j] == 'e' ) continue;
                   else
 		    {
 		      nml->line.namitl = j - 1;
@@ -326,8 +314,8 @@ static void getnite(FILE *nmlfp, namelist_t *nml)
   nml->line.nptype = NML_NIX;
 }
 
-
-static void rdnlsgl(namelist_t *nml, void *var, int ntyp, int nlen, int *nocc)
+static
+void rdnlsgl(namelist_t *nml, void *var, int ntyp, int nlen, int *nocc)
 {
   if ( nml->line.nptype == NML_NUMBER )
     {
@@ -346,6 +334,19 @@ static void rdnlsgl(namelist_t *nml, void *var, int ntyp, int nlen, int *nocc)
 	  ((double *)var)[*nocc] = atof(&nml->line.lineac[nml->line.namitf]);
           *nocc += 1;
 	}
+      else if ( ntyp == NML_WORD )
+	{
+	  int i, len;
+
+	  if ( *nocc < nlen )
+	    {
+	      len = nml->line.namitl - nml->line.namitf + 1;
+	      ((char **)var)[*nocc] = (char*) calloc((size_t)len+1, sizeof(char));
+	      for ( i = 0; i < len; i++ )
+		((char **)var)[*nocc][i] = nml->line.lineac[nml->line.namitf+i];
+	      *nocc += 1;
+	    }
+	}
       else
 	{
           nml->line.nptype = func_2;
@@ -383,7 +384,7 @@ static void rdnlsgl(namelist_t *nml, void *var, int ntyp, int nlen, int *nocc)
       if ( *nocc < nlen )
 	{
 	  len = nml->line.namitl - nml->line.namitf + 1;
-	  ((char **)var)[*nocc] = calloc((size_t)len+1, sizeof(char));
+	  ((char **)var)[*nocc] = (char*) calloc((size_t)len+1, sizeof(char));
 	  for ( i = 0; i < len; i++ )
 	    ((char **)var)[*nocc][i] = nml->line.lineac[nml->line.namitf+i];
 	  *nocc += 1;
@@ -533,12 +534,6 @@ void namelistRead(FILE *nmlfp, namelist_t *nml)
 	  printf(" * valid parameters and values specified so far are\n");
 
 	  nml_print(nml, PRINT_ALL);
-
-          if ( ! pgmstat.intract )
-	    {
-	      fprintf(stderr, "Namelist error!\n");
-	      return;
-	    }
         }
       else
 	{
@@ -570,8 +565,6 @@ void namelistRead(FILE *nmlfp, namelist_t *nml)
 	  printf(" * valid parameters and values specified so far are\n");
 
 	  nml_print(nml, PRINT_ALL);
-
-	  if ( ! pgmstat.intract ) fprintf(stderr, "Namelist error!\n");
         }
     }
 
diff --git a/src/operator_help.h b/src/operator_help.h
index e41b944..5720e79 100644
--- a/src/operator_help.h
+++ b/src/operator_help.h
@@ -82,6 +82,7 @@ static char *DiffHelp[] = {
     "           For each pair of fields the operator prints one line with the following information:",
     "           - Date and Time",
     "           - Level, Gridsize and number of Missing values",
+    "           - Number of different values",
     "           - Occurrence of coefficient pairs with different signs (S)",
     "           - Occurrence of zero values (Z)",
     "           - Maxima of absolute difference of coefficient pairs",
@@ -321,8 +322,8 @@ static char *SplitHelp[] = {
     "",
     "ENVIRONMENT",
     "    CDO_FILE_SUFFIX",
-    "        This environment variable can be used to set the default file suffix. This suffix will be",
-    "        added to the output file names instead of the filename extension derived from the file format. ",
+    "        Set the default file suffix. This suffix will be added to the output file ",
+    "        names instead of the filename extension derived from the file format. ",
     "        Set this variable to NULL to disable the adding of a file suffix.",
     NULL
 };
@@ -363,8 +364,8 @@ static char *SplittimeHelp[] = {
     "",
     "ENVIRONMENT",
     "    CDO_FILE_SUFFIX",
-    "        This environment variable can be used to set the default file suffix. This suffix will be",
-    "        added to the output file names instead of the filename extension derived from the file format. ",
+    "        Set the default file suffix. This suffix will be added to the output file ",
+    "        names instead of the filename extension derived from the file format. ",
     "        Set this variable to NULL to disable the adding of a file suffix.",
     NULL
 };
@@ -389,8 +390,8 @@ static char *SplitselHelp[] = {
     "",
     "ENVIRONMENT",
     "    CDO_FILE_SUFFIX",
-    "        This environment variable can be used to set the default file suffix. This suffix will be",
-    "        added to the output file names instead of the filename extension derived from the file format. ",
+    "        Set the default file suffix. This suffix will be added to the output file ",
+    "        names instead of the filename extension derived from the file format. ",
     "        Set this variable to NULL to disable the adding of a file suffix.",
     NULL
 };
@@ -416,19 +417,19 @@ static char *SelectHelp[] = {
     "            Deletes all fields with parameters in a user given list.",
     "",
     "PARAMETER",
-    "    name              STRING  Comma separated list of variable names",
-    "    param             STRING  Comma separated list of parameter identifiers",
-    "    code              INTEGER Comma separated list of code numbers",
-    "    ltype             INTEGER Comma separated list of GRIB level types",
-    "    levidx            INTEGER Comma separated list of index of levels",
-    "    level             FLOAT   Comma separated list of vertical levels",
-    "    minute            INTEGER Comma separated list of minutes",
-    "    hour              INTEGER Comma separated list of hours",
-    "    day               INTEGER Comma separated list of days",
-    "    month             INTEGER Comma separated list of months",
-    "    year              INTEGER Comma separated list of years",
-    "    timestep          INTEGER Comma separated list of timesteps",
-    "    timestep_of_year  INTEGER Comma separated list of timesteps of year",
+    "    name              STRING  Comma separated list of variable names.",
+    "    param             STRING  Comma separated list of parameter identifiers.",
+    "    code              INTEGER Comma separated list of code numbers.",
+    "    ltype             INTEGER Comma separated list of GRIB level types.",
+    "    levidx            INTEGER Comma separated list of index of levels.",
+    "    level             FLOAT   Comma separated list of vertical levels.",
+    "    minute            INTEGER Comma separated list of minutes.",
+    "    hour              INTEGER Comma separated list of hours.",
+    "    day               INTEGER Comma separated list of days.",
+    "    month             INTEGER Comma separated list of months.",
+    "    year              INTEGER Comma separated list of years.",
+    "    timestep          INTEGER Comma separated list of timesteps. Negative values selects timesteps from the end (netCDF only).",
+    "    timestep_of_year  INTEGER Comma separated list of timesteps of year.",
     NULL
 };
 
@@ -538,17 +539,17 @@ static char *SeltimeHelp[] = {
     "                 Selects a month and optional an arbitrary number of timesteps before and after this month.",
     "",
     "PARAMETER",
-    "    timesteps  INTEGER  Comma separated list of timesteps",
-    "    times      STRING   Comma separated list of times (format hh:mm:ss)",
-    "    hours      INTEGER  Comma separated list of hours",
-    "    days       INTEGER  Comma separated list of days",
-    "    months     INTEGER  Comma separated list of months",
-    "    years      INTEGER  Comma separated list of years",
-    "    seasons    STRING   Comma separated list of seasons (DJF, MAM, JJA, SON)",
-    "    date1      STRING   Start date (format YYYY-MM-DDThh:mm:ss)",
-    "    date2      STRING   End date (format YYYY-MM-DDThh:mm:ss) [default: date1]",
-    "    nts1       INTEGER  Number of timesteps before the selected month [default: 0]",
-    "    nts2       INTEGER  Number of timesteps after the selected month [default: nts1]",
+    "    timesteps  INTEGER  Comma separated list of timesteps. Negative values selects timesteps from the end (netCDF only).",
+    "    times      STRING   Comma separated list of times (format hh:mm:ss).",
+    "    hours      INTEGER  Comma separated list of hours.",
+    "    days       INTEGER  Comma separated list of days.",
+    "    months     INTEGER  Comma separated list of months.",
+    "    years      INTEGER  Comma separated list of years.",
+    "    seasons    STRING   Comma separated list of seasons (DJF, MAM, JJA, SON).",
+    "    date1      STRING   Start date (format YYYY-MM-DDThh:mm:ss).",
+    "    date2      STRING   End date (format YYYY-MM-DDThh:mm:ss) [default: date1].",
+    "    nts1       INTEGER  Number of timesteps before the selected month [default: 0].",
+    "    nts2       INTEGER  Number of timesteps after the selected month [default: nts1].",
     NULL
 };
 
@@ -745,6 +746,54 @@ static char *CompcHelp[] = {
     NULL
 };
 
+static char *SetpartabHelp[] = {
+    "NAME",
+    "    setpartabp, setpartabn - Set parameter table",
+    "",
+    "SYNOPSIS",
+    "    <operator>,table  ifile ofile",
+    "",
+    "DESCRIPTION",
+    "    This module transforms data and metadata of ifile via a parameter table and writes the result to ofile.",
+    "    A parameter table is an ASCII formatted file with a set of parameter entries for each variable. Each new set have to",
+    "    start with \"\\&parameter\" and to end with \"/\".",
+    "    ",
+    "    The following parameter table entries are supported:",
+    "    ",
+    "     Entry    & Type & Description      ",
+    "     name            & WORD        & Name of the variable",
+    "     out_name        & WORD        & New name of the variable",
+    "     param           & WORD        & Parameter identifier (GRIB1: code[.tabnum];  GRIB2: num[.cat[.dis]])",
+    "     out_param       & WORD        & New parameter identifier",
+    "     type            & WORD        & Data type (real or double)",
+    "     standard_name   & WORD        & As defined in the CF standard name table",
+    "     long_name       & STRING      & Describing the variable",
+    "     units           & STRING      & Specifying the units for the variable",
+    "     comment         & STRING      & Information concerning the variable",
+    "     cell_methods    & STRING      & Information concerning calculation of means or climatologies",
+    "     cell_measures   & STRING      & Indicates the names of the variables containing cell areas and volumes",
+    "     missing_value   & FLOAT       & Specifying how missing data will be identified",
+    "     valid_min       & FLOAT       & Minimum valid value",
+    "     valid_max       & FLOAT       & Maximum valid value",
+    "     ok_min_mean_abs & FLOAT       & Minimum absolute mean",
+    "     ok_max_mean_abs & FLOAT       & Maximum absolute mean",
+    "     factor          & FLOAT       & Scale factor",
+    "     delete          & INTEGER     & Set to 1 to delete variable",
+    "    ",
+    "    The search key for the variable depends on the operator. Use setpartabn to search variables by the name.",
+    "    This is typically used for netCDF datasets. The operator setpartabp searches variables by the parameter ID.",
+    "",
+    "OPERATORS",
+    "    setpartabp  Set parameter table",
+    "                Search variables by the parameter identifier.",
+    "    setpartabn  Set parameter table",
+    "                Search variables by name.",
+    "",
+    "PARAMETER",
+    "    table  STRING   Parameter table file or name",
+    NULL
+};
+
 static char *SetHelp[] = {
     "NAME",
     "    setpartab, setcode, setparam, setname, setunit, setlevel, setltype - ",
@@ -760,9 +809,8 @@ static char *SetHelp[] = {
     "    setltype,ltype  ifile ofile",
     "",
     "DESCRIPTION",
-    "    This module sets some field information. Depending on the chosen",
-    "    operator the parameter table, code number, parameter identifier, variable name or",
-    "    level is set.",
+    "    This module sets some field information. Depending on the chosen operator the ",
+    "    parameter table, code number, parameter identifier, variable name or level is set.",
     "",
     "OPERATORS",
     "    setpartab  Set parameter table",
@@ -783,7 +831,7 @@ static char *SetHelp[] = {
     "PARAMETER",
     "    table  STRING   Parameter table file or name",
     "    code   INTEGER  Code number",
-    "    param  STRING   Parameter identifier (format: code[.tabnum] or num[.cat[.dis]])",
+    "    param  STRING   Parameter identifier (GRIB1: code[.tabnum]; GRIB2: num[.cat[.dis]])",
     "    name   STRING   Variable name",
     "    level  FLOAT    New level",
     "    ltype  INTEGER  GRIB level type",
@@ -915,7 +963,7 @@ static char *SetgridHelp[] = {
     "                 Sets the grid type of all input fields. The following grid types are available:",
     "                 curvilinear "    "                 Converts regular grid to curvilinear grid",
     "                 unstructured"    "                 Converts grid type to unstructured grid",
-    "                 dereference "    "                 Dereference grid type REFERENCE",
+    "                 dereference "    "                 Dereference a reference to a grid",
     "                 regular     "    "                 Converts reduced Gaussian grid to regular Gaussian grid",
     "    setgridarea  Set grid cell area",
     "                 Sets the grid cell area. The parameter gridarea is the path to a data file,",
@@ -2973,7 +3021,7 @@ static char *FldcorHelp[] = {
     "    o(t,1) = Cor{(i_1(t,x), i_2(t,x)), x_1 < x <= x_n}",
     "    where w(x) are the area weights obtained by the input streams.",
     "    For every timestep t only those field elements x belong to the sample,",
-    "    which have i_1(t,x) \\neq missval and i_2(t,x) \\neq missval.",
+    "    which have i_1(t,x) != missval and i_2(t,x) != missval.",
     NULL
 };
 
@@ -2994,7 +3042,7 @@ static char *TimcorHelp[] = {
     "    ",
     "    o(1,x) = Cor{(i_1(t,x), i_2(t,x)), t_1 < t <= t_n}",
     "    For every gridpoint x only those timesteps t belong to the sample,",
-    "    which have i_1(t,x) \\neq missval and i_2(t,x) \\neq missval.",
+    "    which have i_1(t,x) != missval and i_2(t,x) != missval.",
     NULL
 };
 
@@ -3015,7 +3063,7 @@ static char *FldcovarHelp[] = {
     "    o(t,1) = Covar{(i_1(t,x), i_2(t,x)), x_1 < x <= x_n}",
     "    where w(x) are the area weights obtained by the input streams.",
     "    For every timestep t only those field elements x belong to the sample,",
-    "    which have i_1(t,x) \\neq missval and i_2(t,x) \\neq missval.",
+    "    which have i_1(t,x) != missval and i_2(t,x) != missval.",
     NULL
 };
 
@@ -3035,7 +3083,7 @@ static char *TimcovarHelp[] = {
     "    ",
     "    o(1,x) = Covar{(i_1(t,x), i_2(t,x)), t_1 < t <= t_n}",
     "    For every gridpoint x only those timesteps t belong to the sample,",
-    "    which have i_1(t,x) \\neq missval and i_2(t,x) \\neq missval.",
+    "    which have i_1(t,x) != missval and i_2(t,x) != missval.",
     NULL
 };
 
@@ -3185,8 +3233,8 @@ static char *EofcoeffHelp[] = {
     "",
     "ENVIRONMENT",
     "    CDO_FILE_SUFFIX",
-    "        This environment variable can be used to set the default file suffix. This suffix will be",
-    "        added to the output file names instead of the filename extension derived from the file format. ",
+    "        Set the default file suffix. This suffix will be added to the output file ",
+    "        names instead of the filename extension derived from the file format. ",
     "        Set this variable to NULL to disable the adding of a file suffix.",
     NULL
 };
@@ -3204,6 +3252,7 @@ static char *RemapgridHelp[] = {
     "    Each operator uses a different remapping method. The interpolation is based",
     "    on an adapted SCRIP library version. For a detailed description of the remapping ",
     "    methods see SCRIP.",
+    "    The search algorithm for the conservative remapping requires that no grid cell occurs more than once. ",
     "",
     "OPERATORS",
     "    remapbil   Bilinear interpolation",
@@ -3228,12 +3277,14 @@ static char *RemapgridHelp[] = {
     "    grid  STRING  Target grid description file or name",
     "",
     "ENVIRONMENT",
-    "    REMAP_EXTRAPOLATE",
+    "    REMAP_EXTRAPOLATE      ",
     "        This variable is used to switch the extrapolation feature 'on' or 'off'.",
     "        By default the extrapolation is enabled for remapdis, remapnn and for circular grids.",
-    "    REMAP_AREA_MIN   ",
+    "    REMAP_AREA_MIN         ",
     "        This variable is used to set the minimum destination area fraction. The default",
     "        of this variable is 0.0.",
+    "    CDO_REMAP_SEARCH_RADIUS",
+    "        Remap search radius in degree, default 180 degree.",
     "",
     "NOTE",
     "    For this module the author has converted the original Fortran 90 SCRIP ",
@@ -3433,6 +3484,19 @@ static char *IntvertHelp[] = {
     "",
     "NOTE",
     "    The netCDF CF convention for vertical hybrid coordinates is not supported, yet!",
+    "    The vertical coordinate definition of a netCDF file has to follow the ECHAM convention.",
+    "    This means:",
+    "    - the dimension of the full level coordinate and the corresponding variable is called mlev,",
+    "    - the dimension of the half level coordinate and the corresponding variable is called ilev (ilev must have one element more than mlev)",
+    "    - the hybrid vertical coefficient a is given in units of Pa and called hyai (hyam for level midpoints)",
+    "    - the hybrid vertical coefficient b is given in units of 1 and called hybi (hybm for level midpoints)",
+    "    - the mlev variable has a borders attribute containing the character string 'ilev'",
+    "    ",
+    "    Use the sinfo command to test if your vertical coordinate system is recognized as hybrid system.",
+    "    ",
+    "    In case this operator complains about not finding any data on hybrid model levels you may wish",
+    "    to use the setzaxis command to generate a zaxis description which conforms to the ECHAM convention.",
+    "    See section \"1.4 Z-axis description\" for an example how to define a hybrid Z-axis.",
     NULL
 };
 
@@ -3444,8 +3508,7 @@ static char *IntlevelHelp[] = {
     "    intlevel,levels  ifile ofile",
     "",
     "DESCRIPTION",
-    "    This operator performs a linear vertical interpolation of non hybrid ",
-    "    3D variables.",
+    "    This operator performs a linear vertical interpolation of non hybrid 3D variables.",
     "",
     "PARAMETER",
     "    levels  FLOAT  Target levels",
@@ -3530,8 +3593,8 @@ static char *IntyearHelp[] = {
     "",
     "ENVIRONMENT",
     "    CDO_FILE_SUFFIX",
-    "        This environment variable can be used to set the default file suffix. This suffix will be",
-    "        added to the output file names instead of the filename extension derived from the file format. ",
+    "        Set the default file suffix. This suffix will be added to the output file ",
+    "        names instead of the filename extension derived from the file format. ",
     "        Set this variable to NULL to disable the adding of a file suffix.",
     NULL
 };
@@ -3836,27 +3899,20 @@ static char *FilterHelp[] = {
     "    highpass,fmin  ifile ofile",
     "",
     "DESCRIPTION",
-    "    This module takes the time series for each gridpoint in ifile and fills it with zeros (zero-",
-    "    padding) up to the next time-step-number that is a power of 2. Then it (fast fourier) transforms ",
-    "    the time series with 2^n elements into the frequency domain.",
-    "    According to the particular operator and its parameters certain frequencies are filtered ",
-    "    (set to zero) in the frequency domain and the spectrum is (inverse fast fourier) transformed ",
-    "    back into the time domain. This time series is cut to the original number of timesteps from",
-    "    ifile and written to ofile.",
-    "    To determine the frequency the time-axis of ifile is used. (Data should have a constant time ",
-    "    increment since this assumption applies for transformation. However, the time increment ",
-    "    has to be different from zero.)",
-    "    All frequencies given as parameter are interpreted per year. This is done by the ",
-    "    assumption of a 365-day calendar. Consequently if you want to perform multiyear-filtering ",
-    "    accurately you have to delete the 29th of February. If your ifile has a 360 year calendar",
-    "    the frequency parameters fmin respectively fmax should be multiplied with a factor of",
-    "    360/365 in order to obtain accurate results.  ",
-    "    For the set up of a frequency filter the frequency parameters have to be adjusted to a ",
-    "    frequency in the data. Here fmin is rounded down and fmax is always rounded up. ",
-    "    Consequently it is possible to use bandpass with fmin=fmax without getting a zero-field 	",
-    "    for ofile. ",
+    "    This module takes the time series for each gridpoint in ifile and (fast fourier) transforms it ",
+    "    into the frequency domain. According to the particular operator and its parameters certain frequencies ",
+    "    are filtered (set to zero) in the frequency domain and the spectrum is (inverse fast fourier) transformed ",
+    "    back into the time domain.",
+    "    To determine the frequency the time-axis of ifile is used. (Data should have a constant time increment ",
+    "    since this assumption applies for transformation. However, the time increment has to be different from zero.)",
+    "    All frequencies given as parameter are interpreted per year. This is done by the assumption of a 365-day calendar. ",
+    "    Consequently if you want to perform multiyear-filtering accurately you have to delete the 29th of February. ",
+    "    If your ifile has a 360 year calendar the frequency parameters fmin respectively fmax should be ",
+    "    multiplied with a factor of 360/365 in order to obtain accurate results.  ",
+    "    For the set up of a frequency filter the frequency parameters have to be adjusted to a frequency in the data. ",
+    "    Here fmin is rounded down and fmax is always rounded up. Consequently it is possible to use bandpass with ",
+    "    fmin=fmax without getting a zero-field for ofile. ",
     "    Hints for efficient usage: ",
-    "    - to avoid effects of zero-padding cut or extend your time series down/up to the nearest power of two",
     "    - to get reliable results the time-series has to be detrended (cdo detrend)",
     "    - the lowest frequency greater zero that can be contained in ifile is 1/(N*dT), ",
     "    - the greatest frequency is 1/(2dT) (Nyquist frequency),",
@@ -3865,8 +3921,7 @@ static char *FilterHelp[] = {
     "OPERATORS",
     "    bandpass  Bandpass filtering",
     "              Bandpass filtering (pass for frequencies between fmin and fmax).",
-    "              Suppresses all variability outside the frequency range specified",
-    "              by [fmin,fmax].",
+    "              Suppresses all variability outside the frequency range specified by [fmin,fmax].",
     "    lowpass   Lowpass filtering",
     "              Lowpass filtering (pass for frequencies lower than fmax).",
     "              Suppresses all variability with frequencies greater than fmax. ",
@@ -4054,6 +4109,35 @@ static char *MastrfuHelp[] = {
     NULL
 };
 
+static char *DeriveparHelp[] = {
+    "NAME",
+    "    sealevelpressure - Sea level pressure",
+    "",
+    "SYNOPSIS",
+    "    sealevelpressure  ifile ofile",
+    "",
+    "DESCRIPTION",
+    "    This operator computes the sea level pressure (air_pressure_at_sea_level). Required input fields",
+    "    are surface_air_pressure, surface_geopotential and air_temperature on hybrid sigma pressure levels.",
+    "",
+    "NOTE",
+    "    The netCDF CF convention for vertical hybrid coordinates is not supported, yet!",
+    "    The vertical coordinate definition of a netCDF file has to follow the ECHAM convention.",
+    "    This means:",
+    "    - the dimension of the full level coordinate and the corresponding variable is called mlev,",
+    "    - the dimension of the half level coordinate and the corresponding variable is called ilev (ilev must have one element more than mlev)",
+    "    - the hybrid vertical coefficient a is given in units of Pa and called hyai (hyam for level midpoints)",
+    "    - the hybrid vertical coefficient b is given in units of 1 and called hybi (hybm for level midpoints)",
+    "    - the mlev variable has a borders attribute containing the character string 'ilev'",
+    "    ",
+    "    Use the sinfo command to test if your vertical coordinate system is recognized as hybrid system.",
+    "    ",
+    "    In case this operator complains about not finding any data on hybrid model levels you may wish",
+    "    to use the setzaxis command to generate a zaxis description which conforms to the ECHAM convention.",
+    "    See section \"1.4 Z-axis description\" for an example how to define a hybrid Z-axis.",
+    NULL
+};
+
 static char *AdisitHelp[] = {
     "NAME",
     "    adisit, adipot - Potential temperature to in-situ temperature and vice versa",
diff --git a/src/par_io.c b/src/par_io.c
index 5bc3a96..ad1bcf9 100644
--- a/src/par_io.c
+++ b/src/par_io.c
@@ -9,6 +9,7 @@
 #include <string.h> /* memcpy */
 
 #include "cdo.h"
+#include "cdo_int.h"
 #include "par_io.h"
 #include "pstream.h"
 
diff --git a/src/percentiles.c b/src/percentiles.c
index 71f755b..9e8ab2a 100644
--- a/src/percentiles.c
+++ b/src/percentiles.c
@@ -77,7 +77,7 @@ static void histBin(HISTOGRAM *hist)
   
   assert( hist->nsamp == DBL_CAPACITY(hist->nbins) );
 
-  values = malloc(hist->nsamp * sizeof(double));
+  values = (double*) malloc(hist->nsamp * sizeof(double));
 
   for ( i = 0; i < hist->nsamp; i++ )
     values[i] = DBL_PTR(hist->ptr)[i];
@@ -164,14 +164,14 @@ HISTOGRAM_SET *hsetCreate(int nvars)
   
   assert( nvars > 0);
   
-  hset = malloc(sizeof(HISTOGRAM_SET));
+  hset = (HISTOGRAM_SET*) malloc(sizeof(HISTOGRAM_SET));
   if ( hset == NULL )
     cdoAbort("Not enough memory (%s)", __func__);
     
   hset->nvars   = nvars;
-  hset->nlevels = malloc(nvars * sizeof(int));
-  hset->grids   = malloc(nvars * sizeof(int));
-  hset->histograms = malloc(nvars * sizeof(HISTOGRAM **));
+  hset->nlevels = (int*) malloc(nvars * sizeof(int));
+  hset->grids   = (int*) malloc(nvars * sizeof(int));
+  hset->histograms = (HISTOGRAM ***) malloc(nvars * sizeof(HISTOGRAM **));
   if ( hset->histograms == NULL )
     cdoAbort("Not enough memory (%s)", __func__);
   
@@ -211,13 +211,13 @@ void hsetCreateVarLevels(HISTOGRAM_SET *hset, int varID, int nlevels, int grid)
   hset->nlevels[varID] = nlevels;
   hset->grids[varID]   = grid;
 
-  hset->histograms[varID] = malloc(nlevels * sizeof(HISTOGRAM *));
+  hset->histograms[varID] = (HISTOGRAM **) malloc(nlevels * sizeof(HISTOGRAM *));
   if ( hset->histograms[varID] == NULL )
     cdoAbort("Not enough memory (%s)", __func__);
 
   for ( levelID = 0; levelID < nlevels; levelID++ )
     {
-      hists = hset->histograms[varID][levelID] = malloc(nhists * sizeof(HISTOGRAM));
+      hists = hset->histograms[varID][levelID] = (HISTOGRAM*) malloc(nhists * sizeof(HISTOGRAM));
       if ( hists == NULL )
         cdoAbort("Not enough memory (%s)", __func__);
         
@@ -229,7 +229,7 @@ void hsetCreateVarLevels(HISTOGRAM_SET *hset, int varID, int nlevels, int grid)
           hists[histID].nbins = nbins;
           hists[histID].nsamp = 0;
 
-          hists[histID].ptr = malloc(nbins * sizeof(int));
+          hists[histID].ptr = (int*) malloc(nbins * sizeof(int));
           if ( hists[histID].ptr == NULL )
             cdoAbort("Not enough memory (%s)", __func__);
         }
diff --git a/src/pipe.c b/src/pipe.c
index 86e7fea..8c26fcf 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -20,6 +20,10 @@
 #  include "config.h"
 #endif
 
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 /* struct timespec */
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <time.h> // time()
@@ -87,28 +91,28 @@ void pipe_init(pipe_t *pipe)
   pipe->usedata = TRUE;
   pipe->pstreamptr_in = 0;
 
-  pipe->mutex = malloc(sizeof(pthread_mutex_t));
+  pipe->mutex = (pthread_mutex_t*) malloc(sizeof(pthread_mutex_t));
   pthread_mutex_init(pipe->mutex, &m_attr);
 
-  pipe->tsDef = malloc(sizeof(pthread_cond_t));
+  pipe->tsDef = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->tsDef, &c_attr);
-  pipe->tsInq = malloc(sizeof(pthread_cond_t));
+  pipe->tsInq = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->tsInq, &c_attr);
 
-  pipe->recDef = malloc(sizeof(pthread_cond_t));
+  pipe->recDef = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->recDef, &c_attr);
-  pipe->recInq = malloc(sizeof(pthread_cond_t));
+  pipe->recInq = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->recInq, &c_attr);
   
-  pipe->vlistDef = malloc(sizeof(pthread_cond_t));
+  pipe->vlistDef = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->vlistDef, &c_attr);
-  pipe->isclosed = malloc(sizeof(pthread_cond_t));
+  pipe->isclosed = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->isclosed, &c_attr);
 
-  pipe->writeCond = malloc(sizeof(pthread_cond_t));
+  pipe->writeCond = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->writeCond, &c_attr);
 
-  pipe->readCond = malloc(sizeof(pthread_cond_t));
+  pipe->readCond = (pthread_cond_t*) malloc(sizeof(pthread_cond_t));
   pthread_cond_init(pipe->readCond, &c_attr);
 
   pthread_mutexattr_destroy(&m_attr);
@@ -120,7 +124,7 @@ pipe_t *pipeNew()
 {
   pipe_t *pipe;
 
-  pipe = malloc(sizeof(pipe_t));
+  pipe = (pipe_t*) malloc(sizeof(pipe_t));
 
   pipe_init(pipe);
 
diff --git a/src/printinfo.h b/src/printinfo.h
index 23b5672..546b7fe 100644
--- a/src/printinfo.h
+++ b/src/printinfo.h
@@ -133,8 +133,7 @@ static
 void printGridInfo(int vlistID)
 {
   int ngrids, index;
-  int gridID, gridtype, trunc, gridsize, xsize, ysize;
-  int nbyte0;
+  int gridID, gridtype, trunc, gridsize, xsize, ysize, xysize;
   char xname[CDI_MAX_NAME], yname[CDI_MAX_NAME], xunits[CDI_MAX_NAME], yunits[CDI_MAX_NAME];
   char uuidOfHGrid[17];
 
@@ -147,12 +146,13 @@ void printGridInfo(int vlistID)
       gridsize = gridInqSize(gridID);
       xsize    = gridInqXsize(gridID);
       ysize    = gridInqYsize(gridID);
+      xysize   = xsize*ysize;
       gridInqXname(gridID, xname);
       gridInqYname(gridID, yname);
       gridInqXunits(gridID, xunits);
       gridInqYunits(gridID, yunits);
 
-      nbyte0   = fprintf(stdout, "  %4d : %-12s > ", index+1, gridNamePtr(gridtype));
+      fprintf(stdout, "  %4d : %-24s", index+1, gridNamePtr(gridtype));
 
       if ( gridtype == GRID_LONLAT   ||
 	   gridtype == GRID_LCC2 ||
@@ -171,13 +171,14 @@ void printGridInfo(int vlistID)
 	  ylast  = gridInqYval(gridID, ysize-1);
 	  yinc   = gridInqYinc(gridID);
 
+          fprintf(stdout, " : points=%d", gridsize);
 	  if ( gridtype == GRID_GAUSSIAN_REDUCED )
-	    fprintf(stdout, "size : dim = %d  nlat = %d", gridsize, ysize);
-	  else
-	    fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d", gridsize, xsize, ysize);
+	    fprintf(stdout, "  nlat=%d", ysize);
+	  else if ( xysize )
+	    fprintf(stdout, " (%dx%d)", xsize, ysize);
 
 	  if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED )
-	    fprintf(stdout, "  np = %d", gridInqNP(gridID));
+	    fprintf(stdout, "  np=%d", gridInqNP(gridID));
 
 	  fprintf(stdout, "\n");
 
@@ -186,36 +187,31 @@ void printGridInfo(int vlistID)
 
 	  if ( xsize > 0 && lxcoord )
 	    {
-	      if ( gridtype == GRID_GAUSSIAN_REDUCED )
-		{
-		  fprintf(stdout, "size : dim = %d  nlat = %d\n", gridsize, ysize);
-		  fprintf(stdout, "%*s", nbyte0, "");
-		  fprintf(stdout, "longitude : reduced\n");
-		}
-	      else
-		{
-		  xfirst = gridInqXval(gridID, 0);
-		  xlast  = gridInqXval(gridID, xsize-1);
-		  xinc   = gridInqXinc(gridID);
-		  fprintf(stdout, "%*s", nbyte0, "");
-		  fprintf(stdout, "%-9s : first = %.9g", xname, xfirst);
-		  if ( xsize > 1 ) fprintf(stdout, "  last = %.9g", xlast);
-		  if ( IS_NOT_EQUAL(xinc, 0) )
-		    fprintf(stdout, "  inc = %.9g", xinc);
-		  fprintf(stdout, "  %s", xunits);
-		  if ( gridIsCircular(gridID) ) fprintf(stdout, "  circular");
-		  fprintf(stdout, "\n");
-		}
+              xfirst = gridInqXval(gridID, 0);
+              xlast  = gridInqXval(gridID, xsize-1);
+              xinc   = gridInqXinc(gridID);
+              fprintf(stdout, "%33s : %g", xname, xfirst);
+              if ( xsize > 1 )
+                {
+                  fprintf(stdout, " to %g", xlast);
+                  if ( IS_NOT_EQUAL(xinc, 0) )
+                    fprintf(stdout, " by %g", xinc);
+                }
+              fprintf(stdout, " %s", xunits);
+              if ( gridIsCircular(gridID) ) fprintf(stdout, "  circular");
+              fprintf(stdout, "\n");
 	    }
 
 	  if ( ysize > 0 && lycoord )
 	    {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "%-9s : first = %.9g", yname, yfirst);
-	      if ( ysize > 1 ) fprintf(stdout, "  last = %.9g", ylast);
-	      if ( IS_NOT_EQUAL(yinc, 0) && gridtype != GRID_GAUSSIAN && gridtype != GRID_GAUSSIAN_REDUCED )
-		fprintf(stdout, "  inc = %.9g", yinc);
-	      fprintf(stdout, "  %s", yunits);
+	      fprintf(stdout, "%33s : %g", yname, yfirst);
+	      if ( ysize > 1 )
+                {
+                  fprintf(stdout, " to %g", ylast);
+                  if ( IS_NOT_EQUAL(yinc, 0) && gridtype != GRID_GAUSSIAN && gridtype != GRID_GAUSSIAN_REDUCED )
+                    fprintf(stdout, " by %g", yinc);
+                }
+              fprintf(stdout, " %s", yunits);
 	      fprintf(stdout, "\n");
 	    }
 
@@ -225,18 +221,15 @@ void printGridInfo(int vlistID)
 	      lonpole = gridInqXpole(gridID);
 	      latpole = gridInqYpole(gridID);
 	      angle   = gridInqAngle(gridID);
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "northpole : lon = %.9g  lat = %.9g", lonpole, latpole);
-	      if ( angle > 0 ) fprintf(stdout, "  angle = %.9g", angle);
+	      fprintf(stdout, "%33s : lon=%g  lat=%g", "northpole", lonpole, latpole);
+	      if ( angle > 0 ) fprintf(stdout, "  angle=%g", angle);
 	      fprintf(stdout, "\n");
 	    }
 
 	  if ( gridInqXbounds(gridID, NULL) || gridInqYbounds(gridID, NULL) )
 	    {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "available :");
-	      if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds");
-	      if ( gridInqYbounds(gridID, NULL) ) fprintf(stdout, " ybounds");
+	      fprintf(stdout, "%33s :", "available");
+	      if ( gridInqXbounds(gridID, NULL) && gridInqYbounds(gridID, NULL) ) fprintf(stdout, " cellbounds");
 	      if ( gridHasArea(gridID) )          fprintf(stdout, " area");
 	      if ( gridInqMask(gridID, NULL) )    fprintf(stdout, " mask");
 	      fprintf(stdout, "\n");
@@ -246,45 +239,43 @@ void printGridInfo(int vlistID)
 	    {
 	      double a, lon_0, lat_0;
 	      gridInqLaea(gridID, &a, &lon_0, &lat_0);
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "projpar   : a = %g  lon_0 = %g  lat_0 = %g\n", a, lon_0, lat_0);
+	      fprintf(stdout, "%33s : a=%g  lon_0=%g  lat_0=%g\n", "projpar", a, lon_0, lat_0);
 	    }
 
 	  if ( gridtype == GRID_LCC2 )
 	    {
 	      double a, lon_0, lat_0, lat_1, lat_2;
 	      gridInqLcc2(gridID, &a, &lon_0, &lat_0, &lat_1, &lat_2);
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "projpar   : a = %7.0f  lon_0 = %g  lat_0 = %g  lat_1 = %g  lat_2 = %g\n",
-		      a, lon_0, lat_0, lat_1, lat_2);
+	      fprintf(stdout, "%33s : a=%7.0f  lon_0=%g  lat_0=%g  lat_1=%g  lat_2=%g\n",
+                      "projpar", a, lon_0, lat_0, lat_1, lat_2);
 	    }
 	}
       else if ( gridtype == GRID_SPECTRAL )
 	{
-	  fprintf(stdout, "size      : dim = %d  nsp = %d  truncation = %d\n", gridsize, gridsize/2, trunc);
-	  fprintf(stdout, "%*s", nbyte0, "");
-	  fprintf(stdout, "            complexPacking = %d\n", gridInqComplexPacking(gridID));
+	  fprintf(stdout, " : points=%d  nsp=%d  truncation=%d", gridsize, gridsize/2, trunc);
+          if ( gridInqComplexPacking(gridID) ) fprintf(stdout, "  complexPacking");
+          fprintf(stdout, "\n");
 	}
       else if ( gridtype == GRID_FOURIER )
 	{
-	  fprintf(stdout, "size      : dim = %d  nfc = %d  truncation = %d\n", gridsize, gridsize/2, trunc);
+	  fprintf(stdout, " : points=%d  nfc=%d  truncation=%d\n", gridsize, gridsize/2, trunc);
 	}
       else if ( gridtype == GRID_GME )
 	{
 	  int ni, nd;
 	  ni = gridInqGMEni(gridID);
 	  nd = gridInqGMEnd(gridID);
-	  fprintf(stdout, "size      : dim = %d  nd = %d  ni = %d\n", gridsize, nd, ni);
+	  fprintf(stdout, " : points=%d  nd=%d  ni=%d\n", gridsize, nd, ni);
 	}
       else if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED )
 	{
 	  if ( gridtype == GRID_CURVILINEAR )
-	    fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d", gridsize, xsize, ysize);
+	    fprintf(stdout, " : points=%d (%dx%d)", gridsize, xsize, ysize);
 	  else
-	    fprintf(stdout, "size      : dim = %d", gridsize);
+	    fprintf(stdout, " : points=%d", gridsize);
 
           if ( gridtype == GRID_UNSTRUCTURED && gridInqNvertex(gridID) > 0 )
-	    fprintf(stdout, "  nvertex = %d", gridInqNvertex(gridID));
+	    fprintf(stdout, "  nvertex=%d", gridInqNvertex(gridID));
 
           fprintf(stdout, "\n");
 
@@ -295,16 +286,14 @@ void printGridInfo(int vlistID)
 
               if ( number > 0 )
                 {
-                  fprintf(stdout, "%*s", nbyte0, "");
-                  fprintf(stdout, "grid      : number = %d  position = %d\n", number, position);
+                  fprintf(stdout, "%33s : number=%d  position=%d\n", "grid", number, position);
                 }
 
               if ( gridInqReference(gridID, NULL) )
                 {
                   char reference_link[8192];
                   gridInqReference(gridID, reference_link);
-                  fprintf(stdout, "%*s", nbyte0, "");
-                  fprintf(stdout, "uri       : %s\n", reference_link);
+                  fprintf(stdout, "%33s : %s\n", "uri", reference_link);
                 }
             }
 
@@ -313,8 +302,8 @@ void printGridInfo(int vlistID)
 	      int i;
 	      double *xvals, *yvals;
 	      double xfirst, xlast, yfirst, ylast;
-	      xvals = malloc(gridsize*sizeof(double));
-	      yvals = malloc(gridsize*sizeof(double));
+	      xvals = (double*) malloc(gridsize*sizeof(double));
+	      yvals = (double*) malloc(gridsize*sizeof(double));
 
 	      gridInqXvals(gridID, xvals);
 	      gridInqYvals(gridID, yvals);
@@ -326,17 +315,15 @@ void printGridInfo(int vlistID)
 	      for ( i = 1; i < gridsize; i++ )
 		{
 		  if ( xvals[i] < xfirst ) xfirst = xvals[i];
-		  if ( xvals[i] > xlast )  xlast  = xvals[i];
+		  if ( xvals[i] > xlast  ) xlast  = xvals[i];
 		  if ( yvals[i] < yfirst ) yfirst = yvals[i];
-		  if ( yvals[i] > ylast )  ylast  = yvals[i];
+		  if ( yvals[i] > ylast  ) ylast  = yvals[i];
 		}
 
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "%-9s : min = %.9g  max = %.9g  %s", xname, xfirst, xlast, xunits);
+	      fprintf(stdout, "%33s : %g to %g %s", xname, xfirst, xlast, xunits);
 	      if ( gridIsCircular(gridID) ) fprintf(stdout, "  circular");
 	      fprintf(stdout, "\n");
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "%-9s : min = %.9g  max = %.9g  %s\n", yname, yfirst, ylast, yunits);
+	      fprintf(stdout, "%33s : %g to %g %s\n", yname, yfirst, ylast, yunits);
 
 	      free(xvals);
 	      free(yvals);
@@ -350,37 +337,30 @@ void printGridInfo(int vlistID)
 	  gridInqLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
 		     &projflag, &scanflag);
 
-	  fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d  ", gridsize, xsize, ysize);
+	  fprintf(stdout, " : points=%d (%dx%d)  ", gridsize, xsize, ysize);
 	  if ( (projflag&128) == 0 )
 	    fprintf(stdout, "North Pole\n");
 	  else
 	    fprintf(stdout, "South Pole\n");
-	  fprintf(stdout, "%*s", nbyte0, "");
-	  fprintf(stdout, "            originLon = %g  originLat = %g  lonParY = %g\n",
-		  originLon, originLat, lonParY);
-	  fprintf(stdout, "%*s", nbyte0, "");
-	  fprintf(stdout, "            lat1 = %g  lat2 = %g  xinc = %g m  yinc = %g m\n",
-		  lat1, lat2, xincm, yincm);
+
+	  fprintf(stdout, "%33s : originLon=%g  originLat=%g  lonParY=%g\n", " ", originLon, originLat, lonParY);
+	  fprintf(stdout, "%33s : lat1=%g  lat2=%g  xinc=%g m  yinc=%g m\n", " ", lat1, lat2, xincm, yincm);
 	}
       else /* if ( gridtype == GRID_GENERIC ) */
 	{
 	  if ( ysize == 0 )
-	    fprintf(stdout, "size      : dim = %d\n", gridsize);
+	    fprintf(stdout, " : points=%d\n", gridsize);
 	  else
-            fprintf(stdout, "size      : dim = %d  nx = %d  ny = %d\n", gridsize, xsize, ysize);
+            fprintf(stdout, " : points=%d (%dx%d)\n", gridsize, xsize, ysize);
 	}
 
       if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED || gridtype == GRID_LCC )
 	{
-	  if ( gridInqXvals(gridID, NULL) || gridInqYvals(gridID, NULL) || gridHasArea(gridID) ||
+	  if ( gridHasArea(gridID) ||
 	       gridInqXbounds(gridID, NULL) || gridInqYbounds(gridID, NULL) )
 	    {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "available :");
-	      if ( gridInqXvals(gridID, NULL) )   fprintf(stdout, " xvals");
-	      if ( gridInqYvals(gridID, NULL) )   fprintf(stdout, " yvals");
-	      if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds");
-	      if ( gridInqYbounds(gridID, NULL) ) fprintf(stdout, " ybounds");
+	      fprintf(stdout, "%33s :", "available");
+	      if ( gridInqXbounds(gridID, NULL) && gridInqYbounds(gridID, NULL) ) fprintf(stdout, " cellbounds");
 	      if ( gridHasArea(gridID) )          fprintf(stdout, " area");
 	      if ( gridInqMask(gridID, NULL) )    fprintf(stdout, " mask");
 	      fprintf(stdout, "\n");
@@ -394,12 +374,237 @@ void printGridInfo(int vlistID)
           uuid2str(uuidOfHGrid, uuidOfHGridStr);
           if ( uuidOfHGridStr[0] != 0  && strlen(uuidOfHGridStr) == 36 )
             {
-	      fprintf(stdout, "%*s", nbyte0, "");
-	      fprintf(stdout, "uuid      : %s\n", uuidOfHGridStr);
+	      fprintf(stdout, "%33s : %s\n", "uuid", uuidOfHGridStr);
             }
         }
     }
 }
+
+static
+void printZaxisInfo(int vlistID)
+{
+  int nzaxis, index;
+  int zaxisID, zaxistype, levelsize, levelID;
+  int ltype;
+  double *levels = NULL;
+  char zaxisname[CDI_MAX_NAME], zname[CDI_MAX_NAME], zunits[CDI_MAX_NAME];
+
+  nzaxis = vlistNzaxis(vlistID);
+  for ( index = 0; index < nzaxis; index++)
+    {
+      double zfirst = 0, zlast = 0, zinc = 0;
+      zaxisID   = vlistZaxis(vlistID, index);
+      zaxistype = zaxisInqType(zaxisID);
+      ltype     = zaxisInqLtype(zaxisID);
+      levelsize = zaxisInqSize(zaxisID);
+      zaxisName(zaxistype, zaxisname);
+      zaxisInqName(zaxisID, zname);
+      zaxisInqUnits(zaxisID, zunits);
+      zunits[12] = 0;
+
+      if ( zaxistype == ZAXIS_GENERIC && ltype != 0 )
+        fprintf(stdout, "  %4d : %-12s (ltype=%3d) :", vlistZaxisIndex(vlistID, zaxisID)+1, zaxisname, ltype);
+      else
+        fprintf(stdout, "  %4d : %-24s :", vlistZaxisIndex(vlistID, zaxisID)+1, zaxisname);
+
+      fprintf(stdout, " levels=%d", levelsize);
+      fprintf(stdout, "\n");
+
+      levels = (double*) malloc(levelsize*sizeof(double));
+      zaxisInqLevels(zaxisID, levels);
+
+      if ( !(zaxistype == ZAXIS_SURFACE && levelsize == 1 && !(fabs(levels[0]) > 0)) )
+        {
+          zfirst = levels[0];
+          zlast  = levels[levelsize-1];
+          if ( levelsize > 2 )
+            {
+              zinc = (levels[levelsize-1] - levels[0]) / (levelsize-1);
+              for ( levelID = 2; levelID < levelsize; ++levelID )
+                if ( fabs(fabs(levels[levelID] - levels[levelID-1]) - zinc) > 0.001*zinc ) break;
+
+              if ( levelID < levelsize ) zinc = 0;
+            }
+
+          fprintf(stdout, "%33s : %g", zname, zfirst);
+          if ( levelsize > 1 )
+            {
+              fprintf(stdout, " to %g", zlast);
+              if ( IS_NOT_EQUAL(zinc, 0) )
+                fprintf(stdout, " by %g", zinc);
+            }
+          fprintf(stdout, " %s", zunits);
+          fprintf(stdout, "\n");
+        }
+
+      free(levels);
+
+      if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
+        {
+          double level1, level2;
+          fprintf(stdout, "%33s : ", "bounds");
+
+          level1 = zaxisInqLbound(zaxisID, 0);
+          level2 = zaxisInqUbound(zaxisID, 0);
+          fprintf(stdout, "%.9g-%.9g", level1, level2);
+          if ( levelsize > 1 )
+            {
+              level1 = zaxisInqLbound(zaxisID, levelsize-1);
+              level2 = zaxisInqUbound(zaxisID, levelsize-1);
+              fprintf(stdout, " to %.9g-%.9g", level1, level2);
+              if ( IS_NOT_EQUAL(zinc, 0) )
+                fprintf(stdout, " by %g", zinc);
+            }
+          fprintf(stdout, " %s", zunits);
+          fprintf(stdout, "\n");
+        }
+
+      if ( zaxistype == ZAXIS_REFERENCE )
+        {
+          int number   = zaxisInqNumber(zaxisID);
+
+          if ( number > 0 )
+            {
+              fprintf(stdout, "%33s : ", "zaxis");
+              fprintf(stdout, "number = %d\n", number);
+            }
+
+          char uuidOfVGrid[17];
+          zaxisInqUUID(zaxisID, uuidOfVGrid);
+          if ( uuidOfVGrid[0] != 0 )
+            {
+              char uuidOfVGridStr[37];
+              uuid2str(uuidOfVGrid, uuidOfVGridStr);
+              if ( uuidOfVGridStr[0] != 0  && strlen(uuidOfVGridStr) == 36 )
+                {
+                  fprintf(stdout, "%33s : ", "uuid");
+                  fprintf(stdout, "%s\n", uuidOfVGridStr);
+                }
+            }
+        }
+    }
+}
+
+
+static
+int printDateTime(int ntimeout, int vdate, int vtime)
+{
+  char vdatestr[32], vtimestr[32];
+
+  if ( ntimeout == 4 )
+    {
+      ntimeout = 0;
+      fprintf(stdout, "\n");
+    }
+
+  date2str(vdate, vdatestr, sizeof(vdatestr));
+  time2str(vtime, vtimestr, sizeof(vtimestr));
+
+  fprintf(stdout, " %s %s", vdatestr, vtimestr);
+
+  return (++ntimeout);
+}
+
+#define NUM_TIMESTEP 60
+#define MAX_DOTS     80
+
+static
+int printDot(int ndotout, int *nfact, int *ncout)
+{
+
+  //printf("ncout %d %d %d\n",*ncout, (*ncout)%(*nfact), *nfact);
+  if ( (*ncout)%(*nfact) == 0 )
+    {
+      if ( ndotout == MAX_DOTS )
+	{
+	  *ncout = 0;
+	  ndotout = 0;
+	  fprintf(stdout, "\n   ");
+	  (*nfact) *= 10;
+	}
+
+      fprintf(stdout, ".");
+      fflush(stdout);
+      ndotout++;
+    }
+
+  (*ncout)++;
+
+  return (ndotout);
+}
+
+static
+void printTimesteps(int streamID, int taxisID, int verbose)
+{
+  int nrecs;
+  int vdate, vtime;
+  struct datetime {
+    int vdate;
+    int vtime;
+    struct datetime *next;
+  };
+  struct datetime vdatetime[NUM_TIMESTEP];
+  struct datetime *next_vdatetime = vdatetime;
+
+  for ( int i = 0; i < NUM_TIMESTEP-1; ++i ) vdatetime[i].next = &vdatetime[i+1];
+  vdatetime[NUM_TIMESTEP-1].next = &vdatetime[0];
+
+  int ntimeout = 0;
+  int ndotout = 0;
+  int nvdatetime = 0;
+  int ncout = 0;
+  int nfact = 1;
+  int tsID = 0;
+
+  while ( (nrecs = streamInqTimestep(streamID, tsID)) )
+    {
+      vdate = taxisInqVdate(taxisID);
+      vtime = taxisInqVtime(taxisID);
+
+      if ( verbose || tsID < NUM_TIMESTEP )
+	{
+	  ntimeout = printDateTime(ntimeout, vdate, vtime);
+	}
+      else
+	{
+	  if ( tsID == 2*NUM_TIMESTEP ) fprintf(stdout, "\n   ");
+	  if ( tsID >= 2*NUM_TIMESTEP ) ndotout = printDot(ndotout, &nfact, &ncout);
+
+	  if ( nvdatetime < NUM_TIMESTEP )
+	    {
+	      vdatetime[nvdatetime].vdate = vdate;
+	      vdatetime[nvdatetime].vtime = vtime;
+	      nvdatetime++;
+	    }
+	  else
+	    {
+	      next_vdatetime->vdate = vdate;
+	      next_vdatetime->vtime = vtime;
+	      next_vdatetime = next_vdatetime->next;
+	    }
+	}
+
+      tsID++;
+    }
+
+  if ( nvdatetime )
+    {
+      fprintf(stdout, "\n");
+
+      ntimeout = 0;
+      int toff = tsID%4;
+      if ( toff > 0 ) toff = 4 - toff;
+      for ( int i = 0; i < toff; ++i ) next_vdatetime = next_vdatetime->next;
+
+      for ( int i = toff; i < nvdatetime; ++i )
+	{
+	  vdate = next_vdatetime->vdate;
+	  vtime = next_vdatetime->vtime;
+	  ntimeout = printDateTime(ntimeout, vdate, vtime);
+	  next_vdatetime = next_vdatetime->next;
+	}
+    }
+}
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/src/process.c b/src/process.c
index e05a236..5f61b9f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -52,7 +52,7 @@ typedef struct {
   const char *name;
   const char *enter;
 }
-operator_t;
+oper_t;
 
 typedef struct {
 #if defined(HAVE_LIBPTHREAD)
@@ -80,7 +80,7 @@ typedef struct {
   char       *oargv[MAX_OARGC];
   char        prompt[64];
   short       noper;
-  operator_t  operator[MAX_OPERATOR];
+  oper_t      oper[MAX_OPERATOR];
 }
 process_t;
 
@@ -406,7 +406,7 @@ char *getOperatorArg(const char *xoperator)
 	  len = strlen(commapos+1);
 	  if ( len )
 	    {
-	      operatorArg = malloc(len+1);
+	      operatorArg = (char*) malloc(len+1);
 	      strcpy(operatorArg, commapos+1);
 	    }
 	}
@@ -424,7 +424,6 @@ int getGlobArgc(int argc, char *argv[], int globArgc)
   int streamOutCnt;
   char *opername;
   char *comma_position;
-  const char *caller = processInqPrompt();
 
   opername = &argv[globArgc][1];
   comma_position = strchr(opername, ',');
@@ -436,7 +435,7 @@ int getGlobArgc(int argc, char *argv[], int globArgc)
   if ( streamInCnt == -1 ) streamInCnt = 1;
 
   if ( streamOutCnt > 1 )
-    Errorc("More than one output stream not allowed in CDO pipes (Operator %s)!", opername);
+    cdoAbort("More than one output stream not allowed in CDO pipes (Operator %s)!", opername);
 
   globArgc++;
 
@@ -450,13 +449,11 @@ int getGlobArgc(int argc, char *argv[], int globArgc)
 static
 int skipInputStreams(int argc, char *argv[], int globArgc, int nstreams)
 {
-  const char *caller = processInqPrompt();
-
   while ( nstreams > 0 )
     {
       if ( globArgc >= argc )
 	{
-	  Errorc("Too few arguments. Check command line!");
+	  cdoAbort("Too few arguments. Check command line!");
 	  break;
 	}
       if ( argv[globArgc][0] == '-' )
@@ -512,7 +509,7 @@ void setStreamNames(int argc, char *argv[])
 	  globArgc = getGlobArgc(argc, argv, globArgc);
 	  len = 0;
 	  for ( i = globArgcStart; i < globArgc; i++ ) len += strlen(argv[i]) + 1;
-	  streamname = calloc(1, len);
+	  streamname = (char*) calloc(1, len);
 	  for ( i = globArgcStart; i < globArgc; i++ )
 	    {
 	      strcat(streamname, argv[i]);
@@ -522,7 +519,7 @@ void setStreamNames(int argc, char *argv[])
 	  Process[processID].streamNames[Process[processID].streamCnt].args = streamname;
 	  ac = globArgc - globArgcStart;
 	  //printf("setStreamNames:  ac %d  streamname1: %s\n", ac, streamname);
-	  Process[processID].streamNames[Process[processID].streamCnt].argv = malloc(ac*sizeof(char *));
+	  Process[processID].streamNames[Process[processID].streamCnt].argv = (char **) malloc(ac*sizeof(char *));
 	  for ( i = 0; i < ac; ++i )
 	    Process[processID].streamNames[Process[processID].streamCnt].argv[i] = argv[i+globArgcStart];
 	  Process[processID].streamNames[Process[processID].streamCnt].argc = ac;
@@ -532,11 +529,11 @@ void setStreamNames(int argc, char *argv[])
       else
 	{
 	  len = strlen(argv[globArgc]) + 1;
-	  streamname = malloc(len);
+	  streamname = (char*) malloc(len);
 	  strcpy(streamname, argv[globArgc]);
 	  Process[processID].streamNames[Process[processID].streamCnt].args = streamname;
 	  ac = 1;
-	  Process[processID].streamNames[Process[processID].streamCnt].argv = malloc(ac*sizeof(char *));
+	  Process[processID].streamNames[Process[processID].streamCnt].argv = (char **) malloc(ac*sizeof(char *));
 	  Process[processID].streamNames[Process[processID].streamCnt].argv[0] = argv[globArgc];
 	  Process[processID].streamNames[Process[processID].streamCnt].argc = ac;
 	  Process[processID].streamNames[Process[processID].streamCnt].args = streamname;
@@ -567,7 +564,7 @@ int expand_wildcards(int processID, int streamCnt)
 	  free(Process[processID].streamNames[0].argv);
 	  free(Process[processID].streamNames[0].args);
 
-	  Process[processID].streamNames = realloc(Process[processID].streamNames, streamCnt*sizeof(argument_t));
+	  Process[processID].streamNames = (argument_t*) realloc(Process[processID].streamNames, streamCnt*sizeof(argument_t));
 	      
 	  // move output streams to the end
 	  for ( i = 1; i < Process[processID].streamCnt; ++i )
@@ -576,7 +573,7 @@ int expand_wildcards(int processID, int streamCnt)
 	  for ( i = 0; i < glob_arg->argc; ++i )
 	    {
 	      // printf("add %d %s\n", i, glob_arg->argv[i]);
-	      Process[processID].streamNames[i].argv    = malloc(sizeof(char *));
+	      Process[processID].streamNames[i].argv    = (char **) malloc(sizeof(char *));
 	      Process[processID].streamNames[i].argc    = 1;
 	      Process[processID].streamNames[i].argv[0] = strdupx(glob_arg->argv[i]);
 	      Process[processID].streamNames[i].args    = strdupx(glob_arg->argv[i]);
@@ -608,7 +605,6 @@ int checkStreamCnt(void)
   int i, j;
   int obase = FALSE;
   int status = 0;
-  const char *caller = processInqPrompt();
 
   streamInCnt  = operatorStreamInCnt(Process[processID].operatorName);
   streamOutCnt = operatorStreamOutCnt(Process[processID].operatorName);
@@ -622,19 +618,19 @@ int checkStreamCnt(void)
     }
 
   if ( streamInCnt == -1 && streamOutCnt == -1 )
-    Errorc("I/O stream counts unlimited no allowed!");
+    cdoAbort("I/O stream counts unlimited no allowed!");
     
   // printf(" streamInCnt, streamOutCnt %d %d\n", streamInCnt, streamOutCnt);
   if ( streamInCnt == -1 )
     {
       streamInCnt = Process[processID].streamCnt - streamOutCnt;
-      if ( streamInCnt < 1 ) Errorc("Input streams missing!");
+      if ( streamInCnt < 1 ) cdoAbort("Input streams missing!");
     }
 
   if ( streamOutCnt == -1 )
     {
       streamOutCnt = Process[processID].streamCnt - streamInCnt;
-      if ( streamInCnt < 1 ) Errorc("Output streams missing!");
+      if ( streamOutCnt < 1 ) cdoAbort("Output streams missing!");
     }
   // printf(" streamInCnt, streamOutCnt %d %d\n", streamInCnt, streamOutCnt);
 
@@ -642,27 +638,27 @@ int checkStreamCnt(void)
   // printf(" streamCnt %d %d\n", Process[processID].streamCnt, streamCnt);
 
   if ( Process[processID].streamCnt > streamCnt )
-    Errorc("Too many streams!"
-	   " Operator needs %d input and %d output streams.", streamInCnt, streamOutCnt);
+    cdoAbort("Too many streams!"
+	     " Operator needs %d input and %d output streams.", streamInCnt, streamOutCnt);
 
   if ( Process[processID].streamCnt < streamCnt )
-    Errorc("Too few streams specified!"
-	   " Operator needs %d input and %d output streams.", streamInCnt, streamOutCnt);
+    cdoAbort("Too few streams specified!"
+	     " Operator needs %d input and %d output streams.", streamInCnt, streamOutCnt);
 
 
   for ( i = streamInCnt; i < streamCnt; i++ )
     {
       if ( Process[processID].streamNames[i].args[0] == '-' )
 	{
-	  Errorc("Output file name %s must not begin with \"-\"!\n",
-		 Process[processID].streamNames[i].args);
+	  cdoAbort("Output file name %s must not begin with \"-\"!\n",
+		   Process[processID].streamNames[i].args);
 	}
       else if ( !obase )
 	{
 	  for ( j = 0; j < streamInCnt; j++ ) /* does not work with files in pipes */
 	    if ( strcmp(Process[processID].streamNames[i].args, Process[processID].streamNames[j].args) == 0 )
-	      Errorc("Output file name %s is equal to input file name"
-		     " on position %d!\n", Process[processID].streamNames[i].args, j+1);
+	      cdoAbort("Output file name %s is equal to input file name"
+		       " on position %d!\n", Process[processID].streamNames[i].args, j+1);
 	}
     }
 
@@ -688,7 +684,7 @@ void setStreams(int argc, char *argv[])
 
   Process[processID].streamCnt  = 0; /* filled in setStreamNames */
   if ( streamCnt )
-    Process[processID].streamNames = malloc(streamCnt*sizeof(argument_t));
+    Process[processID].streamNames = (argument_t*) malloc(streamCnt*sizeof(argument_t));
   for ( i = 0; i < streamCnt; i++ )
     {
       Process[processID].streamNames[i].argc = 0;
@@ -850,7 +846,15 @@ void operatorInputArg(const char *enter)
       size_t pos, len, linelen;
       int lreadline = 1;
 
-      if ( enter ) fprintf(stderr, "%-16s : Enter %s > ", processInqPrompt(), enter);
+      if ( enter )
+	{
+	  set_text_color(stderr, BRIGHT, MAGENTA);
+	  fprintf(stderr, "%-16s : ", processInqPrompt());
+	  reset_text_color(stderr);
+	  // set_text_color(stderr, BLINK, BLACK);
+	  fprintf(stderr, "Enter %s > ", enter);
+	  // reset_text_color(stderr);
+	}
 
       while ( lreadline )
 	{
@@ -874,7 +878,7 @@ void operatorInputArg(const char *enter)
 		  while ( pline[len] != ' '  && pline[len] != ',' &&
 			  pline[len] != '\\' && len < linelen ) len++;
 
-		  Process[processID].oargv[oargc] = malloc(len+1);
+		  Process[processID].oargv[oargc] = (char*) malloc(len+1);
 		  memcpy(Process[processID].oargv[oargc], pline, len);
 		  Process[processID].oargv[oargc][len] = '\0';
 		  oargc++;
@@ -898,10 +902,10 @@ int cdoOperatorAdd(const char *name, int f1, int f2, const char *enter)
 
   if ( operID < MAX_OPERATOR )
     {
-      Process[processID].operator[operID].f1     = f1;
-      Process[processID].operator[operID].f2     = f2;
-      Process[processID].operator[operID].name   = name;
-      Process[processID].operator[operID].enter  = enter;
+      Process[processID].oper[operID].f1     = f1;
+      Process[processID].oper[operID].f2     = f2;
+      Process[processID].oper[operID].name   = name;
+      Process[processID].oper[operID].enter  = enter;
 
       Process[processID].noper++;
     }
@@ -922,8 +926,8 @@ int cdoOperatorID(void)
   if ( Process[processID].noper > 0 )
     {
       for ( operID = 0; operID < Process[processID].noper; operID++ )
-	if ( Process[processID].operator[operID].name )
-	  if ( strcmp(Process[processID].operatorName, Process[processID].operator[operID].name) == 0 ) break;
+	if ( Process[processID].oper[operID].name )
+	  if ( strcmp(Process[processID].operatorName, Process[processID].oper[operID].name) == 0 ) break;
 
       if ( operID == Process[processID].noper )
 	cdoAbort("Operator not callable by this name!");
@@ -941,7 +945,7 @@ int cdoOperatorF1(int operID)
 {
   int processID = processSelf();
 
-  return (Process[processID].operator[operID].f1);
+  return (Process[processID].oper[operID].f1);
 }
 
 
@@ -949,7 +953,7 @@ int cdoOperatorF2(int operID)
 {
   int processID = processSelf();
 
-  return (Process[processID].operator[operID].f2);
+  return (Process[processID].oper[operID].f2);
 }
 
 
@@ -957,7 +961,7 @@ const char *cdoOperatorName(int operID)
 {
   int processID = processSelf();
 
-  return (Process[processID].operator[operID].name);
+  return (Process[processID].oper[operID].name);
 }
 
 
@@ -965,7 +969,7 @@ const char *cdoOperatorEnter(int operID)
 {
   int processID = processSelf();
 
-  return (Process[processID].operator[operID].enter);
+  return (Process[processID].oper[operID].enter);
 }
 
 
diff --git a/src/pstream.c b/src/pstream.c
index d42253f..f99e696 100644
--- a/src/pstream.c
+++ b/src/pstream.c
@@ -101,7 +101,7 @@ void pstream_list_new(void)
 {
   assert(_pstreamList == NULL);
 
-  _pstreamList = malloc(_pstream_max*sizeof(pstreamPtrToIdx));
+  _pstreamList = (pstreamPtrToIdx*) malloc(_pstream_max*sizeof(pstreamPtrToIdx));
 }
 
 static
@@ -213,7 +213,7 @@ pstream_t *pstream_new_entry(void)
 {
   pstream_t *pstreamptr;
 
-  pstreamptr = malloc(sizeof(pstream_t));
+  pstreamptr = (pstream_t*) malloc(sizeof(pstream_t));
 
   if ( pstreamptr ) pstream_init_entry(pstreamptr);
 
@@ -325,7 +325,7 @@ int pstreamOpenRead(const argument_t *argument)
       char *operatorArg;
       char *operatorName;
       char *newarg;
-      char *pipename = malloc(16);
+      char *pipename = (char*) malloc(16);
       int rval;
       pthread_t thrID;
       pthread_attr_t attr;
@@ -333,17 +333,17 @@ int pstreamOpenRead(const argument_t *argument)
       size_t len;
       size_t stacksize;
       int status;
-      argument_t *newargument = malloc(sizeof(argument_t));
+      argument_t *newargument = (argument_t*) malloc(sizeof(argument_t));
 
       newargument->argc = argument->argc + 1;
-      newargument->argv = malloc(newargument->argc*sizeof(char *));
+      newargument->argv = (char **) malloc(newargument->argc*sizeof(char *));
       memcpy(newargument->argv, argument->argv, argument->argc*sizeof(char *));
 
       operatorArg  = argument->argv[0];
       operatorName = getOperatorName(operatorArg);
 
       len = strlen(argument->args);
-      newarg = malloc(len+16);
+      newarg = (char*) malloc(len+16);
       strcpy(newarg, argument->args);
       sprintf(pipename, "(pipe%d.%d)", processSelf() + 1, processInqChildNum() + 1);
       newarg[len] = ' ';
@@ -363,7 +363,7 @@ int pstreamOpenRead(const argument_t *argument)
       pstreamptr->argument  = (void *) newargument;
  
       if ( ! cdoSilentMode )
-	fprintf(stderr, "%s: Started child process \"%s\".\n", processInqPrompt(), newarg+1);
+	cdoPrint("Started child process \"%s\".", newarg+1);
 
       status = pthread_attr_init(&attr);
       if ( status ) SysError("pthread_attr_init failed for '%s'\n", newarg+1);
@@ -455,7 +455,7 @@ int pstreamOpenRead(const argument_t *argument)
 		  if ( nfiles == 0 ) cdoAbort("No imput file found in %s", pch);
 
 		  pstreamptr->mfiles = nfiles;
-		  pstreamptr->mfnames = malloc(nfiles*sizeof(char *));
+		  pstreamptr->mfnames = (char **) malloc(nfiles*sizeof(char *));
 		  
 		  rewind(fp);
 
@@ -476,7 +476,7 @@ int pstreamOpenRead(const argument_t *argument)
 		  char line[65536];
 
 		  pstreamptr->mfiles = nfiles;
-		  pstreamptr->mfnames = malloc(nfiles*sizeof(char *));
+		  pstreamptr->mfnames = (char **) malloc(nfiles*sizeof(char *));
 		  
 		  strcpy(line, pch);
 		  for ( i = 0; i < len; i++ ) if ( line[i] == ',' ) line[i] = 0;
@@ -513,7 +513,7 @@ int pstreamOpenRead(const argument_t *argument)
 	      pclose(pfp);
 
 	      pstreamptr->mfiles = nfiles;
-	      pstreamptr->mfnames = malloc(nfiles*sizeof(char *));
+	      pstreamptr->mfnames = (char **) malloc(nfiles*sizeof(char *));
 
 	      for ( j = 0; j < nfiles; j++ )
 		pstreamptr->mfnames[j] = fnames[j];
@@ -523,14 +523,14 @@ int pstreamOpenRead(const argument_t *argument)
       if ( pstreamptr->mfiles )
 	{
 	  len = strlen(pstreamptr->mfnames[0]);
-	  filename = malloc(len+1);
+	  filename = (char*) malloc(len+1);
 	  strcpy(filename, pstreamptr->mfnames[0]);
 	  pstreamptr->nfiles = 1;
 	}
       else
 	{
 	  len = strlen(argument->args);
-	  filename = malloc(len+1);
+	  filename = (char*) malloc(len+1);
 	  strcpy(filename, argument->args);
 	}
 
@@ -656,7 +656,7 @@ int pstreamOpenWrite(const argument_t *argument, int filetype)
   else
     {
       /* extern int cdoDefaultInstID; */
-      char *filename = malloc(strlen(argument->args)+1);
+      char *filename = (char*) malloc(strlen(argument->args)+1);
 
       pstreamptr = pstream_new_entry();
       if ( ! pstreamptr ) Error("No memory");
@@ -759,7 +759,7 @@ int pstreamOpenAppend(const argument_t *argument)
     }
   else
     {
-      char *filename = malloc(strlen(argument->args)+1);
+      char *filename = (char*) malloc(strlen(argument->args)+1);
 
       pstreamptr = pstream_new_entry();
       if ( ! pstreamptr ) Error("No memory");
@@ -1008,7 +1008,7 @@ void pstreamDefVarlist(pstream_t *pstreamptr, int vlistID)
     cdoAbort("Internal problem, varlist already allocated!");
 
   nvars = vlistNvars(vlistID);
-  varlist = malloc(nvars*sizeof(varlist_t));
+  varlist = (varlist_t*) malloc(nvars*sizeof(varlist_t));
 
   for ( varID = 0; varID < nvars; ++varID )
     {
@@ -1102,6 +1102,10 @@ void pstreamDefVlist(int pstreamID, int vlistID)
 
       vlistDefAttTxt(vlistID, CDI_GLOBAL, "CDO", (int)strlen(cdoComment())+1, cdoComment());
 
+#if defined(_OPENMP)
+      if ( ompNumThreads > 1 )
+	vlistDefAttInt(vlistID, CDI_GLOBAL, "cdo_openmp_thread_number", DATATYPE_INT32, 1, &ompNumThreads);
+#endif
       pstreamDefVarlist(pstreamptr, vlistID);
 
       if ( processNums() == 1 && ompNumThreads == 1 ) timer_start(timer_write);
@@ -1247,8 +1251,8 @@ void pstreamCheckDatarange(pstream_t *pstreamptr, int varID, double *array, int
       if ( datatype == DATATYPE_INT8  || datatype == DATATYPE_UINT8 ||
 	   datatype == DATATYPE_INT16 || datatype == DATATYPE_UINT16 )
 	{
-	  smin = (int) NINTD(smin);
-	  smax = (int) NINTD(smax);
+	  smin = (int) round(smin);
+	  smax = (int) round(smax);
 	}
 
       if      ( datatype == DATATYPE_INT8   ) { vmin =        -128.; vmax =        127.; }
@@ -1383,7 +1387,7 @@ int pstreamInqTimestep(int pstreamID, int tsID)
 	  streamClose(pstreamptr->fileID);
 
 	  len = strlen(pstreamptr->mfnames[nfile]);
-	  filename = malloc(len+1);
+	  filename = (char*) malloc(len+1);
 	  strcpy(filename, pstreamptr->mfnames[nfile]);
 	  pstreamptr->nfiles++;
 
@@ -1554,36 +1558,29 @@ void cdoFinish(void)
 
   if ( !cdoSilentMode )
     {
+      set_text_color(stderr, RESET, GREEN);
+      fprintf(stderr, "%s: ", processInqPrompt());
+      reset_text_color(stderr);
       if ( nvals > 0 )
 	{
 	  if ( sizeof(INT64) > sizeof(long) )
 #if defined(_WIN32)
-	    fprintf(stderr, "%s: Processed %I64d value%s from %d variable%s",
+	    fprintf(stderr, "Processed %I64d value%s from %d variable%s",
 #else
-	    fprintf(stderr, "%s: Processed %jd value%s from %d variable%s",
+	    fprintf(stderr, "Processed %jd value%s from %d variable%s",
 #endif
-		    processInqPrompt(),
-		    nvals, nvals > 1 ? "s" : "",
-		    nvars, nvars > 1 ? "s" : "");
+		    nvals, ADD_PLURAL(nvals), nvars, ADD_PLURAL(nvars));
 	  else
-	    fprintf(stderr, "%s: Processed %ld value%s from %d variable%s",
-		    processInqPrompt(),
-		    (long) nvals, nvals > 1 ? "s" : "",
-		    nvars, nvars > 1 ? "s" : "");
+	    fprintf(stderr, "Processed %ld value%s from %d variable%s",
+		    (long) nvals, ADD_PLURAL(nvals), nvars, ADD_PLURAL(nvars));
 	}
       else if ( nvars > 0 )
 	{
-	  fprintf(stderr, "%s: Processed %d variable%s",
-		  processInqPrompt(),
-		  nvars, nvars > 1 ? "s" : "");
-	}
-      else
-	{
-	  fprintf(stderr, "%s: ", processInqPrompt());
+	  fprintf(stderr, "Processed %d variable%s", nvars,  ADD_PLURAL(nvars));
 	}
 
       if ( ntimesteps > 0 )
-	fprintf(stderr, " over %d timestep%s", ntimesteps, ntimesteps > 1 ? "s" : "");
+	fprintf(stderr, " over %d timestep%s", ntimesteps,  ADD_PLURAL(ntimesteps));
 
       //  fprintf(stderr, ".");
     }
diff --git a/src/pstream.h b/src/pstream.h
index 3842518..0851991 100644
--- a/src/pstream.h
+++ b/src/pstream.h
@@ -18,6 +18,8 @@
 #ifndef _PSTREAM_H
 #define _PSTREAM_H
 
+#include <sys/types.h> /* off_t */
+
 #define  streamOpenWrite          pstreamOpenWrite
 #define  streamOpenRead           pstreamOpenRead
 #define  streamOpenAppend         pstreamOpenAppend
diff --git a/src/remap.h b/src/remap.h
index db37303..c1d72f4 100644
--- a/src/remap.h
+++ b/src/remap.h
@@ -1,15 +1,36 @@
+#ifndef _REMAP_H
+#define _REMAP_H
+
 #if defined(_OPENMP)
 #include <omp.h>
 #endif
 
 #include <math.h>
 
+#ifndef  M_PI
+#define  M_PI        3.14159265358979323846264338327950288  /* pi */
+#endif
+
 #define  PI       M_PI
-#define  PI2      2.0*PI
-#define  PIH      0.5*PI
+#define  PI2      (2.0*PI)
+#define  PIH      (0.5*PI)
+
+#define  ZERO     0.0
+#define  ONE      1.0
+#define  TWO      2.0
+#define  THREE    3.0
+#define  HALF     0.5
+#define  QUART    0.25
+#define  BIGNUM   1.e+20
+#define  TINY     1.e-14
 
-#define  REMAP_GRID_BASIS_SRC  1
-#define  REMAP_GRID_BASIS_TGT  2
+
+#define  REMAP_GRID_TYPE_REG2D     1
+#define  REMAP_GRID_TYPE_CURVE2D   2
+#define  REMAP_GRID_TYPE_UNSTRUCT  3
+
+#define  REMAP_GRID_BASIS_SRC      1
+#define  REMAP_GRID_BASIS_TGT      2
 
 #define  RESTR_TYPE  int  /* restrict data types: 0 -> double, float; 1 -> int */
 
@@ -40,19 +61,19 @@ typedef RESTR_TYPE restr_t;
 
 #define  TINY_FRAC     1.e-10
 
-#define  NORM_OPT_NONE      1
-#define  NORM_OPT_DESTAREA  2
-#define  NORM_OPT_FRACAREA  3
+#define  NORM_OPT_NONE        1
+#define  NORM_OPT_DESTAREA    2
+#define  NORM_OPT_FRACAREA    3
 
-#define  MAP_TYPE_CONSERV   1
-#define  MAP_TYPE_BILINEAR  2
-#define  MAP_TYPE_BICUBIC   3
-#define  MAP_TYPE_DISTWGT   4
-#define  MAP_TYPE_CONSPHERE 5
+#define  MAP_TYPE_CONSERV     1
+#define  MAP_TYPE_BILINEAR    2
+#define  MAP_TYPE_BICUBIC     3
+#define  MAP_TYPE_DISTWGT     4
+#define  MAP_TYPE_CONSERV_YAC 5
 
-#define  SUBMAP_TYPE_NONE   0
-#define  SUBMAP_TYPE_LAF    1
-#define  SUBMAP_TYPE_SUM    2
+#define  SUBMAP_TYPE_NONE     0
+#define  SUBMAP_TYPE_LAF      1
+#define  SUBMAP_TYPE_SUM      2
 
 
 typedef struct {
@@ -166,11 +187,16 @@ void remap_laf(double *restrict dst_array, double missval, long dst_size, long n
 void remap_sum(double *restrict dst_array, double missval, long dst_size, long num_links, double *restrict map_wts,
 	       long num_wts, const int *restrict dst_add, const int *restrict src_add, const double *restrict src_array);
 
-void remap_bilin(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
-void remap_bicub(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
-void remap_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
-void remap_consphere(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
-void remap_distwgt(int num_neighbors, remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
+void scrip_remap_weights_bilinear(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
+void scrip_remap_weights_bicubic(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
+void scrip_remap_weights_distwgt(int num_neighbors, remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
+void scrip_remap_weights_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
+void remap_weights_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
+
+void scrip_remap_bilinear(remapgrid_t* src_grid, remapgrid_t* tgt_grid, const double* restrict src_array, double* restrict tgt_array, double missval);
+void scrip_remap_bicubic(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const double* restrict src_array, double* restrict tgt_array, double missval);
+void remap_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const double* restrict src_array, double* restrict tgt_array, double missval);
+
 
 void resize_remap_vars(remapvars_t *rv, int increment);
 
@@ -189,8 +215,27 @@ void write_remap_scrip(const char *interp_file, int map_type, int submap_type, i
 void read_remap_scrip(const char *interp_file, int gridID1, int gridID2, int *map_type, int *submap_type, int *num_neighbors,
 		      int *remap_order, remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
 
-void store_link_bilin(remapvars_t *rv, int dst_add, int *restrict src_add, double *restrict weights);
-
+void store_link_bilin(remapvars_t *rv, int dst_add, int src_add[4], double weights[4]);
 
 void calc_bin_addr(long gridsize, long nbins, const restr_t* restrict bin_lats, const restr_t* restrict cell_bound_box, int* restrict bin_addr);
 void calc_lat_bins(remapgrid_t* src_grid, remapgrid_t* tgt_grid, int map_type);
+long get_srch_cells(long tgt_grid_add, long nbins, int *bin_addr1, int *bin_addr2,
+		    restr_t *tgt_cell_bound_box, restr_t *src_cell_bound_box, long src_grid_size, int *srch_add);
+
+int grid_search_reg2d_nn(long nx, long ny, int *restrict nbr_add, double *restrict nbr_dist, double plat, double plon,
+			 const double *restrict src_center_lat, const double *restrict src_center_lon);
+
+int grid_search_reg2d(remapgrid_t *src_grid, int *restrict src_add, double *restrict src_lats, 
+		      double *restrict src_lons,  double plat, double plon, const int *restrict src_grid_dims,
+		      const double *restrict src_center_lat, const double *restrict src_center_lon);
+
+int grid_search(remapgrid_t *src_grid, int *restrict src_add, double *restrict src_lats, 
+		double *restrict src_lons,  double plat, double plon, const int *restrict src_grid_dims,
+		const double *restrict src_center_lat, const double *restrict src_center_lon,
+		const restr_t *restrict src_grid_bound_box, const int *restrict src_bin_add);
+
+int find_ij_weights(double plon, double plat, double* restrict src_lats, double* restrict src_lons, double *ig, double *jg);
+int rect_grid_search(long *ii, long *jj, double x, double y, long nxm, long nym, const double *restrict xm, const double *restrict ym);
+
+
+#endif  /* _REMAP_H */
diff --git a/src/remap_bicubic_scrip.c b/src/remap_bicubic_scrip.c
new file mode 100644
index 0000000..c34563c
--- /dev/null
+++ b/src/remap_bicubic_scrip.c
@@ -0,0 +1,420 @@
+#include "cdo.h"
+#include "cdo_int.h"
+#include "grid.h"
+#include "remap.h"
+
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/*                                                                         */
+/*      BICUBIC INTERPOLATION                                              */
+/*                                                                         */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+/*
+  This routine stores the address and weight for four links associated with one destination 
+  point in the appropriate address and weight arrays and resizes those arrays if necessary.
+*/
+static
+void store_link_bicub(remapvars_t *rv, int dst_add, int src_add[4], double weights[4][4])
+{
+  /*
+    Input variables:
+    int dst_add          ! address on destination grid
+    int src_add[4]       ! addresses on source grid
+    double weights[4][4] ! array of remapping weights for these links
+  */
+  long n, k;
+  long nlink;
+
+  /*
+     Increment number of links and check to see if remap arrays need
+     to be increased to accomodate the new link. Then store the link.
+  */
+  nlink = rv->num_links;
+  rv->num_links += 4;
+
+  if ( rv->num_links >= rv->max_links ) 
+    resize_remap_vars(rv, rv->resize_increment);
+
+  for ( n = 0; n < 4; ++n )
+    {
+      rv->src_grid_add[nlink+n] = src_add[n];
+      rv->tgt_grid_add[nlink+n] = dst_add;
+      for ( k = 0; k < 4; ++k )
+	rv->wts[4*(nlink+n)+k] = weights[k][n];
+    }
+
+} /* store_link_bicub */
+
+static
+void set_bicubic_weights(double iw, double jw, double wgts[4][4])
+{
+  wgts[0][0] = (1.-jw*jw*(3.-2.*jw))  * (1.-iw*iw*(3.-2.*iw));
+  wgts[0][1] = (1.-jw*jw*(3.-2.*jw))  *     iw*iw*(3.-2.*iw);
+  wgts[0][2] =     jw*jw*(3.-2.*jw)   *     iw*iw*(3.-2.*iw);
+  wgts[0][3] =     jw*jw*(3.-2.*jw)   * (1.-iw*iw*(3.-2.*iw));
+  wgts[1][0] = (1.-jw*jw*(3.-2.*jw))  *     iw*(iw-1.)*(iw-1.);
+  wgts[1][1] = (1.-jw*jw*(3.-2.*jw))  *     iw*iw*(iw-1.);
+  wgts[1][2] =     jw*jw*(3.-2.*jw)   *     iw*iw*(iw-1.);
+  wgts[1][3] =     jw*jw*(3.-2.*jw)   *     iw*(iw-1.)*(iw-1.);
+  wgts[2][0] =     jw*(jw-1.)*(jw-1.) * (1.-iw*iw*(3.-2.*iw));
+  wgts[2][1] =     jw*(jw-1.)*(jw-1.) *     iw*iw*(3.-2.*iw);
+  wgts[2][2] =     jw*jw*(jw-1.)      *     iw*iw*(3.-2.*iw);
+  wgts[2][3] =     jw*jw*(jw-1.)      * (1.-iw*iw*(3.-2.*iw));
+  wgts[3][0] =     iw*(iw-1.)*(iw-1.) *     jw*(jw-1.)*(jw-1.);
+  wgts[3][1] =     iw*iw*(iw-1.)      *     jw*(jw-1.)*(jw-1.);
+  wgts[3][2] =     iw*iw*(iw-1.)      *     jw*jw*(jw-1.);
+  wgts[3][3] =     iw*(iw-1.)*(iw-1.) *     jw*jw*(jw-1.);
+}
+
+int num_src_points(const int* restrict mask, const int src_add[4], double src_lats[4]);
+
+static
+void renormalize_weights(const double src_lats[4], double wgts[4][4])
+{
+  int n;
+  double sum_wgts = 0.0; /* sum of weights for normalization */
+  /* 2012-05-08 Uwe Schulzweida: using absolute value of src_lats (bug fix) */
+  for ( n = 0; n < 4; ++n ) sum_wgts  += fabs(src_lats[n]);
+  for ( n = 0; n < 4; ++n ) wgts[0][n] = fabs(src_lats[n])/sum_wgts;
+  for ( n = 0; n < 4; ++n ) wgts[1][n] = 0.;
+  for ( n = 0; n < 4; ++n ) wgts[2][n] = 0.;
+  for ( n = 0; n < 4; ++n ) wgts[3][n] = 0.;
+}
+
+static
+void bicubic_warning(void)
+{
+  static int lwarn = TRUE;
+
+  if ( cdoVerbose || lwarn )
+    {
+      lwarn = FALSE;
+      // cdoWarning("Iteration for iw,jw exceed max iteration count of %d!", remap_max_iter);
+      cdoWarning("Bicubic interpolation failed for some grid points - used a distance-weighted average instead!");
+    }
+}
+
+typedef struct
+{
+  int add;
+  double wgts[4];
+}
+addwgts_t;
+
+static
+int cmpwgts(const void *s1, const void *s2)
+{
+  int cmp = 0;
+  const addwgts_t* c1 = (const addwgts_t*) s1;
+  const addwgts_t* c2 = (const addwgts_t*) s2;
+
+  if      ( c1->add < c2->add ) cmp = -1;
+  else if ( c1->add > c2->add ) cmp =  1;
+
+  return (cmp);
+}
+
+static
+void sort_bicubic_adds(int src_add[4], double wgts[4][4])
+{
+  int n;
+  addwgts_t addwgts[4];
+
+  for ( n = 1; n < 4; ++n )
+    if ( src_add[n] < src_add[n-1] ) break;
+  if ( n == 4 ) return;
+
+  for ( n = 0; n < 4; ++n )
+    {
+      addwgts[n].add     = src_add[n];
+      addwgts[n].wgts[0] = wgts[0][n];
+      addwgts[n].wgts[1] = wgts[1][n];
+      addwgts[n].wgts[2] = wgts[2][n];
+      addwgts[n].wgts[3] = wgts[3][n];
+    }
+
+  qsort(addwgts, 4, sizeof(addwgts_t), cmpwgts);
+
+  for ( n = 0; n < 4; ++n )
+    {
+      src_add[n] = addwgts[n].add;
+      wgts[0][n] = addwgts[n].wgts[0];
+      wgts[1][n] = addwgts[n].wgts[1];
+      wgts[2][n] = addwgts[n].wgts[2];
+      wgts[3][n] = addwgts[n].wgts[3];
+    }  
+}
+
+static
+void bicubic_remap(double* restrict tgt_point, const double* restrict src_array, double wgts[4][4], const int src_add[4],
+		   const double* restrict grad1, const double* restrict grad2, const double* restrict grad3)
+{
+  *tgt_point = 0.;
+  for ( int n = 0; n < 4; ++n )
+    *tgt_point += src_array[src_add[n]]*wgts[0][n] +
+                      grad1[src_add[n]]*wgts[1][n] +
+                      grad2[src_add[n]]*wgts[2][n] +
+                      grad3[src_add[n]]*wgts[3][n];  
+}
+
+/*
+  -----------------------------------------------------------------------
+
+  This routine computes the weights for a bicubic interpolation.
+
+  -----------------------------------------------------------------------
+*/
+void scrip_remap_weights_bicubic(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
+{
+  /*   Local variables */
+  int  search_result;
+  long tgt_grid_size;
+  long dst_add;        /*  destination addresss                   */
+  int src_add[4];      /*  address for the four source points     */
+  double src_lats[4];  /*  latitudes  of four bilinear corners    */
+  double src_lons[4];  /*  longitudes of four bilinear corners    */
+  double wgts[4][4];   /*  bicubic weights for four corners       */
+  double plat, plon;   /*  lat/lon coords of destination point    */
+  double findex = 0;
+  int remap_grid_type = src_grid->remap_grid_type;
+
+  if ( cdoVerbose ) cdoPrint("Called %s()", __func__);
+
+  progressInit();
+
+  tgt_grid_size = tgt_grid->size;
+
+  /* Compute mappings from source to target grid */
+
+  if ( src_grid->rank != 2 )
+    cdoAbort("Can not do bicubic interpolation when source grid rank != 2"); 
+
+  /* Loop over destination grid */
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, cdoVerbose, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, findex) \
+  private(dst_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result) \
+  schedule(dynamic,1)
+#endif
+  /* grid_loop1 */
+  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
+    {
+      int lprogress = 1;
+#if defined(_OPENMP)
+      if ( omp_get_thread_num() != 0 ) lprogress = 0;
+#endif
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+      findex++;
+      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
+
+      if ( ! tgt_grid->mask[dst_add] ) continue;
+
+      plat = tgt_grid->cell_center_lat[dst_add];
+      plon = tgt_grid->cell_center_lon[dst_add];
+
+      /* Find nearest square of grid points on source grid  */
+      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	search_result = grid_search_reg2d(src_grid, src_add, src_lats, src_lons, 
+					  plat, plon, src_grid->dims,
+					  src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
+      else
+	search_result = grid_search(src_grid, src_add, src_lats, src_lons, 
+				    plat, plon, src_grid->dims,
+				    src_grid->cell_center_lat, src_grid->cell_center_lon,
+				    src_grid->cell_bound_box, src_grid->bin_addr);
+
+      /* Check to see if points are land points */
+      if ( search_result > 0 )
+	{
+	  for ( int n = 0; n < 4; ++n )
+	    if ( ! src_grid->mask[src_add[n]] ) search_result = 0;
+	}
+
+      /* If point found, find local iw,jw coordinates for weights  */
+      if ( search_result > 0 )
+	{
+	  double iw, jw;  /*  current guess for bilinear coordinate  */
+
+          tgt_grid->cell_frac[dst_add] = 1.;
+
+          if ( find_ij_weights(plon, plat, src_lats, src_lons, &iw, &jw) )
+	    {
+	      /* Successfully found iw,jw - compute weights */
+	      set_bicubic_weights(iw, jw, wgts);
+
+	      sort_bicubic_adds(src_add, wgts);
+
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+	      store_link_bicub(rv, dst_add, src_add, wgts);
+	    }
+          else
+	    {
+	      bicubic_warning();
+
+	      search_result = -1;
+	    }
+	}
+	  
+      /*
+	Search for bicubic failed - use a distance-weighted average instead (this is typically near the pole)
+	Distance was stored in src_lats!
+      */
+      if ( search_result < 0 )
+	{
+	  if ( num_src_points(src_grid->mask, src_add, src_lats) > 0 )
+	    {
+	      renormalize_weights(src_lats, wgts);
+
+	      tgt_grid->cell_frac[dst_add] = 1.;
+
+	      sort_bicubic_adds(src_add, wgts);
+
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+	      store_link_bicub(rv, dst_add, src_add, wgts);
+	    }
+        }
+    } /* grid_loop1 */
+
+} /* scrip_remap_weights_bicubic */
+
+/*
+  -----------------------------------------------------------------------
+
+  This routine computes ans apply the weights for a bicubic interpolation.
+
+  -----------------------------------------------------------------------
+*/
+void scrip_remap_bicubic(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const double* restrict src_array, double* restrict tgt_array, double missval)
+{
+  /*   Local variables */
+  int  search_result;
+  long tgt_grid_size;
+  long dst_add;        /*  destination addresss                 */
+  int src_add[4];      /*  address for the four source points   */
+  double src_lats[4];  /*  latitudes  of four bilinear corners  */
+  double src_lons[4];  /*  longitudes of four bilinear corners  */
+  double wgts[4][4];   /*  bicubic weights for four corners     */
+  double plat, plon;   /*  lat/lon coords of destination point  */
+  double findex = 0;
+  double *grad1_lat, *grad1_lon, *grad1_latlon;
+  int remap_grid_type = src_grid->remap_grid_type;
+
+  if ( cdoVerbose ) cdoPrint("Called %s()", __func__);
+
+  progressInit();
+
+  tgt_grid_size = tgt_grid->size;
+
+  /* Compute mappings from source to target grid */
+
+  if ( src_grid->rank != 2 )
+    cdoAbort("Can not do bicubic interpolation when source grid rank != 2"); 
+
+  grad1_lat    = (double*) malloc(src_grid->size*sizeof(double));
+  grad1_lon    = (double*) malloc(src_grid->size*sizeof(double));
+  grad1_latlon = (double*) malloc(src_grid->size*sizeof(double));
+
+  remap_gradients(*src_grid, src_array, grad1_lat, grad1_lon, grad1_latlon);
+
+  /* Loop over destination grid */
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, cdoVerbose, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, src_array, tgt_array, missval, grad1_lat, grad1_lon, grad1_latlon, findex) \
+  private(dst_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result) \
+  schedule(dynamic,1)
+#endif
+  /* grid_loop1 */
+  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
+    {
+      int lprogress = 1;
+#if defined(_OPENMP)
+      if ( omp_get_thread_num() != 0 ) lprogress = 0;
+#endif
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+      findex++;
+      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
+
+      tgt_array[dst_add] = missval;
+
+      if ( ! tgt_grid->mask[dst_add] ) continue;
+
+      plat = tgt_grid->cell_center_lat[dst_add];
+      plon = tgt_grid->cell_center_lon[dst_add];
+
+      /* Find nearest square of grid points on source grid  */
+      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	search_result = grid_search_reg2d(src_grid, src_add, src_lats, src_lons, 
+					  plat, plon, src_grid->dims,
+					  src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
+      else
+	search_result = grid_search(src_grid, src_add, src_lats, src_lons, 
+				    plat, plon, src_grid->dims,
+				    src_grid->cell_center_lat, src_grid->cell_center_lon,
+				    src_grid->cell_bound_box, src_grid->bin_addr);
+
+      /* Check to see if points are land points */
+      if ( search_result > 0 )
+	{
+	  for ( int n = 0; n < 4; ++n )
+	    if ( ! src_grid->mask[src_add[n]] ) search_result = 0;
+	}
+
+      /* If point found, find local iw,jw coordinates for weights  */
+      if ( search_result > 0 )
+	{
+	  double iw, jw;  /*  current guess for bilinear coordinate  */
+
+          tgt_grid->cell_frac[dst_add] = 1.;
+
+          if ( find_ij_weights(plon, plat, src_lats, src_lons, &iw, &jw) )
+	    {
+	      /* Successfully found iw,jw - compute weights */
+	      set_bicubic_weights(iw, jw, wgts);
+
+	      sort_bicubic_adds(src_add, wgts);
+
+	      bicubic_remap(&tgt_array[dst_add], src_array, wgts, src_add, grad1_lat, grad1_lon, grad1_latlon);
+	    }
+          else
+	    {
+	      bicubic_warning();
+
+	      search_result = -1;
+	    }
+	}
+	  
+      /*
+	Search for bicubic failed - use a distance-weighted average instead (this is typically near the pole)
+	Distance was stored in src_lats!
+      */
+      if ( search_result < 0 )
+	{
+	  if ( num_src_points(src_grid->mask, src_add, src_lats) > 0 )
+	    {
+	      renormalize_weights(src_lats, wgts);
+
+	      tgt_grid->cell_frac[dst_add] = 1.;
+
+	      sort_bicubic_adds(src_add, wgts);
+
+	      bicubic_remap(&tgt_array[dst_add], src_array, wgts, src_add, grad1_lat, grad1_lon, grad1_latlon);
+	    }
+        }
+    } /* grid_loop1 */
+
+  free(grad1_lat);
+  free(grad1_lon);
+  free(grad1_latlon);
+
+} /* scrip_remap_bicubic */
diff --git a/src/remap_bilinear_scrip.c b/src/remap_bilinear_scrip.c
new file mode 100644
index 0000000..43f65bb
--- /dev/null
+++ b/src/remap_bilinear_scrip.c
@@ -0,0 +1,494 @@
+#include "cdo.h"
+#include "cdo_int.h"
+#include "grid.h"
+#include "remap.h"
+
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/*                                                                         */
+/*      BILINEAR INTERPOLATION                                             */
+/*                                                                         */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+/*
+  This routine stores the address and weight for four links associated with one destination
+  point in the appropriate address and weight arrays and resizes those arrays if necessary.
+*/
+void store_link_bilin(remapvars_t *rv, int dst_add, int src_add[4], double weights[4])
+{
+  /*
+    Input variables:
+    int dst_add       ! address on destination grid
+    int src_add[4]    ! addresses on source grid
+    double weights[4] ! array of remapping weights for these links
+  */
+  long n;
+  long nlink;
+
+  /*
+     Increment number of links and check to see if remap arrays need
+     to be increased to accomodate the new link. Then store the link.
+  */
+  nlink = rv->num_links;
+  rv->num_links += 4;
+
+  if ( rv->num_links >= rv->max_links ) 
+    resize_remap_vars(rv, rv->resize_increment);
+
+  for ( n = 0; n < 4; ++n )
+    {
+      rv->src_grid_add[nlink+n] = src_add[n];
+      rv->tgt_grid_add[nlink+n] = dst_add;
+      rv->wts         [nlink+n] = weights[n];
+    }
+
+} /* store_link_bilin */
+
+
+int find_ij_weights(double plon, double plat, double* restrict src_lats, double* restrict src_lons, double *ig, double *jg)
+{
+  int lfound = 0;
+  long iter;                     /*  iteration counters   */
+  double iguess, jguess;         /*  current guess for bilinear coordinate  */
+  double deli, delj;             /*  corrections to iw,jw                   */
+  double dth1, dth2, dth3;       /*  some latitude  differences             */
+  double dph1, dph2, dph3;       /*  some longitude differences             */
+  double dthp, dphp;             /*  difference between point and sw corner */
+  double mat1, mat2, mat3, mat4; /*  matrix elements                        */
+  double determinant;            /*  matrix determinant                     */
+  double converge = 1.e-10;      /* Convergence criterion                   */
+  extern long remap_max_iter;
+
+  /* Iterate to find iw,jw for bilinear approximation  */
+
+  dth1 = src_lats[1] - src_lats[0];
+  dth2 = src_lats[3] - src_lats[0];
+  dth3 = src_lats[2] - src_lats[1] - dth2;
+
+  dph1 = src_lons[1] - src_lons[0];
+  dph2 = src_lons[3] - src_lons[0];
+  dph3 = src_lons[2] - src_lons[1];
+
+  if ( dph1 >  THREE*PIH ) dph1 -= PI2;
+  if ( dph2 >  THREE*PIH ) dph2 -= PI2;
+  if ( dph3 >  THREE*PIH ) dph3 -= PI2;
+  if ( dph1 < -THREE*PIH ) dph1 += PI2;
+  if ( dph2 < -THREE*PIH ) dph2 += PI2;
+  if ( dph3 < -THREE*PIH ) dph3 += PI2;
+
+  dph3 = dph3 - dph2;
+
+  iguess = HALF;
+  jguess = HALF;
+
+  for ( iter = 0; iter < remap_max_iter; ++iter )
+    {
+      dthp = plat - src_lats[0] - dth1*iguess - dth2*jguess - dth3*iguess*jguess;
+      dphp = plon - src_lons[0];
+      
+      if ( dphp >  THREE*PIH ) dphp -= PI2;
+      if ( dphp < -THREE*PIH ) dphp += PI2;
+
+      dphp = dphp - dph1*iguess - dph2*jguess - dph3*iguess*jguess;
+
+      mat1 = dth1 + dth3*jguess;
+      mat2 = dth2 + dth3*iguess;
+      mat3 = dph1 + dph3*jguess;
+      mat4 = dph2 + dph3*iguess;
+
+      determinant = mat1*mat4 - mat2*mat3;
+
+      deli = (dthp*mat4 - dphp*mat2)/determinant;
+      delj = (dphp*mat1 - dthp*mat3)/determinant;
+
+      if ( fabs(deli) < converge && fabs(delj) < converge ) break;
+
+      iguess += deli;
+      jguess += delj;
+    }
+
+  *ig = iguess;
+  *jg = jguess;
+
+  if ( iter < remap_max_iter ) lfound = 1;
+
+  return (lfound);
+}
+
+static
+void set_bilinear_weights(double iw, double jw, double wgts[4])
+{
+  wgts[0] = (1.-iw) * (1.-jw);
+  wgts[1] =     iw  * (1.-jw);
+  wgts[2] =     iw  *     jw;
+  wgts[3] = (1.-iw) *     jw;
+}
+
+
+int num_src_points(const int* restrict mask, const int src_add[4], double src_lats[4])
+{
+  int icount = 0;
+
+  for ( int n = 0; n < 4; ++n )
+    {
+      if ( mask[src_add[n]] )
+	icount++;
+      else
+	src_lats[n] = 0.;
+    }
+
+  return (icount);
+}
+
+static
+void renormalize_weights(const double src_lats[4], double wgts[4])
+{
+  int n;
+  double sum_wgts = 0.0; /* sum of weights for normalization */
+  /* 2012-05-08 Uwe Schulzweida: using absolute value of src_lats (bug fix) */
+  for ( n = 0; n < 4; ++n ) sum_wgts += fabs(src_lats[n]);
+  for ( n = 0; n < 4; ++n ) wgts[n] = fabs(src_lats[n])/sum_wgts;
+}
+
+static
+void bilinear_warning(double plon, double plat, double iw, double jw, int* src_add, double* src_lons, double* src_lats, remapgrid_t* src_grid)
+{
+  static int lwarn = TRUE;
+
+  if ( cdoVerbose )
+    {
+      cdoPrint("Point coords: %g %g", plat, plon);
+      cdoPrint("Src grid lats: %g %g %g %g", src_lats[0], src_lats[1], src_lats[2], src_lats[3]);
+      cdoPrint("Src grid lons: %g %g %g %g", src_lons[0], src_lons[1], src_lons[2], src_lons[3]);
+      cdoPrint("Src grid addresses: %d %d %d %d", src_add[0], src_add[1], src_add[2], src_add[3]);
+      cdoPrint("Src grid lats: %g %g %g %g",
+	       src_grid->cell_center_lat[src_add[0]], src_grid->cell_center_lat[src_add[1]],
+	       src_grid->cell_center_lat[src_add[2]], src_grid->cell_center_lat[src_add[3]]);
+      cdoPrint("Src grid lons: %g %g %g %g",
+	       src_grid->cell_center_lon[src_add[0]], src_grid->cell_center_lon[src_add[1]],
+	       src_grid->cell_center_lon[src_add[2]], src_grid->cell_center_lon[src_add[3]]);
+      cdoPrint("Current iw,jw : %g %g", iw, jw);
+    }
+
+  if ( cdoVerbose || lwarn )
+    {
+      lwarn = FALSE;
+      //  cdoWarning("Iteration for iw,jw exceed max iteration count of %d!", remap_max_iter);
+      cdoWarning("Bilinear interpolation failed for some grid points - used a distance-weighted average instead!");
+    }
+}
+
+typedef struct
+{
+  int add;
+  double wgts;
+}
+addwgts_t;
+
+static
+int cmpwgts(const void *s1, const void *s2)
+{
+  int cmp = 0;
+  const addwgts_t* c1 = (const addwgts_t*) s1;
+  const addwgts_t* c2 = (const addwgts_t*) s2;
+
+  if      ( c1->add < c2->add ) cmp = -1;
+  else if ( c1->add > c2->add ) cmp =  1;
+
+  return (cmp);
+}
+
+static
+void sort_bilinear_adds(int src_add[4], double wgts[4])
+{
+  int n;
+  addwgts_t addwgts[4];
+
+  for ( n = 1; n < 4; ++n )
+    if ( src_add[n] < src_add[n-1] ) break;
+  if ( n == 4 ) return;
+
+  for ( n = 0; n < 4; ++n )
+    {
+      addwgts[n].add  = src_add[n];
+      addwgts[n].wgts = wgts[n];
+    }
+
+  qsort(addwgts, 4, sizeof(addwgts_t), cmpwgts);
+
+  for ( n = 0; n < 4; ++n )
+    {
+      src_add[n] = addwgts[n].add;
+      wgts[n]    = addwgts[n].wgts;
+    }  
+}
+
+static
+void bilinear_remap(double* restrict tgt_point, const double* restrict src_array, const double wgts[4], const int src_add[4])
+{
+  // *tgt_point = 0.;
+  // for ( int n = 0; n < 4; ++n ) *tgt_point += src_array[src_add[n]]*wgts[n];
+  *tgt_point = src_array[src_add[0]]*wgts[0] + src_array[src_add[1]]*wgts[1] + src_array[src_add[2]]*wgts[2] + src_array[src_add[3]]*wgts[3];
+}
+
+/*
+  -----------------------------------------------------------------------
+
+  This routine computes the weights for a bilinear interpolation.
+
+  -----------------------------------------------------------------------
+*/
+void scrip_remap_weights_bilinear(remapgrid_t* src_grid, remapgrid_t* tgt_grid, remapvars_t* rv)
+{
+  /*   Local variables */
+  int  search_result;
+  long tgt_grid_size;
+  long dst_add;                  /*  destination addresss                   */
+  int src_add[4];                /*  address for the four source points     */
+  double src_lats[4];            /*  latitudes  of four bilinear corners    */
+  double src_lons[4];            /*  longitudes of four bilinear corners    */
+  double wgts[4];                /*  bilinear weights for four corners      */
+  double plat, plon;             /*  lat/lon coords of destination point    */
+  double findex = 0;
+  extern int timer_remap_bil;
+  int remap_grid_type = src_grid->remap_grid_type;
+
+  if ( cdoVerbose ) cdoPrint("Called %s()", __func__);
+
+  if ( cdoTimer ) timer_start(timer_remap_bil);
+
+  progressInit();
+
+  tgt_grid_size = tgt_grid->size;
+
+  /* Compute mappings from source to target grid */
+
+  if ( src_grid->rank != 2 )
+    cdoAbort("Can not do bilinear interpolation when source grid rank != 2"); 
+
+  /* Loop over destination grid */
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, cdoVerbose, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, findex) \
+  private(dst_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result)    \
+  schedule(static)
+#endif
+  /* grid_loop1 */
+  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
+    {
+      int lprogress = 1;
+#if defined(_OPENMP)
+      if ( omp_get_thread_num() != 0 ) lprogress = 0;
+#endif
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+      findex++;
+      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
+
+      if ( ! tgt_grid->mask[dst_add] ) continue;
+
+      plat = tgt_grid->cell_center_lat[dst_add];
+      plon = tgt_grid->cell_center_lon[dst_add];
+
+      /* Find nearest square of grid points on source grid  */
+      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	search_result = grid_search_reg2d(src_grid, src_add, src_lats, src_lons, 
+					  plat, plon, src_grid->dims,
+					  src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
+      else
+	search_result = grid_search(src_grid, src_add, src_lats, src_lons, 
+				    plat, plon, src_grid->dims,
+				    src_grid->cell_center_lat, src_grid->cell_center_lon,
+				    src_grid->cell_bound_box, src_grid->bin_addr);
+
+      /* Check to see if points are land points */
+      if ( search_result > 0 )
+	{
+	  for ( int n = 0; n < 4; ++n )
+	    if ( ! src_grid->mask[src_add[n]] ) search_result = 0;
+	}
+
+      /* If point found, find local iw,jw coordinates for weights  */
+      if ( search_result > 0 )
+	{
+	  double iw, jw;  /*  current guess for bilinear coordinate  */
+
+          tgt_grid->cell_frac[dst_add] = 1.;
+
+          if ( find_ij_weights(plon, plat, src_lats, src_lons, &iw, &jw) )
+	    {
+	      /* Successfully found iw,jw - compute weights */
+	      set_bilinear_weights(iw, jw, wgts);
+
+	      sort_bilinear_adds(src_add, wgts);
+
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+	      store_link_bilin(rv, dst_add, src_add, wgts);
+	    }
+          else
+	    {
+	      bilinear_warning(plon, plat, iw, jw, src_add, src_lons, src_lats, src_grid);
+
+	      search_result = -1;
+	    }
+	}
+
+      /*
+	Search for bilinear failed - use a distance-weighted average instead (this is typically near the pole)
+	Distance was stored in src_lats!
+      */
+      if ( search_result < 0 )
+	{
+          if ( num_src_points(src_grid->mask, src_add, src_lats) > 0 )
+	    {
+	      renormalize_weights(src_lats, wgts);
+
+	      tgt_grid->cell_frac[dst_add] = 1.;
+
+	      sort_bilinear_adds(src_add, wgts);
+
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+	      store_link_bilin(rv, dst_add, src_add, wgts);
+	    }
+        }
+    } /* grid_loop1 */
+
+  if ( cdoTimer ) timer_stop(timer_remap_bil);
+} /* scrip_remap_weights_bilinear */
+
+/*
+  -----------------------------------------------------------------------
+
+  This routine computes and apply the weights for a bilinear interpolation.
+
+  -----------------------------------------------------------------------
+*/
+void scrip_remap_bilinear(remapgrid_t* src_grid, remapgrid_t* tgt_grid, const double* restrict src_array, double* restrict tgt_array, double missval)
+{
+  /*   Local variables */
+  int  search_result;
+  long tgt_grid_size;
+  long dst_add;                  /*  destination addresss */
+  int src_add[4];                /*  address for the four source points     */
+  double src_lats[4];            /*  latitudes  of four bilinear corners    */
+  double src_lons[4];            /*  longitudes of four bilinear corners    */
+  double wgts[4];                /*  bilinear weights for four corners      */
+  double plat, plon;             /*  lat/lon coords of destination point    */
+  double findex = 0;
+  extern int timer_remap_bil;
+  int remap_grid_type = src_grid->remap_grid_type;
+
+  if ( cdoVerbose ) cdoPrint("Called %s()", __func__);
+
+  if ( cdoTimer ) timer_start(timer_remap_bil);
+
+  progressInit();
+
+  tgt_grid_size = tgt_grid->size;
+
+  /* Compute mappings from source to target grid */
+
+  if ( src_grid->rank != 2 )
+    cdoAbort("Can not do bilinear interpolation when source grid rank != 2"); 
+
+  /* Loop over destination grid */
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, cdoVerbose, cdoSilentMode, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, src_array, tgt_array, missval, findex) \
+  private(dst_add, src_add, src_lats, src_lons, wgts, plat, plon, search_result)    \
+  schedule(static)
+#endif
+  /* grid_loop1 */
+  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
+    {
+      int lprogress = 1;
+#if defined(_OPENMP)
+      if ( omp_get_thread_num() != 0 ) lprogress = 0;
+#endif
+
+      if ( !cdoSilentMode )
+	{
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+	  findex++;
+	  if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
+	}
+
+      tgt_array[dst_add] = missval;
+
+      if ( ! tgt_grid->mask[dst_add] ) continue;
+
+      plat = tgt_grid->cell_center_lat[dst_add];
+      plon = tgt_grid->cell_center_lon[dst_add];
+
+      /* Find nearest square of grid points on source grid  */
+      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	search_result = grid_search_reg2d(src_grid, src_add, src_lats, src_lons, 
+					  plat, plon, src_grid->dims,
+					  src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
+      else
+	search_result = grid_search(src_grid, src_add, src_lats, src_lons, 
+				    plat, plon, src_grid->dims,
+				    src_grid->cell_center_lat, src_grid->cell_center_lon,
+				    src_grid->cell_bound_box, src_grid->bin_addr);
+
+      /* Check to see if points are land points */
+      if ( search_result > 0 )
+	{
+	  for ( int n = 0; n < 4; ++n )
+	    if ( ! src_grid->mask[src_add[n]] ) search_result = 0;
+	}
+
+      /* If point found, find local iw,jw coordinates for weights  */
+      if ( search_result > 0 )
+	{
+	  double iw, jw;  /*  current guess for bilinear coordinate  */
+
+          tgt_grid->cell_frac[dst_add] = 1.;
+
+          if ( find_ij_weights(plon, plat, src_lats, src_lons, &iw, &jw) )
+	    {
+	      /* Successfully found iw,jw - compute weights */
+	      set_bilinear_weights(iw, jw, wgts);
+
+	      sort_bilinear_adds(src_add, wgts);
+
+	      bilinear_remap(&tgt_array[dst_add], src_array, wgts, src_add);
+	    }
+          else
+	    {
+	      bilinear_warning(plon, plat, iw, jw, src_add, src_lons, src_lats, src_grid);
+
+	      search_result = -1;
+	    }
+	}
+
+      /*
+	Search for bilinear failed - use a distance-weighted average instead (this is typically near the pole)
+	Distance was stored in src_lats!
+      */
+      if ( search_result < 0 )
+	{
+          if ( num_src_points(src_grid->mask, src_add, src_lats) > 0 )
+	    {
+	      renormalize_weights(src_lats, wgts);
+
+	      tgt_grid->cell_frac[dst_add] = 1.;
+
+	      sort_bilinear_adds(src_add, wgts);
+
+	      bilinear_remap(&tgt_array[dst_add], src_array, wgts, src_add);
+	    }
+        }
+    } /* grid_loop1 */
+
+  if ( cdoTimer ) timer_stop(timer_remap_bil);
+} /* scrip_remap_bilinear */
diff --git a/src/remap_conserv.c b/src/remap_conserv.c
new file mode 100644
index 0000000..6cb41c3
--- /dev/null
+++ b/src/remap_conserv.c
@@ -0,0 +1,945 @@
+#include "cdo.h"
+#include "cdo_int.h"
+#include "grid.h"
+#include "remap.h"
+#include "remap_store_link.h"
+
+
+/*
+    This routine stores the address and weight for this link in the appropriate 
+    address and weight arrays and resizes those arrays if necessary.
+*/
+static
+void store_link_conserv(remapvars_t* rv, long add1, long add2, long num_wts, double* weights)
+{
+  /*
+    Input variables:
+    int  add1         ! address on source grid
+    int  add2         ! address on target grid
+    double weights[]  ! array of remapping weights for this link
+  */
+  /* Local variables */
+  long nlink; /* link index */
+  long i;
+
+  /*  If all weights are ZERO, do not bother storing the link */
+
+  if ( num_wts == 3 )
+    {
+      if ( IS_EQUAL(weights[0], 0) && IS_EQUAL(weights[1], 0) && IS_EQUAL(weights[2], 0) ) return;
+    }
+  else
+    {
+      if ( IS_EQUAL(weights[0], 0) ) return;
+    }
+    
+  nlink = rv->num_links;
+
+  rv->num_links++;
+  if ( rv->num_links >= rv->max_links )
+    resize_remap_vars(rv, rv->resize_increment);
+
+  rv->src_grid_add[nlink] = add1;
+  rv->tgt_grid_add[nlink] = add2;
+
+  for ( i = 0; i < num_wts; ++i ) rv->wts[num_wts*nlink+i] = weights[i];	      
+
+}  /* store_link_conserv */
+
+
+
+int rect_grid_search2(long *imin, long *imax, double xmin, double xmax, long nxm, const double *restrict xm);
+
+static
+long get_srch_cells_reg2d(const int *restrict src_grid_dims, 
+			  const double *restrict src_corner_lat, const double *restrict src_corner_lon,
+			  const double *restrict tgt_cell_bound_box, int *srch_add)
+{
+  long nx = src_grid_dims[0];
+  long ny = src_grid_dims[1];
+  long num_srch_cells;  /* num cells in restricted search arrays   */
+  int lfound;
+  long nxp1, nyp1;
+  double src_lon_min, src_lon_max;
+  int debug = 0;
+
+  nxp1 = nx+1;
+  nyp1 = ny+1;
+
+  src_lon_min = src_corner_lon[0];
+  src_lon_max = src_corner_lon[nx];
+
+  double bound_lon1, bound_lon2;
+
+  num_srch_cells = 0;
+
+  long imin = nxp1, imax = -1, jmin = nyp1, jmax = -1;
+  long im, jm;
+
+  lfound = rect_grid_search2(&jmin, &jmax, tgt_cell_bound_box[0], tgt_cell_bound_box[1], nyp1, src_corner_lat);
+  // if ( jmin > 0 ) jmin--;
+  // if ( jmax < (ny-2) ) jmax++;
+  bound_lon1 = tgt_cell_bound_box[2];
+  bound_lon2 = tgt_cell_bound_box[3];
+  if ( bound_lon1 <= src_lon_max && bound_lon2 >= src_lon_min )
+    {
+      if ( debug ) printf("  b1 %g %g\n", bound_lon1*RAD2DEG, bound_lon2*RAD2DEG);
+      if ( bound_lon1 < src_lon_min && bound_lon2 > src_lon_min ) bound_lon1 = src_lon_min;
+      if ( bound_lon2 > src_lon_max && bound_lon1 < src_lon_max ) bound_lon2 = src_lon_max;
+      lfound = rect_grid_search2(&imin, &imax, bound_lon1, bound_lon2, nxp1, src_corner_lon);
+      if ( lfound )
+	{
+	  if ( debug )
+	    printf("   %g %g imin %ld  imax %ld  jmin %ld jmax %ld\n", RAD2DEG*src_corner_lon[imin], RAD2DEG*src_corner_lon[imax+1], imin, imax, jmin, jmax);
+	  for ( jm = jmin; jm <= jmax; ++jm )
+	    for ( im = imin; im <= imax; ++im )
+	      srch_add[num_srch_cells++] = jm*nx + im;
+	}
+    }
+
+  bound_lon1 = tgt_cell_bound_box[2];
+  bound_lon2 = tgt_cell_bound_box[3];
+  if ( bound_lon1 <= src_lon_min && bound_lon2 >= src_lon_min )
+    {
+      long imin2 = nxp1, imax2 = -1;
+      bound_lon1 += 2*M_PI;
+      bound_lon2 += 2*M_PI;
+      if ( debug ) printf("  b2 %g %g\n", bound_lon1*RAD2DEG, bound_lon2*RAD2DEG);
+      if ( bound_lon1 < src_lon_min && bound_lon2 > src_lon_min ) bound_lon1 = src_lon_min;
+      if ( bound_lon2 > src_lon_max && bound_lon1 < src_lon_max ) bound_lon2 = src_lon_max;
+      lfound = rect_grid_search2(&imin2, &imax2, bound_lon1, bound_lon2, nxp1, src_corner_lon);
+      if ( lfound )
+	{
+	  if ( imax != -1 && imin2 <= imax ) imin2 = imax+1;
+	  if ( imax != -1 && imax2 <= imax ) imax2 = imax+1;
+	  if ( imin2 >= 0 && imax2 < nxp1 )
+	    {
+	      if ( debug )
+		printf("   %g %g imin %ld  imax %ld  jmin %ld jmax %ld\n", RAD2DEG*src_corner_lon[imin2], RAD2DEG*src_corner_lon[imax2+1], imin2, imax2, jmin, jmax);
+	      for ( jm = jmin; jm <= jmax; ++jm )
+		for ( im = imin2; im <= imax2; ++im )
+		  srch_add[num_srch_cells++] = jm*nx + im;
+	    }
+	}
+    }
+
+  bound_lon1 = tgt_cell_bound_box[2];
+  bound_lon2 = tgt_cell_bound_box[3];
+  if ( bound_lon1 <= src_lon_max && bound_lon2 >= src_lon_max )
+    {
+      long imin3 = nxp1, imax3 = -1;
+      bound_lon1 -= 2*M_PI;
+      bound_lon2 -= 2*M_PI;
+      if ( debug ) printf("  b3 %g %g\n", bound_lon1*RAD2DEG, bound_lon2*RAD2DEG);
+      if ( bound_lon1 < src_lon_min && bound_lon2 > src_lon_min ) bound_lon1 = src_lon_min;
+      if ( bound_lon2 > src_lon_max && bound_lon1 < src_lon_max ) bound_lon2 = src_lon_max;
+      lfound = rect_grid_search2(&imin3, &imax3, bound_lon1, bound_lon2, nxp1, src_corner_lon);
+      if ( lfound )
+	{
+	  if ( imin != nxp1 && imin3 >= imin ) imin3 = imin-1;
+	  if ( imax != nxp1 && imax3 >= imin ) imax3 = imin-1;
+	  if ( imin3 >= 0 && imin3 < nxp1 )
+	    {
+	      if ( debug )
+		printf("   %g %g imin %ld  imax %ld  jmin %ld jmax %ld\n", RAD2DEG*src_corner_lon[imin3], RAD2DEG*src_corner_lon[imax3+1], imin3, imax3, jmin, jmax);
+	      for ( jm = jmin; jm <= jmax; ++jm )
+		for ( im = imin3; im <= imax3; ++im )
+		  srch_add[num_srch_cells++] = jm*nx + im;
+	    }
+	}
+    }
+
+  if ( debug ) printf(" -> num_srch_cells: %ld\n", num_srch_cells);
+
+  return (num_srch_cells);
+}
+
+static
+void restrict_boundbox(const double *restrict grid_bound_box, double *restrict bound_box)
+{
+  if ( bound_box[0] < grid_bound_box[0] && bound_box[1] > grid_bound_box[0] ) bound_box[0] = grid_bound_box[0];
+  if ( bound_box[1] > grid_bound_box[1] && bound_box[0] < grid_bound_box[1] ) bound_box[1] = grid_bound_box[1];
+
+  if ( bound_box[2] >= grid_bound_box[3] && (bound_box[3]-2*M_PI) > grid_bound_box[2] ) { bound_box[2] -= 2*M_PI; bound_box[3] -= 2*M_PI; }
+  if ( bound_box[3] <= grid_bound_box[2] && (bound_box[2]-2*M_PI) < grid_bound_box[3] ) { bound_box[2] += 2*M_PI; bound_box[3] += 2*M_PI; }
+  //  if ( bound_box[2] < grid_bound_box[2] && bound_box[3] > grid_bound_box[2] ) bound_box[2] = grid_bound_box[2];
+  //  if ( bound_box[3] > grid_bound_box[3] && bound_box[2] < grid_bound_box[3] ) bound_box[3] = grid_bound_box[3];
+}
+
+static
+void boundbox_from_corners_reg2d(long grid_add, const int *restrict grid_dims, const double *restrict corner_lon,
+				 const double *restrict corner_lat, double *restrict bound_box)
+{
+  long nx = grid_dims[0];
+  long ix, iy;
+  double clat1, clat2;
+
+  iy = grid_add/nx;
+  ix = grid_add - iy*nx;
+
+  clat1 = corner_lat[iy  ];
+  clat2 = corner_lat[iy+1];
+
+  if ( clat2 > clat1 )
+    {
+      bound_box[0] = clat1;
+      bound_box[1] = clat2;
+    }
+  else
+    {
+      bound_box[0] = clat2;
+      bound_box[1] = clat1;
+    }
+
+  bound_box[2] = corner_lon[ix  ];
+  bound_box[3] = corner_lon[ix+1];
+}
+
+static
+void boundbox_from_corners1(long ic, long nc, const double *restrict corner_lon,
+			    const double *restrict corner_lat, double *restrict bound_box)
+{
+  long inc, j;
+  double clon, clat;
+
+  inc = ic*nc;
+
+  clat = corner_lat[inc];
+  clon = corner_lon[inc];
+
+  bound_box[0] = clat;
+  bound_box[1] = clat;
+  bound_box[2] = clon;
+  bound_box[3] = clon;
+
+  for ( j = 1; j < nc; ++j )
+    {
+      clat = corner_lat[inc+j];
+      clon = corner_lon[inc+j];
+
+      if ( clat < bound_box[0] ) bound_box[0] = clat;
+      if ( clat > bound_box[1] ) bound_box[1] = clat;
+      if ( clon < bound_box[2] ) bound_box[2] = clon;
+      if ( clon > bound_box[3] ) bound_box[3] = clon;
+    }
+
+  if ( fabs(bound_box[3] - bound_box[2]) > PI )
+    {
+      bound_box[2] = 0;
+      bound_box[3] = PI2;
+    }
+
+  /*
+  double dlon = fabs(bound_box[3] - bound_box[2]);
+
+  if ( dlon > PI )
+    {
+      if ( bound_box[3] > bound_box[2] && (bound_box[3]-PI2) < 0. )
+	{
+	  double tmp = bound_box[2];
+	  bound_box[2] = bound_box[3] - PI2;
+	  bound_box[3] = tmp;
+	}
+      else
+	{
+	  bound_box[2] = 0;
+	  bound_box[3] = PI2;
+	}
+    }
+  */
+}
+
+static
+void boundbox_from_corners1r(long ic, long nc, const double *restrict corner_lon,
+			     const double *restrict corner_lat, restr_t *restrict bound_box)
+{
+  long inc, j;
+  restr_t clon, clat;
+
+  inc = ic*nc;
+
+  clat = RESTR_SCALE(corner_lat[inc]);
+  clon = RESTR_SCALE(corner_lon[inc]);
+
+  bound_box[0] = clat;
+  bound_box[1] = clat;
+  bound_box[2] = clon;
+  bound_box[3] = clon;
+
+  for ( j = 1; j < nc; ++j )
+    {
+      clat = RESTR_SCALE(corner_lat[inc+j]);
+      clon = RESTR_SCALE(corner_lon[inc+j]);
+
+      if ( clat < bound_box[0] ) bound_box[0] = clat;
+      if ( clat > bound_box[1] ) bound_box[1] = clat;
+      if ( clon < bound_box[2] ) bound_box[2] = clon;
+      if ( clon > bound_box[3] ) bound_box[3] = clon;
+    }
+
+  if ( fabs(bound_box[3] - bound_box[2]) > RESTR_SCALE(PI) )
+    {
+      bound_box[2] = 0;
+      bound_box[3] = RESTR_SCALE(PI2);
+    }
+  /*
+  if ( RESTR_ABS(bound_box[3] - bound_box[2]) > RESTR_SCALE(PI) )
+    {
+      if ( bound_box[3] > bound_box[2] && (bound_box[3]-RESTR_SCALE(PI2)) < RESTR_SCALE(0.) )
+	{
+	  restr_t tmp = bound_box[2];
+	  bound_box[2] = bound_box[3] - RESTR_SCALE(PI2);
+	  bound_box[3] = tmp;
+	}
+    }
+  */
+}
+
+//#if defined(HAVE_LIBYAC)
+#include "clipping/clipping.h"
+#include "clipping/area.h"
+#include "clipping/geometry.h"
+
+static
+void cdo_compute_overlap_areas(unsigned N,
+			       struct grid_cell *overlap_buffer,
+			       struct grid_cell *source_cells,
+			       struct grid_cell  target_cell,
+			       double *partial_areas)
+{
+  /* Do the clipping and get the cell for the overlapping area */
+
+  cell_clipping(N, source_cells, target_cell, overlap_buffer);
+
+  /* Get the partial areas for the overlapping regions */
+
+  for ( unsigned n = 0; n < N; n++ )
+    {
+      partial_areas[n] = huiliers_area(overlap_buffer[n]);
+    }
+
+#ifdef VERBOSE
+  for ( unsigned n = 0; n < N; n++ )
+    printf("overlap area : %lf\n", partial_areas[n]);
+#endif
+}
+//#endif
+
+static
+int get_lonlat_circle_index(remapgrid_t *remap_grid)
+{
+  int lonlat_circle_index = -1;
+
+  if ( remap_grid->num_cell_corners == 4 )
+    {
+      if ( remap_grid->remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	{
+	  lonlat_circle_index = 1;
+ 	}
+      else
+	{
+	  const double* cell_corner_lon = remap_grid->cell_corner_lon;
+	  const double* cell_corner_lat = remap_grid->cell_corner_lat;
+	  int gridsize = remap_grid->size;
+	  int num_i = 0, num_eq0 = 0, num_eq1 = 0;
+	  int iadd = gridsize/3-1;
+
+	  if ( iadd == 0 ) iadd++;
+
+	  for ( int i = 0; i < gridsize; i += iadd )
+	    {
+	      num_i++;
+
+	      if ( IS_EQUAL(cell_corner_lon[i*4+1], cell_corner_lon[i*4+2]) &&
+		   IS_EQUAL(cell_corner_lon[i*4+3], cell_corner_lon[i*4+0]) &&
+		   IS_EQUAL(cell_corner_lat[i*4+0], cell_corner_lat[i*4+1]) &&
+		   IS_EQUAL(cell_corner_lat[i*4+2], cell_corner_lat[i*4+3]) )
+		{  
+		  num_eq1++;
+		}
+	      else if ( IS_EQUAL(cell_corner_lon[i*4+0], cell_corner_lon[i*4+1]) &&
+			IS_EQUAL(cell_corner_lon[i*4+2], cell_corner_lon[i*4+3]) &&
+			IS_EQUAL(cell_corner_lat[i*4+1], cell_corner_lat[i*4+2]) &&
+			IS_EQUAL(cell_corner_lat[i*4+3], cell_corner_lat[i*4+0]) )
+		{
+		  num_eq0++;
+		}
+	    }
+
+	  if ( num_i == num_eq1 ) lonlat_circle_index = 1;
+	  if ( num_i == num_eq0 ) lonlat_circle_index = 0;	      
+	}
+    }
+
+  //printf("lonlat_circle_index %d\n", lonlat_circle_index);
+
+  return(lonlat_circle_index);
+}
+
+
+void remap_weights_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
+{
+  /* local variables */
+
+  int    lcheck = TRUE;
+
+  long   ioffset;
+  long   src_grid_size;
+  long   tgt_grid_size;
+  long   src_num_cell_corners;
+  long   tgt_num_cell_corners;
+  long   src_grid_add;       /* current linear address for source grid cell   */
+  long   tgt_grid_add;       /* current linear address for target grid cell   */
+  long   n, k;               /* generic counters                        */
+  long   nbins, num_links;
+  long   num_wts;
+  long   max_srch_cells;     /* num cells in restricted search arrays  */
+  long   num_srch_cells;     /* num cells in restricted search arrays  */
+  long   srch_corners;       /* num of corners of srch cells           */
+  double norm_factor = 0;    /* factor for normalizing wts */
+  int*   srch_add;           /* global address of cells in srch arrays */
+  int    ompthID, i;
+
+  /* Variables necessary if segment manages to hit pole */
+  double findex = 0;
+  long num_weights = 0;
+  long nx = 0, ny = 0;
+  int src_remap_grid_type = src_grid->remap_grid_type;
+  int tgt_remap_grid_type = tgt_grid->remap_grid_type;
+  double src_grid_bound_box[4];
+  int lyac = FALSE;
+  extern int timer_remap_con;
+
+  if ( cdoVerbose ) cdoPrint("Called %s()", __func__);
+
+  progressInit();
+
+  nbins = src_grid->num_srch_bins;
+  num_wts = rv->num_wts;
+
+  if ( cdoTimer ) timer_start(timer_remap_con);
+
+  src_grid_size = src_grid->size;
+  tgt_grid_size = tgt_grid->size;
+
+  src_num_cell_corners = src_grid->num_cell_corners;
+  tgt_num_cell_corners = tgt_grid->num_cell_corners;
+
+  enum edge_type great_circle_type[] = {GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE};
+  enum edge_type lonlat_circle_type[] = {LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE};
+
+  enum edge_type *src_edge_type = great_circle_type;
+  enum edge_type *tgt_edge_type = great_circle_type;
+
+  if ( src_num_cell_corners == 4 )
+    {
+      int lonlat_circle_index = get_lonlat_circle_index(src_grid);
+      if ( lonlat_circle_index >= 0 ) src_edge_type = &lonlat_circle_type[lonlat_circle_index];
+    }
+
+  if ( tgt_num_cell_corners == 4 )
+    {
+      int lonlat_circle_index = get_lonlat_circle_index(tgt_grid);
+      if ( lonlat_circle_index >= 0 ) tgt_edge_type = &lonlat_circle_type[lonlat_circle_index];
+    }
+
+  double tgt_area;
+
+  struct grid_cell* tgt_grid_cell;
+  struct grid_cell* tgt_grid_cell2[ompNumThreads];  
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      tgt_grid_cell2[i] = (struct grid_cell*) malloc(sizeof(struct grid_cell));
+      tgt_grid_cell2[i]->array_size      = tgt_num_cell_corners;
+      tgt_grid_cell2[i]->num_corners     = tgt_num_cell_corners;
+      tgt_grid_cell2[i]->edge_type       = tgt_edge_type;
+      tgt_grid_cell2[i]->coordinates_x   = (double*) malloc(tgt_num_cell_corners*sizeof(double));
+      tgt_grid_cell2[i]->coordinates_y   = (double*) malloc(tgt_num_cell_corners*sizeof(double));
+      tgt_grid_cell2[i]->coordinates_xyz = (double*) malloc(3*tgt_num_cell_corners*sizeof(double));
+    }
+
+  struct grid_cell* src_grid_cells;
+  struct grid_cell* overlap_buffer;
+  struct grid_cell* src_grid_cells2[ompNumThreads];
+  struct grid_cell* overlap_buffer2[ompNumThreads];
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      src_grid_cells2[i] = NULL;
+      overlap_buffer2[i] = NULL;
+    }
+
+  double* partial_areas;
+  double* partial_weights;
+  double* partial_areas2[ompNumThreads];
+  double* partial_weights2[ompNumThreads];
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      partial_areas2[i]   = NULL;
+      partial_weights2[i] = NULL;
+    }
+
+  long max_srch_cells2[ompNumThreads];
+  for ( i = 0; i < ompNumThreads; ++i )
+    max_srch_cells2[i] = 0;
+
+  int* srch_add2[ompNumThreads];
+  for ( i = 0; i < ompNumThreads; ++i )
+    srch_add2[i] = (int*) malloc(src_grid_size*sizeof(int));
+
+  srch_corners = src_num_cell_corners;
+
+  if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D )
+    {
+      nx = src_grid->dims[0];
+      ny = src_grid->dims[1];
+     
+      src_grid_bound_box[0] = src_grid->reg2d_corner_lat[0];
+      src_grid_bound_box[1] = src_grid->reg2d_corner_lat[ny];
+      if ( src_grid_bound_box[0] > src_grid_bound_box[1] )
+	{
+	  src_grid_bound_box[0] = src_grid->reg2d_corner_lat[ny];
+	  src_grid_bound_box[1] = src_grid->reg2d_corner_lat[0];
+	}
+      src_grid_bound_box[2] = src_grid->reg2d_corner_lon[0];
+      src_grid_bound_box[3] = src_grid->reg2d_corner_lon[nx];
+      //printf("src_grid   lon: %g %g lat: %g %g\n", RAD2DEG*src_grid_bound_box[2],RAD2DEG*src_grid_bound_box[3],RAD2DEG*src_grid_bound_box[0],RAD2DEG*src_grid_bound_box[1] );
+    }
+
+  findex = 0;
+
+  int sum_srch_cells = 0;
+  int sum_srch_cells2 = 0;
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, lyac, nbins, num_wts, nx, src_remap_grid_type, tgt_remap_grid_type, src_grid_bound_box,	\
+	 src_edge_type, tgt_edge_type, partial_areas2, partial_weights2,  \
+         rv, cdoVerbose, max_srch_cells2, \
+	 tgt_num_cell_corners, srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, \
+	 overlap_buffer2, src_grid_cells2, srch_add2, tgt_grid_cell2, findex, sum_srch_cells, sum_srch_cells2) \
+  private(ompthID, srch_add, tgt_grid_cell, tgt_area, n, k, num_weights, num_srch_cells, max_srch_cells,  \
+	  partial_areas, partial_weights, overlap_buffer, src_grid_cells, src_grid_add, tgt_grid_add, ioffset)
+#endif
+  for ( tgt_grid_add = 0; tgt_grid_add < tgt_grid_size; ++tgt_grid_add )
+    {
+#if defined(_OPENMP)
+      ompthID = omp_get_thread_num();
+#else
+      ompthID = 0;
+#endif
+
+      int lprogress = 1;
+      if ( ompthID != 0 ) lprogress = 0;
+
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+      findex++;
+      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
+
+      srch_add = srch_add2[ompthID];
+      tgt_grid_cell = tgt_grid_cell2[ompthID];
+
+      /* Get search cells */
+
+      if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D && tgt_remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	{
+	  double tgt_cell_bound_box[4];
+	  boundbox_from_corners_reg2d(tgt_grid_add, tgt_grid->dims, tgt_grid->reg2d_corner_lon, tgt_grid->reg2d_corner_lat, tgt_cell_bound_box);
+	  restrict_boundbox(src_grid_bound_box, tgt_cell_bound_box);
+	  if ( cdoVerbose )
+	    printf("bound_box %ld  lon: %g %g lat: %g %g\n",
+		   tgt_grid_add, RAD2DEG*tgt_cell_bound_box[2],RAD2DEG*tgt_cell_bound_box[3],RAD2DEG*tgt_cell_bound_box[0],RAD2DEG*tgt_cell_bound_box[1] );
+	  num_srch_cells = get_srch_cells_reg2d(src_grid->dims, src_grid->reg2d_corner_lat, src_grid->reg2d_corner_lon,
+						tgt_cell_bound_box, srch_add);
+	}
+      else if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	{
+	  double tgt_cell_bound_box[4];
+	  boundbox_from_corners1(tgt_grid_add, tgt_num_cell_corners, tgt_grid->cell_corner_lon, tgt_grid->cell_corner_lat, tgt_cell_bound_box);
+	  restrict_boundbox(src_grid_bound_box, tgt_cell_bound_box);
+	  if ( cdoVerbose )
+	    printf("bound_box %ld  lon: %g %g lat: %g %g\n",
+		   tgt_grid_add, RAD2DEG*tgt_cell_bound_box[2],RAD2DEG*tgt_cell_bound_box[3],RAD2DEG*tgt_cell_bound_box[0],RAD2DEG*tgt_cell_bound_box[1] );
+	  num_srch_cells = get_srch_cells_reg2d(src_grid->dims, src_grid->reg2d_corner_lat, src_grid->reg2d_corner_lon,
+						tgt_cell_bound_box, srch_add);
+	}
+      else
+	{
+	  restr_t tgt_cell_bound_box_r[4];
+	  boundbox_from_corners1r(tgt_grid_add, tgt_num_cell_corners, tgt_grid->cell_corner_lon, tgt_grid->cell_corner_lat, tgt_cell_bound_box_r);
+
+	  num_srch_cells = get_srch_cells(tgt_grid_add, nbins, tgt_grid->bin_addr, src_grid->bin_addr,
+					  tgt_cell_bound_box_r, src_grid->cell_bound_box, src_grid_size, srch_add);
+	}
+
+      sum_srch_cells += num_srch_cells;
+
+      if ( cdoVerbose )
+	printf("tgt_grid_add %ld  num_srch_cells %ld\n", tgt_grid_add, num_srch_cells);
+
+      if ( num_srch_cells == 0 ) continue;
+
+      if ( tgt_remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	{
+	  long nx = tgt_grid->dims[0];
+	  long ix, iy;
+
+	  iy = tgt_grid_add/nx;
+	  ix = tgt_grid_add - iy*nx;
+
+	  tgt_grid_cell->coordinates_x[0] = tgt_grid->reg2d_corner_lon[ix  ];
+	  tgt_grid_cell->coordinates_y[0] = tgt_grid->reg2d_corner_lat[iy  ];
+	  tgt_grid_cell->coordinates_x[1] = tgt_grid->reg2d_corner_lon[ix+1];
+	  tgt_grid_cell->coordinates_y[1] = tgt_grid->reg2d_corner_lat[iy  ];
+	  tgt_grid_cell->coordinates_x[2] = tgt_grid->reg2d_corner_lon[ix+1];
+	  tgt_grid_cell->coordinates_y[2] = tgt_grid->reg2d_corner_lat[iy+1];
+	  tgt_grid_cell->coordinates_x[3] = tgt_grid->reg2d_corner_lon[ix  ];
+	  tgt_grid_cell->coordinates_y[3] = tgt_grid->reg2d_corner_lat[iy+1];
+	}
+      else
+	{
+	  for ( int ic = 0; ic < tgt_num_cell_corners; ++ic )
+	    {
+	      tgt_grid_cell->coordinates_x[ic] = tgt_grid->cell_corner_lon[tgt_grid_add*tgt_num_cell_corners+ic];
+	      tgt_grid_cell->coordinates_y[ic] = tgt_grid->cell_corner_lat[tgt_grid_add*tgt_num_cell_corners+ic];
+	    }
+	}
+      
+      for ( int ic = 0; ic < tgt_num_cell_corners; ++ic )
+	LLtoXYZ(tgt_grid_cell->coordinates_x[ic], tgt_grid_cell->coordinates_y[ic], tgt_grid_cell->coordinates_xyz+ic*3);
+
+      //printf("target: %ld\n", tgt_grid_add);
+      if ( lyac )
+        if ( tgt_grid_add == 174752 )
+	  {
+	    for ( int n = 0; n < tgt_num_cell_corners; ++n )
+	      {
+		printf("  TargetCell.coordinates_x[%d] = %g*rad;\n", n, tgt_grid_cell->coordinates_x[n]/DEG2RAD);
+		printf("  TargetCell.coordinates_y[%d] = %g*rad;\n", n, tgt_grid_cell->coordinates_y[n]/DEG2RAD);
+	      }
+	    /*
+	    printf("> -Z1\n");
+	    for ( int n = 0; n < tgt_num_cell_corners; ++n )
+		printf("  %g %g\n", tgt_grid_cell->coordinates_x[n]/DEG2RAD, tgt_grid_cell->coordinates_y[n]/DEG2RAD);
+	      printf("  %g %g\n", tgt_grid_cell->coordinates_x[0]/DEG2RAD, tgt_grid_cell->coordinates_y[0]/DEG2RAD);
+	    */
+	  }
+      
+      /* Create search arrays */
+
+      max_srch_cells  = max_srch_cells2[ompthID];
+      partial_areas   = partial_areas2[ompthID];
+      partial_weights = partial_weights2[ompthID];
+      overlap_buffer  = overlap_buffer2[ompthID];
+      src_grid_cells  = src_grid_cells2[ompthID];
+
+      if ( num_srch_cells > max_srch_cells )
+	{
+	  partial_areas   = (double*) realloc(partial_areas,   num_srch_cells*sizeof(double));
+	  partial_weights = (double*) realloc(partial_weights, num_srch_cells*sizeof(double));
+
+	  overlap_buffer = (struct grid_cell*) realloc(overlap_buffer, num_srch_cells*sizeof(struct grid_cell));
+	  src_grid_cells = (struct grid_cell*) realloc(src_grid_cells, num_srch_cells*sizeof(struct grid_cell));
+
+	  for ( n = max_srch_cells; n < num_srch_cells; ++n )
+	    {
+	      overlap_buffer[n].array_size      = 0;
+	      overlap_buffer[n].num_corners     = 0;
+	      overlap_buffer[n].edge_type       = NULL;
+	      overlap_buffer[n].coordinates_x   = NULL;
+	      overlap_buffer[n].coordinates_y   = NULL;
+	      overlap_buffer[n].coordinates_xyz = NULL;
+	    }
+
+	  for ( n = max_srch_cells; n < num_srch_cells; ++n )
+	    {
+	      src_grid_cells[n].array_size      = srch_corners;
+	      src_grid_cells[n].num_corners     = srch_corners;
+	      src_grid_cells[n].edge_type       = src_edge_type;
+	      src_grid_cells[n].coordinates_x   = (double*) malloc(srch_corners*sizeof(double));
+	      src_grid_cells[n].coordinates_y   = (double*) malloc(srch_corners*sizeof(double));
+	      src_grid_cells[n].coordinates_xyz = (double*) malloc(3*srch_corners*sizeof(double));
+	    }
+
+	  max_srch_cells = num_srch_cells;
+
+	  max_srch_cells2[ompthID]  = max_srch_cells;
+	  partial_areas2[ompthID]   = partial_areas;
+	  partial_weights2[ompthID] = partial_weights;
+	  overlap_buffer2[ompthID]  = overlap_buffer;
+	  src_grid_cells2[ompthID]  = src_grid_cells;
+	}
+
+      // printf("  int ii = 0;\n");
+      for ( n = 0; n < num_srch_cells; ++n )
+	{
+	  src_grid_add = srch_add[n];
+
+	  if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	    {
+	      int ix, iy;
+
+	      iy = src_grid_add/nx;
+	      ix = src_grid_add - iy*nx;
+
+	      src_grid_cells[n].coordinates_x[0] = src_grid->reg2d_corner_lon[ix  ];
+	      src_grid_cells[n].coordinates_y[0] = src_grid->reg2d_corner_lat[iy  ];
+	      src_grid_cells[n].coordinates_x[1] = src_grid->reg2d_corner_lon[ix+1];
+	      src_grid_cells[n].coordinates_y[1] = src_grid->reg2d_corner_lat[iy  ];
+	      src_grid_cells[n].coordinates_x[2] = src_grid->reg2d_corner_lon[ix+1];
+	      src_grid_cells[n].coordinates_y[2] = src_grid->reg2d_corner_lat[iy+1];
+	      src_grid_cells[n].coordinates_x[3] = src_grid->reg2d_corner_lon[ix  ];
+	      src_grid_cells[n].coordinates_y[3] = src_grid->reg2d_corner_lat[iy+1];
+	      /*
+	      printf("source1: %ld %ld", num_srch_cells, n);
+	      for ( k = 0; k < srch_corners; ++k )
+		printf(" %g %g", src_grid_cells[n].coordinates_x[k]/DEG2RAD, src_grid_cells[n].coordinates_y[k]/DEG2RAD);
+	      printf("\n");
+	      */
+	    }
+	  else
+	    {
+	      ioffset = src_grid_add*srch_corners;
+
+	      for ( k = 0; k < srch_corners; ++k )
+		{
+		  src_grid_cells[n].coordinates_x[k] = src_grid->cell_corner_lon[ioffset+k];
+		  src_grid_cells[n].coordinates_y[k] = src_grid->cell_corner_lat[ioffset+k];
+		}
+	      /*
+	      printf("source2: %ld %ld", num_srch_cells, n);
+	      for ( k = 0; k < srch_corners; ++k )
+		printf(" %g %g", src_grid_cells[n].coordinates_x[k]/DEG2RAD, src_grid_cells[n].coordinates_y[k]/DEG2RAD);
+	      printf("\n");
+	      */
+	    }
+
+	  for ( int ic = 0; ic < srch_corners; ++ic )
+	    LLtoXYZ(src_grid_cells[n].coordinates_x[ic], src_grid_cells[n].coordinates_y[ic], src_grid_cells[n].coordinates_xyz+ic*3);
+
+	  if ( lyac )
+	    if ( tgt_grid_add == 174752 )
+	    {
+	      // printf("n %d\n", (int)n);
+	      for ( k = 0; k < srch_corners; ++k )
+		{
+		  printf("  SourceCell[ii].coordinates_x[%ld] = %g*rad;\n", k, src_grid_cells[n].coordinates_x[k]/DEG2RAD);
+		  printf("  SourceCell[ii].coordinates_y[%ld] = %g*rad;\n", k, src_grid_cells[n].coordinates_y[k]/DEG2RAD);
+		}
+	      printf("  ii++;\n");
+	      /*
+	      printf("> -Z1\n");
+	      for ( k = 0; k < srch_corners; ++k )
+		printf("  %g %g\n", src_grid_cells[n].coordinates_x[k]/DEG2RAD, src_grid_cells[n].coordinates_y[k]/DEG2RAD);
+	      printf("  %g %g\n", src_grid_cells[n].coordinates_x[0]/DEG2RAD, src_grid_cells[n].coordinates_y[0]/DEG2RAD);
+	      */
+	    }
+	}
+
+      cdo_compute_overlap_areas(num_srch_cells, overlap_buffer, src_grid_cells, *tgt_grid_cell, partial_areas);
+
+      tgt_area = huiliers_area(*tgt_grid_cell);
+      // tgt_area = cell_area(tgt_grid_cell);
+
+      for ( num_weights = 0, n = 0; n < num_srch_cells; ++n )
+	{
+	  if ( partial_areas[n] > 0 )
+	    {
+	      //printf(">>>>   %d %d %g %g\n", (int)tgt_grid_add, srch_add[n], tgt_area, partial_areas[n]);
+	      partial_areas[num_weights] = partial_areas[n];
+	      srch_add[num_weights] = srch_add[n];
+	      num_weights++;
+	    }
+	}
+
+      sum_srch_cells2 += num_weights;
+
+      for ( n = 0; n < num_weights; ++n )
+	partial_weights[n] = partial_areas[n] / tgt_area;
+
+      correct_weights(num_weights, partial_weights);
+      //#endif
+
+      for ( n = 0; n < num_weights; ++n )
+	{
+	  src_grid_add = srch_add[n];
+
+	  if ( cdoVerbose )
+	    printf("tgt_grid_add %ld, src_grid_add %ld,  partial_weights[n] %g, tgt_area  %g\n", tgt_grid_add, src_grid_add, partial_weights[n], tgt_area);
+
+	  // src_grid_add = n;
+	  if ( partial_weights[n] <= 0. ) src_grid_add = -1;
+
+	  /*
+	    Store the appropriate addresses and weights. 
+	    Also add contributions to cell areas.
+	    The source grid mask is the master mask
+	  */
+	  if ( src_grid_add != -1 )
+	    {
+	      if ( src_grid->mask[src_grid_add] )
+		{
+
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+		  {
+		    store_link_conserv(rv, src_grid_add, tgt_grid_add, num_wts, &partial_weights[n]);
+
+		    src_grid->cell_frac[src_grid_add] += partial_weights[n];
+		  }
+		  tgt_grid->cell_frac[tgt_grid_add] += partial_weights[n];
+		}
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+	      {
+		src_grid->cell_area[src_grid_add] += partial_weights[n];
+	      }
+	    }
+
+	  tgt_grid->cell_area[tgt_grid_add] += partial_weights[n];
+	}
+      // printf("area %d %g %g\n", tgt_grid_add, tgt_grid->cell_area[tgt_grid_add], tgt_area);
+    }
+
+  if ( cdoVerbose )
+    {
+      printf("sum_srch_cells : %d\n", sum_srch_cells);
+      printf("sum_srch_cells2: %d\n", sum_srch_cells2);
+    }
+
+  /* Finished with all cells: deallocate search arrays */
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      for ( n = 0; n < max_srch_cells2[i]; n++ )
+	{
+	  if ( overlap_buffer2[i][n].array_size > 0 )
+	    {
+	      free(overlap_buffer2[i][n].coordinates_x);
+	      free(overlap_buffer2[i][n].coordinates_y);
+	      if ( overlap_buffer2[i][n].coordinates_xyz ) free(overlap_buffer2[i][n].coordinates_xyz);
+	    }
+	}
+      for ( n = 0; n < max_srch_cells2[i]; n++ )
+	{
+	  free(src_grid_cells2[i][n].coordinates_x);
+	  free(src_grid_cells2[i][n].coordinates_y);
+	  free(src_grid_cells2[i][n].coordinates_xyz);
+	}
+      free(src_grid_cells2[i]);
+      free(overlap_buffer2[i]);
+
+      free(partial_areas2[i]);
+      free(partial_weights2[i]);
+
+      free(tgt_grid_cell2[i]->coordinates_x);
+      free(tgt_grid_cell2[i]->coordinates_y);
+      free(tgt_grid_cell2[i]->coordinates_xyz);
+      free(tgt_grid_cell2[i]);
+
+      free(srch_add2[i]);
+    }
+
+  /* Normalize using destination area if requested */
+
+  num_links = rv->num_links;
+
+  if ( rv->norm_opt == NORM_OPT_DESTAREA )
+    {
+#if defined(SX)
+#pragma vdir nodep
+#endif
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(num_wts, num_links, rv, tgt_grid)	\
+  private(n, tgt_grid_add, norm_factor)
+#endif
+      for ( n = 0; n < num_links; ++n )
+	{
+	  tgt_grid_add = rv->tgt_grid_add[n];
+
+          if ( IS_NOT_EQUAL(tgt_grid->cell_area[tgt_grid_add], 0) )
+	    norm_factor = ONE/tgt_grid->cell_area[tgt_grid_add];
+          else
+            norm_factor = ZERO;
+
+	  rv->wts[n*num_wts] *= norm_factor;
+	}
+    }
+  else if ( rv->norm_opt == NORM_OPT_FRACAREA )
+    {
+#if defined(SX)
+#pragma vdir nodep
+#endif
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(num_wts, num_links, rv, tgt_grid)	\
+  private(n, tgt_grid_add, norm_factor)
+#endif
+      for ( n = 0; n < num_links; ++n )
+	{
+	  tgt_grid_add = rv->tgt_grid_add[n];
+
+          if ( IS_NOT_EQUAL(tgt_grid->cell_frac[tgt_grid_add], 0) )
+	    norm_factor = ONE/tgt_grid->cell_frac[tgt_grid_add];
+          else
+            norm_factor = ZERO;
+
+	  rv->wts[n*num_wts] *= norm_factor;
+	}
+    }
+  else if ( rv->norm_opt == NORM_OPT_NONE )
+    {
+    }
+
+  if ( cdoVerbose )
+    cdoPrint("Total number of links = %ld", rv->num_links);
+  
+  for ( n = 0; n < src_grid_size; ++n )
+    if ( IS_NOT_EQUAL(src_grid->cell_area[n], 0) ) src_grid->cell_frac[n] /= src_grid->cell_area[n];
+
+  for ( n = 0; n < tgt_grid_size; ++n )
+    if ( IS_NOT_EQUAL(tgt_grid->cell_area[n], 0) ) tgt_grid->cell_frac[n] /= tgt_grid->cell_area[n];
+
+  /* Perform some error checking on final weights  */
+
+  if ( lcheck )
+    {
+      for ( n = 0; n < src_grid_size; ++n )
+	{
+	  if ( src_grid->cell_area[n] < -.01 )
+	    cdoPrint("Source grid area error: %d %g", n, src_grid->cell_area[n]);
+	}
+
+      for ( n = 0; n < tgt_grid_size; ++n )
+	{
+	  if ( tgt_grid->cell_area[n] < -.01 )
+	    cdoPrint("Target grid area error: %d %g", n, tgt_grid->cell_area[n]);
+	}
+
+      for ( n = 0; n < num_links; ++n )
+	{
+	  src_grid_add = rv->src_grid_add[n];
+	  tgt_grid_add = rv->tgt_grid_add[n];
+
+	  if ( rv->wts[n*num_wts] < -0.01 )
+	    cdoPrint("Map weight < 0! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
+		     src_grid_add, tgt_grid_add, n, rv->wts[n*num_wts]);
+
+	  if ( rv->norm_opt != NORM_OPT_NONE && rv->wts[n*num_wts] > 1.01 )
+	    cdoPrint("Map weight > 1! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
+		     src_grid_add, tgt_grid_add, n, rv->wts[n*num_wts]);
+	}
+    } // lcheck
+
+  if ( cdoTimer ) timer_stop(timer_remap_con);
+
+} /* remap_weights_conserv */
+
+
+void remap_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const double* restrict src_array, double* restrict tgt_array, double missval)
+{
+} /* remap_conserv */
diff --git a/src/remap_conserv_scrip.c b/src/remap_conserv_scrip.c
new file mode 100644
index 0000000..1802932
--- /dev/null
+++ b/src/remap_conserv_scrip.c
@@ -0,0 +1,1945 @@
+#if defined(HAVE_CONFIG_H)
+#  include "config.h"
+#endif
+
+#include <limits.h>
+#include <time.h>
+
+#include <cdi.h>
+#include "cdo.h"
+#include "cdo_int.h"
+#include "grid.h"
+#include "remap.h"
+#include "remap_store_link.h"
+#include "util.h"  /* progressStatus */
+
+/* #define  BABY_STEP  0.001 */ /* original value */
+#define  BABY_STEP  0.001
+
+/* static double north_thresh =  1.45;  */ /* threshold for coord transformation */
+/* static double south_thresh = -2.00;  */ /* threshold for coord transformation */
+static double north_thresh =  2.00;  /* threshold for coord transformation */
+static double south_thresh = -2.00;  /* threshold for coord transformation */
+
+/* threshold for coord transformation */
+void remap_set_threshhold(double threshhold)
+{
+  north_thresh =  threshhold;
+  south_thresh = -threshhold;  
+
+  if ( cdoVerbose ) cdoPrint("threshhold: north=%g  south=%g", north_thresh, south_thresh);
+}
+
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/*                                                                         */
+/*      CONSERVATIVE INTERPOLATION                                         */
+/*                                                                         */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+/*
+    This routine is identical to the intersection routine except
+    that a coordinate transformation (using a Lambert azimuthal
+    equivalent projection) is performed to treat polar cells more
+    accurately.
+*/
+static
+void pole_intersection(long *location, double *intrsct_lat, double *intrsct_lon, int *lcoinc,
+		       int *lthresh, double beglat, double beglon, double endlat, double endlon,
+		       double *begseg, int lrevers,
+		       long num_srch_cells, long srch_corners, const int *restrict srch_add,
+		       const double *restrict srch_corner_lat, const double *restrict srch_corner_lon,
+		       int *luse_last, double *intrsct_x, double *intrsct_y,
+		       int *avoid_pole_count, double *avoid_pole_offset)
+{
+  /*
+    Intent(in): 
+    double beglat, beglon,  ! beginning lat/lon endpoints for segment
+    double endlat, endlon   ! ending    lat/lon endpoints for segment
+    int    lrevers          ! flag true if segment integrated in reverse
+
+    Intent(inout) :
+    double begseg[2] ! begin lat/lon of full segment
+    int *location    ! address in destination array containing this
+                     ! segment -- also may contain last location on entry
+    int *lthresh     ! flag segment crossing threshold boundary
+
+    intent(out): 
+    *int lcoinc      ! flag segment coincident with grid line
+    double *intrsct_lat, *intrsct_lon ! lat/lon coords of next intersect.
+  */
+  /* Local variables */
+  long n, next_n, cell;
+  long ioffset;
+  int loutside; /* flags points outside grid */
+
+  double pi4, rns;           /*  north/south conversion */
+  double x1, x2;             /*  local x variables for segment */
+  double y1, y2;             /*  local y variables for segment */
+  double begx, begy;         /*  beginning x,y variables for segment */
+  double endx, endy;         /*  beginning x,y variables for segment */
+  double begsegx, begsegy;   /*  beginning x,y variables for segment */
+  double grdx1, grdx2;       /*  local x variables for grid cell */
+  double grdy1, grdy2;       /*  local y variables for grid cell */
+  double vec1_y, vec1_x;     /*  vectors and cross products used */
+  double vec2_y, vec2_x;     /*  during grid search */
+  double cross_product, eps; /*  eps=small offset away from intersect */
+  double s1, s2, determ;     /*  variables used for linear solve to   */
+  double mat1, mat2, mat3, mat4, rhs1, rhs2;  /* find intersection */
+
+  double *srch_corner_x;     /*  x of each corner of srch cells */
+  double *srch_corner_y;     /*  y of each corner of srch cells */
+
+  /*printf("pole_intersection: %g %g %g %g\n", beglat, beglon, endlat, endlon);*/
+
+  /* Initialize defaults, flags, etc. */
+
+  if ( ! *lthresh ) *location = -1;
+  *lcoinc      = FALSE;
+  *intrsct_lat = endlat;
+  *intrsct_lon = endlon;
+
+  loutside = FALSE;
+  s1 = ZERO;
+
+  /* Convert coordinates */
+
+  srch_corner_x = (double*) malloc(srch_corners*num_srch_cells*sizeof(double));
+  srch_corner_y = (double*) malloc(srch_corners*num_srch_cells*sizeof(double));
+
+  if ( beglat > ZERO )
+    {
+      pi4 = QUART*PI;
+      rns = ONE;
+    }
+  else
+    {
+      pi4 = -QUART*PI;
+      rns = -ONE;
+    }
+
+  if ( *luse_last )
+    {
+      x1 = *intrsct_x;
+      y1 = *intrsct_y;
+    }
+  else
+    {
+      x1 = rns*TWO*sin(pi4 - HALF*beglat)*cos(beglon);
+      y1 =     TWO*sin(pi4 - HALF*beglat)*sin(beglon);
+      *luse_last = TRUE;
+    }
+
+  x2 = rns*TWO*sin(pi4 - HALF*endlat)*cos(endlon);
+  y2 =     TWO*sin(pi4 - HALF*endlat)*sin(endlon);
+
+  for ( n = 0; n < srch_corners*num_srch_cells; ++n )
+    {
+      srch_corner_x[n] = rns*TWO*sin(pi4 - HALF*srch_corner_lat[n])*
+	                         cos(srch_corner_lon[n]);
+      srch_corner_y[n] =     TWO*sin(pi4 - HALF*srch_corner_lat[n])*
+	                         sin(srch_corner_lon[n]);
+    }
+
+  begx = x1;
+  begy = y1;
+  endx = x2;
+  endy = y2;
+  begsegx = rns*TWO*sin(pi4 - HALF*begseg[0])*cos(begseg[1]);
+  begsegy =     TWO*sin(pi4 - HALF*begseg[0])*sin(begseg[1]);
+  *intrsct_x = endx;
+  *intrsct_y = endy;
+
+  /*
+     Search for location of this segment in ocean grid using cross
+     product method to determine whether a point is enclosed by a cell
+  */
+  while ( TRUE ) /* srch_loop */
+    {
+      /* If last segment crossed threshold, use that location */
+
+      if ( *lthresh )
+	{
+	  for ( cell=0; cell < num_srch_cells; ++cell )
+	    if ( srch_add[cell] == *location )
+	      {
+		eps = TINY;
+		goto after_srch_loop;
+	      }
+	}
+
+      /* Otherwise normal search algorithm */
+
+      for ( cell = 0; cell < num_srch_cells; ++cell ) /* cell_loop  */
+	{
+	  ioffset = cell*srch_corners;
+	  for ( n = 0; n < srch_corners; ++n ) /* corner_loop */
+	    {
+	      next_n = (n+1)%srch_corners;
+	      /*
+		Here we take the cross product of the vector making 
+		up each cell side with the vector formed by the vertex
+		and search point.  If all the cross products are 
+		positive, the point is contained in the cell.
+	      */
+	      vec1_x = srch_corner_x[ioffset+next_n] - srch_corner_x[ioffset+n];
+	      vec1_y = srch_corner_y[ioffset+next_n] - srch_corner_y[ioffset+n];
+	      vec2_x = x1 - srch_corner_x[ioffset+n];
+	      vec2_y = y1 - srch_corner_y[ioffset+n];
+
+	      /* If endpoint coincident with vertex, offset the endpoint */
+
+	      if ( IS_EQUAL(vec2_x, 0) && IS_EQUAL(vec2_y, 0) )
+		{
+		  x1 += 1.e-10*(x2 - x1);
+		  y1 += 1.e-10*(y2 - y1);
+		  vec2_x = x1 - srch_corner_x[ioffset+n];
+		  vec2_y = y1 - srch_corner_y[ioffset+n];
+		}
+
+	      cross_product = vec1_x*vec2_y - vec2_x*vec1_y;
+
+	      /*
+		If the cross product for a side is ZERO, the point 
+                  lies exactly on the side or the length of a side
+                  is ZERO.  If the length is ZERO set det > 0.
+                  otherwise, perform another cross 
+                  product between the side and the segment itself. 
+	        If this cross product is also ZERO, the line is 
+	          coincident with the cell boundary - perform the 
+                  dot product and only choose the cell if the dot 
+                  product is positive (parallel vs anti-parallel).
+	      */
+	      if ( IS_EQUAL(cross_product, 0) )
+		{
+		  if ( IS_NOT_EQUAL(vec1_x, 0) || IS_NOT_EQUAL(vec1_y, 0) )
+		    {
+		      vec2_x = x2 - x1;
+		      vec2_y = y2 - y1;
+		      cross_product = vec1_x*vec2_y - vec2_x*vec1_y;
+		    }
+		  else
+		    cross_product = ONE;
+
+		  if ( IS_EQUAL(cross_product, 0) )
+		    {
+		      *lcoinc = TRUE;
+		      cross_product = vec1_x*vec2_x + vec1_y*vec2_y;
+		      if ( lrevers ) cross_product = -cross_product;
+		    }
+		}
+
+	      /* If cross product is less than ZERO, this cell doesn't work */
+
+	      if ( cross_product < ZERO ) break; /* corner_loop */
+	     
+	    } /* corner_loop */
+
+	  /* If cross products all positive, we found the location */
+
+	  if  ( n >= srch_corners )
+	    {
+	      *location = srch_add[cell];
+	      /*
+		If the beginning of this segment was outside the
+		grid, invert the segment so the intersection found
+		will be the first intersection with the grid
+	      */
+	      if ( loutside )
+		{
+		  x2 = begx;
+		  y2 = begy;
+		  *location = -1;
+		  eps  = -TINY;
+		}
+	      else
+		eps  = TINY;
+            
+	      goto after_srch_loop;
+	    }
+
+	  /* Otherwise move on to next cell */
+
+	} /* cell_loop */
+
+     /*
+       If no cell found, the point lies outside the grid.
+       take some baby steps along the segment to see if any
+       part of the segment lies inside the grid.  
+     */
+      loutside = TRUE;
+      s1 = s1 + BABY_STEP;
+      x1 = begx + s1*(x2 - begx);
+      y1 = begy + s1*(y2 - begy);
+
+      /* Reached the end of the segment and still outside the grid return no intersection */
+
+      if ( s1 >= ONE )
+	{
+          free(srch_corner_y);
+          free(srch_corner_x);
+          *luse_last = FALSE;
+          return;
+	}
+    } /* srch_loop */
+
+ after_srch_loop:
+
+  /*
+    Now that a cell is found, search for the next intersection.
+    Loop over sides of the cell to find intersection with side
+    must check all sides for coincidences or intersections
+  */
+
+  ioffset = cell*srch_corners;
+
+  for ( n = 0; n < srch_corners; ++n ) /* intrsct_loop */
+    {
+      next_n = (n+1)%srch_corners;
+
+      grdy1 = srch_corner_y[ioffset+n];
+      grdy2 = srch_corner_y[ioffset+next_n];
+      grdx1 = srch_corner_x[ioffset+n];
+      grdx2 = srch_corner_x[ioffset+next_n];
+
+      /* Set up linear system to solve for intersection */
+
+      mat1 = x2 - x1;
+      mat2 = grdx1 - grdx2;
+      mat3 = y2 - y1;
+      mat4 = grdy1 - grdy2;
+      rhs1 = grdx1 - x1;
+      rhs2 = grdy1 - y1;
+
+      determ = mat1*mat4 - mat2*mat3;
+
+      /*
+         If the determinant is ZERO, the segments are either 
+           parallel or coincident.  Coincidences were detected 
+           above so do nothing.
+         If the determinant is non-ZERO, solve for the linear 
+           parameters s for the intersection point on each line 
+           segment.
+         If 0<s1,s2<1 then the segment intersects with this side.
+           Return the point of intersection (adding a small
+           number so the intersection is off the grid line).
+      */
+      if ( fabs(determ) > 1.e-30 )
+	{
+          s1 = (rhs1*mat4 - mat2*rhs2)/determ;
+          s2 = (mat1*rhs2 - rhs1*mat3)/determ;
+
+	  /* Uwe Schulzweida: s1 >= ZERO! (bug fix) */
+          if ( s2 >= ZERO && s2 <= ONE && s1 >= ZERO && s1 <= ONE )
+	    {
+	      /*
+		Recompute intersection based on full segment
+		so intersections are consistent for both sweeps
+	      */
+	      if ( ! loutside )
+		{
+		  mat1 = x2 - begsegx;
+		  mat3 = y2 - begsegy;
+		  rhs1 = grdx1 - begsegx;
+		  rhs2 = grdy1 - begsegy;
+		}
+	      else
+		{
+		  mat1 = x2 - endx;
+		  mat3 = y2 - endy;
+		  rhs1 = grdx1 - endx;
+		  rhs2 = grdy1 - endy;
+		}
+
+	      determ = mat1*mat4 - mat2*mat3;
+
+	      /*
+		Sometimes due to roundoff, the previous 
+		determinant is non-ZERO, but the lines
+		are actually coincident.  If this is the
+		case, skip the rest.
+	      */
+	      if ( IS_NOT_EQUAL(determ, 0) )
+	       {
+		 s1 = (rhs1*mat4 - mat2*rhs2)/determ;
+		 s2 = (mat1*rhs2 - rhs1*mat3)/determ;
+
+		 if ( ! loutside )
+		   {
+		     *intrsct_x = begsegx + s1*mat1;
+		     *intrsct_y = begsegy + s1*mat3;
+		   }
+		 else 
+		   {
+		     *intrsct_x = endx + s1*mat1;
+		     *intrsct_y = endy + s1*mat3;
+		   }
+
+		 /* Convert back to lat/lon coordinates */
+
+		 *intrsct_lon = rns*atan2(*intrsct_y, *intrsct_x);
+		 if ( *intrsct_lon < ZERO ) 
+		   *intrsct_lon = *intrsct_lon + PI2;
+		 
+		 if ( fabs(*intrsct_x) > 1.e-10 )
+		   *intrsct_lat = (pi4 - asin(rns*HALF*(*intrsct_x)/cos(*intrsct_lon)))*TWO;
+		 else if ( fabs(*intrsct_y) > 1.e-10 )
+		   *intrsct_lat = (pi4 - asin(HALF*(*intrsct_y)/sin(*intrsct_lon)))*TWO;
+		 else
+		   *intrsct_lat = TWO*pi4;
+
+		 /* Add offset in transformed space for next pass. */
+
+		 if ( s1 - eps/determ < ONE )
+		   {
+		     *intrsct_x = *intrsct_x - mat1*(eps/determ);
+		     *intrsct_y = *intrsct_y - mat3*(eps/determ);
+		   }
+		 else
+		   {
+		     if ( ! loutside)
+		       {
+			 *intrsct_x = endx;
+			 *intrsct_y = endy;
+			 *intrsct_lat = endlat;
+			 *intrsct_lon = endlon;
+		       }
+		     else 
+		       {
+			 *intrsct_x = begsegx;
+			 *intrsct_y = begsegy;
+			 *intrsct_lat = begseg[0];
+			 *intrsct_lon = begseg[1];
+		       }
+		   }
+
+		 break; /* intrsct_loop */
+	       }
+	    }
+	}
+ 
+      /* No intersection this side, move on to next side */
+
+    } /* intrsct_loop */
+
+  free(srch_corner_y);
+  free(srch_corner_x);
+
+  /*
+     If segment manages to cross over pole, shift the beginning 
+     endpoint in order to avoid hitting pole directly
+     (it is ok for endpoint to be pole point)
+  */
+
+  if ( fabs(*intrsct_x) < 1.e-10 && fabs(*intrsct_y) < 1.e-10 &&
+       (IS_NOT_EQUAL(endx, 0) && IS_NOT_EQUAL(endy, 0)) )
+    {
+      if ( *avoid_pole_count > 2 )
+	{
+	  *avoid_pole_count  = 0;
+	  *avoid_pole_offset = 10.*(*avoid_pole_offset);
+        }
+
+      cross_product = begsegx*(endy-begsegy) - begsegy*(endx-begsegx);
+      *intrsct_lat = begseg[0];
+      if ( cross_product*(*intrsct_lat) > ZERO )
+	{
+          *intrsct_lon = beglon    + *avoid_pole_offset;
+          begseg[1]    = begseg[1] + *avoid_pole_offset;
+	}
+      else
+	{
+          *intrsct_lon = beglon    - *avoid_pole_offset;
+          begseg[1]    = begseg[1] - *avoid_pole_offset;
+        }
+
+      *avoid_pole_count = *avoid_pole_count + 1;
+      *luse_last = FALSE;
+    }
+  else
+    {
+      *avoid_pole_count  = 0;
+      *avoid_pole_offset = TINY;
+    }
+
+  /*
+     If the segment crosses a pole threshold, reset the intersection
+     to be the threshold latitude and do not reuse x,y intersect
+     on next entry.  Only check if did not cross threshold last
+     time - sometimes the coordinate transformation can place a
+     segment on the other side of the threshold again
+  */
+  if ( *lthresh )
+    {
+      if ( *intrsct_lat > north_thresh || *intrsct_lat < south_thresh )
+	*lthresh = FALSE;
+    }
+  else if ( beglat > ZERO && *intrsct_lat < north_thresh )
+    {
+      mat4 = endlat - begseg[0];
+      mat3 = endlon - begseg[1];
+      if ( mat3 >  PI ) mat3 = mat3 - PI2;
+      if ( mat3 < -PI ) mat3 = mat3 + PI2;
+      *intrsct_lat = north_thresh - TINY;
+      s1 = (north_thresh - begseg[0])/mat4;
+      *intrsct_lon = begseg[1] + s1*mat3;
+      *luse_last = FALSE;
+      *lthresh = TRUE;
+    }
+  else if ( beglat < ZERO && *intrsct_lat > south_thresh )
+    {
+      mat4 = endlat - begseg[0];
+      mat3 = endlon - begseg[1];
+      if ( mat3 >  PI ) mat3 = mat3 - PI2;
+      if ( mat3 < -PI ) mat3 = mat3 + PI2;
+      *intrsct_lat = south_thresh + TINY;
+      s1 = (south_thresh - begseg[0])/mat4;
+      *intrsct_lon = begseg[1] + s1*mat3;
+      *luse_last = FALSE;
+      *lthresh = TRUE;
+    }
+
+  /* If reached end of segment, do not use x,y intersect on next entry */
+
+  if ( IS_EQUAL(*intrsct_lat, endlat) && IS_EQUAL(*intrsct_lon, endlon) ) *luse_last = FALSE;
+
+}  /* pole_intersection */
+
+/*
+   This routine finds the next intersection of a destination grid line with 
+   the line segment given by beglon, endlon, etc.
+   A coincidence flag is returned if the segment is entirely coincident with 
+   an ocean grid line.  The cells in which to search for an intersection must 
+   have already been restricted in the calling routine.
+*/
+static
+void intersection(long *location, double *intrsct_lat, double *intrsct_lon, int *lcoinc,
+		  double beglat, double beglon, double endlat, double endlon, double *begseg,
+		  int lbegin, int lrevers,
+		  long num_srch_cells, long srch_corners, const int *restrict srch_add,
+		  const double *restrict srch_corner_lat, const double *restrict srch_corner_lon,
+		  int *last_loc, int *lthresh, double *intrsct_lat_off, double *intrsct_lon_off,
+		  int *luse_last, double *intrsct_x, double *intrsct_y,
+		  int *avoid_pole_count, double *avoid_pole_offset)
+{
+  /*
+    Intent(in): 
+    int lbegin,             ! flag for first integration along this segment
+    int lrevers             ! flag whether segment integrated in reverse
+    double beglat, beglon,  ! beginning lat/lon endpoints for segment
+    double endlat, endlon   ! ending    lat/lon endpoints for segment
+
+    Intent(inout) :: 
+    double *begseg          ! begin lat/lon of full segment
+
+    intent(out): 
+    int *location           ! address in destination array containing this segment
+    int *lcoinc             ! flag segments which are entirely coincident with a grid line
+    double *intrsct_lat, *intrsct_lon ! lat/lon coords of next intersect.
+  */
+  /* Local variables */
+  long n, next_n, cell;
+  long ioffset;
+
+  int  loutside;             /* flags points outside grid */
+
+  double lon1, lon2;         /* local longitude variables for segment */
+  double lat1, lat2;         /* local latitude  variables for segment */
+  double grdlon1, grdlon2;   /* local longitude variables for grid cell */
+  double grdlat1, grdlat2;   /* local latitude  variables for grid cell */
+  double vec1_lat, vec1_lon; /* vectors and cross products used */
+  double vec2_lat, vec2_lon; /* during grid search */
+  double cross_product; 
+  double eps, offset;        /* small offset away from intersect */
+  double s1, s2, determ;     /* variables used for linear solve to */
+  double mat1 = 0, mat2, mat3 = 0, mat4, rhs1, rhs2;  /* find intersection */
+
+  /* Initialize defaults, flags, etc. */
+
+  *location    = -1;
+  *lcoinc      = FALSE;
+  *intrsct_lat = endlat;
+  *intrsct_lon = endlon;
+
+  if ( num_srch_cells == 0 ) return;
+
+  if ( beglat > north_thresh || beglat < south_thresh )
+    {
+      if ( *lthresh ) *location = *last_loc;
+      pole_intersection(location,
+			intrsct_lat, intrsct_lon, lcoinc, lthresh,
+			beglat, beglon, endlat, endlon, begseg, lrevers,
+			num_srch_cells, srch_corners, srch_add,
+			srch_corner_lat, srch_corner_lon,
+			luse_last, intrsct_x, intrsct_y,
+			avoid_pole_count, avoid_pole_offset);
+
+      if ( *lthresh )
+	{
+          *last_loc = *location;
+          *intrsct_lat_off = *intrsct_lat;
+          *intrsct_lon_off = *intrsct_lon;
+        }
+      return;
+    }
+
+  loutside = FALSE;
+  if ( lbegin )
+    {
+      lat1 = beglat;
+      lon1 = beglon;
+    }
+  else
+    {
+      lat1 = *intrsct_lat_off;
+      lon1 = *intrsct_lon_off;
+    }
+
+  lat2 = endlat;
+  lon2 = endlon;
+  if      ( (lon2-lon1) >  THREE*PIH ) lon2 -= PI2;
+  else if ( (lon2-lon1) < -THREE*PIH ) lon2 += PI2;
+
+  s1 = ZERO;
+
+  /*
+     Search for location of this segment in ocean grid using cross
+     product method to determine whether a point is enclosed by a cell
+  */
+  while ( TRUE ) /* srch_loop */
+    {
+      /* If last segment crossed threshold, use that location */
+
+      if ( *lthresh )
+       {
+         for ( cell = 0; cell < num_srch_cells; ++cell )
+	   if ( srch_add[cell] == *last_loc )
+	     {
+               *location = *last_loc;
+               eps = TINY;
+               goto after_srch_loop;
+	     }
+       }
+
+      /* Otherwise normal search algorithm */
+
+      for ( cell = 0; cell < num_srch_cells; ++cell ) /* cell_loop  */
+	{
+	  ioffset = cell*srch_corners;
+	  for ( n = 0; n < srch_corners; n++ ) /* corner_loop */
+	    {
+	      next_n = (n+1)%srch_corners;
+	      /*
+		Here we take the cross product of the vector making 
+		up each cell side with the vector formed by the vertex
+		and search point.  If all the cross products are 
+		positive, the point is contained in the cell.
+	      */
+	      vec1_lat = srch_corner_lat[ioffset+next_n] - srch_corner_lat[ioffset+n];
+	      vec1_lon = srch_corner_lon[ioffset+next_n] - srch_corner_lon[ioffset+n];
+	      vec2_lat = lat1 - srch_corner_lat[ioffset+n];
+	      vec2_lon = lon1 - srch_corner_lon[ioffset+n];
+
+	      /* If endpoint coincident with vertex, offset the endpoint */
+
+	      if ( IS_EQUAL(vec2_lat, 0) && IS_EQUAL(vec2_lon, 0) )
+		{
+		  lat1 += 1.e-10*(lat2-lat1);
+		  lon1 += 1.e-10*(lon2-lon1);
+		  vec2_lat = lat1 - srch_corner_lat[ioffset+n];
+		  vec2_lon = lon1 - srch_corner_lon[ioffset+n];
+		}
+
+	      /* Check for 0,2pi crossings */
+
+	      if      ( vec1_lon >  PI ) vec1_lon -= PI2;
+	      else if ( vec1_lon < -PI ) vec1_lon += PI2;
+
+	      if      ( vec2_lon >  PI ) vec2_lon -= PI2;
+	      else if ( vec2_lon < -PI ) vec2_lon += PI2;
+
+	      cross_product = vec1_lon*vec2_lat - vec2_lon*vec1_lat;
+
+	      /*
+	       If the cross product for a side is ZERO, the point 
+                 lies exactly on the side or the side is degenerate
+                 (ZERO length).  If degenerate, set the cross 
+                 product to a positive number.  Otherwise perform 
+                 another cross product between the side and the 
+                 segment itself. 
+	       If this cross product is also ZERO, the line is 
+                 coincident with the cell boundary - perform the 
+                 dot product and only choose the cell if the dot 
+                 product is positive (parallel vs anti-parallel).
+	      */
+	      if ( IS_EQUAL(cross_product, 0) )
+		{
+		  if ( IS_NOT_EQUAL(vec1_lat, 0) || IS_NOT_EQUAL(vec1_lon, 0) )
+		    {
+		      vec2_lat = lat2 - lat1;
+		      vec2_lon = lon2 - lon1;
+
+		      if      ( vec2_lon >  PI ) vec2_lon -= PI2;
+		      else if ( vec2_lon < -PI ) vec2_lon += PI2;
+
+		      cross_product = vec1_lon*vec2_lat - vec2_lon*vec1_lat;
+		    }
+		  else
+		    cross_product = ONE;
+
+		  if ( IS_EQUAL(cross_product, 0) )
+		    {
+		      *lcoinc = TRUE;
+		      cross_product = vec1_lon*vec2_lon + vec1_lat*vec2_lat;
+		      if ( lrevers ) cross_product = -cross_product;
+		    }
+		}
+
+	      /* If cross product is less than ZERO, this cell doesn't work */
+
+	      if ( cross_product < ZERO ) break; /* corner_loop */
+
+	    } /* corner_loop */
+
+	  /* If cross products all positive, we found the location */
+
+	  if ( n >= srch_corners )
+	    {
+	      *location = srch_add[cell];
+	      /*
+		If the beginning of this segment was outside the
+		grid, invert the segment so the intersection found
+		will be the first intersection with the grid
+	      */
+	      if ( loutside )
+		{
+		  lat2 = beglat;
+		  lon2 = beglon;
+		  *location = -1;
+		  eps  = -TINY;
+		}
+	      else
+		eps  = TINY;
+
+	      goto after_srch_loop;
+	    }
+
+	  /* Otherwise move on to next cell */
+
+	} /* cell_loop */
+
+      /*
+	If still no cell found, the point lies outside the grid.
+	Take some baby steps along the segment to see if any
+	part of the segment lies inside the grid.  
+      */
+      loutside = TRUE;
+      s1 = s1 + BABY_STEP;
+      lat1 = beglat + s1*(endlat - beglat);
+      lon1 = beglon + s1*(lon2   - beglon);
+
+      /* Reached the end of the segment and still outside the grid return no intersection */
+
+      if ( s1 >= ONE ) return;
+
+    } /* srch_loop */
+
+ after_srch_loop:
+
+  /*
+    Now that a cell is found, search for the next intersection.
+    Loop over sides of the cell to find intersection with side
+    must check all sides for coincidences or intersections
+  */
+
+  ioffset = cell*srch_corners;
+
+  for ( n = 0; n < srch_corners; ++n ) /* intrsct_loop */
+    {
+      next_n = (n+1)%srch_corners;
+
+      grdlon1 = srch_corner_lon[ioffset+n];
+      grdlon2 = srch_corner_lon[ioffset+next_n];
+      grdlat1 = srch_corner_lat[ioffset+n];
+      grdlat2 = srch_corner_lat[ioffset+next_n];
+
+      /* Set up linear system to solve for intersection */
+
+      mat1 = lat2 - lat1;
+      mat2 = grdlat1 - grdlat2;
+      mat3 = lon2 - lon1;
+      mat4 = grdlon1 - grdlon2;
+      rhs1 = grdlat1 - lat1;
+      rhs2 = grdlon1 - lon1;
+
+      if      ( mat3 >  PI ) mat3 -= PI2;
+      else if ( mat3 < -PI ) mat3 += PI2;
+
+      if      ( mat4 >  PI ) mat4 -= PI2;
+      else if ( mat4 < -PI ) mat4 += PI2;
+
+      if      ( rhs2 >  PI ) rhs2 -= PI2;
+      else if ( rhs2 < -PI ) rhs2 += PI2;
+
+      determ = mat1*mat4 - mat2*mat3;
+
+      /*
+         If the determinant is ZERO, the segments are either 
+           parallel or coincident.  Coincidences were detected 
+           above so do nothing.
+         If the determinant is non-ZERO, solve for the linear 
+           parameters s for the intersection point on each line 
+           segment.
+         If 0<s1,s2<1 then the segment intersects with this side.
+           Return the point of intersection (adding a small
+           number so the intersection is off the grid line).
+      */
+      if ( fabs(determ) > 1.e-30 )
+	{
+	  s1 = (rhs1*mat4 - mat2*rhs2)/determ;
+	  s2 = (mat1*rhs2 - rhs1*mat3)/determ;
+
+	  if ( s2 >= ZERO && s2 <= ONE && s1 >= ZERO && s1 <= ONE )
+	    {
+	      /*
+		Recompute intersection based on full segment
+		so intersections are consistent for both sweeps
+	      */
+	      if ( ! loutside )
+		{
+		  mat1 = lat2 - begseg[0];
+		  mat3 = lon2 - begseg[1];
+		  rhs1 = grdlat1 - begseg[0];
+		  rhs2 = grdlon1 - begseg[1];
+		}
+	      else
+		{
+		  mat1 = begseg[0] - endlat;
+		  mat3 = begseg[1] - endlon;
+		  rhs1 = grdlat1 - endlat;
+		  rhs2 = grdlon1 - endlon;
+		}
+
+	      if      ( mat3 >  PI ) mat3 -= PI2;
+	      else if ( mat3 < -PI ) mat3 += PI2;
+
+	      if      ( rhs2 > PI  ) rhs2 -= PI2;
+	      else if ( rhs2 < -PI ) rhs2 += PI2;
+
+	      determ = mat1*mat4 - mat2*mat3;
+
+	      /*
+		Sometimes due to roundoff, the previous 
+		determinant is non-ZERO, but the lines
+		are actually coincident.  If this is the
+		case, skip the rest.
+	      */
+	      if ( IS_NOT_EQUAL(determ, 0) )
+		{
+		  s1 = (rhs1*mat4 - mat2*rhs2)/determ;
+		  s2 = (mat1*rhs2 - rhs1*mat3)/determ;
+
+		  offset = s1 + eps/determ;
+		  if ( offset > ONE ) offset = ONE;
+
+		  if ( ! loutside )
+		    {
+		      *intrsct_lat = begseg[0] + mat1*s1;
+		      *intrsct_lon = begseg[1] + mat3*s1;
+		      *intrsct_lat_off = begseg[0] + mat1*offset;
+		      *intrsct_lon_off = begseg[1] + mat3*offset;
+		    }
+		  else
+		    {
+		      *intrsct_lat = endlat + mat1*s1;
+		      *intrsct_lon = endlon + mat3*s1;
+		      *intrsct_lat_off = endlat + mat1*offset;
+		      *intrsct_lon_off = endlon + mat3*offset;
+		    }
+		  break; /* intrsct_loop */
+		}
+	    }
+	}
+
+      /* No intersection this side, move on to next side */
+
+    } /* intrsct_loop */
+
+  /*
+     If the segment crosses a pole threshold, reset the intersection
+     to be the threshold latitude.  Only check if this was not a
+     threshold segment since sometimes coordinate transform can end
+     up on other side of threshold again.
+  */
+  if ( *lthresh )
+    {
+      if ( *intrsct_lat < north_thresh || *intrsct_lat > south_thresh )
+	*lthresh = FALSE;
+    }
+  else if ( lat1 > ZERO && *intrsct_lat > north_thresh )
+    {
+      *intrsct_lat = north_thresh + TINY;
+      *intrsct_lat_off = north_thresh + eps*mat1;
+      s1 = (*intrsct_lat - begseg[0])/mat1;
+      *intrsct_lon     = begseg[1] + s1*mat3;
+      *intrsct_lon_off = begseg[1] + (s1+eps)*mat3;
+      *last_loc = *location;
+      *lthresh = TRUE;
+    }
+  else if ( lat1 < ZERO && *intrsct_lat < south_thresh )
+    {
+      *intrsct_lat = south_thresh - TINY;
+      *intrsct_lat_off = south_thresh + eps*mat1;
+      s1 = (*intrsct_lat - begseg[0])/mat1;
+      *intrsct_lon     = begseg[1] + s1*mat3;
+      *intrsct_lon_off = begseg[1] + (s1+eps)*mat3;
+      *last_loc = *location;
+      *lthresh = TRUE;
+    }
+
+}  /* intersection */
+
+/*
+   This routine computes the line integral of the flux function 
+   that results in the interpolation weights.  The line is defined
+   by the input lat/lon of the endpoints.
+*/
+static
+double phi_gradient(double in_phi1, double in_phi2, double dphi, double f1, double f2, double grid_lon)
+{
+  double fint, fac;
+  double weight;
+  double phi1, phi2;
+
+  phi1 = in_phi1 - grid_lon;
+  if      ( phi1 >  PI ) phi1 -= PI2;
+  else if ( phi1 < -PI ) phi1 += PI2;
+
+  phi2 = in_phi2 - grid_lon;
+  if      ( phi2 >  PI ) phi2 -= PI2;
+  else if ( phi2 < -PI ) phi2 += PI2;
+
+  if ( (phi2-phi1) <  PI && (phi2-phi1) > -PI )
+    weight = dphi*(phi1*f1 + phi2*f2);
+  else
+    {
+      if ( phi1 > ZERO ) fac =  PI;
+      else      	 fac = -PI;
+
+      fint = f1 + (f2-f1)*(fac-phi1)/fabs(dphi);
+      weight = HALF*phi1*(phi1-fac)*f1 -
+	       HALF*phi2*(phi2+fac)*f2 +
+	       HALF*fac*(phi1+phi2)*fint;
+    }
+
+  return weight;
+}
+
+static
+void line_integral(double *weights, double in_phi1, double in_phi2, 
+		   double theta1, double theta2, double grid1_lon, double grid2_lon)
+{
+  /*
+    Intent(in): 
+    double in_phi1, in_phi2,     ! Longitude endpoints for the segment
+    double theta1, theta2,       ! Latitude  endpoints for the segment
+    double grid1_lon,            ! Reference coordinates for each
+    double grid2_lon             ! Grid (to ensure correct 0,2pi interv.)
+
+    Intent(out):
+    double weights[6]            ! Line integral contribution to weights
+  */
+
+  /*  Local variables  */
+  double dphi, sinth1, sinth2, costh1, costh2;
+  double f1, f2;
+
+  /*  Weights for the general case based on a trapezoidal approx to the integrals. */
+
+  sinth1 = sin(theta1);
+  sinth2 = sin(theta2);
+  costh1 = cos(theta1);
+  costh2 = cos(theta2);
+
+  dphi = in_phi1 - in_phi2;
+  if      ( dphi >  PI ) dphi -= PI2;
+  else if ( dphi < -PI ) dphi += PI2;
+      
+  dphi = HALF*dphi;
+
+  /*
+     The first weight is the area overlap integral. The second and
+     fourth are second-order latitude gradient weights.
+  */
+  weights[0] = dphi*(sinth1 + sinth2);
+  weights[1] = dphi*(costh1 + costh2 + (theta1*sinth1 + theta2*sinth2));
+  weights[3] = weights[0];
+  weights[4] = weights[1];
+
+  /*
+     The third and fifth weights are for the second-order phi gradient
+     component.  Must be careful of longitude range.
+  */
+  f1 = HALF*(costh1*sinth1 + theta1);
+  f2 = HALF*(costh2*sinth2 + theta2);
+
+  weights[2] = phi_gradient(in_phi1, in_phi2, dphi, f1, f2, grid1_lon);
+  weights[5] = phi_gradient(in_phi1, in_phi2, dphi, f1, f2, grid2_lon);
+
+}  /* line_integral */
+
+/*
+  -----------------------------------------------------------------------
+
+   This routine traces the perimeters of every grid cell on each
+   grid checking for intersections with the other grid and computing
+   line integrals for each subsegment.
+
+  -----------------------------------------------------------------------
+*/
+void scrip_remap_weights_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
+{
+  /* local variables */
+
+  int lcheck = TRUE;
+
+  long ioffset;
+  long max_subseg = 100000; /* max number of subsegments per segment to prevent infinite loop */
+                            /* 1000 is too small!!! */
+  long src_grid_size;
+  long tgt_grid_size;
+  long src_num_cell_corners;
+  long tgt_num_cell_corners;
+  long src_grid_add;       /* current linear address for source grid cell   */
+  long tgt_grid_add;       /* current linear address for target grid cell   */
+  long n, n3, k;        /* generic counters                        */
+  long corner;          /* corner of cell that segment starts from */
+  long next_corn;       /* corner of cell that segment ends on     */
+  long nbins, num_links;
+  long num_subseg;      /* number of subsegments                   */
+
+  int lcoinc;           /* flag for coincident segments            */
+  int lrevers;          /* flag for reversing direction of segment */
+  int lbegin;           /* flag for first integration of a segment */
+
+  double intrsct_lat, intrsct_lon;         /* lat/lon of next intersect  */
+  double beglat, endlat, beglon, endlon;   /* endpoints of current seg.  */
+  double norm_factor = 0;                  /* factor for normalizing wts */
+
+  double *tgt_centroid_lat, *tgt_centroid_lon;   /* centroid coords  */
+  double *src_centroid_lat, *src_centroid_lon;   /* on each grid     */
+
+  double begseg[2];         /* begin lat/lon for full segment */
+  double weights[6];        /* local wgt array */
+  long    num_wts;
+
+  long    max_srch_cells;   /* num cells in restricted search arrays  */
+  long    num_srch_cells;   /* num cells in restricted search arrays  */
+  long    srch_corners;     /* num of corners of srch cells           */
+  long    nsrch_corners;
+  int*    srch_add;         /* global address of cells in srch arrays */
+  int*    srch_add2[ompNumThreads];
+  int     ompthID, i;
+  double *srch_corner_lat;  /* lat of each corner of srch cells */
+  double *srch_corner_lon;  /* lon of each corner of srch cells */
+
+  int *link_add1[2];        /* min,max link add to restrict search */
+  int *link_add2[2];        /* min,max link add to restrict search */
+
+  /* Intersection */
+  int last_loc = -1;        /* save location when crossing threshold  */
+  int lthresh = FALSE;      /* flags segments crossing threshold bndy */
+  double intrsct_lat_off = 0, intrsct_lon_off = 0; /* lat/lon coords offset for next search */
+
+  /* Pole_intersection */
+  /* Save last intersection to avoid roundoff during coord transformation */
+  int luse_last = FALSE;
+  double intrsct_x, intrsct_y;      /* x,y for intersection */
+  /* Variables necessary if segment manages to hit pole */
+  int avoid_pole_count = 0;         /* count attempts to avoid pole  */
+  double avoid_pole_offset = TINY;  /* endpoint offset to avoid pole */
+  grid_store_t *grid_store = NULL;
+  double findex = 0;
+  extern int timer_remap_con, timer_remap_con_l1, timer_remap_con_l2;
+
+  if ( cdoVerbose ) cdoPrint("Called %s()", __func__);
+
+  progressInit();
+
+  nbins = src_grid->num_srch_bins;
+  num_wts = rv->num_wts;
+
+  if ( remap_store_link_fast )
+    {
+      grid_store = (grid_store_t*) malloc(sizeof(grid_store_t));
+      grid_store_init(grid_store, tgt_grid->size);
+    }
+
+  if ( cdoVerbose )
+    {
+      cdoPrint("north_thresh: %g", north_thresh);
+      cdoPrint("south_thresh: %g", south_thresh);
+    }
+
+  if ( cdoTimer ) timer_start(timer_remap_con);
+
+  src_grid_size = src_grid->size;
+  tgt_grid_size = tgt_grid->size;
+
+  src_num_cell_corners = src_grid->num_cell_corners;
+  tgt_num_cell_corners = tgt_grid->num_cell_corners;
+
+  if ( ! remap_store_link_fast )
+    {
+      link_add1[0] = (int*) malloc(src_grid_size*sizeof(int));
+      link_add1[1] = (int*) malloc(src_grid_size*sizeof(int));
+      link_add2[0] = (int*) malloc(tgt_grid_size*sizeof(int));
+      link_add2[1] = (int*) malloc(tgt_grid_size*sizeof(int));
+
+#if defined(SX)
+#pragma vdir nodep
+#endif
+      for ( n = 0; n < src_grid_size; ++n )
+	{
+	  link_add1[0][n] = -1;
+	  link_add1[1][n] = -1;
+	}
+
+#if defined(SX)
+#pragma vdir nodep
+#endif
+      for ( n = 0; n < tgt_grid_size; ++n )
+	{
+	  link_add2[0][n] = -1;
+	  link_add2[1][n] = -1;
+	}
+    }
+
+  /* Initialize centroid arrays */
+
+  src_centroid_lat = (double*) malloc(src_grid_size*sizeof(double));
+  src_centroid_lon = (double*) malloc(src_grid_size*sizeof(double));
+  tgt_centroid_lat = (double*) malloc(tgt_grid_size*sizeof(double));
+  tgt_centroid_lon = (double*) malloc(tgt_grid_size*sizeof(double));
+
+  for ( n = 0; n < src_grid_size; ++n )
+    {
+      src_centroid_lat[n] = 0;
+      src_centroid_lon[n] = 0;
+    }
+
+  for ( n = 0; n < tgt_grid_size; ++n )
+    {
+      tgt_centroid_lat[n] = 0;
+      tgt_centroid_lon[n] = 0;
+    }
+
+  double* srch_corner_lat2[ompNumThreads];
+  double* srch_corner_lon2[ompNumThreads];
+  long max_srch_cells2[ompNumThreads];
+
+  /*  Integrate around each cell on source grid */
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      srch_corner_lat2[i] = NULL;
+      srch_corner_lon2[i] = NULL;
+    }
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    max_srch_cells2[i] = 0;
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    srch_add2[i] = (int*) malloc(tgt_grid_size*sizeof(int));
+
+  srch_corners    = tgt_num_cell_corners;
+
+  if ( cdoTimer ) timer_start(timer_remap_con_l1);
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, nbins, num_wts, src_centroid_lon, src_centroid_lat, \
+         remap_store_link_fast, grid_store, link_add1, link_add2, rv, cdoVerbose, max_subseg, \
+	 srch_corner_lat2, srch_corner_lon2, max_srch_cells2, 		\
+	 src_num_cell_corners,	srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, srch_add2, findex) \
+  private(ompthID, srch_add, n, k, num_srch_cells, max_srch_cells, 	\
+	  src_grid_add, tgt_grid_add, ioffset, nsrch_corners, corner, next_corn, beglat, beglon, \
+	  endlat, endlon, lrevers, begseg, lbegin, num_subseg, srch_corner_lat, srch_corner_lon, \
+	  weights, intrsct_lat, intrsct_lon, intrsct_lat_off, intrsct_lon_off, intrsct_x, intrsct_y, \
+	  last_loc, lcoinc, lthresh, luse_last, avoid_pole_count, avoid_pole_offset)
+#endif
+  for ( src_grid_add = 0; src_grid_add < src_grid_size; ++src_grid_add )
+    {
+#if defined(_OPENMP)
+      ompthID = omp_get_thread_num();
+#else
+      ompthID = 0;
+#endif
+
+      int lprogress = 1;
+      if ( ompthID != 0 ) lprogress = 0;
+
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+      findex++;
+      if ( lprogress ) progressStatus(0, 0.5, findex/src_grid_size);
+
+      srch_add = srch_add2[ompthID];
+
+      lthresh   = FALSE;
+      luse_last = FALSE;
+      avoid_pole_count  = 0;
+      avoid_pole_offset = TINY;
+
+      /* Get search cells */
+      num_srch_cells = get_srch_cells(src_grid_add, nbins, src_grid->bin_addr, tgt_grid->bin_addr,
+				      src_grid->cell_bound_box+src_grid_add*4, tgt_grid->cell_bound_box, tgt_grid_size, srch_add);
+
+      if ( num_srch_cells == 0 ) continue;
+
+      /* Create search arrays */
+
+      max_srch_cells  = max_srch_cells2[ompthID];
+      srch_corner_lat = srch_corner_lat2[ompthID];
+      srch_corner_lon = srch_corner_lon2[ompthID];
+
+      if ( num_srch_cells > max_srch_cells )
+	{
+	  srch_corner_lat = (double*) realloc(srch_corner_lat, srch_corners*num_srch_cells*sizeof(double));
+	  srch_corner_lon = (double*) realloc(srch_corner_lon, srch_corners*num_srch_cells*sizeof(double));
+
+	  max_srch_cells  = num_srch_cells;
+
+	  max_srch_cells2[ompthID]  = max_srch_cells;
+	  srch_corner_lat2[ompthID] = srch_corner_lat;
+	  srch_corner_lon2[ompthID] = srch_corner_lon;
+	}
+
+      /* gather1 */
+      for ( n = 0; n < num_srch_cells; ++n )
+	{
+	  tgt_grid_add = srch_add[n];
+	  ioffset = tgt_grid_add*srch_corners;
+
+	  nsrch_corners = n*srch_corners;
+	  for ( k = 0; k < srch_corners; k++ )
+	    {
+	      srch_corner_lat[nsrch_corners+k] = tgt_grid->cell_corner_lat[ioffset+k];
+	      srch_corner_lon[nsrch_corners+k] = tgt_grid->cell_corner_lon[ioffset+k];
+	    }
+	}
+
+      /* Integrate around this cell */
+
+      ioffset = src_grid_add*src_num_cell_corners;
+
+      for ( corner = 0; corner < src_num_cell_corners; ++corner )
+	{
+          next_corn = (corner+1)%src_num_cell_corners;
+
+          /* Define endpoints of the current segment */
+
+          beglat = src_grid->cell_corner_lat[ioffset+corner];
+          beglon = src_grid->cell_corner_lon[ioffset+corner];
+          endlat = src_grid->cell_corner_lat[ioffset+next_corn];
+          endlon = src_grid->cell_corner_lon[ioffset+next_corn];
+          lrevers = FALSE;
+
+	  /*  To ensure exact path taken during both sweeps, always integrate segments in the same direction (SW to NE). */
+          if ( (endlat < beglat) || (IS_EQUAL(endlat, beglat) && endlon < beglon) )
+	    {
+	      beglat = src_grid->cell_corner_lat[ioffset+next_corn];
+	      beglon = src_grid->cell_corner_lon[ioffset+next_corn];
+	      endlat = src_grid->cell_corner_lat[ioffset+corner];
+	      endlon = src_grid->cell_corner_lon[ioffset+corner];
+	      lrevers = TRUE;
+	    }
+
+          /*
+	    If this is a constant-longitude segment, skip the rest 
+	    since the line integral contribution will be ZERO.
+          */
+          if ( IS_EQUAL(endlon, beglon) ) continue;
+
+          begseg[0] = beglat;
+          begseg[1] = beglon;
+          lbegin = TRUE;
+
+	  num_subseg = 0;
+	  /*
+	    Integrate along this segment, detecting intersections 
+	    and computing the line integral for each sub-segment
+	  */
+	  while ( IS_NOT_EQUAL(beglat, endlat) || IS_NOT_EQUAL(beglon, endlon) )
+	    {
+	      /*  Prevent infinite loops if integration gets stuck near cell or threshold boundary */
+	      num_subseg++;
+	      if ( num_subseg >= max_subseg )
+		cdoAbort("Integration stalled: num_subseg exceeded limit (grid1[%d]: lon1=%g lon2=%g lat1=%g lat2=%g)!",
+			 src_grid_add, beglon, endlon, beglat, endlat);
+
+	      /* Uwe Schulzweida: skip very small regions */
+	      if ( num_subseg%1000 == 0 )
+		{
+		  if ( fabs(beglat-endlat) < 1.e-10 || fabs(beglon-endlon) < 1.e-10 )
+		    {
+		      if ( cdoVerbose )
+			cdoPrint("Skip very small region (grid1[%d]): lon=%g dlon=%g lat=%g dlat=%g",
+				 src_grid_add, beglon, endlon-beglon, beglat, endlat-beglat);
+		      break;
+		    }
+		}
+
+	      /* Find next intersection of this segment with a gridline on grid 2. */
+
+	      intersection(&tgt_grid_add, &intrsct_lat, &intrsct_lon, &lcoinc,
+			   beglat, beglon, endlat, endlon, begseg, 
+			   lbegin, lrevers,
+			   num_srch_cells, srch_corners, srch_add,
+			   srch_corner_lat, srch_corner_lon,
+			   &last_loc, &lthresh, &intrsct_lat_off, &intrsct_lon_off,
+			   &luse_last, &intrsct_x, &intrsct_y,
+			   &avoid_pole_count, &avoid_pole_offset);
+
+	      lbegin = FALSE;
+
+	      /* Compute line integral for this subsegment. */
+
+	      if ( tgt_grid_add != -1 )
+		line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
+			      src_grid->cell_center_lon[src_grid_add], tgt_grid->cell_center_lon[tgt_grid_add]);
+	      else
+		line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
+			      src_grid->cell_center_lon[src_grid_add], src_grid->cell_center_lon[src_grid_add]);
+
+	      /* If integrating in reverse order, change sign of weights */
+
+	      if ( lrevers ) for ( k = 0; k < 6; ++k ) weights[k] = -weights[k];
+
+	      /*
+		Store the appropriate addresses and weights. 
+		Also add contributions to cell areas and centroids.
+	      */
+	      if ( tgt_grid_add != -1 )
+		if ( src_grid->mask[src_grid_add] )
+		  {
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+		    {
+		      if ( remap_store_link_fast )
+			store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
+		      else
+			store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
+
+		      tgt_grid->cell_frac[tgt_grid_add] += weights[3];
+		    }
+		    src_grid->cell_frac[src_grid_add] += weights[0];
+		  }
+
+	      src_grid->cell_area[src_grid_add] += weights[0];
+	      src_centroid_lat[src_grid_add] += weights[1];
+	      src_centroid_lon[src_grid_add] += weights[2];
+
+	      /* Reset beglat and beglon for next subsegment. */
+	      beglat = intrsct_lat;
+	      beglon = intrsct_lon;
+	    }
+          /* End of segment */
+        }
+    }
+
+  if ( cdoTimer ) timer_stop(timer_remap_con_l1);
+
+  /* Finished with all cells: deallocate search arrays */
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      free(srch_corner_lon2[i]);
+      free(srch_corner_lat2[i]);
+    }
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    free(srch_add2[i]);
+
+  /* Integrate around each cell on target grid */
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      srch_corner_lat2[i] = NULL;
+      srch_corner_lon2[i] = NULL;
+    }
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    max_srch_cells2[i] = 0;
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    srch_add2[i] = (int*) malloc(src_grid_size*sizeof(int));
+
+  srch_corners    = src_num_cell_corners;
+  max_srch_cells  = 0;
+  srch_corner_lat = NULL;
+  srch_corner_lon = NULL;
+
+  if ( cdoTimer ) timer_start(timer_remap_con_l2);
+
+  findex = 0;
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, nbins, num_wts, tgt_centroid_lon, tgt_centroid_lat, \
+         remap_store_link_fast, grid_store, link_add1, link_add2, rv, cdoVerbose, max_subseg, \
+	 srch_corner_lat2, srch_corner_lon2, max_srch_cells2, 		\
+	 tgt_num_cell_corners, srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, srch_add2, findex) \
+  private(ompthID, srch_add, n, k, num_srch_cells, max_srch_cells,	\
+	  src_grid_add, tgt_grid_add, ioffset, nsrch_corners, corner, next_corn, beglat, beglon, \
+	  endlat, endlon, lrevers, begseg, lbegin, num_subseg, srch_corner_lat, srch_corner_lon, \
+	  weights, intrsct_lat, intrsct_lon, intrsct_lat_off, intrsct_lon_off, intrsct_x, intrsct_y, \
+	  last_loc, lcoinc, lthresh, luse_last, avoid_pole_count, avoid_pole_offset)
+#endif
+  for ( tgt_grid_add = 0; tgt_grid_add < tgt_grid_size; ++tgt_grid_add )
+    {
+#if defined(_OPENMP)
+      ompthID = omp_get_thread_num();
+#else
+      ompthID = 0;
+#endif
+
+      int lprogress = 1;
+      if ( ompthID != 0 ) lprogress = 0;
+
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+      findex++;
+      if ( lprogress ) progressStatus(0.5, 0.5, findex/tgt_grid_size);
+
+      srch_add = srch_add2[ompthID];
+
+      lthresh   = FALSE;
+      luse_last = FALSE;
+      avoid_pole_count  = 0;
+      avoid_pole_offset = TINY;
+
+      /* Get search cells */
+      num_srch_cells = get_srch_cells(tgt_grid_add, nbins, tgt_grid->bin_addr, src_grid->bin_addr,
+				      tgt_grid->cell_bound_box+tgt_grid_add*4, src_grid->cell_bound_box, src_grid_size, srch_add);
+
+      if ( num_srch_cells == 0 ) continue;
+
+      /* Create search arrays */
+      
+      max_srch_cells  = max_srch_cells2[ompthID];
+      srch_corner_lat = srch_corner_lat2[ompthID];
+      srch_corner_lon = srch_corner_lon2[ompthID];
+
+      if ( num_srch_cells > max_srch_cells )
+	{
+	  srch_corner_lat = (double*) realloc(srch_corner_lat, srch_corners*num_srch_cells*sizeof(double));
+	  srch_corner_lon = (double*) realloc(srch_corner_lon, srch_corners*num_srch_cells*sizeof(double));
+
+	  max_srch_cells  = num_srch_cells;
+
+	  max_srch_cells2[ompthID]  = max_srch_cells;
+	  srch_corner_lat2[ompthID] = srch_corner_lat;
+	  srch_corner_lon2[ompthID] = srch_corner_lon;
+	}
+
+      /* gather2 */
+      for ( n = 0; n < num_srch_cells; ++n )
+	{
+	  src_grid_add = srch_add[n];
+	  ioffset = src_grid_add*srch_corners;
+
+	  nsrch_corners = n*srch_corners;
+	  for ( k = 0; k < srch_corners; ++k )
+	    {
+	      srch_corner_lat[nsrch_corners+k] = src_grid->cell_corner_lat[ioffset+k];
+	      srch_corner_lon[nsrch_corners+k] = src_grid->cell_corner_lon[ioffset+k];
+	    }
+	}
+
+      /* Integrate around this cell */
+
+      ioffset = tgt_grid_add*tgt_num_cell_corners;
+
+      for ( corner = 0; corner < tgt_num_cell_corners; ++corner )
+	{
+          next_corn = (corner+1)%tgt_num_cell_corners;
+
+          /* Define endpoints of the current segment */
+
+          beglat = tgt_grid->cell_corner_lat[ioffset+corner];
+          beglon = tgt_grid->cell_corner_lon[ioffset+corner];
+          endlat = tgt_grid->cell_corner_lat[ioffset+next_corn];
+          endlon = tgt_grid->cell_corner_lon[ioffset+next_corn];
+          lrevers = FALSE;
+
+	  /* To ensure exact path taken during both sweeps, always integrate in the same direction */
+          if ( (endlat < beglat) || (IS_EQUAL(endlat, beglat) && endlon < beglon) )
+	    {
+	      beglat = tgt_grid->cell_corner_lat[ioffset+next_corn];
+	      beglon = tgt_grid->cell_corner_lon[ioffset+next_corn];
+	      endlat = tgt_grid->cell_corner_lat[ioffset+corner];
+	      endlon = tgt_grid->cell_corner_lon[ioffset+corner];
+	      lrevers = TRUE;
+	    }
+
+          /*
+	    If this is a constant-longitude segment, skip the rest 
+	    since the line integral contribution will be ZERO.
+          */
+          if ( IS_EQUAL(endlon, beglon) ) continue;
+
+          begseg[0] = beglat;
+          begseg[1] = beglon;
+          lbegin = TRUE;
+
+	  num_subseg = 0;
+	  /*
+	    Integrate along this segment, detecting intersections 
+	    and computing the line integral for each sub-segment
+	  */
+	  while ( IS_NOT_EQUAL(beglat, endlat) || IS_NOT_EQUAL(beglon, endlon) )
+	    {
+	      /*  Prevent infinite loops if integration gets stuck near cell or threshold boundary */
+	      num_subseg++;
+	      if ( num_subseg >= max_subseg )
+		cdoAbort("Integration stalled: num_subseg exceeded limit (grid2[%d]: lon1=%g lon2=%g lat1=%g lat2=%g)!",
+			 tgt_grid_add, beglon, endlon, beglat, endlat);
+
+	      /* Uwe Schulzweida: skip very small regions */
+	      if ( num_subseg%1000 == 0 )
+		{
+		  if ( fabs(beglat-endlat) < 1.e-10 || fabs(beglon-endlon) < 1.e-10 )
+		    {
+		      if ( cdoVerbose )
+			cdoPrint("Skip very small region (grid2[%d]): lon=%g dlon=%g lat=%g dlat=%g",
+				 tgt_grid_add, beglon, endlon-beglon, beglat, endlat-beglat);
+		      break;
+		    }
+		}
+
+	      /* Find next intersection of this segment with a gridline on grid 2. */
+
+	      intersection(&src_grid_add, &intrsct_lat, &intrsct_lon, &lcoinc,
+			   beglat, beglon, endlat, endlon, begseg,
+			   lbegin, lrevers,
+			   num_srch_cells, srch_corners, srch_add,
+			   srch_corner_lat, srch_corner_lon,
+			   &last_loc, &lthresh, &intrsct_lat_off, &intrsct_lon_off,
+			   &luse_last, &intrsct_x, &intrsct_y,
+			   &avoid_pole_count, &avoid_pole_offset);
+
+	      lbegin = FALSE;
+
+	      /* Compute line integral for this subsegment. */
+
+	      if ( src_grid_add != -1 )
+		line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
+			      src_grid->cell_center_lon[src_grid_add], tgt_grid->cell_center_lon[tgt_grid_add]);
+	      else
+		line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
+			      tgt_grid->cell_center_lon[tgt_grid_add], tgt_grid->cell_center_lon[tgt_grid_add]);
+
+	      /* If integrating in reverse order, change sign of weights */
+
+	      if ( lrevers ) for ( k = 0; k < 6; ++k ) weights[k] = -weights[k];
+
+	      /*
+		Store the appropriate addresses and weights. 
+		Also add contributions to cell areas and centroids.
+		If there is a coincidence, do not store weights
+		because they have been captured in the previous loop.
+		The source grid mask is the master mask
+	      */
+	      if ( ! lcoinc && src_grid_add != -1 )
+		if ( src_grid->mask[src_grid_add] )
+		  {
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+		    {
+		      if ( remap_store_link_fast )
+			store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
+		      else
+			store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
+
+		      src_grid->cell_frac[src_grid_add] += weights[0];
+		    }
+		    tgt_grid->cell_frac[tgt_grid_add] += weights[3];
+		  }
+
+	      tgt_grid->cell_area[tgt_grid_add] += weights[3];
+	      tgt_centroid_lat[tgt_grid_add] += weights[4];
+	      tgt_centroid_lon[tgt_grid_add] += weights[5];
+
+	      /* Reset beglat and beglon for next subsegment. */
+	      beglat = intrsct_lat;
+	      beglon = intrsct_lon;
+	    }
+          /* End of segment */
+	}
+    }
+
+  if ( cdoTimer ) timer_stop(timer_remap_con_l2);
+
+  /* Finished with all cells: deallocate search arrays */
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    {
+      free(srch_corner_lon2[i]);
+      free(srch_corner_lat2[i]);
+    }
+
+  for ( i = 0; i < ompNumThreads; ++i )
+    free(srch_add2[i]);
+
+  /*
+     Correct for situations where N/S pole not explicitly included in
+     grid (i.e. as a grid corner point). If pole is missing from only
+     one grid, need to correct only the area and centroid of that 
+     grid.  If missing from both, do complete weight calculation.
+  */
+
+  /* North Pole */
+  weights[0] =  PI2;
+  weights[1] =  PI*PI;
+  weights[2] =  ZERO;
+  weights[3] =  PI2;
+  weights[4] =  PI*PI;
+  weights[5] =  ZERO;
+
+  src_grid_add = -1;
+  /* pole_loop1 */
+  for ( n = 0; n < src_grid_size; ++n )
+    if ( src_grid->cell_area[n] < -THREE*PIH && src_grid->cell_center_lat[n] > ZERO )
+      {
+	src_grid_add = n;
+#ifndef SX
+	break;
+#endif
+      }
+
+  tgt_grid_add = -1;
+  /* pole_loop2 */
+  for ( n = 0; n < tgt_grid_size; ++n )
+    if ( tgt_grid->cell_area[n] < -THREE*PIH && tgt_grid->cell_center_lat[n] > ZERO )
+      {
+	tgt_grid_add = n;
+#ifndef SX
+	break;
+#endif
+      }
+
+  if ( src_grid_add != -1 )
+    {
+      src_grid->cell_area[src_grid_add]     += weights[0];
+      src_centroid_lat[src_grid_add] += weights[1];
+      src_centroid_lon[src_grid_add] += weights[2];
+    }
+
+  if ( tgt_grid_add != -1 )
+    {
+      tgt_grid->cell_area[tgt_grid_add]     += weights[3];
+      tgt_centroid_lat[tgt_grid_add] += weights[4];
+      tgt_centroid_lon[tgt_grid_add] += weights[5];
+    }
+
+  if ( src_grid_add != -1 && tgt_grid_add != -1 )
+    {
+      if ( remap_store_link_fast )
+	store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
+      else
+	store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
+
+      src_grid->cell_frac[src_grid_add] += weights[0];
+      tgt_grid->cell_frac[tgt_grid_add] += weights[3];
+    }
+
+  /* South Pole */
+  weights[0] =  PI2;
+  weights[1] = -PI*PI;
+  weights[2] =  ZERO;
+  weights[3] =  PI2;
+  weights[4] = -PI*PI;
+  weights[5] =  ZERO;
+
+  src_grid_add = -1;
+  /* pole_loop3 */
+  for ( n = 0; n < src_grid_size; ++n )
+    if ( src_grid->cell_area[n] < -THREE*PIH && src_grid->cell_center_lat[n] < ZERO )
+      {
+	src_grid_add = n;
+#ifndef SX
+	break;
+#endif
+      }
+
+  tgt_grid_add = -1;
+  /* pole_loop4 */
+  for ( n = 0; n < tgt_grid_size; ++n )
+    if ( tgt_grid->cell_area[n] < -THREE*PIH && tgt_grid->cell_center_lat[n] < ZERO )
+      {
+	tgt_grid_add = n;
+#ifndef SX
+	break;
+#endif
+      }
+
+  if ( src_grid_add != -1 )
+    {
+      src_grid->cell_area[src_grid_add]     += weights[0];
+      src_centroid_lat[src_grid_add] += weights[1];
+      src_centroid_lon[src_grid_add] += weights[2];
+    }
+
+  if ( tgt_grid_add != -1 )
+    {
+      tgt_grid->cell_area[tgt_grid_add]     += weights[3];
+      tgt_centroid_lat[tgt_grid_add] += weights[4];
+      tgt_centroid_lon[tgt_grid_add] += weights[5];
+    }
+
+  if ( src_grid_add != -1 && tgt_grid_add != -1 )
+    {
+      if ( remap_store_link_fast )
+	store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
+      else
+	store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
+
+      src_grid->cell_frac[src_grid_add] += weights[0];
+      tgt_grid->cell_frac[tgt_grid_add] += weights[3];
+    }
+
+  if ( remap_store_link_fast )
+    {
+      grid_store_delete(grid_store);
+      free(grid_store);
+    }
+
+
+  /* Finish centroid computation */
+
+  for ( n = 0; n < src_grid_size; ++n )
+    if ( IS_NOT_EQUAL(src_grid->cell_area[n], 0) )
+      {
+        src_centroid_lat[n] /= src_grid->cell_area[n];
+        src_centroid_lon[n] /= src_grid->cell_area[n];
+      }
+
+  for ( n = 0; n < tgt_grid_size; ++n )
+    if ( IS_NOT_EQUAL(tgt_grid->cell_area[n], 0) )
+      {
+        tgt_centroid_lat[n] /= tgt_grid->cell_area[n];
+        tgt_centroid_lon[n] /= tgt_grid->cell_area[n];
+      }
+
+  /* 2010-10-08 Uwe Schulzweida: remove all links with weights < 0 */
+
+  /* 
+  if ( 1 )
+    {
+      num_links = rv->num_links;
+
+      if ( cdoVerbose )
+	for ( n = 0; n < num_links; n++ )
+	  printf("wts1: %d %g\n", n, rv->wts[3*n]);
+
+      for ( n = 0; n < num_links; n++ )
+	{
+	  if ( rv->wts[3*n] < 0 )
+	    {
+	      int i, n2, nd;
+     
+	      for ( n2 = n+1; n2 < num_links; n2++ )
+		if ( rv->wts[3*n2] >= 0 ) break;
+
+	      nd = n2-n;
+	      num_links -= nd;
+	      for ( i = n; i < num_links; i++ )
+		{
+		  rv->wts[3*i]   = rv->wts[3*(i+nd)];
+		  rv->wts[3*i+1] = rv->wts[3*(i+nd)+1];
+		  rv->wts[3*i+2] = rv->wts[3*(i+nd)+2];
+		  
+		  rv->src_grid_add[i] = rv->src_grid_add[i+nd];
+		  rv->tgt_grid_add[i] = rv->tgt_grid_add[i+nd];
+		}
+	    }
+	}
+
+     if ( cdoVerbose ) cdoPrint("Removed number of links = %ld", rv->num_links - num_links);
+
+      rv->num_links = num_links;
+    }
+  */
+
+  /* Include centroids in weights and normalize using destination area if requested */
+
+  num_links = rv->num_links;
+
+  if ( rv->norm_opt == NORM_OPT_DESTAREA )
+    {
+#if defined(SX)
+#pragma vdir nodep
+#endif
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(num_links, rv, tgt_grid, src_centroid_lat, src_centroid_lon)		\
+  private(n, n3, src_grid_add, tgt_grid_add, weights, norm_factor)
+#endif
+      for ( n = 0; n < num_links; ++n )
+	{
+	  n3 = n*3;
+	  src_grid_add = rv->src_grid_add[n]; tgt_grid_add = rv->tgt_grid_add[n];
+	  weights[0] = rv->wts[n3]; weights[1] = rv->wts[n3+1]; weights[2] = rv->wts[n3+2];
+
+          if ( IS_NOT_EQUAL(tgt_grid->cell_area[tgt_grid_add], 0) )
+	    norm_factor = ONE/tgt_grid->cell_area[tgt_grid_add];
+          else
+            norm_factor = ZERO;
+
+	  rv->wts[n3  ] =  weights[0]*norm_factor;
+	  rv->wts[n3+1] = (weights[1] - weights[0]*src_centroid_lat[src_grid_add])*norm_factor;
+	  rv->wts[n3+2] = (weights[2] - weights[0]*src_centroid_lon[src_grid_add])*norm_factor;
+	}
+    }
+  else if ( rv->norm_opt == NORM_OPT_FRACAREA )
+    {
+#if defined(SX)
+#pragma vdir nodep
+#endif
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(num_links, rv, tgt_grid, src_centroid_lat, src_centroid_lon)		\
+  private(n, n3, src_grid_add, tgt_grid_add, weights, norm_factor)
+#endif
+      for ( n = 0; n < num_links; ++n )
+	{
+	  n3 = n*3;
+	  src_grid_add = rv->src_grid_add[n]; tgt_grid_add = rv->tgt_grid_add[n];
+	  weights[0] = rv->wts[n3]; weights[1] = rv->wts[n3+1]; weights[2] = rv->wts[n3+2];
+
+          if ( IS_NOT_EQUAL(tgt_grid->cell_frac[tgt_grid_add], 0) )
+	    norm_factor = ONE/tgt_grid->cell_frac[tgt_grid_add];
+          else
+            norm_factor = ZERO;
+
+	  rv->wts[n3  ] =  weights[0]*norm_factor;
+	  rv->wts[n3+1] = (weights[1] - weights[0]*src_centroid_lat[src_grid_add])*norm_factor;
+	  rv->wts[n3+2] = (weights[2] - weights[0]*src_centroid_lon[src_grid_add])*norm_factor;
+	}
+    }
+  else if ( rv->norm_opt == NORM_OPT_NONE )
+    {
+#if defined(SX)
+#pragma vdir nodep
+#endif
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(num_links, rv, tgt_grid, src_centroid_lat, src_centroid_lon)	\
+  private(n, n3, src_grid_add, tgt_grid_add, weights, norm_factor)
+#endif
+      for ( n = 0; n < num_links; ++n )
+	{
+	  n3 = n*3;
+	  src_grid_add = rv->src_grid_add[n]; tgt_grid_add = rv->tgt_grid_add[n];
+	  weights[0] = rv->wts[n3]; weights[1] = rv->wts[n3+1]; weights[2] = rv->wts[n3+2];
+
+          norm_factor = ONE;
+
+	  rv->wts[n3  ] =  weights[0]*norm_factor;
+	  rv->wts[n3+1] = (weights[1] - weights[0]*src_centroid_lat[src_grid_add])*norm_factor;
+	  rv->wts[n3+2] = (weights[2] - weights[0]*src_centroid_lon[src_grid_add])*norm_factor;
+	}
+    }
+
+  if ( cdoVerbose )
+    cdoPrint("Total number of links = %ld", rv->num_links);
+
+  for ( n = 0; n < src_grid_size; ++n )
+    if ( IS_NOT_EQUAL(src_grid->cell_area[n], 0) ) src_grid->cell_frac[n] /= src_grid->cell_area[n];
+
+  for ( n = 0; n < tgt_grid_size; ++n )
+    if ( IS_NOT_EQUAL(tgt_grid->cell_area[n], 0) ) tgt_grid->cell_frac[n] /= tgt_grid->cell_area[n];
+
+  /* Perform some error checking on final weights  */
+
+  if ( lcheck )
+    {
+      for ( n = 0; n < src_grid_size; ++n )
+	{
+	  if ( src_grid->cell_area[n] < -.01 )
+	    cdoPrint("Source grid area error: %d %g", n, src_grid->cell_area[n]);
+
+	  if ( src_centroid_lat[n] < -PIH-.01 || src_centroid_lat[n] > PIH+.01 )
+	    cdoPrint("Source grid centroid lat error: %d %g", n, src_centroid_lat[n]);
+
+	  src_centroid_lat[n] = 0;
+	  src_centroid_lon[n] = 0;
+	}
+
+      for ( n = 0; n < tgt_grid_size; ++n )
+	{
+	  if ( tgt_grid->cell_area[n] < -.01 )
+	    cdoPrint("Target grid area error: %d %g", n, tgt_grid->cell_area[n]);
+	  if ( tgt_centroid_lat[n] < -PIH-.01 || tgt_centroid_lat[n] > PIH+.01 )
+	    cdoPrint("Target grid centroid lat error: %d %g", n, tgt_centroid_lat[n]);
+
+	  tgt_centroid_lat[n] = 0;
+	  tgt_centroid_lon[n] = 0;
+	}
+
+      for ( n = 0; n < num_links; ++n )
+	{
+	  src_grid_add = rv->src_grid_add[n];
+	  tgt_grid_add = rv->tgt_grid_add[n];
+
+	  if ( rv->wts[3*n] < -0.01 )
+	    cdoPrint("Map weight < 0! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
+		     src_grid_add, tgt_grid_add, n, rv->wts[3*n]);
+
+	  if ( rv->norm_opt != NORM_OPT_NONE && rv->wts[3*n] > 1.01 )
+	    cdoPrint("Map weight > 1! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
+		     src_grid_add, tgt_grid_add, n, rv->wts[3*n]);
+	}
+
+      for ( n = 0; n < num_links; ++n )
+	{
+	  tgt_grid_add = rv->tgt_grid_add[n];
+	  tgt_centroid_lat[tgt_grid_add] += rv->wts[3*n];
+	}
+
+      /* 2012-01-24 Uwe Schulzweida: changed [tgt_grid_add] to [n] (bug fix) */
+      for ( n = 0; n < tgt_grid_size; ++n )
+	{
+	  if ( rv->norm_opt == NORM_OPT_DESTAREA )
+	    norm_factor = tgt_grid->cell_frac[n];
+	  else if ( rv->norm_opt == NORM_OPT_FRACAREA )
+	    norm_factor = ONE;
+	  else if ( rv->norm_opt == NORM_OPT_NONE )
+	    norm_factor = tgt_grid->cell_area[n];
+	    
+	  if ( tgt_centroid_lat[n] > 0 && fabs(tgt_centroid_lat[n] - norm_factor) > .01 )
+	    cdoPrint("Error: sum of wts for map1 %d %g %g", n, tgt_centroid_lat[n], norm_factor);
+	}
+    } // lcheck
+
+  free(src_centroid_lat);
+  free(src_centroid_lon);
+  free(tgt_centroid_lat);
+  free(tgt_centroid_lon);
+
+  if ( ! remap_store_link_fast )
+    {
+      free(link_add1[0]);
+      free(link_add1[1]);
+      free(link_add2[0]);
+      free(link_add2[1]);
+    }
+
+  if ( cdoTimer ) timer_stop(timer_remap_con);
+
+} /* remap_conserv */
diff --git a/src/remap_distwgt_scrip.c b/src/remap_distwgt_scrip.c
new file mode 100644
index 0000000..b7f7bd5
--- /dev/null
+++ b/src/remap_distwgt_scrip.c
@@ -0,0 +1,597 @@
+#include "cdo.h"
+#include "cdo_int.h"
+#include "grid.h"
+#include "remap.h"
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/*                                                                         */
+/*      INTERPOLATION USING A DISTANCE-WEIGHTED AVERAGE                    */
+/*                                                                         */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+static
+void get_restrict_add(remapgrid_t *src_grid, double plat, const int *restrict src_bin_add, int *minadd, int *maxadd)
+{
+  int n, n2;
+  int min_add = 0, max_add = 0, nm1, np1;
+  int nbins;
+  restr_t rlat;
+  restr_t *bin_lats = src_grid->bin_lats;
+
+  nbins = src_grid->num_srch_bins;
+
+  rlat = RESTR_SCALE(plat);
+
+  for ( n = 0; n < nbins; ++n )
+    {
+      n2 = n<<1;
+      if ( rlat >= bin_lats[n2  ] && rlat <= bin_lats[n2+1] )
+	{
+	  min_add = src_bin_add[n2  ];
+	  max_add = src_bin_add[n2+1];
+
+	  nm1 = MAX(n-1, 0);
+	  np1 = MIN(n+1, nbins-1);
+
+	  min_add = MIN(min_add, src_bin_add[2*nm1  ]);
+	  max_add = MAX(max_add, src_bin_add[2*nm1+1]);
+	  min_add = MIN(min_add, src_bin_add[2*np1  ]);
+	  max_add = MAX(max_add, src_bin_add[2*np1+1]);
+	}
+    }
+
+  *minadd = min_add;
+  *maxadd = max_add;
+  /*
+  if ( cdoVerbose )
+    printf("plon %g plat %g min_add %ld max_add %ld diff %ld\n",
+	   plon, plat, min_add, max_add, max_add-min_add);
+  */
+}
+
+static
+void nbr_store_distance(int nadd, double distance, int num_neighbors, int *restrict nbr_add, double *restrict nbr_dist)
+{
+  if ( num_neighbors == 1 )
+    {
+      if ( distance < nbr_dist[0] || (distance <= nbr_dist[0] && nadd < nbr_add[0]) )
+	{
+	  nbr_add[0]  = nadd;
+	  nbr_dist[0] = distance;
+	}
+    }
+  else
+    {
+      int n, nchk;
+      for ( nchk = 0; nchk < num_neighbors; ++nchk )
+	{
+	  if ( distance < nbr_dist[nchk] )
+	    {
+	      for ( n = num_neighbors-1; n > nchk; --n )
+		{
+		  nbr_add[n]  = nbr_add[n-1];
+		  nbr_dist[n] = nbr_dist[n-1];
+		}
+	      nbr_add[nchk]  = nadd;
+	      nbr_dist[nchk] = distance;
+	      break;
+	    }
+	}
+    }
+}
+
+static
+void nbr_check_distance(int num_neighbors, const int *restrict nbr_add, double *restrict nbr_dist)
+{
+  int nchk;
+  double distance;
+
+  /* Uwe Schulzweida: if distance is zero, set to small number */
+  for ( nchk = 0; nchk < num_neighbors; ++nchk )
+    {
+      if ( nbr_add[nchk] >= 0 )
+	{
+	  distance = nbr_dist[nchk];
+	  if ( IS_EQUAL(distance, 0.) ) distance = TINY;
+	  nbr_dist[nchk] = distance;
+	}
+    }
+}
+
+
+static
+double get_search_radius(void)
+{
+  double search_radius;
+  extern double remap_search_radius;
+
+  search_radius = remap_search_radius;
+
+  if ( search_radius <    0. ) search_radius = 0.;
+  if ( search_radius >  180. ) search_radius = 180.;
+
+  search_radius = cos(search_radius*DEG2RAD);
+
+  return (search_radius);
+}
+
+/*
+   This routine finds the closest num_neighbor points to a search 
+   point and computes a distance to each of the neighbors.
+*/
+static
+void grid_search_nbr_reg2d(int num_neighbors, remapgrid_t *src_grid, int *restrict nbr_add, double *restrict nbr_dist, 
+			   double plat, double plon, const int *restrict src_grid_dims,
+			   double coslat_dst, double coslon_dst, double sinlat_dst, double sinlon_dst,
+			   const double *restrict sinlat, const double *restrict coslat,
+			   const double *restrict sinlon, const double *restrict coslon,
+			   const double *restrict src_center_lat, const double *restrict src_center_lon)
+{
+  /*
+    Output variables:
+
+    int nbr_add[num_neighbors]     ! address of each of the closest points
+    double nbr_dist[num_neighbors] ! distance to each of the closest points
+
+    Input variables:
+
+    double plat,         ! latitude  of the search point
+    double plon,         ! longitude of the search point
+  */
+  /*  Local variables */
+  int lfound;
+  int n, nadd;
+  int nx, nxm, ny;
+  long ii, jj;
+  int i, j, ix;
+  int src_add[25];
+  int num_add = 0;
+  double distance;   //  Angular distance
+  double search_radius = get_search_radius();
+  /*
+  double coslat_dst = cos(plat);  // cos(lat)  of the search point
+  double coslon_dst = cos(plon);  // cos(lon)  of the search point
+  double sinlat_dst = sin(plat);  // sin(lat)  of the search point
+  double sinlon_dst = sin(plon);  // sin(lon)  of the search point
+  */
+  nx = src_grid_dims[0];
+  ny = src_grid_dims[1];
+
+  nxm = nx;
+  if ( src_grid->is_cyclic ) nxm++;
+
+  if ( plon < src_center_lon[0]     ) plon += PI2;
+  if ( plon > src_center_lon[nxm-1] ) plon -= PI2;
+
+  lfound = rect_grid_search(&ii, &jj, plon, plat, nxm, ny, src_center_lon, src_center_lat);
+
+  if ( lfound )
+    {
+      if ( src_grid->is_cyclic && ii == (nxm-1) ) ii = 0;
+
+      for ( j = (jj-2); j <= (jj+2); ++j )
+	for ( i = (ii-2); i <= (ii+2); ++i )
+	  {
+	    ix = i;
+	    
+	    if ( src_grid->is_cyclic )
+	      {
+		if ( ix <   0 ) ix += nx;
+		if ( ix >= nx ) ix -= nx;
+	      }
+
+	    if ( ix >= 0 && ix < nx && j >= 0 && j < ny )
+	      src_add[num_add++] = j*nx+ix;
+	  }
+      /*
+      num_add = 0;
+
+      for ( j = (jj-1); j <= jj; ++j )
+	for ( i = (ii-1); i <= ii; ++i )
+	  {
+	    ix = i;
+	    if ( src_grid->is_cyclic && ix == (nxm-1) ) ix = 0;
+
+	    src_add[num_add++] = j*nx+ix;
+	  }
+      */
+    }
+
+  /* Initialize distance and address arrays */
+  for ( n = 0; n < num_neighbors; ++n )
+    {
+      nbr_add[n]  = -1;
+      nbr_dist[n] = BIGNUM;
+    }
+
+  if ( lfound )
+    {
+      int ix, iy;
+
+      for ( int na = 0; na < num_add; ++na )
+	{
+	  nadd = src_add[na];
+
+	  iy = nadd/nx;
+	  ix = nadd - iy*nx;
+
+	  /* Find distance to this point */
+	  distance =  sinlat_dst*sinlat[iy] + coslat_dst*coslat[iy]*
+	             (coslon_dst*coslon[ix] + sinlon_dst*sinlon[ix]);
+	  /*
+	  distance =  sinlat_dst*sinlat[nadd] + coslat_dst*coslat[nadd]*
+	             (coslon_dst*coslon[nadd] + sinlon_dst*sinlon[nadd]);
+	  */
+	  /* 2008-07-30 Uwe Schulzweida: check that distance is inside the range of -1 to 1,
+	                                 otherwise the result of acos(distance) is NaN */
+	  if ( distance >  1. ) distance =  1.;
+
+	  if ( distance >= search_radius )
+	    {
+	      distance = acos(distance);
+
+	      /* Store the address and distance if this is one of the smallest four so far */
+	      nbr_store_distance(nadd, distance, num_neighbors, nbr_add, nbr_dist);
+	    }
+	}
+
+      nbr_check_distance(num_neighbors, nbr_add, nbr_dist);
+    }
+  else if ( src_grid->lextrapolate )
+    {
+      int search_result;
+      search_result = grid_search_reg2d_nn(nx, ny, nbr_add, nbr_dist, plat, plon, src_center_lat, src_center_lon);
+      
+      if ( search_result >= 0 )
+	for ( n = 0; n < 4; ++n ) nbr_add[n] = -1;
+    }
+}  /*  grid_search_nbr_reg2d  */
+
+static
+void grid_search_nbr(int num_neighbors, remapgrid_t *src_grid, int *restrict nbr_add, double *restrict nbr_dist, 
+		     double plat, double plon, const int *restrict src_bin_add,
+		     double coslat_dst, double coslon_dst, double sinlat_dst, double sinlon_dst,
+		     const double *restrict sinlat, const double *restrict coslat,
+		     const double *restrict sinlon, const double *restrict coslon)
+{
+  /*
+    Output variables:
+
+    int nbr_add[num_neighbors]     ! address of each of the closest points
+    double nbr_dist[num_neighbors] ! distance to each of the closest points
+
+    Input variables:
+
+    int src_bin_add[][2]  ! search bins for restricting search
+
+    double plat,         ! latitude  of the search point
+    double plon,         ! longitude of the search point
+  */
+  /*  Local variables */
+  int n, nadd;
+  int min_add, max_add;
+  double search_radius = get_search_radius();
+  /* result changed a little on a few points with high resolution grid
+  double xcoslat_dst = cos(plat);  // cos(lat)  of the search point
+  double xcoslon_dst = cos(plon);  // cos(lon)  of the search point
+  double xsinlat_dst = sin(plat);  // sin(lat)  of the search point
+  double xsinlon_dst = sin(plon);  // sin(lon)  of the search point
+  */
+  /* Loop over source grid and find nearest neighbors                         */
+  /* restrict the search using search bins expand the bins to catch neighbors */
+
+  get_restrict_add(src_grid, plat, src_bin_add, &min_add, &max_add);
+
+  /* Initialize distance and address arrays */
+  for ( n = 0; n < num_neighbors; ++n )
+    {
+      nbr_add[n]  = -1;
+      nbr_dist[n] = BIGNUM;
+    }
+
+  int i, j, ndist = max_add - min_add + 1;
+
+  if ( ndist <= 0 ) return;
+
+  double distance;     /* Angular distance */
+  double *dist = (double*) malloc(ndist*sizeof(double));
+  int    *adds = (int*) malloc(ndist*sizeof(int));
+
+#if defined(_OPENMP) && _OPENMP >= OPENMP4
+#pragma omp simd
+#endif
+  for ( j = 0, i = 0; i < ndist; ++i )
+    {
+      nadd = min_add+i;
+      /* Find distance to this point */
+      distance =  sinlat_dst*sinlat[nadd] + coslat_dst*coslat[nadd]*
+	         (coslon_dst*coslon[nadd] + sinlon_dst*sinlon[nadd]);
+      /* 2008-07-30 Uwe Schulzweida: check that distance is inside the range of -1 to 1,
+                                     otherwise the result of acos(distance) is NaN */
+      if ( distance >  1. ) distance =  1.;
+
+      if ( distance >= search_radius )
+	{
+	  dist[j] = distance;
+	  adds[j] = nadd;
+	  j++;
+	}
+    }
+  ndist = j;
+
+#if defined(_OPENMP) && _OPENMP >= OPENMP4
+#pragma omp simd
+#endif
+  for ( j = 0; j < ndist; ++j )
+    dist[j] = acos(dist[j]);
+
+  for ( j = 0; j < ndist; ++j )
+    nbr_store_distance(adds[j], dist[j], num_neighbors, nbr_add, nbr_dist);
+
+  free(adds);
+  free(dist);
+
+  nbr_check_distance(num_neighbors, nbr_add, nbr_dist);
+
+}  /*  grid_search_nbr  */
+
+/*
+  This routine stores the address and weight for this link in the appropriate 
+  address and weight arrays and resizes those arrays if necessary.
+*/
+static
+void store_link_nbr(remapvars_t *rv, int add1, int add2, double weights)
+{
+  /*
+    Input variables:
+    int  add1         ! address on source grid
+    int  add2         ! address on target grid
+    double weights    ! remapping weight for this link
+  */
+  long nlink;
+
+  /*
+     Increment number of links and check to see if remap arrays need
+     to be increased to accomodate the new link. Then store the link.
+  */
+  nlink = rv->num_links;
+  rv->num_links++;
+
+  if ( rv->num_links >= rv->max_links ) 
+    resize_remap_vars(rv, rv->resize_increment);
+
+  rv->src_grid_add[nlink] = add1;
+  rv->tgt_grid_add[nlink] = add2;
+  rv->wts[nlink]          = weights;
+
+} /* store_link_nbr */
+
+typedef struct
+{
+  int add;
+  double wgts;
+}
+addwgts_t;
+
+static
+int cmpwgts(const void *s1, const void *s2)
+{
+  int cmp = 0;
+  const addwgts_t *c1 = s1;
+  const addwgts_t *c2 = s2;
+
+  if      ( c1->add < c2->add ) cmp = -1;
+  else if ( c1->add > c2->add ) cmp =  1;
+
+  return (cmp);
+}
+
+static
+void sort_dist_adds(int nadds, int src_add[], double wgts[])
+{
+  int n;
+  addwgts_t addwgts[nadds];
+
+  if ( nadds <= 1 ) return;
+
+  for ( n = 1; n < nadds; ++n )
+    if ( src_add[n] < src_add[n-1] ) break;
+  if ( n == nadds ) return;
+
+  for ( n = 0; n < nadds; ++n )
+    {
+      addwgts[n].add  = src_add[n];
+      addwgts[n].wgts = wgts[n];
+    }
+
+  qsort(addwgts, nadds, sizeof(addwgts_t), cmpwgts);
+
+  for ( n = 0; n < nadds; ++n )
+    {
+      src_add[n] = addwgts[n].add;
+      wgts[n]    = addwgts[n].wgts;
+    }  
+}
+
+/*
+  -----------------------------------------------------------------------------------------
+
+   This routine computes the inverse-distance weights for a nearest-neighbor interpolation.
+
+  -----------------------------------------------------------------------------------------
+*/
+void scrip_remap_weights_distwgt(int num_neighbors, remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
+{
+  /*  Local variables */
+
+  long src_grid_size;
+  long tgt_grid_size;
+  long n, nadds;
+  long dst_add;                   /* destination address                         */
+  int nbr_mask[num_neighbors];    /* mask at nearest neighbors                   */
+  int nbr_add[num_neighbors];     /* source address at nearest neighbors         */
+  double nbr_dist[num_neighbors]; /* angular distance four nearest neighbors     */
+  double dist_tot;                /* sum of neighbor distances (for normalizing) */
+  double coslat_dst;              /* cos(lat) of destination grid point          */
+  double coslon_dst;              /* cos(lon) of destination grid point          */
+  double sinlat_dst;              /* sin(lat) of destination grid point          */
+  double sinlon_dst;              /* sin(lon) of destination grid point          */
+  double *coslat, *sinlat;        /* cosine, sine of grid lats (for distance)    */
+  double *coslon, *sinlon;        /* cosine, sine of grid lons (for distance)    */
+  double plat, plon;              /* lat/lon coords of destination point         */
+  double findex = 0;
+  int remap_grid_type = src_grid->remap_grid_type;
+
+  if ( cdoVerbose ) cdoPrint("Called %s()", __func__);
+
+  progressInit();
+
+  /* Compute mappings from source to target grid */
+
+  src_grid_size = src_grid->size;
+  tgt_grid_size = tgt_grid->size;
+
+  /* Compute cos, sin of lat/lon on source grid for distance calculations */
+
+  if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
+    {
+      long nx = src_grid->dims[0];
+      long ny = src_grid->dims[1];
+
+      coslat = (double*) malloc(ny*sizeof(double));
+      coslon = (double*) malloc(nx*sizeof(double));
+      sinlat = (double*) malloc(ny*sizeof(double));
+      sinlon = (double*) malloc(nx*sizeof(double));
+
+      double *center_lon = src_grid->reg2d_center_lon;
+      double *center_lat = src_grid->reg2d_center_lat;
+
+      for ( n = 0; n < nx; ++n )
+	{
+	  double rlon = center_lon[n];
+	  if ( rlon > PI2  ) rlon -= PI2;
+	  if ( rlon < ZERO ) rlon += PI2;
+	  coslon[n] = cos(rlon);
+	  sinlon[n] = sin(rlon);
+	}
+      for ( n = 0; n < ny; ++n )
+	{
+	  coslat[n] = cos(center_lat[n]);
+	  sinlat[n] = sin(center_lat[n]);
+	}
+    }
+  else
+    {
+      coslat = (double*) malloc(src_grid_size*sizeof(double));
+      coslon = (double*) malloc(src_grid_size*sizeof(double));
+      sinlat = (double*) malloc(src_grid_size*sizeof(double));
+      sinlon = (double*) malloc(src_grid_size*sizeof(double));
+
+      double *center_lon = src_grid->cell_center_lon;
+      double *center_lat = src_grid->cell_center_lat;
+
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) shared(center_lon, center_lat, src_grid_size, coslat, coslon, sinlat, sinlon)
+#endif
+      for ( n = 0; n < src_grid_size; ++n )
+	{
+	  coslon[n] = cos(center_lon[n]);
+	  sinlon[n] = sin(center_lon[n]);
+	  coslat[n] = cos(center_lat[n]);
+	  sinlat[n] = sin(center_lat[n]);
+	}
+    }
+
+  /* Loop over destination grid  */
+#if defined(_OPENMP)
+#pragma omp parallel for default(none) \
+  shared(ompNumThreads, cdoTimer, num_neighbors, remap_grid_type, src_grid, tgt_grid, rv, tgt_grid_size, coslat, coslon, sinlat, sinlon, findex) \
+  private(dst_add, n, nadds, coslat_dst, coslon_dst, sinlat_dst, sinlon_dst, dist_tot, nbr_add, nbr_dist, nbr_mask, plat, plon) \
+  schedule(dynamic,1)
+#endif
+  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
+    {
+      int lprogress = 1;
+#if defined(_OPENMP)
+      if ( omp_get_thread_num() != 0 ) lprogress = 0;
+#endif
+#if defined(_OPENMP)
+#pragma omp atomic
+#endif
+      findex++;
+      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
+
+      if ( ! tgt_grid->mask[dst_add] ) continue;
+	
+      plat = tgt_grid->cell_center_lat[dst_add];
+      plon = tgt_grid->cell_center_lon[dst_add];
+
+      coslat_dst = cos(plat);
+      coslon_dst = cos(plon);
+      sinlat_dst = sin(plat);
+      sinlon_dst = sin(plon);
+
+      /* Find nearest grid points on source grid and distances to each point */
+      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
+	grid_search_nbr_reg2d(num_neighbors, src_grid, nbr_add, nbr_dist, 
+			      plat, plon, src_grid->dims,
+			      coslat_dst, coslon_dst, sinlat_dst, sinlon_dst,
+			      sinlat, coslat, sinlon, coslon,
+			      src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
+      else
+	grid_search_nbr(num_neighbors, src_grid, nbr_add, nbr_dist, 
+			plat, plon, src_grid->bin_addr,
+			coslat_dst, coslon_dst, sinlat_dst, sinlon_dst,
+			sinlat, coslat, sinlon, coslon);
+
+      /* Compute weights based on inverse distance if mask is false, eliminate those points */
+
+      dist_tot = 0.;
+      for ( n = 0; n < num_neighbors; ++n )
+	{
+	  // printf("dst_add %ld %ld %d %g\n", dst_add, n, nbr_add[n], nbr_dist[n]);
+	  nbr_mask[n] = FALSE;
+
+	  /* Uwe Schulzweida: check if nbr_add is valid */
+	  if ( nbr_add[n] >= 0 )
+	    if ( src_grid->mask[nbr_add[n]] )
+	      {
+		nbr_dist[n] = ONE/nbr_dist[n];
+		dist_tot = dist_tot + nbr_dist[n];
+		nbr_mask[n] = TRUE;
+	      }
+	}
+
+      /* Normalize weights and store the link */
+
+      nadds = 0;
+      for ( n = 0; n < num_neighbors; ++n )
+	{
+          if ( nbr_mask[n] )
+	    {
+	      nbr_dist[nadds] = nbr_dist[n]/dist_tot;
+	      nbr_add[nadds]  = nbr_add[n];
+	      nadds++;
+
+	      tgt_grid->cell_frac[dst_add] = ONE;
+	    }
+	}
+
+      sort_dist_adds(nadds, nbr_add, nbr_dist);
+
+      for ( n = 0; n < nadds; ++n )
+	{
+#if defined(_OPENMP)
+#pragma omp critical
+#endif
+	      store_link_nbr(rv, nbr_add[n], dst_add, nbr_dist[n]);
+	}
+
+    } /* for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add ) */
+
+  free(coslat);
+  free(coslon);
+  free(sinlat);
+  free(sinlon);
+
+}  /* scrip_remap_weights_distwgt */
diff --git a/src/remap_scrip_io.c b/src/remap_scrip_io.c
index ae072b9..30ba236 100644
--- a/src/remap_scrip_io.c
+++ b/src/remap_scrip_io.c
@@ -121,7 +121,7 @@ void write_remap_scrip(const char *interp_file, int map_type, int submap_type, i
 	  strcpy(map_method, "Conservative remapping");
 	  break;
 	}
-    case MAP_TYPE_CONSPHERE:
+    case MAP_TYPE_CONSERV_YAC:
       lgridarea = TRUE;
       /*
       if ( submap_type == SUBMAP_TYPE_LAF )
@@ -474,6 +474,8 @@ void read_remap_scrip(const char *interp_file, int gridID1, int gridID2, int *ma
   nce(nc_inq_attlen(nc_file_id, NC_GLOBAL, "normalization", &attlen));
   normalize_opt[attlen] = 0;
 
+  rv->sort_add = FALSE;
+
   if ( strcmp(normalize_opt, "none") == 0 )
     rv->norm_opt = NORM_OPT_NONE;
   else if ( strcmp(normalize_opt, "fracarea") == 0 )
@@ -498,30 +500,30 @@ void read_remap_scrip(const char *interp_file, int gridID1, int gridID2, int *ma
   *submap_type = SUBMAP_TYPE_NONE;
   *remap_order = 1;
 
-  if ( memcmp(map_method, "Conservative", 12) == 0 )
+  if ( strcompare(map_method, "Conservative") == 0 )
     {
       int iatt;
-      if ( memcmp(map_method, "Conservative remapping using clipping on sphere", 47) == 0 )
-	rv->map_type = MAP_TYPE_CONSPHERE;
+      if ( strcompare(map_method, "Conservative remapping using clipping on sphere") == 0 )
+	rv->map_type = MAP_TYPE_CONSERV_YAC;
       else
 	rv->map_type = MAP_TYPE_CONSERV;
 
       status = nc_get_att_int(nc_file_id, NC_GLOBAL, "remap_order", &iatt);
       if ( status == NC_NOERR ) *remap_order = iatt;
     }
-  else if ( memcmp(map_method, "Bilinear", 8) == 0 ) rv->map_type = MAP_TYPE_BILINEAR;
-  else if ( memcmp(map_method, "Bicubic",  7) == 0 ) rv->map_type = MAP_TYPE_BICUBIC;
-  else if ( memcmp(map_method, "Distance", 8) == 0 )
+  else if ( strcompare(map_method, "Bilinear") == 0 ) rv->map_type = MAP_TYPE_BILINEAR;
+  else if ( strcompare(map_method, "Bicubic")  == 0 ) rv->map_type = MAP_TYPE_BICUBIC;
+  else if ( strcompare(map_method, "Distance") == 0 )
     {
       rv->map_type = MAP_TYPE_DISTWGT;
       *num_neighbors = 4;
     }
-  else if ( memcmp(map_method, "Nearest",  7) == 0 )
+  else if ( strcompare(map_method, "Nearest") == 0 )
     {
       rv->map_type = MAP_TYPE_DISTWGT;
       *num_neighbors = 1;
     }
-  else if ( memcmp(map_method, "Largest",  7) == 0 )
+  else if ( strcompare(map_method, "Largest") == 0 )
     {
       rv->map_type = MAP_TYPE_CONSERV;
       *submap_type = SUBMAP_TYPE_LAF;
@@ -649,10 +651,10 @@ void read_remap_scrip(const char *interp_file, int gridID1, int gridID2, int *ma
 
   /* Allocate address and weight arrays for mapping 1 */
 
-  rv->src_grid_add = malloc(rv->num_links*sizeof(int));
-  rv->tgt_grid_add = malloc(rv->num_links*sizeof(int));
+  rv->src_grid_add = (int*) malloc(rv->num_links*sizeof(int));
+  rv->tgt_grid_add = (int*) malloc(rv->num_links*sizeof(int));
 
-  rv->wts = malloc(rv->num_wts*rv->num_links*sizeof(double));
+  rv->wts = (double*) malloc(rv->num_wts*rv->num_links*sizeof(double));
 
   /* Get variable ids */
 
diff --git a/src/remap_search_latbins.c b/src/remap_search_latbins.c
index aab528c..de16f94 100644
--- a/src/remap_search_latbins.c
+++ b/src/remap_search_latbins.c
@@ -1,6 +1,7 @@
 #include "cdo.h"
 #include "remap.h"
 
+
 void calc_bin_addr(long gridsize, long nbins, const restr_t* restrict bin_lats, const restr_t* restrict cell_bound_box, int* restrict bin_addr)
 {
   long n, n2, nele, nele4;
@@ -90,7 +91,7 @@ void calc_lat_bins(remapgrid_t* src_grid, remapgrid_t* tgt_grid, int map_type)
 
   if ( nbins > 0 )
     {
-      bin_lats = src_grid->bin_lats = realloc(src_grid->bin_lats, 2*nbins*sizeof(restr_t));
+      bin_lats = src_grid->bin_lats = (restr_t*) realloc(src_grid->bin_lats, 2*nbins*sizeof(restr_t));
 
       for ( n = 0; n < nbins; ++n )
 	{
@@ -99,13 +100,13 @@ void calc_lat_bins(remapgrid_t* src_grid, remapgrid_t* tgt_grid, int map_type)
 	  bin_lats[n2+1] = RESTR_SCALE((n+1)*dlat - PIH);
 	}
 
-      src_grid->bin_addr = realloc(src_grid->bin_addr, 2*nbins*sizeof(int));
+      src_grid->bin_addr = (int*) realloc(src_grid->bin_addr, 2*nbins*sizeof(int));
 
       calc_bin_addr(src_grid->size, nbins, bin_lats, src_grid->cell_bound_box, src_grid->bin_addr);
 
-      if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSPHERE )
+      if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSERV_YAC )
 	{
-	  tgt_grid->bin_addr = realloc(tgt_grid->bin_addr, 2*nbins*sizeof(int));
+	  tgt_grid->bin_addr = (int*) realloc(tgt_grid->bin_addr, 2*nbins*sizeof(int));
 
 	  calc_bin_addr(tgt_grid->size, nbins, bin_lats, tgt_grid->cell_bound_box, tgt_grid->bin_addr);
 
@@ -113,7 +114,7 @@ void calc_lat_bins(remapgrid_t* src_grid, remapgrid_t* tgt_grid, int map_type)
 	}
    }
 
-  if ( map_type == MAP_TYPE_CONSPHERE )
+  if ( map_type == MAP_TYPE_CONSERV_YAC )
     {
       free(tgt_grid->cell_bound_box); tgt_grid->cell_bound_box = NULL;
     }
@@ -123,3 +124,354 @@ void calc_lat_bins(remapgrid_t* src_grid, remapgrid_t* tgt_grid, int map_type)
       free(src_grid->cell_bound_box); src_grid->cell_bound_box = NULL;
     }
 }
+
+
+long get_srch_cells(long tgt_grid_add, long nbins, int *bin_addr1, int *bin_addr2,
+		    restr_t *tgt_cell_bound_box, restr_t *src_cell_bound_box, long src_grid_size, int *srch_add)
+{
+  long num_srch_cells;  /* num cells in restricted search arrays   */
+  long min_add;         /* addresses for restricting search of     */
+  long max_add;         /* destination grid                        */
+  long n, n2;           /* generic counters                        */
+  long src_grid_add;    /* current linear address for src cell     */
+  long src_grid_addm4;
+  restr_t bound_box_lat1, bound_box_lat2, bound_box_lon1, bound_box_lon2;
+
+  /* Restrict searches first using search bins */
+
+  min_add = src_grid_size - 1;
+  max_add = 0;
+
+  for ( n = 0; n < nbins; ++n )
+    {
+      n2 = n<<1;
+      if ( tgt_grid_add >= bin_addr1[n2] && tgt_grid_add <= bin_addr1[n2+1] )
+	{
+	  if ( bin_addr2[n2  ] < min_add ) min_add = bin_addr2[n2  ];
+	  if ( bin_addr2[n2+1] > max_add ) max_add = bin_addr2[n2+1];
+	}
+    }
+
+  /* Further restrict searches using bounding boxes */
+
+  bound_box_lat1 = tgt_cell_bound_box[0];
+  bound_box_lat2 = tgt_cell_bound_box[1];
+  bound_box_lon1 = tgt_cell_bound_box[2];
+  bound_box_lon2 = tgt_cell_bound_box[3];
+
+  num_srch_cells = 0;
+  for ( src_grid_add = min_add; src_grid_add <= max_add; ++src_grid_add )
+    {
+      src_grid_addm4 = src_grid_add<<2;
+      if ( (src_cell_bound_box[src_grid_addm4+2] <= bound_box_lon2)  &&
+	   (src_cell_bound_box[src_grid_addm4+3] >= bound_box_lon1) )
+	{
+	  if ( (src_cell_bound_box[src_grid_addm4  ] <= bound_box_lat2)  &&
+	       (src_cell_bound_box[src_grid_addm4+1] >= bound_box_lat1) )
+	    {
+	      srch_add[num_srch_cells] = src_grid_add;
+	      num_srch_cells++;
+	    }
+	}
+    }
+
+  if ( bound_box_lon1 < RESTR_SCALE(0.) || bound_box_lon2 > RESTR_SCALE(PI2) )
+    {
+      if ( bound_box_lon1 < RESTR_SCALE(0.) )
+	{
+	  bound_box_lon1 += RESTR_SCALE(PI2);
+	  bound_box_lon2 += RESTR_SCALE(PI2);
+	}
+      else
+	{
+	  bound_box_lon1 -= RESTR_SCALE(PI2);
+	  bound_box_lon2 -= RESTR_SCALE(PI2);
+	}
+
+      for ( src_grid_add = min_add; src_grid_add <= max_add; ++src_grid_add )
+	{
+	  src_grid_addm4 = src_grid_add<<2;
+	  if ( (src_cell_bound_box[src_grid_addm4+2] <= bound_box_lon2)  &&
+	       (src_cell_bound_box[src_grid_addm4+3] >= bound_box_lon1) )
+	    {
+	      if ( (src_cell_bound_box[src_grid_addm4  ] <= bound_box_lat2)  &&
+		   (src_cell_bound_box[src_grid_addm4+1] >= bound_box_lat1) )
+		{
+		  long ii;
+		  for ( ii = 0; ii < num_srch_cells; ++ii )
+		    if ( srch_add[ii] == src_grid_add ) break;
+		  
+		  if ( ii == num_srch_cells )
+		    {
+		      srch_add[num_srch_cells] = src_grid_add;
+		      num_srch_cells++;
+		    }
+		}
+	    }
+	}
+    }
+
+  return (num_srch_cells);
+}
+
+static
+int grid_search_nn(long min_add, long max_add, int *restrict nbr_add, double *restrict nbr_dist, 
+		   double plat, double plon,
+		   const double *restrict src_center_lat, const double *restrict src_center_lon)
+{
+  int search_result = 0;
+  long n, srch_add;
+  long i;
+  double dist_min, distance; /* For computing dist-weighted avg */
+  double coslat_dst = cos(plat);
+  double sinlat_dst = sin(plat);
+  double coslon_dst = cos(plon);
+  double sinlon_dst = sin(plon);
+
+  dist_min = BIGNUM;
+  for ( n = 0; n < 4; ++n ) nbr_dist[n] = BIGNUM;
+  for ( srch_add = min_add; srch_add <= max_add; ++srch_add )
+    {
+      distance = acos(coslat_dst*cos(src_center_lat[srch_add])*
+		     (coslon_dst*cos(src_center_lon[srch_add]) +
+                      sinlon_dst*sin(src_center_lon[srch_add]))+
+		      sinlat_dst*sin(src_center_lat[srch_add]));
+
+      if ( distance < dist_min )
+	{
+          for ( n = 0; n < 4; ++n )
+	    {
+	      if ( distance < nbr_dist[n] )
+		{
+		  for ( i = 3; i > n; --i )
+		    {
+		      nbr_add [i] = nbr_add [i-1];
+		      nbr_dist[i] = nbr_dist[i-1];
+		    }
+		  search_result = -1;
+		  nbr_add [n] = srch_add;
+		  nbr_dist[n] = distance;
+		  dist_min = nbr_dist[3];
+		  break;
+		}
+	    }
+        }
+    }
+
+  for ( n = 0; n < 4; ++n ) nbr_dist[n] = ONE/(nbr_dist[n] + TINY);
+  distance = 0.0;
+  for ( n = 0; n < 4; ++n ) distance += nbr_dist[n];
+  for ( n = 0; n < 4; ++n ) nbr_dist[n] /= distance;
+
+  return (search_result);
+}
+
+
+int grid_search(remapgrid_t *src_grid, int *restrict src_add, double *restrict src_lats, 
+		double *restrict src_lons,  double plat, double plon, const int *restrict src_grid_dims,
+		const double *restrict src_center_lat, const double *restrict src_center_lon,
+		const restr_t *restrict src_grid_bound_box, const int *restrict src_bin_add)
+{
+  /*
+    Output variables:
+
+    int    src_add[4]              ! address of each corner point enclosing P
+    double src_lats[4]             ! latitudes  of the four corner points
+    double src_lons[4]             ! longitudes of the four corner points
+
+    Input variables:
+
+    double plat                    ! latitude  of the search point
+    double plon                    ! longitude of the search point
+
+    int src_grid_dims[2]           ! size of each src grid dimension
+
+    double src_center_lat[]        ! latitude  of each src grid center 
+    double src_center_lon[]        ! longitude of each src grid center
+
+    restr_t src_grid_bound_box[][4] ! bound box for source grid
+
+    int src_bin_add[][2]           ! latitude bins for restricting
+  */
+  /*  Local variables */
+  long n, n2, next_n, srch_add, srch_add4;    /* dummy indices                    */
+  long nx, ny;                                /* dimensions of src grid           */
+  long min_add, max_add;                      /* addresses for restricting search */
+  long i, j, jp1, ip1, n_add, e_add, ne_add;  /* addresses                        */
+  long nbins;
+  /* Vectors for cross-product check */
+  double vec1_lat, vec1_lon;
+  double vec2_lat, vec2_lon, cross_product;
+  int scross[4], scross_last = 0;
+  int search_result = 0;
+  restr_t rlat, rlon;
+  restr_t *bin_lats = src_grid->bin_lats;
+
+  nbins = src_grid->num_srch_bins;
+
+  rlat = RESTR_SCALE(plat);
+  rlon = RESTR_SCALE(plon);
+
+  /* restrict search first using bins */
+
+  for ( n = 0; n < 4; ++n ) src_add[n] = 0;
+
+  min_add = src_grid->size-1;
+  max_add = 0;
+
+  for ( n = 0; n < nbins; ++n )
+    {
+      n2 = n<<1;
+      if ( rlat >= bin_lats[n2] && rlat <= bin_lats[n2+1] )
+	{
+	  if ( src_bin_add[n2  ] < min_add ) min_add = src_bin_add[n2  ];
+	  if ( src_bin_add[n2+1] > max_add ) max_add = src_bin_add[n2+1];
+	}
+    }
+ 
+  /* Now perform a more detailed search */
+
+  nx = src_grid_dims[0];
+  ny = src_grid_dims[1];
+
+  /* srch_loop */
+  for ( srch_add = min_add; srch_add <= max_add; ++srch_add )
+    {
+      srch_add4 = srch_add<<2;
+      /* First check bounding box */
+      if ( rlon >= src_grid_bound_box[srch_add4+2] &&
+	   rlon <= src_grid_bound_box[srch_add4+3] &&
+	   rlat >= src_grid_bound_box[srch_add4  ] &&
+	   rlat <= src_grid_bound_box[srch_add4+1])
+	{
+	  /* We are within bounding box so get really serious */
+
+          /* Determine neighbor addresses */
+          j = srch_add/nx;
+          i = srch_add - j*nx;
+
+          if ( i < (nx-1) )
+            ip1 = i + 1;
+          else
+	    {
+	      /* 2009-01-09 Uwe Schulzweida: bug fix */
+	      if ( src_grid->is_cyclic )
+		ip1 = 0;
+	      else
+		ip1 = i;
+	    }
+
+          if ( j < (ny-1) )
+            jp1 = j + 1;
+          else
+	    {
+	      /* 2008-12-17 Uwe Schulzweida: latitute cyclic ??? (bug fix) */
+	      jp1 = j;
+	    }
+
+          n_add  = jp1*nx + i;
+          e_add  = j  *nx + ip1;
+	  ne_add = jp1*nx + ip1;
+
+          src_lons[0] = src_center_lon[srch_add];
+          src_lons[1] = src_center_lon[e_add];
+          src_lons[2] = src_center_lon[ne_add];
+          src_lons[3] = src_center_lon[n_add];
+
+          src_lats[0] = src_center_lat[srch_add];
+          src_lats[1] = src_center_lat[e_add];
+          src_lats[2] = src_center_lat[ne_add];
+          src_lats[3] = src_center_lat[n_add];
+
+	  /* For consistency, we must make sure all lons are in same 2pi interval */
+
+          vec1_lon = src_lons[0] - plon;
+          if      ( vec1_lon >  PI ) src_lons[0] -= PI2;
+          else if ( vec1_lon < -PI ) src_lons[0] += PI2;
+
+          for ( n = 1; n < 4; ++n )
+	    {
+	      vec1_lon = src_lons[n] - src_lons[0];
+	      if      ( vec1_lon >  PI ) src_lons[n] -= PI2;
+	      else if ( vec1_lon < -PI ) src_lons[n] += PI2;
+	    }
+
+          /* corner_loop */
+          for ( n = 0; n < 4; ++n )
+	    {
+	      next_n = (n+1)%4;
+
+	      /*
+		Here we take the cross product of the vector making 
+		up each box side with the vector formed by the vertex
+		and search point.  If all the cross products are 
+		positive, the point is contained in the box.
+	      */
+	      vec1_lat = src_lats[next_n] - src_lats[n];
+	      vec1_lon = src_lons[next_n] - src_lons[n];
+	      vec2_lat = plat - src_lats[n];
+	      vec2_lon = plon - src_lons[n];
+
+	      /* Check for 0,2pi crossings */
+
+	      if      ( vec1_lon >  THREE*PIH ) vec1_lon -= PI2;
+	      else if ( vec1_lon < -THREE*PIH ) vec1_lon += PI2;
+
+	      if      ( vec2_lon >  THREE*PIH ) vec2_lon -= PI2;
+	      else if ( vec2_lon < -THREE*PIH ) vec2_lon += PI2;
+
+	      cross_product = vec1_lon*vec2_lat - vec2_lon*vec1_lat;
+
+	      /* If cross product is less than ZERO, this cell doesn't work    */
+	      /* 2008-10-16 Uwe Schulzweida: bug fix for cross_product eq zero */
+
+	      scross[n] = cross_product < 0 ? -1 : cross_product > 0 ? 1 : 0;
+
+	      if ( n == 0 ) scross_last = scross[n];
+
+	      if ( (scross[n] < 0 && scross_last > 0) || (scross[n] > 0 && scross_last < 0) ) break;
+
+	      scross_last = scross[n];
+	    } /* corner_loop */
+
+	  if ( n >= 4 )
+	    {
+	      n = 0;
+	      if      ( scross[0]>=0 && scross[1]>=0 && scross[2]>=0 && scross[3]>=0 ) n = 4;
+	      else if ( scross[0]<=0 && scross[1]<=0 && scross[2]<=0 && scross[3]<=0 ) n = 4;
+	    }
+
+	  /* If cross products all same sign, we found the location */
+          if ( n >= 4 )
+	    {
+	      src_add[0] = srch_add;
+	      src_add[1] = e_add;
+	      src_add[2] = ne_add;
+	      src_add[3] = n_add;
+
+	      search_result = 1;
+
+	      return (search_result);
+	    }
+
+	  /* Otherwise move on to next cell */
+
+        } /* Bounding box check */
+    } /* srch_loop */
+
+  /*
+    If no cell found, point is likely either in a box that straddles either pole or is outside 
+    the grid. Fall back to a distance-weighted average of the four closest points.
+    Go ahead and compute weights here, but store in src_lats and return -add to prevent the 
+    parent routine from computing bilinear weights.
+  */
+  if ( !src_grid->lextrapolate ) return (search_result);
+
+  /*
+    printf("Could not find location for %g %g\n", plat*RAD2DEG, plon*RAD2DEG);
+    printf("Using nearest-neighbor average for this point\n");
+  */
+  search_result = grid_search_nn(min_add, max_add, src_add, src_lats, plat, plon, src_center_lat, src_center_lon);
+
+  return (search_result);
+}  /* grid_search */
diff --git a/src/remap_search_reg2d.c b/src/remap_search_reg2d.c
new file mode 100644
index 0000000..2d9d571
--- /dev/null
+++ b/src/remap_search_reg2d.c
@@ -0,0 +1,185 @@
+#include "cdo.h"
+#include "remap.h"
+
+
+long find_element(double x, long nelem, const double *restrict array);
+int rect_grid_search(long *ii, long *jj, double x, double y, long nxm, long nym, const double *restrict xm, const double *restrict ym);
+
+
+int grid_search_reg2d_nn(long nx, long ny, int *restrict nbr_add, double *restrict nbr_dist, double plat, double plon,
+			 const double *restrict src_center_lat, const double *restrict src_center_lon)
+{
+  int search_result = 0;
+  long n, srch_add;
+  long i;
+  long ii, jj;
+  long jjskip;
+  double coslat, sinlat;
+  double dist_min, distance; /* For computing dist-weighted avg */
+  double *sincoslon;
+  double coslat_dst = cos(plat);
+  double sinlat_dst = sin(plat);
+  double coslon_dst = cos(plon);
+  double sinlon_dst = sin(plon);
+
+  dist_min = BIGNUM;
+  for ( n = 0; n < 4; ++n ) nbr_dist[n] = BIGNUM;  
+
+  long jjf = 0, jjl = ny-1;
+  if ( plon >= src_center_lon[0] && plon <= src_center_lon[nx-1] )
+    {
+      if ( src_center_lat[0] < src_center_lat[ny-1] )
+	{
+	  if ( plat <= src_center_lat[0] )
+	    { jjf = 0; jjl = 1; }
+	  else
+	    { jjf = ny-2; jjl = ny-1; }
+	}
+      else
+	{
+	  if ( plat >= src_center_lat[0] )
+	    { jjf = 0; jjl = 1; }
+	  else
+	    { jjf = ny-2; jjl = ny-1; }
+	}
+    }
+
+  sincoslon = (double*) malloc(nx*sizeof(double));
+
+  for ( ii = 0; ii < nx; ++ii )
+    sincoslon[ii] = coslon_dst*cos(src_center_lon[ii]) + sinlon_dst*sin(src_center_lon[ii]);
+
+  for ( jj = jjf; jj <= jjl; ++jj )
+    {
+      coslat = coslat_dst*cos(src_center_lat[jj]);
+      sinlat = sinlat_dst*sin(src_center_lat[jj]);
+
+      jjskip = jj > 1 && jj < (ny-2);
+
+      for ( ii = 0; ii < nx; ++ii )
+	{
+	  if ( jjskip && ii > 1 && ii < (nx-2) ) continue;
+
+	  srch_add = jj*nx + ii;
+
+	  distance = acos(coslat*sincoslon[ii] + sinlat);
+
+	  if ( distance < dist_min )
+	    {
+	      for ( n = 0; n < 4; ++n )
+		{
+		  if ( distance < nbr_dist[n] )
+		    {
+		      for ( i = 3; i > n; --i )
+			{
+			  nbr_add [i] = nbr_add [i-1];
+			  nbr_dist[i] = nbr_dist[i-1];
+			}
+		      search_result = -1;
+		      nbr_add [n] = srch_add;
+		      nbr_dist[n] = distance;
+		      dist_min = nbr_dist[3];
+		      break;
+		    }
+		}
+	    }
+	}
+    }
+
+  free(sincoslon);
+
+  for ( n = 0; n < 4; ++n ) nbr_dist[n] = ONE/(nbr_dist[n] + TINY);
+  distance = 0.0;
+  for ( n = 0; n < 4; ++n ) distance += nbr_dist[n];
+  for ( n = 0; n < 4; ++n ) nbr_dist[n] /= distance;
+
+  return (search_result);
+}
+
+
+int grid_search_reg2d(remapgrid_t *src_grid, int *restrict src_add, double *restrict src_lats, 
+		      double *restrict src_lons,  double plat, double plon, const int *restrict src_grid_dims,
+		      const double *restrict src_center_lat, const double *restrict src_center_lon)
+{
+  /*
+    Output variables:
+
+    int    src_add[4]              ! address of each corner point enclosing P
+    double src_lats[4]             ! latitudes  of the four corner points
+    double src_lons[4]             ! longitudes of the four corner points
+
+    Input variables:
+
+    double plat                    ! latitude  of the search point
+    double plon                    ! longitude of the search point
+
+    int src_grid_dims[2]           ! size of each src grid dimension
+
+    double src_center_lat[]        ! latitude  of each src grid center 
+    double src_center_lon[]        ! longitude of each src grid center
+  */
+  /*  Local variables */
+  int search_result = 0;
+  int lfound;
+  long n;
+  long nx, nxm, ny;
+  long ii, iix, jj;
+
+  for ( n = 0; n < 4; ++n ) src_add[n] = 0;
+
+  nx = src_grid_dims[0];
+  ny = src_grid_dims[1];
+
+  nxm = nx;
+  if ( src_grid->is_cyclic ) nxm++;
+
+  if ( /*plon < 0   &&*/ plon < src_center_lon[0]     ) plon += PI2;
+  if ( /*plon > PI2 &&*/ plon > src_center_lon[nxm-1] ) plon -= PI2;
+
+  lfound = rect_grid_search(&ii, &jj, plon, plat, nxm, ny, src_center_lon, src_center_lat);
+
+  if ( lfound )
+    {
+      iix = ii;
+      if ( src_grid->is_cyclic && iix == (nxm-1) ) iix = 0;
+      src_add[0] = (jj-1)*nx+(ii-1);
+      src_add[1] = (jj-1)*nx+(iix);
+      src_add[2] = (jj)*nx+(iix);
+      src_add[3] = (jj)*nx+(ii-1);
+
+      src_lons[0] = src_center_lon[ii-1];
+      src_lons[1] = src_center_lon[iix];
+      /* For consistency, we must make sure all lons are in same 2pi interval */
+      if ( src_lons[0] > PI2 ) src_lons[0] -= PI2;
+      if ( src_lons[0] < 0   ) src_lons[0] += PI2;
+      if ( src_lons[1] > PI2 ) src_lons[1] -= PI2;
+      if ( src_lons[1] < 0   ) src_lons[1] += PI2;
+      src_lons[2] = src_lons[1];
+      src_lons[3] = src_lons[0];
+
+      src_lats[0] = src_center_lat[jj-1];
+      src_lats[1] = src_lats[0];
+      src_lats[2] = src_center_lat[jj];
+      src_lats[3] = src_lats[2];
+
+      search_result = 1;
+      
+      return (search_result);
+    }
+
+  /*
+    If no cell found, point is likely either in a box that straddles either pole or is outside 
+    the grid. Fall back to a distance-weighted average of the four closest points.
+    Go ahead and compute weights here, but store in src_lats and return -add to prevent the 
+    parent routine from computing bilinear weights.
+  */
+  if ( !src_grid->lextrapolate ) return (search_result);
+
+  /*
+    printf("Could not find location for %g %g\n", plat*RAD2DEG, plon*RAD2DEG);
+    printf("Using nearest-neighbor average for this point\n");
+  */
+  search_result = grid_search_reg2d_nn(nx, ny, src_add, src_lats, plat, plon, src_center_lat, src_center_lon);
+
+  return (search_result);
+}  /* grid_search_reg2d */
diff --git a/src/remap_store_link.c b/src/remap_store_link.c
new file mode 100644
index 0000000..ac2c6f9
--- /dev/null
+++ b/src/remap_store_link.c
@@ -0,0 +1,290 @@
+#include "cdo.h"
+#include "cdo_int.h"
+#include "remap.h"
+#include "remap_store_link.h"
+
+
+int  remap_store_link_fast = TRUE;
+
+
+void grid_store_init(grid_store_t* grid_store, long gridsize)
+{
+  long iblk;
+  long blksize[] = {128, 256, 512, 1024, 2048, 4096, 8192};
+  long nblks = sizeof(blksize)/sizeof(long);
+  long nblocks;
+
+  for ( iblk = nblks-1; iblk >= 0; --iblk )
+    if ( gridsize/blksize[iblk] > 99 ) break;
+
+  if ( iblk < 0 ) iblk = 0;
+
+  /* grid_store->blk_size = BLK_SIZE; */
+  grid_store->blk_size = blksize[iblk];
+  grid_store->max_size = gridsize;
+
+  grid_store->nblocks = grid_store->max_size/grid_store->blk_size;
+  if ( grid_store->max_size%grid_store->blk_size > 0 ) grid_store->nblocks++;
+
+  if ( cdoVerbose )
+    fprintf(stdout, "blksize = %d  lastblksize = %d  max_size = %d  nblocks = %d\n", 
+	    grid_store->blk_size, grid_store->max_size%grid_store->blk_size, 
+	    grid_store->max_size, grid_store->nblocks);
+
+  grid_store->blksize = (int*) malloc(grid_store->nblocks*sizeof(int));
+  grid_store->nlayers = (int*) malloc(grid_store->nblocks*sizeof(int));
+  grid_store->layers  = (grid_layer_t **) malloc(grid_store->nblocks*sizeof(grid_layer_t *));
+
+  nblocks = grid_store->nblocks;
+  for ( iblk = 0; iblk < nblocks; ++iblk )
+    {
+      grid_store->blksize[iblk] = grid_store->blk_size;
+      grid_store->nlayers[iblk] = 0;
+      grid_store->layers[iblk]  = NULL;
+    }
+  if ( grid_store->max_size%grid_store->blk_size > 0 )
+    grid_store->blksize[grid_store->nblocks-1] = grid_store->max_size%grid_store->blk_size;
+}
+
+
+void grid_store_delete(grid_store_t* grid_store)
+{
+  grid_layer_t *grid_layer, *grid_layer_f;
+  long j;
+  long nblocks = grid_store->nblocks;
+
+  for ( long iblk = 0; iblk < nblocks; ++iblk )
+    {
+      j = 0;
+      grid_layer = grid_store->layers[iblk];
+      long nlayers = grid_store->nlayers[iblk];
+      long blksize =  grid_store->blksize[iblk];
+      for ( long ilayer = 0; ilayer < nlayers; ++ilayer )
+	{
+	  if ( cdoVerbose )
+	    {
+	      for ( long i = 0; i < blksize; ++i )
+		if ( grid_layer->grid2_link[i] != -1 ) j++;
+	    }
+	      
+	  grid_layer_f = grid_layer;
+	  free(grid_layer->grid2_link);
+	  grid_layer = grid_layer->next;
+	  free(grid_layer_f);
+	}
+
+      if ( cdoVerbose )
+	{
+	  fprintf(stderr, "block = %ld nlayers = %ld  allocated = %ld  used = %ld\n",
+		  iblk+1, nlayers, nlayers*blksize, j);
+	}
+    }
+
+  free(grid_store->blksize);
+  free(grid_store->layers);
+  free(grid_store->nlayers);  
+}
+
+/*
+    This routine stores the address and weight for this link in the appropriate 
+    address and weight arrays and resizes those arrays if necessary.
+*/
+void store_link_cnsrv_fast(remapvars_t* rv, long add1, long add2, long num_wts, double* weights, grid_store_t* grid_store)
+{
+  /*
+    Input variables:
+    int  add1         ! address on source grid
+    int  add2         ! address on target grid
+    double weights[]  ! array of remapping weights for this link
+  */
+  /* Local variables */
+  long nlink; /* link index */
+  long ilayer, i, iblk, iadd2;
+  long nlayer, blksize;
+  int lstore_link;
+  grid_layer_t *grid_layer, **grid_layer2;
+
+  /*  If all weights are ZERO, do not bother storing the link */
+
+  if ( num_wts == 3 )
+    {
+      if ( IS_EQUAL(weights[0], 0) && IS_EQUAL(weights[1], 0) && IS_EQUAL(weights[2], 0) ) return;
+    }
+  else
+    {
+      if ( IS_EQUAL(weights[0], 0) ) return;
+    }
+    
+  /* If the link already exists, add the weight to the current weight arrays */
+
+  iblk  = BLK_NUM(add2);
+  iadd2 = BLK_IDX(add2);
+
+  lstore_link = FALSE;
+  grid_layer2 = &grid_store->layers[iblk];
+  nlayer = grid_store->nlayers[iblk];
+  for ( ilayer = 0; ilayer < nlayer; ++ilayer )
+    {
+      grid_layer = *grid_layer2;
+      nlink = grid_layer->grid2_link[iadd2];
+      if ( nlink == -1 )
+	{
+	  break;
+	}
+      else if ( add1 == rv->src_grid_add[nlink] )
+	{
+	  lstore_link = TRUE;
+	  break;
+	}
+      grid_layer2 = &(*grid_layer2)->next;
+    }
+
+  if ( lstore_link )
+    {
+      for ( i = 0; i < num_wts; ++i ) rv->wts[num_wts*nlink+i] += weights[i];	      
+      return;
+    }
+
+  /*
+     If the link does not yet exist, increment number of links and 
+     check to see if remap arrays need to be increased to accomodate 
+     the new link. Then store the link.
+  */
+  nlink = rv->num_links;
+
+  if ( ilayer < grid_store->nlayers[iblk] )
+    {
+      grid_layer->grid2_link[iadd2] = nlink;
+    }
+  else
+    {
+      grid_layer = (grid_layer_t*) malloc(sizeof(grid_layer_t));
+      grid_layer->next = NULL;
+      grid_layer->grid2_link = (int*) malloc(grid_store->blksize[iblk]*sizeof(int));
+
+      blksize = grid_store->blksize[iblk];
+      for ( i = 0; i < blksize; ++i )
+	grid_layer->grid2_link[i] = -1;
+
+      grid_layer->grid2_link[iadd2] = nlink;
+      *grid_layer2 = grid_layer;
+      grid_store->nlayers[iblk]++;
+    }
+
+  rv->num_links++;
+  if ( rv->num_links >= rv->max_links )
+    resize_remap_vars(rv, rv->resize_increment);
+
+  rv->src_grid_add[nlink] = add1;
+  rv->tgt_grid_add[nlink] = add2;
+
+  for ( i = 0; i < num_wts; ++i ) rv->wts[num_wts*nlink+i] = weights[i];	      
+
+}  /* store_link_cnsrv_fast */
+
+
+/*
+    This routine stores the address and weight for this link in the appropriate 
+    address and weight arrays and resizes those arrays if necessary.
+*/
+void store_link_cnsrv(remapvars_t *rv, long add1, long add2, double *restrict weights, int *link_add1[2], int *link_add2[2])
+{
+  /*
+    Input variables:
+    int  add1         ! address on source grid
+    int  add2         ! address on target grid
+    double weights[3] ! array of remapping weights for this link
+  */
+  /* Local variables */
+  long nlink, min_link, max_link; /* link index */
+
+  /*  If all weights are ZERO, do not bother storing the link */
+
+  if ( IS_EQUAL(weights[0], 0) && IS_EQUAL(weights[1], 0) && IS_EQUAL(weights[2], 0) ) return;
+
+  /*  Restrict the range of links to search for existing links */
+
+  min_link = MIN(link_add1[0][add1], link_add2[0][add2]);
+  max_link = MAX(link_add1[1][add1], link_add2[1][add2]);
+  if ( min_link == -1 )
+    {
+      min_link = 0;
+      max_link = -1;
+    }
+
+  /* If the link already exists, add the weight to the current weight arrays */
+
+#if defined(SX)
+#define STRIPED 1
+#if STRIPED
+#define STRIPLENGTH 4096
+  {
+    long ilink = max_link + 1;
+    long strip, estrip;
+    nlink = 0;
+    for ( strip=min_link; strip <= max_link; strip+=STRIPLENGTH )
+      {
+	estrip = MIN(max_link-strip+1, STRIPLENGTH);
+	for ( nlink = 0; nlink < estrip; ++nlink )
+	  {
+	    if ( add2 == rv->tgt_grid_add[strip+nlink] &&
+		 add1 == rv->src_grid_add[strip+nlink] )
+	      ilink = strip + nlink;
+	  }
+	if (ilink != (max_link + 1)) break;
+      }
+    nlink += strip;
+    if (ilink != (max_link + 1)) nlink = ilink;
+  }
+#else
+  {
+    long ilink = max_link + 1;
+    for ( nlink = min_link; nlink <= max_link; ++nlink )
+      {
+	if ( add2 == rv->tgt_grid_add[nlink] )
+	  if ( add1 == rv->src_grid_add[nlink] ) ilink = nlink;
+      }
+    if ( ilink != (max_link + 1) ) nlink = ilink;
+  }
+#endif
+#else
+  for ( nlink = min_link; nlink <= max_link; ++nlink )
+    {
+      if ( add2 == rv->tgt_grid_add[nlink] )
+	if ( add1 == rv->src_grid_add[nlink] ) break;
+    }
+#endif
+
+  if ( nlink <= max_link )
+    {
+      rv->wts[3*nlink  ] += weights[0];
+      rv->wts[3*nlink+1] += weights[1];
+      rv->wts[3*nlink+2] += weights[2];
+
+      return;
+    }
+
+  /*
+     If the link does not yet exist, increment number of links and 
+     check to see if remap arrays need to be increased to accomodate 
+     the new link. Then store the link.
+  */
+  nlink = rv->num_links;
+
+  rv->num_links++;
+  if ( rv->num_links >= rv->max_links )
+    resize_remap_vars(rv, rv->resize_increment);
+
+  rv->src_grid_add[nlink] = add1;
+  rv->tgt_grid_add[nlink] = add2;
+
+  rv->wts[3*nlink  ] = weights[0];
+  rv->wts[3*nlink+1] = weights[1];
+  rv->wts[3*nlink+2] = weights[2];
+
+  if ( link_add1[0][add1] == -1 ) link_add1[0][add1] = (int)nlink;
+  if ( link_add2[0][add2] == -1 ) link_add2[0][add2] = (int)nlink;
+  link_add1[1][add1] = (int)nlink;
+  link_add2[1][add2] = (int)nlink;
+
+}  /* store_link_cnsrv */
diff --git a/src/remap_store_link.h b/src/remap_store_link.h
new file mode 100644
index 0000000..ed3f223
--- /dev/null
+++ b/src/remap_store_link.h
@@ -0,0 +1,35 @@
+#ifndef _REMAP_STORE_LINK_H
+#define _REMAP_STORE_LINK_H
+
+extern int  remap_store_link_fast;
+
+/* used for store_link_fast */
+
+#define BLK_SIZE 4096
+#define BLK_NUM(x) (x/grid_store->blk_size)
+#define BLK_IDX(x) (x%grid_store->blk_size)
+struct grid_layer
+{
+  int *grid2_link;
+  struct grid_layer *next;
+};
+
+typedef struct grid_layer grid_layer_t;
+
+typedef struct
+{
+  int blk_size;
+  int max_size;
+  int nblocks;
+  int *blksize;
+  int *nlayers;
+  grid_layer_t **layers;
+} grid_store_t;
+
+void grid_store_init(grid_store_t *grid_store, long gridsize);
+void grid_store_delete(grid_store_t *grid_store);
+
+void store_link_cnsrv_fast(remapvars_t *rv, long add1, long add2, long num_wts, double *weights, grid_store_t *grid_store);
+void store_link_cnsrv(remapvars_t *rv, long add1, long add2, double *restrict weights, int *link_add1[2], int *link_add2[2]);
+
+#endif  /* _REMAP_STORE_LINK */
diff --git a/src/remaplib.c b/src/remaplib.c
index 4d10601..de60327 100644
--- a/src/remaplib.c
+++ b/src/remaplib.c
@@ -57,60 +57,18 @@
 #include "cdo_int.h"
 #include "grid.h"
 #include "remap.h"
+#include "remap_store_link.h"
 #include "util.h"  /* progressStatus */
 
 
 #define IS_REG2D_GRID(gridID)  (!gridIsRotated(gridID) && (gridInqType(gridID) == GRID_LONLAT || gridInqType(gridID) == GRID_GAUSSIAN))
 
-/* used for store_link_fast */
 
-#define BLK_SIZE 4096
-#define BLK_NUM(x) (x/grid_store->blk_size)
-#define BLK_IDX(x) (x%grid_store->blk_size)
-struct grid_layer
-{
-  int *grid2_link;
-  struct grid_layer *next;
-};
-
-typedef struct grid_layer grid_layer_t;
-
-typedef struct
-{
-  int blk_size;
-  int max_size;
-  int nblocks;
-  int *blksize;
-  int *nlayers;
-  grid_layer_t **layers;
-} grid_store_t;
-
-
-/* constants */
-
-/* #define  BABY_STEP  0.001 */ /* original value */
-#define  BABY_STEP  0.001
-
-#define  ZERO     0.0
-#define  ONE      1.0
-#define  TWO      2.0
-#define  THREE    3.0
-#define  HALF     0.5
-#define  QUART    0.25
-#define  BIGNUM   1.e+20
-#define  TINY     1.e-14
 
-
-#define  REMAP_GRID_TYPE_REG2D     1
-#define  REMAP_GRID_TYPE_CURVE2D   2
-#define  REMAP_GRID_TYPE_UNSTRUCT  3
-
-
-static int  remap_store_link_fast = TRUE;
 static int  remap_write_remap     = FALSE;
 static int  remap_num_srch_bins   = 180;
 #define  DEFAULT_MAX_ITER  100
-static long remap_max_iter        = DEFAULT_MAX_ITER;  /* Max iteration count for i, j iteration */
+long remap_max_iter        = DEFAULT_MAX_ITER;  /* Max iteration count for i, j iteration */
 
 void remap_set_int(int remapvar, int value)
 {
@@ -121,17 +79,8 @@ void remap_set_int(int remapvar, int value)
   else      cdoAbort("Unsupported remap variable (%d)!", remapvar);
 }
 
-/* static double north_thresh =  1.45;  */ /* threshold for coord transformation */
-/* static double south_thresh = -2.00;  */ /* threshold for coord transformation */
-static double north_thresh =  2.00;  /* threshold for coord transformation */
-static double south_thresh = -2.00;  /* threshold for coord transformation */
-
 double intlin(double x, double y1, double x1, double y2, double x2);
 
-extern int timer_remap, timer_remap_con, timer_remap_con_l1, timer_remap_con_l2;
-extern int timer_remap_bil, timer_remap_nn;
-
-
 void remapGridFree(remapgrid_t *grid)
 {
   if ( grid->vgpm ) free(grid->vgpm);
@@ -240,23 +189,23 @@ void remapGridRealloc(int map_type, remapgrid_t *grid)
   long nalloc;
 
   if ( grid->nvgp )
-    grid->vgpm   = realloc(grid->vgpm, grid->nvgp*sizeof(int));
+    grid->vgpm   = (int*) realloc(grid->vgpm, grid->nvgp*sizeof(int));
 
-  grid->mask     = realloc(grid->mask, grid->size*sizeof(int));
+  grid->mask     = (int*) realloc(grid->mask, grid->size*sizeof(int));
 
   if ( remap_write_remap == TRUE || grid->remap_grid_type != REMAP_GRID_TYPE_REG2D )
     {
-      grid->cell_center_lon = realloc(grid->cell_center_lon, grid->size*sizeof(double));
-      grid->cell_center_lat = realloc(grid->cell_center_lat, grid->size*sizeof(double));
+      grid->cell_center_lon = (double*) realloc(grid->cell_center_lon, grid->size*sizeof(double));
+      grid->cell_center_lat = (double*) realloc(grid->cell_center_lat, grid->size*sizeof(double));
     }
 
-  if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSPHERE )
+  if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSERV_YAC )
     {
-      grid->cell_area = realloc(grid->cell_area, grid->size*sizeof(double));
+      grid->cell_area = (double*) realloc(grid->cell_area, grid->size*sizeof(double));
       memset(grid->cell_area, 0, grid->size*sizeof(double));
     }
 
-  grid->cell_frac = realloc(grid->cell_frac, grid->size*sizeof(double));
+  grid->cell_frac = (double*) realloc(grid->cell_frac, grid->size*sizeof(double));
   memset(grid->cell_frac, 0, grid->size*sizeof(double));
 
   if ( grid->lneed_cell_corners )
@@ -269,10 +218,10 @@ void remapGridRealloc(int map_type, remapgrid_t *grid)
 	{
 	  nalloc = grid->num_cell_corners*grid->size;
 
-	  grid->cell_corner_lon = realloc(grid->cell_corner_lon, nalloc*sizeof(double));
+	  grid->cell_corner_lon = (double*) realloc(grid->cell_corner_lon, nalloc*sizeof(double));
 	  memset(grid->cell_corner_lon, 0, nalloc*sizeof(double));
 
-	  grid->cell_corner_lat = realloc(grid->cell_corner_lat, nalloc*sizeof(double));  
+	  grid->cell_corner_lat = (double*) realloc(grid->cell_corner_lat, nalloc*sizeof(double));  
 	  memset(grid->cell_corner_lat, 0, nalloc*sizeof(double));
 	}
     }
@@ -508,8 +457,8 @@ int expand_lonlat_grid(int gridID)
   nxp4 = nx+4;
   nyp4 = ny+4;
 
-  xvals = malloc(nxp4*sizeof(double));
-  yvals = malloc(nyp4*sizeof(double));
+  xvals = (double*) malloc(nxp4*sizeof(double));
+  yvals = (double*) malloc(nyp4*sizeof(double));
   gridInqXvals(gridID, xvals+2);
   gridInqYvals(gridID, yvals+2);
 
@@ -542,6 +491,7 @@ int expand_lonlat_grid(int gridID)
     {
       gridDefXpole(gridIDnew, gridInqXpole(gridID));
       gridDefYpole(gridIDnew, gridInqYpole(gridID));
+      gridDefAngle(gridIDnew, gridInqAngle(gridID));
     }
 
   return(gridIDnew);
@@ -564,8 +514,8 @@ int expand_curvilinear_grid(int gridID)
   nyp4 = ny+4;
   gridsize_new = gridsize + 4*(nx+2) + 4*(ny+2);
 
-  xvals = malloc(gridsize_new*sizeof(double));
-  yvals = malloc(gridsize_new*sizeof(double));
+  xvals = (double*) malloc(gridsize_new*sizeof(double));
+  yvals = (double*) malloc(gridsize_new*sizeof(double));
   gridInqXvals(gridID, xvals);
   gridInqYvals(gridID, yvals);
 
@@ -666,9 +616,11 @@ void remap_define_reg2d(int gridID, remapgrid_t *grid)
 
   if ( grid->size != nx*ny ) cdoAbort("Internal error, wrong dimensions!");
 
-  grid->reg2d_center_lon = realloc(grid->reg2d_center_lon, nxm*sizeof(double));
-  grid->reg2d_center_lat = realloc(grid->reg2d_center_lat,  ny*sizeof(double));
+  grid->reg2d_center_lon = (double*) realloc(grid->reg2d_center_lon, nxm*sizeof(double));
+  grid->reg2d_center_lat = (double*) realloc(grid->reg2d_center_lat,  ny*sizeof(double));
  
+  grid->reg2d_center_lon[0] = 0;
+  grid->reg2d_center_lat[0] = 0;
   gridInqXvals(gridID, grid->reg2d_center_lon);
   gridInqYvals(gridID, grid->reg2d_center_lat);
 
@@ -681,8 +633,8 @@ void remap_define_reg2d(int gridID, remapgrid_t *grid)
 
   if ( grid->is_cyclic ) grid->reg2d_center_lon[nx] = grid->reg2d_center_lon[0] + PI2;
 
-  grid->reg2d_corner_lon = malloc(nxp1*sizeof(double));
-  grid->reg2d_corner_lat = malloc(nyp1*sizeof(double));
+  grid->reg2d_corner_lon = (double*) malloc(nxp1*sizeof(double));
+  grid->reg2d_corner_lat = (double*) malloc(nyp1*sizeof(double));
 
   grid_gen_corners(nx, grid->reg2d_center_lon, grid->reg2d_corner_lon);
   grid_gen_corners(ny, grid->reg2d_center_lat, grid->reg2d_corner_lat);
@@ -726,6 +678,8 @@ void remap_define_grid(int map_type, int gridID, remapgrid_t *grid)
 
   grid->dims[0] = gridInqXsize(gridID);
   grid->dims[1] = gridInqYsize(gridID);
+  if ( grid->dims[0] == 0 ) cdoAbort("%s grid without longitude coordinates!", gridNamePtr(gridInqType(grid->gridID)));
+  if ( grid->dims[1] == 0 ) cdoAbort("%s grid without latitude coordinates!", gridNamePtr(gridInqType(grid->gridID)));
 
   grid->is_cyclic = gridIsCircular(gridID);
 
@@ -815,7 +769,7 @@ static
 void cell_bounding_boxes(remapgrid_t *grid, int remap_grid_basis)
 {
   if ( remap_grid_basis == REMAP_GRID_BASIS_SRC || grid->luse_cell_corners )
-    grid->cell_bound_box = realloc(grid->cell_bound_box, 4*grid->size*sizeof(restr_t));
+    grid->cell_bound_box = (restr_t*) realloc(grid->cell_bound_box, 4*grid->size*sizeof(restr_t));
 
   if ( grid->luse_cell_corners )
     {
@@ -880,16 +834,16 @@ void remap_grids_init(int map_type, int lextrapolate, int gridID1, remapgrid_t *
   remapgrid_init(tgt_grid);
 
   if ( map_type == MAP_TYPE_BILINEAR || map_type == MAP_TYPE_BICUBIC ||
-       map_type == MAP_TYPE_DISTWGT  || map_type == MAP_TYPE_CONSPHERE )
+       map_type == MAP_TYPE_DISTWGT  || map_type == MAP_TYPE_CONSERV_YAC )
     {
       if ( IS_REG2D_GRID(gridID1) ) src_grid->remap_grid_type = REMAP_GRID_TYPE_REG2D;
       // src_grid->remap_grid_type = 0;
     }
 
-  if ( map_type == MAP_TYPE_CONSPHERE && src_grid->remap_grid_type == REMAP_GRID_TYPE_REG2D )
+  if ( map_type == MAP_TYPE_CONSERV_YAC && src_grid->remap_grid_type == REMAP_GRID_TYPE_REG2D )
     {
       if ( IS_REG2D_GRID(gridID2) ) tgt_grid->remap_grid_type = REMAP_GRID_TYPE_REG2D;
-      else src_grid->remap_grid_type = -1;
+      // else src_grid->remap_grid_type = -1;
     }
 
   if ( lextrapolate > 0 )
@@ -897,7 +851,7 @@ void remap_grids_init(int map_type, int lextrapolate, int gridID1, remapgrid_t *
   else
     src_grid->lextrapolate = FALSE;
 
-  if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSPHERE )
+  if ( map_type == MAP_TYPE_CONSERV || map_type == MAP_TYPE_CONSERV_YAC )
     {
       if ( src_grid->remap_grid_type != REMAP_GRID_TYPE_REG2D )
 	{
@@ -921,6 +875,7 @@ void remap_grids_init(int map_type, int lextrapolate, int gridID1, remapgrid_t *
 	(gridInqType(gridID1) == GRID_LONLAT && src_grid->non_global)) )
     {
       src_grid->gridID = gridID1 = expand_lonlat_grid(gridID1);
+      reg2d_src_gridID = gridID1;
     }
 
   if ( gridInqType(gridID1) == GRID_UNSTRUCTURED )
@@ -1028,7 +983,7 @@ void remap_vars_init(int map_type, long src_grid_size, long tgt_grid_size, remap
   if ( ompNumThreads > 1 )
     {
       if      ( map_type == MAP_TYPE_CONSERV   ) rv->sort_add = TRUE;
-      else if ( map_type == MAP_TYPE_CONSPHERE ) rv->sort_add = TRUE;
+      else if ( map_type == MAP_TYPE_CONSERV_YAC ) rv->sort_add = TRUE;
       else if ( map_type == MAP_TYPE_BILINEAR  ) rv->sort_add = TRUE;
       else if ( map_type == MAP_TYPE_BICUBIC   ) rv->sort_add = TRUE;
       else if ( map_type == MAP_TYPE_DISTWGT   ) rv->sort_add = TRUE;
@@ -1038,15 +993,15 @@ void remap_vars_init(int map_type, long src_grid_size, long tgt_grid_size, remap
 #endif
     {
       if      ( map_type == MAP_TYPE_CONSERV   ) rv->sort_add = TRUE;
-      else if ( map_type == MAP_TYPE_CONSPHERE ) rv->sort_add = TRUE;
+      else if ( map_type == MAP_TYPE_CONSERV_YAC ) rv->sort_add = TRUE;
       else if ( map_type == MAP_TYPE_BILINEAR  ) rv->sort_add = FALSE;
       else if ( map_type == MAP_TYPE_BICUBIC   ) rv->sort_add = FALSE;
-      else if ( map_type == MAP_TYPE_DISTWGT   ) rv->sort_add = TRUE;
+      else if ( map_type == MAP_TYPE_DISTWGT   ) rv->sort_add = FALSE;
       else cdoAbort("Unknown mapping method!");
     }
 
   if      ( map_type == MAP_TYPE_CONSERV   ) rv->num_wts = 3;
-  else if ( map_type == MAP_TYPE_CONSPHERE ) rv->num_wts = 1;
+  else if ( map_type == MAP_TYPE_CONSERV_YAC ) rv->num_wts = 1;
   else if ( map_type == MAP_TYPE_BILINEAR  ) rv->num_wts = 1;
   else if ( map_type == MAP_TYPE_BICUBIC   ) rv->num_wts = 4;
   else if ( map_type == MAP_TYPE_DISTWGT   ) rv->num_wts = 1;
@@ -1065,10 +1020,10 @@ void remap_vars_init(int map_type, long src_grid_size, long tgt_grid_size, remap
 
   /*  Allocate address and weight arrays for mapping 1 */
 
-  rv->src_grid_add = realloc(rv->src_grid_add, rv->max_links*sizeof(int));
-  rv->tgt_grid_add = realloc(rv->tgt_grid_add, rv->max_links*sizeof(int));
+  rv->src_grid_add = (int*) realloc(rv->src_grid_add, rv->max_links*sizeof(int));
+  rv->tgt_grid_add = (int*) realloc(rv->tgt_grid_add, rv->max_links*sizeof(int));
 
-  rv->wts = realloc(rv->wts, rv->num_wts*rv->max_links*sizeof(double));
+  rv->wts = (double*) realloc(rv->wts, rv->num_wts*rv->max_links*sizeof(double));
 
   rv->links.option    = FALSE;
   rv->links.max_links = 0;
@@ -1098,10 +1053,10 @@ void resize_remap_vars(remapvars_t *rv, int increment)
 
   if ( rv->max_links )
     {
-      rv->src_grid_add = realloc(rv->src_grid_add, rv->max_links*sizeof(int));
-      rv->tgt_grid_add = realloc(rv->tgt_grid_add, rv->max_links*sizeof(int));
+      rv->src_grid_add = (int*) realloc(rv->src_grid_add, rv->max_links*sizeof(int));
+      rv->tgt_grid_add = (int*) realloc(rv->tgt_grid_add, rv->max_links*sizeof(int));
 
-      rv->wts = realloc(rv->wts, rv->num_wts*rv->max_links*sizeof(double));
+      rv->wts = (double*) realloc(rv->wts, rv->num_wts*rv->max_links*sizeof(double));
     }
 
 } /* resize_remap_vars */
@@ -1145,6 +1100,7 @@ void remap(double *restrict dst_array, double missval, long dst_size, long num_l
   /* Local variables */
   long n;
   int iorder;
+  extern int timer_remap;
 
   /* Check the order of the interpolation */
 
@@ -1160,7 +1116,7 @@ void remap(double *restrict dst_array, double missval, long dst_size, long num_l
 #ifdef SX
 #pragma cdir nodep
 #endif
-  for ( n = 0; n < num_links; ++n ) dst_array[dst_add[n]] = ZERO;
+  for ( n = 0; n < num_links; ++n ) dst_array[dst_add[n]] = 0.;
 
   if ( iorder == 1 )   /* First order remapping */
     {
@@ -1222,7 +1178,7 @@ long get_max_add(long num_links, long size, const int *restrict add)
   long max_add;
   int *isum;
 
-  isum = malloc(size*sizeof(int));
+  isum = (int*) malloc(size*sizeof(int));
   memset(isum, 0, size*sizeof(int));
 
   for ( n = 0; n < num_links; ++n ) isum[add[n]]++;
@@ -1302,16 +1258,16 @@ void remap_laf(double *restrict dst_array, double missval, long dst_size, long n
   max_cls = get_max_add(num_links, dst_size, dst_add);
 
 #if defined(_OPENMP)
-  src_cls2 = malloc(ompNumThreads*sizeof(double *));
-  src_wts2 = malloc(ompNumThreads*sizeof(double *));
+  src_cls2 = (double **) malloc(ompNumThreads*sizeof(double *));
+  src_wts2 = (double **) malloc(ompNumThreads*sizeof(double *));
   for ( i = 0; i < ompNumThreads; ++i )
     {
-      src_cls2[i] = malloc(max_cls*sizeof(double));
-      src_wts2[i] = malloc(max_cls*sizeof(double));
+      src_cls2[i] = (double*) malloc(max_cls*sizeof(double));
+      src_wts2[i] = (double*) malloc(max_cls*sizeof(double));
     }
 #else
-  src_cls = malloc(max_cls*sizeof(double));
-  src_wts = malloc(max_cls*sizeof(double));
+  src_cls = (double*) malloc(max_cls*sizeof(double));
+  src_wts = (double*) malloc(max_cls*sizeof(double));
 #endif
 
   for ( n = 0; n < num_links; ++n )
@@ -1319,8 +1275,7 @@ void remap_laf(double *restrict dst_array, double missval, long dst_size, long n
 
 #if defined(_OPENMP)
 #pragma omp parallel for default(none) \
-  shared(dst_size, src_cls2, src_wts2, num_links, dst_add, src_add, src_array, map_wts, \
-	 num_wts, dst_array, max_cls)					\
+  shared(dst_size, src_cls2, src_wts2, num_links, dst_add, src_add, src_array, map_wts, num_wts, dst_array, max_cls)					\
   private(i, n, k, ompthID, src_cls, src_wts, ncls, imax, wts) \
   schedule(dynamic,1)
 #endif
@@ -1470,4637 +1425,6 @@ void remap_sum(double *restrict dst_array, double missval, long dst_size, long n
     }
 }
 
-
-static double  converge = 1.e-10;            /* Convergence criterion */
-
-/* threshold for coord transformation */
-void remap_set_threshhold(double threshhold)
-{
-  north_thresh =  threshhold;
-  south_thresh = -threshhold;  
-
-  if ( cdoVerbose ) cdoPrint("threshhold: north=%g  south=%g", north_thresh, south_thresh);
-}
-
-
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-/*                                                                         */
-/*      BILINEAR INTERPOLATION                                             */
-/*                                                                         */
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-
-long find_element(double x, long nelem, const double *restrict array);
-int rect_grid_search(long *ii, long *jj, double x, double y, long nxm, long nym, const double *restrict xm, const double *restrict ym);
-
-static
-int grid_search_reg2d_nn(long nx, long ny, int *restrict nbr_add, double *restrict nbr_dist, double plat, double plon,
-			 const double *restrict src_center_lat, const double *restrict src_center_lon)
-{
-  int search_result = 0;
-  long n, srch_add;
-  long i;
-  long ii, jj;
-  long jjskip;
-  double coslat, sinlat;
-  double dist_min, distance; /* For computing dist-weighted avg */
-  double *sincoslon;
-  double coslat_dst = cos(plat);
-  double sinlat_dst = sin(plat);
-  double coslon_dst = cos(plon);
-  double sinlon_dst = sin(plon);
-
-  dist_min = BIGNUM;
-  for ( n = 0; n < 4; ++n ) nbr_dist[n] = BIGNUM;  
-
-  long jjf = 0, jjl = ny-1;
-  if ( plon >= src_center_lon[0] && plon <= src_center_lon[nx-1] )
-    {
-      if ( src_center_lat[0] < src_center_lat[ny-1] )
-	{
-	  if ( plat <= src_center_lat[0] )
-	    { jjf = 0; jjl = 1; }
-	  else
-	    { jjf = ny-2; jjl = ny-1; }
-	}
-      else
-	{
-	  if ( plat >= src_center_lat[0] )
-	    { jjf = 0; jjl = 1; }
-	  else
-	    { jjf = ny-2; jjl = ny-1; }
-	}
-    }
-
-  sincoslon = malloc(nx*sizeof(double));
-
-  for ( ii = 0; ii < nx; ++ii )
-    sincoslon[ii] = coslon_dst*cos(src_center_lon[ii]) + sinlon_dst*sin(src_center_lon[ii]);
-
-  for ( jj = jjf; jj <= jjl; ++jj )
-    {
-      coslat = coslat_dst*cos(src_center_lat[jj]);
-      sinlat = sinlat_dst*sin(src_center_lat[jj]);
-
-      jjskip = jj > 1 && jj < (ny-2);
-
-      for ( ii = 0; ii < nx; ++ii )
-	{
-	  if ( jjskip && ii > 1 && ii < (nx-2) ) continue;
-
-	  srch_add = jj*nx + ii;
-
-	  distance = acos(coslat*sincoslon[ii] + sinlat);
-
-	  if ( distance < dist_min )
-	    {
-	      for ( n = 0; n < 4; ++n )
-		{
-		  if ( distance < nbr_dist[n] )
-		    {
-		      for ( i = 3; i > n; --i )
-			{
-			  nbr_add [i] = nbr_add [i-1];
-			  nbr_dist[i] = nbr_dist[i-1];
-			}
-		      search_result = -1;
-		      nbr_add [n] = srch_add;
-		      nbr_dist[n] = distance;
-		      dist_min = nbr_dist[3];
-		      break;
-		    }
-		}
-	    }
-	}
-    }
-
-  free(sincoslon);
-
-  for ( n = 0; n < 4; ++n ) nbr_dist[n] = ONE/(nbr_dist[n] + TINY);
-  distance = 0.0;
-  for ( n = 0; n < 4; ++n ) distance += nbr_dist[n];
-  for ( n = 0; n < 4; ++n ) nbr_dist[n] /= distance;
-
-  return (search_result);
-}
-
-static
-int grid_search_reg2d(remapgrid_t *src_grid, int *restrict src_add, double *restrict src_lats, 
-		      double *restrict src_lons,  double plat, double plon, const int *restrict src_grid_dims,
-		      const double *restrict src_center_lat, const double *restrict src_center_lon)
-{
-  /*
-    Output variables:
-
-    int    src_add[4]              ! address of each corner point enclosing P
-    double src_lats[4]             ! latitudes  of the four corner points
-    double src_lons[4]             ! longitudes of the four corner points
-
-    Input variables:
-
-    double plat                    ! latitude  of the search point
-    double plon                    ! longitude of the search point
-
-    int src_grid_dims[2]           ! size of each src grid dimension
-
-    double src_center_lat[]        ! latitude  of each src grid center 
-    double src_center_lon[]        ! longitude of each src grid center
-  */
-  /*  Local variables */
-  int search_result = 0;
-  int lfound;
-  long n;
-  long nx, nxm, ny;
-  long ii, iix, jj;
-
-  for ( n = 0; n < 4; ++n ) src_add[n] = 0;
-
-  nx = src_grid_dims[0];
-  ny = src_grid_dims[1];
-
-  nxm = nx;
-  if ( src_grid->is_cyclic ) nxm++;
-
-  if ( /*plon < 0   &&*/ plon < src_center_lon[0]     ) plon += PI2;
-  if ( /*plon > PI2 &&*/ plon > src_center_lon[nxm-1] ) plon -= PI2;
-
-  lfound = rect_grid_search(&ii, &jj, plon, plat, nxm, ny, src_center_lon, src_center_lat);
-
-  if ( lfound )
-    {
-      iix = ii;
-      if ( src_grid->is_cyclic && iix == (nxm-1) ) iix = 0;
-      src_add[0] = (jj-1)*nx+(ii-1);
-      src_add[1] = (jj-1)*nx+(iix);
-      src_add[2] = (jj)*nx+(iix);
-      src_add[3] = (jj)*nx+(ii-1);
-
-      src_lons[0] = src_center_lon[ii-1];
-      src_lons[1] = src_center_lon[iix];
-      /* For consistency, we must make sure all lons are in same 2pi interval */
-      if ( src_lons[0] > PI2 ) src_lons[0] -= PI2;
-      if ( src_lons[0] < 0   ) src_lons[0] += PI2;
-      if ( src_lons[1] > PI2 ) src_lons[1] -= PI2;
-      if ( src_lons[1] < 0   ) src_lons[1] += PI2;
-      src_lons[2] = src_lons[1];
-      src_lons[3] = src_lons[0];
-
-      src_lats[0] = src_center_lat[jj-1];
-      src_lats[1] = src_lats[0];
-      src_lats[2] = src_center_lat[jj];
-      src_lats[3] = src_lats[2];
-
-      search_result = 1;
-      
-      return (search_result);
-    }
-
-  /*
-    If no cell found, point is likely either in a box that straddles either pole or is outside 
-    the grid. Fall back to a distance-weighted average of the four closest points.
-    Go ahead and compute weights here, but store in src_lats and return -add to prevent the 
-    parent routine from computing bilinear weights.
-  */
-  if ( !src_grid->lextrapolate ) return (search_result);
-
-  /*
-    printf("Could not find location for %g %g\n", plat*RAD2DEG, plon*RAD2DEG);
-    printf("Using nearest-neighbor average for this point\n");
-  */
-  search_result = grid_search_reg2d_nn(nx, ny, src_add, src_lats, plat, plon, src_center_lat, src_center_lon);
-
-  return (search_result);
-}  /* grid_search_reg2d */
-
-
-static
-int grid_search_nn(long min_add, long max_add, int *restrict nbr_add, double *restrict nbr_dist, 
-		   double plat, double plon,
-		   const double *restrict src_center_lat, const double *restrict src_center_lon)
-{
-  int search_result = 0;
-  long n, srch_add;
-  long i;
-  double dist_min, distance; /* For computing dist-weighted avg */
-  double coslat_dst = cos(plat);
-  double sinlat_dst = sin(plat);
-  double coslon_dst = cos(plon);
-  double sinlon_dst = sin(plon);
-
-  dist_min = BIGNUM;
-  for ( n = 0; n < 4; ++n ) nbr_dist[n] = BIGNUM;
-  for ( srch_add = min_add; srch_add <= max_add; ++srch_add )
-    {
-      distance = acos(coslat_dst*cos(src_center_lat[srch_add])*
-		     (coslon_dst*cos(src_center_lon[srch_add]) +
-                      sinlon_dst*sin(src_center_lon[srch_add]))+
-		      sinlat_dst*sin(src_center_lat[srch_add]));
-
-      if ( distance < dist_min )
-	{
-          for ( n = 0; n < 4; ++n )
-	    {
-	      if ( distance < nbr_dist[n] )
-		{
-		  for ( i = 3; i > n; --i )
-		    {
-		      nbr_add [i] = nbr_add [i-1];
-		      nbr_dist[i] = nbr_dist[i-1];
-		    }
-		  search_result = -1;
-		  nbr_add [n] = srch_add;
-		  nbr_dist[n] = distance;
-		  dist_min = nbr_dist[3];
-		  break;
-		}
-	    }
-        }
-    }
-
-  for ( n = 0; n < 4; ++n ) nbr_dist[n] = ONE/(nbr_dist[n] + TINY);
-  distance = 0.0;
-  for ( n = 0; n < 4; ++n ) distance += nbr_dist[n];
-  for ( n = 0; n < 4; ++n ) nbr_dist[n] /= distance;
-
-  return (search_result);
-}
-
-static
-int grid_search(remapgrid_t *src_grid, int *restrict src_add, double *restrict src_lats, 
-		double *restrict src_lons,  double plat, double plon, const int *restrict src_grid_dims,
-		const double *restrict src_center_lat, const double *restrict src_center_lon,
-		const restr_t *restrict src_grid_bound_box, const int *restrict src_bin_add)
-{
-  /*
-    Output variables:
-
-    int    src_add[4]              ! address of each corner point enclosing P
-    double src_lats[4]             ! latitudes  of the four corner points
-    double src_lons[4]             ! longitudes of the four corner points
-
-    Input variables:
-
-    double plat                    ! latitude  of the search point
-    double plon                    ! longitude of the search point
-
-    int src_grid_dims[2]           ! size of each src grid dimension
-
-    double src_center_lat[]        ! latitude  of each src grid center 
-    double src_center_lon[]        ! longitude of each src grid center
-
-    restr_t src_grid_bound_box[][4] ! bound box for source grid
-
-    int src_bin_add[][2]           ! latitude bins for restricting
-  */
-  /*  Local variables */
-  long n, n2, next_n, srch_add, srch_add4;    /* dummy indices                    */
-  long nx, ny;                                /* dimensions of src grid           */
-  long min_add, max_add;                      /* addresses for restricting search */
-  long i, j, jp1, ip1, n_add, e_add, ne_add;  /* addresses                        */
-  long nbins;
-  /* Vectors for cross-product check */
-  double vec1_lat, vec1_lon;
-  double vec2_lat, vec2_lon, cross_product;
-  int scross[4], scross_last = 0;
-  int search_result = 0;
-  restr_t rlat, rlon;
-  restr_t *bin_lats = src_grid->bin_lats;
-
-  nbins = src_grid->num_srch_bins;
-
-  rlat = RESTR_SCALE(plat);
-  rlon = RESTR_SCALE(plon);
-
-  /* restrict search first using bins */
-
-  for ( n = 0; n < 4; ++n ) src_add[n] = 0;
-
-  min_add = src_grid->size-1;
-  max_add = 0;
-
-  for ( n = 0; n < nbins; ++n )
-    {
-      n2 = n<<1;
-      if ( rlat >= bin_lats[n2] && rlat <= bin_lats[n2+1] )
-	{
-	  if ( src_bin_add[n2  ] < min_add ) min_add = src_bin_add[n2  ];
-	  if ( src_bin_add[n2+1] > max_add ) max_add = src_bin_add[n2+1];
-	}
-    }
- 
-  /* Now perform a more detailed search */
-
-  nx = src_grid_dims[0];
-  ny = src_grid_dims[1];
-
-  /* srch_loop */
-  for ( srch_add = min_add; srch_add <= max_add; ++srch_add )
-    {
-      srch_add4 = srch_add<<2;
-      /* First check bounding box */
-      if ( rlon >= src_grid_bound_box[srch_add4+2] &&
-	   rlon <= src_grid_bound_box[srch_add4+3] &&
-	   rlat >= src_grid_bound_box[srch_add4  ] &&
-	   rlat <= src_grid_bound_box[srch_add4+1])
-	{
-	  /* We are within bounding box so get really serious */
-
-          /* Determine neighbor addresses */
-          j = srch_add/nx;
-          i = srch_add - j*nx;
-
-          if ( i < (nx-1) )
-            ip1 = i + 1;
-          else
-	    {
-	      /* 2009-01-09 Uwe Schulzweida: bug fix */
-	      if ( src_grid->is_cyclic )
-		ip1 = 0;
-	      else
-		ip1 = i;
-	    }
-
-          if ( j < (ny-1) )
-            jp1 = j + 1;
-          else
-	    {
-	      /* 2008-12-17 Uwe Schulzweida: latitute cyclic ??? (bug fix) */
-	      jp1 = j;
-	    }
-
-          n_add  = jp1*nx + i;
-          e_add  = j  *nx + ip1;
-	  ne_add = jp1*nx + ip1;
-
-          src_lons[0] = src_center_lon[srch_add];
-          src_lons[1] = src_center_lon[e_add];
-          src_lons[2] = src_center_lon[ne_add];
-          src_lons[3] = src_center_lon[n_add];
-
-          src_lats[0] = src_center_lat[srch_add];
-          src_lats[1] = src_center_lat[e_add];
-          src_lats[2] = src_center_lat[ne_add];
-          src_lats[3] = src_center_lat[n_add];
-
-	  /* For consistency, we must make sure all lons are in same 2pi interval */
-
-          vec1_lon = src_lons[0] - plon;
-          if      ( vec1_lon >  PI ) src_lons[0] -= PI2;
-          else if ( vec1_lon < -PI ) src_lons[0] += PI2;
-
-          for ( n = 1; n < 4; ++n )
-	    {
-	      vec1_lon = src_lons[n] - src_lons[0];
-	      if      ( vec1_lon >  PI ) src_lons[n] -= PI2;
-	      else if ( vec1_lon < -PI ) src_lons[n] += PI2;
-	    }
-
-          /* corner_loop */
-          for ( n = 0; n < 4; ++n )
-	    {
-	      next_n = (n+1)%4;
-
-	      /*
-		Here we take the cross product of the vector making 
-		up each box side with the vector formed by the vertex
-		and search point.  If all the cross products are 
-		positive, the point is contained in the box.
-	      */
-	      vec1_lat = src_lats[next_n] - src_lats[n];
-	      vec1_lon = src_lons[next_n] - src_lons[n];
-	      vec2_lat = plat - src_lats[n];
-	      vec2_lon = plon - src_lons[n];
-
-	      /* Check for 0,2pi crossings */
-
-	      if      ( vec1_lon >  THREE*PIH ) vec1_lon -= PI2;
-	      else if ( vec1_lon < -THREE*PIH ) vec1_lon += PI2;
-
-	      if      ( vec2_lon >  THREE*PIH ) vec2_lon -= PI2;
-	      else if ( vec2_lon < -THREE*PIH ) vec2_lon += PI2;
-
-	      cross_product = vec1_lon*vec2_lat - vec2_lon*vec1_lat;
-
-	      /* If cross product is less than ZERO, this cell doesn't work    */
-	      /* 2008-10-16 Uwe Schulzweida: bug fix for cross_product eq zero */
-
-	      scross[n] = cross_product < 0 ? -1 : cross_product > 0 ? 1 : 0;
-
-	      if ( n == 0 ) scross_last = scross[n];
-
-	      if ( (scross[n] < 0 && scross_last > 0) || (scross[n] > 0 && scross_last < 0) ) break;
-
-	      scross_last = scross[n];
-	    } /* corner_loop */
-
-	  if ( n >= 4 )
-	    {
-	      n = 0;
-	      if      ( scross[0]>=0 && scross[1]>=0 && scross[2]>=0 && scross[3]>=0 ) n = 4;
-	      else if ( scross[0]<=0 && scross[1]<=0 && scross[2]<=0 && scross[3]<=0 ) n = 4;
-	    }
-
-	  /* If cross products all same sign, we found the location */
-          if ( n >= 4 )
-	    {
-	      src_add[0] = srch_add;
-	      src_add[1] = e_add;
-	      src_add[2] = ne_add;
-	      src_add[3] = n_add;
-
-	      search_result = 1;
-
-	      return (search_result);
-	    }
-
-	  /* Otherwise move on to next cell */
-
-        } /* Bounding box check */
-    } /* srch_loop */
-
-  /*
-    If no cell found, point is likely either in a box that straddles either pole or is outside 
-    the grid. Fall back to a distance-weighted average of the four closest points.
-    Go ahead and compute weights here, but store in src_lats and return -add to prevent the 
-    parent routine from computing bilinear weights.
-  */
-  if ( !src_grid->lextrapolate ) return (search_result);
-
-  /*
-    printf("Could not find location for %g %g\n", plat*RAD2DEG, plon*RAD2DEG);
-    printf("Using nearest-neighbor average for this point\n");
-  */
-  search_result = grid_search_nn(min_add, max_add, src_add, src_lats, plat, plon, src_center_lat, src_center_lon);
-
-  return (search_result);
-}  /* grid_search */
-
-/*
-  This routine stores the address and weight for four links associated with one destination
-  point in the appropriate address and weight arrays and resizes those arrays if necessary.
-*/
-void store_link_bilin(remapvars_t *rv, int dst_add, int *restrict src_add, double *restrict weights)
-{
-  /*
-    Input variables:
-    int dst_add       ! address on destination grid
-    int src_add[4]    ! addresses on source grid
-    double weights[4] ! array of remapping weights for these links
-  */
-  long n;
-  long nlink;
-
-  /*
-     Increment number of links and check to see if remap arrays need
-     to be increased to accomodate the new link. Then store the link.
-  */
-  nlink = rv->num_links;
-  rv->num_links += 4;
-
-  if ( rv->num_links >= rv->max_links ) 
-    resize_remap_vars(rv, rv->resize_increment);
-
-  if ( rv->sort_add == FALSE )
-    {
-      for ( n = 0; n < 3; ++n )
-	if ( src_add[n] > src_add[n+1] ) break;
-
-      if ( n < 2 ) rv->sort_add = TRUE;
-      else if ( n == 2 ) // swap 3rd and 4th elements
-	{
-	  {
-	    int itmp;
-	    itmp = src_add[2];
-	    src_add[2] = src_add[3];
-	    src_add[3] = itmp;
-	  }
-	  {
-	    double dtmp;
-	    dtmp = weights[2];
-	    weights[2] = weights[3];
-	    weights[3] = dtmp;
-	  }
-	}
-    }
-
-  for ( n = 0; n < 4; ++n )
-    {
-      rv->src_grid_add[nlink+n] = src_add[n];
-      rv->tgt_grid_add[nlink+n] = dst_add;
-      rv->wts         [nlink+n] = weights[n];
-    }
-
-} /* store_link_bilin */
-
-static
-long find_ij_weights(double plon, double plat, double *restrict src_lats, double *restrict src_lons, double *ig, double *jg)
-{
-  long iter;                     /*  iteration counters   */
-  double iguess, jguess;         /*  current guess for bilinear coordinate  */
-  double deli, delj;             /*  corrections to iw,jw                   */
-  double dth1, dth2, dth3;       /*  some latitude  differences             */
-  double dph1, dph2, dph3;       /*  some longitude differences             */
-  double dthp, dphp;             /*  difference between point and sw corner */
-  double mat1, mat2, mat3, mat4; /*  matrix elements                        */
-  double determinant;            /*  matrix determinant                     */
-
-  /* Iterate to find iw,jw for bilinear approximation  */
-
-  dth1 = src_lats[1] - src_lats[0];
-  dth2 = src_lats[3] - src_lats[0];
-  dth3 = src_lats[2] - src_lats[1] - dth2;
-
-  dph1 = src_lons[1] - src_lons[0];
-  dph2 = src_lons[3] - src_lons[0];
-  dph3 = src_lons[2] - src_lons[1];
-
-  if ( dph1 >  THREE*PIH ) dph1 -= PI2;
-  if ( dph2 >  THREE*PIH ) dph2 -= PI2;
-  if ( dph3 >  THREE*PIH ) dph3 -= PI2;
-  if ( dph1 < -THREE*PIH ) dph1 += PI2;
-  if ( dph2 < -THREE*PIH ) dph2 += PI2;
-  if ( dph3 < -THREE*PIH ) dph3 += PI2;
-
-  dph3 = dph3 - dph2;
-
-  iguess = HALF;
-  jguess = HALF;
-
-  for ( iter = 0; iter < remap_max_iter; ++iter )
-    {
-      dthp = plat - src_lats[0] - dth1*iguess - dth2*jguess - dth3*iguess*jguess;
-      dphp = plon - src_lons[0];
-      
-      if ( dphp >  THREE*PIH ) dphp -= PI2;
-      if ( dphp < -THREE*PIH ) dphp += PI2;
-
-      dphp = dphp - dph1*iguess - dph2*jguess - dph3*iguess*jguess;
-
-      mat1 = dth1 + dth3*jguess;
-      mat2 = dth2 + dth3*iguess;
-      mat3 = dph1 + dph3*jguess;
-      mat4 = dph2 + dph3*iguess;
-
-      determinant = mat1*mat4 - mat2*mat3;
-
-      deli = (dthp*mat4 - dphp*mat2)/determinant;
-      delj = (dphp*mat1 - dthp*mat3)/determinant;
-
-      if ( fabs(deli) < converge && fabs(delj) < converge ) break;
-
-      iguess += deli;
-      jguess += delj;
-    }
-
-  *ig = iguess;
-  *jg = jguess;
-
-  return (iter);
-}
-
-/*
-  -----------------------------------------------------------------------
-
-  This routine computes the weights for a bilinear interpolation.
-
-  -----------------------------------------------------------------------
-*/
-void remap_bilin(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
-{
-  /*   Local variables */
-  int  lwarn = TRUE;
-  int  search_result;
-  long tgt_grid_size;
-  long dst_add;                  /*  destination addresss */
-  long n, icount;
-  long iter;                     /*  iteration counters   */
-
-  int src_add[4];                /*  address for the four source points     */
-
-  double src_lats[4];            /*  latitudes  of four bilinear corners    */
-  double src_lons[4];            /*  longitudes of four bilinear corners    */
-  double wgts[4];                /*  bilinear weights for four corners      */
-
-  double plat, plon;             /*  lat/lon coords of destination point    */
-  double findex = 0;
-  int remap_grid_type = src_grid->remap_grid_type;
-
-  if ( cdoTimer ) timer_start(timer_remap_bil);
-
-  progressInit();
-
-  tgt_grid_size = tgt_grid->size;
-
-  /* Compute mappings from source to target grid */
-
-  if ( src_grid->rank != 2 )
-    cdoAbort("Can not do bilinear interpolation when source grid rank != 2"); 
-
-  /* Loop over destination grid */
-
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(ompNumThreads, cdoTimer, cdoVerbose, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, remap_max_iter, converge, lwarn, findex) \
-  private(dst_add, n, icount, iter, src_add, src_lats, src_lons, wgts, plat, plon, search_result)    \
-  schedule(dynamic,1)
-#endif
-  /* grid_loop1 */
-  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
-    {
-      int lprogress = 1;
-#if defined(_OPENMP)
-      if ( omp_get_thread_num() != 0 ) lprogress = 0;
-#endif
-#if defined(_OPENMP)
-#pragma omp atomic
-#endif
-      findex++;
-      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
-
-      if ( ! tgt_grid->mask[dst_add] ) continue;
-
-      plat = tgt_grid->cell_center_lat[dst_add];
-      plon = tgt_grid->cell_center_lon[dst_add];
-
-      /* Find nearest square of grid points on source grid  */
-      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	search_result = grid_search_reg2d(src_grid, src_add, src_lats, src_lons, 
-					  plat, plon, src_grid->dims,
-					  src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
-      else
-	search_result = grid_search(src_grid, src_add, src_lats, src_lons, 
-				    plat, plon, src_grid->dims,
-				    src_grid->cell_center_lat, src_grid->cell_center_lon,
-				    src_grid->cell_bound_box, src_grid->bin_addr);
-
-      /* Check to see if points are land points */
-      if ( search_result > 0 )
-	{
-	  for ( n = 0; n < 4; ++n )
-	    if ( ! src_grid->mask[src_add[n]] ) search_result = 0;
-	}
-
-      /* If point found, find local iw,jw coordinates for weights  */
-      if ( search_result > 0 )
-	{
-	  double iw, jw;  /*  current guess for bilinear coordinate  */
-
-          tgt_grid->cell_frac[dst_add] = ONE;
-
-	  iter = find_ij_weights(plon, plat, src_lats, src_lons, &iw, &jw);
-
-          if ( iter < remap_max_iter )
-	    {
-	      /* Successfully found iw,jw - compute weights */
-
-	      wgts[0] = (ONE-iw) * (ONE-jw);
-	      wgts[1] =      iw  * (ONE-jw);
-	      wgts[2] =      iw  *      jw;
-	      wgts[3] = (ONE-iw) *      jw;
-
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-	      store_link_bilin(rv, dst_add, src_add, wgts);
-	    }
-          else
-	    {
-	      if ( cdoVerbose )
-		{
-		  cdoPrint("Point coords: %g %g", plat, plon);
-		  cdoPrint("Src grid lats: %g %g %g %g", src_lats[0], src_lats[1], src_lats[2], src_lats[3]);
-		  cdoPrint("Src grid lons: %g %g %g %g", src_lons[0], src_lons[1], src_lons[2], src_lons[3]);
-		  cdoPrint("Src grid addresses: %d %d %d %d", src_add[0], src_add[1], src_add[2], src_add[3]);
-		  cdoPrint("Src grid lats: %g %g %g %g",
-			   src_grid->cell_center_lat[src_add[0]], src_grid->cell_center_lat[src_add[1]],
-			   src_grid->cell_center_lat[src_add[2]], src_grid->cell_center_lat[src_add[3]]);
-		  cdoPrint("Src grid lons: %g %g %g %g",
-			   src_grid->cell_center_lon[src_add[0]], src_grid->cell_center_lon[src_add[1]],
-			   src_grid->cell_center_lon[src_add[2]], src_grid->cell_center_lon[src_add[3]]);
-		  cdoPrint("Current iw,jw : %g %g", iw, jw);
-		}
-
-	      if ( cdoVerbose || lwarn )
-		{
-		  lwarn = FALSE;
-		  //  cdoWarning("Iteration for iw,jw exceed max iteration count of %d!", remap_max_iter);
-		  cdoWarning("Bilinear interpolation failed for some grid points - used a distance-weighted average instead!");
-		}
-
-	      search_result = -1;
-	    }
-	}
-
-      /*
-	Search for bilinear failed - use a distance-weighted average instead (this is typically near the pole)
-	Distance was stored in src_lats!
-      */
-      if ( search_result < 0 )
-	{
-          icount = 0;
-          for ( n = 0; n < 4; ++n )
-	    {
-	      if ( src_grid->mask[src_add[n]] )
-		icount++;
-	      else
-		src_lats[n] = ZERO;
-	    }
-
-          if ( icount > 0 )
-	    {
-	      /* Renormalize weights */
-	      double sum_wgts = 0.0; /* sum of weights for normalization */
-	      /* 2012-05-08 Uwe Schulzweida: using absolute value of src_lats (bug fix) */
-	      for ( n = 0; n < 4; ++n ) sum_wgts += fabs(src_lats[n]);
-	      for ( n = 0; n < 4; ++n ) wgts[n] = fabs(src_lats[n])/sum_wgts;
-
-	      tgt_grid->cell_frac[dst_add] = ONE;
-
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-	      store_link_bilin(rv, dst_add, src_add, wgts);
-	    }
-        }
-    } /* grid_loop1 */
-
-  if ( cdoTimer ) timer_stop(timer_remap_bil);
-} /* remap_bilin */
-
-
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-/*                                                                         */
-/*      BICUBIC INTERPOLATION                                              */
-/*                                                                         */
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-
-/*
-  This routine stores the address and weight for four links associated with one destination 
-  point in the appropriate address and weight arrays and resizes those arrays if necessary.
-*/
-static
-void store_link_bicub(remapvars_t *rv, int dst_add, int *restrict src_add, double weights[4][4])
-{
-  /*
-    Input variables:
-    int dst_add          ! address on destination grid
-    int src_add[4]       ! addresses on source grid
-    double weights[4][4] ! array of remapping weights for these links
-  */
-  long n, k;
-  long nlink;
-
-  /*
-     Increment number of links and check to see if remap arrays need
-     to be increased to accomodate the new link. Then store the link.
-  */
-  nlink = rv->num_links;
-  rv->num_links += 4;
-
-  if ( rv->num_links >= rv->max_links ) 
-    resize_remap_vars(rv, rv->resize_increment);
-
-  if ( rv->sort_add == FALSE )
-    {
-      for ( n = 0; n < 3; ++n )
-	if ( src_add[n] > src_add[n+1] ) break;
-
-      if ( n < 2 ) rv->sort_add = TRUE;
-      else if ( n == 2 ) // swap 3rd and 4th elements
-	{
-	  {
-	    int itmp;
-	    itmp = src_add[2];
-	    src_add[2] = src_add[3];
-	    src_add[3] = itmp;
-	  }
-	  {
-	    double dtmp[4];
-	    for ( k = 0; k < 4; ++k ) dtmp[k] = weights[k][2];
-	    for ( k = 0; k < 4; ++k ) weights[k][2] = weights[k][3];
-	    for ( k = 0; k < 4; ++k ) weights[k][3] = dtmp[k];
-	  }
-	}
-    }
-
-  for ( n = 0; n < 4; ++n )
-    {
-      rv->src_grid_add[nlink+n] = src_add[n];
-      rv->tgt_grid_add[nlink+n] = dst_add;
-      for ( k = 0; k < 4; ++k )
-	rv->wts[4*(nlink+n)+k] = weights[k][n];
-    }
-
-} /* store_link_bicub */
-
-/*
-  -----------------------------------------------------------------------
-
-  This routine computes the weights for a bicubic interpolation.
-
-  -----------------------------------------------------------------------
-*/
-void remap_bicub(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
-{
-  /*   Local variables */
-  int  lwarn = TRUE;
-  int  search_result;
-  long tgt_grid_size;
-  long n, icount;
-  long dst_add;        /*  destination addresss */
-  long iter;           /*  iteration counters   */
-
-  int src_add[4];     /* address for the four source points */
-
-  double src_lats[4]; /*  latitudes  of four bilinear corners */
-  double src_lons[4]; /*  longitudes of four bilinear corners */
-  double wgts[4][4];  /*  bicubic weights for four corners    */
-
-  double plat, plon;             /*  lat/lon coords of destination point    */
-  double findex = 0;
-  int remap_grid_type = src_grid->remap_grid_type;
-
-  progressInit();
-
-  tgt_grid_size = tgt_grid->size;
-
-  /* Compute mappings from source to target grid */
-
-  if ( src_grid->rank != 2 )
-    cdoAbort("Can not do bicubic interpolation when source grid rank != 2"); 
-
-  /* Loop over destination grid */
-
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(ompNumThreads, cdoTimer, cdoVerbose, remap_grid_type, tgt_grid_size, src_grid, tgt_grid, rv, remap_max_iter, converge, lwarn, findex) \
-  private(dst_add, n, icount, iter, src_add, src_lats, src_lons, wgts, plat, plon, search_result) \
-  schedule(dynamic,1)
-#endif
-  /* grid_loop1 */
-  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
-    {
-      int lprogress = 1;
-#if defined(_OPENMP)
-      if ( omp_get_thread_num() != 0 ) lprogress = 0;
-#endif
-#if defined(_OPENMP)
-#pragma omp atomic
-#endif
-      findex++;
-      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
-
-      if ( ! tgt_grid->mask[dst_add] ) continue;
-
-      plat = tgt_grid->cell_center_lat[dst_add];
-      plon = tgt_grid->cell_center_lon[dst_add];
-
-      /* Find nearest square of grid points on source grid  */
-      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	search_result = grid_search_reg2d(src_grid, src_add, src_lats, src_lons, 
-					  plat, plon, src_grid->dims,
-					  src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
-      else
-	search_result = grid_search(src_grid, src_add, src_lats, src_lons, 
-				    plat, plon, src_grid->dims,
-				    src_grid->cell_center_lat, src_grid->cell_center_lon,
-				    src_grid->cell_bound_box, src_grid->bin_addr);
-
-      /* Check to see if points are land points */
-      if ( search_result > 0 )
-	{
-	  for ( n = 0; n < 4; ++n )
-	    if ( ! src_grid->mask[src_add[n]] ) search_result = 0;
-	}
-
-      /* If point found, find local iw,jw coordinates for weights  */
-      if ( search_result > 0 )
-	{
-	  double iw, jw;  /*  current guess for bilinear coordinate  */
-
-          tgt_grid->cell_frac[dst_add] = ONE;
-
-	  iter = find_ij_weights(plon, plat, src_lats, src_lons, &iw, &jw);
-
-          if ( iter < remap_max_iter )
-	    {
-	      /* Successfully found iw,jw - compute weights */
-
-	      wgts[0][0] = (ONE-jw*jw*(THREE-TWO*jw)) * (ONE-iw*iw*(THREE-TWO*iw));
-	      wgts[0][1] = (ONE-jw*jw*(THREE-TWO*jw)) *      iw*iw*(THREE-TWO*iw);
-	      wgts[0][2] =      jw*jw*(THREE-TWO*jw)  *      iw*iw*(THREE-TWO*iw);
-	      wgts[0][3] =      jw*jw*(THREE-TWO*jw)  * (ONE-iw*iw*(THREE-TWO*iw));
-	      wgts[1][0] = (ONE-jw*jw*(THREE-TWO*jw)) *      iw*(iw-ONE)*(iw-ONE);
-	      wgts[1][1] = (ONE-jw*jw*(THREE-TWO*jw)) *      iw*iw*(iw-ONE);
-	      wgts[1][2] =      jw*jw*(THREE-TWO*jw)  *      iw*iw*(iw-ONE);
-	      wgts[1][3] =      jw*jw*(THREE-TWO*jw)  *      iw*(iw-ONE)*(iw-ONE);
-	      wgts[2][0] =      jw*(jw-ONE)*(jw-ONE)  * (ONE-iw*iw*(THREE-TWO*iw));
-	      wgts[2][1] =      jw*(jw-ONE)*(jw-ONE)  *      iw*iw*(THREE-TWO*iw);
-	      wgts[2][2] =      jw*jw*(jw-ONE)        *      iw*iw*(THREE-TWO*iw);
-	      wgts[2][3] =      jw*jw*(jw-ONE)        * (ONE-iw*iw*(THREE-TWO*iw));
-	      wgts[3][0] =      iw*(iw-ONE)*(iw-ONE)  *      jw*(jw-ONE)*(jw-ONE);
-              wgts[3][1] =      iw*iw*(iw-ONE)        *      jw*(jw-ONE)*(jw-ONE);
-	      wgts[3][2] =      iw*iw*(iw-ONE)        *      jw*jw*(jw-ONE);
-	      wgts[3][3] =      iw*(iw-ONE)*(iw-ONE)  *      jw*jw*(jw-ONE);
-
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-	      store_link_bicub(rv, dst_add, src_add, wgts);
-	    }
-          else
-	    {
-	      if ( cdoVerbose || lwarn )
-		{
-		  lwarn = FALSE;
-		  // cdoWarning("Iteration for iw,jw exceed max iteration count of %d!", remap_max_iter);
-		  cdoWarning("Bicubic interpolation failed for some grid points - used a distance-weighted average instead!");
-		}
-
-	      search_result = -1;
-	    }
-	}
-	  
-      /*
-	Search for bicubic failed - use a distance-weighted average instead (this is typically near the pole)
-      */
-      if ( search_result < 0 )
-	{
-          icount = 0;
-          for ( n = 0; n < 4; ++n )
-	    {
-	      if ( src_grid->mask[src_add[n]] )
-		icount++;
-	      else
-		src_lats[n] = ZERO;
-	    }
-
-          if ( icount > 0 )
-	    {
-	      /* Renormalize weights */
-	      double sum_wgts = 0.0; /* sum of weights for normalization */
-	      /* 2012-05-08 Uwe Schulzweida: using absolute value of src_lats (bug fix) */
-	      for ( n = 0; n < 4; ++n ) sum_wgts += fabs(src_lats[n]);
-	      for ( n = 0; n < 4; ++n ) wgts[0][n] = fabs(src_lats[n])/sum_wgts;
-	      for ( n = 0; n < 4; ++n ) wgts[1][n] = ZERO;
-	      for ( n = 0; n < 4; ++n ) wgts[2][n] = ZERO;
-	      for ( n = 0; n < 4; ++n ) wgts[3][n] = ZERO;
-
-	      tgt_grid->cell_frac[dst_add] = ONE;
-
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-	      store_link_bicub(rv, dst_add, src_add, wgts);
-	    }
-        }
-    } /* grid_loop1 */
-
-} /* remap_bicub */
-
-
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-/*                                                                         */
-/*      INTERPOLATION USING A DISTANCE-WEIGHTED AVERAGE                    */
-/*                                                                         */
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-
-static
-void get_restrict_add(remapgrid_t *src_grid, double plat, const int *restrict src_bin_add, long *minadd, long *maxadd)
-{
-  long n, n2;
-  long min_add = 0, max_add = 0, nm1, np1;
-  long nbins;
-  restr_t rlat;
-  restr_t *bin_lats = src_grid->bin_lats;
-
-  nbins = src_grid->num_srch_bins;
-
-  rlat = RESTR_SCALE(plat);
-
-  for ( n = 0; n < nbins; ++n )
-    {
-      n2 = n<<1;
-      if ( rlat >= bin_lats[n2  ] && rlat <= bin_lats[n2+1] )
-	{
-	  min_add = src_bin_add[n2  ];
-	  max_add = src_bin_add[n2+1];
-
-	  nm1 = MAX(n-1, 0);
-	  np1 = MIN(n+1, nbins-1);
-
-	  min_add = MIN(min_add, src_bin_add[2*nm1  ]);
-	  max_add = MAX(max_add, src_bin_add[2*nm1+1]);
-	  min_add = MIN(min_add, src_bin_add[2*np1  ]);
-	  max_add = MAX(max_add, src_bin_add[2*np1+1]);
-	}
-    }
-
-  *minadd = min_add;
-  *maxadd = max_add;
-  /*
-  if ( cdoVerbose )
-    printf("plon %g plat %g min_add %ld max_add %ld diff %ld\n",
-	   plon, plat, min_add, max_add, max_add-min_add);
-  */
-}
-
-/*
-   This routine finds the closest num_neighbor points to a search 
-   point and computes a distance to each of the neighbors.
-*/
-static
-void grid_search_nbr_reg2d(int num_neighbors, remapgrid_t *src_grid, int *restrict nbr_add, double *restrict nbr_dist, 
-			   double plat, double plon, const int *restrict src_grid_dims,
-			   double coslat_dst, double coslon_dst, double sinlat_dst, double sinlon_dst,
-			   const double *restrict sinlat, const double *restrict coslat,
-			   const double *restrict sinlon, const double *restrict coslon,
-			   const double *restrict src_center_lat, const double *restrict src_center_lon)
-{
-  /*
-    Output variables:
-
-    int nbr_add[num_neighbors]     ! address of each of the closest points
-    double nbr_dist[num_neighbors] ! distance to each of the closest points
-
-    Input variables:
-
-    double plat,         ! latitude  of the search point
-    double plon,         ! longitude of the search point
-  */
-  /*  Local variables */
-  int lfound;
-  long n, nadd, nchk;
-  long nx, nxm, ny;
-  long ii, jj;
-  long i, j, ix;
-  int src_add[25];
-  long num_add = 0;
-  double distance;   //  Angular distance
-  /*
-  double coslat_dst = cos(plat);  // cos(lat)  of the search point
-  double coslon_dst = cos(plon);  // cos(lon)  of the search point
-  double sinlat_dst = sin(plat);  // sin(lat)  of the search point
-  double sinlon_dst = sin(plon);  // sin(lon)  of the search point
-  */
-  nx = src_grid_dims[0];
-  ny = src_grid_dims[1];
-
-  nxm = nx;
-  if ( src_grid->is_cyclic ) nxm++;
-
-  if ( plon < src_center_lon[0]     ) plon += PI2;
-  if ( plon > src_center_lon[nxm-1] ) plon -= PI2;
-
-  lfound = rect_grid_search(&ii, &jj, plon, plat, nxm, ny, src_center_lon, src_center_lat);
-
-  if ( lfound )
-    {
-      if ( src_grid->is_cyclic && ii == (nxm-1) ) ii = 0;
-
-      for ( j = (jj-2); j <= (jj+2); ++j )
-	for ( i = (ii-2); i <= (ii+2); ++i )
-	  {
-	    ix = i;
-	    
-	    if ( src_grid->is_cyclic )
-	      {
-		if ( ix <   0 ) ix += nx;
-		if ( ix >= nx ) ix -= nx;
-	      }
-
-	    if ( ix >= 0 && ix < nx && j >= 0 && j < ny )
-	      src_add[num_add++] = j*nx+ix;
-	  }
-      /*
-      num_add = 0;
-
-      for ( j = (jj-1); j <= jj; ++j )
-	for ( i = (ii-1); i <= ii; ++i )
-	  {
-	    ix = i;
-	    if ( src_grid->is_cyclic && ix == (nxm-1) ) ix = 0;
-
-	    src_add[num_add++] = j*nx+ix;
-	  }
-      */
-    }
-
-  /* Initialize distance and address arrays */
-  for ( n = 0; n < num_neighbors; ++n )
-    {
-      nbr_add[n]  = -1;
-      nbr_dist[n] = BIGNUM;
-    }
-
-  if ( lfound )
-    {
-      long ix, iy;
-
-      for ( long na = 0; na < num_add; ++na )
-	{
-	  nadd = src_add[na];
-
-	  iy = nadd/nx;
-	  ix = nadd - iy*nx;
-
-	  /* Find distance to this point */
-	  distance =  sinlat_dst*sinlat[iy] + coslat_dst*coslat[iy]*
-	             (coslon_dst*coslon[ix] + sinlon_dst*sinlon[ix]);
-	  /*
-	  distance =  sinlat_dst*sinlat[nadd] + coslat_dst*coslat[nadd]*
-	             (coslon_dst*coslon[nadd] + sinlon_dst*sinlon[nadd]);
-	  */
-	  /* 2008-07-30 Uwe Schulzweida: check that distance is inside the range of -1 to 1,
-	                                 otherwise the result of acos(distance) is NaN */
-	  if ( distance >  1 ) distance =  1;
-	  if ( distance < -1 ) distance = -1;
-	  distance = acos(distance);
-
-	  /* Uwe Schulzweida: if distance is zero, set to small number */
-	  if ( IS_EQUAL(distance, 0) ) distance = TINY;
-
-	  /* Store the address and distance if this is one of the smallest four so far */
-	  for ( nchk = 0; nchk < num_neighbors; ++nchk )
-	    {
-	      if ( distance < nbr_dist[nchk] )
-		{
-		  for ( n = num_neighbors-1; n > nchk; --n )
-		    {
-		      nbr_add[n]  = nbr_add[n-1];
-		      nbr_dist[n] = nbr_dist[n-1];
-		    }
-		  nbr_add[nchk]  = nadd;
-		  nbr_dist[nchk] = distance;
-		  break;
-		}
-	      else if ( num_neighbors == 1 && distance <= nbr_dist[0] && nadd < nbr_add[0] )
-		{
-		  nbr_add[0]  = nadd;
-		  nbr_dist[0] = distance;
-		}
-	    }
-	}
-    }
-  else if ( src_grid->lextrapolate )
-    {
-      int search_result;
-      search_result = grid_search_reg2d_nn(nx, ny, nbr_add, nbr_dist, plat, plon, src_center_lat, src_center_lon);
-      
-      if ( search_result >= 0 )
-	for ( n = 0; n < 4; ++n ) nbr_add[n] = -1;
-    }
-}  /*  grid_search_nbr_reg2d  */
-
-static
-void grid_search_nbr(int num_neighbors, remapgrid_t *src_grid, int *restrict nbr_add, double *restrict nbr_dist, 
-		     double plat, double plon, const int *restrict src_bin_add,
-		     double coslat_dst, double coslon_dst, double sinlat_dst, double sinlon_dst,
-		     const double *restrict sinlat, const double *restrict coslat,
-		     const double *restrict sinlon, const double *restrict coslon)
-{
-  /*
-    Output variables:
-
-    int nbr_add[num_neighbors]     ! address of each of the closest points
-    double nbr_dist[num_neighbors] ! distance to each of the closest points
-
-    Input variables:
-
-    int src_bin_add[][2]  ! search bins for restricting search
-
-    double plat,         ! latitude  of the search point
-    double plon,         ! longitude of the search point
-  */
-  /*  Local variables */
-  long n, nadd, nchk;
-  long min_add, max_add;
-  double distance;     /* Angular distance */
-  /* result changed a little on a few points with high resolution grid
-  double xcoslat_dst = cos(plat);  // cos(lat)  of the search point
-  double xcoslon_dst = cos(plon);  // cos(lon)  of the search point
-  double xsinlat_dst = sin(plat);  // sin(lat)  of the search point
-  double xsinlon_dst = sin(plon);  // sin(lon)  of the search point
-  */
-  /* Loop over source grid and find nearest neighbors                         */
-  /* restrict the search using search bins expand the bins to catch neighbors */
-
-  get_restrict_add(src_grid, plat, src_bin_add, &min_add, &max_add);
-
-  /* Initialize distance and address arrays */
-  for ( n = 0; n < num_neighbors; ++n )
-    {
-      nbr_add[n]  = -1;
-      nbr_dist[n] = BIGNUM;
-    }
-
-  for ( nadd = min_add; nadd <= max_add; ++nadd )
-    {
-      /* Find distance to this point */
-      distance =  sinlat_dst*sinlat[nadd] + coslat_dst*coslat[nadd]*
-	         (coslon_dst*coslon[nadd] + sinlon_dst*sinlon[nadd]);
-      /* 2008-07-30 Uwe Schulzweida: check that distance is inside the range of -1 to 1,
-                                     otherwise the result of acos(distance) is NaN */
-      if ( distance >  1 ) distance =  1;
-      if ( distance < -1 ) distance = -1;
-      distance = acos(distance);
-
-      /* Uwe Schulzweida: if distance is zero, set to small number */
-      if ( IS_EQUAL(distance, 0) ) distance = TINY;
-
-      /* Store the address and distance if this is one of the smallest four so far */
-      for ( nchk = 0; nchk < num_neighbors; ++nchk )
-	{
-          if ( distance < nbr_dist[nchk] )
-	    {
-	      for ( n = num_neighbors-1; n > nchk; --n )
-		{
-		  nbr_add[n]  = nbr_add[n-1];
-		  nbr_dist[n] = nbr_dist[n-1];
-		}
-	      nbr_add[nchk]  = nadd;
-	      nbr_dist[nchk] = distance;
-	      break;
-	    }
-        }
-    }
-
-}  /*  grid_search_nbr  */
-
-/*
-  This routine stores the address and weight for this link in the appropriate 
-  address and weight arrays and resizes those arrays if necessary.
-*/
-static
-void store_link_nbr(remapvars_t *rv, int add1, int add2, double weights)
-{
-  /*
-    Input variables:
-    int  add1         ! address on source grid
-    int  add2         ! address on target grid
-    double weights    ! remapping weight for this link
-  */
-  long nlink;
-
-  /*
-     Increment number of links and check to see if remap arrays need
-     to be increased to accomodate the new link. Then store the link.
-  */
-  nlink = rv->num_links;
-  rv->num_links++;
-
-  if ( rv->num_links >= rv->max_links ) 
-    resize_remap_vars(rv, rv->resize_increment);
-
-  rv->src_grid_add[nlink] = add1;
-  rv->tgt_grid_add[nlink] = add2;
-  rv->wts[nlink]          = weights;
-
-} /* store_link_nbr */
-
-/*
-  -----------------------------------------------------------------------
-
-   This routine computes the inverse-distance weights for a
-   nearest-neighbor interpolation.
-
-  -----------------------------------------------------------------------
-*/
-void remap_distwgt(int num_neighbors, remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
-{
-  /*  Local variables */
-
-  long src_grid_size;
-  long tgt_grid_size;
-  long n;
-  long dst_add;                   /* destination address                     */
-  int nbr_mask[num_neighbors];    /* mask at nearest neighbors               */
-  int nbr_add[num_neighbors];     /* source address at nearest neighbors     */
-  double nbr_dist[num_neighbors]; /* angular distance four nearest neighbors */
-  double dist_tot;         /* sum of neighbor distances (for normalizing) */
-  double coslat_dst;       /* cos(lat) of destination grid point */
-  double coslon_dst;       /* cos(lon) of destination grid point */
-  double sinlat_dst;       /* sin(lat) of destination grid point */
-  double sinlon_dst;       /* sin(lon) of destination grid point */
-  double *coslat, *sinlat; /* cosine, sine of grid lats (for distance)    */
-  double *coslon, *sinlon; /* cosine, sine of grid lons (for distance)    */
-  double wgtstmp;          /* hold the link weight                        */
-  double plat, plon;             /*  lat/lon coords of destination point    */
-  double findex = 0;
-  int remap_grid_type = src_grid->remap_grid_type;
-
-  progressInit();
-
-  /* Compute mappings from source to target grid */
-
-  src_grid_size = src_grid->size;
-  tgt_grid_size = tgt_grid->size;
-
-  /* Compute cos, sin of lat/lon on source grid for distance calculations */
-
-  if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
-    {
-      long nx = src_grid->dims[0];
-      long ny = src_grid->dims[1];
-
-      coslat = malloc(ny*sizeof(double));
-      coslon = malloc(nx*sizeof(double));
-      sinlat = malloc(ny*sizeof(double));
-      sinlon = malloc(nx*sizeof(double));
-
-      for ( n = 0; n < nx; ++n )
-	{
-	  double rlon = src_grid->reg2d_center_lon[n];
-	  if ( rlon > PI2  ) rlon -= PI2;
-	  if ( rlon < ZERO ) rlon += PI2;
-	  coslon[n] = cos(rlon);
-	  sinlon[n] = sin(rlon);
-	}
-      for ( n = 0; n < ny; ++n )
-	{
-	  coslat[n] = cos(src_grid->reg2d_center_lat[n]);
-	  sinlat[n] = sin(src_grid->reg2d_center_lat[n]);
-	}
-    }
-  else
-    {
-      coslat = malloc(src_grid_size*sizeof(double));
-      coslon = malloc(src_grid_size*sizeof(double));
-      sinlat = malloc(src_grid_size*sizeof(double));
-      sinlon = malloc(src_grid_size*sizeof(double));
-
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(src_grid, src_grid_size, coslat, coslon, sinlat, sinlon)
-#endif
-      for ( n = 0; n < src_grid_size; ++n )
-	{
-	  coslat[n] = cos(src_grid->cell_center_lat[n]);
-	  coslon[n] = cos(src_grid->cell_center_lon[n]);
-	  sinlat[n] = sin(src_grid->cell_center_lat[n]);
-	  sinlon[n] = sin(src_grid->cell_center_lon[n]);
-	}
-    }
-
-  /* Loop over destination grid  */
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(ompNumThreads, cdoTimer, num_neighbors, remap_grid_type, src_grid, tgt_grid, rv, tgt_grid_size, coslat, coslon, sinlat, sinlon, findex) \
-  private(dst_add, n, coslat_dst, coslon_dst, sinlat_dst, sinlon_dst, dist_tot, nbr_add, nbr_dist, nbr_mask, wgtstmp, plat, plon) \
-  schedule(dynamic,1)
-#endif
-  for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add )
-    {
-      int lprogress = 1;
-#if defined(_OPENMP)
-      if ( omp_get_thread_num() != 0 ) lprogress = 0;
-#endif
-#if defined(_OPENMP)
-#pragma omp atomic
-#endif
-      findex++;
-      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
-
-      if ( ! tgt_grid->mask[dst_add] ) continue;
-	
-      plat = tgt_grid->cell_center_lat[dst_add];
-      plon = tgt_grid->cell_center_lon[dst_add];
-
-      coslat_dst = cos(plat);
-      coslon_dst = cos(plon);
-      sinlat_dst = sin(plat);
-      sinlon_dst = sin(plon);
-
-      /* Find nearest grid points on source grid and distances to each point */
-      if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	grid_search_nbr_reg2d(num_neighbors, src_grid, nbr_add, nbr_dist, 
-			      plat, plon, src_grid->dims,
-			      coslat_dst, coslon_dst, sinlat_dst, sinlon_dst,
-			      sinlat, coslat, sinlon, coslon,
-			      src_grid->reg2d_center_lat, src_grid->reg2d_center_lon);
-      else
-	grid_search_nbr(num_neighbors, src_grid, nbr_add, nbr_dist, 
-			plat, plon, src_grid->bin_addr,
-			coslat_dst, coslon_dst, sinlat_dst, sinlon_dst,
-			sinlat, coslat, sinlon, coslon);
-
-      /* Compute weights based on inverse distance if mask is false, eliminate those points */
-
-      dist_tot = ZERO;
-      for ( n = 0; n < num_neighbors; ++n )
-	{
-	  // printf("dst_add %ld %ld %d %g\n", dst_add, n, nbr_add[n], nbr_dist[n]);
-	  nbr_mask[n] = FALSE;
-
-	  /* Uwe Schulzweida: check if nbr_add is valid */
-	  if ( nbr_add[n] >= 0 )
-	    if ( src_grid->mask[nbr_add[n]] )
-	      {
-		nbr_dist[n] = ONE/nbr_dist[n];
-		dist_tot = dist_tot + nbr_dist[n];
-		nbr_mask[n] = TRUE;
-	      }
-	}
-
-      /* Normalize weights and store the link */
-
-      for ( n = 0; n < num_neighbors; ++n )
-	{
-          if ( nbr_mask[n] )
-	    {
-	      wgtstmp = nbr_dist[n]/dist_tot;
-
-	      tgt_grid->cell_frac[dst_add] = ONE;
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-	      store_link_nbr(rv, nbr_add[n], dst_add, wgtstmp);
-	    }
-	}
-    } /* for ( dst_add = 0; dst_add < tgt_grid_size; ++dst_add ) */
-
-  free(coslat);
-  free(coslon);
-  free(sinlat);
-  free(sinlon);
-
-}  /* remap_distwgt */
-
-
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-/*                                                                         */
-/*      CONSERVATIVE INTERPOLATION                                         */
-/*                                                                         */
-/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-
-/*
-    This routine is identical to the intersection routine except
-    that a coordinate transformation (using a Lambert azimuthal
-    equivalent projection) is performed to treat polar cells more
-    accurately.
-*/
-static
-void pole_intersection(long *location, double *intrsct_lat, double *intrsct_lon, int *lcoinc,
-		       int *lthresh, double beglat, double beglon, double endlat, double endlon,
-		       double *begseg, int lrevers,
-		       long num_srch_cells, long srch_corners, const int *restrict srch_add,
-		       const double *restrict srch_corner_lat, const double *restrict srch_corner_lon,
-		       int *luse_last, double *intrsct_x, double *intrsct_y,
-		       int *avoid_pole_count, double *avoid_pole_offset)
-{
-  /*
-    Intent(in): 
-    double beglat, beglon,  ! beginning lat/lon endpoints for segment
-    double endlat, endlon   ! ending    lat/lon endpoints for segment
-    int    lrevers          ! flag true if segment integrated in reverse
-
-    Intent(inout) :
-    double begseg[2] ! begin lat/lon of full segment
-    int *location    ! address in destination array containing this
-                     ! segment -- also may contain last location on entry
-    int *lthresh     ! flag segment crossing threshold boundary
-
-    intent(out): 
-    *int lcoinc      ! flag segment coincident with grid line
-    double *intrsct_lat, *intrsct_lon ! lat/lon coords of next intersect.
-  */
-  /* Local variables */
-  long n, next_n, cell;
-  long ioffset;
-  int loutside; /* flags points outside grid */
-
-  double pi4, rns;           /*  north/south conversion */
-  double x1, x2;             /*  local x variables for segment */
-  double y1, y2;             /*  local y variables for segment */
-  double begx, begy;         /*  beginning x,y variables for segment */
-  double endx, endy;         /*  beginning x,y variables for segment */
-  double begsegx, begsegy;   /*  beginning x,y variables for segment */
-  double grdx1, grdx2;       /*  local x variables for grid cell */
-  double grdy1, grdy2;       /*  local y variables for grid cell */
-  double vec1_y, vec1_x;     /*  vectors and cross products used */
-  double vec2_y, vec2_x;     /*  during grid search */
-  double cross_product, eps; /*  eps=small offset away from intersect */
-  double s1, s2, determ;     /*  variables used for linear solve to   */
-  double mat1, mat2, mat3, mat4, rhs1, rhs2;  /* find intersection */
-
-  double *srch_corner_x;     /*  x of each corner of srch cells */
-  double *srch_corner_y;     /*  y of each corner of srch cells */
-
-  /*printf("pole_intersection: %g %g %g %g\n", beglat, beglon, endlat, endlon);*/
-
-  /* Initialize defaults, flags, etc. */
-
-  if ( ! *lthresh ) *location = -1;
-  *lcoinc      = FALSE;
-  *intrsct_lat = endlat;
-  *intrsct_lon = endlon;
-
-  loutside = FALSE;
-  s1 = ZERO;
-
-  /* Convert coordinates */
-
-  srch_corner_x = malloc(srch_corners*num_srch_cells*sizeof(double));
-  srch_corner_y = malloc(srch_corners*num_srch_cells*sizeof(double));
-
-  if ( beglat > ZERO )
-    {
-      pi4 = QUART*PI;
-      rns = ONE;
-    }
-  else
-    {
-      pi4 = -QUART*PI;
-      rns = -ONE;
-    }
-
-  if ( *luse_last )
-    {
-      x1 = *intrsct_x;
-      y1 = *intrsct_y;
-    }
-  else
-    {
-      x1 = rns*TWO*sin(pi4 - HALF*beglat)*cos(beglon);
-      y1 =     TWO*sin(pi4 - HALF*beglat)*sin(beglon);
-      *luse_last = TRUE;
-    }
-
-  x2 = rns*TWO*sin(pi4 - HALF*endlat)*cos(endlon);
-  y2 =     TWO*sin(pi4 - HALF*endlat)*sin(endlon);
-
-  for ( n = 0; n < srch_corners*num_srch_cells; ++n )
-    {
-      srch_corner_x[n] = rns*TWO*sin(pi4 - HALF*srch_corner_lat[n])*
-	                         cos(srch_corner_lon[n]);
-      srch_corner_y[n] =     TWO*sin(pi4 - HALF*srch_corner_lat[n])*
-	                         sin(srch_corner_lon[n]);
-    }
-
-  begx = x1;
-  begy = y1;
-  endx = x2;
-  endy = y2;
-  begsegx = rns*TWO*sin(pi4 - HALF*begseg[0])*cos(begseg[1]);
-  begsegy =     TWO*sin(pi4 - HALF*begseg[0])*sin(begseg[1]);
-  *intrsct_x = endx;
-  *intrsct_y = endy;
-
-  /*
-     Search for location of this segment in ocean grid using cross
-     product method to determine whether a point is enclosed by a cell
-  */
-  while ( TRUE ) /* srch_loop */
-    {
-      /* If last segment crossed threshold, use that location */
-
-      if ( *lthresh )
-	{
-	  for ( cell=0; cell < num_srch_cells; ++cell )
-	    if ( srch_add[cell] == *location )
-	      {
-		eps = TINY;
-		goto after_srch_loop;
-	      }
-	}
-
-      /* Otherwise normal search algorithm */
-
-      for ( cell = 0; cell < num_srch_cells; ++cell ) /* cell_loop  */
-	{
-	  ioffset = cell*srch_corners;
-	  for ( n = 0; n < srch_corners; ++n ) /* corner_loop */
-	    {
-	      next_n = (n+1)%srch_corners;
-	      /*
-		Here we take the cross product of the vector making 
-		up each cell side with the vector formed by the vertex
-		and search point.  If all the cross products are 
-		positive, the point is contained in the cell.
-	      */
-	      vec1_x = srch_corner_x[ioffset+next_n] - srch_corner_x[ioffset+n];
-	      vec1_y = srch_corner_y[ioffset+next_n] - srch_corner_y[ioffset+n];
-	      vec2_x = x1 - srch_corner_x[ioffset+n];
-	      vec2_y = y1 - srch_corner_y[ioffset+n];
-
-	      /* If endpoint coincident with vertex, offset the endpoint */
-
-	      if ( IS_EQUAL(vec2_x, 0) && IS_EQUAL(vec2_y, 0) )
-		{
-		  x1 += 1.e-10*(x2 - x1);
-		  y1 += 1.e-10*(y2 - y1);
-		  vec2_x = x1 - srch_corner_x[ioffset+n];
-		  vec2_y = y1 - srch_corner_y[ioffset+n];
-		}
-
-	      cross_product = vec1_x*vec2_y - vec2_x*vec1_y;
-
-	      /*
-		If the cross product for a side is ZERO, the point 
-                  lies exactly on the side or the length of a side
-                  is ZERO.  If the length is ZERO set det > 0.
-                  otherwise, perform another cross 
-                  product between the side and the segment itself. 
-	        If this cross product is also ZERO, the line is 
-	          coincident with the cell boundary - perform the 
-                  dot product and only choose the cell if the dot 
-                  product is positive (parallel vs anti-parallel).
-	      */
-	      if ( IS_EQUAL(cross_product, 0) )
-		{
-		  if ( IS_NOT_EQUAL(vec1_x, 0) || IS_NOT_EQUAL(vec1_y, 0) )
-		    {
-		      vec2_x = x2 - x1;
-		      vec2_y = y2 - y1;
-		      cross_product = vec1_x*vec2_y - vec2_x*vec1_y;
-		    }
-		  else
-		    cross_product = ONE;
-
-		  if ( IS_EQUAL(cross_product, 0) )
-		    {
-		      *lcoinc = TRUE;
-		      cross_product = vec1_x*vec2_x + vec1_y*vec2_y;
-		      if ( lrevers ) cross_product = -cross_product;
-		    }
-		}
-
-	      /* If cross product is less than ZERO, this cell doesn't work */
-
-	      if ( cross_product < ZERO ) break; /* corner_loop */
-	     
-	    } /* corner_loop */
-
-	  /* If cross products all positive, we found the location */
-
-	  if  ( n >= srch_corners )
-	    {
-	      *location = srch_add[cell];
-	      /*
-		If the beginning of this segment was outside the
-		grid, invert the segment so the intersection found
-		will be the first intersection with the grid
-	      */
-	      if ( loutside )
-		{
-		  x2 = begx;
-		  y2 = begy;
-		  *location = -1;
-		  eps  = -TINY;
-		}
-	      else
-		eps  = TINY;
-            
-	      goto after_srch_loop;
-	    }
-
-	  /* Otherwise move on to next cell */
-
-	} /* cell_loop */
-
-     /*
-       If no cell found, the point lies outside the grid.
-       take some baby steps along the segment to see if any
-       part of the segment lies inside the grid.  
-     */
-      loutside = TRUE;
-      s1 = s1 + BABY_STEP;
-      x1 = begx + s1*(x2 - begx);
-      y1 = begy + s1*(y2 - begy);
-
-      /* Reached the end of the segment and still outside the grid return no intersection */
-
-      if ( s1 >= ONE )
-	{
-          free(srch_corner_y);
-          free(srch_corner_x);
-          *luse_last = FALSE;
-          return;
-	}
-    } /* srch_loop */
-
- after_srch_loop:
-
-  /*
-    Now that a cell is found, search for the next intersection.
-    Loop over sides of the cell to find intersection with side
-    must check all sides for coincidences or intersections
-  */
-
-  ioffset = cell*srch_corners;
-
-  for ( n = 0; n < srch_corners; ++n ) /* intrsct_loop */
-    {
-      next_n = (n+1)%srch_corners;
-
-      grdy1 = srch_corner_y[ioffset+n];
-      grdy2 = srch_corner_y[ioffset+next_n];
-      grdx1 = srch_corner_x[ioffset+n];
-      grdx2 = srch_corner_x[ioffset+next_n];
-
-      /* Set up linear system to solve for intersection */
-
-      mat1 = x2 - x1;
-      mat2 = grdx1 - grdx2;
-      mat3 = y2 - y1;
-      mat4 = grdy1 - grdy2;
-      rhs1 = grdx1 - x1;
-      rhs2 = grdy1 - y1;
-
-      determ = mat1*mat4 - mat2*mat3;
-
-      /*
-         If the determinant is ZERO, the segments are either 
-           parallel or coincident.  Coincidences were detected 
-           above so do nothing.
-         If the determinant is non-ZERO, solve for the linear 
-           parameters s for the intersection point on each line 
-           segment.
-         If 0<s1,s2<1 then the segment intersects with this side.
-           Return the point of intersection (adding a small
-           number so the intersection is off the grid line).
-      */
-      if ( fabs(determ) > 1.e-30 )
-	{
-          s1 = (rhs1*mat4 - mat2*rhs2)/determ;
-          s2 = (mat1*rhs2 - rhs1*mat3)/determ;
-
-	  /* Uwe Schulzweida: s1 >= ZERO! (bug fix) */
-          if ( s2 >= ZERO && s2 <= ONE && s1 >= ZERO && s1 <= ONE )
-	    {
-	      /*
-		Recompute intersection based on full segment
-		so intersections are consistent for both sweeps
-	      */
-	      if ( ! loutside )
-		{
-		  mat1 = x2 - begsegx;
-		  mat3 = y2 - begsegy;
-		  rhs1 = grdx1 - begsegx;
-		  rhs2 = grdy1 - begsegy;
-		}
-	      else
-		{
-		  mat1 = x2 - endx;
-		  mat3 = y2 - endy;
-		  rhs1 = grdx1 - endx;
-		  rhs2 = grdy1 - endy;
-		}
-
-	      determ = mat1*mat4 - mat2*mat3;
-
-	      /*
-		Sometimes due to roundoff, the previous 
-		determinant is non-ZERO, but the lines
-		are actually coincident.  If this is the
-		case, skip the rest.
-	      */
-	      if ( IS_NOT_EQUAL(determ, 0) )
-	       {
-		 s1 = (rhs1*mat4 - mat2*rhs2)/determ;
-		 s2 = (mat1*rhs2 - rhs1*mat3)/determ;
-
-		 if ( ! loutside )
-		   {
-		     *intrsct_x = begsegx + s1*mat1;
-		     *intrsct_y = begsegy + s1*mat3;
-		   }
-		 else 
-		   {
-		     *intrsct_x = endx + s1*mat1;
-		     *intrsct_y = endy + s1*mat3;
-		   }
-
-		 /* Convert back to lat/lon coordinates */
-
-		 *intrsct_lon = rns*atan2(*intrsct_y, *intrsct_x);
-		 if ( *intrsct_lon < ZERO ) 
-		   *intrsct_lon = *intrsct_lon + PI2;
-		 
-		 if ( fabs(*intrsct_x) > 1.e-10 )
-		   *intrsct_lat = (pi4 - asin(rns*HALF*(*intrsct_x)/cos(*intrsct_lon)))*TWO;
-		 else if ( fabs(*intrsct_y) > 1.e-10 )
-		   *intrsct_lat = (pi4 - asin(HALF*(*intrsct_y)/sin(*intrsct_lon)))*TWO;
-		 else
-		   *intrsct_lat = TWO*pi4;
-
-		 /* Add offset in transformed space for next pass. */
-
-		 if ( s1 - eps/determ < ONE )
-		   {
-		     *intrsct_x = *intrsct_x - mat1*(eps/determ);
-		     *intrsct_y = *intrsct_y - mat3*(eps/determ);
-		   }
-		 else
-		   {
-		     if ( ! loutside)
-		       {
-			 *intrsct_x = endx;
-			 *intrsct_y = endy;
-			 *intrsct_lat = endlat;
-			 *intrsct_lon = endlon;
-		       }
-		     else 
-		       {
-			 *intrsct_x = begsegx;
-			 *intrsct_y = begsegy;
-			 *intrsct_lat = begseg[0];
-			 *intrsct_lon = begseg[1];
-		       }
-		   }
-
-		 break; /* intrsct_loop */
-	       }
-	    }
-	}
- 
-      /* No intersection this side, move on to next side */
-
-    } /* intrsct_loop */
-
-  free(srch_corner_y);
-  free(srch_corner_x);
-
-  /*
-     If segment manages to cross over pole, shift the beginning 
-     endpoint in order to avoid hitting pole directly
-     (it is ok for endpoint to be pole point)
-  */
-
-  if ( fabs(*intrsct_x) < 1.e-10 && fabs(*intrsct_y) < 1.e-10 &&
-       (IS_NOT_EQUAL(endx, 0) && IS_NOT_EQUAL(endy, 0)) )
-    {
-      if ( *avoid_pole_count > 2 )
-	{
-	  *avoid_pole_count  = 0;
-	  *avoid_pole_offset = 10.*(*avoid_pole_offset);
-        }
-
-      cross_product = begsegx*(endy-begsegy) - begsegy*(endx-begsegx);
-      *intrsct_lat = begseg[0];
-      if ( cross_product*(*intrsct_lat) > ZERO )
-	{
-          *intrsct_lon = beglon    + *avoid_pole_offset;
-          begseg[1]    = begseg[1] + *avoid_pole_offset;
-	}
-      else
-	{
-          *intrsct_lon = beglon    - *avoid_pole_offset;
-          begseg[1]    = begseg[1] - *avoid_pole_offset;
-        }
-
-      *avoid_pole_count = *avoid_pole_count + 1;
-      *luse_last = FALSE;
-    }
-  else
-    {
-      *avoid_pole_count  = 0;
-      *avoid_pole_offset = TINY;
-    }
-
-  /*
-     If the segment crosses a pole threshold, reset the intersection
-     to be the threshold latitude and do not reuse x,y intersect
-     on next entry.  Only check if did not cross threshold last
-     time - sometimes the coordinate transformation can place a
-     segment on the other side of the threshold again
-  */
-  if ( *lthresh )
-    {
-      if ( *intrsct_lat > north_thresh || *intrsct_lat < south_thresh )
-	*lthresh = FALSE;
-    }
-  else if ( beglat > ZERO && *intrsct_lat < north_thresh )
-    {
-      mat4 = endlat - begseg[0];
-      mat3 = endlon - begseg[1];
-      if ( mat3 >  PI ) mat3 = mat3 - PI2;
-      if ( mat3 < -PI ) mat3 = mat3 + PI2;
-      *intrsct_lat = north_thresh - TINY;
-      s1 = (north_thresh - begseg[0])/mat4;
-      *intrsct_lon = begseg[1] + s1*mat3;
-      *luse_last = FALSE;
-      *lthresh = TRUE;
-    }
-  else if ( beglat < ZERO && *intrsct_lat > south_thresh )
-    {
-      mat4 = endlat - begseg[0];
-      mat3 = endlon - begseg[1];
-      if ( mat3 >  PI ) mat3 = mat3 - PI2;
-      if ( mat3 < -PI ) mat3 = mat3 + PI2;
-      *intrsct_lat = south_thresh + TINY;
-      s1 = (south_thresh - begseg[0])/mat4;
-      *intrsct_lon = begseg[1] + s1*mat3;
-      *luse_last = FALSE;
-      *lthresh = TRUE;
-    }
-
-  /* If reached end of segment, do not use x,y intersect on next entry */
-
-  if ( IS_EQUAL(*intrsct_lat, endlat) && IS_EQUAL(*intrsct_lon, endlon) ) *luse_last = FALSE;
-
-}  /* pole_intersection */
-
-
-/*
-   This routine finds the next intersection of a destination grid line with 
-   the line segment given by beglon, endlon, etc.
-   A coincidence flag is returned if the segment is entirely coincident with 
-   an ocean grid line.  The cells in which to search for an intersection must 
-   have already been restricted in the calling routine.
-*/
-static
-void intersection(long *location, double *intrsct_lat, double *intrsct_lon, int *lcoinc,
-		  double beglat, double beglon, double endlat, double endlon, double *begseg,
-		  int lbegin, int lrevers,
-		  long num_srch_cells, long srch_corners, const int *restrict srch_add,
-		  const double *restrict srch_corner_lat, const double *restrict srch_corner_lon,
-		  int *last_loc, int *lthresh, double *intrsct_lat_off, double *intrsct_lon_off,
-		  int *luse_last, double *intrsct_x, double *intrsct_y,
-		  int *avoid_pole_count, double *avoid_pole_offset)
-{
-  /*
-    Intent(in): 
-    int lbegin,             ! flag for first integration along this segment
-    int lrevers             ! flag whether segment integrated in reverse
-    double beglat, beglon,  ! beginning lat/lon endpoints for segment
-    double endlat, endlon   ! ending    lat/lon endpoints for segment
-
-    Intent(inout) :: 
-    double *begseg          ! begin lat/lon of full segment
-
-    intent(out): 
-    int *location           ! address in destination array containing this segment
-    int *lcoinc             ! flag segments which are entirely coincident with a grid line
-    double *intrsct_lat, *intrsct_lon ! lat/lon coords of next intersect.
-  */
-  /* Local variables */
-  long n, next_n, cell;
-  long ioffset;
-
-  int  loutside;             /* flags points outside grid */
-
-  double lon1, lon2;         /* local longitude variables for segment */
-  double lat1, lat2;         /* local latitude  variables for segment */
-  double grdlon1, grdlon2;   /* local longitude variables for grid cell */
-  double grdlat1, grdlat2;   /* local latitude  variables for grid cell */
-  double vec1_lat, vec1_lon; /* vectors and cross products used */
-  double vec2_lat, vec2_lon; /* during grid search */
-  double cross_product; 
-  double eps, offset;        /* small offset away from intersect */
-  double s1, s2, determ;     /* variables used for linear solve to */
-  double mat1 = 0, mat2, mat3 = 0, mat4, rhs1, rhs2;  /* find intersection */
-
-  /* Initialize defaults, flags, etc. */
-
-  *location    = -1;
-  *lcoinc      = FALSE;
-  *intrsct_lat = endlat;
-  *intrsct_lon = endlon;
-
-  if ( num_srch_cells == 0 ) return;
-
-  if ( beglat > north_thresh || beglat < south_thresh )
-    {
-      if ( *lthresh ) *location = *last_loc;
-      pole_intersection(location,
-			intrsct_lat, intrsct_lon, lcoinc, lthresh,
-			beglat, beglon, endlat, endlon, begseg, lrevers,
-			num_srch_cells, srch_corners, srch_add,
-			srch_corner_lat, srch_corner_lon,
-			luse_last, intrsct_x, intrsct_y,
-			avoid_pole_count, avoid_pole_offset);
-
-      if ( *lthresh )
-	{
-          *last_loc = *location;
-          *intrsct_lat_off = *intrsct_lat;
-          *intrsct_lon_off = *intrsct_lon;
-        }
-      return;
-    }
-
-  loutside = FALSE;
-  if ( lbegin )
-    {
-      lat1 = beglat;
-      lon1 = beglon;
-    }
-  else
-    {
-      lat1 = *intrsct_lat_off;
-      lon1 = *intrsct_lon_off;
-    }
-
-  lat2 = endlat;
-  lon2 = endlon;
-  if      ( (lon2-lon1) >  THREE*PIH ) lon2 -= PI2;
-  else if ( (lon2-lon1) < -THREE*PIH ) lon2 += PI2;
-
-  s1 = ZERO;
-
-  /*
-     Search for location of this segment in ocean grid using cross
-     product method to determine whether a point is enclosed by a cell
-  */
-  while ( TRUE ) /* srch_loop */
-    {
-      /* If last segment crossed threshold, use that location */
-
-      if ( *lthresh )
-       {
-         for ( cell = 0; cell < num_srch_cells; ++cell )
-	   if ( srch_add[cell] == *last_loc )
-	     {
-               *location = *last_loc;
-               eps = TINY;
-               goto after_srch_loop;
-	     }
-       }
-
-      /* Otherwise normal search algorithm */
-
-      for ( cell = 0; cell < num_srch_cells; ++cell ) /* cell_loop  */
-	{
-	  ioffset = cell*srch_corners;
-	  for ( n = 0; n < srch_corners; n++ ) /* corner_loop */
-	    {
-	      next_n = (n+1)%srch_corners;
-	      /*
-		Here we take the cross product of the vector making 
-		up each cell side with the vector formed by the vertex
-		and search point.  If all the cross products are 
-		positive, the point is contained in the cell.
-	      */
-	      vec1_lat = srch_corner_lat[ioffset+next_n] - srch_corner_lat[ioffset+n];
-	      vec1_lon = srch_corner_lon[ioffset+next_n] - srch_corner_lon[ioffset+n];
-	      vec2_lat = lat1 - srch_corner_lat[ioffset+n];
-	      vec2_lon = lon1 - srch_corner_lon[ioffset+n];
-
-	      /* If endpoint coincident with vertex, offset the endpoint */
-
-	      if ( IS_EQUAL(vec2_lat, 0) && IS_EQUAL(vec2_lon, 0) )
-		{
-		  lat1 += 1.e-10*(lat2-lat1);
-		  lon1 += 1.e-10*(lon2-lon1);
-		  vec2_lat = lat1 - srch_corner_lat[ioffset+n];
-		  vec2_lon = lon1 - srch_corner_lon[ioffset+n];
-		}
-
-	      /* Check for 0,2pi crossings */
-
-	      if      ( vec1_lon >  PI ) vec1_lon -= PI2;
-	      else if ( vec1_lon < -PI ) vec1_lon += PI2;
-
-	      if      ( vec2_lon >  PI ) vec2_lon -= PI2;
-	      else if ( vec2_lon < -PI ) vec2_lon += PI2;
-
-	      cross_product = vec1_lon*vec2_lat - vec2_lon*vec1_lat;
-
-	      /*
-	       If the cross product for a side is ZERO, the point 
-                 lies exactly on the side or the side is degenerate
-                 (ZERO length).  If degenerate, set the cross 
-                 product to a positive number.  Otherwise perform 
-                 another cross product between the side and the 
-                 segment itself. 
-	       If this cross product is also ZERO, the line is 
-                 coincident with the cell boundary - perform the 
-                 dot product and only choose the cell if the dot 
-                 product is positive (parallel vs anti-parallel).
-	      */
-	      if ( IS_EQUAL(cross_product, 0) )
-		{
-		  if ( IS_NOT_EQUAL(vec1_lat, 0) || IS_NOT_EQUAL(vec1_lon, 0) )
-		    {
-		      vec2_lat = lat2 - lat1;
-		      vec2_lon = lon2 - lon1;
-
-		      if      ( vec2_lon >  PI ) vec2_lon -= PI2;
-		      else if ( vec2_lon < -PI ) vec2_lon += PI2;
-
-		      cross_product = vec1_lon*vec2_lat - vec2_lon*vec1_lat;
-		    }
-		  else
-		    cross_product = ONE;
-
-		  if ( IS_EQUAL(cross_product, 0) )
-		    {
-		      *lcoinc = TRUE;
-		      cross_product = vec1_lon*vec2_lon + vec1_lat*vec2_lat;
-		      if ( lrevers ) cross_product = -cross_product;
-		    }
-		}
-
-	      /* If cross product is less than ZERO, this cell doesn't work */
-
-	      if ( cross_product < ZERO ) break; /* corner_loop */
-
-	    } /* corner_loop */
-
-	  /* If cross products all positive, we found the location */
-
-	  if ( n >= srch_corners )
-	    {
-	      *location = srch_add[cell];
-	      /*
-		If the beginning of this segment was outside the
-		grid, invert the segment so the intersection found
-		will be the first intersection with the grid
-	      */
-	      if ( loutside )
-		{
-		  lat2 = beglat;
-		  lon2 = beglon;
-		  *location = -1;
-		  eps  = -TINY;
-		}
-	      else
-		eps  = TINY;
-
-	      goto after_srch_loop;
-	    }
-
-	  /* Otherwise move on to next cell */
-
-	} /* cell_loop */
-
-      /*
-	If still no cell found, the point lies outside the grid.
-	Take some baby steps along the segment to see if any
-	part of the segment lies inside the grid.  
-      */
-      loutside = TRUE;
-      s1 = s1 + BABY_STEP;
-      lat1 = beglat + s1*(endlat - beglat);
-      lon1 = beglon + s1*(lon2   - beglon);
-
-      /* Reached the end of the segment and still outside the grid return no intersection */
-
-      if ( s1 >= ONE ) return;
-
-    } /* srch_loop */
-
- after_srch_loop:
-
-  /*
-    Now that a cell is found, search for the next intersection.
-    Loop over sides of the cell to find intersection with side
-    must check all sides for coincidences or intersections
-  */
-
-  ioffset = cell*srch_corners;
-
-  for ( n = 0; n < srch_corners; ++n ) /* intrsct_loop */
-    {
-      next_n = (n+1)%srch_corners;
-
-      grdlon1 = srch_corner_lon[ioffset+n];
-      grdlon2 = srch_corner_lon[ioffset+next_n];
-      grdlat1 = srch_corner_lat[ioffset+n];
-      grdlat2 = srch_corner_lat[ioffset+next_n];
-
-      /* Set up linear system to solve for intersection */
-
-      mat1 = lat2 - lat1;
-      mat2 = grdlat1 - grdlat2;
-      mat3 = lon2 - lon1;
-      mat4 = grdlon1 - grdlon2;
-      rhs1 = grdlat1 - lat1;
-      rhs2 = grdlon1 - lon1;
-
-      if      ( mat3 >  PI ) mat3 -= PI2;
-      else if ( mat3 < -PI ) mat3 += PI2;
-
-      if      ( mat4 >  PI ) mat4 -= PI2;
-      else if ( mat4 < -PI ) mat4 += PI2;
-
-      if      ( rhs2 >  PI ) rhs2 -= PI2;
-      else if ( rhs2 < -PI ) rhs2 += PI2;
-
-      determ = mat1*mat4 - mat2*mat3;
-
-      /*
-         If the determinant is ZERO, the segments are either 
-           parallel or coincident.  Coincidences were detected 
-           above so do nothing.
-         If the determinant is non-ZERO, solve for the linear 
-           parameters s for the intersection point on each line 
-           segment.
-         If 0<s1,s2<1 then the segment intersects with this side.
-           Return the point of intersection (adding a small
-           number so the intersection is off the grid line).
-      */
-      if ( fabs(determ) > 1.e-30 )
-	{
-	  s1 = (rhs1*mat4 - mat2*rhs2)/determ;
-	  s2 = (mat1*rhs2 - rhs1*mat3)/determ;
-
-	  if ( s2 >= ZERO && s2 <= ONE && s1 >= ZERO && s1 <= ONE )
-	    {
-	      /*
-		Recompute intersection based on full segment
-		so intersections are consistent for both sweeps
-	      */
-	      if ( ! loutside )
-		{
-		  mat1 = lat2 - begseg[0];
-		  mat3 = lon2 - begseg[1];
-		  rhs1 = grdlat1 - begseg[0];
-		  rhs2 = grdlon1 - begseg[1];
-		}
-	      else
-		{
-		  mat1 = begseg[0] - endlat;
-		  mat3 = begseg[1] - endlon;
-		  rhs1 = grdlat1 - endlat;
-		  rhs2 = grdlon1 - endlon;
-		}
-
-	      if      ( mat3 >  PI ) mat3 -= PI2;
-	      else if ( mat3 < -PI ) mat3 += PI2;
-
-	      if      ( rhs2 > PI  ) rhs2 -= PI2;
-	      else if ( rhs2 < -PI ) rhs2 += PI2;
-
-	      determ = mat1*mat4 - mat2*mat3;
-
-	      /*
-		Sometimes due to roundoff, the previous 
-		determinant is non-ZERO, but the lines
-		are actually coincident.  If this is the
-		case, skip the rest.
-	      */
-	      if ( IS_NOT_EQUAL(determ, 0) )
-		{
-		  s1 = (rhs1*mat4 - mat2*rhs2)/determ;
-		  s2 = (mat1*rhs2 - rhs1*mat3)/determ;
-
-		  offset = s1 + eps/determ;
-		  if ( offset > ONE ) offset = ONE;
-
-		  if ( ! loutside )
-		    {
-		      *intrsct_lat = begseg[0] + mat1*s1;
-		      *intrsct_lon = begseg[1] + mat3*s1;
-		      *intrsct_lat_off = begseg[0] + mat1*offset;
-		      *intrsct_lon_off = begseg[1] + mat3*offset;
-		    }
-		  else
-		    {
-		      *intrsct_lat = endlat + mat1*s1;
-		      *intrsct_lon = endlon + mat3*s1;
-		      *intrsct_lat_off = endlat + mat1*offset;
-		      *intrsct_lon_off = endlon + mat3*offset;
-		    }
-		  break; /* intrsct_loop */
-		}
-	    }
-	}
-
-      /* No intersection this side, move on to next side */
-
-    } /* intrsct_loop */
-
-  /*
-     If the segment crosses a pole threshold, reset the intersection
-     to be the threshold latitude.  Only check if this was not a
-     threshold segment since sometimes coordinate transform can end
-     up on other side of threshold again.
-  */
-  if ( *lthresh )
-    {
-      if ( *intrsct_lat < north_thresh || *intrsct_lat > south_thresh )
-	*lthresh = FALSE;
-    }
-  else if ( lat1 > ZERO && *intrsct_lat > north_thresh )
-    {
-      *intrsct_lat = north_thresh + TINY;
-      *intrsct_lat_off = north_thresh + eps*mat1;
-      s1 = (*intrsct_lat - begseg[0])/mat1;
-      *intrsct_lon     = begseg[1] + s1*mat3;
-      *intrsct_lon_off = begseg[1] + (s1+eps)*mat3;
-      *last_loc = *location;
-      *lthresh = TRUE;
-    }
-  else if ( lat1 < ZERO && *intrsct_lat < south_thresh )
-    {
-      *intrsct_lat = south_thresh - TINY;
-      *intrsct_lat_off = south_thresh + eps*mat1;
-      s1 = (*intrsct_lat - begseg[0])/mat1;
-      *intrsct_lon     = begseg[1] + s1*mat3;
-      *intrsct_lon_off = begseg[1] + (s1+eps)*mat3;
-      *last_loc = *location;
-      *lthresh = TRUE;
-    }
-
-}  /* intersection */
-
-
-/*
-   This routine computes the line integral of the flux function 
-   that results in the interpolation weights.  The line is defined
-   by the input lat/lon of the endpoints.
-*/
-static
-void line_integral(double *weights, double in_phi1, double in_phi2, 
-		   double theta1, double theta2, double grid1_lon, double grid2_lon)
-{
-  /*
-    Intent(in): 
-    double in_phi1, in_phi2,     ! Longitude endpoints for the segment
-    double theta1, theta2,       ! Latitude  endpoints for the segment
-    double grid1_lon,            ! Reference coordinates for each
-    double grid2_lon             ! Grid (to ensure correct 0,2pi interv.)
-
-    Intent(out):
-    double weights[6]            ! Line integral contribution to weights
-  */
-
-  /*  Local variables  */
-  double dphi, sinth1, sinth2, costh1, costh2, fac;
-  double phi1, phi2;
-  double f1, f2, fint;
-
-  /*  Weights for the general case based on a trapezoidal approx to the integrals. */
-
-  sinth1 = sin(theta1);
-  sinth2 = sin(theta2);
-  costh1 = cos(theta1);
-  costh2 = cos(theta2);
-
-  dphi = in_phi1 - in_phi2;
-  if      ( dphi >  PI ) dphi -= PI2;
-  else if ( dphi < -PI ) dphi += PI2;
-      
-  dphi = HALF*dphi;
-
-  /*
-     The first weight is the area overlap integral. The second and
-     fourth are second-order latitude gradient weights.
-  */
-  weights[0] = dphi*(sinth1 + sinth2);
-  weights[1] = dphi*(costh1 + costh2 + (theta1*sinth1 + theta2*sinth2));
-  weights[3] = weights[0];
-  weights[4] = weights[1];
-
-  /*
-     The third and fifth weights are for the second-order phi gradient
-     component.  Must be careful of longitude range.
-  */
-  f1 = HALF*(costh1*sinth1 + theta1);
-  f2 = HALF*(costh2*sinth2 + theta2);
-
-  phi1 = in_phi1 - grid1_lon;
-  if      ( phi1 >  PI ) phi1 -= PI2;
-  else if ( phi1 < -PI ) phi1 += PI2;
-
-  phi2 = in_phi2 - grid1_lon;
-  if      ( phi2 >  PI ) phi2 -= PI2;
-  else if ( phi2 < -PI ) phi2 += PI2;
-
-  if ( (phi2-phi1) <  PI && (phi2-phi1) > -PI )
-    weights[2] = dphi*(phi1*f1 + phi2*f2);
-  else
-    {
-      if ( phi1 > ZERO )
-	fac = PI;
-      else
-	fac = -PI;
-
-      fint = f1 + (f2-f1)*(fac-phi1)/fabs(dphi);
-      weights[2] = HALF*phi1*(phi1-fac)*f1 -
-	           HALF*phi2*(phi2+fac)*f2 +
-	           HALF*fac*(phi1+phi2)*fint;
-    }
-
-  phi1 = in_phi1 - grid2_lon;
-  if      ( phi1 >  PI ) phi1 -= PI2;
-  else if ( phi1 < -PI ) phi1 += PI2;
-
-  phi2 = in_phi2 - grid2_lon;
-  if      ( phi2 >  PI ) phi2 -= PI2;
-  else if ( phi2 < -PI ) phi2 += PI2;
-
-  if ( (phi2-phi1) <  PI  && (phi2-phi1) > -PI )
-    weights[5] = dphi*(phi1*f1 + phi2*f2);
-  else
-    {
-      if ( phi1 > ZERO ) fac =  PI;
-      else               fac = -PI;
-
-      fint = f1 + (f2-f1)*(fac-phi1)/fabs(dphi);
-      weights[5] = HALF*phi1*(phi1-fac)*f1 -
-     	           HALF*phi2*(phi2+fac)*f2 +
-	           HALF*fac*(phi1+phi2)*fint;
-    }
-
-}  /* line_integral */
-
-static
-void grid_store_init(grid_store_t *grid_store, long gridsize)
-{
-  long iblk;
-  long blksize[] = {128, 256, 512, 1024, 2048, 4096, 8192};
-  long nblks = sizeof(blksize)/sizeof(long);
-  long nblocks;
-
-  for ( iblk = nblks-1; iblk >= 0; --iblk )
-    if ( gridsize/blksize[iblk] > 99 ) break;
-
-  if ( iblk < 0 ) iblk = 0;
-
-  /* grid_store->blk_size = BLK_SIZE; */
-  grid_store->blk_size = blksize[iblk];
-  grid_store->max_size = gridsize;
-
-  grid_store->nblocks = grid_store->max_size/grid_store->blk_size;
-  if ( grid_store->max_size%grid_store->blk_size > 0 ) grid_store->nblocks++;
-
-  if ( cdoVerbose )
-    fprintf(stdout, "blksize = %d  lastblksize = %d  max_size = %d  nblocks = %d\n", 
-	    grid_store->blk_size, grid_store->max_size%grid_store->blk_size, 
-	    grid_store->max_size, grid_store->nblocks);
-
-  grid_store->blksize = malloc(grid_store->nblocks*sizeof(int));
-  grid_store->nlayers = malloc(grid_store->nblocks*sizeof(int));
-  grid_store->layers  = malloc(grid_store->nblocks*sizeof(grid_layer_t *));
-
-  nblocks = grid_store->nblocks;
-  for ( iblk = 0; iblk < nblocks; ++iblk )
-    {
-      grid_store->blksize[iblk] = grid_store->blk_size;
-      grid_store->nlayers[iblk] = 0;
-      grid_store->layers[iblk]  = NULL;
-    }
-  if ( grid_store->max_size%grid_store->blk_size > 0 )
-    grid_store->blksize[grid_store->nblocks-1] = grid_store->max_size%grid_store->blk_size;
-}
-
-static
-void grid_store_delete(grid_store_t *grid_store)
-{
-  grid_layer_t *grid_layer, *grid_layer_f;
-  long ilayer;
-  long i, j;
-  long iblk;
-
-  for ( iblk = 0; iblk < grid_store->nblocks; ++iblk )
-    {
-      j = 0;
-      grid_layer = grid_store->layers[iblk];
-      for ( ilayer = 0; ilayer < grid_store->nlayers[iblk]; ++ilayer )
-	{
-	  if ( cdoVerbose )
-	    {
-	      for ( i = 0; i < grid_store->blksize[iblk]; ++i )
-		if ( grid_layer->grid2_link[i] != -1 ) j++;
-	    }
-	      
-	  grid_layer_f = grid_layer;
-	  free(grid_layer->grid2_link);
-	  grid_layer = grid_layer->next;
-	  free(grid_layer_f);
-	}
-
-      if ( cdoVerbose )
-	{
-	  fprintf(stderr, "block = %ld nlayers = %d  allocated = %d  used = %ld\n",
-		  iblk+1, grid_store->nlayers[iblk], 
-		  grid_store->nlayers[iblk]*grid_store->blksize[iblk], j);
-	}
-    }
-
-  free(grid_store->blksize);
-  free(grid_store->layers);
-  free(grid_store->nlayers);  
-}
-
-/*
-    This routine stores the address and weight for this link in the appropriate 
-    address and weight arrays and resizes those arrays if necessary.
-*/
-static
-void store_link_cnsrv_fast(remapvars_t *rv, long add1, long add2, long num_wts, double *weights, grid_store_t *grid_store)
-{
-  /*
-    Input variables:
-    int  add1         ! address on source grid
-    int  add2         ! address on target grid
-    double weights[]  ! array of remapping weights for this link
-  */
-  /* Local variables */
-  long nlink; /* link index */
-  long ilayer, i, iblk, iadd2;
-  long nlayer, blksize;
-  int lstore_link;
-  grid_layer_t *grid_layer, **grid_layer2;
-
-  /*  If all weights are ZERO, do not bother storing the link */
-
-  if ( num_wts == 3 )
-    {
-      if ( IS_EQUAL(weights[0], 0) && IS_EQUAL(weights[1], 0) && IS_EQUAL(weights[2], 0) ) return;
-    }
-  else
-    {
-      if ( IS_EQUAL(weights[0], 0) ) return;
-    }
-    
-  /* If the link already exists, add the weight to the current weight arrays */
-
-  iblk  = BLK_NUM(add2);
-  iadd2 = BLK_IDX(add2);
-
-  lstore_link = FALSE;
-  grid_layer2 = &grid_store->layers[iblk];
-  nlayer = grid_store->nlayers[iblk];
-  for ( ilayer = 0; ilayer < nlayer; ++ilayer )
-    {
-      grid_layer = *grid_layer2;
-      nlink = grid_layer->grid2_link[iadd2];
-      if ( nlink == -1 )
-	{
-	  break;
-	}
-      else if ( add1 == rv->src_grid_add[nlink] )
-	{
-	  lstore_link = TRUE;
-	  break;
-	}
-      grid_layer2 = &(*grid_layer2)->next;
-    }
-
-  if ( lstore_link )
-    {
-      for ( i = 0; i < num_wts; ++i ) rv->wts[num_wts*nlink+i] += weights[i];	      
-      return;
-    }
-
-  /*
-     If the link does not yet exist, increment number of links and 
-     check to see if remap arrays need to be increased to accomodate 
-     the new link. Then store the link.
-  */
-  nlink = rv->num_links;
-
-  if ( ilayer < grid_store->nlayers[iblk] )
-    {
-      grid_layer->grid2_link[iadd2] = nlink;
-    }
-  else
-    {
-      grid_layer = malloc(sizeof(grid_layer_t));
-      grid_layer->next = NULL;
-      grid_layer->grid2_link = malloc(grid_store->blksize[iblk]*sizeof(int));
-
-      blksize = grid_store->blksize[iblk];
-      for ( i = 0; i < blksize; ++i )
-	grid_layer->grid2_link[i] = -1;
-
-      grid_layer->grid2_link[iadd2] = nlink;
-      *grid_layer2 = grid_layer;
-      grid_store->nlayers[iblk]++;
-    }
-
-  rv->num_links++;
-  if ( rv->num_links >= rv->max_links )
-    resize_remap_vars(rv, rv->resize_increment);
-
-  rv->src_grid_add[nlink] = add1;
-  rv->tgt_grid_add[nlink] = add2;
-
-  for ( i = 0; i < num_wts; ++i ) rv->wts[num_wts*nlink+i] = weights[i];	      
-
-}  /* store_link_cnsrv_fast */
-
-
-/*
-    This routine stores the address and weight for this link in the appropriate 
-    address and weight arrays and resizes those arrays if necessary.
-*/
-static
-void store_link_cnsrv(remapvars_t *rv, long add1, long add2, double *restrict weights,
-		      int *link_add1[2], int *link_add2[2])
-{
-  /*
-    Input variables:
-    int  add1         ! address on source grid
-    int  add2         ! address on target grid
-    double weights[3] ! array of remapping weights for this link
-  */
-  /* Local variables */
-  long nlink, min_link, max_link; /* link index */
-
-  /*  If all weights are ZERO, do not bother storing the link */
-
-  if ( IS_EQUAL(weights[0], 0) && IS_EQUAL(weights[1], 0) && IS_EQUAL(weights[2], 0) ) return;
-
-  /*  Restrict the range of links to search for existing links */
-
-  min_link = MIN(link_add1[0][add1], link_add2[0][add2]);
-  max_link = MAX(link_add1[1][add1], link_add2[1][add2]);
-  if ( min_link == -1 )
-    {
-      min_link = 0;
-      max_link = -1;
-    }
-
-  /* If the link already exists, add the weight to the current weight arrays */
-
-#if defined(SX)
-#define STRIPED 1
-#if STRIPED
-#define STRIPLENGTH 4096
-  {
-    long ilink = max_link + 1;
-    long strip, estrip;
-    nlink = 0;
-    for ( strip=min_link; strip <= max_link; strip+=STRIPLENGTH )
-      {
-	estrip = MIN(max_link-strip+1, STRIPLENGTH);
-	for ( nlink = 0; nlink < estrip; ++nlink )
-	  {
-	    if ( add2 == rv->tgt_grid_add[strip+nlink] &&
-		 add1 == rv->src_grid_add[strip+nlink] )
-	      ilink = strip + nlink;
-	  }
-	if (ilink != (max_link + 1)) break;
-      }
-    nlink += strip;
-    if (ilink != (max_link + 1)) nlink = ilink;
-  }
-#else
-  {
-    long ilink = max_link + 1;
-    for ( nlink = min_link; nlink <= max_link; ++nlink )
-      {
-	if ( add2 == rv->tgt_grid_add[nlink] )
-	  if ( add1 == rv->src_grid_add[nlink] ) ilink = nlink;
-      }
-    if ( ilink != (max_link + 1) ) nlink = ilink;
-  }
-#endif
-#else
-  for ( nlink = min_link; nlink <= max_link; ++nlink )
-    {
-      if ( add2 == rv->tgt_grid_add[nlink] )
-	if ( add1 == rv->src_grid_add[nlink] ) break;
-    }
-#endif
-
-  if ( nlink <= max_link )
-    {
-      rv->wts[3*nlink  ] += weights[0];
-      rv->wts[3*nlink+1] += weights[1];
-      rv->wts[3*nlink+2] += weights[2];
-
-      return;
-    }
-
-  /*
-     If the link does not yet exist, increment number of links and 
-     check to see if remap arrays need to be increased to accomodate 
-     the new link. Then store the link.
-  */
-  nlink = rv->num_links;
-
-  rv->num_links++;
-  if ( rv->num_links >= rv->max_links )
-    resize_remap_vars(rv, rv->resize_increment);
-
-  rv->src_grid_add[nlink] = add1;
-  rv->tgt_grid_add[nlink] = add2;
-
-  rv->wts[3*nlink  ] = weights[0];
-  rv->wts[3*nlink+1] = weights[1];
-  rv->wts[3*nlink+2] = weights[2];
-
-  if ( link_add1[0][add1] == -1 ) link_add1[0][add1] = (int)nlink;
-  if ( link_add2[0][add2] == -1 ) link_add2[0][add2] = (int)nlink;
-  link_add1[1][add1] = (int)nlink;
-  link_add2[1][add2] = (int)nlink;
-
-}  /* store_link_cnsrv */
-
-int rect_grid_search2(long *imin, long *imax, double xmin, double xmax, long nxm, const double *restrict xm);
-
-static
-long get_srch_cells_reg2d(const int *restrict src_grid_dims, 
-			  const double *restrict src_corner_lat, const double *restrict src_corner_lon,
-			  const double *restrict tgt_cell_bound_box, int *srch_add)
-{
-  long nx = src_grid_dims[0];
-  long ny = src_grid_dims[1];
-  long num_srch_cells;  /* num cells in restricted search arrays   */
-  int lfound;
-  long nxp1, nyp1;
-  double src_lon_min, src_lon_max;
-  int debug = 0;
-
-  nxp1 = nx+1;
-  nyp1 = ny+1;
-
-  src_lon_min = src_corner_lon[0];
-  src_lon_max = src_corner_lon[nx];
-
-  double bound_lon1, bound_lon2;
-
-  num_srch_cells = 0;
-
-  long imin = nxp1, imax = -1, jmin = nyp1, jmax = -1;
-  long im, jm;
-
-  lfound = rect_grid_search2(&jmin, &jmax, tgt_cell_bound_box[0], tgt_cell_bound_box[1], nyp1, src_corner_lat);
-  if ( jmin > 0 ) jmin--;
-  if ( jmax < (ny-2) ) jmax++;
-  bound_lon1 = tgt_cell_bound_box[2];
-  bound_lon2 = tgt_cell_bound_box[3];
-  if ( bound_lon1 <= src_lon_max && bound_lon2 >= src_lon_min )
-    {
-      if ( debug ) printf("  b1 %g %g\n", bound_lon1*RAD2DEG, bound_lon2*RAD2DEG);
-      if ( bound_lon1 < src_lon_min && bound_lon2 > src_lon_min ) bound_lon1 = src_lon_min;
-      if ( bound_lon2 > src_lon_max && bound_lon1 < src_lon_max ) bound_lon2 = src_lon_max;
-      lfound = rect_grid_search2(&imin, &imax, bound_lon1, bound_lon2, nxp1, src_corner_lon);
-      if ( imin != -1 )
-	{
-	  if ( debug )
-	    printf("   %g %g imin %ld  imax %ld  jmin %ld jmax %ld\n", RAD2DEG*src_corner_lon[imin], RAD2DEG*src_corner_lon[imax+1], imin, imax, jmin, jmax);
-	  for ( jm = jmin; jm <= jmax; ++jm )
-	    for ( im = imin; im <= imax; ++im )
-	      srch_add[num_srch_cells++] = jm*nx + im;
-	}
-    }
-
-  bound_lon1 = tgt_cell_bound_box[2];
-  bound_lon2 = tgt_cell_bound_box[3];
-  if ( bound_lon1 <= src_lon_min && bound_lon2 >= src_lon_min )
-    {
-      long imin2 = nxp1, imax2 = -1;
-      bound_lon1 += 2*M_PI;
-      bound_lon2 += 2*M_PI;
-      if ( debug ) printf("  b2 %g %g\n", bound_lon1*RAD2DEG, bound_lon2*RAD2DEG);
-      if ( bound_lon1 < src_lon_min && bound_lon2 > src_lon_min ) bound_lon1 = src_lon_min;
-      if ( bound_lon2 > src_lon_max && bound_lon1 < src_lon_max ) bound_lon2 = src_lon_max;
-      lfound = rect_grid_search2(&imin2, &imax2, bound_lon1, bound_lon2, nxp1, src_corner_lon);
-      if ( imin2 != -1 && imin2 == imax ) imin2 += 1;
-      if ( imax2 != -1 && imax2 == imax ) imax2 += 1;
-      if ( imin2 != -1 )
-	{
-	  if ( debug )
-	    printf("   %g %g imin %ld  imax %ld  jmin %ld jmax %ld\n", RAD2DEG*src_corner_lon[imin2], RAD2DEG*src_corner_lon[imax2+1], imin2, imax2, jmin, jmax);
-	  for ( jm = jmin; jm <= jmax; ++jm )
-	    for ( im = imin2; im <= imax2; ++im )
-	      srch_add[num_srch_cells++] = jm*nx + im;
-	}
-    }
-
-  bound_lon1 = tgt_cell_bound_box[2];
-  bound_lon2 = tgt_cell_bound_box[3];
-  if ( bound_lon1 <= src_lon_max && bound_lon2 >= src_lon_max )
-    {
-      long imin3 = nxp1, imax3 = -1;
-      bound_lon1 -= 2*M_PI;
-      bound_lon2 -= 2*M_PI;
-      if ( debug ) printf("  b3 %g %g\n", bound_lon1*RAD2DEG, bound_lon2*RAD2DEG);
-      if ( bound_lon1 < src_lon_min && bound_lon2 > src_lon_min ) bound_lon1 = src_lon_min;
-      if ( bound_lon2 > src_lon_max && bound_lon1 < src_lon_max ) bound_lon2 = src_lon_max;
-      lfound = rect_grid_search2(&imin3, &imax3, bound_lon1, bound_lon2, nxp1, src_corner_lon);
-      if ( imin3 != -1 && imin3 == imin ) imin3 -= 1;
-      if ( imax3 != -1 && imax3 == imin ) imax3 -= 1;
-      if ( imin3 != -1 )
-	{
-	  if ( debug )
-	    printf("   %g %g imin %ld  imax %ld  jmin %ld jmax %ld\n", RAD2DEG*src_corner_lon[imin3], RAD2DEG*src_corner_lon[imax3+1], imin3, imax3, jmin, jmax);
-	  for ( jm = jmin; jm <= jmax; ++jm )
-	    for ( im = imin3; im <= imax3; ++im )
-	      srch_add[num_srch_cells++] = jm*nx + im;
-	}
-    }
-
-  return (num_srch_cells);
-}
-
-static
-long get_srch_cells(long tgt_grid_add, long nbins, int *bin_addr1, int *bin_addr2,
-		    restr_t *tgt_cell_bound_box, restr_t *src_cell_bound_box, long src_grid_size, int *srch_add)
-{
-  long num_srch_cells;  /* num cells in restricted search arrays   */
-  long min_add;         /* addresses for restricting search of     */
-  long max_add;         /* destination grid                        */
-  long n, n2;           /* generic counters                        */
-  long src_grid_add;    /* current linear address for src cell     */
-  long src_grid_addm4;
-  restr_t bound_box_lat1, bound_box_lat2, bound_box_lon1, bound_box_lon2;
-
-  /* Restrict searches first using search bins */
-
-  min_add = src_grid_size - 1;
-  max_add = 0;
-
-  for ( n = 0; n < nbins; ++n )
-    {
-      n2 = n<<1;
-      if ( tgt_grid_add >= bin_addr1[n2] && tgt_grid_add <= bin_addr1[n2+1] )
-	{
-	  if ( bin_addr2[n2  ] < min_add ) min_add = bin_addr2[n2  ];
-	  if ( bin_addr2[n2+1] > max_add ) max_add = bin_addr2[n2+1];
-	}
-    }
-
-  /* Further restrict searches using bounding boxes */
-
-  bound_box_lat1 = tgt_cell_bound_box[0];
-  bound_box_lat2 = tgt_cell_bound_box[1];
-  bound_box_lon1 = tgt_cell_bound_box[2];
-  bound_box_lon2 = tgt_cell_bound_box[3];
-
-  num_srch_cells = 0;
-  for ( src_grid_add = min_add; src_grid_add <= max_add; ++src_grid_add )
-    {
-      src_grid_addm4 = src_grid_add<<2;
-      if ( (src_cell_bound_box[src_grid_addm4+2] <= bound_box_lon2)  &&
-	   (src_cell_bound_box[src_grid_addm4+3] >= bound_box_lon1) )
-	{
-	  if ( (src_cell_bound_box[src_grid_addm4  ] <= bound_box_lat2)  &&
-	       (src_cell_bound_box[src_grid_addm4+1] >= bound_box_lat1) )
-	    {
-	      srch_add[num_srch_cells] = src_grid_add;
-	      num_srch_cells++;
-	    }
-	}
-    }
-
-  if ( bound_box_lon1 < RESTR_SCALE(0.) || bound_box_lon2 > RESTR_SCALE(PI2) )
-    {
-      if ( bound_box_lon1 < RESTR_SCALE(0.) )
-	{
-	  bound_box_lon1 += RESTR_SCALE(PI2);
-	  bound_box_lon2 += RESTR_SCALE(PI2);
-	}
-      else
-	{
-	  bound_box_lon1 -= RESTR_SCALE(PI2);
-	  bound_box_lon2 -= RESTR_SCALE(PI2);
-	}
-
-      for ( src_grid_add = min_add; src_grid_add <= max_add; ++src_grid_add )
-	{
-	  src_grid_addm4 = src_grid_add<<2;
-	  if ( (src_cell_bound_box[src_grid_addm4+2] <= bound_box_lon2)  &&
-	       (src_cell_bound_box[src_grid_addm4+3] >= bound_box_lon1) )
-	    {
-	      if ( (src_cell_bound_box[src_grid_addm4  ] <= bound_box_lat2)  &&
-		   (src_cell_bound_box[src_grid_addm4+1] >= bound_box_lat1) )
-		{
-		  long ii;
-		  for ( ii = 0; ii < num_srch_cells; ++ii )
-		    if ( srch_add[ii] == src_grid_add ) break;
-		  
-		  if ( ii == num_srch_cells )
-		    {
-		      srch_add[num_srch_cells] = src_grid_add;
-		      num_srch_cells++;
-		    }
-		}
-	    }
-	}
-    }
-
-  return (num_srch_cells);
-}
-
-
-/*
-  -----------------------------------------------------------------------
-
-   This routine traces the perimeters of every grid cell on each
-   grid checking for intersections with the other grid and computing
-   line integrals for each subsegment.
-
-  -----------------------------------------------------------------------
-*/
-void remap_conserv(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
-{
-  /* local variables */
-
-  int lcheck = TRUE;
-
-  long ioffset;
-  long max_subseg = 100000; /* max number of subsegments per segment to prevent infinite loop */
-                            /* 1000 is too small!!! */
-  long src_grid_size;
-  long tgt_grid_size;
-  long src_num_cell_corners;
-  long tgt_num_cell_corners;
-  long src_grid_add;       /* current linear address for source grid cell   */
-  long tgt_grid_add;       /* current linear address for target grid cell   */
-  long n, n3, k;        /* generic counters                        */
-  long corner;          /* corner of cell that segment starts from */
-  long next_corn;       /* corner of cell that segment ends on     */
-  long nbins, num_links;
-  long num_subseg;      /* number of subsegments                   */
-
-  int lcoinc;           /* flag for coincident segments            */
-  int lrevers;          /* flag for reversing direction of segment */
-  int lbegin;           /* flag for first integration of a segment */
-
-  double intrsct_lat, intrsct_lon;         /* lat/lon of next intersect  */
-  double beglat, endlat, beglon, endlon;   /* endpoints of current seg.  */
-  double norm_factor = 0;                  /* factor for normalizing wts */
-
-  double *tgt_centroid_lat, *tgt_centroid_lon;   /* centroid coords  */
-  double *src_centroid_lat, *src_centroid_lon;   /* on each grid     */
-
-  double begseg[2];         /* begin lat/lon for full segment */
-  double weights[6];        /* local wgt array */
-  long    num_wts;
-
-  long    max_srch_cells;   /* num cells in restricted search arrays  */
-  long    num_srch_cells;   /* num cells in restricted search arrays  */
-  long    srch_corners;     /* num of corners of srch cells           */
-  long    nsrch_corners;
-  int*    srch_add;         /* global address of cells in srch arrays */
-  int*    srch_add2[ompNumThreads];
-  int     ompthID, i;
-  double *srch_corner_lat;  /* lat of each corner of srch cells */
-  double *srch_corner_lon;  /* lon of each corner of srch cells */
-
-  int *link_add1[2];        /* min,max link add to restrict search */
-  int *link_add2[2];        /* min,max link add to restrict search */
-
-  /* Intersection */
-  int last_loc = -1;        /* save location when crossing threshold  */
-  int lthresh = FALSE;      /* flags segments crossing threshold bndy */
-  double intrsct_lat_off = 0, intrsct_lon_off = 0; /* lat/lon coords offset for next search */
-
-  /* Pole_intersection */
-  /* Save last intersection to avoid roundoff during coord transformation */
-  int luse_last = FALSE;
-  double intrsct_x, intrsct_y;      /* x,y for intersection */
-  /* Variables necessary if segment manages to hit pole */
-  int avoid_pole_count = 0;         /* count attempts to avoid pole  */
-  double avoid_pole_offset = TINY;  /* endpoint offset to avoid pole */
-  grid_store_t *grid_store = NULL;
-  double findex = 0;
-
-  progressInit();
-
-  nbins = src_grid->num_srch_bins;
-  num_wts = rv->num_wts;
-
-  if ( remap_store_link_fast )
-    {
-      grid_store = malloc(sizeof(grid_store_t));
-      grid_store_init(grid_store, tgt_grid->size);
-    }
-
-  if ( cdoVerbose )
-    {
-      cdoPrint("north_thresh: %g", north_thresh);
-      cdoPrint("south_thresh: %g", south_thresh);
-    }
-
-  if ( cdoTimer ) timer_start(timer_remap_con);
-
-  src_grid_size = src_grid->size;
-  tgt_grid_size = tgt_grid->size;
-
-  src_num_cell_corners = src_grid->num_cell_corners;
-  tgt_num_cell_corners = tgt_grid->num_cell_corners;
-
-  if ( ! remap_store_link_fast )
-    {
-      link_add1[0] = malloc(src_grid_size*sizeof(int));
-      link_add1[1] = malloc(src_grid_size*sizeof(int));
-      link_add2[0] = malloc(tgt_grid_size*sizeof(int));
-      link_add2[1] = malloc(tgt_grid_size*sizeof(int));
-
-#if defined(SX)
-#pragma vdir nodep
-#endif
-      for ( n = 0; n < src_grid_size; ++n )
-	{
-	  link_add1[0][n] = -1;
-	  link_add1[1][n] = -1;
-	}
-
-#if defined(SX)
-#pragma vdir nodep
-#endif
-      for ( n = 0; n < tgt_grid_size; ++n )
-	{
-	  link_add2[0][n] = -1;
-	  link_add2[1][n] = -1;
-	}
-    }
-
-  /* Initialize centroid arrays */
-
-  src_centroid_lat = malloc(src_grid_size*sizeof(double));
-  src_centroid_lon = malloc(src_grid_size*sizeof(double));
-  tgt_centroid_lat = malloc(tgt_grid_size*sizeof(double));
-  tgt_centroid_lon = malloc(tgt_grid_size*sizeof(double));
-
-  for ( n = 0; n < src_grid_size; ++n )
-    {
-      src_centroid_lat[n] = 0;
-      src_centroid_lon[n] = 0;
-    }
-
-  for ( n = 0; n < tgt_grid_size; ++n )
-    {
-      tgt_centroid_lat[n] = 0;
-      tgt_centroid_lon[n] = 0;
-    }
-
-  double* srch_corner_lat2[ompNumThreads];
-  double* srch_corner_lon2[ompNumThreads];
-  long max_srch_cells2[ompNumThreads];
-
-  /*  Integrate around each cell on source grid */
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      srch_corner_lat2[i] = NULL;
-      srch_corner_lon2[i] = NULL;
-    }
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    max_srch_cells2[i] = 0;
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    srch_add2[i] = malloc(tgt_grid_size*sizeof(int));
-
-  srch_corners    = tgt_num_cell_corners;
-
-  if ( cdoTimer ) timer_start(timer_remap_con_l1);
-
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(ompNumThreads, cdoTimer, nbins, num_wts, src_centroid_lon, src_centroid_lat, \
-         remap_store_link_fast, grid_store, link_add1, link_add2, rv, cdoVerbose, max_subseg, \
-	 srch_corner_lat2, srch_corner_lon2, max_srch_cells2, 		\
-	 src_num_cell_corners,	srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, srch_add2, findex) \
-  private(ompthID, srch_add, n, k, num_srch_cells, max_srch_cells, 	\
-	  src_grid_add, tgt_grid_add, ioffset, nsrch_corners, corner, next_corn, beglat, beglon, \
-	  endlat, endlon, lrevers, begseg, lbegin, num_subseg, srch_corner_lat, srch_corner_lon, \
-	  weights, intrsct_lat, intrsct_lon, intrsct_lat_off, intrsct_lon_off, intrsct_x, intrsct_y, \
-	  last_loc, lcoinc, lthresh, luse_last, avoid_pole_count, avoid_pole_offset)
-#endif
-  for ( src_grid_add = 0; src_grid_add < src_grid_size; ++src_grid_add )
-    {
-#if defined(_OPENMP)
-      ompthID = omp_get_thread_num();
-#else
-      ompthID = 0;
-#endif
-
-      int lprogress = 1;
-      if ( ompthID != 0 ) lprogress = 0;
-
-#if defined(_OPENMP)
-#pragma omp atomic
-#endif
-      findex++;
-      if ( lprogress ) progressStatus(0, 0.5, findex/src_grid_size);
-
-      srch_add = srch_add2[ompthID];
-
-      lthresh   = FALSE;
-      luse_last = FALSE;
-      avoid_pole_count  = 0;
-      avoid_pole_offset = TINY;
-
-      /* Get search cells */
-      num_srch_cells = get_srch_cells(src_grid_add, nbins, src_grid->bin_addr, tgt_grid->bin_addr,
-				      src_grid->cell_bound_box+src_grid_add*4, tgt_grid->cell_bound_box, tgt_grid_size, srch_add);
-
-      if ( num_srch_cells == 0 ) continue;
-
-      /* Create search arrays */
-
-      max_srch_cells  = max_srch_cells2[ompthID];
-      srch_corner_lat = srch_corner_lat2[ompthID];
-      srch_corner_lon = srch_corner_lon2[ompthID];
-
-      if ( num_srch_cells > max_srch_cells )
-	{
-	  srch_corner_lat = realloc(srch_corner_lat, srch_corners*num_srch_cells*sizeof(double));
-	  srch_corner_lon = realloc(srch_corner_lon, srch_corners*num_srch_cells*sizeof(double));
-
-	  max_srch_cells  = num_srch_cells;
-
-	  max_srch_cells2[ompthID]  = max_srch_cells;
-	  srch_corner_lat2[ompthID] = srch_corner_lat;
-	  srch_corner_lon2[ompthID] = srch_corner_lon;
-	}
-
-      /* gather1 */
-      for ( n = 0; n < num_srch_cells; ++n )
-	{
-	  tgt_grid_add = srch_add[n];
-	  ioffset = tgt_grid_add*srch_corners;
-
-	  nsrch_corners = n*srch_corners;
-	  for ( k = 0; k < srch_corners; k++ )
-	    {
-	      srch_corner_lat[nsrch_corners+k] = tgt_grid->cell_corner_lat[ioffset+k];
-	      srch_corner_lon[nsrch_corners+k] = tgt_grid->cell_corner_lon[ioffset+k];
-	    }
-	}
-
-      /* Integrate around this cell */
-
-      ioffset = src_grid_add*src_num_cell_corners;
-
-      for ( corner = 0; corner < src_num_cell_corners; ++corner )
-	{
-          next_corn = (corner+1)%src_num_cell_corners;
-
-          /* Define endpoints of the current segment */
-
-          beglat = src_grid->cell_corner_lat[ioffset+corner];
-          beglon = src_grid->cell_corner_lon[ioffset+corner];
-          endlat = src_grid->cell_corner_lat[ioffset+next_corn];
-          endlon = src_grid->cell_corner_lon[ioffset+next_corn];
-          lrevers = FALSE;
-
-	  /*  To ensure exact path taken during both sweeps, always integrate segments in the same direction (SW to NE). */
-          if ( (endlat < beglat) || (IS_EQUAL(endlat, beglat) && endlon < beglon) )
-	    {
-	      beglat = src_grid->cell_corner_lat[ioffset+next_corn];
-	      beglon = src_grid->cell_corner_lon[ioffset+next_corn];
-	      endlat = src_grid->cell_corner_lat[ioffset+corner];
-	      endlon = src_grid->cell_corner_lon[ioffset+corner];
-	      lrevers = TRUE;
-	    }
-
-          begseg[0] = beglat;
-          begseg[1] = beglon;
-          lbegin = TRUE;
-
-          /*
-	    If this is a constant-longitude segment, skip the rest 
-	    since the line integral contribution will be ZERO.
-          */
-          if ( IS_NOT_EQUAL(endlon, beglon) )
-	    {
-	      num_subseg = 0;
-	      /*
-		Integrate along this segment, detecting intersections 
-		and computing the line integral for each sub-segment
-	      */
-	      while ( IS_NOT_EQUAL(beglat, endlat) || IS_NOT_EQUAL(beglon, endlon) )
-		{
-		  /*  Prevent infinite loops if integration gets stuck near cell or threshold boundary */
-		  num_subseg++;
-		  if ( num_subseg >= max_subseg )
-		    cdoAbort("Integration stalled: num_subseg exceeded limit (grid1[%d]: lon1=%g lon2=%g lat1=%g lat2=%g)!",
-			     src_grid_add, beglon, endlon, beglat, endlat);
-
-		  /* Uwe Schulzweida: skip very small regions */
-		  if ( num_subseg%1000 == 0 )
-		    {
-		      if ( fabs(beglat-endlat) < 1.e-10 || fabs(beglon-endlon) < 1.e-10 )
-			{
-			  if ( cdoVerbose )
-			    cdoPrint("Skip very small region (grid1[%d]): lon=%g dlon=%g lat=%g dlat=%g",
-				     src_grid_add, beglon, endlon-beglon, beglat, endlat-beglat);
-			  break;
-			}
-		    }
-
-		  /* Find next intersection of this segment with a gridline on grid 2. */
-
-		  intersection(&tgt_grid_add, &intrsct_lat, &intrsct_lon, &lcoinc,
-			       beglat, beglon, endlat, endlon, begseg, 
-			       lbegin, lrevers,
-                               num_srch_cells, srch_corners, srch_add,
-			       srch_corner_lat, srch_corner_lon,
-			       &last_loc, &lthresh, &intrsct_lat_off, &intrsct_lon_off,
-			       &luse_last, &intrsct_x, &intrsct_y,
-			       &avoid_pole_count, &avoid_pole_offset);
-
-		  lbegin = FALSE;
-
-		  /* Compute line integral for this subsegment. */
-
-		  if ( tgt_grid_add != -1 )
-		    line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
-				  src_grid->cell_center_lon[src_grid_add], tgt_grid->cell_center_lon[tgt_grid_add]);
-		  else
-		    line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
-				  src_grid->cell_center_lon[src_grid_add], src_grid->cell_center_lon[src_grid_add]);
-
-		  /* If integrating in reverse order, change sign of weights */
-
-		  if ( lrevers ) for ( k = 0; k < 6; ++k ) weights[k] = -weights[k];
-
-		  /*
-		    Store the appropriate addresses and weights. 
-		    Also add contributions to cell areas and centroids.
-		  */
-		  if ( tgt_grid_add != -1 )
-		    if ( src_grid->mask[src_grid_add] )
-		      {
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-			{
-			  if ( remap_store_link_fast )
-			    store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
-			  else
-			    store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
-
-			  tgt_grid->cell_frac[tgt_grid_add] += weights[3];
-			}
-			src_grid->cell_frac[src_grid_add] += weights[0];
-		      }
-
-		  src_grid->cell_area[src_grid_add] += weights[0];
-		  src_centroid_lat[src_grid_add] += weights[1];
-		  src_centroid_lon[src_grid_add] += weights[2];
-
-		  /* Reset beglat and beglon for next subsegment. */
-		  beglat = intrsct_lat;
-		  beglon = intrsct_lon;
-		}
-	    }
-          /* End of segment */
-        }
-    }
-
-  if ( cdoTimer ) timer_stop(timer_remap_con_l1);
-
-  /* Finished with all cells: deallocate search arrays */
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      free(srch_corner_lon2[i]);
-      free(srch_corner_lat2[i]);
-    }
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    free(srch_add2[i]);
-
-  /* Integrate around each cell on target grid */
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      srch_corner_lat2[i] = NULL;
-      srch_corner_lon2[i] = NULL;
-    }
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    max_srch_cells2[i] = 0;
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    srch_add2[i] = malloc(src_grid_size*sizeof(int));
-
-  srch_corners    = src_num_cell_corners;
-  max_srch_cells  = 0;
-  srch_corner_lat = NULL;
-  srch_corner_lon = NULL;
-
-  if ( cdoTimer ) timer_start(timer_remap_con_l2);
-
-  findex = 0;
-
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(ompNumThreads, cdoTimer, nbins, num_wts, tgt_centroid_lon, tgt_centroid_lat, \
-         remap_store_link_fast, grid_store, link_add1, link_add2, rv, cdoVerbose, max_subseg, \
-	 srch_corner_lat2, srch_corner_lon2, max_srch_cells2, 		\
-	 tgt_num_cell_corners, srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, srch_add2, findex) \
-  private(ompthID, srch_add, n, k, num_srch_cells, max_srch_cells,	\
-	  src_grid_add, tgt_grid_add, ioffset, nsrch_corners, corner, next_corn, beglat, beglon, \
-	  endlat, endlon, lrevers, begseg, lbegin, num_subseg, srch_corner_lat, srch_corner_lon, \
-	  weights, intrsct_lat, intrsct_lon, intrsct_lat_off, intrsct_lon_off, intrsct_x, intrsct_y, \
-	  last_loc, lcoinc, lthresh, luse_last, avoid_pole_count, avoid_pole_offset)
-#endif
-  for ( tgt_grid_add = 0; tgt_grid_add < tgt_grid_size; ++tgt_grid_add )
-    {
-#if defined(_OPENMP)
-      ompthID = omp_get_thread_num();
-#else
-      ompthID = 0;
-#endif
-
-      int lprogress = 1;
-      if ( ompthID != 0 ) lprogress = 0;
-
-#if defined(_OPENMP)
-#pragma omp atomic
-#endif
-      findex++;
-      if ( lprogress ) progressStatus(0.5, 0.5, findex/tgt_grid_size);
-
-      srch_add = srch_add2[ompthID];
-
-      lthresh   = FALSE;
-      luse_last = FALSE;
-      avoid_pole_count  = 0;
-      avoid_pole_offset = TINY;
-
-      /* Get search cells */
-      num_srch_cells = get_srch_cells(tgt_grid_add, nbins, tgt_grid->bin_addr, src_grid->bin_addr,
-				      tgt_grid->cell_bound_box+tgt_grid_add*4, src_grid->cell_bound_box, src_grid_size, srch_add);
-
-      if ( num_srch_cells == 0 ) continue;
-
-      /* Create search arrays */
-      
-      max_srch_cells  = max_srch_cells2[ompthID];
-      srch_corner_lat = srch_corner_lat2[ompthID];
-      srch_corner_lon = srch_corner_lon2[ompthID];
-
-      if ( num_srch_cells > max_srch_cells )
-	{
-	  srch_corner_lat = realloc(srch_corner_lat, srch_corners*num_srch_cells*sizeof(double));
-	  srch_corner_lon = realloc(srch_corner_lon, srch_corners*num_srch_cells*sizeof(double));
-
-	  max_srch_cells  = num_srch_cells;
-
-	  max_srch_cells2[ompthID]  = max_srch_cells;
-	  srch_corner_lat2[ompthID] = srch_corner_lat;
-	  srch_corner_lon2[ompthID] = srch_corner_lon;
-	}
-
-      /* gather2 */
-      for ( n = 0; n < num_srch_cells; ++n )
-	{
-	  src_grid_add = srch_add[n];
-	  ioffset = src_grid_add*srch_corners;
-
-	  nsrch_corners = n*srch_corners;
-	  for ( k = 0; k < srch_corners; ++k )
-	    {
-	      srch_corner_lat[nsrch_corners+k] = src_grid->cell_corner_lat[ioffset+k];
-	      srch_corner_lon[nsrch_corners+k] = src_grid->cell_corner_lon[ioffset+k];
-	    }
-	}
-
-      /* Integrate around this cell */
-
-      ioffset = tgt_grid_add*tgt_num_cell_corners;
-
-      for ( corner = 0; corner < tgt_num_cell_corners; ++corner )
-	{
-          next_corn = (corner+1)%tgt_num_cell_corners;
-
-          beglat = tgt_grid->cell_corner_lat[ioffset+corner];
-          beglon = tgt_grid->cell_corner_lon[ioffset+corner];
-          endlat = tgt_grid->cell_corner_lat[ioffset+next_corn];
-          endlon = tgt_grid->cell_corner_lon[ioffset+next_corn];
-          lrevers = FALSE;
-
-	  /* To ensure exact path taken during both sweeps, always integrate in the same direction */
-          if ( (endlat < beglat) || (IS_EQUAL(endlat, beglat) && endlon < beglon) )
-	    {
-	      beglat = tgt_grid->cell_corner_lat[ioffset+next_corn];
-	      beglon = tgt_grid->cell_corner_lon[ioffset+next_corn];
-	      endlat = tgt_grid->cell_corner_lat[ioffset+corner];
-	      endlon = tgt_grid->cell_corner_lon[ioffset+corner];
-	      lrevers = TRUE;
-	    }
-
-          begseg[0] = beglat;
-          begseg[1] = beglon;
-          lbegin = TRUE;
-
-          /*
-	    If this is a constant-longitude segment, skip the rest 
-	    since the line integral contribution will be ZERO.
-          */
-          if ( IS_NOT_EQUAL(endlon, beglon) )
-	    {
-	      num_subseg = 0;
-	      /*
-		Integrate along this segment, detecting intersections 
-		and computing the line integral for each sub-segment
-	      */
-	      while ( IS_NOT_EQUAL(beglat, endlat) || IS_NOT_EQUAL(beglon, endlon) )
-		{
-		  /*  Prevent infinite loops if integration gets stuck near cell or threshold boundary */
-		  num_subseg++;
-		  if ( num_subseg >= max_subseg )
-		    cdoAbort("Integration stalled: num_subseg exceeded limit (grid2[%d]: lon1=%g lon2=%g lat1=%g lat2=%g)!",
-			     tgt_grid_add, beglon, endlon, beglat, endlat);
-
-		  /* Uwe Schulzweida: skip very small regions */
-		  if ( num_subseg%1000 == 0 )
-		    {
-		      if ( fabs(beglat-endlat) < 1.e-10 || fabs(beglon-endlon) < 1.e-10 )
-			{
-			  if ( cdoVerbose )
-			    cdoPrint("Skip very small region (grid2[%d]): lon=%g dlon=%g lat=%g dlat=%g",
-				     tgt_grid_add, beglon, endlon-beglon, beglat, endlat-beglat);
-			  break;
-			}
-		    }
-
-		  /* Find next intersection of this segment with a gridline on grid 2. */
-
-		  intersection(&src_grid_add, &intrsct_lat, &intrsct_lon, &lcoinc,
-			       beglat, beglon, endlat, endlon, begseg,
-			       lbegin, lrevers,
-                               num_srch_cells, srch_corners, srch_add,
-			       srch_corner_lat, srch_corner_lon,
-			       &last_loc, &lthresh, &intrsct_lat_off, &intrsct_lon_off,
-			       &luse_last, &intrsct_x, &intrsct_y,
-			       &avoid_pole_count, &avoid_pole_offset);
-
-		  lbegin = FALSE;
-
-		  /* Compute line integral for this subsegment. */
-
-		  if ( src_grid_add != -1 )
-		    line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
-				  src_grid->cell_center_lon[src_grid_add], tgt_grid->cell_center_lon[tgt_grid_add]);
-		  else
-		    line_integral(weights, beglon, intrsct_lon, beglat, intrsct_lat,
-				  tgt_grid->cell_center_lon[tgt_grid_add], tgt_grid->cell_center_lon[tgt_grid_add]);
-
-		  /* If integrating in reverse order, change sign of weights */
-
-		  if ( lrevers ) for ( k = 0; k < 6; ++k ) weights[k] = -weights[k];
-
-		  /*
-		    Store the appropriate addresses and weights. 
-		    Also add contributions to cell areas and centroids.
-		    If there is a coincidence, do not store weights
-		    because they have been captured in the previous loop.
-		    The source grid mask is the master mask
-		  */
-		  if ( ! lcoinc && src_grid_add != -1 )
-		    if ( src_grid->mask[src_grid_add] )
-		      {
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-			{
-			  if ( remap_store_link_fast )
-			    store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
-			  else
-			    store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
-
-			  src_grid->cell_frac[src_grid_add] += weights[0];
-			}
-			tgt_grid->cell_frac[tgt_grid_add] += weights[3];
-		      }
-
-		  tgt_grid->cell_area[tgt_grid_add] += weights[3];
-		  tgt_centroid_lat[tgt_grid_add] += weights[4];
-		  tgt_centroid_lon[tgt_grid_add] += weights[5];
-
-		  /* Reset beglat and beglon for next subsegment. */
-		  beglat = intrsct_lat;
-		  beglon = intrsct_lon;
-		}
-	    }
-          /* End of segment */
-	}
-    }
-
-  if ( cdoTimer ) timer_stop(timer_remap_con_l2);
-
-  /* Finished with all cells: deallocate search arrays */
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      free(srch_corner_lon2[i]);
-      free(srch_corner_lat2[i]);
-    }
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    free(srch_add2[i]);
-
-  /*
-     Correct for situations where N/S pole not explicitly included in
-     grid (i.e. as a grid corner point). If pole is missing from only
-     one grid, need to correct only the area and centroid of that 
-     grid.  If missing from both, do complete weight calculation.
-  */
-
-  /* North Pole */
-  weights[0] =  PI2;
-  weights[1] =  PI*PI;
-  weights[2] =  ZERO;
-  weights[3] =  PI2;
-  weights[4] =  PI*PI;
-  weights[5] =  ZERO;
-
-  src_grid_add = -1;
-  /* pole_loop1 */
-  for ( n = 0; n < src_grid_size; ++n )
-    if ( src_grid->cell_area[n] < -THREE*PIH && src_grid->cell_center_lat[n] > ZERO )
-      {
-	src_grid_add = n;
-#ifndef SX
-	break;
-#endif
-      }
-
-  tgt_grid_add = -1;
-  /* pole_loop2 */
-  for ( n = 0; n < tgt_grid_size; ++n )
-    if ( tgt_grid->cell_area[n] < -THREE*PIH && tgt_grid->cell_center_lat[n] > ZERO )
-      {
-	tgt_grid_add = n;
-#ifndef SX
-	break;
-#endif
-      }
-
-  if ( src_grid_add != -1 )
-    {
-      src_grid->cell_area[src_grid_add]     += weights[0];
-      src_centroid_lat[src_grid_add] += weights[1];
-      src_centroid_lon[src_grid_add] += weights[2];
-    }
-
-  if ( tgt_grid_add != -1 )
-    {
-      tgt_grid->cell_area[tgt_grid_add]     += weights[3];
-      tgt_centroid_lat[tgt_grid_add] += weights[4];
-      tgt_centroid_lon[tgt_grid_add] += weights[5];
-    }
-
-  if ( src_grid_add != -1 && tgt_grid_add != -1 )
-    {
-      if ( remap_store_link_fast )
-	store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
-      else
-	store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
-
-      src_grid->cell_frac[src_grid_add] += weights[0];
-      tgt_grid->cell_frac[tgt_grid_add] += weights[3];
-    }
-
-  /* South Pole */
-  weights[0] =  PI2;
-  weights[1] = -PI*PI;
-  weights[2] =  ZERO;
-  weights[3] =  PI2;
-  weights[4] = -PI*PI;
-  weights[5] =  ZERO;
-
-  src_grid_add = -1;
-  /* pole_loop3 */
-  for ( n = 0; n < src_grid_size; ++n )
-    if ( src_grid->cell_area[n] < -THREE*PIH && src_grid->cell_center_lat[n] < ZERO )
-      {
-	src_grid_add = n;
-#ifndef SX
-	break;
-#endif
-      }
-
-  tgt_grid_add = -1;
-  /* pole_loop4 */
-  for ( n = 0; n < tgt_grid_size; ++n )
-    if ( tgt_grid->cell_area[n] < -THREE*PIH && tgt_grid->cell_center_lat[n] < ZERO )
-      {
-	tgt_grid_add = n;
-#ifndef SX
-	break;
-#endif
-      }
-
-  if ( src_grid_add != -1 )
-    {
-      src_grid->cell_area[src_grid_add]     += weights[0];
-      src_centroid_lat[src_grid_add] += weights[1];
-      src_centroid_lon[src_grid_add] += weights[2];
-    }
-
-  if ( tgt_grid_add != -1 )
-    {
-      tgt_grid->cell_area[tgt_grid_add]     += weights[3];
-      tgt_centroid_lat[tgt_grid_add] += weights[4];
-      tgt_centroid_lon[tgt_grid_add] += weights[5];
-    }
-
-  if ( src_grid_add != -1 && tgt_grid_add != -1 )
-    {
-      if ( remap_store_link_fast )
-	store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, weights, grid_store);
-      else
-	store_link_cnsrv(rv, src_grid_add, tgt_grid_add, weights, link_add1, link_add2);
-
-      src_grid->cell_frac[src_grid_add] += weights[0];
-      tgt_grid->cell_frac[tgt_grid_add] += weights[3];
-    }
-
-  if ( remap_store_link_fast )
-    {
-      grid_store_delete(grid_store);
-      free(grid_store);
-    }
-
-
-  /* Finish centroid computation */
-
-  for ( n = 0; n < src_grid_size; ++n )
-    if ( IS_NOT_EQUAL(src_grid->cell_area[n], 0) )
-      {
-        src_centroid_lat[n] /= src_grid->cell_area[n];
-        src_centroid_lon[n] /= src_grid->cell_area[n];
-      }
-
-  for ( n = 0; n < tgt_grid_size; ++n )
-    if ( IS_NOT_EQUAL(tgt_grid->cell_area[n], 0) )
-      {
-        tgt_centroid_lat[n] /= tgt_grid->cell_area[n];
-        tgt_centroid_lon[n] /= tgt_grid->cell_area[n];
-      }
-
-  /* 2010-10-08 Uwe Schulzweida: remove all links with weights < 0 */
-
-  /* 
-  if ( 1 )
-    {
-      num_links = rv->num_links;
-
-      if ( cdoVerbose )
-	for ( n = 0; n < num_links; n++ )
-	  printf("wts1: %d %g\n", n, rv->wts[3*n]);
-
-      for ( n = 0; n < num_links; n++ )
-	{
-	  if ( rv->wts[3*n] < 0 )
-	    {
-	      int i, n2, nd;
-     
-	      for ( n2 = n+1; n2 < num_links; n2++ )
-		if ( rv->wts[3*n2] >= 0 ) break;
-
-	      nd = n2-n;
-	      num_links -= nd;
-	      for ( i = n; i < num_links; i++ )
-		{
-		  rv->wts[3*i]   = rv->wts[3*(i+nd)];
-		  rv->wts[3*i+1] = rv->wts[3*(i+nd)+1];
-		  rv->wts[3*i+2] = rv->wts[3*(i+nd)+2];
-		  
-		  rv->src_grid_add[i] = rv->src_grid_add[i+nd];
-		  rv->tgt_grid_add[i] = rv->tgt_grid_add[i+nd];
-		}
-	    }
-	}
-
-     if ( cdoVerbose ) cdoPrint("Removed number of links = %ld", rv->num_links - num_links);
-
-      rv->num_links = num_links;
-    }
-  */
-
-  /* Include centroids in weights and normalize using destination area if requested */
-
-  num_links = rv->num_links;
-
-  if ( rv->norm_opt == NORM_OPT_DESTAREA )
-    {
-#if defined(SX)
-#pragma vdir nodep
-#endif
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(num_links, rv, tgt_grid, src_centroid_lat, src_centroid_lon)		\
-  private(n, n3, src_grid_add, tgt_grid_add, weights, norm_factor)
-#endif
-      for ( n = 0; n < num_links; ++n )
-	{
-	  n3 = n*3;
-	  src_grid_add = rv->src_grid_add[n]; tgt_grid_add = rv->tgt_grid_add[n];
-	  weights[0] = rv->wts[n3]; weights[1] = rv->wts[n3+1]; weights[2] = rv->wts[n3+2];
-
-          if ( IS_NOT_EQUAL(tgt_grid->cell_area[tgt_grid_add], 0) )
-	    norm_factor = ONE/tgt_grid->cell_area[tgt_grid_add];
-          else
-            norm_factor = ZERO;
-
-	  rv->wts[n3  ] =  weights[0]*norm_factor;
-	  rv->wts[n3+1] = (weights[1] - weights[0]*src_centroid_lat[src_grid_add])*norm_factor;
-	  rv->wts[n3+2] = (weights[2] - weights[0]*src_centroid_lon[src_grid_add])*norm_factor;
-	}
-    }
-  else if ( rv->norm_opt == NORM_OPT_FRACAREA )
-    {
-#if defined(SX)
-#pragma vdir nodep
-#endif
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(num_links, rv, tgt_grid, src_centroid_lat, src_centroid_lon)		\
-  private(n, n3, src_grid_add, tgt_grid_add, weights, norm_factor)
-#endif
-      for ( n = 0; n < num_links; ++n )
-	{
-	  n3 = n*3;
-	  src_grid_add = rv->src_grid_add[n]; tgt_grid_add = rv->tgt_grid_add[n];
-	  weights[0] = rv->wts[n3]; weights[1] = rv->wts[n3+1]; weights[2] = rv->wts[n3+2];
-
-          if ( IS_NOT_EQUAL(tgt_grid->cell_frac[tgt_grid_add], 0) )
-	    norm_factor = ONE/tgt_grid->cell_frac[tgt_grid_add];
-          else
-            norm_factor = ZERO;
-
-	  rv->wts[n3  ] =  weights[0]*norm_factor;
-	  rv->wts[n3+1] = (weights[1] - weights[0]*src_centroid_lat[src_grid_add])*norm_factor;
-	  rv->wts[n3+2] = (weights[2] - weights[0]*src_centroid_lon[src_grid_add])*norm_factor;
-	}
-    }
-  else if ( rv->norm_opt == NORM_OPT_NONE )
-    {
-#if defined(SX)
-#pragma vdir nodep
-#endif
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(num_links, rv, tgt_grid, src_centroid_lat, src_centroid_lon)	\
-  private(n, n3, src_grid_add, tgt_grid_add, weights, norm_factor)
-#endif
-      for ( n = 0; n < num_links; ++n )
-	{
-	  n3 = n*3;
-	  src_grid_add = rv->src_grid_add[n]; tgt_grid_add = rv->tgt_grid_add[n];
-	  weights[0] = rv->wts[n3]; weights[1] = rv->wts[n3+1]; weights[2] = rv->wts[n3+2];
-
-          norm_factor = ONE;
-
-	  rv->wts[n3  ] =  weights[0]*norm_factor;
-	  rv->wts[n3+1] = (weights[1] - weights[0]*src_centroid_lat[src_grid_add])*norm_factor;
-	  rv->wts[n3+2] = (weights[2] - weights[0]*src_centroid_lon[src_grid_add])*norm_factor;
-	}
-    }
-
-  if ( cdoVerbose )
-    cdoPrint("Total number of links = %ld", rv->num_links);
-
-  for ( n = 0; n < src_grid_size; ++n )
-    if ( IS_NOT_EQUAL(src_grid->cell_area[n], 0) ) src_grid->cell_frac[n] /= src_grid->cell_area[n];
-
-  for ( n = 0; n < tgt_grid_size; ++n )
-    if ( IS_NOT_EQUAL(tgt_grid->cell_area[n], 0) ) tgt_grid->cell_frac[n] /= tgt_grid->cell_area[n];
-
-  /* Perform some error checking on final weights  */
-
-  if ( lcheck )
-    {
-      for ( n = 0; n < src_grid_size; ++n )
-	{
-	  if ( src_grid->cell_area[n] < -.01 )
-	    cdoPrint("Source grid area error: %d %g", n, src_grid->cell_area[n]);
-
-	  if ( src_centroid_lat[n] < -PIH-.01 || src_centroid_lat[n] > PIH+.01 )
-	    cdoPrint("Source grid centroid lat error: %d %g", n, src_centroid_lat[n]);
-
-	  src_centroid_lat[n] = 0;
-	  src_centroid_lon[n] = 0;
-	}
-
-      for ( n = 0; n < tgt_grid_size; ++n )
-	{
-	  if ( tgt_grid->cell_area[n] < -.01 )
-	    cdoPrint("Target grid area error: %d %g", n, tgt_grid->cell_area[n]);
-	  if ( tgt_centroid_lat[n] < -PIH-.01 || tgt_centroid_lat[n] > PIH+.01 )
-	    cdoPrint("Target grid centroid lat error: %d %g", n, tgt_centroid_lat[n]);
-
-	  tgt_centroid_lat[n] = 0;
-	  tgt_centroid_lon[n] = 0;
-	}
-
-      for ( n = 0; n < num_links; ++n )
-	{
-	  src_grid_add = rv->src_grid_add[n];
-	  tgt_grid_add = rv->tgt_grid_add[n];
-
-	  if ( rv->wts[3*n] < -0.01 )
-	    cdoPrint("Map weight < 0! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
-		     src_grid_add, tgt_grid_add, n, rv->wts[3*n]);
-
-	  if ( rv->norm_opt != NORM_OPT_NONE && rv->wts[3*n] > 1.01 )
-	    cdoPrint("Map weight > 1! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
-		     src_grid_add, tgt_grid_add, n, rv->wts[3*n]);
-	}
-
-      for ( n = 0; n < num_links; ++n )
-	{
-	  tgt_grid_add = rv->tgt_grid_add[n];
-	  tgt_centroid_lat[tgt_grid_add] += rv->wts[3*n];
-	}
-
-      /* 2012-01-24 Uwe Schulzweida: changed [tgt_grid_add] to [n] (bug fix) */
-      for ( n = 0; n < tgt_grid_size; ++n )
-	{
-	  if ( rv->norm_opt == NORM_OPT_DESTAREA )
-	    norm_factor = tgt_grid->cell_frac[n];
-	  else if ( rv->norm_opt == NORM_OPT_FRACAREA )
-	    norm_factor = ONE;
-	  else if ( rv->norm_opt == NORM_OPT_NONE )
-	    norm_factor = tgt_grid->cell_area[n];
-	    
-	  if ( tgt_centroid_lat[n] > 0 && fabs(tgt_centroid_lat[n] - norm_factor) > .01 )
-	    cdoPrint("Error: sum of wts for map1 %d %g %g", n, tgt_centroid_lat[n], norm_factor);
-	}
-    } // lcheck
-
-  free(src_centroid_lat);
-  free(src_centroid_lon);
-  free(tgt_centroid_lat);
-  free(tgt_centroid_lon);
-
-  if ( ! remap_store_link_fast )
-    {
-      free(link_add1[0]);
-      free(link_add1[1]);
-      free(link_add2[0]);
-      free(link_add2[1]);
-    }
-
-  if ( cdoTimer ) timer_stop(timer_remap_con);
-
-} /* remap_conserv */
-
-/*
-  -----------------------------------------------------------------------
-
-  -----------------------------------------------------------------------
-*/
-static
-void restrict_boundbox(const double *restrict grid_bound_box, double *restrict bound_box)
-{
-  if ( bound_box[0] < grid_bound_box[0] && bound_box[1] > grid_bound_box[0] ) bound_box[0] = grid_bound_box[0];
-  if ( bound_box[1] > grid_bound_box[1] && bound_box[0] < grid_bound_box[1] ) bound_box[1] = grid_bound_box[1];
-
-  if ( bound_box[2] >= grid_bound_box[3] && (bound_box[3]-2*M_PI) > grid_bound_box[2] ) { bound_box[2] -= 2*M_PI; bound_box[3] -= 2*M_PI; }
-  if ( bound_box[3] <= grid_bound_box[2] && (bound_box[2]-2*M_PI) < grid_bound_box[3] ) { bound_box[2] += 2*M_PI; bound_box[3] += 2*M_PI; }
-  //  if ( bound_box[2] < grid_bound_box[2] && bound_box[3] > grid_bound_box[2] ) bound_box[2] = grid_bound_box[2];
-  //  if ( bound_box[3] > grid_bound_box[3] && bound_box[2] < grid_bound_box[3] ) bound_box[3] = grid_bound_box[3];
-}
-
-static
-void boundbox_from_corners_reg2d(long grid_add, const int *restrict grid_dims, const double *restrict corner_lon,
-				 const double *restrict corner_lat, double *restrict bound_box)
-{
-  long nx = grid_dims[0];
-  long ix, iy;
-  double clat1, clat2;
-
-  iy = grid_add/nx;
-  ix = grid_add - iy*nx;
-
-  clat1 = corner_lat[iy  ];
-  clat2 = corner_lat[iy+1];
-
-  if ( clat2 > clat1 )
-    {
-      bound_box[0] = clat1;
-      bound_box[1] = clat2;
-    }
-  else
-    {
-      bound_box[0] = clat2;
-      bound_box[1] = clat1;
-    }
-
-  bound_box[2] = corner_lon[ix  ];
-  bound_box[3] = corner_lon[ix+1];
-}
-
-static
-void boundbox_from_corners1(long ic, long nc, const double *restrict corner_lon,
-			    const double *restrict corner_lat, double *restrict bound_box)
-{
-  long inc, j;
-  double clon, clat;
-
-  inc = ic*nc;
-
-  clat = corner_lat[inc];
-  clon = corner_lon[inc];
-
-  bound_box[0] = clat;
-  bound_box[1] = clat;
-  bound_box[2] = clon;
-  bound_box[3] = clon;
-
-  for ( j = 1; j < nc; ++j )
-    {
-      clat = corner_lat[inc+j];
-      clon = corner_lon[inc+j];
-
-      if ( clat < bound_box[0] ) bound_box[0] = clat;
-      if ( clat > bound_box[1] ) bound_box[1] = clat;
-      if ( clon < bound_box[2] ) bound_box[2] = clon;
-      if ( clon > bound_box[3] ) bound_box[3] = clon;
-    }
-
-  if ( fabs(bound_box[3] - bound_box[2]) > PI )
-    {
-      bound_box[2] = 0;
-      bound_box[3] = PI2;
-    }
-
-  /*
-  double dlon = fabs(bound_box[3] - bound_box[2]);
-
-  if ( dlon > PI )
-    {
-      if ( bound_box[3] > bound_box[2] && (bound_box[3]-PI2) < 0. )
-	{
-	  double tmp = bound_box[2];
-	  bound_box[2] = bound_box[3] - PI2;
-	  bound_box[3] = tmp;
-	}
-      else
-	{
-	  bound_box[2] = 0;
-	  bound_box[3] = PI2;
-	}
-    }
-  */
-}
-
-static
-void boundbox_from_corners1r(long ic, long nc, const double *restrict corner_lon,
-			     const double *restrict corner_lat, restr_t *restrict bound_box)
-{
-  long inc, j;
-  restr_t clon, clat;
-
-  inc = ic*nc;
-
-  clat = RESTR_SCALE(corner_lat[inc]);
-  clon = RESTR_SCALE(corner_lon[inc]);
-
-  bound_box[0] = clat;
-  bound_box[1] = clat;
-  bound_box[2] = clon;
-  bound_box[3] = clon;
-
-  for ( j = 1; j < nc; ++j )
-    {
-      clat = RESTR_SCALE(corner_lat[inc+j]);
-      clon = RESTR_SCALE(corner_lon[inc+j]);
-
-      if ( clat < bound_box[0] ) bound_box[0] = clat;
-      if ( clat > bound_box[1] ) bound_box[1] = clat;
-      if ( clon < bound_box[2] ) bound_box[2] = clon;
-      if ( clon > bound_box[3] ) bound_box[3] = clon;
-    }
-
-  if ( fabs(bound_box[3] - bound_box[2]) > RESTR_SCALE(PI) )
-    {
-      bound_box[2] = 0;
-      bound_box[3] = RESTR_SCALE(PI2);
-    }
-  /*
-  if ( RESTR_ABS(bound_box[3] - bound_box[2]) > RESTR_SCALE(PI) )
-    {
-      if ( bound_box[3] > bound_box[2] && (bound_box[3]-RESTR_SCALE(PI2)) < RESTR_SCALE(0.) )
-	{
-	  restr_t tmp = bound_box[2];
-	  bound_box[2] = bound_box[3] - RESTR_SCALE(PI2);
-	  bound_box[3] = tmp;
-	}
-    }
-  */
-}
-
-//#if defined(HAVE_LIBYAC)
-#include "clipping/clipping.h"
-#include "clipping/area.h"
-
-static
-void cdo_compute_overlap_areas(unsigned N,
-			       struct grid_cell *overlap_buffer,
-			       struct grid_cell *source_cells,
-			       struct grid_cell  target_cell,
-			       double *partial_areas)
-{
-  for ( unsigned n = 0; n < N; n++ )
-    {
-      overlap_buffer[n].num_corners   = 0;
-      overlap_buffer[n].edge_type     = NULL;
-      overlap_buffer[n].coordinates_x = NULL;
-      overlap_buffer[n].coordinates_y = NULL;
-    }
-
-  /* Do the clipping and get the cell for the overlapping area */
-
-  cell_clipping(N, source_cells, target_cell, overlap_buffer);
-
-  /* Get the partial areas for the overlapping regions */
-
-  for ( unsigned n = 0; n < N; n++ )
-    {
-      partial_areas[n] = huiliers_area(overlap_buffer[n]);
-
-      if ( overlap_buffer[n].coordinates_x != NULL ) free(overlap_buffer[n].coordinates_x);
-      if ( overlap_buffer[n].coordinates_y != NULL ) free(overlap_buffer[n].coordinates_y);
-      if ( overlap_buffer[n].edge_type     != NULL ) free(overlap_buffer[n].edge_type);
-    }
-
-#ifdef VERBOSE
-  for ( unsigned n = 0; n < N; n++ )
-    printf("overlap area : %lf\n", partial_areas[n]);
-#endif
-}
-//#endif
-
-static
-int get_lonlat_circle_index(remapgrid_t *remap_grid)
-{
-  int lonlat_circle_index = -1;
-
-  if ( remap_grid->num_cell_corners == 4 )
-    {
-      if ( remap_grid->remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	{
-	  lonlat_circle_index = 1;
- 	}
-      else
-	{
-	  const double* cell_corner_lon = remap_grid->cell_corner_lon;
-	  const double* cell_corner_lat = remap_grid->cell_corner_lat;
-	  int gridsize = remap_grid->size;
-	  int num_i = 0, num_eq0 = 0, num_eq1 = 0;
-	  int iadd = gridsize/3-1;
-
-	  if ( iadd == 0 ) iadd++;
-
-	  for ( int i = 0; i < gridsize; i += iadd )
-	    {
-	      num_i++;
-
-	      if ( IS_EQUAL(cell_corner_lon[i*4+1], cell_corner_lon[i*4+2]) &&
-		   IS_EQUAL(cell_corner_lon[i*4+3], cell_corner_lon[i*4+0]) &&
-		   IS_EQUAL(cell_corner_lat[i*4+0], cell_corner_lat[i*4+1]) &&
-		   IS_EQUAL(cell_corner_lat[i*4+2], cell_corner_lat[i*4+3]) )
-		{  
-		  num_eq1++;
-		}
-	      else if ( IS_EQUAL(cell_corner_lon[i*4+0], cell_corner_lon[i*4+1]) &&
-			IS_EQUAL(cell_corner_lon[i*4+2], cell_corner_lon[i*4+3]) &&
-			IS_EQUAL(cell_corner_lat[i*4+1], cell_corner_lat[i*4+2]) &&
-			IS_EQUAL(cell_corner_lat[i*4+3], cell_corner_lat[i*4+0]) )
-		{
-		  num_eq0++;
-		}
-	    }
-
-	  if ( num_i == num_eq1 ) lonlat_circle_index = 1;
-	  if ( num_i == num_eq0 ) lonlat_circle_index = 0;	      
-	}
-    }
-
-  //printf("lonlat_circle_index %d\n", lonlat_circle_index);
-
-  return(lonlat_circle_index);
-}
-
-
-void remap_consphere(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv)
-{
-  /* local variables */
-
-  int    lcheck = TRUE;
-
-  long   ioffset;
-  long   src_grid_size;
-  long   tgt_grid_size;
-  long   src_num_cell_corners;
-  long   tgt_num_cell_corners;
-  long   src_grid_add;       /* current linear address for source grid cell   */
-  long   tgt_grid_add;       /* current linear address for target grid cell   */
-  long   n, k;               /* generic counters                        */
-  long   nbins, num_links;
-  double norm_factor = 0;    /* factor for normalizing wts */
-  long   num_wts;
-  long   max_srch_cells;     /* num cells in restricted search arrays  */
-  long   num_srch_cells;     /* num cells in restricted search arrays  */
-  long   srch_corners;       /* num of corners of srch cells           */
-  int*   srch_add;           /* global address of cells in srch arrays */
-  int    ompthID, i;
-
-  /* Variables necessary if segment manages to hit pole */
-  grid_store_t *grid_store = NULL;
-  double findex = 0;
-  long num_weights = 0;
-  long nx = 0, ny = 0;
-  int src_remap_grid_type = src_grid->remap_grid_type;
-  int tgt_remap_grid_type = tgt_grid->remap_grid_type;
-  double src_grid_bound_box[4];
-  int lyac = FALSE;
-
-  progressInit();
-
-  nbins = src_grid->num_srch_bins;
-  num_wts = rv->num_wts;
-
-  if ( remap_store_link_fast )
-    {
-      grid_store = malloc(sizeof(grid_store_t));
-      grid_store_init(grid_store, tgt_grid->size);
-    }
-
-  if ( cdoTimer ) timer_start(timer_remap_con);
-
-  src_grid_size = src_grid->size;
-  tgt_grid_size = tgt_grid->size;
-
-  src_num_cell_corners = src_grid->num_cell_corners;
-  tgt_num_cell_corners = tgt_grid->num_cell_corners;
-
-  enum edge_type great_circle_type[] = {GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE, GREAT_CIRCLE};
-  enum edge_type lonlat_circle_type[] = {LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE, LAT_CIRCLE, LON_CIRCLE};
-
-  enum edge_type *src_edge_type = great_circle_type;
-  enum edge_type *tgt_edge_type = great_circle_type;
-
-  if ( src_num_cell_corners == 4 )
-    {
-      int lonlat_circle_index = get_lonlat_circle_index(src_grid);
-      if ( lonlat_circle_index >= 0 ) src_edge_type = &lonlat_circle_type[lonlat_circle_index];
-    }
-
-  if ( tgt_num_cell_corners == 4 )
-    {
-      int lonlat_circle_index = get_lonlat_circle_index(tgt_grid);
-      if ( lonlat_circle_index >= 0 ) tgt_edge_type = &lonlat_circle_type[lonlat_circle_index];
-    }
-
-  double tgt_area;
-
-  struct grid_cell* tgt_grid_cell;
-  struct grid_cell* tgt_grid_cell2[ompNumThreads];  
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      tgt_grid_cell2[i] = malloc(sizeof(struct grid_cell));
-      tgt_grid_cell2[i]->num_corners   = tgt_num_cell_corners;
-      tgt_grid_cell2[i]->edge_type     = tgt_edge_type;
-      tgt_grid_cell2[i]->coordinates_x = malloc(tgt_num_cell_corners*sizeof(double));
-      tgt_grid_cell2[i]->coordinates_y = malloc(tgt_num_cell_corners*sizeof(double));
-    }
-
-  struct grid_cell* src_grid_cells;
-  struct grid_cell* overlap_buffer;
-  struct grid_cell* src_grid_cells2[ompNumThreads];
-  struct grid_cell* overlap_buffer2[ompNumThreads];
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      src_grid_cells2[i] = NULL;
-      overlap_buffer2[i] = NULL;
-    }
-
-  double* partial_areas;
-  double* partial_weights;
-  double* partial_areas2[ompNumThreads];
-  double* partial_weights2[ompNumThreads];
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      partial_areas2[i]   = NULL;
-      partial_weights2[i] = NULL;
-    }
-
-  long max_srch_cells2[ompNumThreads];
-  for ( i = 0; i < ompNumThreads; ++i )
-    max_srch_cells2[i] = 0;
-
-  int* srch_add2[ompNumThreads];
-  for ( i = 0; i < ompNumThreads; ++i )
-    srch_add2[i] = malloc(src_grid_size*sizeof(int));
-
-  srch_corners = src_num_cell_corners;
-
-  if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D )
-    {
-      nx = src_grid->dims[0];
-      ny = src_grid->dims[1];
-     
-      src_grid_bound_box[0] = src_grid->reg2d_corner_lat[0];
-      src_grid_bound_box[1] = src_grid->reg2d_corner_lat[ny];
-      if ( src_grid_bound_box[0] > src_grid_bound_box[1] )
-	{
-	  src_grid_bound_box[0] = src_grid->reg2d_corner_lat[ny];
-	  src_grid_bound_box[1] = src_grid->reg2d_corner_lat[0];
-	}
-      src_grid_bound_box[2] = src_grid->reg2d_corner_lon[0];
-      src_grid_bound_box[3] = src_grid->reg2d_corner_lon[nx];
-      //printf("src_grid   lon: %g %g lat: %g %g\n", RAD2DEG*src_grid_bound_box[2],RAD2DEG*src_grid_bound_box[3],RAD2DEG*src_grid_bound_box[0],RAD2DEG*src_grid_bound_box[1] );
-    }
-
-  if ( cdoTimer ) timer_start(timer_remap_con_l2);
-
-  findex = 0;
-
-  int sum_srch_cells = 0;
-  int sum_srch_cells2 = 0;
-
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(ompNumThreads, cdoTimer, lyac, nbins, num_wts, nx, src_remap_grid_type, tgt_remap_grid_type, src_grid_bound_box,	\
-	 src_edge_type, tgt_edge_type, partial_areas2, partial_weights2,  \
-         remap_store_link_fast, grid_store, rv, cdoVerbose, max_srch_cells2, \
-	 tgt_num_cell_corners, srch_corners, src_grid, tgt_grid, tgt_grid_size, src_grid_size, \
-	 overlap_buffer2, src_grid_cells2, srch_add2, tgt_grid_cell2, findex, sum_srch_cells, sum_srch_cells2) \
-  private(ompthID, srch_add, tgt_grid_cell, tgt_area, n, k, num_weights, num_srch_cells, max_srch_cells,  \
-	  partial_areas, partial_weights, overlap_buffer, src_grid_cells, src_grid_add, tgt_grid_add, ioffset)
-#endif
-  for ( tgt_grid_add = 0; tgt_grid_add < tgt_grid_size; ++tgt_grid_add )
-    {
-#if defined(_OPENMP)
-      ompthID = omp_get_thread_num();
-#else
-      ompthID = 0;
-#endif
-
-      int lprogress = 1;
-      if ( ompthID != 0 ) lprogress = 0;
-
-#if defined(_OPENMP)
-#pragma omp atomic
-#endif
-      findex++;
-      if ( lprogress ) progressStatus(0, 1, findex/tgt_grid_size);
-
-      srch_add = srch_add2[ompthID];
-      tgt_grid_cell = tgt_grid_cell2[ompthID];
-
-      /* Get search cells */
-
-      if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D && tgt_remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	{
-	  double tgt_cell_bound_box[4];
-	  boundbox_from_corners_reg2d(tgt_grid_add, tgt_grid->dims, tgt_grid->reg2d_corner_lon, tgt_grid->reg2d_corner_lat, tgt_cell_bound_box);
-	  restrict_boundbox(src_grid_bound_box, tgt_cell_bound_box);
-	  if ( cdoVerbose )
-	    printf("bound_box %ld  lon: %g %g lat: %g %g\n",
-		   tgt_grid_add, RAD2DEG*tgt_cell_bound_box[2],RAD2DEG*tgt_cell_bound_box[3],RAD2DEG*tgt_cell_bound_box[0],RAD2DEG*tgt_cell_bound_box[1] );
-	  num_srch_cells = get_srch_cells_reg2d(src_grid->dims, src_grid->reg2d_corner_lat, src_grid->reg2d_corner_lon,
-						tgt_cell_bound_box, srch_add);
-	}
-      else if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	{
-	  double tgt_cell_bound_box[4];
-	  boundbox_from_corners1(tgt_grid_add, tgt_num_cell_corners, tgt_grid->cell_corner_lon, tgt_grid->cell_corner_lat, tgt_cell_bound_box);
-	  restrict_boundbox(src_grid_bound_box, tgt_cell_bound_box);
-	  if ( cdoVerbose )
-	    printf("bound_box %ld  lon: %g %g lat: %g %g\n",
-		   tgt_grid_add, RAD2DEG*tgt_cell_bound_box[2],RAD2DEG*tgt_cell_bound_box[3],RAD2DEG*tgt_cell_bound_box[0],RAD2DEG*tgt_cell_bound_box[1] );
-	  num_srch_cells = get_srch_cells_reg2d(src_grid->dims, src_grid->reg2d_corner_lat, src_grid->reg2d_corner_lon,
-						tgt_cell_bound_box, srch_add);
-	}
-      else
-	{
-	  restr_t tgt_cell_bound_box_r[4];
-	  boundbox_from_corners1r(tgt_grid_add, tgt_num_cell_corners, tgt_grid->cell_corner_lon, tgt_grid->cell_corner_lat, tgt_cell_bound_box_r);
-
-	  num_srch_cells = get_srch_cells(tgt_grid_add, nbins, tgt_grid->bin_addr, src_grid->bin_addr,
-					  tgt_cell_bound_box_r, src_grid->cell_bound_box, src_grid_size, srch_add);
-	}
-
-      sum_srch_cells += num_srch_cells;
-
-      if ( cdoVerbose )
-	printf("tgt_grid_add %ld  num_srch_cells %ld\n", tgt_grid_add, num_srch_cells);
-
-      if ( num_srch_cells == 0 ) continue;
-
-      if ( tgt_remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	{
-	  long nx = tgt_grid->dims[0];
-	  long ix, iy;
-
-	  iy = tgt_grid_add/nx;
-	  ix = tgt_grid_add - iy*nx;
-
-	  tgt_grid_cell->coordinates_x[0] = tgt_grid->reg2d_corner_lon[ix  ];
-	  tgt_grid_cell->coordinates_y[0] = tgt_grid->reg2d_corner_lat[iy  ];
-	  tgt_grid_cell->coordinates_x[1] = tgt_grid->reg2d_corner_lon[ix+1];
-	  tgt_grid_cell->coordinates_y[1] = tgt_grid->reg2d_corner_lat[iy  ];
-	  tgt_grid_cell->coordinates_x[2] = tgt_grid->reg2d_corner_lon[ix+1];
-	  tgt_grid_cell->coordinates_y[2] = tgt_grid->reg2d_corner_lat[iy+1];
-	  tgt_grid_cell->coordinates_x[3] = tgt_grid->reg2d_corner_lon[ix  ];
-	  tgt_grid_cell->coordinates_y[3] = tgt_grid->reg2d_corner_lat[iy+1];
-	}
-      else
-	{
-	  for ( int ic = 0; ic < tgt_num_cell_corners; ++ic )
-	    {
-	      tgt_grid_cell->coordinates_x[ic] = tgt_grid->cell_corner_lon[tgt_grid_add*tgt_num_cell_corners+ic];
-	      tgt_grid_cell->coordinates_y[ic] = tgt_grid->cell_corner_lat[tgt_grid_add*tgt_num_cell_corners+ic];
-	    }
-	}
-
-      //printf("target: %ld\n", tgt_grid_add);
-      if ( lyac )
-	// if ( tgt_grid_add == 682 )
-	for ( int n = 0; n < tgt_num_cell_corners; ++n )
-	  {
-	    printf("  TargetCell.coordinates_x[%d] = %g*rad;\n", n, tgt_grid_cell->coordinates_x[n]/DEG2RAD);
-	    printf("  TargetCell.coordinates_y[%d] = %g*rad;\n", n, tgt_grid_cell->coordinates_y[n]/DEG2RAD);
-	  }
-      
-      /* Create search arrays */
-
-      max_srch_cells  = max_srch_cells2[ompthID];
-      partial_areas   = partial_areas2[ompthID];
-      partial_weights = partial_weights2[ompthID];
-      overlap_buffer  = overlap_buffer2[ompthID];
-      src_grid_cells  = src_grid_cells2[ompthID];
-
-      if ( num_srch_cells > max_srch_cells )
-	{
-	  partial_areas   = realloc(partial_areas,   num_srch_cells*sizeof(double));
-	  partial_weights = realloc(partial_weights, num_srch_cells*sizeof(double));
-
-	  overlap_buffer = realloc(overlap_buffer, num_srch_cells*sizeof(struct grid_cell));
-	  src_grid_cells = realloc(src_grid_cells, num_srch_cells*sizeof(struct grid_cell));
-
-	  for ( n = max_srch_cells; n < num_srch_cells; ++n )
-	    {
-	      overlap_buffer[n].num_corners   = 0;
-	      overlap_buffer[n].edge_type     = NULL;
-	      overlap_buffer[n].coordinates_x = NULL;
-	      overlap_buffer[n].coordinates_y = NULL;
-	    }
-
-	  for ( n = max_srch_cells; n < num_srch_cells; ++n )
-	    {
-	      src_grid_cells[n].num_corners   = srch_corners;
-	      src_grid_cells[n].edge_type     = src_edge_type;
-	      src_grid_cells[n].coordinates_x = malloc(srch_corners*sizeof(double));
-	      src_grid_cells[n].coordinates_y = malloc(srch_corners*sizeof(double));
-	    }
-
-	  max_srch_cells = num_srch_cells;
-
-	  max_srch_cells2[ompthID]  = max_srch_cells;
-	  partial_areas2[ompthID]   = partial_areas;
-	  partial_weights2[ompthID] = partial_weights;
-	  overlap_buffer2[ompthID]  = overlap_buffer;
-	  src_grid_cells2[ompthID]  = src_grid_cells;
-	}
-
-      // printf("  int ii = 0;\n");
-      for ( n = 0; n < num_srch_cells; ++n )
-	{
-	  src_grid_add = srch_add[n];
-
-	  if ( src_remap_grid_type == REMAP_GRID_TYPE_REG2D )
-	    {
-	      int ix, iy;
-
-	      iy = src_grid_add/nx;
-	      ix = src_grid_add - iy*nx;
-
-	      src_grid_cells[n].coordinates_x[0] = src_grid->reg2d_corner_lon[ix  ];
-	      src_grid_cells[n].coordinates_y[0] = src_grid->reg2d_corner_lat[iy  ];
-	      src_grid_cells[n].coordinates_x[1] = src_grid->reg2d_corner_lon[ix+1];
-	      src_grid_cells[n].coordinates_y[1] = src_grid->reg2d_corner_lat[iy  ];
-	      src_grid_cells[n].coordinates_x[2] = src_grid->reg2d_corner_lon[ix+1];
-	      src_grid_cells[n].coordinates_y[2] = src_grid->reg2d_corner_lat[iy+1];
-	      src_grid_cells[n].coordinates_x[3] = src_grid->reg2d_corner_lon[ix  ];
-	      src_grid_cells[n].coordinates_y[3] = src_grid->reg2d_corner_lat[iy+1];
-	      /*
-	      printf("source1: %ld %ld", num_srch_cells, n);
-	      for ( k = 0; k < srch_corners; ++k )
-		printf(" %g %g", src_grid_cells[n].coordinates_x[k]/DEG2RAD, src_grid_cells[n].coordinates_y[k]/DEG2RAD);
-	      printf("\n");
-	      */
-	    }
-	  else
-	    {
-	      ioffset = src_grid_add*srch_corners;
-
-	      for ( k = 0; k < srch_corners; ++k )
-		{
-		  src_grid_cells[n].coordinates_x[k] = src_grid->cell_corner_lon[ioffset+k];
-		  src_grid_cells[n].coordinates_y[k] = src_grid->cell_corner_lat[ioffset+k];
-		}
-	      /*
-	      printf("source2: %ld %ld", num_srch_cells, n);
-	      for ( k = 0; k < srch_corners; ++k )
-		printf(" %g %g", src_grid_cells[n].coordinates_x[k]/DEG2RAD, src_grid_cells[n].coordinates_y[k]/DEG2RAD);
-	      printf("\n");
-	      */
-	    }
-
-	  if ( lyac )
-	    //  if ( tgt_grid_add == 682 )
-	    {
-	      printf("n %d\n", (int)n);
-	      for ( k = 0; k < srch_corners; ++k )
-		{
-		  printf("  SourceCell[ii].coordinates_x[%ld] = %g*rad;\n", k, src_grid_cells[n].coordinates_x[k]/DEG2RAD);
-		  printf("  SourceCell[ii].coordinates_y[%ld] = %g*rad;\n", k, src_grid_cells[n].coordinates_y[k]/DEG2RAD);
-		}
-	      printf("  ii++;\n");
-	    }
-	}
-
-      cdo_compute_overlap_areas(num_srch_cells, overlap_buffer, src_grid_cells, *tgt_grid_cell, partial_areas);
-
-      tgt_area = huiliers_area(*tgt_grid_cell);
-      // tgt_area = cell_area(tgt_grid_cell);
-
-      for ( num_weights = 0, n = 0; n < num_srch_cells; ++n )
-	{
-	  if ( partial_areas[n] > 0 )
-	    {
-	      //printf(">>>>   %d %d %g %g\n", (int)tgt_grid_add, srch_add[n], tgt_area, partial_areas[n]);
-	      partial_areas[num_weights] = partial_areas[n];
-	      srch_add[num_weights] = srch_add[n];
-	      num_weights++;
-	    }
-	}
-
-      sum_srch_cells2 += num_weights;
-
-      for ( n = 0; n < num_weights; ++n )
-	partial_weights[n] = partial_areas[n] / tgt_area;
-
-      correct_weights(num_weights, partial_weights);
-      //#endif
-
-      for ( n = 0; n < num_weights; ++n )
-	{
-	  src_grid_add = srch_add[n];
-
-	  if ( cdoVerbose )
-	    printf("tgt_grid_add %ld, src_grid_add %ld,  partial_weights[n] %g, tgt_area  %g\n", tgt_grid_add, src_grid_add, partial_weights[n], tgt_area);
-
-	  // src_grid_add = n;
-	  if ( partial_weights[n] <= 0. ) src_grid_add = -1;
-
-	  /*
-	    Store the appropriate addresses and weights. 
-	    Also add contributions to cell areas.
-	    The source grid mask is the master mask
-	  */
-	  if ( src_grid_add != -1 )
-	    {
-	      if ( src_grid->mask[src_grid_add] )
-		{
-
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-		  {
-		    store_link_cnsrv_fast(rv, src_grid_add, tgt_grid_add, num_wts, &partial_weights[n], grid_store);
-
-		    src_grid->cell_frac[src_grid_add] += partial_weights[n];
-		  }
-		  tgt_grid->cell_frac[tgt_grid_add] += partial_weights[n];
-		}
-#if defined(_OPENMP)
-#pragma omp critical
-#endif
-	      {
-		src_grid->cell_area[src_grid_add] += partial_weights[n];
-	      }
-	    }
-
-	  tgt_grid->cell_area[tgt_grid_add] += partial_weights[n];
-	}
-    }
-
-  if ( cdoVerbose )
-    {
-      printf("sum_srch_cells : %d\n", sum_srch_cells);
-      printf("sum_srch_cells2: %d\n", sum_srch_cells2);
-    }
-
-  if ( cdoTimer ) timer_stop(timer_remap_con_l2);
-
-  /* Finished with all cells: deallocate search arrays */
-
-  for ( i = 0; i < ompNumThreads; ++i )
-    {
-      for ( n = 0; n < max_srch_cells2[i]; n++ )
-	{
-	  free(src_grid_cells2[i][n].coordinates_x);
-	  free(src_grid_cells2[i][n].coordinates_y);
-	}
-      free(src_grid_cells2[i]);
-      free(overlap_buffer2[i]);
-
-      free(partial_areas2[i]);
-      free(partial_weights2[i]);
-
-      free(tgt_grid_cell2[i]->coordinates_x);
-      free(tgt_grid_cell2[i]->coordinates_y);
-      free(tgt_grid_cell2[i]);
-
-      free(srch_add2[i]);
-    }
-
-  if ( remap_store_link_fast )
-    {
-      grid_store_delete(grid_store);
-      free(grid_store);
-    }
-
-
-  /* Normalize using destination area if requested */
-
-  num_links = rv->num_links;
-
-  if ( rv->norm_opt == NORM_OPT_DESTAREA )
-    {
-#if defined(SX)
-#pragma vdir nodep
-#endif
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(num_wts, num_links, rv, tgt_grid)	\
-  private(n, tgt_grid_add, norm_factor)
-#endif
-      for ( n = 0; n < num_links; ++n )
-	{
-	  tgt_grid_add = rv->tgt_grid_add[n];
-
-          if ( IS_NOT_EQUAL(tgt_grid->cell_area[tgt_grid_add], 0) )
-	    norm_factor = ONE/tgt_grid->cell_area[tgt_grid_add];
-          else
-            norm_factor = ZERO;
-
-	  rv->wts[n*num_wts] *= norm_factor;
-	}
-    }
-  else if ( rv->norm_opt == NORM_OPT_FRACAREA )
-    {
-#if defined(SX)
-#pragma vdir nodep
-#endif
-#if defined(_OPENMP)
-#pragma omp parallel for default(none) \
-  shared(num_wts, num_links, rv, tgt_grid)	\
-  private(n, tgt_grid_add, norm_factor)
-#endif
-      for ( n = 0; n < num_links; ++n )
-	{
-	  tgt_grid_add = rv->tgt_grid_add[n];
-
-          if ( IS_NOT_EQUAL(tgt_grid->cell_frac[tgt_grid_add], 0) )
-	    norm_factor = ONE/tgt_grid->cell_frac[tgt_grid_add];
-          else
-            norm_factor = ZERO;
-
-	  rv->wts[n*num_wts] *= norm_factor;
-	}
-    }
-  else if ( rv->norm_opt == NORM_OPT_NONE )
-    {
-    }
-
-  if ( cdoVerbose )
-    cdoPrint("Total number of links = %ld", rv->num_links);
-
-  for ( n = 0; n < src_grid_size; ++n )
-    if ( IS_NOT_EQUAL(src_grid->cell_area[n], 0) ) src_grid->cell_frac[n] /= src_grid->cell_area[n];
-
-  for ( n = 0; n < tgt_grid_size; ++n )
-    if ( IS_NOT_EQUAL(tgt_grid->cell_area[n], 0) ) tgt_grid->cell_frac[n] /= tgt_grid->cell_area[n];
-
-  /* Perform some error checking on final weights  */
-
-  if ( lcheck )
-    {
-      for ( n = 0; n < src_grid_size; ++n )
-	{
-	  if ( src_grid->cell_area[n] < -.01 )
-	    cdoPrint("Source grid area error: %d %g", n, src_grid->cell_area[n]);
-	}
-
-      for ( n = 0; n < tgt_grid_size; ++n )
-	{
-	  if ( tgt_grid->cell_area[n] < -.01 )
-	    cdoPrint("Target grid area error: %d %g", n, tgt_grid->cell_area[n]);
-	}
-
-      for ( n = 0; n < num_links; ++n )
-	{
-	  src_grid_add = rv->src_grid_add[n];
-	  tgt_grid_add = rv->tgt_grid_add[n];
-
-	  if ( rv->wts[n*num_wts] < -0.01 )
-	    cdoPrint("Map weight < 0! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
-		     src_grid_add, tgt_grid_add, n, rv->wts[n*num_wts]);
-
-	  if ( rv->norm_opt != NORM_OPT_NONE && rv->wts[n*num_wts] > 1.01 )
-	    cdoPrint("Map weight > 1! grid1idx=%d grid2idx=%d nlink=%d wts=%g",
-		     src_grid_add, tgt_grid_add, n, rv->wts[n*num_wts]);
-	}
-    } // lcheck
-
-  if ( cdoTimer ) timer_stop(timer_remap_con);
-
-} /* remap_consphere */
-
 /*****************************************************************************/
 
 void remap_stat(int remap_order, remapgrid_t src_grid, remapgrid_t tgt_grid, remapvars_t rv, const double *restrict array1, 
@@ -6178,7 +1502,7 @@ void remap_stat(int remap_order, remapgrid_t src_grid, remapgrid_t tgt_grid, rem
   cdoPrint("number of sparse matrix entries %d", rv.num_links);
   cdoPrint("total number of dest cells %d", tgt_grid.size);
 
-  tgt_count = malloc(tgt_grid.size*sizeof(int));
+  tgt_count = (int*) malloc(tgt_grid.size*sizeof(int));
 
   for ( n = 0; n < tgt_grid.size; ++n ) tgt_count[n] = 0;
 
@@ -6470,17 +1794,17 @@ void reorder_links(remapvars_t *rv)
 
       printf("num_links %ld  max_links %ld  num_blks %ld\n", rv->num_links, max_links, num_blks);
 
-      rv->links.num_links = malloc(num_blks*sizeof(int));
-      rv->links.dst_add   = malloc(num_blks*sizeof(int *));
-      rv->links.src_add   = malloc(num_blks*sizeof(int *));
-      rv->links.w_index   = malloc(num_blks*sizeof(int *));
+      rv->links.num_links = (int*) malloc(num_blks*sizeof(int));
+      rv->links.dst_add   = (int **) malloc(num_blks*sizeof(int *));
+      rv->links.src_add   = (int **) malloc(num_blks*sizeof(int *));
+      rv->links.w_index   = (int **) malloc(num_blks*sizeof(int *));
     }
 
   for ( j = 0; j < num_blks; j++ )
     {
-      rv->links.dst_add[j] = malloc(max_links*sizeof(int));
-      rv->links.src_add[j] = malloc(max_links*sizeof(int));
-      rv->links.w_index[j] = malloc(max_links*sizeof(int));
+      rv->links.dst_add[j] = (int*) malloc(max_links*sizeof(int));
+      rv->links.src_add[j] = (int*) malloc(max_links*sizeof(int));
+      rv->links.w_index[j] = (int*) malloc(max_links*sizeof(int));
     }
 
   for ( j = 0; j < num_blks; j++ )
diff --git a/src/remapsort.c b/src/remapsort.c
index 646b2d3..e60295c 100644
--- a/src/remapsort.c
+++ b/src/remapsort.c
@@ -287,12 +287,12 @@ void sort_add(long num_links, long num_wts, int *restrict add1, int *restrict ad
 
   if ( num_links <= 1 ) return;
 
-  idx = malloc(num_links*sizeof(int));
+  idx = (int*) malloc(num_links*sizeof(int));
   for ( i = 0; i < num_links; ++i ) idx[i] = i;
 
   remap_heapsort(num_links, add1, add2, idx);
 
-  wgt_tmp = malloc(num_wts*num_links*sizeof(double));
+  wgt_tmp = (double*) malloc(num_wts*num_links*sizeof(double));
   memcpy(wgt_tmp, weights, num_wts*num_links*sizeof(double));
 
   for ( i = 0; i < num_links; ++i )
@@ -620,7 +620,7 @@ void sort_par(long num_links, long num_wts, int *restrict add1, int *restrict ad
       exit(-1);
     }
 
-  idx = malloc(num_links*sizeof(long));
+  idx = (long*) malloc(num_links*sizeof(long));
 
   /* SPLIT AND SORT THE DATA FRAGMENTS */
   /*
@@ -675,7 +675,7 @@ void sort_par(long num_links, long num_wts, int *restrict add1, int *restrict ad
       //	       who_am_i,parent,my_depth,omp_get_thread_num()+1,omp_get_num_threads());
 #endif
             
-      wgttmp = malloc(num_wts*nl[i]*sizeof(double));
+      wgttmp = (double*) malloc(num_wts*nl[i]*sizeof(double));
        
       for ( m = 0; m < nl[i]; m++ )
 	for ( n = 0; n < num_wts; n++ )                      
@@ -698,7 +698,7 @@ void sort_par(long num_links, long num_wts, int *restrict add1, int *restrict ad
                                                               /* ********************** */
   merge_lists(nl,add1s[0],add2s[0],add1s[1],add2s[1], idx);   /* MERGE THE SEGMENTS     */
                                                               /* ********************** */
-  tmp = malloc(num_links*sizeof(int));
+  tmp = (int*) malloc(num_links*sizeof(int));
   
 #if defined(_OPENMP)
 #pragma omp parallel for if ( depth < par_depth ) private(i) num_threads(2)
@@ -724,7 +724,7 @@ void sort_par(long num_links, long num_wts, int *restrict add1, int *restrict ad
   free(tmp);
   tmp = NULL;
   
-  tmp2 = malloc(num_links*num_wts*sizeof(double) );
+  tmp2 = (double*) malloc(num_links*num_wts*sizeof(double));
   
 #if defined(_OPENMP)
 #pragma omp parallel for if ( depth < par_depth ) private(i,n) num_threads(2)
diff --git a/src/specspace.c b/src/specspace.c
index fa24b55..a7f1692 100644
--- a/src/specspace.c
+++ b/src/specspace.c
@@ -55,16 +55,16 @@ void legini_old(int ntr, int nlat, double *poli, double *pold,
   dimsp = (ntr + 1) * (ntr + 2);
   pdim  = dimsp / 2 * nlat;
 
-  gmu  = malloc(nlat * sizeof(double));
-  gwt  = malloc(nlat * sizeof(double));
+  gmu  = (double*) malloc(nlat * sizeof(double));
+  gwt  = (double*) malloc(nlat * sizeof(double));
 
   gaussaw(gmu, gwt, nlat);
 
 #if ! defined(_OPENMP)
-  pnm    = malloc(dimsp * sizeof(double));
-  hnm    = malloc(dimsp * sizeof(double));
-  ztemp1 = malloc((waves<<1) * sizeof(double));
-  ztemp2 = malloc((waves<<1) * sizeof(double));
+  pnm    = (double*) malloc(dimsp * sizeof(double));
+  hnm    = (double*) malloc(dimsp * sizeof(double));
+  ztemp1 = (double*) malloc((waves<<1) * sizeof(double));
+  ztemp2 = (double*) malloc((waves<<1) * sizeof(double));
 #endif
 
 #if defined(_OPENMP)
@@ -73,10 +73,10 @@ void legini_old(int ntr, int nlat, double *poli, double *pold,
   for ( jgl = 0; jgl < nlat; jgl++ )
     {
 #if defined(_OPENMP)
-      pnm    = malloc(dimsp * sizeof(double));
-      hnm    = malloc(dimsp * sizeof(double));
-      ztemp1 = malloc((waves<<1) * sizeof(double));
-      ztemp2 = malloc((waves<<1) * sizeof(double));
+      pnm    = (double*) malloc(dimsp * sizeof(double));
+      hnm    = (double*) malloc(dimsp * sizeof(double));
+      ztemp1 = (double*) malloc((waves<<1) * sizeof(double));
+      ztemp2 = (double*) malloc((waves<<1) * sizeof(double));
 #endif
       gmusq = 1.0 - gmu[jgl]*gmu[jgl];
       coslat[jgl] =  sqrt(gmusq);
@@ -126,10 +126,10 @@ void legini(int ntr, int nlat, double *poli, double *pold, double *rcoslat)
   dimsp  = (ntr + 1)*(ntr + 2);
   dimpnm = (ntr + 1)*(ntr + 4)/2;
 
-  gmu  = malloc(nlat * sizeof(double));
-  gwt  = malloc(nlat * sizeof(double));
-  pnm  = malloc(dimpnm * sizeof(double));
-  work = malloc(3*waves * sizeof(double));
+  gmu  = (double*) malloc(nlat * sizeof(double));
+  gwt  = (double*) malloc(nlat * sizeof(double));
+  pnm  = (double*) malloc(dimpnm * sizeof(double));
+  work = (double*) malloc(3*waves * sizeof(double));
 
   gaussaw(gmu, gwt, nlat);
   for ( jgl = 0; jgl < nlat; jgl++ ) gwt[jgl] *= 0.5;
@@ -184,7 +184,7 @@ void grid2spec(SPTRANS *sptrans, int gridIDin, double *arrayIn, int gridIDout, d
   waves = ntr + 1;
   nfc   = waves * 2;
 
-  fpwork = malloc(nlat*nfc*nlev*sizeof(double));
+  fpwork = (double*) malloc(nlat*nfc*nlev*sizeof(double));
 
   gp2fc(sptrans->trig, sptrans->ifax, arrayIn, fpwork, nlat, nlon, nlev, nfc);
   fc2sp(fpwork, arrayOut, sptrans->pold, nlev, nlat, nfc, ntr);
@@ -207,7 +207,7 @@ void spec2grid(SPTRANS *sptrans, int gridIDin, double *arrayIn, int gridIDout, d
   waves = ntr + 1;
   nfc   = waves * 2;
 
-  fpwork = malloc(nlat*nfc*nlev*sizeof(double));
+  fpwork = (double*) malloc(nlat*nfc*nlev*sizeof(double));
 
   sp2fc(arrayIn, fpwork, sptrans->poli, nlev, nlat, nfc, ntr);
   fc2gp(sptrans->trig, sptrans->ifax, fpwork, arrayOut, nlat, nlon, nlev, nfc);
@@ -309,7 +309,7 @@ SPTRANS *sptrans_new(int nlon, int nlat, int ntr, int flag)
   SPTRANS *sptrans;
   int nsp;
 
-  sptrans = malloc(sizeof(SPTRANS));
+  sptrans = (SPTRANS*) malloc(sizeof(SPTRANS));
 
   sptrans->nlon = nlon;
   sptrans->nlat = nlat;
@@ -318,15 +318,15 @@ SPTRANS *sptrans_new(int nlon, int nlat, int ntr, int flag)
   nsp = (ntr + 1)*(ntr + 2);
   sptrans->poldim = nsp / 2 * nlat;
 
-  sptrans->trig = malloc(nlon * sizeof(double));
+  sptrans->trig = (double*) malloc(nlon * sizeof(double));
   fft_set(sptrans->trig, sptrans->ifax, nlon);
 
-  sptrans->poli = malloc(sptrans->poldim * sizeof(double));
-  sptrans->pold = malloc(sptrans->poldim * sizeof(double));
+  sptrans->poli = (double*) malloc(sptrans->poldim * sizeof(double));
+  sptrans->pold = (double*) malloc(sptrans->poldim * sizeof(double));
   if ( flag )
     {
-      sptrans->pol2 = malloc(sptrans->poldim * sizeof(double));
-      sptrans->pol3 = malloc(sptrans->poldim * sizeof(double));
+      sptrans->pol2 = (double*) malloc(sptrans->poldim * sizeof(double));
+      sptrans->pol3 = (double*) malloc(sptrans->poldim * sizeof(double));
     }
   else
     {
@@ -334,8 +334,8 @@ SPTRANS *sptrans_new(int nlon, int nlat, int ntr, int flag)
       sptrans->pol3 = NULL;
     }
 
-  sptrans->coslat  = malloc(nlat * sizeof(double));
-  sptrans->rcoslat = malloc(nlat * sizeof(double));
+  sptrans->coslat  = (double*) malloc(nlat * sizeof(double));
+  sptrans->rcoslat = (double*) malloc(nlat * sizeof(double));
 
   if ( flag )
     legini_old(ntr, nlat, sptrans->poli, sptrans->pold,
@@ -369,15 +369,15 @@ DVTRANS *dvtrans_new(int ntr)
   DVTRANS *dvtrans;
   int dimsp;
 
-  dvtrans = malloc(sizeof(DVTRANS));
+  dvtrans = (DVTRANS*) malloc(sizeof(DVTRANS));
 
   dvtrans->ntr = ntr;
 
   dimsp = (ntr + 1)*(ntr + 2);
   dvtrans->fdim = dimsp / 2;
 
-  dvtrans->f1 = malloc(dvtrans->fdim * sizeof(double));
-  dvtrans->f2 = malloc(dvtrans->fdim * sizeof(double));
+  dvtrans->f1 = (double*) malloc(dvtrans->fdim * sizeof(double));
+  dvtrans->f2 = (double*) malloc(dvtrans->fdim * sizeof(double));
 
   geninx(ntr, dvtrans->f1, dvtrans->f2);
 
@@ -623,8 +623,8 @@ void trans_uv2dv(SPTRANS *sptrans, int nlev,
   waves = ntr + 1;
   nfc   = waves * 2;
 
-  fpwork1 = malloc(nlat*nfc*nlev*sizeof(double));
-  fpwork2 = malloc(nlat*nfc*nlev*sizeof(double));
+  fpwork1 = (double*) malloc(nlat*nfc*nlev*sizeof(double));
+  fpwork2 = (double*) malloc(nlat*nfc*nlev*sizeof(double));
 
   gp2fc(sptrans->trig, sptrans->ifax, gu, fpwork1, nlat, nlon, nlev, nfc);
   gp2fc(sptrans->trig, sptrans->ifax, gv, fpwork2, nlat, nlon, nlev, nfc);
@@ -669,7 +669,7 @@ void trans_dv2uv(SPTRANS *sptrans, DVTRANS *dvtrans, int nlev,
 
   dv2uv(sd, svo, su, sv, dvtrans->f1, dvtrans->f2, ntr, dimsp, nlev);
 
-  fpwork = malloc(nlat*nfc*nlev*sizeof(double));
+  fpwork = (double*) malloc(nlat*nfc*nlev*sizeof(double));
 
   sp2fc(su, fpwork, sptrans->poli, nlev, nlat, nfc, ntr);
   scaluv(fpwork, sptrans->rcoslat, nlat, nfc*nlev);
diff --git a/src/statistic.c b/src/statistic.c
index 4007511..e966276 100644
--- a/src/statistic.c
+++ b/src/statistic.c
@@ -11,11 +11,8 @@
 #include <math.h>
 #include <time.h>
 
-#define PI_QU 1*atan(1)
-#define PI_HA 2*atan(1)
-#define PI    4*atan(1)
-#define FNORM_PRECISION 1e-12
-#define MAX_JACOBI_ITER 12
+#define  FNORM_PRECISION  1e-12
+#define  MAX_JACOBI_ITER  12
 
 int jacobi_1side(double **M, double *A, long n);
 void annihilate_1side(double **M, long i, long j, long k, long n);
@@ -72,7 +69,7 @@ void eigen_solution_of_symmetric_matrix (double **a, double *eig_val,
   int i, j;
   double temp;
   
-  e = malloc (n * sizeof (double));
+  e = (double*) malloc(n * sizeof(double));
   
   make_symmetric_matrix_triangular (a, n, eig_val, e, prompt);
   
@@ -150,12 +147,14 @@ void heap_sort (double *eig_val, double **a, int n)
 }
 
 
-void make_symmetric_matrix_triangular (double **a, int n,
-				       double *d, double *e, const char *prompt)
+void make_symmetric_matrix_triangular(double **a, int n,
+				      double *d, double *e, const char *prompt)
 {
   int i, j, k;
   double f, g, h, hh, scale;
   
+  UNUSED(prompt);
+
   for (i = n - 1; i >= 1; i--)
     {
       h = scale = 0;
@@ -366,7 +365,7 @@ int solution_of_linear_equation (double **a, double *b, int n)
   int sign;
   int not_singular;
   
-  index = malloc (n * sizeof (int));
+  index = (int*) malloc(n * sizeof(int));
   
   not_singular = lu_decomposition (a, n, index, &sign);
   
@@ -387,8 +386,8 @@ int inverse_of_matrix (double **a, double **b, int n)
   int not_singular;
   double *col;
   
-  index = malloc (n * sizeof (int));
-  col = malloc (n * sizeof (double));
+  index = (int*) malloc(n * sizeof(int));
+  col = (double*) malloc(n * sizeof(double));
   
   not_singular = lu_decomposition (a, n, index, &sign);
   
@@ -418,7 +417,7 @@ int lu_decomposition (double **a, int n, int *index, int *sign)
   double big, sum, temp;
   double *v;
   
-  v = malloc (n * sizeof (double));
+  v = (double*) malloc(n * sizeof(double));
   *sign = 1;
   for (i = 0; i < n; i++)
     {
@@ -511,31 +510,36 @@ void lu_backsubstitution (double **a, int n, int *index, double *b)
 }
 
 
-void fft (double *real, double *imag, int n, int sign)
-{				/* n must be a power of 2 */
+void fft(double *real, double *imag, int n, int sign)
+{
+  /* n must be a power of 2 */
   /* sign should be 1 (FT) or -1 (reverse FT) */
   int i, j, j1, j2;
   int bit;
+  int step;
   double temp_r, temp_i, norm;
   double w_r, w_i, ww_r, ww_i;
-  int step;
   
   /* Bit reversal part */
-  for (i = j = 0; i < n; i++)	/* The bit pattern of i and j are reverse */
+  for ( i = j = 0; i < n; i++ )	/* The bit pattern of i and j are reverse */
     {
-      if (i > j)
+      if ( i > j )
         {
+          /* swap real part */
           temp_r = real[i];
           real[i] = real[j];
           real[j] = temp_r;
+
+          /* swap imaginary part */
           temp_i = imag[i];
           imag[i] = imag[j];
           imag[j] = temp_i;
         }
-      for (bit = n >> 1; j & bit; bit >>= 1)
-        j ^= bit;
+
+      for ( bit = n >> 1; j & bit; bit >>= 1 ) j ^= bit;
       j |= bit;
     }
+
   /* Danielson-Lanczos Part */
   for (step = 1; step < n; step <<= 1)
     {
@@ -559,17 +563,19 @@ void fft (double *real, double *imag, int n, int sign)
           ww_i = temp_r * w_i + ww_i * w_r;
         }
     }
-  norm = sqrt (n);
-  for (i = 0; i < n; i++)
+
+  norm = 1./sqrt(n);
+  for ( i = 0; i < n; i++ )
     {
-      real[i] /= norm;
-      imag[i] /= norm;
+      real[i] *= norm;
+      imag[i] *= norm;
     }
 }
 
 
-void ft (double *real, double *imag, int n, int sign)
-{				/* sign should be 1 (FT) or -1 (reverse FT) */
+void ft(double *real, double *imag, int n, int sign)
+{
+  /* sign should be 1 (FT) or -1 (reverse FT) */
   int j, k;
   static double *work_r = 0, *work_i = 0;
   double sum_r, sum_i, norm;
@@ -577,12 +583,12 @@ void ft (double *real, double *imag, int n, int sign)
   
   if (!work_r)
     {
-      work_r = malloc (n * sizeof (double));
+      work_r = (double*) malloc(n * sizeof(double));
       /* free_at_exit (work_r); */
     }
   if (!work_i)
     {
-      work_i = malloc (n * sizeof (double));
+      work_i = (double*) malloc(n * sizeof(double));
       /* free_at_exit (work_i); */
     }
   
@@ -605,22 +611,24 @@ void ft (double *real, double *imag, int n, int sign)
       work_r[k] = sum_r;
       work_i[k] = sum_i;
     }
-  norm = sqrt (n);
+
+  norm = 1./sqrt(n);
   for (k = 0; k < n; k++)
     {
-      real[k] = work_r[k] / norm;
-      imag[k] = work_i[k] / norm;
+      real[k] = work_r[k] * norm;
+      imag[k] = work_i[k] * norm;
     }
 }
 
 /* reentrant version of ft */
-void ft_r(double *real, double *imag, int n, int sign, double *work_r, double *work_i)
-{				/* sign should be 1 (FT) or -1 (reverse FT) */
+void ft_r(double * restrict real, double * restrict imag, int n, int sign, double * restrict work_r, double * restrict work_i)
+{
+  /* sign should be 1 (FT) or -1 (reverse FT) */
   int j, k;
   double sum_r, sum_i, norm;
   double w_r, w_i, ww_r, ww_i, temp_r;
     
-  for (k = 0; k < n; k++)
+  for ( k = 0; k < n; k++ )
     {
       w_r = cos (2 * M_PI * k / n);
       w_i = sin (2 * M_PI * k / n) * sign;
@@ -628,7 +636,7 @@ void ft_r(double *real, double *imag, int n, int sign, double *work_r, double *w
       ww_i = 0;
       sum_r = 0;
       sum_i = 0;
-      for (j = 0; j < n; j++)
+      for ( j = 0; j < n; j++ )
         {
           sum_r += real[j] * ww_r - imag[j] * ww_i;
           sum_i += real[j] * ww_i + imag[j] * ww_r;
@@ -639,11 +647,12 @@ void ft_r(double *real, double *imag, int n, int sign, double *work_r, double *w
       work_r[k] = sum_r;
       work_i[k] = sum_i;
     }
-  norm = sqrt (n);
-  for (k = 0; k < n; k++)
+
+  norm = 1./sqrt(n);
+  for ( k = 0; k < n; k++ )
     {
-      real[k] = work_r[k] / norm;
-      imag[k] = work_i[k] / norm;
+      real[k] = work_r[k] * norm;
+      imag[k] = work_i[k] * norm;
     }
 }
 
@@ -1307,10 +1316,12 @@ void annihilate_1side(double **M, long i, long j, long k, long n)
   //  int first_annihilation = 0;
   long r;
 
+  UNUSED(k);
+
   i--; j--;
 
-  mi = malloc(n*sizeof(double));
-  mj = malloc(n*sizeof(double));
+  mi = (double*) malloc(n*sizeof(double));
+  mj = (double*) malloc(n*sizeof(double));
 
   if ( ! mj || ! mi) 
     fprintf(stderr, 
@@ -1376,8 +1387,8 @@ int jacobi_1side(double **M, double *A, long n)
 
   if ( n > 0 )
     {
-      annihilations_buff = malloc (n*n*2*sizeof(int));
-      annihilations = malloc((n*n)*sizeof(int*));
+      annihilations_buff = (int*) malloc(n*n*2*sizeof(int));
+      annihilations = (int**) malloc((n*n)*sizeof(int*));
     }
 
   for(i=0;i<n*n;i++)
diff --git a/src/statistic.h b/src/statistic.h
index 7f6c8e7..40752cb 100644
--- a/src/statistic.h
+++ b/src/statistic.h
@@ -6,8 +6,8 @@ void eigen_solution_of_symmetric_matrix (double **a, double *eig_val, int n, int
 int solution_of_linear_equation (double **a, double *b, int n);
 int inverse_of_matrix (double **a, double **b, int n);
 void fft(double *real, double *imag, int n, int sign);
-void ft (double *real, double *imag, int n, int sign);
-void ft_r(double *real, double *imag, int n, int sign, double *work_r, double *work_i);
+//void ft (double *real, double *imag, int n, int sign);
+void ft_r(double * restrict real, double * restrict imag, int n, int sign, double * restrict work_r, double * restrict work_i);
 double lngamma (double x);
 double beta (double a, double b, const char *prompt);
 double incomplete_gamma (double a, double x, const char *prompt);
diff --git a/src/stdnametable.c b/src/stdnametable.c
index 840882a..49c937b 100644
--- a/src/stdnametable.c
+++ b/src/stdnametable.c
@@ -18,11 +18,12 @@ stdnametable_t;
 const stdnametable_t stdnametable[] = {
   /* varid                       code    name                standard name                 units */
   { surface_geopotential,         129,  "geosp",            "surface_geopotential",       "m2 s-2" },
+  { geopotential,                 129,  "z",                "geopotential",               "m2 s-2" },
   { air_temperature,              130,  "ta",               "air_temperature",            "K" },
   { specific_humidity,            133,  "hus",              "specific_humidity",          "1" },
   { surface_air_pressure,         134,  "aps",              "surface_air_pressure",       "Pa" },
   { air_pressure_at_sea_level,    151,  "psl",              "air_pressure_at_sea_level",  "Pa" },
-  { geopotential_height,          156,  "zg",               "geopotential_height",        "m" },
+  { geopotential_height,          156,  "zh",               "geopotential_height",        "m" },
 };
 
 
@@ -65,7 +66,7 @@ int echamcode_from_stdname(const char* stdname)
   int code = -1;
 
   if      ( strcmp(stdname, var_stdname(surface_geopotential))      == 0 ) code = 129;
-  else if ( strcmp(stdname, "geopotential")                         == 0 ) code = 129;
+  else if ( strcmp(stdname, var_stdname(geopotential))              == 0 ) code = 129;
   else if ( strcmp(stdname, var_stdname(air_temperature))           == 0 ) code = 130;
   else if ( strcmp(stdname, var_stdname(specific_humidity))         == 0 ) code = 133;
   else if ( strcmp(stdname, var_stdname(surface_air_pressure))      == 0 ) code = 134;
@@ -74,3 +75,25 @@ int echamcode_from_stdname(const char* stdname)
 
   return (code);
 }
+
+
+void echam_gribcodes(gribcode_t *gribcodes)
+{
+  gribcodes->geopot  =  129;
+  gribcodes->temp    =  130;
+  gribcodes->hum     =  133;
+  gribcodes->ps      =  134;
+  gribcodes->lsp     =  152;
+  gribcodes->gheight =  156;
+}
+
+
+void wmo_gribcodes(gribcode_t *gribcodes)
+{
+  gribcodes->geopot  =   6;
+  gribcodes->temp    =  11;
+  gribcodes->hum     =   0;
+  gribcodes->ps      =   1;
+  gribcodes->lsp     =   0;
+  gribcodes->gheight =   7;
+}
diff --git a/src/stdnametable.h b/src/stdnametable.h
index 14e4968..f5472b0 100644
--- a/src/stdnametable.h
+++ b/src/stdnametable.h
@@ -2,6 +2,7 @@
 #define _STDNAMETABLE_H
 
 enum stdnameid {surface_geopotential,
+		geopotential,
 		air_temperature,
                 specific_humidity,
 		surface_air_pressure,
@@ -15,4 +16,17 @@ const char* var_units(int varid);
 
 int echamcode_from_stdname(const char* stdname);
 
+typedef struct
+{
+  int geopot;
+  int temp;
+  int hum;
+  int ps;
+  int lsp;
+  int gheight;
+} gribcode_t;
+
+void echam_gribcodes(gribcode_t *gribcodes);
+void wmo_gribcodes(gribcode_t *gribcodes);
+
 #endif
diff --git a/src/table.c b/src/table.c
index c4395e3..69277ec 100644
--- a/src/table.c
+++ b/src/table.c
@@ -47,7 +47,7 @@ int defineTable(char *tablearg)
 	{
 	  char *tablefile = NULL;
 	  int len = sizeof(tablepath) + sizeof(tablename) + 3;
-	  tablefile = malloc(len);
+	  tablefile = (char*) malloc(len);
 	  strcpy(tablefile, tablepath);
 	  strcat(tablefile, "/");
 	  strcat(tablefile, tablename);
diff --git a/src/text.c b/src/text.c
new file mode 100644
index 0000000..6c52340
--- /dev/null
+++ b/src/text.c
@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include "cdo.h"
+
+
+void set_text_color(FILE *fp, int attr, int fg)
+{
+  int bg = -1;
+
+  if ( fp == stdout && !COLOR_STDOUT ) return;
+  if ( fp == stderr && !COLOR_STDERR ) return;
+
+  fprintf(fp, "%c[%d", 0x1B, attr);
+  if ( fg >= 0 )
+    {
+      fprintf(fp, ";%d", fg+30);
+      if ( bg >= 0 ) fprintf(fp, ";%d", bg+40);
+    }
+  fprintf(fp, "m");
+}
+
+
+void reset_text_color(FILE *fp)
+{
+  int attr = RESET;
+
+  if ( fp == stdout && !COLOR_STDOUT ) return;
+  if ( fp == stderr && !COLOR_STDERR ) return;
+
+  fprintf(fp, "%c[%dm", 0x1B, attr);
+}
diff --git a/src/text.h b/src/text.h
new file mode 100644
index 0000000..a9c9b4f
--- /dev/null
+++ b/src/text.h
@@ -0,0 +1,28 @@
+#ifndef _TEXT_H
+#define _TEXT_H
+
+#define RESET		0
+#define BRIGHT 		1
+#define DIM		2
+#define UNDERLINE 	4
+#define BLINK		5
+#define REVERSE		7
+#define HIDDEN		8
+
+#define BLACK 		0
+#define RED		1
+#define GREEN		2
+#define YELLOW		3
+#define BLUE		4
+#define MAGENTA		5
+#define CYAN		6
+#define	WHITE		7
+
+
+#define COLOR_STDOUT (stdout_is_tty && CDO_Color)
+#define COLOR_STDERR (stderr_is_tty && CDO_Color)
+
+void set_text_color(FILE *fp, int attr, int fg);
+void reset_text_color(FILE *fp);
+
+#endif  /* _TEXT_H */
diff --git a/src/userlog.c b/src/userlog.c
index bb0e460..224599f 100644
--- a/src/userlog.c
+++ b/src/userlog.c
@@ -495,7 +495,7 @@ void dumplogs(const char *logfilename)
 
   if ( bufsize > 0 )
     {
-      buffer = malloc(bufsize);
+      buffer = (unsigned char*) malloc(bufsize);
 
       status = (int) read(logfileno, buffer, bufsize);
 
@@ -568,7 +568,7 @@ void daylogs(const char *logfilename)
 
   if ( bufsize > 0 )
     {
-      buffer = malloc(bufsize);
+      buffer = (unsigned char*) malloc(bufsize);
 
       status = (int) read(logfileno, buffer, bufsize);
 
@@ -640,7 +640,7 @@ void monlogs(const char *logfilename)
 
   if ( bufsize > 0 )
     {
-      buffer = malloc(bufsize);
+      buffer = (unsigned char*) malloc(bufsize);
 
       status = (int) read(logfileno, buffer, bufsize);
 
@@ -769,7 +769,7 @@ void cdologo(int noper)
   bufsize = (size_t) filestat.st_size;
 
   newbufsize = bufsize + noper*logsize;
-  buffer = malloc(newbufsize);
+  buffer = (unsigned char*) malloc(newbufsize);
   if ( bufsize > 0 )
     status = (int) read(logfileno, buffer, bufsize);
 
@@ -957,14 +957,14 @@ void dumplogo(const char *logfilename, int dumptype)
   if ( bufsize > 0 )
     {
       fprintf(stdout, "# num name                     call        mem [GB]    time [h]     perc [s]\n");
-      buffer = malloc(bufsize);
+      buffer = (unsigned char*) malloc(bufsize);
 
       status = (int) read(logfileno, buffer, bufsize);
 
       nlogs = bufsize / logsize;
 
-      logInfo    = malloc(nlogs*sizeof(loginfo_t *));
-      logInfo[0] = malloc(nlogs*sizeof(loginfo_t));
+      logInfo    = (loginfo_t **) malloc(nlogs*sizeof(loginfo_t *));
+      logInfo[0] = (loginfo_t*) malloc(nlogs*sizeof(loginfo_t));
       for ( i = 1; i < nlogs; i++ ) logInfo[i] = logInfo[0] + i;
 
       for ( i = 0; i < nlogs; i++ )
diff --git a/src/util.c b/src/util.c
index 96b78d6..b800d64 100644
--- a/src/util.c
+++ b/src/util.c
@@ -15,6 +15,10 @@
   GNU General Public License for more details.
 */
 
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 /* ftello */
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>   /* tolower */
@@ -52,7 +56,7 @@ char *getOperator(const char *argument)
     {
       len = 1 + strlen(argument);
 
-      operatorArg = malloc(len);
+      operatorArg = (char*) malloc(len);
 
       memcpy(operatorArg, argument, len);
     }
@@ -79,7 +83,7 @@ char *getOperatorName(const char *operatorArg)
       else
 	len = strlen(operatorArg);
 
-      operatorName = malloc(len+1);
+      operatorName = (char*) malloc(len+1);
 
       memcpy(operatorName, operatorArg, len);
       operatorName[len] = '\0';
@@ -94,10 +98,10 @@ argument_t *file_argument_new(const char *filename)
 {
   argument_t *argument;
 
-  argument = calloc(1, sizeof(argument_t));
+  argument = (argument_t*) calloc(1, sizeof(argument_t));
 
   argument->argc = 1;
-  argument->argv = calloc(1, sizeof(char *));
+  argument->argv = (char **) calloc(1, sizeof(char *));
   argument->argv[0] = (char *) filename;
   argument->args = (char *) filename;
 
@@ -123,16 +127,16 @@ argument_t *argument_new(size_t argc, size_t len)
 {
   argument_t *argument;
 
-  argument = calloc(1, sizeof(argument_t));
+  argument = (argument_t*) calloc(1, sizeof(argument_t));
 
   if ( argc > 0 )
     {
       argument->argc = argc;
-      argument->argv = calloc(argc, sizeof(char *));
+      argument->argv = (char **) calloc(argc, sizeof(char *));
     }
 
   if ( len > 0 )
-    argument->args = calloc(len, sizeof(char));
+    argument->args = (char*) calloc(len, sizeof(char));
 
   return (argument);
 }
@@ -144,7 +148,8 @@ void argument_free(argument_t *argument)
     {
       if ( argument->argc )
 	{
-	  for ( int i = 0; i < argument->argc; ++i )
+	  int argc =  argument->argc;
+	  for ( int i = 0; i < argc; ++i )
 	    {
 	      if ( argument->argv[i] )
 		{
@@ -195,7 +200,7 @@ char *getFileArg(char *argument)
 	{
 	  parg = blankpos + 1;
 	  len = strlen(parg);
-	  fileArg = malloc(len+1);
+	  fileArg = (char*) malloc(len+1);
 	  strcpy(fileArg, parg);
 	}
     }
@@ -257,7 +262,7 @@ int get_season_start(void)
 }
 
 
-void get_season_name(const char *seas_name[4])
+void get_season_name(const char *seas_name[])
 {
   long i;
 
@@ -311,18 +316,6 @@ int userFileOverwrite(const char *filename)
   return (status);
 }
 
-int stdin_is_tty  = 0;
-int stdout_is_tty = 0;
-
-void init_is_tty(void)
-{
-  struct stat statbuf;
-  fstat(0, &statbuf);
-  if ( S_ISCHR(statbuf.st_mode) ) stdin_is_tty = 1;  
-  fstat(1, &statbuf);
-  if ( S_ISCHR(statbuf.st_mode) ) stdout_is_tty = 1;  
-}
-
 
 int ps_lhead = FALSE;
 int ps_nch   = 0;
@@ -341,7 +334,6 @@ void progressStatus(double offset, double refval, double curval)
   int ival;
 
   if ( cdoSilentMode ) return;
-
   if ( !stdout_is_tty ) return;
 
   offset = offset < 0 ? 0: offset;
diff --git a/src/util.h b/src/util.h
index 4042a56..d2026f0 100644
--- a/src/util.h
+++ b/src/util.h
@@ -40,7 +40,7 @@ char *getFileArg(char *argument);
 
 enum {START_DEC, START_JAN};
 int get_season_start(void);
-void get_season_name(const char *seas_name[4]);
+void get_season_name(const char *seas_name[]);
 
 void init_is_tty(void);
 
diff --git a/src/zaxis.c b/src/zaxis.c
index 41f0fe1..0d66693 100644
--- a/src/zaxis.c
+++ b/src/zaxis.c
@@ -237,7 +237,7 @@ int zaxisFromFile(FILE *gfp, const char *dname)
 	    {
 	      pline = skipSeparator(pline + 6);
 	  
-	      zaxis.vals = malloc(zaxis.size*sizeof(double));
+	      zaxis.vals = (double*) malloc(zaxis.size*sizeof(double));
 	      for ( i = 0; i < zaxis.size; i++ )
 		{
 		  pline = skipSeparator(pline);
@@ -271,7 +271,7 @@ int zaxisFromFile(FILE *gfp, const char *dname)
 	    {
 	      pline = skipSeparator(pline + 3);
 	  
-	      zaxis.vct = malloc(zaxis.vctsize*sizeof(double));
+	      zaxis.vct = (double*) malloc(zaxis.vctsize*sizeof(double));
 	      for ( i = 0; i < zaxis.vctsize; i++ )
 		{
 		  pline = skipSeparator(pline);
@@ -305,7 +305,7 @@ int zaxisFromFile(FILE *gfp, const char *dname)
 	    {
 	      pline = skipSeparator(pline + 7);
 	  
-	      zaxis.lbounds = malloc(zaxis.size*sizeof(double));
+	      zaxis.lbounds = (double*) malloc(zaxis.size*sizeof(double));
 	      for ( i = 0; i < zaxis.size; i++ )
 		{
 		  pline = skipSeparator(pline);
@@ -339,7 +339,7 @@ int zaxisFromFile(FILE *gfp, const char *dname)
 	    {
 	      pline = skipSeparator(pline + 7);
 	  
-	      zaxis.ubounds = malloc(zaxis.size*sizeof(double));
+	      zaxis.ubounds = (double*) malloc(zaxis.size*sizeof(double));
 	      for ( i = 0; i < zaxis.size; i++ )
 		{
 		  pline = skipSeparator(pline);
@@ -387,7 +387,7 @@ int zaxisFromName(const char *zaxisname)
     {
       zaxis.type = ZAXIS_SURFACE;
       zaxis.size = 1;
-      zaxis.vals = malloc(zaxis.size*sizeof(double));
+      zaxis.vals = (double*) malloc(zaxis.size*sizeof(double));
       zaxis.vals[0] = 0;
     }
 
@@ -432,27 +432,11 @@ void defineZaxis(const char *zaxisarg)
     }
 }
 
-
-int zaxis2ltype(int zaxisID)
-{
-  int ltype;
-  int zaxistype;
-
-  zaxistype = zaxisInqType(zaxisID);
-
-  ltype = zaxisInqLtype(zaxisID);
-
-  if ( ltype <= 0 ) ltype = ztype2ltype(zaxistype);
-
-  return (ltype);
-}
-
-
+static
 int ztype2ltype(int zaxistype)
 {
-  int ltype;
+  int ltype = -1;
 
-  ltype = -1;
   if      ( zaxistype == ZAXIS_SURFACE           )  ltype =   1;
   else if ( zaxistype == ZAXIS_PRESSURE          )  ltype = 100;
   else if ( zaxistype == ZAXIS_ALTITUDE          )  ltype = 103;
@@ -468,22 +452,16 @@ int ztype2ltype(int zaxistype)
 }
 
 
-int ltype2ztype(int ltype)
+int zaxis2ltype(int zaxisID)
 {
-  int zaxistype = -1;
-
-  if      ( ltype ==   1 ) zaxistype = ZAXIS_SURFACE;
-  else if ( ltype ==   0 ) zaxistype = ZAXIS_SURFACE;
-  else if ( ltype == 100 ) zaxistype = ZAXIS_PRESSURE;
-  else if ( ltype == 103 ) zaxistype = ZAXIS_ALTITUDE;
-  else if ( ltype == 105 ) zaxistype = ZAXIS_HEIGHT;
-  else if ( ltype == 107 ) zaxistype = ZAXIS_SIGMA;
-  else if ( ltype == 109 ) zaxistype = ZAXIS_HYBRID;
-  else if ( ltype == 110 ) zaxistype = ZAXIS_HYBRID_HALF;
-  else if ( ltype == 111 ) zaxistype = ZAXIS_DEPTH_BELOW_LAND;
-  else if ( ltype == 113 ) zaxistype = ZAXIS_ISENTROPIC;
-  else if ( ltype == 160 ) zaxistype = ZAXIS_DEPTH_BELOW_SEA;
-  else                     zaxistype = ZAXIS_GENERIC;
-
-  return (zaxistype);
+  int ltype;
+  int zaxistype;
+
+  zaxistype = zaxisInqType(zaxisID);
+
+  ltype = zaxisInqLtype(zaxisID);
+
+  if ( ltype <= 0 ) ltype = ztype2ltype(zaxistype);
+
+  return (ltype);
 }
diff --git a/test/Cat.test.in b/test/Cat.test.in
new file mode 100644
index 0000000..8940944
--- /dev/null
+++ b/test/Cat.test.in
@@ -0,0 +1,43 @@
+#! @SHELL@
+echo 1..1 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+CDOOUT=cout
+CDOERR=cerr
+FORMAT="-f srv -b 32"
+RSTAT=0
+#
+IFILE=$DATAPATH/t21_geosp_tsurf.grb
+#
+RFILE=catdata_ref
+OFILE=catdata
+#
+cp $IFILE ${RFILE}
+chmod u+w ${RFILE}
+cat $IFILE >> ${RFILE}
+#
+rm -f ${OFILE}
+#
+CDOTEST="cat"
+CDOCOMMAND="$CDO cat $IFILE ${OFILE}"
+#
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+#
+$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+#
+test $RSTAT -eq 0 && echo "ok 1 - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok 1 - $CDOTEST"
+#
+rm -f $OFILE $RFILE
+#
+rm -f $CDOOUT $CDOERR
+#
+exit 0
diff --git a/test/Detrend.test.in b/test/Detrend.test.in
new file mode 100644
index 0000000..b4a0fb0
--- /dev/null
+++ b/test/Detrend.test.in
@@ -0,0 +1,72 @@
+#! @SHELL@
+echo 1..2 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+CDOOUT=cout
+CDOERR=cerr
+#
+IFILE=$DATAPATH/detrend_data
+NTEST=1
+#
+RSTAT=0
+RFILE=$DATAPATH/detrend_ref
+OFILE=detrend_res
+#
+# detrend
+#
+CDOTEST="detrend"
+CDOCOMMAND="$CDO $CDOTEST $IFILE $OFILE"
+
+echo "Running test: $NTEST"
+echo "$CDOCOMMAND"
+
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+
+$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+
+test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+
+let NTEST+=1
+rm -f $OFILE
+#
+# trend
+#
+CDOTEST="trend/subtrend"
+CDOCOMMAND="$CDO trend $IFILE ta tb"
+
+echo "Running test: $NTEST"
+echo "$CDOCOMMAND"
+
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+#
+CDOCOMMAND="$CDO subtrend $IFILE ta tb $OFILE"
+
+echo "Running test: $NTEST"
+echo "$CDOCOMMAND"
+
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+
+$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+
+test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+
+let NTEST+=1
+rm -f $OFILE
+rm -f ta tb
+#
+rm -f $CDOOUT $CDOERR
+#
+exit 0
diff --git a/test/Genweights.test.in b/test/Genweights.test.in
new file mode 100644
index 0000000..6cb92f0
--- /dev/null
+++ b/test/Genweights.test.in
@@ -0,0 +1,60 @@
+#! @SHELL@
+echo 1..26 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+ABSLIM=0.001
+CDOOUT=cout
+CDOERR=cerr
+FORMAT="-f srv -b 32"
+GRIDS="n16 n32"
+#
+IFILE=$DATAPATH/bathy4.grb
+NTEST=1
+#
+for GRIDTYPE in "regular" "curvilinear" "unstructured"; do
+  SETGRID=""
+  if [ "$GRIDTYPE" != "regular" ]; then SETGRID="-setgridtype,$GRIDTYPE"; fi
+  for GRID in $GRIDS; do
+# remaplaf: sort could give different results"
+    RMODS="bil bic nn con ycon"
+    if [ "$GRIDTYPE" = "unstructured" ]; then RMODS="nn con ycon"; fi
+    for RMOD in $RMODS; do
+      RSTAT=0
+      OFILE=${GRID}_${RMOD}
+      RFILE=$DATAPATH/${OFILE}_ref
+
+      CDOTEST="gen${RMOD} $GRID $GRIDTYPE"
+      CDOCOMMAND="$CDO $FORMAT gen${RMOD},$GRID $SETGRID $IFILE remapweights"
+
+      if [ "@ENABLE_NETCDF@" = yes ] ; then
+        echo "Running test: $NTEST"
+        echo "$CDOCOMMAND"
+
+        $CDOCOMMAND
+        test $? -eq 0 || let RSTAT+=1
+
+        $CDO $FORMAT remap,$GRID,remapweights $SETGRID $IFILE ${OFILE}
+        test $? -eq 0 || let RSTAT+=1
+
+        $CDO diff,$ABSLIM $OFILE $RFILE > $CDOOUT 2> $CDOERR
+        test $? -eq 0 || let RSTAT+=1
+        test -s $CDOOUT && let RSTAT+=1
+        cat $CDOOUT $CDOERR
+
+        test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+        test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+      else
+        test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST # SKIP netCDF not enabled"
+      fi
+
+      let NTEST+=1
+      rm -f $OFILE
+    done
+  done
+done
+#
+rm -f $CDOOUT $CDOERR
+#
+exit 0
diff --git a/test/Gridarea.test.in b/test/Gridarea.test.in
new file mode 100644
index 0000000..5aab9b8
--- /dev/null
+++ b/test/Gridarea.test.in
@@ -0,0 +1,37 @@
+#! @SHELL@
+echo 1..7 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+CDOOUT=cout
+CDOERR=cerr
+REFVAL="12.5663706"
+GRIDS="global_5 global_2 global_1 global_.5 n32 n80 n160"
+RSTAT=0;
+PLANET_RADIUS=1
+export PLANET_RADIUS
+#
+NTEST=1
+#
+for GRID in $GRIDS; do
+  CDOTEST="gridarea $GRID"
+  CDOCOMMAND="$CDO outputf,%10.7f -fldsum -gridarea -random,$GRID"
+
+  echo "Running test: $NTEST"
+  echo "$CDOCOMMAND"
+
+  GLOBAREA=`$CDOCOMMAND`
+  echo "gridarea $GRID: >$GLOBAREA< >$REFVAL<"
+  if [ "$GLOBAREA" != "$REFVAL" ]; then RSTAT=`expr $RSTAT + 1`; fi
+
+  test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+  test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+
+  let NTEST+=1
+done
+#
+rm -f $CDOOUT $CDOERR
+unset PLANET_RADIUS
+#
+exit 0
diff --git a/test/Makefile.am b/test/Makefile.am
index 104f3eb..5d0637d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,12 +2,11 @@ CLEANFILES =
 
 export
 
-TESTS = $(top_srcdir)/test/test_Gridarea.sh \
-        $(top_srcdir)/test/test_Cat.sh \
-        $(top_srcdir)/test/test_Spectral.sh \
-        $(top_srcdir)/test/test_Timstat.sh \
-        $(top_srcdir)/test/test_Select.sh \
-        $(top_srcdir)/test/test_Vertint.sh
+TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+                  $(top_srcdir)/config/tap-driver.sh
+
+TESTS = Cat.test Gridarea.test Detrend.test Genweights.test Remap.test \
+        Select.test Spectral.test Timstat.test Vertint.test
 
 #        $(top_srcdir)/test/test_Remap.sh \
 #       $(top_srcdir)/test/test_info.py
@@ -17,21 +16,16 @@ TESTS = $(top_srcdir)/test/test_Gridarea.sh \
 #	$(top_srcdir)/test/test_Selvar.py
 #	$(top_srcdir)/test/test_intgridbil.py
 
-EXTRA_DIST = $(TESTS) $(top_srcdir)/test/testStreams.py
+#EXTRA_DIST = $(TESTS) $(top_srcdir)/test/testStreams.py
 
-CDO   = $(top_builddir)/src/cdo
+CDO        = $(top_builddir)/src/cdo
 
 DATAPATH   = $(top_srcdir)/test/data
 
 PYTHONPATH = $(top_srcdir)/contrib/python:$(top_srcdir)/test
 
-listTests:
-	@echo $(TESTS)
-
-test: $(TESTS)
-
-.PHONY: $(TESTS)
+#.PHONY: $(TESTS)
 
 CLEANFILES += `ls *.pyc`
 
-AUTOMAKE_OPTIONS = color-tests
+#AUTOMAKE_OPTIONS = color-tests
diff --git a/test/Makefile.in b/test/Makefile.in
index 7074e2f..f46b7fd 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,7 +78,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = test
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs $(srcdir)/Cat.test.in \
+	$(srcdir)/Gridarea.test.in $(srcdir)/Genweights.test.in \
+	$(srcdir)/Remap.test.in $(srcdir)/Select.test.in \
+	$(srcdir)/Spectral.test.in $(srcdir)/Timstat.test.in \
+	$(srcdir)/Vertint.test.in $(srcdir)/Detrend.test.in README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -62,8 +94,22 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = Cat.test Gridarea.test Genweights.test Remap.test \
+	Select.test Spectral.test Timstat.test Vertint.test \
+	Detrend.test
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -71,24 +117,213 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-# If stdout is a non-dumb tty, use colors.  If test -t is not supported,
-# then this fails; a conservative approach.  Of course do not redirect
-# stdout here, just stderr.
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=; \
-test "X$(AM_COLOR_TESTS)" != Xno \
-&& test "X$$TERM" != Xdumb \
-&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
-&& { \
-  red=''; \
-  grn=''; \
-  lgn=''; \
-  blu=''; \
-  std=''; \
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = { \
+  $(am__tty_colors_dummy); \
+  if test "X$(AM_COLOR_TESTS)" = Xno; then \
+    am__color_tests=no; \
+  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+    am__color_tests=yes; \
+  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+    am__color_tests=yes; \
+  fi; \
+  if test $$am__color_tests = yes; then \
+    red=''; \
+    grn=''; \
+    lgn=''; \
+    blu=''; \
+    mgn=''; \
+    brg=''; \
+    std=''; \
+  fi; \
 }
+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__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__recheck_rx = ^[ 	]*:recheck:[ 	]*
+am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
+am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+  recheck = 1; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        { \
+          if ((getline line2 < ($$0 ".log")) < 0) \
+	    recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+        { \
+          recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+        { \
+          break; \
+        } \
+    }; \
+  if (recheck) \
+    print $$0; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+  print "fatal: making $@: " msg | "cat >&2"; \
+  exit 1; \
+} \
+function rst_section(header) \
+{ \
+  print header; \
+  len = length(header); \
+  for (i = 1; i <= len; i = i + 1) \
+    printf "="; \
+  printf "\n\n"; \
+} \
+{ \
+  copy_in_global_log = 1; \
+  global_test_result = "RUN"; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+         fatal("failed to read from " $$0 ".trs"); \
+      if (line ~ /$(am__global_test_result_rx)/) \
+        { \
+          sub("$(am__global_test_result_rx)", "", line); \
+          sub("[ 	]*$$", "", line); \
+          global_test_result = line; \
+        } \
+      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+        copy_in_global_log = 0; \
+    }; \
+  if (copy_in_global_log) \
+    { \
+      rst_section(global_test_result ": " $$0); \
+      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+      { \
+        if (rc < 0) \
+          fatal("failed to read from " $$0 ".log"); \
+        print line; \
+      }; \
+      printf "\n"; \
+    }; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+  --color-tests "$$am__color_tests" \
+  --enable-hard-errors "$$am__enable_hard_errors" \
+  --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test.  Creates the
+# directory for the log if needed.  Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup);					\
+$(am__vpath_adj_setup) $(am__vpath_adj)			\
+$(am__tty_colors);					\
+srcdir=$(srcdir); export srcdir;			\
+case "$@" in						\
+  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
+    *) am__odir=.;; 					\
+esac;							\
+test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
+  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
+if test -f "./$$f"; then dir=./;			\
+elif test -f "$$f"; then dir=;				\
+else dir="$(srcdir)/"; fi;				\
+tst=$$dir$$f; log='$@'; 				\
+if test -n '$(DISABLE_HARD_ERRORS)'; then		\
+  am__enable_hard_errors=no; 				\
+else							\
+  am__enable_hard_errors=yes; 				\
+fi; 							\
+case " $(XFAIL_TESTS) " in				\
+  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
+    am__expect_failure=yes;;				\
+  *)							\
+    am__expect_failure=no;;				\
+esac; 							\
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed).  The result is saved in the shell variable
+# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+  bases='$(TEST_LOGS)'; \
+  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+  bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+	$(TEST_LOG_FLAGS)
+am__set_b = \
+  case '$@' in \
+    */*) \
+      case '$*' in \
+        */*) b='$*';; \
+          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+       esac;; \
+    *) \
+      b='$*';; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -124,6 +359,7 @@ ENABLE_DATA = @ENABLE_DATA@
 ENABLE_EXTRA = @ENABLE_EXTRA@
 ENABLE_GRIB = @ENABLE_GRIB@
 ENABLE_IEG = @ENABLE_IEG@
+ENABLE_NETCDF = @ENABLE_NETCDF@
 ENABLE_SERVICE = @ENABLE_SERVICE@
 EXEEXT = @EXEEXT@
 FCFLAGS = @FCFLAGS@
@@ -135,7 +371,6 @@ HDF5_INCLUDE = @HDF5_INCLUDE@
 HDF5_LIBS = @HDF5_LIBS@
 HDF5_ROOT = @HDF5_ROOT@
 HOST_NAME = @HOST_NAME@
-INCLUDES = @INCLUDES@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -155,6 +390,7 @@ MAGICS_LIBS = @MAGICS_LIBS@
 MAGICS_ROOT = @MAGICS_ROOT@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NC_CONFIG = @NC_CONFIG@
 NETCDF_INCLUDE = @NETCDF_INCLUDE@
@@ -164,6 +400,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -200,6 +437,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
@@ -250,13 +488,14 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+
+#.PHONY: $(TESTS)
 CLEANFILES = `ls *.pyc`
-TESTS = $(top_srcdir)/test/test_Gridarea.sh \
-        $(top_srcdir)/test/test_Cat.sh \
-        $(top_srcdir)/test/test_Spectral.sh \
-        $(top_srcdir)/test/test_Timstat.sh \
-        $(top_srcdir)/test/test_Select.sh \
-        $(top_srcdir)/test/test_Vertint.sh
+TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+                  $(top_srcdir)/config/tap-driver.sh
+
+TESTS = Cat.test Gridarea.test Detrend.test Genweights.test Remap.test \
+        Select.test Spectral.test Timstat.test Vertint.test
 
 
 #        $(top_srcdir)/test/test_Remap.sh \
@@ -266,14 +505,15 @@ TESTS = $(top_srcdir)/test/test_Gridarea.sh \
 #	$(top_srcdir)/test/test_Arithc.py
 #	$(top_srcdir)/test/test_Selvar.py
 #	$(top_srcdir)/test/test_intgridbil.py
-EXTRA_DIST = $(TESTS) $(top_srcdir)/test/testStreams.py
+
+#EXTRA_DIST = $(TESTS) $(top_srcdir)/test/testStreams.py
 CDO = $(top_builddir)/src/cdo
 DATAPATH = $(top_srcdir)/test/data
 PYTHONPATH = $(top_srcdir)/contrib/python:$(top_srcdir)/test
-AUTOMAKE_OPTIONS = color-tests
 all: all-am
 
 .SUFFIXES:
+.SUFFIXES: .log .test .test$(EXEEXT) .trs
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -283,9 +523,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu test/Makefile
+	  $(AUTOMAKE) --foreign test/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -304,111 +544,192 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+Cat.test: $(top_builddir)/config.status $(srcdir)/Cat.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Gridarea.test: $(top_builddir)/config.status $(srcdir)/Gridarea.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Genweights.test: $(top_builddir)/config.status $(srcdir)/Genweights.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Remap.test: $(top_builddir)/config.status $(srcdir)/Remap.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Select.test: $(top_builddir)/config.status $(srcdir)/Select.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Spectral.test: $(top_builddir)/config.status $(srcdir)/Spectral.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Timstat.test: $(top_builddir)/config.status $(srcdir)/Timstat.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Vertint.test: $(top_builddir)/config.status $(srcdir)/Vertint.test.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.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:
-
-
-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 "; \
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+	rm -f $< $@
+	$(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+	@:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+	@$(am__set_TESTS_bases); \
+	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+	redo_bases=`for i in $$bases; do \
+	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+	            done`; \
+	if test -n "$$redo_bases"; then \
+	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+	  if $(am__make_dryrun); then :; else \
+	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
 	  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"; \
+	fi; \
+	if test -n "$$am__remaking_logs"; then \
+	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+	       "recursion detected" >&2; \
+	else \
+	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+	fi; \
+	if $(am__make_dryrun); then :; else \
+	  st=0;  \
+	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+	  for i in $$redo_bases; do \
+	    test -f $$i.trs && test -r $$i.trs \
+	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+	    test -f $$i.log && test -r $$i.log \
+	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+	  done; \
+	  test $$st -eq 0 || exit 1; \
+	fi
+	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+	ws='[ 	]'; \
+	results=`for b in $$bases; do echo $$b.trs; done`; \
+	test -n "$$results" || results=/dev/null; \
+	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
+	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
+	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
+	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
+	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+	  success=true; \
+	else \
+	  success=false; \
+	fi; \
+	br='==================='; br=$$br$$br$$br$$br; \
+	result_count () \
+	{ \
+	    if test x"$$1" = x"--maybe-color"; then \
+	      maybe_colorize=yes; \
+	    elif test x"$$1" = x"--no-color"; then \
+	      maybe_colorize=no; \
 	    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)"; \
+	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
 	    fi; \
-	  fi; \
-	  dashes="$$banner"; \
-	  skipped=""; \
-	  if test "$$skip" -ne 0; then \
-	    if test "$$skip" -eq 1; then \
-	      skipped="($$skip test was not run)"; \
+	    shift; \
+	    desc=$$1 count=$$2; \
+	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
+	      color_start=$$3 color_end=$$std; \
 	    else \
-	      skipped="($$skip tests were not run)"; \
+	      color_start= color_end=; \
 	    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 \
-	    col="$$grn"; \
-	  else \
-	    col="$$red"; \
-	  fi; \
-	  echo "$${col}$$dashes$${std}"; \
-	  echo "$${col}$$banner$${std}"; \
-	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
-	  test -z "$$report" || echo "$${col}$$report$${std}"; \
-	  echo "$${col}$$dashes$${std}"; \
-	  test "$$failed" -eq 0; \
-	else :; fi
+	    echo "$${color_start}# $$desc $$count$${color_end}"; \
+	}; \
+	create_testsuite_report () \
+	{ \
+	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
+	  result_count $$1 "PASS: " $$pass  "$$grn"; \
+	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
+	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+	  result_count $$1 "FAIL: " $$fail  "$$red"; \
+	  result_count $$1 "XPASS:" $$xpass "$$red"; \
+	  result_count $$1 "ERROR:" $$error "$$mgn"; \
+	}; \
+	{								\
+	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
+	    $(am__rst_title);						\
+	  create_testsuite_report --no-color;				\
+	  echo;								\
+	  echo ".. contents:: :depth: 2";				\
+	  echo;								\
+	  for b in $$bases; do echo $$b; done				\
+	    | $(am__create_global_log);					\
+	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
+	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
+	if $$success; then						\
+	  col="$$grn";							\
+	 else								\
+	  col="$$red";							\
+	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
+	fi;								\
+	echo "$${col}$$br$${std}"; 					\
+	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
+	echo "$${col}$$br$${std}"; 					\
+	create_testsuite_report --maybe-color;				\
+	echo "$$col$$br$$std";						\
+	if $$success; then :; else					\
+	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
+	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
+	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
+	  fi;								\
+	  echo "$$col$$br$$std";					\
+	fi;								\
+	$$success || exit 1
+
+check-TESTS:
+	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	@set +e; $(am__set_TESTS_bases); \
+	log_list=`for i in $$bases; do echo $$i.log; done`; \
+	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+	exit $$?;
+recheck: all 
+	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	@set +e; $(am__set_TESTS_bases); \
+	bases=`for i in $$bases; do echo $$i; done \
+	         | $(am__list_recheck_tests)` || exit 1; \
+	log_list=`for i in $$bases; do echo $$i.log; done`; \
+	log_list=`echo $$log_list`; \
+	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+	        am__force_recheck=am--force-recheck \
+	        TEST_LOGS="$$log_list"; \
+	exit $$?
+.test.log:
+	@p='$<'; \
+	$(am__set_b); \
+	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ at am__EXEEXT_TRUE@.test$(EXEEXT).log:
+ at am__EXEEXT_TRUE@	@p='$<'; \
+ at am__EXEEXT_TRUE@	$(am__set_b); \
+ at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
+ at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -465,6 +786,9 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
+	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -545,26 +869,22 @@ 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 \
+	clean-libtool cscopelist-am ctags-am 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 recheck tags-am \
 	uninstall uninstall-am
 
 
 export
 
-listTests:
-	@echo $(TESTS)
-
-test: $(TESTS)
-
-.PHONY: $(TESTS)
+#AUTOMAKE_OPTIONS = color-tests
 
 # 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.
diff --git a/test/Remap.test.in b/test/Remap.test.in
new file mode 100644
index 0000000..7293adb
--- /dev/null
+++ b/test/Remap.test.in
@@ -0,0 +1,53 @@
+#! @SHELL@
+echo 1..26 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+ABSLIM=0.001
+CDOOUT=cout
+CDOERR=cerr
+FORMAT="-f srv -b 32"
+GRIDS="n16 n32"
+#
+IFILE=$DATAPATH/bathy4.grb
+NTEST=1
+#
+for GRIDTYPE in "regular" "curvilinear" "unstructured"; do
+  SETGRID=""
+  if [ "$GRIDTYPE" != "regular" ]; then SETGRID="-setgridtype,$GRIDTYPE"; fi
+  for GRID in $GRIDS; do
+# remaplaf: sort could give different results"
+    RMODS="bil bic nn con ycon"
+    if [ "$GRIDTYPE" = "unstructured" ]; then RMODS="nn con ycon"; fi
+    for RMOD in $RMODS; do
+      RSTAT=0
+      OFILE=${GRID}_${RMOD}
+      RFILE=$DATAPATH/${OFILE}_ref
+
+      CDOTEST="remap${RMOD} $GRID $GRIDTYPE"
+      CDOCOMMAND="$CDO $FORMAT remap${RMOD},$GRID $SETGRID $IFILE ${OFILE}"
+
+      echo "Running test: $NTEST"
+      echo "$CDOCOMMAND"
+
+      $CDOCOMMAND
+      test $? -eq 0 || let RSTAT+=1
+
+      $CDO diff,$ABSLIM $OFILE $RFILE > $CDOOUT 2> $CDOERR
+      test $? -eq 0 || let RSTAT+=1
+      test -s $CDOOUT && let RSTAT+=1
+      cat $CDOOUT $CDOERR
+
+      test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+      test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+
+      let NTEST+=1
+      rm -f $OFILE
+    done
+  done
+done
+#
+rm -f $CDOOUT $CDOERR
+#
+exit 0
diff --git a/test/Select.test.in b/test/Select.test.in
new file mode 100644
index 0000000..1adce78
--- /dev/null
+++ b/test/Select.test.in
@@ -0,0 +1,53 @@
+#! @SHELL@
+echo 1..8 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+CDOOUT=cout
+CDOERR=cerr
+FORMAT="-f srv -b 32"
+RSTAT=0;
+#
+IFILE=$DATAPATH/pl_data.grb
+#
+NTEST=1
+#
+for OPERATOR in select delete; do
+if [ "$OPERATOR" = "select" ] ; then
+  SELARGS='code=130,152 code=130,152,level=9000,90 code=130,152,level=9000,90,timestep=2,3,5 code=130 level=90000'
+else
+  SELARGS='code=129 code=129,130,level=90000,900 code=129,130,level=90000,900,timestep=1,4'
+fi
+TNUM=0
+for SELECT in $SELARGS; do
+  let TNUM+=1
+
+  RFILE=$DATAPATH/select${TNUM}_ref
+  OFILE=${OPERATOR}${TNUM}_res
+
+  CDOTEST="${OPERATOR}"
+  CDOCOMMAND="$CDO ${OPERATOR},${SELECT} $IFILE $OFILE"
+
+  echo "Running test: $NTEST"
+  #echo "$CDOCOMMAND"
+
+  $CDOCOMMAND
+  test $? -eq 0 || let RSTAT+=1
+
+  $CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+  test $? -eq 0 || let RSTAT+=1
+  test -s $CDOOUT && let RSTAT+=1
+  cat $CDOOUT $CDOERR
+
+  test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+  test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+
+  let NTEST+=1
+  rm -f $OFILE
+done
+done
+#
+rm -f $CDOOUT $CDOERR
+#
+exit 0
diff --git a/test/Spectral.test.in b/test/Spectral.test.in
new file mode 100644
index 0000000..9220e7e
--- /dev/null
+++ b/test/Spectral.test.in
@@ -0,0 +1,99 @@
+#! @SHELL@
+echo 1..4 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+CDOOUT=cout
+CDOERR=cerr
+FORMAT=""
+NTEST=1
+#####################################################
+IFILE=$DATAPATH/t21_geosp_tsurf.grb
+RFILE=$DATAPATH/gp2sp_ref
+OFILE=gp2sp_res
+#
+RSTAT=0
+CDOTEST="gp2sp"
+CDOCOMMAND="$CDO $FORMAT gp2sp $IFILE $OFILE"
+echo "$CDOCOMMAND"
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+#
+# result of cgribex and GRIBAPI differ for complexed packed spectral data
+$CDO diff,.008 $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+#
+test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+#
+let NTEST+=1
+rm -f $OFILE
+######################################################
+IFILE=$DATAPATH/gp2sp_ref
+RFILE=$DATAPATH/sp2gp_ref
+OFILE=sp2gp_res
+#
+RSTAT=0
+CDOTEST="sp2gp"
+CDOCOMMAND="$CDO $FORMAT sp2gp $IFILE $OFILE"
+echo "$CDOCOMMAND"
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+#
+$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+#
+test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+#
+let NTEST+=1
+rm -f $OFILE
+######################################################
+IFILE=$DATAPATH/t21_geosp_tsurf.grb
+RFILE=$DATAPATH/gp2spl_ref
+OFILE=gp2spl_res
+RSTAT=0
+CDOTEST="gp2spl"
+CDOCOMMAND="$CDO $FORMAT gp2spl $IFILE $OFILE"
+echo "$CDOCOMMAND"
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+#
+$CDO diff,.008 $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+#
+test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+#
+let NTEST+=1
+rm -f $OFILE
+######################################################
+IFILE=$DATAPATH/gp2spl_ref
+RFILE=$DATAPATH/sp2gpl_ref
+OFILE=sp2gpl_res
+RSTAT=0
+CDOTEST="sp2gpl"
+CDOCOMMAND="$CDO $FORMAT sp2gpl $IFILE $OFILE"
+echo "$CDOCOMMAND"
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+#
+$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+#
+test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+#
+let NTEST+=1
+rm -f $OFILE
+#
+exit 0
diff --git a/test/Timstat.test.in b/test/Timstat.test.in
new file mode 100644
index 0000000..03c3317
--- /dev/null
+++ b/test/Timstat.test.in
@@ -0,0 +1,42 @@
+#! @SHELL@
+echo 1..9 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+CDOOUT=cout
+CDOERR=cerr
+STATS="min max sum avg mean std std1 var var1"
+#
+IFILE=$DATAPATH/ts_mm_5years
+NTEST=1
+#
+for STAT in $STATS; do
+  RSTAT=0
+  RFILE=$DATAPATH/tim${STAT}_ref
+  OFILE=tim${STAT}_res
+
+  CDOTEST="tim$STAT"
+  CDOCOMMAND="$CDO tim${STAT} $IFILE $OFILE"
+
+  echo "Running test: $NTEST"
+  echo "$CDOCOMMAND"
+
+  $CDOCOMMAND
+  test $? -eq 0 || let RSTAT+=1
+
+  $CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+  test $? -eq 0 || let RSTAT+=1
+  test -s $CDOOUT && let RSTAT+=1
+  cat $CDOOUT $CDOERR
+
+  test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+  test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+
+  let NTEST+=1
+  rm -f $OFILE
+done
+#
+rm -f $CDOOUT $CDOERR
+#
+exit 0
diff --git a/test/Vertint.test.in b/test/Vertint.test.in
new file mode 100644
index 0000000..d03ea63
--- /dev/null
+++ b/test/Vertint.test.in
@@ -0,0 +1,37 @@
+#! @SHELL@
+echo 1..1 # Number of tests to be executed.
+#
+test -n "$CDO"      || CDO=cdo
+test -n "$DATAPATH" || DATAPATH=./data
+#
+CDOOUT=cout
+CDOERR=cerr
+FORMAT="-f srv -b 32"
+RSTAT=0
+#
+IFILE=$DATAPATH/hl_l19.grb
+#
+RFILE=$DATAPATH/ml2pl_ref
+OFILE=ml2pl_res
+#
+CDOTEST="ml2pl"
+CDOCOMMAND="$CDO $FORMAT ml2pl,92500,85000,50000,20000 $IFILE $OFILE"
+#
+echo "$CDOCOMMAND"
+#
+$CDOCOMMAND
+test $? -eq 0 || let RSTAT+=1
+#
+$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
+test $? -eq 0 || let RSTAT+=1
+test -s $CDOOUT && let RSTAT+=1
+cat $CDOOUT $CDOERR
+#
+test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
+test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
+#
+rm -f $OFILE
+#
+rm -f $CDOOUT $CDOERR
+#
+exit 0
diff --git a/test/data/Makefile.am b/test/data/Makefile.am
index 80ada6c..f539c06 100644
--- a/test/data/Makefile.am
+++ b/test/data/Makefile.am
@@ -1,9 +1,11 @@
-INPUTDATA = ts_mm_5years hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data.grb
+INPUTDATA = ts_mm_5years hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data.grb detrend_data
 
 TIMSTAT_REF  = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
 SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
 VERTINT_REF  = ml2pl_ref
-REMAP_REF    = n16_bic_ref n16_bil_ref n16_con_ref n16_laf_ref n16_nn_ref  n32_bic_ref n32_bil_ref n32_con_ref n32_laf_ref n32_nn_ref
+REMAP_REF    = n16_bic_ref n16_bil_ref n16_con_ref n16_ycon_ref n16_laf_ref n16_nn_ref \
+               n32_bic_ref n32_bil_ref n32_con_ref n32_ycon_ref n32_laf_ref n32_nn_ref
 SELECT_REF   = select1_ref select2_ref select3_ref select4_ref select5_ref
+DETREND_REF  = detrend_ref
 
-EXTRA_DIST = $(INPUTDATA) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF)
+EXTRA_DIST = $(INPUTDATA) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF)
diff --git a/test/data/Makefile.in b/test/data/Makefile.in
index deff0ee..c8b7f36 100644
--- a/test/data/Makefile.in
+++ b/test/data/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 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.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,7 +78,8 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = test/data
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/config/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -64,6 +92,18 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -71,9 +111,12 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
@@ -109,6 +152,7 @@ ENABLE_DATA = @ENABLE_DATA@
 ENABLE_EXTRA = @ENABLE_EXTRA@
 ENABLE_GRIB = @ENABLE_GRIB@
 ENABLE_IEG = @ENABLE_IEG@
+ENABLE_NETCDF = @ENABLE_NETCDF@
 ENABLE_SERVICE = @ENABLE_SERVICE@
 EXEEXT = @EXEEXT@
 FCFLAGS = @FCFLAGS@
@@ -120,7 +164,6 @@ HDF5_INCLUDE = @HDF5_INCLUDE@
 HDF5_LIBS = @HDF5_LIBS@
 HDF5_ROOT = @HDF5_ROOT@
 HOST_NAME = @HOST_NAME@
-INCLUDES = @INCLUDES@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -140,6 +183,7 @@ MAGICS_LIBS = @MAGICS_LIBS@
 MAGICS_ROOT = @MAGICS_ROOT@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NC_CONFIG = @NC_CONFIG@
 NETCDF_INCLUDE = @NETCDF_INCLUDE@
@@ -149,6 +193,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -185,6 +230,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
@@ -235,13 +281,16 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-INPUTDATA = ts_mm_5years hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data.grb
+INPUTDATA = ts_mm_5years hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data.grb detrend_data
 TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
 SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
 VERTINT_REF = ml2pl_ref
-REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_laf_ref n16_nn_ref  n32_bic_ref n32_bil_ref n32_con_ref n32_laf_ref n32_nn_ref
+REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_ycon_ref n16_laf_ref n16_nn_ref \
+               n32_bic_ref n32_bil_ref n32_con_ref n32_ycon_ref n32_laf_ref n32_nn_ref
+
 SELECT_REF = select1_ref select2_ref select3_ref select4_ref select5_ref
-EXTRA_DIST = $(INPUTDATA) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF)
+DETREND_REF = detrend_ref
+EXTRA_DIST = $(INPUTDATA) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF)
 all: all-am
 
 .SUFFIXES:
@@ -254,9 +303,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/data/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/data/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu test/data/Makefile
+	  $(AUTOMAKE) --foreign test/data/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -281,11 +330,11 @@ mostlyclean-libtool:
 
 clean-libtool:
 	-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -421,15 +470,16 @@ 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
+	cscopelist-am ctags-am 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 \
+	tags-am uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/test/data/detrend_data b/test/data/detrend_data
new file mode 100644
index 0000000..66895fa
Binary files /dev/null and b/test/data/detrend_data differ
diff --git a/test/data/detrend_ref b/test/data/detrend_ref
new file mode 100644
index 0000000..1193340
Binary files /dev/null and b/test/data/detrend_ref differ
diff --git a/test/data/n16_ycon_ref b/test/data/n16_ycon_ref
new file mode 100644
index 0000000..98e1b6a
Binary files /dev/null and b/test/data/n16_ycon_ref differ
diff --git a/test/data/n32_ycon_ref b/test/data/n32_ycon_ref
new file mode 100644
index 0000000..40ae198
Binary files /dev/null and b/test/data/n32_ycon_ref differ
diff --git a/test/testStreams.py b/test/testStreams.py
deleted file mode 100644
index 9a85472..0000000
--- a/test/testStreams.py
+++ /dev/null
@@ -1,46 +0,0 @@
-from cdo import *
-def createInputFiles(nfiles,resolution,cdo,cdoOptions):
-  timeDefaults  = '-settunits,days -settaxis,20010101,12:00:00'
-  randomEnlarge = lambda  resolution: '-mul -random,'+resolution+' -enlarge,'+resolution
-  fileList      = {}
-  cdo.debug     = False
-
-  FileKeys = ['1d','2d','3d','1d_withTime','2d_withTime','3d_withTime']
-  for i,key in enumerate(FileKeys):
-    fileList[key] = []
-    if '1d' == key:
-      # vertical levels only
-      for j in xrange(0,nfiles):
-        fileList[key].append(cdo.stdatm(0,10,20,50, options = cdoOptions))
-
-    elif '2d' == key:
-      for j in xrange(0,nfiles):
-	fileList[key].append(cdo.setcode(130,input = "-setname,'T' -random,"+resolution, options = cdoOptions))
-
-    elif '3d' == key:
-      for j in xrange(0,nfiles):
-	fileList[key].append(cdo.enlarge(resolution, input = '-stdatm,0,10,20,50', options = cdoOptions))
-
-    elif '1d_withTime' == key:
-      # temporal axis only
-      for j in xrange(0,nfiles):
-	fileList[key].append(cdo.setcode(130,input = cdo.setname('T',input = timeDefaults+' -for,1,400', options = cdoOptions)))
-
-    elif '2d_withTime' == key:
-      for j in xrange(0,nfiles):
-	fileList[key].append(cdo.setcode(130,input = cdo.setname('T',input = randomEnlarge(resolution) +' ' +timeDefaults+ ' -for,1,400', options = cdoOptions)))
-
-    elif '3d_withTime' == key:
-      for j in xrange(0,nfiles):
-	fileList[key].append(cdo.enlarge(resolution, input = '-mul '+timeDefaults+ ' -stdatm,0,10,20 -for,1,400', options = cdoOptions))
-
-  return fileList
-
-
-if __name__ == '__main__':
-  cdo = Cdo()
-  a = createInputFiles(5,'r36x18',cdo,'-f nc')
-  for i,value in enumerate(a):
-    files = a[value]
-    for f in files:
-      print(' '.join([value,f,os.path.exists(f).__str__()]))
diff --git a/test/test_Cat.sh b/test/test_Cat.sh
deleted file mode 100755
index 66ea80a..0000000
--- a/test/test_Cat.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-#
-#CDO=cdo
-#DATAPATH=data
-#
-CDODEBUG=0
-#
-if [ "$CDO_TEST_DEBUG" = 1 ]; then CDODEBUG=1; fi
-#
-if [ "$CDODEBUG" = 0 ]; then CDO="$CDO -s"; fi
-CDOOUT=cout
-CDOERR=cerr
-FORMAT="-f srv -b 32"
-RSTAT=0;
-#
-IFILE=$DATAPATH/t21_geosp_tsurf.grb
-#
-RFILE=catdata_ref
-OFILE=catdata
-#
-cp $IFILE ${RFILE}
-chmod u+w ${RFILE}
-cat $IFILE >> ${RFILE}
-#
-rm -f ${OFILE}
-$CDO cat $IFILE ${OFILE}
-$CDO cat $IFILE ${OFILE}
-#
-$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ -s $CDOERR ] ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-rm -f $OFILE $RFILE
-#
-rm -f $CDOOUT $CDOERR
-#
-if [ "$CDODEBUG" = 1 ]; then
-  echo "rstat: $RSTAT"
-fi
-#
-exit $RSTAT
diff --git a/test/test_Gridarea.sh b/test/test_Gridarea.sh
deleted file mode 100755
index 8f06177..0000000
--- a/test/test_Gridarea.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-CDODEBUG=0
-#
-if [ "$CDODEBUG" = 0 ]; then CDO="$CDO -s"; fi
-CDOOUT=cout
-CDOERR=cerr
-REFVAL="12.5663706"
-GRIDS="global_5 global_2 global_1 global_.5 n32 n80 n160"
-RSTAT=0;
-PLANET_RADIUS=1
-export PLANET_RADIUS
-#
-for GRID in $GRIDS; do
-  GLOBAREA=`$CDO outputf,%10.7f -fldsum -gridarea -random,$GRID`
-#  echo "$GRID: >$GLOBAREA< >$REFVAL<"
-  if [ "$GLOBAREA" != "$REFVAL" ]; then RSTAT=`expr $RSTAT + 1`; fi
-done
-#
-rm -f $CDOOUT $CDOERR
-unset PLANET_RADIUS
-#
-if [ "$CDODEBUG" = 1 ]; then
-  echo "rstat: $RSTAT"
-fi
-#
-exit $RSTAT
diff --git a/test/test_Select.sh b/test/test_Select.sh
deleted file mode 100755
index f31e866..0000000
--- a/test/test_Select.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-#
-CDODEBUG=0
-#
-if [ "$CDODEBUG" = 0 ]; then CDO="$CDO -s"; fi
-CDOOUT=cout
-CDOERR=cerr
-FORMAT="-f srv -b 32"
-RSTAT=0;
-#
-IFILE=$DATAPATH/pl_data.grb
-#
-TNUM=0
-#
-for SELECT in "code=130,152" "code=130,152,level=9000,90" "code=130,152,level=9000,90,timestep=2,3,5" "code=130" "level=90000"; do
-  TNUM=`expr $TNUM + 1`
-
-  RFILE=$DATAPATH/select${TNUM}_ref
-  OFILE=select${TNUM}_res
-  $CDO select,${SELECT} $IFILE $OFILE > $CDOOUT 2> $CDOERR
-  if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-  $CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-  if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-  rm -f $OFILE
-#
-  rm -f $CDOOUT $CDOERR
-done
-#
-TNUM=0
-#
-for DELETE in "code=129" "code=129,130,level=90000,900" "code=129,130,level=90000,900,timestep=1,4"; do
-  TNUM=`expr $TNUM + 1`
-
-  RFILE=$DATAPATH/select${TNUM}_ref
-  OFILE=delete${TNUM}_res
-  $CDO delete,${DELETE} $IFILE $OFILE > $CDOOUT 2> $CDOERR
-  if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-  $CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-  if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-  rm -f $OFILE
-#
-  rm -f $CDOOUT $CDOERR
-done
-#
-if [ "$CDODEBUG" = 1 ]; then
-  echo "rstat: $RSTAT"
-fi
-#
-exit $RSTAT
diff --git a/test/test_Spectral.sh b/test/test_Spectral.sh
deleted file mode 100755
index 29d3fc3..0000000
--- a/test/test_Spectral.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-#
-CDODEBUG=0
-#
-if [ "$CDODEBUG" = 0 ]; then CDO="$CDO -s"; fi
-CDOOUT=cout
-CDOERR=cerr
-FORMAT=""
-RSTAT=0;
-#
-IFILE=$DATAPATH/t21_geosp_tsurf.grb
-RFILE=$DATAPATH/gp2sp_ref
-OFILE=gp2sp_res
-$CDO $FORMAT gp2sp $IFILE $OFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-rm -f $OFILE
-#
-IFILE=$DATAPATH/gp2sp_ref
-RFILE=$DATAPATH/sp2gp_ref
-OFILE=sp2gp_res
-$CDO $FORMAT sp2gp $IFILE $OFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-rm -f $OFILE
-#
-IFILE=$DATAPATH/t21_geosp_tsurf.grb
-RFILE=$DATAPATH/gp2spl_ref
-OFILE=gp2spl_res
-$CDO $FORMAT gp2spl $IFILE $OFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-rm -f $OFILE
-#
-IFILE=$DATAPATH/gp2spl_ref
-RFILE=$DATAPATH/sp2gpl_ref
-OFILE=sp2gpl_res
-$CDO $FORMAT sp2gpl $IFILE $OFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-rm -f $OFILE
-#
-rm -f $CDOOUT $CDOERR
-#
-if [ "$CDODEBUG" = 1 ]; then
-  echo "rstat: $RSTAT"
-fi
-#
-exit $RSTAT
diff --git a/test/test_Timstat.sh b/test/test_Timstat.sh
deleted file mode 100755
index c85dbd5..0000000
--- a/test/test_Timstat.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-CDODEBUG=0
-#
-if [ "$CDODEBUG" = 0 ]; then CDO="$CDO -s"; fi
-CDOOUT=cout
-CDOERR=cerr
-STATS="min max sum avg mean std std1 var var1"
-RSTAT=0;
-#
-IFILE=$DATAPATH/ts_mm_5years
-#
-for STAT in $STATS; do
-  RFILE=$DATAPATH/tim${STAT}_ref
-  OFILE=tim${STAT}_res
-  $CDO tim${STAT} $IFILE $OFILE > $CDOOUT 2> $CDOERR
-  if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-  $CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-  if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-  if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-  rm -f $OFILE
-done
-#
-rm -f $CDOOUT $CDOERR
-#
-if [ "$CDODEBUG" = 1 ]; then
-  echo "rstat: $RSTAT"
-fi
-#
-exit $RSTAT
diff --git a/test/test_Vertint.sh b/test/test_Vertint.sh
deleted file mode 100755
index 3c9e63e..0000000
--- a/test/test_Vertint.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-CDODEBUG=0
-#
-if [ "$CDODEBUG" = 0 ]; then CDO="$CDO -s"; fi
-CDOOUT=cout
-CDOERR=cerr
-FORMAT="-f srv -b 32"
-RSTAT=0;
-#
-IFILE=$DATAPATH/hl_l19.grb
-#
-RFILE=$DATAPATH/ml2pl_ref
-OFILE=ml2pl_res
-$CDO $FORMAT ml2pl,92500,85000,50000,20000 $IFILE $OFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
-if [ $? != 0 ]    ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
-if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
-rm -f $OFILE
-#
-rm -f $CDOOUT $CDOERR
-#
-if [ "$CDODEBUG" = 1 ]; then
-  echo "rstat: $RSTAT"
-fi
-#
-exit $RSTAT

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



More information about the debian-science-commits mailing list