[nco] 01/06: Imported Upstream version 4.6.2

Bas Couwenberg sebastic at debian.org
Wed Nov 16 18:36:42 UTC 2016


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

sebastic pushed a commit to branch master
in repository nco.

commit da99c5ced8f110a7195e03aa511b28b1239ca50c
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Nov 16 19:05:38 2016 +0100

    Imported Upstream version 4.6.2
---
 bld/Makefile                               |   17 +-
 bld/nco.spec                               |   11 +-
 bld/nco_dst.pl                             |   30 +-
 bm/NCO_rgr.pm                              |   80 +-
 config.h.in                                |    6 +
 configure                                  |   41 +-
 configure.ac                               |    9 +-
 configure.eg                               |    6 +-
 data/bsc_tst.nco                           |    2 +-
 data/in.cdl                                |   14 +
 data/in_4.cdl                              |   15 +-
 data/in_grp.cdl                            |    4 +-
 data/ncap.in                               |    2 +-
 data/ncclimo                               |   36 +-
 data/ncremap                               |   47 +-
 debian/changelog                           |    6 +
 doc/ANNOUNCE                               |  164 ++--
 doc/ChangeLog                              |  235 ++++-
 doc/MANIFEST                               |    2 +
 doc/README_msvc.txt                        |    2 +-
 doc/TODO                                   |   10 +-
 doc/VERSION                                |    2 +-
 doc/debian.txt                             |  162 ++--
 doc/index.shtml                            |   83 +-
 doc/nco.texi                               | 1236 ++++++++++++++++++++++-----
 doc/nco_qt_msvc.shtml                      |    2 +-
 man/ncclimo.1                              |   10 +-
 man/ncflint.1                              |    2 +-
 man/ncremap.1                              |    8 +-
 qt/libnco/libnco.pro                       |    6 +-
 qt/libnco/libnco.vcxproj                   |   83 +-
 qt/libnco/libnco.vcxproj.filters           |  295 +++++++
 qt/libnco_c++/libnco_c++.vcxproj           |   81 +-
 qt/libnco_c++/libnco_c++.vcxproj.filters   |   64 ++
 qt/ncap2/ncap2.vcxproj                     |   91 +-
 qt/ncap2/ncap2.vcxproj.filters             |  127 +++
 qt/ncatted/ncatted.vcxproj                 |   91 +-
 qt/ncatted/ncatted.vcxproj.filters         |   18 +
 qt/ncbo/ncbo.vcxproj                       |   91 +-
 qt/ncbo/ncbo.vcxproj.filters               |   18 +
 qt/ncea/ncea.vcxproj                       |   91 +-
 qt/ncea/ncea.vcxproj.filters               |   18 +
 qt/ncecat/ncecat.vcxproj                   |   91 +-
 qt/ncecat/ncecat.vcxproj.filters           |   18 +
 qt/ncflint/ncflint.vcxproj                 |   91 +-
 qt/ncflint/ncflint.vcxproj.filters         |   18 +
 qt/ncks/ncks.vcxproj                       |   91 +-
 qt/ncks/ncks.vcxproj.filters               |   18 +
 qt/nco.pri                                 |    4 +
 qt/nco.sln                                 |   10 +-
 qt/ncpdq/ncpdq.vcxproj                     |   91 +-
 qt/ncpdq/ncpdq.vcxproj.filters             |   18 +
 qt/ncra/ncra.vcxproj                       |   91 +-
 qt/ncra/ncra.vcxproj.filters               |   18 +
 qt/ncrcat/ncrcat.vcxproj                   |   91 +-
 qt/ncrcat/ncrcat.vcxproj.filters           |   18 +
 qt/ncrename/ncrename.vcxproj               |   91 +-
 qt/ncrename/ncrename.vcxproj.filters       |   18 +
 qt/ncwa/ncwa.vcxproj                       |   91 +-
 qt/ncwa/ncwa.vcxproj.filters               |   18 +
 qt/tst_nco_c++/tst_nco_c++.vcxproj         |   91 +-
 qt/tst_nco_c++/tst_nco_c++.vcxproj.filters |   18 +
 src/nco++/fmc_all_cls.cc                   |    4 +-
 src/nco++/fmc_gsl_cls.cc                   |    2 +-
 src/nco++/ncap2_utl.cc                     |   37 +
 src/nco++/ncap2_utl.hh                     |    4 +
 src/nco++/ncoGrammer.g                     |  195 ++++-
 src/nco++/ncoLexer.cpp                     |  100 ++-
 src/nco++/ncoLexer.hpp                     |   19 +-
 src/nco++/ncoParser.cpp                    |    2 +-
 src/nco++/ncoParser.hpp                    |    2 +-
 src/nco++/ncoParserTokenTypes.hpp          |    2 +-
 src/nco++/ncoTree.cpp                      |  536 ++++++++----
 src/nco++/ncoTree.hpp                      |    8 +-
 src/nco/Makefile.am                        |    2 +
 src/nco/Makefile.in                        |   43 +-
 src/nco/libnco.h                           |    1 +
 src/nco/ncks.c                             |   40 +-
 src/nco/nco.h                              |   25 +-
 src/nco/nco_att_utl.c                      |   59 +-
 src/nco/nco_att_utl.h                      |    1 +
 src/nco/nco_aux.c                          |    7 +-
 src/nco/nco_cnv_csm.c                      |    2 +-
 src/nco/nco_ctl.c                          |   14 +-
 src/nco/nco_dmn_utl.c                      |    1 +
 src/nco/nco_grp_utl.c                      |  299 +++----
 src/nco/nco_lst_utl.c                      |    7 +-
 src/nco/nco_mmr.c                          |    3 +-
 src/nco/nco_msa.c                          |   87 +-
 src/nco/nco_mta.c                          |  253 ++++++
 src/nco/nco_mta.h                          |   83 ++
 src/nco/nco_netcdf.c                       |   37 +
 src/nco/nco_netcdf.h                       |    8 +-
 src/nco/nco_omp.c                          |    2 +-
 src/nco/nco_ppc.c                          |   66 +-
 src/nco/nco_ppc.h                          |    1 +
 src/nco/nco_prn.c                          | 1281 ++++++++++++++++++++++++++--
 src/nco/nco_prn.h                          |   24 +
 src/nco/nco_rgr.c                          |  287 +++++--
 src/nco/nco_rgr.h                          |    7 +-
 src/nco/nco_sld.c                          |   53 +-
 src/nco/nco_sng_utl.c                      |  200 +++--
 src/nco/nco_sng_utl.h                      |   34 +-
 src/nco/nco_var_lst.c                      |    6 +-
 src/nco/nco_var_utl.c                      |    4 +-
 src/nco/ncra.c                             |    7 +-
 src/nco/ncwa.c                             |   53 +-
 107 files changed, 6180 insertions(+), 2041 deletions(-)

diff --git a/bld/Makefile b/bld/Makefile
index 95cfe80..2afd758 100644
--- a/bld/Makefile
+++ b/bld/Makefile
@@ -15,17 +15,19 @@
 # Machine build parameters
 #                         Source     Method   Packages Compiler
 # aerosol.ess.uci.edu: NCO          Configure All else LLVM
+# cooley.alcf.anl.g  : NCO          Configure All else GCC
+# edison.nersc.gov   : NCO          Configure All else Intel
 # firn.ess.uci.edu   : NCO          Configure All else LLVM
+# frazil.ess.uci.edu : NCO + netCDF Configure All else GCC
 # givre.ess.uci.edu  : NCO + netCDF Makefile  All else LLVM
-# roulee.ess.uci.edu : NCO + netCDF Makefile  All else GCC
-# neige.ess.uci.edu  : NCO          Makefile  All else GCC
 # glace.ess.uci.edu  : NCO          Configure All else GCC
 # grele.ess.uci.edu  : NCO          Makefile  All else GCC
-# yellowstone.ucar.e : NCO          Makefile  All else Intel
+# neige.ess.uci.edu  : NCO          Makefile  All else GCC
 # rhea.ccs.ornl.gov  : NCO          Makefile  All else GCC
-# cooley.alcf.anl.g  : NCO          Configure All else GCC
-# edison.nersc.gov   : NCO          Configure All else Intel
+# roulee.ess.uci.edu : NCO + netCDF Makefile  All else GCC
+# skyglow.ess.uci.edu: NCO          Configure All else GCC
 # travis CI          : NCO          Configure All else gcc,clang,g++
+# yellowstone.ucar.e : NCO          Makefile  All else Intel
 
 # Usage (testing):
 # make tst                           # Vanilla regression test
@@ -918,6 +920,9 @@ endif
 
 # Works on LINUX, LINUXALPHA, LINUXAMD64, LINUXARM, and FREEBSD and MACOSX
 ifneq (${null},$(findstring ${PVM_ARCH},LINUXALPHALINUXAMD64LINUXARMFREEBSDMACOSX))
+# 20161001 Linux ar with Ubuntu Xenial began using deterministic mode. -U undoes that.
+# 20161001 GNU ar -s is equivalent to ranlib
+ARFLAGS := rsUv
 CXX := ${LINUX_CXX}
 CC := ${LINUX_CC}
 CPP := ${CC}
@@ -1933,6 +1938,7 @@ ${libnco}.a: ${libnco}.a(${MY_OBJ_DIR}/nco_att_utl.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_mmr.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_msa.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_mss_val.o) \
+	${libnco}.a(${MY_OBJ_DIR}/nco_mta.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_netcdf.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_omp.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_pck.o) \
@@ -1952,6 +1958,7 @@ ${libnco}.a: ${libnco}.a(${MY_OBJ_DIR}/nco_att_utl.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_var_rth.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_var_scv.o) \
 	${libnco}.a(${MY_OBJ_DIR}/nco_var_utl.o)
+	$(AR) rsv $@ $^
 libclean: lib_cln
 lib_cln:
 	rm -f ${libnco}.* ${libnco}*.* ${libnco}++.a ${libnco}_c++.a
diff --git a/bld/nco.spec b/bld/nco.spec
index ef21d26..e52f89e 100644
--- a/bld/nco.spec
+++ b/bld/nco.spec
@@ -2,17 +2,17 @@
 # http://cvs.fedoraproject.org/viewvc/devel/nco/nco.spec?view=co
 
 Name:           nco
-Version:        4.6.1
+Version:        4.6.2
 Release:        1%{?dist}
 Summary:        Programs that manipulate netCDF files
 Group:          Applications/Engineering
 License:        GPL3
 URL:            http://nco.sf.net/
 
-# Obtain NCO version 4.6.1-1 tar.gz from Sourceforge using CVS:
+# Obtain NCO version 4.6.2-1 tar.gz from Sourceforge using CVS:
 # cvs -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco login
-# cvs -z3 -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco co -r nco-4.6.1-1 -d nco-%{version} nco
-# tar czf nco-%{version}.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude='ncap_yacc.[ch]' ./nco-%{version}
+# cvs -z3 -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco co -r nco-4.6.2-1 -d nco-%{version} nco
+# tar czf nco-%{version}.tar.gz --exclude='nco-4.6.2/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude='ncap_yacc.[ch]' ./nco-%{version}
 Source0:        nco-%{version}.tar.gz
 #Patch0:		nco_install_C_headers.patch
 #Patch1:         nco_find_udunits-dat.patch
@@ -108,6 +108,9 @@ fi
 # %{_libdir}/libnco++.so
 
 %changelog
+* Thu Nov 16 2016 Charlie Zender <zender at uci.edu> - 4.6.2-1
+- new upstream 4.6.2
+
 * Sat Aug 06 2016 Charlie Zender <zender at uci.edu> - 4.6.1-1
 - new upstream 4.6.1
 
diff --git a/bld/nco_dst.pl b/bld/nco_dst.pl
index 1de8b70..8dab0c0 100755
--- a/bld/nco_dst.pl
+++ b/bld/nco_dst.pl
@@ -5,20 +5,20 @@
 
 # Usage:
 # Export tagged, public versions
-# /usr/bin/scp ${DATA}/nco-4.6.1.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
-
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.1 # Build, do not release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.6.1 # Build, release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.6.1 # Install, do not build
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.6.1 # Build and install
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.6.1
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.6.1
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.6.1
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.6.1
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.6.1
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.6.1
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.6.1
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.6.1
+# /usr/bin/scp ${DATA}/nco-4.6.2.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.2 # Build, do not release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.6.2 # Build, release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.6.2 # Install, do not build
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.6.2 # Build and install
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.6.2
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.6.2
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.6.2
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.6.2
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.6.2
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.6.2
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.6.2
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.6.2
 
 # Export daily snapshot
 # ${HOME}/nco/bld/nco_dst.pl --dbg=2 
@@ -256,7 +256,7 @@ if($bld){
 # Set up FTP server
     chdir $dst_pth_pfx or die "$prg_nm: ERROR unable to chdir to $dst_pth_pfx: $!\n"; # $! is system error string
     cmd_prc("$cp_cmd $doc_fl ./$dst_vrs/doc"); # Copy derived documentation to source directory
-    cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude=ncap_yacc.[ch] ./$dst_vrs"); # Create gzipped tarfile
+    cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-4.6.2/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude=ncap_yacc.[ch] ./$dst_vrs"); # Create gzipped tarfile
     cmd_prc("$rsh_cmd $www_mch $rm_cmd $www_drc/src/$dst_fl"); # Remove any distribution with same name
     if($dly_snp){cmd_prc("$rsh_cmd $www_mch $rm_cmd -r $www_drc/src/nco-????????.tar.gz");} # Remove previous daily snapshots from WWW server
     cmd_prc("$rcp_cmd $dst_fl $www_mch:$www_drc/src"); # Copy local tarfile to WWW server
diff --git a/bm/NCO_rgr.pm b/bm/NCO_rgr.pm
index c17f0ad..99b8481 100644
--- a/bm/NCO_rgr.pm
+++ b/bm/NCO_rgr.pm
@@ -2697,12 +2697,12 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     $#tst_cmd=0; # Reset array 			
 	
 #ncks #100
-# Test DSD attribute does overwrite pre-existing sharper values
-# ncks -4 -O -C -v ppc_dbl,ppc_big --ppc .?=.4 --ppc ppc_big=.-2 ~/nco/data/in.nc ~/foo.nc
+# Test DSD attribute does overwrite pre-existing sharper values in multi-argument parsing
+# ncks -4 -O -C -v ppc_dbl,ppc_big --ppc .?=.4#ppc_big=.-2 ~/nco/data/in.nc ~/foo.nc
 # ncks -4 -O -C -v ppc_dbl,ppc_big --ppc ppc_big,ppc_dbl=.3 ~/foo.nc ~/foo2.nc
 # ncks -m -v ppc_big ~/foo2.nc
-    $dsc_sng="Test DSD attribute does overwrite pre-existing sharper values";
-    $tst_cmd[0]="ncks -O $nco_D_flg -4 -C -v ppc_dbl,ppc_big --ppc .?=.4 --ppc ppc_big=.-2 $in_pth_arg in.nc %tmp_fl_00";
+    $dsc_sng="Test DSD attribute does overwrite pre-existing sharper values in multi-argument parsing";
+    $tst_cmd[0]="ncks -O $nco_D_flg -4 -C -v ppc_dbl,ppc_big --ppc .?=.4#ppc_big=.-2 $in_pth_arg in.nc %tmp_fl_00";
     $tst_cmd[1]="ncks -O $nco_D_flg -4 -C -v ppc_dbl,ppc_big --ppc ppc_big,ppc_dbl=.3 %tmp_fl_00 %tmp_fl_01";
     $tst_cmd[2]="ncks -m -v ppc_dbl %tmp_fl_01 | grep 'least_significant_digit'";
     $tst_cmd[3]="ppc_dbl attribute 3: least_significant_digit, size = 1 NC_INT, value = 3";
@@ -2832,10 +2832,10 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 
 # ncks #111
 # NB: This tests whether the output file has global metadata, and that provides (circumstantial) evidence that there were no major problems in the intervening routines of grid generation
-# ncks -O -v one -D 5 -t 1 --rgr grd_ttl='FV-scalar grid' --rgr grid=~/65x128_SCRIP.nc --rgr lat_nbr=65 --rgr lon_nbr=128 --rgr lat_typ=FV --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+# ncks -O -v one -D 5 -t 1 --rgr grd_ttl='FV-scalar grid'#grid=65x128_SCRIP.nc#lat_nbr=65#lon_nbr=128#lat_typ=FV#lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
 # ncks -M ~/foo.nc | grep "julian" | cut -d ' ' -f 4
-    $dsc_sng="Generate RLL grid";
-    $tst_cmd[0]="ncks -h -O $nco_D_flg -v one --rgr grd_ttl='FV-scalar grid' --rgr grid=65x128_SCRIP.nc --rgr lat_nbr=65 --rgr lon_nbr=128 --rgr lat_typ=FV --rgr lon_typ=Grn_ctr $in_pth_arg in.nc %tmp_fl_00%";
+    $dsc_sng="Generate RLL grid with multi-argument parsing";
+    $tst_cmd[0]="ncks -h -O $nco_D_flg -v one --rgr grd_ttl='FV-scalar grid'#grid=65x128_SCRIP.nc#lat_nbr=65#lon_nbr=128#lat_typ=FV#lon_typ=Grn_ctr $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -M %tmp_fl_00% | grep 'julian' | cut -d ' ' -f 4";
     $tst_cmd[2]="julian_day,";
     $tst_cmd[3]="SS_OK";   
@@ -2862,7 +2862,73 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     $tst_cmd[2]="time[3]=3"; 
     $tst_cmd[3]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
+    $#tst_cmd=0; # Reset array
+
+# ncks #114
+# ncks -h -O --gaa foo=bar#foo2,foo3=bar2#foo3,foo4='Thu Sep 15 13:03:18 PDT 2016' ~/nco/data/in.nc ~/foo.nc
+# ncks -M ~/foo.nc | grep foo4 | cut -d ' ' -f 11-16
+    $dsc_sng="Multi-argument parsing by Jerome, test last argument is time string";
+    $tst_cmd[0]="ncks -h -O $nco_D_flg --gaa foo=bar#foo2,foo3=bar2#foo3,foo4='Thu Sep 15 13:03:18 PDT 2016' $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -M %tmp_fl_00% | grep foo4 | cut -d ' ' -f 11-16";
+    $tst_cmd[2]="Thu Sep 15 13:03:18 PDT 2016";
+    $tst_cmd[3]="SS_OK";   
+    NCO_bm::tst_run(\@tst_cmd);
+    $#tst_cmd=0; # Reset array
+
+# ncks #115
+# ncks -h -O --gaa foo=bar1#foo2=bar2#foo3=bar3#script='created by nco_climo.sh' ~/nco/data/in.nc ~/foo.nc
+# ncks -M ~/foo.nc | grep foo, | cut -d ' ' -f 11
+    $dsc_sng="Multi-argument parsing test first argument";
+    $tst_cmd[0]="ncks -h -O $nco_D_flg --gaa foo=bar1#foo2=bar2#foo3=bar3#script='created by nco_climo.sh' $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -M %tmp_fl_00% | grep foo, | cut -d ' ' -f 11";
+    $tst_cmd[2]="bar1";
+    $tst_cmd[3]="SS_OK";   
+    NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array	
+
+# ncks #116
+# ncks -h -O --gaa foo=bar#foo2=bar2#foo3,foo4="Thu Sep 15 13:03:18 PDT 2016" ~/nco/data/in.nc ~/foo.nc
+# ncks -M ~/foo.nc | grep foo3 | cut -d ' ' -f 11-16
+    $dsc_sng="Multi-argument parsing test second-to-last key is time string";
+    $tst_cmd[0]="ncks -h -O $nco_D_flg --gaa foo=bar#foo2=bar2#foo3,foo4=\"Thu Sep 15 13:03:18 PDT 2016\" $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -M %tmp_fl_00% | grep foo3 | cut -d ' ' -f 11-16";
+    $tst_cmd[2]="Thu Sep 15 13:03:18 PDT 2016";
+    $tst_cmd[3]="SS_OK";   
+    NCO_bm::tst_run(\@tst_cmd);
+    $#tst_cmd=0; # Reset array
+
+# ncks #117
+# ncks -h -O --gaa foo=bar#foo2=bar2#foo3,foo4='Thu Sep 15 13:03:18 PDT 2016'#foo5,foo6=bar4 ~/nco/data/in.nc ~/foo.nc
+# ncks -M ~/foo.nc | grep foo6 | cut -d ' ' -f 11
+    $dsc_sng="Multi-argument parsing test arguments after time string kvm";
+    $tst_cmd[0]="ncks -h -O $nco_D_flg --gaa foo=bar#foo2=bar2#foo3,foo4='Thu Sep 15 13:03:18 PDT 2016'#foo5,foo6=bar4 $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -M %tmp_fl_00% | grep foo6 | cut -d ' ' -f 11";
+    $tst_cmd[2]="bar4";
+    $tst_cmd[3]="SS_OK";   
+    NCO_bm::tst_run(\@tst_cmd);
+    $#tst_cmd=0; # Reset array
+
+# ncks #118
+# ncks -h -O --gaa foo,boo=bar#foo2,foo9=bar2#foo3,foo4='Thu Sep 15 13:03:18 PDT 2016'#foo5,foo6=bar4 ~/nco/data/in.nc ~/foo.nc
+# ncks -M ~/foo.nc | grep foo6 | cut -d ' ' -f 11
+    $dsc_sng="Multi-argument parsing test when all kvms have subdelimiters";
+    $tst_cmd[0]="ncks -h -O $nco_D_flg --gaa foo,boo=bar#foo2,foo3=bar2#foo3,foo4='Thu Sep 15 13:03:18 PDT 2016'#foo5,foo6=bar4 $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -M %tmp_fl_00% | grep foo6 | cut -d ' ' -f 11";
+    $tst_cmd[2]="bar4";
+    $tst_cmd[3]="SS_OK";   
+    NCO_bm::tst_run(\@tst_cmd);
+    $#tst_cmd=0; # Reset array
+
+# ncks #119
+# ncks -O --dlm=':' --gaa 'foo=bar:foo2=bar2:foo3,foo4=Thu Sep 15 13\\:03\\:18 PDT 2016:foo5=bar6’ ~/nco/data/in.nc ~/foo.nc
+# ncks -M ~/foo.nc | grep foo6 | cut -d ' ' -f 11
+    $dsc_sng="Multi-argument parsing test when some of the delimiters are handled by backslashes";
+    $tst_cmd[0]="ncks -O --dlm=':' $nco_D_flg --gaa foo=bar:foo2=bar2:foo3,foo4='Thu Sep 15 13\\:03\\:18 PDT 2016:foo5=bar6' $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -M %tmp_fl_00% | grep foo4 | cut -d ' ' -f 11-16";
+    $tst_cmd[2]="Thu Sep 15 13:03:18 PDT 2016";
+    $tst_cmd[3]="SS_OK";   
+    NCO_bm::tst_run(\@tst_cmd);
+    $#tst_cmd=0; # Reset array
 	
 #####################
 #### ncpdq tests #### -OK !
diff --git a/config.h.in b/config.h.in
index a2af187..6d05074 100644
--- a/config.h.in
+++ b/config.h.in
@@ -344,6 +344,9 @@
 /* Define to 1 if you have the `strrchr' function. */
 #undef HAVE_STRRCHR
 
+/* Define to 1 if compiler finds external `strsep' function */
+#undef HAVE_STRSEP
+
 /* Define to 1 if you have the `strstr' function. */
 #undef HAVE_STRSTR
 
@@ -541,6 +544,9 @@
 /* Define to 1 if compiler needs external `strdup' function */
 #undef NEED_STRDUP
 
+/* Define to 1 if compiler needs external `strsep' function */
+#undef NEED_STRSEP
+
 /* Define to 1 if compiler needs external `tanf' function */
 #undef NEED_TANF
 
diff --git a/configure b/configure
index 8e2a4f8..e04251b 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.69 for NCO netCDF Operators 4.6.1-beta01.
+# Generated by GNU Autoconf 2.69 for NCO netCDF Operators 4.6.2.
 #
 # Report bugs to <nco-bugs at lists.sourceforge.net>.
 #
@@ -592,8 +592,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='NCO netCDF Operators'
 PACKAGE_TARNAME='nco'
-PACKAGE_VERSION='4.6.1-beta01'
-PACKAGE_STRING='NCO netCDF Operators 4.6.1-beta01'
+PACKAGE_VERSION='4.6.2'
+PACKAGE_STRING='NCO netCDF Operators 4.6.2'
 PACKAGE_BUGREPORT='nco-bugs at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1394,7 +1394,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 NCO netCDF Operators 4.6.1-beta01 to adapt to many kinds of systems.
+\`configure' configures NCO netCDF Operators 4.6.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1465,7 +1465,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of NCO netCDF Operators 4.6.1-beta01:";;
+     short | recursive ) echo "Configuration of NCO netCDF Operators 4.6.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1633,7 +1633,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-NCO netCDF Operators configure 4.6.1-beta01
+NCO netCDF Operators configure 4.6.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2499,7 +2499,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 NCO netCDF Operators $as_me 4.6.1-beta01, which was
+It was created by NCO netCDF Operators $as_me 4.6.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3750,7 +3750,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='nco'
- VERSION='4.6.1-beta01'
+ VERSION='4.6.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17735,6 +17735,7 @@ fi # !netCDF4
 # Test if user set NETCDF_ROOT and it exists
 if test "x${enable_netcdf4}" = 'xyes'; then
     if test -z "${NETCDF_ROOT}"; then
+	# 20160901: Branch fails on Fedora Core 23+ (not MacOSX, not Ubuntu) due to mysterious emission of "Using <pathname>/nf-config" text as if warning user about security hole
 	NETCDF_CONFIG='nc-config'
 	NETCDF_ROOT="`nc-config --prefix`"
     else
@@ -18965,6 +18966,20 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 fi
+ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
+if test "x$ac_cv_func_strsep" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRSEP 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define NEED_STRSEP 1
+_ACEOF
+
+fi
 ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
 if test "x$ac_cv_func_strcasestr" = xyes; then :
 
@@ -20890,10 +20905,12 @@ fi
 DOC_FOLDER=""
 if test "x${enable_doc}" = 'xyes' && test "x${HAVE_MAKEINFO}" = 'xyes' ; then
     # Ensure makeinfo is recent enough, i.e., version 4.12 or later
-    MAKEINFO_VERSION="`makeinfo --version` | grep makeinfo | cut -d ' ' -f 4"
+    MAKEINFO_VERSION="`makeinfo --version | grep texinfo | cut -d ' ' -f 4`"
     echo "MAKEINFO_VERSION=${MAKEINFO_VERSION}"
 
-$as_echo "#define MAKEINFO_VERSION \${MAKEINFO_VERSION}" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define MAKEINFO_VERSION ${MAKEINFO_VERSION}
+_ACEOF
 
     #    test_result=m4_version_compare([${MAKEINFO_VERSION}],[4.8])
     test_result='1'
@@ -21477,7 +21494,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 NCO netCDF Operators $as_me 4.6.1-beta01, which was
+This file was extended by NCO netCDF Operators $as_me 4.6.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21543,7 +21560,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="\\
-NCO netCDF Operators config.status 4.6.1-beta01
+NCO netCDF Operators config.status 4.6.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 5237ea8..0b8ea7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@
 
 # Process configure input with autoconf to produce configure script
 # (package name,version,bug-report-address,tarball name)
-AC_INIT([NCO netCDF Operators],[4.6.1],[nco-bugs at lists.sourceforge.net],[nco])
+AC_INIT([NCO netCDF Operators],[4.6.2],[nco-bugs at lists.sourceforge.net],[nco])
 
 # Print GNU copyright in configure script
 AC_COPYRIGHT
@@ -277,6 +277,7 @@ AC_ARG_VAR([NETCDF_ROOT],[Root of netCDF4 installation] (compile-time))
 # Test if user set NETCDF_ROOT and it exists
 if test "x${enable_netcdf4}" = 'xyes'; then
     if test -z "${NETCDF_ROOT}"; then
+	# 20160901: Branch fails on Fedora Core 23+ (not MacOSX, not Ubuntu) due to mysterious emission of "Using <pathname>/nf-config" text as if warning user about security hole
 	NETCDF_CONFIG='nc-config'
 	NETCDF_ROOT="`nc-config --prefix`"
     else
@@ -376,7 +377,7 @@ NCO_CHECK_FUNCS([ceilf floorf])
 NCO_CHECK_FUNCS([nearbyint rint round trunc])
 NCO_CHECK_FUNCS([nearbyintf rintf roundf truncf])
 NCO_CHECK_FUNCS([getopt_long])
-NCO_CHECK_FUNCS([strdup strcasecmp strcasestr])
+NCO_CHECK_FUNCS([strdup strcasecmp strsep strcasestr])
 
 echo "##########################################################"
 echo "#     Sorting out MacOSX build parameters                #"
@@ -1223,9 +1224,9 @@ AC_CHECK_PROG(HAVE_MAKEINFO,makeinfo,yes,no,${PATH})
 DOC_FOLDER=""
 if test "x${enable_doc}" = 'xyes' && test "x${HAVE_MAKEINFO}" = 'xyes' ; then
     # Ensure makeinfo is recent enough, i.e., version 4.12 or later
-    MAKEINFO_VERSION="`makeinfo --version` | grep makeinfo | cut -d ' ' -f 4"
+    MAKEINFO_VERSION="`makeinfo --version | grep texinfo | cut -d ' ' -f 4`"
     echo "MAKEINFO_VERSION=${MAKEINFO_VERSION}"
-    AC_DEFINE(MAKEINFO_VERSION,${MAKEINFO_VERSION},Building TeXInfo documentation requires version greater than 4.8)
+    AC_DEFINE_UNQUOTED(MAKEINFO_VERSION,${MAKEINFO_VERSION},Building TeXInfo documentation requires version greater than 4.8)
     #    test_result=m4_version_compare([${MAKEINFO_VERSION}],[4.8])
     test_result='1'
     if test "${test_result}" = '1'; then
diff --git a/configure.eg b/configure.eg
index b94cf03..74de8e6 100644
--- a/configure.eg
+++ b/configure.eg
@@ -284,7 +284,7 @@ module load netcdf/4.4.0
 module load udunits
 export GNU_TRP=`~/nco/autobld/config.guess`
 cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
-ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.${GNU_TRP}.foo 2>&1
+ANTLR_ROOT=${HOME} ANTLR_LIB=${HOME}/lib CC='gcc' CXX='g++' ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.${GNU_TRP}.foo 2>&1
 /bin/cp -f config.log nco.config.log.${GNU_TRP}.foo
 /bin/cp -f libtool nco.libtool.${GNU_TRP}.foo
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
@@ -611,7 +611,7 @@ make check >> nco.make.${GNU_TRP}.foo 2>&1
 sudo make install >> nco.make.${GNU_TRP}.foo 2>&1
 scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
 
-# gcc/g++ Zender uses this to debug NCO with pre-built (i.e., yum/dnf install'd or aptitude install'd) netCDF (frazil)
+# gcc/g++ Zender uses this to debug NCO with pre-built (i.e., yum/dnf install'd or aptitude install'd) netCDF (frazil, glace)
 export GNU_TRP=`~/nco/autobld/config.guess`
 cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' NETCDF_INC='/usr/include' NETCDF_LIB='/usr/lib' ./configure --enable-debug-custom --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.${GNU_TRP}.foo 2>&1
@@ -633,7 +633,7 @@ make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
 scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
 
-# gcc/g++ Zender uses this to debug NCO with pre-built netCDF binaries in /usr (this works on MACOSX with MacPorts, e.g., aerosol)
+# gcc/g++ Zender uses this to debug NCO with pre-built netCDF binaries in /usr (this works on MACOSX with MacPorts, e.g., aerosol, skyglow)
 export GNU_TRP=`~/nco/autobld/config.guess`
 cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' NETCDF_INC='/usr/include' NETCDF_LIB='/usr/lib' ./configure --enable-debug-custom --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.${GNU_TRP}.foo 2>&1
diff --git a/data/bsc_tst.nco b/data/bsc_tst.nco
index d472f31..a910c33 100644
--- a/data/bsc_tst.nco
+++ b/data/bsc_tst.nco
@@ -478,7 +478,7 @@ nbr_err_ttl=0;
   // check a LHS cast with a RHS att list
   d7[time]={1s,4us,9b,16L,25ull,36,49,64,81,100.0f};
 
-  if(d7.type()!=NC_FLOAT || d7.size() != time.size())
+  if(d7.type()!=NC_SHORT || d7.size() != time.size())
   {
      print("ERROR: d7: var cast from an att list\n");
      nbr_err++;	
diff --git a/data/in.cdl b/data/in.cdl
index ed70bc3..e2f4eac 100644
--- a/data/in.cdl
+++ b/data/in.cdl
@@ -1123,6 +1123,18 @@ variables:
         rec_var_dbl_mss_val_sht_pck_sht:scale_factor = -9.15541313801785e-05;
 	rec_var_dbl_mss_val_sht_pck_sht:add_offset = 5.;
 
+	float rec_var_flt_mss_val_flt_pck_flt(time);
+	rec_var_flt_mss_val_flt_pck_flt:long_name = "record variable, float packed as float, with float missing values";
+	rec_var_flt_mss_val_flt_pck_flt:purpose = "CESM POP2 ocean model packs SALT, WVEL etc this way";
+	rec_var_flt_mss_val_flt_pck_flt:_FillValue = -9.96921e+33;
+        rec_var_flt_mss_val_flt_pck_flt:scale_factor = 1000.0;
+
+	float SALT(time);
+	SALT:long_name = "record variable, float packed as float, with float missing values";
+	SALT:purpose = "CESM POP2 ocean model packs SALT, WVEL etc this way";
+	SALT:_FillValue = -9.96921e+33;
+        SALT:scale_factor = 1000.0;
+	
 	char one_dmn_rec_var_sng(time);
 	one_dmn_rec_var_sng:long_name = "one dimensional record variable of string";
         one_dmn_rec_var_sng:NB = "20131222: HDF4 ncgen fails on this variable: /usr/bin/hncgen -b -o ~/in.hdf ~/nco/data/in.cdl produces error message that \"string won't fit in this variable\"";
@@ -1542,6 +1554,8 @@ data:
 	rec_var_dbl_mss_val_dbl_pck=-999,32767,21845,10922,0,-10922,-21845,-32767,-999,-999;
 	rec_var_dbl_mss_val_dbl_pck_lng=-999,32767,21845,10922,0,-10922,-21845,-32767,-999,-999;
 	rec_var_dbl_mss_val_sht_pck_sht=-999,32767,21845,10922,0,-10922,-21845,-32767,-999,-999;
+	rec_var_flt_mss_val_flt_pck_flt=-9.96921e+33,0.032,0.033,0.034,0.035,0.036,0.037,0.038,-9.96921e+33,-9.96921e+33;
+	SALT=-9.96921e+33,0.032,0.033,0.034,0.035,0.036,0.037,0.038,-9.96921e+33,-9.96921e+33;
 	rec_var_dbl_mss_val_dbl_upk=-999.,2.,3.,4.,5.,6.,7.,8.,-999.,-999.;
 	rec_var_dbl_mss_val_sht_pck=-999,32767,21845,10922,0,-10922,-21845,-32767,-999,-999;
 	rec_var_dbl_mss_val_sht_upk=-999.,2.,3.,4.,5.,6.,7.,8.,-999.,-999.;
diff --git a/data/in_4.cdl b/data/in_4.cdl
index d76618f..4f023d4 100644
--- a/data/in_4.cdl
+++ b/data/in_4.cdl
@@ -541,17 +541,17 @@ variables:
 	att_var:ubyte_att = 0ub, 1ub, 2ub, 127ub, 128ub, 254ub, 255ub, 0ub; // 20130712: ncgen 4.3.0 translates this to byte
 	att_var:ubyte2_att = '\000','\001','\002','\177','\200','\201','\376','\377'; // 20130712: ncgen 4.3.0 translates this to byte
 	att_var:ushort_att = 37us;
-	att_var:uint_att = 73u;
-	att_var:int64_att = 9223372036854775807l; // 20130712: ncgen 4.3.0 chokes on ll, LL suffix for int64 attributes, and translates -l suffixed numbers to NC_UINT64. Bug reported (netCDF #HEX-795132) and fixed in snapshot 20131117
+        att_var:uint_att = 73ul; // 20161110: ncgen requires "ul" for uint (a simple "u" is interpretd as uint64)
+	att_var:int64_att = 9223372036854775807ll; // 20130712: ncgen 4.3.0 chokes on ll, LL suffix for int64 attributes, and translates -l suffixed numbers to NC_UINT64. Bug reported (netCDF #HEX-795132) and fixed in snapshot 20131117
 //	att_var:uint64_att = 18446744073709551615ul; // 20130712: ncgen 4.3.0 chokes on ull, ULL suffix for uint64 attributes. 20131120: XML treats unsigned as signed types, so toolsui produces errors when reading maximum uint64 values (though not when reading maxium ubyte, ushort, and uint values)
-	att_var:uint64_att = 0ul;
+	att_var:uint64_att = 0ull;
 	att_var:string_att1 = "20130723: ncgen -k netCDF-4 version 4.0.x converts quoted string to NC_STRING not NC_CHAR. Incompatible with classic behavior.";
 	att_var:string_att2 = "20130712: ncgen -k netCDF-4 version 4.2.x+ converts quoted string to NC_CHAR not NC_STRING. Backwards compatible with classic behavior.";
 	string att_var:string_att3 = "20130723: Prefixing full attribute name with \"string\" causes CDL to produce NC_STRING.";
 	string att_var:string_att4 = "20130723: Arrays of NC_STRING are simply separated by commas.","If there are commas within a string, well, then, be careful. Did we \"jump the shark\"?","This array comprises three elements. Each is a sentence or three long.";
 	string att_var:string_att5 = "20131121: This NC_STRING contains NCO's default XML string separator, *. And it contains multiple sequential copies of that separator, ***. Be sure ncks automatically switches to a different separator, aka the backup separator, the string obtained by removing the two spaces from this:\"* | *\".";
 
-	int bnd_var(lev,bnd);
+        int bnd_var(lev,bnd);
 	bnd_var:byte_att = '\0';
 	bnd_var:char_att = "Sentence one.\nSentence two.\n";
 	bnd_var:short_att = 37s;
@@ -1444,10 +1444,3 @@ data:
 				0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,
 				0.5,0.5,2.5,0.5,0.5,2.5,0.5,0.5;
 }
-
-
-
-
-
-
-
diff --git a/data/in_grp.cdl b/data/in_grp.cdl
index a3a74bc..860e1c3 100644
--- a/data/in_grp.cdl
+++ b/data/in_grp.cdl
@@ -92,8 +92,8 @@ netcdf in_grp {
   unique:purpose = "the only variable of this name in this file, to test smallest possible access requests"; 
   
   float lat_lon(lat,lon);
-  
-  //global attributes
+
+// Global attributes
   :Conventions = "CF-1.0";
   :history = "History global attribute.\n";
   :julian_day = 200000.04;
diff --git a/data/ncap.in b/data/ncap.in
index 2126e7d..ea5f0b6 100644
--- a/data/ncap.in
+++ b/data/ncap.in
@@ -155,7 +155,7 @@ twenty at seven=one;
 //Put an attribute/number  into a variable
 thirty=1.e19f;
 thirtyone=one at one;
-// With a string ONLY the first char is put into varible
+// With a string ONLY the first char is put into variable
 thirtytwo="Hello world";
 // use varibles defined in output
 thirtythree=twentyfive*4.001;
diff --git a/data/ncclimo b/data/ncclimo
index 27fbe47..617935d 100755
--- a/data/ncclimo
+++ b/data/ncclimo
@@ -45,6 +45,22 @@
 # scp ~/nco/data/ncclimo yellowstone.ucar.edu:bin
 # scp dust.ess.uci.edu:nco/data/ncclimo ~/bin
 
+# Set script name, directory, PID, run directory
+drc_pwd=${PWD}
+# Set these before 'module' command which can overwrite ${BASH_SOURCE[0]}
+# NB: dash supports $0 syntax, not ${BASH_SOURCE[0]} syntax
+# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
+spt_src="${BASH_SOURCE[0]}"
+[[ -z "${spt_src}" ]] && spt_src="${0}" # Use ${0} when BASH_SOURCE is unavailable (e.g., dash)
+while [ -h "${spt_src}" ]; do # Recursively resolve ${spt_src} until file is no longer a symlink
+  drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+  spt_src="$(readlink "${spt_src}")"
+  [[ ${spt_src} != /* ]] && spt_src="${drc_spt}/${spt_src}" # If ${spt_src} was relative symlink, resolve it relative to path where symlink file was located
+done
+drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+spt_nm=$(basename ${spt_src}) # [sng] Script name (Unlike $0, ${BASH_SOURCE[0]} works well with 'source <script>')
+spt_pid=$$ # [nbr] Script PID (process ID)
+
 # Configure paths at High-Performance Computer Centers (HPCCs) based on ${HOSTNAME}
 if [ -z "${HOSTNAME}" ]; then
     if [ -f /bin/hostname ] && [ -x /bin/hostname ]; then
@@ -268,17 +284,7 @@ esac # !HOSTNAME
 #          ncclimo -m clm2 ... -R col_nm=lndgrid -r map.nc ...
 # thr_nbr: Thread number to use in NCO regridder, '-t 1' for one thread, '-t 2' for two threads...
 
-# Set script name, directory, PID, run directory, NCO version
-drc_pwd=${PWD}
-# NB: dash supports $0 syntax, not ${BASH_SOURCE[0]} syntax
-# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
-spt_src="${BASH_SOURCE[0]}"
-while [ -h "${spt_src}" ]; do # Recursively resolve ${spt_src} until file is no longer a symlink
-  drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
-  spt_src="$(readlink "${spt_src}")"
-  [[ ${spt_src} != /* ]] && spt_src="${drc_spt}/${spt_src}" # If ${spt_src} was relative symlink, resolve it relative to path where symlink file was located
-done
-drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+# Set NCO version and directory
 nco_exe=`which ncks`
 if [ -z "${nco_exe}" ]; then
     echo "ERROR: Unable to find NCO, nco_exe = ${nco_exe}"
@@ -292,8 +298,6 @@ while [ -h "${nco_exe}" ]; do
 done
 drc_nco="$( cd -P "$( dirname "${nco_exe}" )" && pwd )"
 nco_vrs=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
-spt_nm=$(basename ${BASH_SOURCE[0]}) # [sng] Script name (Unlike $0, ${BASH_SOURCE[0]} works well with 'source <script>')
-spt_pid=$$ # [nbr] Script PID (process ID)
 
 # When running in a terminal window (not in an non-interactive batch queue)...
 if [ -n "${TERM}" ]; then
@@ -1255,12 +1259,8 @@ echo "Elapsed time $((date_dff/60))m$((date_dff % 60))s"
 for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
     fl_out_lst="${fl_out_lst} ${fl_out[${clm_idx}]}"
 done
-spt_drc=$(get_spt_drc)
-if [ ${dbg_lvl} -ge 1 ]; then
-    echo "Script is in directory: ${spt_drc}"
-fi # !dbg
 # CSZ: 20150826 disable until less fragile (than relative path) solution is found 
-#cd ${spt_drc}
+#cd ${drc_spt}
 # ../utils/add_git_hash_to_netcdf_metadata ${fl_out_lst}
 
 exit 0
diff --git a/data/ncremap b/data/ncremap
index b202f90..58894df 100755
--- a/data/ncremap
+++ b/data/ncremap
@@ -42,6 +42,22 @@
 # Use Free-Will, Old-Grid, or New-Grid mode to process Swath-Like-Data (SLD) where each input may be a granule on a new grid, yet all inputs are to be regridded to the same output grid
 # Use Pre-Destination mode to post-process models or analyses where all files are converted from the same source grid to the same destination grid so the map-file can be pre-generated and never change
 
+# Set script name, directory, PID, run directory
+drc_pwd=${PWD}
+# Set these before 'module' command which can overwrite ${BASH_SOURCE[0]}
+# NB: dash supports $0 syntax, not ${BASH_SOURCE[0]} syntax
+# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
+spt_src="${BASH_SOURCE[0]}"
+[[ -z "${spt_src}" ]] && spt_src="${0}" # Use ${0} when BASH_SOURCE is unavailable (e.g., dash)
+while [ -h "${spt_src}" ]; do # Recursively resolve ${spt_src} until file is no longer a symlink
+  drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+  spt_src="$(readlink "${spt_src}")"
+  [[ ${spt_src} != /* ]] && spt_src="${drc_spt}/${spt_src}" # If ${spt_src} was relative symlink, resolve it relative to path where symlink file was located
+done
+drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+spt_nm=$(basename ${spt_src}) # [sng] Script name (Unlike $0, ${BASH_SOURCE[0]} works well with 'source <script>')
+spt_pid=$$ # [nbr] Script PID (process ID)
+
 # Configure paths at High-Performance Computer Centers (HPCCs) based on ${HOSTNAME}
 if [ -z "${HOSTNAME}" ]; then
     if [ -f /bin/hostname ] && [ -x /bin/hostname ]; then
@@ -82,7 +98,7 @@ case "${HOSTNAME}" in
 	# Why do cori/edison and rhea require workarounds for different packages?
 	module load gsl
 	module load udunits
-	# On cori, module load ncl installs ERWG in ${NCARG_ROOT}/../intel/bin
+	# On cori and edison, module load ncl installs ERWG in ${NCARG_ROOT}/../intel/bin
 	if [ -n "${NCARG_ROOT}" ]; then
             export PATH="${NCARG_ROOT}/bin:${PATH}"
 	fi # !NCARG_ROOT
@@ -91,6 +107,10 @@ case "${HOSTNAME}" in
     edison* )
 	module load gsl
 	module load udunits
+	# On cori and edison, module load ncl installs ERWG in ${NCARG_ROOT}/../intel/bin
+	if [ -n "${NCARG_ROOT}" ]; then
+            export PATH="${NCARG_ROOT}/bin:${PATH}"
+	fi # !NCARG_ROOT
 	export PATH='/global/homes/z/zender/bin_edison'\:${PATH}
         export LD_LIBRARY_PATH='/global/homes/z/zender/lib_edison'\:${LD_LIBRARY_PATH} ; ;;
     pileus* )
@@ -131,7 +151,8 @@ case "${HOSTNAME}" in
 esac # !HOSTNAME
 
 # Insta-install
-# scp ~/nco/data/ncremap cori.nersc.gov:bin
+# scp ~/nco/data/ncremap cori.nersc.gov:bin_cori
+# scp ~/nco/data/ncremap edison.nersc.gov:bin_edison
 
 # Test cases (for Charlie's machines)
 # Map-only:
@@ -164,7 +185,6 @@ esac # !HOSTNAME
 # ncremap -P mpas -i ${DATA}/mpas/raw/hist.ocn.0001-01-01_00.00.00.nc -m ${DATA}/maps/map_oEC60to30_to_t62_bilin.20160301.nc -O ~/rgr
 # ncremap -P mpas -i ${DATA}/mpas/raw/hist.ice.0003-12-01_00.00.00.nc -m ${DATA}/maps/map_mpas120_TO_T62_aave.121116.nc -O ~/rgr
 # ACME benchmarks:
-# ncremap -v FSNT,AODVIS -i ${DATA}/ne30/raw/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc -m ${DATA}/maps/map_ne30np4_to_fv129x256_aave.150418.nc   -O ~/rgr
 # ncremap -v FSNT,AODVIS -i ${DATA}/ne30/raw/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc -m ${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc -O ~/rgr
 # ncremap -v FSNT,AODVIS -w esmf    -i ${DATA}/ne30/raw/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc -s ${DATA}/grids/ne30np4_pentagons.091226.nc -g ${DATA}/grids/129x256_SCRIP.20150901.nc -O ~/rgr
 # ncremap -v FSNT,AODVIS -w tempest -i ${DATA}/ne30/raw/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc -s ${DATA}/grids/ne30np4_pentagons.091226.nc -g ${DATA}/grids/129x256_SCRIP.20150901.nc -O ~/rgr
@@ -174,20 +194,10 @@ esac # !HOSTNAME
 
 # dbg_lvl: 0 = Quiet, print basic status during evaluation
 #          1 = Print configuration, full commands, and status to output during evaluation
-#          2 = As in dbg_lvl=1, but _do not evaluate commands_
+#          2 = As in dbg_lvl=1, but DO NOT EXECUTE COMMANDS (i.e., pretend to run but do not regrid anything)
 #          3 = As in dbg_lvl=1, and pass debug level through to NCO/ncks
 
-# Set script name, directory, PID, run directory, NCO version
-drc_pwd=${PWD}
-# NB: dash supports $0 syntax, not ${BASH_SOURCE[0]} syntax
-# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
-spt_src="${BASH_SOURCE[0]}"
-while [ -h "${spt_src}" ]; do # Recursively resolve ${spt_src} until file is no longer a symlink
-  drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
-  spt_src="$(readlink "${spt_src}")"
-  [[ ${spt_src} != /* ]] && spt_src="${drc_spt}/${spt_src}" # If ${spt_src} was relative symlink, resolve it relative to path where symlink file was located
-done
-drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+# Set NCO version and directory
 nco_exe=`which ncks`
 if [ -z "${nco_exe}" ]; then
     echo "ERROR: Unable to find NCO, nco_exe = ${nco_exe}"
@@ -201,8 +211,6 @@ while [ -h "${nco_exe}" ]; do
 done
 drc_nco="$( cd -P "$( dirname "${nco_exe}" )" && pwd )"
 nco_vrs=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
-spt_nm=$(basename ${BASH_SOURCE[0]}) # [sng] Script name (Unlike $0, ${BASH_SOURCE[0]} works well with 'source <script>')
-spt_pid=$$ # [nbr] Script PID (process ID)
 
 # When running in a terminal window (not in an non-interactive batch queue)...
 if [ -n "${TERM}" ]; then
@@ -300,8 +308,9 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     echo "${fnt_rvr}-p${fnt_nrm} ${fnt_bld}par_typ${fnt_nrm}  Parallelism type (default ${fnt_bld}${par_typ}${fnt_nrm})"
     echo "${fnt_rvr}-R${fnt_nrm} ${fnt_bld}rgr_opt${fnt_nrm}  Regridding options (empty means none) (default ${fnt_bld}${rgr_opt}${fnt_nrm})"
     echo "${fnt_rvr}-s${fnt_nrm} ${fnt_bld}grd_src${fnt_nrm}  Grid-file (source) (empty means infer or use map_fl) (default ${fnt_bld}${grd_src}${fnt_nrm})"
-    echo "${fnt_rvr}-t${fnt_nrm} ${fnt_bld}thr_nbr${fnt_nrm}  Thread number for regridder (default ${fnt_bld}${thr_nbr}${fnt_nrm})"
     echo "${fnt_rvr}-T${fnt_nrm} ${fnt_bld}tps_opt${fnt_nrm}  TempestRemap GenerateOfflineMap options (default ${fnt_bld}${tps_opt}${fnt_nrm})"
+    echo "${fnt_rvr}-t${fnt_nrm} ${fnt_bld}thr_nbr${fnt_nrm}  Thread number for regridder (default ${fnt_bld}${thr_nbr}${fnt_nrm})"
+    echo "${fnt_rvr}-U${fnt_nrm} ${fnt_bld}drc_tmp${fnt_nrm}  Temporary directory (for intermediate files) (default ${fnt_bld}${drc_tmp}${fnt_nrm})"
     echo "${fnt_rvr}-u${fnt_nrm} ${fnt_bld}unq_sfx${fnt_nrm}  Unique suffix (prevents intermediate files from sharing names) (default ${fnt_bld}${unq_sfx}${fnt_nrm})"
     echo "${fnt_rvr}-V${fnt_nrm} ${fnt_bld}var_rgr${fnt_nrm}  CF template variable (empty means none) (default ${fnt_bld}${var_rgr}${fnt_nrm})"
     echo "${fnt_rvr}-v${fnt_nrm} ${fnt_bld}var_lst${fnt_nrm}  Variable list (empty means all) (default ${fnt_bld}${var_lst}${fnt_nrm})"
@@ -1146,6 +1155,8 @@ fi # !par_typ
 if [ "${cln_flg}" = 'Yes' ]; then
     printf "Cleaning-up intermediate files...\n"
     /bin/rm -f ${att_fl} ${grd_dst_dfl} ${grd_src_dfl} ${map_fl_dfl} ${msh_fl_dfl} ${ncwa_fl} ${pdq_fl} ${tmp_out_fl} ${znl_fl/znl/znl1} ${znl_fl/znl/znl2}
+else # !cln_flg
+    printf "Explicitly instructed not to clean-up intermediate files.\n"
 fi # !cln_flg
 
 date_end=$(date +"%s")
diff --git a/debian/changelog b/debian/changelog
index 8d204a5..aa4ea0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+nco (4.6.2-1) unstable; urgency=low
+
+  * new upstream version JSON, multi-args, better behavior in modules
+
+ -- Charlie Zender <zender at uci.edu>  Thu, 16 Nov 2016 12:25:16 -0700
+
 nco (4.6.1-1) unstable; urgency=low
 
   * new upstream version nco_fl_mv(), cnk doc, ncremap crv, ncatted dot, ncclimo ncr md, ncflint -N, provenance
diff --git a/doc/ANNOUNCE b/doc/ANNOUNCE
index a7687b1..fd1a143 100644
--- a/doc/ANNOUNCE
+++ b/doc/ANNOUNCE
@@ -1,101 +1,107 @@
 $Header$ -*-text-*-
 
-The netCDF Operators NCO version 4.6.1 are ready. 
+The netCDF Operators NCO version 4.6.2 are ready. 
 
 http://nco.sf.net (Homepage, Mailing lists)
 http://github.com/nco (Source Code, Releases, Developers)
 
 What's new?
 
-4.6.1 ...
+4.6.2 is mainly a stability release to polish existing features and to
+add minor new ones. The exception is the new JSON backend. 
+NCO now prints CDL, "Traditional NCO", XML, and JSON. Babel-icious eh?
 
-As usual, ncremap continues to accrue useful features, the most
-notable of which is ...
+We built the JSON backend to help a project (DOE Terraref). 
+Our first choice was to adopt an off-the-shelf netCDF->JSON tool.
+However, no existing solution worked for us.
+JSON is a loose syntax, and we made necessary design choices that
+suited our application, and left some choices for later.
+Are there syntactical variants you want us to add?
 
-Work on NCO 4.6.2 has commenced and will better support regridding
-variables whose horizontal dimensions are not most-rapidly-varying.  
+Some users of netCDF version 4.4.1 cannot build NCO from scratch
+because a bug in the nc-config command kills NCO's 'configure;make'.
+Unidata will ship a corrected nc-config in netCDF 4.4.2.
+The 4.4.2-development branch already contains the necessary fix.
+
+Work on NCO 4.6.3 has commenced. Planned improvements include more
+flexibility in handling extensive variables during regridding, CMake
+support, and brackets for multi-dimensional array values in JSON.
 
 Enjoy,
 Charlie
 
 NEW FEATURES (full details always in ChangeLog):
 
-A. ncks supports new provenance features released in netCDF-4.4.1.
-   These provenance (and other) metadata are revealed by the --hdn (or
-   --hidden) switch when dumping global metadata from a netCDF4 file:
-   ncks --cdl --hdn -M ~/nco/data/in_grp.nc
-
-A. Wenshan Wang of UCI contributed a Quick Reference Card suitable
-   for printing. Thanks, Wenshan!
-   http://nco.sf.net/nco_rfr_crd.pdf
-
-A. Add ncflint -N, --nrm, --normalize option so w1:=w1/(w1+w2), w2:=w2/(w1+w2)
-
-A. ncap2's array() function can now take a dimension list as the
-   third argument, e.g., n2=array(1.0,2.0,/$time,$lat,$lon/)
-   http://nco.sf.net/nco.html#ncap2
-
-A. ncclimo produces climatological monthly means, seasonal means, 
-   annual mean, and optionally regrids all these files. Like ncremap,
-   ncclimo is actually a front-end script to manage the complexity
-   of invoking the underlying operators (ncks for ncremap and ncra for
-   ncclimo). ncclimo produces climatologies starting from monthly-mean
-   files of most CESM-like model and observational data formats.
-   Invoke ncclimo with, e.g.,
-   ncclimo -s start_yr -e end_yr -c run_id -i drc_in -o drc_out
-   ncclimo -s 5 -e 10 -c hist -m ocn -i drc_in -o drc_out
-   ncclimo -s 1980 -e 2016 -c merra2_198001.nc -i drc_in -o drc_out
-   ncclimo has sophisticated parallelism and regridding options.
-   Datasets tested include ALM, CAM, CLM, CICE, CISM, CLM, MPAS-I,
-   MPAS-O, and POP. ncclimo resulted from work with the DOE ACME
-   project, and we are grateful for their support.
-   http://nco.sf.net/nco.html#ncclimo
-   http://nco.sf.net/nco.html#merra2
-
-A. ncap2 now works with pointers to variables and attributes.
-   This allows, e.g., loops over arbitrary sets of variables, and
-   make creating aggregations of variables much simpler. An ncap2
-   script that converts all float variables to double precision:
-   @all=get_vars_in();
-   *sz=@all.size();
-   for(idx=0;idx<sz;idx++){
-     @var_nm=sprint(@all(idx));
-     if(*@var_nm.type() == NC_FLOAT) *@var_nm=*@var_nm.double();
+A. JSON backend
+   Similar the CDL and XML backends, ncks now supports JSON.
+   To obtain JSON, use --jsn or --json instead of --cdl/--xml.
+   ncks --json -v one ~/nco/data/in.nc
+   {
+     "variables": {
+       "one": {
+         "type": "float",
+         "attributes": {
+           "long_name": "one"
+         },
+         "data": 1.0
+       }
+     }
    }
-   Congratulations Henry for finishing this impressive functionality! 
-   More documentation will be added in the coming weeks. For now,      
-   http://nco.sf.net/nco.html#ncap2
+   Other related options (-v, -g, -m, -M) have their usual meanings.     
+   The --jsn_att_fmt switch accesses formats of selectable verbosity.  
+   Thanks to Henry Butowsky for implementing the JSON backend,
+   and to Pedro Vicente and Chris Barker for helpful discussions. 
+   http://nco.sf.net/nco.html#json
+
+A. Multi-arguments refer to the format of command-line key-value pairs
+   that NCO uses to support four different features that can have too
+   many parameters to set via traditional command line arguments.
+   The four features are regridding (rgr), global-attribute-adding
+   (gaa), precision-preserving compression (ppc), and ENVI image
+   processing for the DOE Terraref project (trr). Formerly, users were
+   required to supply one value per command line option for these
+   features, e.g., 
+   "--rgr lat_nbr=64 --rgr lon_nbr=128 --rgr lat_grd=cap ..."
+   The new multi-argument feature allows users to aggregate multiple
+   key-value pairs per command line argument, e.g., 
+   "--rgr lat_nbr=64#lon_nbr=128#lat_grd=cap# ..."
+   Now all key-value pairs related to a single feature (like
+   regridding, compression) can be provided as one arument!
+
+   The string that delimits each pair is user-configurable and
+   defaults to a single hash "#". Change it with, e.g., --dlm=":".
+   Ensure your delimiters are not special shell characters, and are
+   escaped (with backslashes) if present in key or value strings. 
+   Thanks to Jerome Mao for implementing multi-arguments.
+   http://nco.sf.net/nco.html#mta
+
+A. All builds tested on LLVM 8.0.0 and GCC 6.2.1 toolchains.
 
 BUG FIXES:
 
-A. ncatted now allows special characters in attribute and variable
-   names. Previously, ncatted interpreted most special characters
-   as indicating a regular expression. Now ncatted first tries to
-   interpret most special characters as literals, and if that does
-   not work, then it interprets them as a regular expression.
-   Thanks to emontgomery for reporting the problem.
-
-A. ncap2 fixed handling of implicit array bounds for slabs of form
-   var(3:). Previously ncap2 would exit with an error.
-   http://nco.sf.net/nco.html#ncap2
+A. ncclimo and ncremap could fail if ${BASH_SOURCE[0]} is unavailable.
+   This could occur, e.g., with the dash shell and/or due to software
+   modules that modify users' environments. 
+   This portability issue has been resolved.
 
-A. When inferring grid coordinates from 2D files, ncremap in 4.6.0
-   sometimes would confuse dimension names with coordinate names.
-   This has been fixed. The workaround is to downgrade to 4.5.6 or
-   upgrade to 4.6.1.
+B. ncatted failed to implement NaN on some MinGW systems with, e.g.,
+   ncatted -O -a _FillValue,fll_val,m,f,nan ~/nco/data/in.nc ~/foo.nc
+   We think this has been fixed. The workaround is to upgrade or use
+   ncatted on *NIX or MacOS. Thanks to James Adams for reporting this.
 
-A. ncremap now automatically chooses distinct output spatial and
-   temporal bounds names when for non-rectangular output datasets.
-   Previously ncremap might use, e.g., "nbnd" for both. This failed
-   for curvilinear datasets.
+C. ncks CDL now prints correct tokens for uint, int64, uint64 types.
+   These are "ul", "ll", "ull", respectively. Previously NCO used
+   different tokens because ncgen <= 4.3.0 choked on "ll" formats.
+   So this was an intentional NCO "feature", not a bug.
+   Use ncgen >= 4.3.1 to parse these CDL files.
 
 KNOWN PROBLEMS DUE TO NCO:
 
    This section of ANNOUNCE reports and reminds users of the
    existence and severity of known, not yet fixed, problems. 
-   These problems occur with NCO 4.6.1 built/tested under
-   MacOS with netCDF 4.3.3.1 on HDF5 1.8.16 and with
-   Linux with netCDF 4.4.1-development (20160212) on HDF5 1.8.13.
+   These problems occur with NCO 4.6.2 built/tested under
+   MacOS 10.12.1 with netCDF 4.4.1 on HDF5 1.8.16 and with
+   Linux with netCDF 4.4.2-development (20161116) on HDF5 1.8.16.
 
 A. NOT YET FIXED (NCO problem)
    Correctly read arrays of NC_STRING with embedded delimiters in ncatted arguments
@@ -148,11 +154,23 @@ B. NOT YET FIXED (netCDF4 library bug)
    20150924: Unidata confirmed problem
    20160212: Verified problem still exists in netCDF library
    20160512: Ditto
+   20161028: Verified problem still exists with netCDF 4.4.1
 
    Bug tracking: https://www.unidata.ucar.edu/jira/browse/fxm
    More details: http://nco.sf.net/nco.html#ncrename_crd
 
-C. NOT YET FIXED (would require DAP protocol change?)
+C. NOT YET FIXED (netCDF4 library bug)
+   nc-config/nf-config produce erroneous switches that cause NCO builds to fail
+   This problem (apparently) affects Linux not MacOS with netCDF 4.4.1
+
+   Demonstration:
+   nc-config --cflags # Produces extraneous text
+
+   20161029: Reported problem to Unidata
+   20161101: Unidata confirmed reproducibility, attributed to netCDF 4.4.1 changes
+   20161116: Unidata patch is in tree for netCDF 4.4.2 release
+
+D. NOT YET FIXED (would require DAP protocol change?)
    Unable to retrieve contents of variables including period '.' in name
    Periods are legal characters in netCDF variable names.
    Metadata are returned successfully, data are not.
@@ -167,7 +185,7 @@ C. NOT YET FIXED (would require DAP protocol change?)
 
    Bug tracking: https://www.unidata.ucar.edu/jira/browse/NCF-47
 
-D. NOT YET FIXED (would require DAP protocol change)
+E. NOT YET FIXED (would require DAP protocol change)
    Correctly read scalar characters over DAP.
    DAP non-transparency: Works locally, fails through DAP server.
    Problem, IMHO, is with DAP definition/protocol
diff --git a/doc/ChangeLog b/doc/ChangeLog
index d7cbec4..4aeb7fa 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,7 +1,240 @@
+2016-11-16  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.2 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.2 final changes';git push
+	git tag -a 4.6.2 -m 'Version 4.6.2 new features: multi-argument documentation, ncap2 value_list simplification, JSON indentation';git push --tags
+
+	* Henry fixed regular brace staircases in JSON
+
+2016-11-15  Charlie Zender  <zender at uci.edu>
+
+	* Tweak JSON indentation
+
+2016-11-14  Charlie Zender  <zender at uci.edu>
+
+	* Update hidden attribute documentation
+
+2016-11-14  Henry Butowsky  <henryb at hush.com>
+
+	* Modify ncap2 value_list() so all values same type as first element
+	  Previously the final type equalled "highest" type in list
+
+2016-11-13  Charlie Zender  <zender at uci.edu>
+
+	* Document multi-arguments
+
+2016-11-12  Charlie Zender  <zender at uci.edu>
+
+	* Tidy JSON documentation
+
+	* --jsn_att_fmt automatically triggers --json
+
+	* NCO 4.6.2-beta03 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.2-beta03 final changes';git push
+	git tag -a 4.6.2-beta03 -m 'Version 4.6.2-beta03 new features: uint, int64, uint64 suffixes';git push --tags
+
+	* Henry added NCO_PATH environment variable for ncap2 #include searches
+
+2016-11-10  Charlie Zender  <zender at uci.edu>
+
+	* Update CDL attribute tags for uint, int64, uint64 to "ul", "ll", "ull", respectively
+	This may break builds on netCDF <= 4.3.0 because ncgen chokes on "ll" syntax
+	This is why att_var is in in_4.cdl and not in in_grp.cdl
+
+2016-11-09  Charlie Zender  <zender at uci.edu>
+
+	* Document JSON options in nco.texi
+
+2016-11-08  Charlie Zender  <zender at uci.edu>
+
+	* Expose JSON options in documentation
+
+	* Fix help options for fl_fmt to include 64bit_data/CDF5
+
+	* Henry added capability for increasing default level of attribute verbosity, now named jsn_att_fmt
+
+2016-11-07  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.2-beta02 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.2-beta02 final changes';git push
+	git tag -a 4.6.2-beta02 -m 'Version 4.6.2-beta02 new features: MSVC/C++ compliance, JSON "attributes" and "variables" blocks';git push --tags
+
+	* Henry added "attributes" and "variables" blocks to JSON backend
+
+2016-11-06  Charlie Zender  <zender at uci.edu>
+
+	* Make nco_mta.[ch] C++-compliant
+
+	* Re-prototype nco_join_sng() to avert compiler warnings
+
+	* Add strsep() replacement code for MSVC
+
+2016-11-04  Charlie Zender  <zender at uci.edu>
+
+	* Implement/use jsn_typ_nm() to define JSON types
+
+	* Draft fix so ncatted understands NaN on MinGW
+
+2016-11-03  Charlie Zender  <zender at uci.edu>
+
+	* Fix C++ (and thus Windows) build
+
+	* NCO 4.6.2-beta01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.2-beta01 final changes';git push
+	git tag -a 4.6.2-beta01 -m 'Version 4.6.2-beta01 new features: mta backslashes, concise warnings, JSON';git push --tags
+
+	* Tidy JSON output whitespace
+
+2016-11-03  Henry Butowsky  <henryb at hush.com>
+
+	* First cut of JSON output from ncks
+
+2016-10-25  Charlie Zender  <zender at uci.edu>
+
+	* Limit number of non-CCW errors
+
+	* Clarify missing value error message for multi-arguments
+
+2016-10-22  Charlie Zender  <zender at uci.edu>
+
+	* Clarify how to create new record dimensions in ncra/ncrcat messages
+
+2016-10-13  Charlie Zender  <zender at uci.edu>
+
+	* ncremap now loads ncl module on edison to find ESMF_RegridWeightGen
+
+2016-10-12  Charlie Zender  <zender at uci.edu>
+
+	* Add HINT to multi-arg error handling, NCO'ize routines
+
+2016-10-11  Charlie Zender  <zender at uci.edu>
+
+	* Suppress all but first WARNING from nco_is_spc_in_cf_att()
+
+2016-10-10  Charlie Zender  <zender at uci.edu>
+
+	* Jerome added support for double-backslash quoting in multi-arguments
+
+2016-10-07  Charlie Zender  <zender at uci.edu>
+
+	* Jerome changed multi-args to use strstr() instead of strtok() or strsep()
+
+2016-10-02  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.2-alpha02 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.2-alpha02 final changes';git push
+	git tag -a 4.6.2-alpha02 -m 'Version 4.6.2-alpha02 new features: multi-arguments (nco_mta.[ch]), ARFLAGS, LLVM 8.0.0, GCC 6.2.1';git push --tags
+
+	* nco_rgr_ini() now only calls nco_arg_mlt_prs() when rgr_arg_nbr > 0
+
+2016-10-01  Charlie Zender  <zender at uci.edu>
+
+	* Alter nco_mta_get() to initialize delimiter if NULL
+
+	* Makefile sets ARFLAGS to rsUv (U is new) to create non-deterministic library archives
+	Prevents GCC toolchain i18n warnings on Ubuntu 16.04 (xenial) and later
+
+2016-09-30  Charlie Zender  <zender at uci.edu>
+
+	* Fix compiler warnings emitted by clang LLVM 8.0.0
+
+	* Update configure.ac MAKEINFO_VERSION to grep for texinfo so MacOS 'texi2any' works
+
+	* #include netcdf_mem.h for nc_open_mem() prototype
+
+	* Fix compiler warnings emitted by GCC 6.2.1
+
+2016-09-26  Charlie Zender  <zender at uci.edu>
+
+	* Fix false-positives in multi-argument regression tests
+
+2016-09-26  Charlie Zender  <zender at uci.edu>
+
+	* Adopt Jerome's implementation of multi-arg for trr, rgr, gaa, ppc
+
+2016-09-23  Charlie Zender  <zender at uci.edu>
+
+	* Split multi-argument parsing and KVM routines into nco_mta.[ch]
+
+2016-09-23  Henry Butowsky  <henryb at hush.com>
+
+	* Add manual section on vpointers
+
+2016-09-21  Charlie Zender  <zender at uci.edu>
+
+	* Improve exact non-spherical area solution
+
+2016-09-21  Henry Butowsky  <henryb at hush.com>
+
+	* Modify prn_cls(), change snprint() to sprint4, document sprint() and sprint4()
+
+2016-09-18  Charlie Zender  <zender at uci.edu>
+
+	* Add exact solution (untested) for non-spherical area of latitude-triangles
+
+	* Change multi-argument delimiter from colon to hash
+
+	* Add nco_lon_dff_brnch_rdn() to enforce branch-cut rules in area diagnosis
+
+2016-09-16  Charlie Zender  <zender at uci.edu>
+
+	* Provide HINT when dimensions have size mismatch due to degenerate dimension
+
+2016-09-15  Charlie Zender  <zender at uci.edu>
+
+	* Change multi-argument delimiter from semi-colon to colon
+
+2016-09-14  Charlie Zender  <zender at uci.edu>
+
+	* Merge Jerome Mao's update/improvement of multi-argument parsing
+
+2016-09-09  Henry Butowsky  <henryb at hush.com>
+
+	* Updated manual section on ncap2/print (need to finalize form of sprint() & snprint())
+
+2016-09-01  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.1-gmd_ppc release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.1-gmd_ppc final changes';git pus
+	git tag -a 4.6.1-gmd_ppc -m 'Same as version 4.6.2-alpha01. Zenodo tag for GMD PPC paper.';git push --tags
+
+2016-08-31  Charlie Zender  <zender at uci.edu>
+
+	* git tag -a 4.6.2-alpha01-zenodo -m 'Same as version 4.6.2-alpha01. Second attempt at Zenodo release for PPC paper.';git push --tags
+
+	* NCO 4.6.2-alpha01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.2-alpha01 final changes';git push
+	git tag -a 4.6.2-alpha01 -m 'Version 4.6.2-alpha01 new features: fall-back if BASH_SOURCE fails; first Zenodo release for PPC paper';git push --tags
+
+2016-08-24  Charlie Zender  <zender at uci.edu>
+
+	* Note in ncra.c tagged 20160824 on how to fix --cb to work for multiple-record input files and hyperslabs
+
+2016-08-24  Henry Butowsky  <henryb at hush.com>
+
+	* Document ncap2 function create_bounds()
+
+2016-08-23  Charlie Zender  <zender at uci.edu>
+
+	* Split finding NCO path from finding script path
+
+2016-08-22  Charlie Zender  <zender at uci.edu>
+
+	* Add -U drc_tmp switch to ncremap documentation
+
+2016-08-09  Charlie Zender  <zender at uci.edu>
+
+	* Implement fall-back in case BASH_SOURCE does not work
+
+	* Add [[ -z "${spt_src}" ]] && spt_src="${0}" in case BASH_SOURCE does not work
+
+	* Change spt_nm=$(basename ${BASH_SOURCE[0]}) to spt_nm=$(basename ${spt_src}). Former fails for Jerome and on Edison
+
 2016-08-06  Charlie Zender  <zender at uci.edu>
 
 	* NCO 4.6.1 release procedure:
 	cd ~/nco;git commit -a -m 'Version 4.6.1 final changes';git push
+	git tag -d 4.6.1;git push origin :refs/tags/4.6.1
 	git tag -a 4.6.1 -m 'Version 4.6.1 new features: nco_fl_mv(), cnk doc, ncremap crv, ncatted dot, ncclimo ncr md, ncflint -N, provenance';git push --tags
 
 2016-08-04  Charlie Zender  <zender at uci.edu>
@@ -10,7 +243,7 @@
 	cd ~/nco;git commit -a -m 'Version 4.6.1-beta01 final changes';git push
 	git tag -a 4.6.1-beta01 -m 'Version 4.6.1-beta01 new features: ncremap crv, constance, nco_fl_mv(), cnk';git push --tags
 
-	* ncremap: give-up on confirming overwriting existing maps until it works in interactive shells only
+	* ncremap: gave-up confirming overwriting existing maps until it works in interactive shells only
 
 	* Use different output dimensions bounds names for mappings to curvilinear axes
 	Default is now to use temporal bounds name for spatial bounds for rectangular grids,
diff --git a/doc/MANIFEST b/doc/MANIFEST
index cd964b9..8526641 100644
--- a/doc/MANIFEST
+++ b/doc/MANIFEST
@@ -274,6 +274,8 @@ nco/src/nco/nco_mmr.h
 nco/src/nco/nco_mpi.h
 nco/src/nco/nco_msa.c
 nco/src/nco/nco_msa.h
+nco/src/nco/nco_mta.c
+nco/src/nco/nco_mta.h
 nco/src/nco/nco_mss_val.c
 nco/src/nco/nco_mss_val.h
 nco/src/nco/nco_netcdf.c	NCO-independent C wrappers for libnetcdf
diff --git a/doc/README_msvc.txt b/doc/README_msvc.txt
index 84a4f13..11a4a38 100644
--- a/doc/README_msvc.txt
+++ b/doc/README_msvc.txt
@@ -1,4 +1,4 @@
-Microsoft Windows Visual Studio 2010 (MSVC) build instructions:
+Microsoft Windows Visual Studio 2015 (MSVC) build instructions:
 
 Building the NCO source code from within Visual Studio is an easy process, consisting of 2 steps:
 
diff --git a/doc/TODO b/doc/TODO
index b9f5464..d1d5455 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -680,10 +680,16 @@ nco1128. nco: ncrename --lowercase --uppercase options? MERRA2 merra
        ncrename --lowercase --var .ONE,.TWO,... in.nc out.nc
 nco1129. ncks allow --mk_rec_dmn to change multiple dimensions at one time
        ncks -O --mk_rec_dmn lat,lon ~/nco/data/in_grp.nc ~/foo.nc
-nco1130. ncatted support for '.' (dot) in names (reported by emontgomery 20170726)
+nco1130. ncatted support for '.' (dot) in names (reported by emontgomery 20160726 fixed 20160729)
        ncatted treats dot.name as rx then fails to find match
        ncatted -O -a dot.name,global,o,c,value ~/nco/data/in.nc ~/foo.nc
-nco1131. 
+nco1131. nco: ncra --cb wrong unless single record per input file (see note tagged 20160824 in ncra.c)
+       ncks -O -v three_dmn_var_dbl ~/nco/data/in.nc ~/foo.nc
+       ncra -O --cb -d time,3,6 -v three_dmn_var_dbl ~/foo.nc ~/foo2.nc
+       ncks --cdl -v climatology_bounds ~/foo2.nc
+       climatology_bounds are [0.5,1.5] but should be [2.5,6.5]
+nco1132. nco: ncclimo fails when input files have different variable orders. Allow user to suppress cb, or make ncra.c re-read cb IDs each file (Guido 20161101)
+nco1133.
 qrk
 ************************************************************************
 End ncoXXX TODOs
diff --git a/doc/VERSION b/doc/VERSION
index 8ac28bf..c78c496 100644
--- a/doc/VERSION
+++ b/doc/VERSION
@@ -1 +1 @@
-4.6.1
+4.6.2
diff --git a/doc/debian.txt b/doc/debian.txt
index 80714c3..e3eecea 100644
--- a/doc/debian.txt
+++ b/doc/debian.txt
@@ -29,18 +29,18 @@ apt-get install dh-make debhelper devscripts fakeroot gnupg debian-policy develo
 
 2. Debian build procedure recommends placing entire package source in
    subdirectory of main package. 
-   For starters, we wish to create .debs of tagged releases, e.g., nco-4.6.1
-   First we create a clean source distribution of nco and place it in nco-4.6.1
+   For starters, we wish to create .debs of tagged releases, e.g., nco-4.6.2
+   First we create a clean source distribution of nco and place it in nco-4.6.2
    Until we know what is necessary, however, we just copy a snapshot
    
    2.1 Clean all build files from development directory
 
 cd ~/nco;make distclean;cd bld;make clean;cd ~
 tar cvzf ./nco/nco.tar.gz ./nco/*
-cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-4.6.1
-/bin/rm nco.tar.gz;tar cvzf nco-4.6.1.tar.gz ./nco-4.6.1/*
-cd ~/nco/nco-4.6.1
-dh_make -e zender at uci.edu -f ../nco-4.6.1.tar.gz
+cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-4.6.2
+/bin/rm nco.tar.gz;tar cvzf nco-4.6.2.tar.gz ./nco-4.6.2/*
+cd ~/nco/nco-4.6.2
+dh_make -e zender at uci.edu -f ../nco-4.6.2.tar.gz
 
     2.2 The preceding steps created template debian files for a .deb,
     Those files now reside in ~/nco/debian.
@@ -55,7 +55,7 @@ dh_make -e zender at uci.edu -f ../nco-4.6.1.tar.gz
    from previous build
 
    cd ~/nco;/bin/rm *.gz
-   cd ~/nco/nco-4.6.1
+   cd ~/nco/nco-4.6.2
    dpkg-buildpackage -rfakeroot > foo 2>&1
    dpkg-buildpackage -rsudo > foo 2>&1
 
@@ -84,33 +84,33 @@ patch -p0 < nco_X.Y.Z-3.diff   # Patch destination with Debian diff
    make tags
 # Put cute version-specific string in nco_ctl.c:nco_nmn_get()
 # Install correct version numbers before updating Debian
-# tags-query replace 4.6.1 with X.Y.Z+1
+# tags-query replace 4.6.2 with X.Y.Z+1
 # If tags-query replace does not work, be sure to manually change
 # versions in configure.ac, debian/files, doc/ANNOUNCE, doc/debian.txt,
 # doc/index.shtml, doc/nco.texi, bld/nco_dst.pl, doc/VERSION
 # 20141201: Change NCO_VERSION_PATCH in src/nco.h!!!!!!!!!!!!!!!!!!!!!!
-   cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 4.6.1-1 # Update changelog (-b forces this version number)
+   cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 4.6.2-1 # Update changelog (-b forces this version number)
    emacs ~/nco/bld/nco.spec # Update changelog
 # For unknown reason rules file may lose its executable bit
    chmod a+x ~/nco/debian/rules
 # Rebuild autotools so new version # propagates
    cd ~/nco;aclocal;autoheader;automake --foreign;autoconf
 # Save all files in emacs before tagging
-   ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.1
+   ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.2
 # Upload tarball to SF https://sourceforge.net/projects/nco/files 
-   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.6.1.tar.gz .
+   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.6.2.tar.gz .
 
 7. Ubuntu PPA
 https://help.launchpad.net/Packaging/PPA
-dput NCO nco_4.6.1-2~ppa1_source.changes
+dput NCO nco_4.6.2-2~ppa1_source.changes
 sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com
 
 # Location of build diagnostics for mentors to help 
-http://dust.ess.uci.edu/nco/src/nco_4.6.1-1.dpkg-buildpackage.txt
-http://dust.ess.uci.edu/nco/src/nco_4.6.1-1.dsc
-http://dust.ess.uci.edu/nco/src/nco_4.6.1-1_i386.changes
-http://dust.ess.uci.edu/nco/src/nco_4.6.1-1_i386.deb
-http://dust.ess.uci.edu/nco/src/nco_4.6.1.orig.tar.gz
+http://dust.ess.uci.edu/nco/src/nco_4.6.2-1.dpkg-buildpackage.txt
+http://dust.ess.uci.edu/nco/src/nco_4.6.2-1.dsc
+http://dust.ess.uci.edu/nco/src/nco_4.6.2-1_i386.changes
+http://dust.ess.uci.edu/nco/src/nco_4.6.2-1_i386.deb
+http://dust.ess.uci.edu/nco/src/nco_4.6.2.orig.tar.gz
 
 # Becoming a Debian developer
 http://www.debian.org/devel/join/newmaint
@@ -164,31 +164,31 @@ Matej Vela <vela at debian.org>, Daniel Baumann <daniel at debian.org>, Warren Turkal
 # export LD_LIBRARY_PATH=/usr/lib:/lib:/usr/X11R6/lib
 # sudo aptitude install antlr bison flex gsl-bin libgsl0-dev libantlr-dev netcdf-bin libnetcdfc7 libnetcdf-dev texinfo libcurl4-gnutls-dev libexpat1-dev libxml2-dev udunits-bin libudunits2-0 libudunits2-dev
 cd ~/nco;cvc
-sudo /bin/rm -rf ${DATA}/nco-4.6.1 ${DATA}/nco_4.6.1* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.1-1 -d nco-4.6.1 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-4.6.1 nco # Export most recent
-tar cvzf ./nco_4.6.1.orig.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.1 
-/bin/rm -rf ${DATA}/nco-4.6.1 # Remove cvs-exported directory
-tar xvzf ./nco_4.6.1.orig.tar.gz # Untar to get directory without excluded files
-mkdir -p ${DATA}/nco-4.6.1/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.6.1/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.6.1/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
+sudo /bin/rm -rf ${DATA}/nco-4.6.2 ${DATA}/nco_4.6.2* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.2-1 -d nco-4.6.2 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-4.6.2 nco # Export most recent
+tar cvzf ./nco_4.6.2.orig.tar.gz --exclude='nco-4.6.2/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.2 
+/bin/rm -rf ${DATA}/nco-4.6.2 # Remove cvs-exported directory
+tar xvzf ./nco_4.6.2.orig.tar.gz # Untar to get directory without excluded files
+mkdir -p ${DATA}/nco-4.6.2/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.6.2/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.6.2/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
 #export DEB_BUILD_OPTIONS='disable-dap-netcdf disable-netcdf4 disable-udunits2'; # Disable optional packages based on available Debian support
-#cd ${DATA}/nco-4.6.1;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
-#cd ${DATA}/nco-4.6.1;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
-cd ${DATA}/nco-4.6.1;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
+#cd ${DATA}/nco-4.6.2;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
+#cd ${DATA}/nco-4.6.2;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
+cd ${DATA}/nco-4.6.2;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
 sudo dpkg --remove nco
-sudo dpkg --install ${DATA}/nco_4.6.1-1_*.deb
+sudo dpkg --install ${DATA}/nco_4.6.2-1_*.deb
 cd ~/nco/bld;MY_BIN_DIR=/usr/bin ../bm/nco_bm.pl --regress
 # http://lintian.debian.org/full/zender@uci.edu.html
-lintian ${DATA}/nco_4.6.1-1_*.deb
-ls -l ${DATA}/nco_4.6.1*
+lintian ${DATA}/nco_4.6.2-1_*.deb
+ls -l ${DATA}/nco_4.6.2*
 m ~/foo.nco
 # Upload Ubuntu (rather than Debian) packages to websites
-scp ${DATA}/nco_4.6.1* dust.ess.uci.edu:/var/www/html/nco/src
-scp ${DATA}/nco_4.6.1* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+scp ${DATA}/nco_4.6.2* dust.ess.uci.edu:/var/www/html/nco/src
+scp ${DATA}/nco_4.6.2* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 # NB: Make sure RPMs build before uploading to debian, since changing
 # Debian versions is a PITA
 # NB: Only upload pbuilder Debian Sid (not personal Ubuntu) .deb builds to Debian mentors
-# cd ${DATA};dupload -t mentors nco_4.6.1-1_*.changes
+# cd ${DATA};dupload -t mentors nco_4.6.2-1_*.changes
 bsrc # Reset shell environment for regular development
 
 # New build system #2
@@ -202,52 +202,52 @@ DIST=sid sudo pbuilder update # Update chroot before building package in it
 # dget http://ftp.debian.org/debian/pool/main/n/nco/nco_3.9.0-1.dsc
 # dget http://ftp.debian.org/debian/pool/main/n/netcdf/netcdf_3.6.1-1.dsc
 # apt-get source nco # Get package source
-sudo /bin/rm /var/cache/pbuilder/result/nco_4.6.1* # Cleanup prior build
+sudo /bin/rm /var/cache/pbuilder/result/nco_4.6.2* # Cleanup prior build
 # To pass DEB_BUILD_OPTIONS to pbuilder while using sudo, one must first
 # modify sudoers with visudo to prevent sudo from resetting environment
 #export DEB_BUILD_OPTIONS='disable-dap-netcdf disable-netcdf4 disable-udunits2'; # Disable optional packages based on available Debian support
-cd ${DATA};DIST=sid sudo pbuilder build nco_4.6.1-1.dsc > ~/foo.nco.pbuilder 2>&1
-cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.6.1-1_*.changes
-lintian /var/cache/pbuilder/result/nco_4.6.1-1_*.deb
+cd ${DATA};DIST=sid sudo pbuilder build nco_4.6.2-1.dsc > ~/foo.nco.pbuilder 2>&1
+cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.6.2-1_*.changes
+lintian /var/cache/pbuilder/result/nco_4.6.2-1_*.deb
 sudo dpkg --remove nco
-sudo dpkg --install /var/cache/pbuilder/result/nco_4.6.1-1_*.deb
+sudo dpkg --install /var/cache/pbuilder/result/nco_4.6.2-1_*.deb
 cd ~/nco/bld;MY_BIN_DIR=/usr/bin ../bm/nco_bm.pl --regress
 # NB: Upload pbuilder Debian Sid packages to Debian mentors, but not
 # to personal or NCO websites since most people use Ubuntu not Debian
 # NB: Debian versions are a PITA, ensure RPMs build before uploading to Debian
-cd /var/cache/pbuilder/result;dupload -t mentors nco_4.6.1-1_*.changes
+cd /var/cache/pbuilder/result;dupload -t mentors nco_4.6.2-1_*.changes
 
 # RPM builds as root
 export rpm_root='/usr/src/redhat'
 # export sudo_sng='' # sudo not-necessary when builing in user directories
 export sudo_sng='sudo' # sudo necessary when building in system directories
 cd ~/nco;cvc;cvu
-/bin/rm -rf ${DATA}/nco-4.6.1 ${DATA}/nco-4.6.1* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.6.2 ${DATA}/nco-4.6.2* # Cleanup last build
 ${sudo_sng} /bin/rm -r -f \
-${rpm_root}/BUILD/nco-4.6.1 \
-${rpm_root}/RPMS/i386/nco-4.6.1-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.1-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.1-?.i386.rpm \
-${rpm_root}/SOURCES/nco-4.6.1.tar.gz \
-${rpm_root}/SPECS/nco-4.6.1.spec \
-${rpm_root}/SRPMS/nco-4.6.1-?.src.rpm
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.1-1 -d nco-4.6.1 nco # Export based on tag
-${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.6.1.spec
-tar cvzf ./nco-4.6.1.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.1 
-${sudo_sng} /bin/cp ${DATA}/nco-4.6.1.tar.gz ${rpm_root}/SOURCES
+${rpm_root}/BUILD/nco-4.6.2 \
+${rpm_root}/RPMS/i386/nco-4.6.2-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.2-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.2-?.i386.rpm \
+${rpm_root}/SOURCES/nco-4.6.2.tar.gz \
+${rpm_root}/SPECS/nco-4.6.2.spec \
+${rpm_root}/SRPMS/nco-4.6.2-?.src.rpm
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.2-1 -d nco-4.6.2 nco # Export based on tag
+${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.6.2.spec
+tar cvzf ./nco-4.6.2.tar.gz --exclude='nco-4.6.2/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.2 
+${sudo_sng} /bin/cp ${DATA}/nco-4.6.2.tar.gz ${rpm_root}/SOURCES
 cd ${rpm_root}/SPECS
-${sudo_sng} rpmbuild -ba --sign nco-4.6.1.spec > ~/foo.nco 2>&1
+${sudo_sng} rpmbuild -ba --sign nco-4.6.2.spec > ~/foo.nco 2>&1
 scp \
-${rpm_root}/RPMS/i386/nco-4.6.1-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.1-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.1-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.6.1-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.6.2-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.2-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.2-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.6.2-?.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/RPMS/i386/nco-4.6.1-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.1-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.1-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.6.1-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.6.2-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.2-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.2-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.6.2-?.src.rpm \
 zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 
 # RPM builds as user
@@ -256,33 +256,33 @@ zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 export rpm_root="${DATA}/rpm/nco"
 #cd ~/nco;cvc;cvu # This risks committing unwanted *.[ch]pp files
 mkdir -p ${DATA}/rpm/nco/TMP ${DATA}/rpm/nco/BUILD
-/bin/rm -rf ${DATA}/nco-4.6.1 ${DATA}/nco-4.6.1* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.6.2 ${DATA}/nco-4.6.2* # Cleanup last build
 /bin/rm -r -f \
-${rpm_root}/nco-4.6.1-?.src.rpm \
-${rpm_root}/nco-4.6.1.spec \
-${rpm_root}/nco-4.6.1.tar.gz \
-${rpm_root}/*/nco-4.6.1-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.1-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.1-?.*.rpm
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.1-1 -d nco-4.6.1 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-4.6.1 nco # Export most recent and build as 4.6.1-1
-tar cvzf ./nco-4.6.1.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.1 
-/bin/cp ${DATA}/nco-4.6.1.tar.gz ${rpm_root}
+${rpm_root}/nco-4.6.2-?.src.rpm \
+${rpm_root}/nco-4.6.2.spec \
+${rpm_root}/nco-4.6.2.tar.gz \
+${rpm_root}/*/nco-4.6.2-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.2-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.2-?.*.rpm
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.2-1 -d nco-4.6.2 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-4.6.2 nco # Export most recent and build as 4.6.2-1
+tar cvzf ./nco-4.6.2.tar.gz --exclude='nco-4.6.2/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.2 
+/bin/cp ${DATA}/nco-4.6.2.tar.gz ${rpm_root}
 ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/nco.spec
 cd ${rpm_root}
 rpmbuild -ba --sign nco.spec > ~/foo.nco 2>&1
-rpmlint ${rpm_root}/*/nco-4.6.1-?.*.rpm
+rpmlint ${rpm_root}/*/nco-4.6.2-?.*.rpm
 sudo yum remove nco
-sudo yum install ${rpm_root}/*/nco-4.6.1-?.*.rpm
+sudo yum install ${rpm_root}/*/nco-4.6.2-?.*.rpm
 scp \
-${rpm_root}/*/nco-4.6.1-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.1-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.1-?.*.rpm \
-${rpm_root}/nco-4.6.1-?.*.src.rpm \
+${rpm_root}/*/nco-4.6.2-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.2-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.2-?.*.rpm \
+${rpm_root}/nco-4.6.2-?.*.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/*/nco-4.6.1-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.1-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.1-?.*.rpm \
-${rpm_root}/nco-4.6.1-?.*.src.rpm \
+${rpm_root}/*/nco-4.6.2-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.2-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.2-?.*.rpm \
+${rpm_root}/nco-4.6.2-?.*.src.rpm \
 zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
diff --git a/doc/index.shtml b/doc/index.shtml
index 74d2b88..5b821d0 100644
--- a/doc/index.shtml
+++ b/doc/index.shtml
@@ -87,7 +87,7 @@ Current stable NCO version is 4.6.1 released <!--#flastmod file="src/nco-4.6.1.t
 <li><a href="#RTFM">Documentation</a></li>
 <li><a href="#FAQ">FAQ</a></li>
 <li><a href="#Support">Help/Support/Contacts</a></li>
-<li><a href="#README/ChangeLog/TODO">README/ChangeLog/TODO</a></li>
+<li><a href="#ANNOUNCE/ChangeLog/README/TODO">ANNOUNCE/ChangeLog/README/TODO</a></li>
 <li><a href="#Source">Source Code</a></li>
 <li><a href="#bld">Compiling</a></li>
 <li><a href="#NCAR">Supercomputers</a></li>
@@ -149,13 +149,15 @@ and
 <h2>Recent Releases & Milestones</h2>
 
 <ul>
-<li>2016 Sep ??: 4.6.2 (<i>In progress</i>) -->
+<li>2016 Dec 16: 4.6.3 (<i>In progress</i>)
+<li>2016 Nov 16: 4.6.2 (JSON)
+<li>2016 Sep 19: <i>Geosci. Model Dev.</i> publishes PPC <a href="http://www.geosci-model-dev.net/9/3199/2016">paper</a></li>
 <li>2016 Aug 06: 4.6.1 (Stability)
-<li>2016 Jul 06: Submitted Layer-packing <a href="http://www.geosci-model-dev-discuss.net/gmd-2016-177">Manuscript</a> to <i>Geosci. Model Dev. Discuss.</i></li>
+<li>2016 Jul 06: Submitted Layer-packing <a href="http://www.geosci-model-dev-discuss.net/gmd-2016-177">manuscript</a> to <i>Geosci. Model Dev.</i></li>
 <li>2016 May 12: 4.6.0 (<tt>ncclimo</tt>)
 <li>2016 Apr 06: <a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201604.pdf">Poster</a> at NASA ESDSWG, Greenbelt</li>
 <li>2016 Apr 05: <a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201604.pdf">Talk</a> at NASA GES DISC, Greenbelt</li>
-<li>2016 Mar 22: Submitted PPC <a href="http://www.geosci-model-dev-discuss.net/gmd-2016-63">Manuscript</a> to <i>Geosci. Model Dev. Discuss.</i></li>
+<li>2016 Mar 22: Submitted PPC manuscript to <i>Geosci. Model Dev.</i></li>
 <li>2016 Feb 17: 4.5.5 (Stability)
 <li>2016 Jan 07: 4.5.4 (<tt>ncremap</tt>)
 <li>2015 Dec 16: <a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201512.pdf">Poster</a> at Fall AGU, San Francisco</li>
@@ -554,47 +556,51 @@ climate models (see <a href="#pub">publications</a>).</p>
 <h2>Publications and Presentations</h2>
 <ul>
 <li><!-- Zen16 --> <a name="Zen16"></a> <!--http://www.ess.uci.edu/~zender#Zen16 -->
+Zender, C.  S. (2016), Bit Grooming: Statistically accurate precision-preserving quantization with compression, evaluated in the netCDF Operators (NCO, v4.4.8+), <i>Geosci. Model Dev.</i>, <b>9</b>, 3199–3211, doi:10.5194/gmd-9-3199-2016.
+<a href="http://dust.ess.uci.edu/ppr/ppr_Zen16.pdf">PDF</a></li>
+  
+<li><!-- Zen16 --> <a name="Zen16"></a> <!--http://www.ess.uci.edu/~zender#Zen16 -->
 Zender, C. S. (2016): Regrid Curvilinear, Rectangular, and Unstructured Data (CRUD) with ncremap, a new netCDF Operator. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Greenbelt, MD, April 6--8, 2016.
-<a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201604.pdf">PDF</a> (© 2014 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201604.pdf">PDF</a></li>
 
 <li><!-- Zen16 --> <a name="Zen16"></a> <!--http://www.ess.uci.edu/~zender#Zen16 -->
 Zender, C. S. (2016): Regridding Swath, Curvilinear, Rectangular, and Unstructured Data (SCRUD). Presented to the NASA Goddard Earth Sciences (GES) Data and Information Services Center (DISC), Goddard Space Flight Center, Greenbelt, MD, April 5, 2016.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201604.pdf">PDF</a> (© 2014 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201604.pdf">PDF</a></li>
 
 <li><!-- Zen15 --> <a name="Zen15"></a> <!--http://www.ess.uci.edu/~zender#Zen15 -->
 Zender, C. S. (2015): Regrid Curvilinear, Rectangular, and Unstructured Data (CRUD) with ncremap, a new netCDF Operator. Presented to the American Geophysical Union Fall Meeting, San Francisco, CA, December 14--18, 2015. <i>Eos Trans. AGU</i>, <b>95</b>(54), Fall Meet. Suppl., Abstract IN31A-1744.
-<a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201512.pdf">PDF</a> (© 2014 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201512.pdf">PDF</a></li>
 
 <li><!-- Zen15 --> <a name="Zen15"></a> <!--http://www.ess.uci.edu/~zender#Zen15 -->
 Zender, C. S. (2015): Optimizing Intrinsic Parallelism to generate climatologies with netCDF Operators (NCO). Presented to the DOE Accelerated Climate Modeling for Energy (ACME) PI Meeting, Albuquerque, NM, November 2--4, 2015.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_acme_201511.pdf">PDF</a> (© 2014 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_acme_201511.pdf">PDF</a></li>
 
 <li><!-- ZVW15 --> <a name="ZVW15"></a> <!--http://www.ess.uci.edu/~zender#ZVW15 -->
 Zender, C. S., P. Vicente, and W. Wang (2015): Use netCDF Operators (NCO) to Improve Data Interoperability and Usability. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Greenbelt, MD, March 24--26, 2015.
-<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201503.pdf">PDF</a> (© 2014 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201503.pdf">PDF</a></li>
 
 <li><!-- ZVW14 --> <a name="ZVW14"></a> <!--http://www.ess.uci.edu/~zender#ZVW14 -->
 Zender, C. S., P. Vicente, and W. Wang (2014): Simplifying and accelerating model evaluation by NASA satellite data. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Greenbelt, MD, March 24--26, 2014.
-<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201403.pdf">PDF</a> (© 2014 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201403.pdf">PDF</a></li>
 
 <li><!-- Zen14 --> <a name="Zen14"></a> <!--http://www.ess.uci.edu/~zender#Zen14 -->
 Zender, C. S. (2014): <i>Use Hierarchical Storage and Analysis to Exploit Intrinsic Parallelism</i>. Presented to the NASA Goddard Earth Sciences (GES) Data and Information Services Center (DISC), Goddard Space Flight Center, Greenbelt, MD, March 27, 2014.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201403.pdf">PDF</a> (© 2014 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201403.pdf">PDF</a></li>
 
 <li><!-- ZVW13 --> <a name="ZVW13"></a> <!--http://www.ess.uci.edu/~zender#ZVW13 -->
 Zender, C. S., P. Vicente and W. Wang (2013): <i>Use Hierarchical Storage and Analysis to Exploit Intrinsic Parallelism</i>. Presented at the Fall Meeting of the American Geophysical Union, San Francisco, CA, December 9–13, 2013. <i>Eos Trans. AGU</i>, <b>93</b>(53), Fall Meet. Suppl., Abstract IN52A-06.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201312.pdf">PDF</a> (© 2013 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201312.pdf">PDF</a></li>
 
 <li><!-- ZVW13 --> <a name="ZVW13"></a> <!--http://www.ess.uci.edu/~zender#ZVW13 -->
-Zender, C. S., P. Vicente and W. Wang (2013): <i>The Future of Model Evaluation</i>. Presented to the Chapman University Symposium on Big Data and Analytics: 44th Symposium on the Interface of Computing Science and Statistics, Chapman University, Orange, CA, April 4–6, 2013. <a href="http://dust.ess.uci.edu/smn/smn_nco_chapman_201304.pdf">PDF</a> (© 2013 by me)</li>
+Zender, C. S., P. Vicente and W. Wang (2013): <i>The Future of Model Evaluation</i>. Presented to the Chapman University Symposium on Big Data and Analytics: 44th Symposium on the Interface of Computing Science and Statistics, Chapman University, Orange, CA, April 4–6, 2013. <a href="http://dust.ess.uci.edu/smn/smn_nco_chapman_201304.pdf">PDF</a></li>
 
 <li><!-- ZVW12 --> <a name="ZVW12"></a> <!--http://www.ess.uci.edu/~zender#ZVW12 -->
 Zender, C. S., P. Vicente and W. Wang (2012): <i>NCO: Simpler and faster model evaluation by NASA satellite data via unified file-level netCDF and HDF-EOS data post-processing tools.</i>. Presented at the Fall Meeting of the American Geophysical Union, San Francisco, CA, December 3–7, 2012. <i>Eos Trans. AGU</i>, <b>93</b>(53), Fall Meet. Suppl., Abstract IN34A-07.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201212.pdf">PDF</a> (© 2012 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201212.pdf">PDF</a></li>
 
 <li><!-- ZVW12 --> <a name="ZVW12"></a> <!--http://www.ess.uci.edu/~zender#ZVW12 -->
 Zender, C. S., P. Vicente and W. Wang (2012): <i>Simplifying and accelerating model evaluation by NASA satellite data.</i>. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Annapolis MD, November 13–15, 2012.
-<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201211.pdf">PDF</a> (© 2012 by me)</li>
+<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201211.pdf">PDF</a></li>
 
 <li><a href="./prs_pbl_old.shtml">Presentation and Publications from 2006–2011</a></li>
 
@@ -613,17 +619,21 @@ continuity.
 You may retrieve the source of tagged versions directly with, e.g.,
 <tt>git clone -b 4.6.1 http://github.com/nco/nco.git nco-4.6.1</tt></a>.
 <ul>
-<li><b>NCO 4.6.2</b>: (<i>Future</i>) 
+<li><b>NCO 4.6.4</b>: (<i>Future</i>) 
 <tt>ncks</tt> prints human-legible ISO8601 dates;
 <a href="http://nco.sf.net/nco.html#cnk">Chunking</a> bytes not elements, caching;
-<tt>ncks</tt> prints human-legible ISO8601 dates;
 extensive hashing?;
 netCDF4 compound types?;
-<tt>ncks --xtn</tt> better extensive variable treatment;
-<tt>ncremap</tt> use CF to find coordinates;
-<tt>ncks --xtn</tt> better extensive variable treatment;
 Optimize diskless files?;</li>
-<li><b>NCO 4.6.1</b>: (<i>In Progress, features in-progress or completed include</i>)
+<li><b>NCO 4.6.3</b>: (<i>In Progress, features in-progress or completed include</i>)
+CMake build option;</li>
+<tt>ncks --json</tt> prints strided brackets for multi-dimensional arrays;
+<tt>ncks --xtn</tt> better extensive variable treatment;</li>
+<li><b>NCO 4.6.2</b>: (<i>Current Stable Release</i>)
+Improved <tt>ncclimo, ncremap</tt> behavior in <tt>module</tt> environments;
+<tt>ncks --json</tt> for JSON output;
+Multi-argument support for <tt>--gaa</tt>, <tt>--rgr</tt>, <tt>--ppc</tt>, <tt>--trr</tt> options;</li>
+<li><b>NCO 4.6.1</b>:
 <tt>ncclimo</tt> incremental mode;
 <tt>ncflint -N</tt> normalization;</li>
 <li><b>NCO 4.6.0</b>: 
@@ -637,13 +647,13 @@ Optimize diskless files?;</li>
 <tt>ncra --cb</tt> climatology bounds
 <tt>ncremap</tt> uses CF to find coordinates;
 <tt>ncremap</tt> uses $TMPDIR;</li>
-<li><b>NCO 4.5.5</b>: (<i>Current Stable Release</i>)
+<li><b>NCO 4.5.5</b>:
 All operators support CDF5 format;
 <tt>ncap2</tt> fix negative dimension indices handling;
 <tt>ncremap -P airs,hirdls,mls,mpas</tt>;
 <tt>nces/ncra</tt> fix <tt>-y mebs</tt> normalization, add <tt>-y tabs</tt>;
 <tt>ncatted/ncrename/ncpdq</tt> fix <tt>--gaa</tt>;</li>
-<li><b>NCO 4.5.4</b>: (<i>Current Stable Release</i>)
+<li><b>NCO 4.5.4</b>:
 <tt>ncap2</tt> syntax simplification/fixes;
 <tt>ncks -V</tt> bugfix;
 <tt>ncks</tt> XML <tt>_Unsigned</tt> attribute;
@@ -773,18 +783,14 @@ Thanks to Rich Signell, Filipe Fernandes (and others?) for developing and mainta
 <li><a href="http://www.debian.org">Debian</a> and <a href="http://www.ubuntu.com">Ubuntu</a> GNU/Linux-compatible Intel systems, prebuilt binary executable <a href="http://www.debian.org">deb</a>: <a href="http://packages.debian.org/testing/math/nco.html">nco-4.6.1</a></li>
 -->
 <a href="http://packages.debian.org/unstable/science/nco">Debian NCO</a> and 
-<a href="http://packages.ubuntu.com/natty/nco">Ubuntu NCO</a> homepages.
+<a href="https://launchpad.net/ubuntu/+source/nco">Ubuntu NCO</a> homepages.
 ‘<tt>aptitude install nco</tt>’ installs the standard NCO for your Debian-compatible OS.
-NCO packages in the Debian/Ubuntu repositories (i.e., Sid and Raring) generally lag the packages distributed here by 6–12 months.
+NCO packages in the Debian/Ubuntu repositories (e.g., Sid and Raring) generally lag the packages distributed here by 6–12 months.
 <a name="beta"></a><a name="prerelease"> <!-- http://nco.sf.net#beta -->
 Newer (beta- or pre-release) packages are often available for intrepid Debian/Ubuntu users as described <a href="https://github.com/nco/nco/tree/master/doc/beta.txt">here</a>.
 <dt>Debian package for most recent NCO release (install with, e.g., ‘<tt>dpkg --install nco_4.6.1-1_i386.deb</tt>’):</dt>
-<li><a href="src/nco_4.6.1-1_amd64.deb">nco_4.6.1-1_amd64.deb</a> (<!--#fsize file="src/nco_4.6.1-1_amd64.deb"-->): Executables AMD64-compatible (last updated <!--#flastmod file="src/nco_4.6.1-1_amd64.deb"-->)</li>
-<li><a href="src/nco_4.6.1-1.dsc">nco_4.6.1-1.dsc</a> (<!--#fsize file="src/nco_4.6.1-1.dsc"-->): Description (last updated <!--#flastmod file="src/nco_4.6.1-1.dsc"-->)</li>
-<li><a href="src/nco_4.6.1-1_amd64.changes">nco_4.6.1-1_amd64.changes</a> (<!--#fsize file="src/nco_4.6.1-1_amd64.changes"-->): Changes since last deb package (last updated <!--#flastmod file="src/nco_4.6.1-1_amd64.changes"-->)</li>
-<li><a href="src/nco_4.6.1.orig.tar.gz">nco_4.6.1.orig.tar.gz</a> (<!--#fsize file="src/nco_4.6.1.orig.tar.gz"-->): Upstream Source (last updated <!--#flastmod file="src/nco_4.6.1.orig.tar.gz"-->)</li>
-<li><a href="src/nco_4.6.1-1.diff.gz">nco_4.6.1-1.diff.gz</a> (<!--#fsize file="src/nco_4.6.1-1_amd64.changes"-->): Debian patch to upstream source (last updated <!--#flastmod file="src/nco_4.6.1-1_amd64.changes"-->)</li>
-Thanks to Daniel Baumann, Barry deFreese, Francesco Lovergine, 
+<li><a href="https://launchpad.net/ubuntu/+source/nco/4.6.1-1">nco_4.6.1-1_amd64.deb</a> : Executables AMD64-compatible</li>
+Thanks to Daniel Baumann, Sebastian Couwenberg, Barry deFreese, Francesco Lovergine, 
 Brian Mays, Rorik Peterson, and Matej Vela for their help packaging
 NCO for Debian over the years. 
 </ul>
@@ -847,7 +853,7 @@ The most up-to-date executables are probably those in the tarball below. Those u
 <a name="mvs"></a> <!-- http://nco.sf.net#mvs -->
 <a name="windows"></a> <!-- http://nco.sf.net#windows -->
 <h3><a href="http://www.microsoft.com">Microsoft Windows</a>
-(native build, compiled with <a href="https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx">Visual Studio 2013</a>, use this if unsure)</h3>
+(native build, compiled with <a href="https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx">Visual Studio 2015</a>, use this if unsure)</h3>
 These native Windows executables should be stand-alone, i.e., not
 require users to have any additional software. 
 This is a new feature as of 20120615, please send us feedback. 
@@ -855,10 +861,10 @@ To build NCO from source yourself using MSVC or Qt, please see the <a href="nco_
 <ul>
 <!-- Copy files from http://glace.ess.uci.edu
 /usr/bin/scp /home/pvicente/nco/doc/index.shtml pvicente,nco at web.sf.net:/home/project-web/nco/htdocs
-/usr/bin/scp /home/pvicente/windows_setup/nco-4.6.1.windows.mvs.exe pvicente,nco at web.sf.net:/home/project-web/nco/htdocs/src
+/usr/bin/scp /home/pvicente/windows_setup/nco-4.6.2.windows.mvs.exe pvicente,nco at web.sf.net:/home/project-web/nco/htdocs/src
 /usr/bin/scp /home/pvicente/windows_setup/nco-4.4.5.win32.cygwin.tar.gz pvicente,nco at web.sf.net:/home/project-web/nco/htdocs/src
 -->
-<li><a href="src/nco-4.6.0.windows.mvs.exe">nco-4.6.0.windows.mvs.exe</a> (<!--#fsize file="src/nco-4.6.0.windows.mvs.exe"-->) : Windows Self-Extracting Installer (last updated <!--#flastmod file="src/nco-4.6.0.windows.mvs.exe"-->). Maintained by Pedro Vicente.</li>
+<li><a href="src/nco-4.6.2.windows.mvs.exe">nco-4.6.2.windows.mvs.exe</a> (<!--#fsize file="src/nco-4.6.2.windows.mvs.exe"-->) : Windows Self-Extracting Installer (last updated <!--#flastmod file="src/nco-4.6.2.windows.mvs.exe"-->). Maintained by Pedro Vicente.</li>
 </ul>
 
 <a name="cygwin"></a> <!-- http://nco.sf.net#cygwin -->
@@ -1010,12 +1016,13 @@ site.</li>
 <!-- End Support -->
 
 <!-- http://nco.sf.net#README -->
-<dt><a name="README/ChangeLog/TODO"></a></dt>
-<h2>README/ChangeLog/TODO</h2>
+<dt><a name="ANNOUNCE/ChangeLog/READMELog/TODO"></a></dt>
+<h2>ANNOUNCE/ChangeLog/README/TODO</h2>
 <p>Files containing useful information about the current distribution:
 <ul>
-<li><a href="./README"><tt>README</tt></a> Platforms and software required</li>
+<li><a href="./ANNOUNCE"><tt>ANNOUNCE</tt></a> Notes on current release</li>
 <li><a href="./ChangeLog"><tt>ChangeLog</tt></a> Change History since 1997 (version 0.9)</li>
+<li><a href="./README"><tt>README</tt></a> Platforms and software required</li>
 <li><a href="./TODO"><tt>TODO</tt></a> An unordered list of features and fixes we plan</li> 
 </ul>
 <hr></p>
@@ -1252,7 +1259,7 @@ Thanks to funding from external grants, <p>DOE, NCAR, and UCI HPCC
 users <i>may</i> find more recent pre-built NCO executableses the
 personal directories shown below. 
 These are usually built from a recent tagged-version of NCO (e.g.,
-4.5.X-alphaY) not from the “bleeding-edge” of master which
+4.6.X-alphaY) not from the “bleeding-edge” of master which
 is usually untagged.
   One way to use these pre-built executables is to prepend them to
   your executable and library search paths, e.g., 
diff --git a/doc/nco.texi b/doc/nco.texi
index 117d049..20b5929 100644
--- a/doc/nco.texi
+++ b/doc/nco.texi
@@ -118,12 +118,12 @@ Octave TeXInfo manual shows clean TeXInfo structure
 @setfilename nco.info
 
 @c Define edition, date, ...
- at set nco-edition 4.6.1
- at set doc-edition 4.6.1
+ at set nco-edition 4.6.2
+ at set doc-edition 4.6.2
 @set copyright-years 1995--2016
 @set update-year 2016
- at set update-date 6 August 2016
- at set update-month August 2016
+ at set update-date 16 November 2016
+ at set update-month November 2016
 
 @settitle @acronym{NCO} @value{nco-edition} User Guide
 
@@ -388,7 +388,7 @@ The netCDF Operators, or @acronym{NCO}, are a suite of programs known as
 operators. 
 The operators facilitate manipulation and analysis of data stored in the 
 self-describing netCDF format, available from
-(@uref{http://www.unidata.ucar.edu/packages/netcdf}).
+(@uref{http://www.unidata.ucar.edu/software/netcdf}).
 Each @acronym{NCO} operator (e.g., ncks) takes netCDF input
 file(s), performs an operation (e.g., averaging, hyperslabbing, or
 renaming), and outputs a processed netCDF file. 
@@ -397,13 +397,13 @@ these data formats, and thus @acronym{NCO}, are generic and are equally
 useful in fields from agriculture to zoology.
 The @acronym{NCO} User Guide illustrates @acronym{NCO} use with
 examples from the field of climate modeling and analysis. 
-The @acronym{NCO} homepage is @uref{http://nco.sf.net}, and
-there is a mirror at @uref{http://dust.ess.uci.edu/nco}.
+The @acronym{NCO} homepage is @uref{http://nco.sf.net}, and the 
+source code is maintained at @uref{http://github.com/nco/nco}.
 
 This documentation is for @acronym{NCO} version @value{nco-edition}.
 It was last updated @value{update-date}.
-Corrections, additions, and rewrites of this documentation are very
-welcome.
+Corrections, additions, and rewrites of this documentation are
+gratefully welcome.
 
 Enjoy,@*
 Charlie Zender
@@ -552,6 +552,15 @@ Charlie Zender@*
 June, 2015@*
 Irvine, California@*
 
+ at ignore
+The @acronym{DOE} @acronym{ACME} program generously supported ...
+ at sp 1
+ at noindent
+Charlie Zender@*
+November, 2016@*
+Laguna Beach, California@*
+ at end ignore
+
 @html
 <a name="smr"></a> <!-- http://nco.sf.net/nco.html#smr -->
 @end html
@@ -663,7 +672,7 @@ online through the World Wide Web at @acronym{URL}
 @cindex netCDF
 To build and use @acronym{NCO}, you must have netCDF installed.
 The netCDF homepage is
- at uref{http://www.unidata.ucar.edu/packages/netcdf}.
+ at uref{http://www.unidata.ucar.edu/software/netcdf}.
 
 New @acronym{NCO} releases are announced on the netCDF list 
 and on the @code{nco-announce} mailing list 
@@ -1361,8 +1370,9 @@ Unsigned bytes stay unsigned bytes.
 Strings stay strings. 
 Hence, @command{ncks} conversions often result in smaller files than
 @command{ncl_convert2nc} conversions.
-A tool useful for converting netCDF3 to netCDF4 files is the Python
-script @command{nc3tonc4} by Jeff Whitaker.}. 
+Another tool useful for converting netCDF3 to netCDF4 files, and whose
+functionality is, we think, also matched or exceeded by @command{ncks},
+is the Python script @command{nc3tonc4} by Jeff Whitaker.}. 
 
 @cindex @code{hdf_name}
 @cindex illegal names
@@ -2483,7 +2493,7 @@ No data buffering is performed during @command{nc_get_var} and
 @cindex operator speed
 @cindex speed
 @cindex execution time
-Hyperslabs too large too hold in core memory will suffer substantial
+Hyperslabs too large to hold in core memory will suffer substantial
 performance penalties because of this. 
 
 @item 
@@ -2769,7 +2779,7 @@ or long option names for all options.
 This was done in a backward compatible way such that the full
 functionality of @acronym{NCO} is still available through the familiar 
 single letter options.
-In the future, however, some features of @acronym{NCO} may require the
+Many features of @acronym{NCO} introduced since 2002 now require the 
 use of long options, simply because we have nearly run out of single
 letter options.
 More importantly, mnemonics for single letter options are often
@@ -2807,16 +2817,17 @@ The syntax of @dfn{long options} (multi-letter options) is
 Thus the following are all valid for the @samp{-D} (short version)
 or @samp{--dbg_lvl} (long version) command line option.
 @example
-ncks -D 3 in.nc        # Short option
+ncks -D 3 in.nc        # Short option, preferred form
+ncks -D3 in.nc         # Short option, alternate form
 ncks --dbg_lvl=3 in.nc # Long option, preferred form
 ncks --dbg_lvl 3 in.nc # Long option, alternate form
 @end example
 @noindent
-The last example is preferred for two reasons.
+The third example is preferred for two reasons.
 First, @samp{--dbg_lvl} is more specific and less ambiguous than
 @samp{-D}.
-The long option form makes scripts more self documenting and less error
-prone.  
+The long option format makes scripts more self documenting and less
+error-prone.   
 Often long options are named after the source code variable whose value 
 they carry.
 Second, the equals sign @kbd{=} joins the key (i.e., @var{long_name}) to   
@@ -2824,20 +2835,29 @@ the value in an uninterruptible text block.
 Experience shows that users are less likely to mis-parse commands when
 restricted to this form.
 
- at acronym{GNU} implements a superset of the @acronym{POSIX} standard 
-which allows any unambiguous truncation of a valid option to be used.
+ at menu
+* Truncating Long Options::
+* Multi-arguments::
+ at end menu
+
+ at node Truncating Long Options, Multi-arguments, Command Line Options, Command Line Options
+ at subsection Truncating Long Options
+ at cindex Truncating options
+ at cindex Options, truncating
+ at acronym{GNU} implements a superset of the @acronym{POSIX} standard.
+Their superset accepts any unambiguous truncation of a valid option:
 @example
 ncks -D 3 in.nc        # Short option
 ncks --dbg_lvl=3 in.nc # Long option, full form
-ncks --dbg=3 in.nc     # Long option, unambiguous truncation
-ncks --db=3 in.nc      # Long option, unambiguous truncation
-ncks --d=3 in.nc       # Long option, ambiguous truncation
+ncks --dbg=3 in.nc     # Long option, OK unambiguous truncation
+ncks --db=3 in.nc      # Long option, OK unambiguous truncation
+ncks --d=3 in.nc       # Long option, ERROR ambiguous truncation
 @end example
 @noindent
 The first four examples are equivalent and will work as expected.
 The final example will exit with an error since @command{ncks} cannot
 disambiguate whether @samp{--d} is intended as a truncation of
- at samp{--dbg_lvl}, of @samp{--dimension}, or of some other long option. 
+ at samp{--dbg_lvl}, of @samp{--dimension}, or of some other long option.  
 
 @acronym{NCO} provides many long options for common switches.
 For example, the debugging level may be set in all operators with any
@@ -2847,8 +2867,8 @@ For some, it will be @samp{--debug} (an unambiguous truncation of
 @samp{--debug-level}, and other will prefer @samp{--dbg}.
 Interactive users usually prefer the minimal amount of typing, i.e.,
 @samp{-D}.
-We recommend that scripts which are re-usable employ some form of 
-the long options for future maintainability.
+We recommend that re-usable scripts employ long options to facilitate
+self-documentation and maintainability.  
 
 This manual generally uses the short option syntax in examples.
 This is for historical reasons and to conserve space in printed output.
@@ -2856,6 +2876,101 @@ Users are expected to pick the unambiguous truncation of each option
 name that most suits their taste.
 
 @html
+<a name="mta"></a> <!-- http://nco.sf.net/nco.html#mta -->
+<a name="multi-arguments"></a> <!-- http://nco.sf.net/nco.html#multi-arguments -->
+<a name="Multi-arguments"></a> <!-- http://nco.sf.net/nco.html#Multi-arguments -->
+ at end html
+ at node Multi-arguments,  , Truncating Long Options, Command Line Options
+ at subsection Multi-arguments
+ at cindex Multi-arguments
+ at cindex Options, multi-argument
+ at cindex @code{--gaa @var{key}=@var{val}}
+ at cindex @code{--ppc @var{key}=@var{val}}
+ at cindex @code{--rgr @var{key}=@var{val}}
+ at cindex @code{--trr @var{key}=@var{val}}
+As of @acronym{NCO} version 4.6.2 (November, 2016), @acronym{NCO} accepts
+multiple key-value pair options for a single feature to be joined
+together into a single extended argument called a @dfn{multi-argument}. 
+Only four @acronym{NCO} features accept multiple key-value pairs that
+can be aggregated into multi-arguments. 
+These features are:
+Global Attribute Addition options indicated via @samp{--gaa} (@pxref{Global Attribute Addition});
+Image Manipulation indicated via @samp{--trr}@footnote{
+ at cindex @acronym{ENVI}
+ at cindex @acronym{DOE}
+ at cindex @acronym{Terraref}
+ at cindex @samp{--trr}
+ at acronym{NCO} supports decoding @acronym{ENVI} images in support of the
+ at acronym{DOE} Terraref project.
+These options are indicated via the @command{ncks} @samp{--trr} switch,
+and are otherwise undocumented.}, 
+Precision-Preserving Compression options indicated via @samp{--ppc} (@pxref{Precision-Preserving Compression});
+and 
+Regridding options are indicated via @samp{--rgr} (@pxref{Regridding}).
+Arguments to these four indicator options take the form of key-value
+pairs, e.g., @samp{--rgr @var{key}=@var{val}}. 
+These four features have so many options that making each key its own
+command line option would pollute the namespace of @acronym{NCO}'s
+global options. 
+Yet supplying multiple options to each indicator option one-at-a-time
+can result in command lines overpopulated with indicator switches (e.g.,
+ at samp{--rgr}): 
+ at example
+ at verbatim
+ncks --rgr grd_ttl='Title' --rgr grid=grd.nc --rgr latlon=129,256 \
+     --rgr lat_typ=fv --rgr lon_typ=grn_ctr ...
+ at end verbatim
+ at end example
+
+Multi-arguments combine all the indicator options into one option that
+receives a single argument that comprises all the original arguments
+glued together by a delimiter, which is, by default, @samp{#}.
+Thus the multi-argument version of the above example is
+ at example
+ at verbatim
+ncks --rgr grd_ttl='Title'#grid=grd.nc#latlon=129,256#lat_typ=fv#lon_typ=grn_ctr
+ at end verbatim
+ at end example
+Note the aggregation of all @var{key}=@var{val} pairs into a single
+argument.
+ at acronym{NCO} simply splits this argument at each delimiter, and
+processes the sub-arguments as if they had been passed with their own
+indicator option.
+Multi-arguments produce the same results, and may be mixed with,
+traditional indicator options supplied one-by-one.
+
+As mentioned previously, the multi-argument delimiter string is, by
+default, the hash-sign @samp{#}. 
+When any @var{key}=@var{val} pair contains the default delimiter, the
+user must specify a custom delimiter string so that options are parsed
+correctly. 
+The options to change the multi-argument delimiter string are
+ at samp{--mta_dlm=@var{delim_string}} or
+ at samp{--dlm_mta=@var{delim_string}}, where @var{delim_string} can be any
+single or multi-character string that (1) is not contained in any
+ at var{key} or @var{val} string; and (2) will not confuse the shell.
+For example, to use multi-arguments to pass a string that includes 
+the hash symbol (the default delimiter is @samp{#}), one must also
+change the delimiter so something besides hash, e.g., a colon @samp{:}: 
+ at example
+ at verbatim
+ncks --dlm=":" --gaa foo=bar:foo2=bar2:foo3,foo4="hash # is in value" 
+ncks --dlm=":" --gaa foo=bar:foo2=bar2:foo3,foo4="Thu Sep 15 13\:03\:18 PDT 2016"
+ncks --dlm="csz" --gaa foo=barcszfoo2=bar2cszfoo3,foo4="Long text"
+ at end verbatim
+ at end example
+In the second example, the colons that are escaped with the backslash
+become literal characters.  
+Many characters have special shell meanings and so must be escaped by a 
+single or double backslash or enclosed in single quotes to prevent
+interpolation. 
+These special characters include @samp{:}, @samp{$}, @samp{%}, @samp{*},
+ at samp{@@}, and @samp{&}. 
+If @var{val} is a long text string that could contain the default
+delimiter, then delimit with a unique multi-character string such as
+ at samp{csz} in the third example. 
+
+ at html
 <a name="fl_in"></a> <!-- http://nco.sf.net/nco.html#fl_in -->
 <a name="in"></a> <!-- http://nco.sf.net/nco.html#in -->
 <a name="input"></a> <!-- http://nco.sf.net/nco.html#input -->
@@ -3401,7 +3516,7 @@ The documentation at the
 @uref{http://www.opendap.org, OPeNDAP Homepage}
 is voluminous.
 Check there and on the
- at uref{http://www.unidata.ucar.edu/packages/dods/home/mailLists/, DODS mail lists}.
+ at uref{http://www.unidata.ucar.edu/software/dods/home/mailLists/, DODS mail lists}.
 to learn more about the extensive capabilities of @acronym{OPeNDAP}
 @footnote{
 We are most familiar with the @acronym{OPeNDAP} ability to enable 
@@ -6018,8 +6133,20 @@ latitude/longitude grids.
 The grids are stored in an external @var{grid-file}.
 
 All options pertinent to the grid geometry and metadata are passed to
- at acronym{NCO} via key-value pairs prefixed by the @samp{--rgr} option.
-Perhaps the two most important key-value pair arguments are 
+ at acronym{NCO} via key-value pairs prefixed by the @samp{--rgr} option,
+or its synonym, @samp{--regridding}.
+ at cindex indicator option
+ at cindex multi-arguments
+The option @samp{--rgr} (and its long option equivalents such
+as @samp{--regridding}) indicates the argument syntax will be
+ at var{key}=@var{val}.
+As such, @samp{--rgr} and its synonyms are indicator options that accept
+arguments supplied one-by-one like 
+ at samp{--rgr @var{key1}=@var{val1} --rgr @var{key2}=@var{val2}}, or
+aggregated together in multi-argument format like
+ at samp{--rgr @var{key1}=@var{val1}#@var{key2}=@var{val2}}
+(@pxref{Multi-arguments}).
+
 The text strings that describe the grid and name the file are important 
 aids to convey the grid geometry to other users.
 These arguments, and their corresponding keys, are the grid title
@@ -6103,7 +6230,7 @@ monotonic and rectangular grids.
 Confusingly, the angular spacing in a Regular grid need not be uniform,  
 it could be irregular, such as in a Gaussian grid.
 The term Regular is not too useful in grid-generation, because so many
-other parameters (spacing, centering) are necessary to disambiuate it.}. 
+other parameters (spacing, centering) are necessary to disambiguate it.}. 
 The Uniform-latitude grid may have any number of latitudes. 
 @acronym{NCO} can only generate longitude grids (below) that are
 uniformly spaced, so the Uniform-latitude grids we describe are
@@ -6168,7 +6295,7 @@ representation on disk is not uniform.
 Nevertheless, some call the Cap grid a uniform-angle grid because the
 information contained at the poles is aggregated in memory to span twice
 the range of a single polar gridcell (which has half the normal width). 
-The @acronym{NCL} uses the term ``Fixed grid'' for a Cap grid.
+ at acronym{NCL} uses the term ``Fixed grid'' for a Cap grid.
 The ``Fixed'' terminology seems broken.
 
 Finally, Gaussian grids are the Cartesian representation of global
@@ -6224,16 +6351,24 @@ Latitudes and longigudes must be specified in degrees (not radians).
 Latitude edges must be between @w{-90 and 90}.
 Longitude edges may be positive or negative and separated by no more
 than 360 degrees.
-The edges may be specified individually with four arguments, or together
-in one list to the options @samp{wesn} or @samp{snwe}.
-These two specifications are equivalent:
+The edges may be specified individually with four arguments, 
+consecutively separated by the multi-argument delimiter (@samp{#} by
+default), or together in a short list to the pre-ordered options
+ at samp{wesn} or @samp{snwe}. 
+These three specifications are equivalent:
 @example
 @verbatim
 ncks ... --rgr lat_sth=30.0 --rgr lat_nrt=70.0 --rgr lon_wst=-120.0 --rgr lon_est=-90.0 ...
+ncks ... --rgr lat_sth=30.0#lat_nrt=70.0#lon_wst=-120.0#lon_est=-90.0 ...
 ncks ... --rgr snwe=30.0,70.0,-120.0,-90.0 ...
 @end verbatim
 @end example
 @end table
+The first example above supplies the bounding box with four
+ at var{key}=@var{val} pairs. 
+The second example above supplies the bounding box with a single option
+in multi-argument format (@pxref{Multi-arguments}).
+The third example uses a convenience switch introduced to reduce typing.
 
 Generating common grids:
 @example
@@ -6253,12 +6388,12 @@ ncks --rgr grd_ttl='Equi-Angular grid 128x256' --rgr grid=${DATA}/grids/128x256_
 
 # T42 Gaussian grid, first longitude centered at Greenwich
 ncks --rgr grd_ttl='T42 Gaussian grid' --rgr grid=${DATA}/grids/t42_SCRIP.20150901.nc \
-     --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr ~zender/nco/data/in.nc ~/foo.nc
+     --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=grn_ctr ~zender/nco/data/in.nc ~/foo.nc
 
 # NASA Climate Modeling Grid (CMG) 3600x7200 (0.05x0.05 degree) Equi-Angular grid
 # Date-line west edge of first longitude, east edge of last longitude
 ncks --rgr grd_ttl='Equi-Angular grid 3600x7200 (NASA CMG)' --rgr grid=${DATA}/grids/3600x7200_SCRIP.20160301.nc \
-     --rgr latlon=3600,7200 --rgr lat_typ=uni --rgr lon_typ=grn_ctr ~zender/nco/data/in.nc ~/foo.nc
+     --rgr latlon=3600,7200 --rgr lat_typ=uni --rgr lon_typ=180_wst ~zender/nco/data/in.nc ~/foo.nc
 @end verbatim
 @end example
 
@@ -6390,7 +6525,7 @@ Currently @acronym{NCO} understands only the mapfile format pioneered by
 (@url{http://oceans11.lanl.gov/svn/SCRIP/trunk/SCRIP})
 and later extended by @acronym{ESMF} 
 (@uref{http://www.earthsystemcog.org/projects/regridweightgen}),
-and adopted (along with Exodus) by Tempest
+and adopted (along with Exodus) by TempestRemap
 (@uref{https://github.com/ClimateGlobalChange/tempestremap.git}).
 See those references for documentation on map formats, grid
 specification, and weight generation. 
@@ -6886,7 +7021,7 @@ Long options:
 @samp{--dmn @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]]}@*
 @end cartouche
 There is more than one way to hyperskin a cat.
-The @uref{http://www.unidata.ucar.edu/packages/udunits, UDUnits} package 
+The @uref{http://www.unidata.ucar.edu/software/udunits, UDUnits} package 
 provides a library which, if present, @acronym{NCO} uses to translate
 user-specified physical dimensions into the physical dimensions of data
 stored in netCDF files.
@@ -7017,7 +7152,7 @@ pre-built binaries on machines with libraries in different locations.
 
 @cindex Climate and Forecast Metadata Convention
 @cindex @acronym{CF} conventions
-The @uref{http://www.unidata.ucar.edu/packages/udunits, UDUnits}
+The @uref{http://www.unidata.ucar.edu/software/udunits, UDUnits}
 package documentation describes the supported formats of time
 dimensions. 
 Among the metadata conventions that adhere to these formats are the  
@@ -7190,7 +7325,7 @@ This reduces the number of unanticipated consequences and keeps the
 operators functioning in a familiar way.
 Put another way, @acronym{NCO} limits production of additional record
 dimensions so processing netCDF4 files leads to the same results as
-processing netCDF4 files.
+processing netCDF3 files.
 Users can override this default with the @samp{--mrd} (or 
 @samp{--multiple_record_dimension}) switch, which enables netCDF4
 variables to accumulate additional record dimensions.
@@ -7428,8 +7563,12 @@ Dataset chunking issues are described by @acronym{THG} and Unidata
 and
 @uref{http://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes,here}.
 @acronym{NCO} authors are working on generalized algorithms and
-applications of chunking strategies (stay tuned for more in 2015).    
+applications of chunking strategies (stay tuned for more in 2017).
 
+ at html
+<a name="blocksize"></a> <!-- http://nco.sf.net/nco.html#blocksize -->
+<a name="blk"></a> <!-- http://nco.sf.net/nco.html#blk -->
+ at end html
 @cindex chunking policy
 @cindex chunking map
 @cindex chunksize
@@ -7450,8 +7589,8 @@ The distinction between elements and bytes is subtle yet crucial to
 understand. 
 Elements refers to values of an array, whereas bytes refers to the
 memory size required to hold the elements. 
-Hence these measures differ by a factor of four or eight for 
- at code{NC_FLOAT} or @code{NC_DOUBLE}, respectively.
+These measures differ by a factor of four or eight for @code{NC_FLOAT}
+or @code{NC_DOUBLE}, respectively. 
 The option @samp{--cnk_scl} takes an argument @var{sz_lmn} measured in
 elements.
 The options @samp{--cnk_byt} and @samp{--cnk_min} take arguments
@@ -7872,19 +8011,26 @@ This algorithm is accessed via the @acronym{HDF5} library layer
 (which itself calls the @command{zlib} library also used by
 @command{gzip}), and is unavailable with netCDF3.   
 
-The three lossy compression algorithms are Packing 
+ at menu
+* Linear Packing::
+* Precision-Preserving Compression::
+ at end menu
+
+ at node Linear Packing, Precision-Preserving Compression, Compression, Compression
+ at subsection Linear Packing
+The three lossy compression algorithms are Linear Packing 
 (@pxref{Packed data}), and two precision-preserving algorithms.
-Packing quantizes data of a higher precision type into a lower precision 
-type (often @code{NC_SHORT}) that thus stores a fewer (though constant)
-number of bytes per value. 
-Packed data unpacks into a (much) smaller dynamic range than the
+Linear packing quantizes data of a higher precision type into a lower
+precision type (often @code{NC_SHORT}) that thus stores a fewer (though
+constant) number of bytes per value. 
+Linearly packed data unpacks into a (much) smaller dynamic range than the
 floating-point data can represent.  
 The type-conversion and reduced dynamic range of the data allows packing
 to eliminate bits typically used to store an exponent, thus improving 
 its packing efficiency.
 Packed data also can also be deflated for additional space savings. 
 
-A limitation of packing is that unpacking data stored as integers
+A limitation of linear packing is that unpacking data stored as integers 
 into the linear range defined by @code{scale_factor} and
 @code{add_offset} rapidly loses precision outside of a narrow range of
 floating-point values.  
@@ -7898,6 +8044,8 @@ data, not to represent the intrinsic precision of the variable.
 In other words, the precision of packed data cannot be specified in
 advance because it depends on the range of values to quantize.
 
+ at node Precision-Preserving Compression,  , Linear Packing, Compression
+ at subsection Precision-Preserving Compression
 @cindex @acronym{PPC}
 @cindex @acronym{LSD}
 @cindex Least Significant Digit
@@ -7955,8 +8103,19 @@ Users may wish to express the precision to be preserved as either
 Invoke @acronym{PPC} with the long option @samp{--ppc var=prc}, or give
 the same arguments to the synonyms
 @samp{--precision_preserving_compression}, or to @samp{--quantize}. 
-Here @var{var} is the variable to quantize, and @var{prc} is the 
+Here @var{var} is the variable to quantize, and @var{prc} is its
 precision.
+ at cindex indicator option
+ at cindex multi-arguments
+The option @samp{--ppc} (and its long option equivalents such
+as @samp{--quantize}) indicates the argument syntax will be
+ at var{key}=@var{val}.
+As such, @samp{--ppc} and its synonyms are indicator options that accept
+arguments supplied one-by-one like 
+ at samp{--ppc @var{key1}=@var{val1} --ppc @var{key2}=@var{val2}}, or
+aggregated together in multi-argument format like
+ at samp{--ppc @var{key1}=@var{val1}#@var{key2}=@var{val2}}
+(@pxref{Multi-arguments}).
 The default algorithm assumes @var{prc} specifies @acronym{NSD}
 precision, e.g., @samp{T=2} means @math{@var{nsd=2}}.
 Prepend @var{prc} with a decimal point to specify @acronym{DSD}
@@ -8241,11 +8400,13 @@ support varying precision types and levels, and each option may
 aggregate all the variables with the same precision
 @example
 ncks --ppc p,w,z=5 --ppc q,RH=4 --ppc T,u,v=3 in.nc out.nc
+ncks --ppc p,w,z=5#q,RH=4#T,u,v=3 in.nc out.nc # Multi-argument format
 @end example
 Any @var{var} argument may be a regular expression.
 This simplifies generating lists of related variables:
 @example
 ncks --ppc Q.?=5 --ppc FS.?,FL.?=4 --ppc RH=.3 in.nc out.nc
+ncks --ppc Q.?=5#FS.?,FL.?=4#RH=.3 in.nc out.nc # Multi-argument format
 @end example
 Although @acronym{PPC}-rounding instantly reduces data precision,
 on-disk storage reduction only occurs once the data are compressed.  
@@ -9065,19 +9226,19 @@ Long options: @samp{--hdf_upk}, @samp{--hdf_unpack}@*
 @end cartouche
 
 The phrase @dfn{packed data} refers to data which are stored in the
-standard netCDF3 packing format which employs a lossy algorithm.
+standard netCDF3 lossy linear packing format.
 See @ref{ncks netCDF Kitchen Sink} for a description of deflation, a 
 lossless compression technique available with netCDF4 only.
 Packed data may be deflated to save additional space.
 
 @unnumberedsubsec Packing Algorithm
 @dfn{Packing}
-The standard netCDF packing algorithm (described
+The standard netCDF linear packing algorithm (described
 @uref{http://www.unidata.ucar.edu/software/netcdf/docs/netcdf/Attribute-Conventions.html, here})
-produces data with
-the same dynamic range as the original but which requires no more than
-half the space to store.
-Like all packing algorithms, it is @emph{lossy}.
+produces packed data with the same dynamic range as the original but
+which requires no more than half the space to store.
+Like all packing algorithms, linear packing is @emph{lossy}.
+Just how lossy depends on the values themselves, especially their range.
 The packed variable is stored (usually) as type @code{NC_SHORT}
 with the two attributes required to unpack the variable,
 @code{scale_factor} and @code{add_offset}, stored at the original
@@ -10476,6 +10637,18 @@ All operators can add user-specified global attributes to output files.
 As of @acronym{NCO} version 4.5.2 (July, 2015), @acronym{NCO} supports
 multiple uses of the @samp{--glb} (or equivalent @samp{--gaa} or
 @samp{--glb_att_add}) switch.
+ at cindex indicator option
+ at cindex multi-arguments
+The option @samp{--gaa} (and its long option equivalents such
+as @samp{--glb_att_add}) indicates the argument syntax will be
+ at var{key}=@var{val}.
+As such, @samp{--gaa} and its synonyms are indicator options that accept
+arguments supplied one-by-one like 
+ at samp{--gaa @var{key1}=@var{val1} --gaa @var{key2}=@var{val2}}, or
+aggregated together in multi-argument format like
+ at samp{--gaa @var{key1}=@var{val1}#@var{key2}=@var{val2}}
+(@pxref{Multi-arguments}).
+
 The switch takes mandatory arguments 
 @samp{--glb @var{att_nm}=@var{att_val}}   
 where @var{att_nm} is the desired name of the global attribute to add, 
@@ -10485,20 +10658,34 @@ Currently only text attributes are supported (recorded as type
 @pxref{ncatted netCDF Attribute Editor}).    
 Attributes are added in ``Append'' mode, meaning that values are
 appended to pre-existing values, if any. 
+Multiple invocations can simplify the annotation of output file at
+creation (or modification) time:
 @example
 @verbatim
 ncra --glb machine=${HOSTNAME} --glb created_by=${USER} in*.nc out.nc
 @end verbatim
 @end example
-Multiple invocations simplify the annotation of output file at creation
-(or modification) time.
+As of @acronym{NCO} version 4.6.2 (October, 2016), one may instead
+combine the separate invocations into a single list of invocations
+separated by colons:
+ at example
+ at verbatim
+ncra --glb machine=${HOSTNAME}:created_by=${USER} in*.nc out.nc
+ at end verbatim
+ at end example
+The list may contain any number of key-value pairs.
+Special care must be taken should a key or value contain a delimiter
+(i.e., a colon) otherwise @command{NCO} will interpret the colon as
+a delimiter and will attempt to create a new attribute.
+To protect a colon from being interpreted as an argument delimiter,
+precede it with a backslash.
 
-This feature helps to avoid the performance penalty incurred by having
-to use @command{ncatted} separately to annotate large files.
-Should users emit a loud hue and cry, we will consider ading the
-the functionality of @command{ncatted} to the front-end of all
-operators, i.e., accepting valid @command{ncatted} arguments to
-modify attributes of any type and to apply regular expressions.
+The global attribution addition feature helps to avoid the performance
+penalty incurred by using @command{ncatted} separately to annotate large files. 
+Should users emit a loud hue and cry, we will consider ading the the
+functionality of ncatted to the front-end of all operators, i.e.,
+accepting valid @command{ncatted} arguments to modify attributes of any
+type and to apply regular expressions.
 
 @html
 <a name="hst"></a> <!-- http://nco.sf.net/nco.html#hst -->
@@ -11065,6 +11252,7 @@ described in any detail in the sections below.
 * ncap2 netCDF Arithmetic Processor::
 * ncatted netCDF Attribute Editor::
 * ncbo netCDF Binary Operator::
+* ncclimo netCDF Climatology Generator::
 * nces netCDF Ensemble Statistics::
 * ncecat netCDF Ensemble Concatenator::
 * ncflint netCDF File Interpolator::
@@ -11072,7 +11260,6 @@ described in any detail in the sections below.
 * ncpdq netCDF Permute Dimensions Quickly::
 * ncra netCDF Record Averager::
 * ncrcat netCDF Record Concatenator::
-* ncclimo netCDF Climatology Generator::
 * ncremap netCDF Remapper::
 * ncrename netCDF Renamer::
 * ncwa netCDF Weighted Averager::
@@ -11165,9 +11352,10 @@ already contain the appended dimensions.
 * Left hand casting::
 * Arrays and hyperslabs::
 * Attributes::
+* Value List::
 * Number literals::
 * if statement::
-* print statement::
+* Print & String methods::
 * Missing values ncap2::
 * Methods and functions::
 * RAM variables::
@@ -11175,6 +11363,7 @@ already contain the appended dimensions.
 * Loops::
 * Include files::
 * Sort methods::
+* Vpointer::
 * Irregular grids::
 * Bilinear interpolation::
 * GSL special functions::
@@ -11186,6 +11375,7 @@ already contain the appended dimensions.
 * Intrinsic mathematical methods::
 * Operator precedence and associativity ::
 * ID Quoting::
+* create_bounds() function::
 @end menu
 
 @html
@@ -11250,8 +11440,8 @@ Single line comments are preceded by @code{//} characters.
 @cindex nesting
 @cindex @code{#include}
 Files may be nested in scripts using @code{#include @var{script}}.
-Note that the @code{#include} command is not followed by a semi-colon
-because it is a pre-processor directive, not an assignment statement.
+The @code{#include} command is not followed by a semi-colon because it
+is a pre-processor directive, not an assignment statement. 
 The filename @file{script} is interpreted relative to the run directory.
 @item Attribute syntax
 @cindex attribute syntax
@@ -11501,7 +11691,6 @@ arithmetic expression:
 time_avg=time.total() / $time.size;
 @end example
 
-
 Increase the size of a new variable by one and set new member to zero:
 @example
 defdim("cnt_new",$cnt.size+1);
@@ -11676,43 +11865,63 @@ four[]=four.int();
 @cindex arrays
 @cindex findgen-equivalent
 @cindex indgen-equivalent
-Generating a regularly spaced one-dimensional array with @command{ncap2}
+Generating a regularly spaced n-dimensional array with @command{ncap2}
 is simple with the @code{array()} function. 
-The syntax is 
+ at noindent The function comes in three (overloaded) forms
 @example
-var_out=array(val_srt,val_ncr,$dmn_nm); // One-dimensional output
-var_out=array(val_srt,val_ncr,var_tpl); // Multi-dimensional output
+(A) var_out=array(val_srt, val_inc, $dmn_nm);           // One-dimensional output
+(B) var_out=array(val_srt, val_inc, var_tpl);           // Multi-dimensional output
+(C) var_out=array(val_srt, val_inc, /dmn1,dmn2..dmnN/); // Multi-dimensional output
 @end example
 @noindent
-where the arguments are the starting value @var{val_srt}, 
-incremental value @var{val_ncr}, and, for one-dimensional output, the
-single dimension @code{$dmn_nm}, or, for multi-dimensional output, a
-template variable @code{var_tpl}, i.e., a variable with the same shape
-as the desired output. 
-The type of @code{var_out} will be the same as @code{val_srt}.
-Be sure to encode this type with the appropriate decimal point
-and floating-point suffix when @code{val_srt} is a ``naked constant''
-rather than a variable.
-For example, to produce an array of shorts (signed two-byte integers), 
-integers (signed four-byte integers), unsigned 64-bit integers,
-floats, or doubles use
- at example
-var_out=array(1s,val_ncr,$dmn_nm); // NC_SHORT array
-var_out=array(1,val_ncr,$dmn_nm); // NC_INT array
-var_out=array(1ull,val_ncr,$dmn_nm); // NC_UINT64 array
-var_out=array(1f,val_ncr,$dmn_nm); // NC_FLOAT array
-var_out=array(1.,val_ncr,$dmn_nm); // NC_DOUBLE array
- at end example
-
-Once the associated dimensions have been defined, the start and
-increment arguments may be supplied as values, mathmatical expressions,
-or variables:
- at example
-var_out=array(1,1,$time); // 1,2,3,4,5,6,7,8,9,10
-var_out=array(1+2-2,one,$time); // 1,2,3,4,5,6,7,8,9,10
-var_out=array(1,2,three_dmn_rec_var); // 1,3,5,...155,157,159
+
+ at table @dfn
+ at item val_srt
+Starting value of the array. The @var{type} of the array will be the @var{type} of this starting value.
+ at item val_inc
+Spacing (or increment) between elements. 
+ at item var_tpl
+Variable from which the array can derive its shape 1D or nD
+ at end table
+
+ at noindent @strong{ One-Dimensional Arrays@*}
+Use form (A) or (B)  for 1D arrays 
+ at example
+In the following var_out is of type NC_DOUBLE
+var_out=array(10.0, 2, $time)  //10.5,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,28.5
+
+The following is also ID 
+It gets its "shape" from the var "ilev" and is of type NC_UINT
+var_out=array( 0ul, 2, ilev)    // 0,2,4,6
+
+The following is of type NC_FLOAT
+var_out=array(99.0f, 2.5, $lon) // 99,101.5,104,106.5
+
+// create an array of zeros 
+var_out=array(0, 0, $time) // 0,0,0,0,0,0,0,0,0,0 
+
+// create an array of ones
+var_out=array(1.0, 0.0, $lon) // 1.0,1.0,1.0,1.0 
+ at end example
+
+ at noindent @strong{ n-Dimensional Arrays@*}
+Use form (B) or (C) for creating n-D arrays.@* 
+nb In (C) the final argument is a list of dimensions
+
+ at example
+The following two are equivalent
+var_out=array(1.0, 2.0, three_dmn_var)
+var_out=array(1.0, 2.0,/$lat, $lev, $lon/)
+
+Below the type is NC_BYTE
+var_out=array(20b, -4, /$lat,$lon/)  // 20,16,12,8,4,0,-4,-8  
+
+srt=3.14159f; inc=srt/2.0f
+var_out(srt,inc, var_2D_rrg)  
+// 3.14159, 4.712385, 6.28318, 7.853975, 9.42477, 10.99557, 12.56636, 14.13716 ; 
 @end example
 
+
 @cindex hyperslabs
 Hyperslabs in @command{ncap2} are more limited than hyperslabs with the
 other @acronym{NCO} operators. 
@@ -11870,7 +12079,7 @@ three_dmn_var_prm=
 @html
 <a name="ncap_att"></a> <!-- http://nco.sf.net/nco.html#ncap_att -->
 @end html
- at node Attributes, Number literals, Arrays and hyperslabs, ncap2 netCDF Arithmetic Processor
+ at node Attributes, Value List, Arrays and hyperslabs, ncap2 netCDF Arithmetic Processor
 @subsection Attributes
 @cindex attributes at command{ncap2}
 @noindent Attributes are referred to by @emph{var_nm@@att_nm} @*
@@ -11883,29 +12092,12 @@ a1 at long_name="Kelvin";
 a1 at min=a1.min();
 a1 at max=a1.max();
 a1 at min++;
---a1 at max; q
+--a1 at max; 
 a1(0)=a1 at min;
 a1($time.size-1)=a1 at max;
 @end verbatim
 @end example
 
- at html
-<a name="nst"></a> <!-- http://nco.sf.net/nco.html#nst -->
-<a name="instantiate"></a> <!-- http://nco.sf.net/nco.html#instantiate -->
-<a name="instantiation"></a> <!-- http://nco.sf.net/nco.html#instantiation -->
- at end html
- at cindex instantiate
- at cindex instantiation
-A @emph{value list} can be used on the RHS of an assignment statement
-to @dfn{instantiate} a variable:
- at cindex value list
- at example
- at verbatim
-a1 at trip1={1,2,3} ;
-a1 at triplet={a1 at min,(a1 at min+a1@max)/2,a1 at max}; 
- at end verbatim
- at end example
-
 The netCDF specification allows all attribute types to have a size
 greater than one. 
 The maximum is defined by @code{NC_MAX_ATTRS}.
@@ -11919,11 +12111,11 @@ double a1(time) ;
   a1:triplet = 21., 110., 199. ;
 @end example
 
-The @code{size()} method can be used with attributes.
+The following basic methods @code{size(), type(), exists()} can be used with attributes.
 For example, to save an attribute text string in a variable,
 @example
 @verbatim
-defdim("sng_len", a1 at long_name.size());
+defdim("sng_len",a1 at long_name.size());
 sng_arr[$sng_len]=a1 at long_name; // sng_arr now contains "Kelvin" 
 @end verbatim
 @end example
@@ -11946,18 +12138,119 @@ prs_mdp[time,lat,lon,lev]=P0*hyam+hybm*PS;
 th_min=1.0 + 2*three_dmn_var_dbl.min($time);
 @end example
 
-If the attribute name contains non-regular characters use ID quoting. See @pxref{ID Quoting}
+ at noindent @strong{Attribute Concatenation@*}
+ at cindex attribute concatenation
+ at cindex push
+
+The push() function concatenates attributes, or appends an ``expression'' to a pre-existing attribute.
+It comes in two forms
+ at example
+(A) att_new=push(att_exp, expr)
+(B) att_size=push(&att_nm,expr)
+ at end example
+
+ at noindent In form (A) The first argument should be an attribute
+identifier or an expression that evaluates to an attribute. 
+The second argument can evalute to an attribute or a variable. 
+The second argument is then converted to the the type of @var{att_exp}; 
+and appended to @var{att_exp} ; and the resulting attribute is returned.@*
+
+ at noindent In form (B) the first argument is a call-by-reference
+attribute identifier (which may not yet exist). 
+The second argument is then evaluated (and type-converted as needed) and
+appended to the call-by-reference atttribute. 
+The final size of the attribute is then returned. 
+
+ at example
+ at verbatim
+temp at range=-10.0;
+push(&temp at range,12.0); // temp at range=-10.0,12.0
+
+numbers at squares=push(1,4);
+numbers at squares=push(numbers at squares,9);
+push(&number at squares,16.0); 
+push(&number at squares,25ull); // numbers at squares=1,4,9,16,25  
+ at end verbatim
+ at end example
+
+ at noindent Now some text examples.@* 
+Remember, an atttribute identifier that begins with @@ implies a global
+attribute.
+For example, '@@institution' is short for 'global@@institution'.
+ at example
+ at verbatim
+global at greetings=push("hello"," world !!");
+global at greek={"alpha"s,"beta"s,"gamma"s};
+// Append an NC_STRING
+push(&@greek,"delta"s);
+// Pushing an NC_CHAR to a NC_STRING attribute is allowed, it is converted to an an NC_CHAR
+ at e="epsilon";
+push(&@greek, at e);
+push(&@greek,"zeta"); 
+
+// Pushing a single NC_STRING to an NC_CHAR is not allowed
+ at h="hello";
+push(&@h," again"s); // BAD PUSH
+ at end verbatim
+ at end example
+
+If the attribute name contains non-regular characters use ID quoting.
 @example
 @verbatim
 'b..m1 at c--lost'=23;
 @end verbatim
 @end example
+See @pxref{ID Quoting}.
+
+ at html
+<a name="value_list"></a> <!-- http://nco.sf.net/nco.html#value_list -->
+ at end html
+ at node Value List, Number literals, Attributes, ncap2 netCDF Arithmetic Processor
+ at subsection Value List
+ at cindex value list at command{ncap2}
+
+A @emph{value list} is a special type of attribute. 
+It can only be used on the RHS of the assign family of statements.@*
+That is @emph{=, +=, -=, *=, /=}@*
+A value list CAN-NOT be involved in any logical, binary, or arithmetical operations (except those above).@* 
+A value list CAN-NOT be used as a function argument.@*
+A value list CANT have nested value lists.@*
+The type of a value list is the type of the member with the highest type.@*
+
+ at cindex value list
+ at example
+ at verbatim
+a1 at trip={1,2,3};
+a1 at trip+={3,2,1}; // 4,4,4
+a1 at triplet={a1 at min,(a1 at min+a1@max)/2,a1 at max}; 
+lon[lon]={0.0,90.0,180.0,270.0};
+lon*={1.0,1.1,1.2,1.3} 
+dlon[lon]={1b,2s,3ull,4.0f}; // final type NC_FLOAT
+
+a1 at ind={1,2,3}+{4,4,4};  // BAD 
+a1 at s=sin( {1.0,16.0} );  // BAD
+ at end verbatim
+ at end example
+
+ at noindent One can also use a value_list to create an attribute of type
+NC_STRING. 
+Remember, a literal string of type NC_STRING has a postfix 's'. 
+A value list of NC_CHAR has no semantic meaning and is plain wrong.   
+ at example
+ at verbatim
+array[lon]={1.0,2.,4.0,7.0};
+array at numbers={"one"s, "two"s, "four"s, "seven"s}; // GOOD
+
+ar[lat]={0,20} 
+ar at numbers={"zero","twenty"}; // BAD
+ at end verbatim
+ at end example
 
 @html
 <a name="ncap_num"></a> <!-- http://nco.sf.net/nco.html#ncap_num -->
 <a name="ncap_string"></a> <!-- http://nco.sf.net/nco.html#ncap_string -->
 @end html
- at node Number literals, if statement, Attributes, ncap2 netCDF Arithmetic Processor
+ at node Number literals, if statement, Value List, ncap2 netCDF Arithmetic Processor
 @subsection Number literals
 @cindex number literals @command{ncap2}
 The table below lists the postfix character(s) to add to a number
@@ -12060,7 +12353,7 @@ filetype is not.
 @html
 <a name="ncap_if"></a> <!-- http://nco.sf.net/nco.html#ncap_if -->
 @end html
- at node if statement, print statement, Number literals, ncap2 netCDF Arithmetic Processor
+ at node if statement, Print & String methods, Number literals, ncap2 netCDF Arithmetic Processor
 @subsection if statement
 @cindex if() 
 The syntax of the if statement is similar to its C counterpart. 
@@ -12142,23 +12435,22 @@ th_nw=(three_dmn_var_sht >= 0 ? three_dmn_var_sht.uint() : \
 @html
 <a name="ncap_prn"></a> <!-- http://nco.sf.net/nco.html#ncap_prn -->
 @end html
- at node print statement, Missing values ncap2, if statement, ncap2 netCDF Arithmetic Processor
- at subsection print statement
+ at node Print & String methods, Missing values ncap2, if statement, ncap2 netCDF Arithmetic Processor
+ at subsection Print & String methods
 @cindex print() @command{ncap2}
+
+The print statement  comes in a variety of forms
+
 @example
-print(variable_name/attribute name/string, format string);
- at end example  
+(A)   print(variable_name, format string?);
+(A1)  print(expression/string, format string?);
 
- at noindent The print function takes a variable name or attribute name or
-a quoted string and prints the contents in a in a similar fashion to
- at code{ncks -H}.
-There is also an optional C-language style format string argument. 
-Currently the print function cannot print @acronym{RAM} variables or expressions 
-such as @code{'print(var_msk*3+4)'}. 
-To print an expression, first evaluate it as a non- at acronym{RAM} variable (so it
-will be saved and can be printed), and then print the variable.
+(B)   sprint(expression/string, format string?);
+(B1)  sprint4(expression/string, format string?);
+ at end example  
 
- at noindent examples
+ at noindent @strong{print() @*@*}
+ at noindent If the variable exists in I/O then it is printed in a similar fashion to @code{ncks -H}.
 @example
 @verbatim
 print(lon);
@@ -12167,21 +12459,124 @@ lon[1]=90
 lon[2]=180 
 lon[3]=270 
 
-print(lon_2D_rrg,"%3.2f,");
-0.00,0.00,180.00,0.00,180.00,0.00,180.00,0.00,
+print(byt_2D)
+lat[0]=-90 lon[0]=0 byt_2D[0]=0 
+lat[0]=-90 lon[1]=90 byt_2D[1]=1 
+lat[0]=-90 lon[2]=180 byt_2D[2]=2 
+lat[0]=-90 lon[3]=270 byt_2D[3]=3 
+lat[1]=90 lon[0]=0 byt_2D[4]=4 
+lat[1]=90 lon[1]=90 byt_2D[5]=5 
+lat[1]=90 lon[2]=180 byt_2D[6]=6 
+lat[1]=90 lon[3]=270 byt_2D[7]=7 
+ at end verbatim
+ at end example
 
+ at noindent If the first argument is NOT a variable the form (A1) is invoked.
+ at example
+ at verbatim
 print(mss_val_fst at _FillValue);
 mss_val_fst at _FillValue, size = 1 NC_FLOAT, value = -999
 
 print("This function \t is monotonic\n");
 This function is 	  monotonic
+
+print(att_var at float_att)
+att_var at float_att, size = 7 NC_FLOAT, value = 73, 72, 71, 70.01, 69.001, 68.01, 67.01
+
+print(lon*10.0)
+lon, size = 4 NC_DOUBLE, value = 0, 900, 1800, 2700
+ at end verbatim
+ at end example
+
+ at noindent If the format string is specified then the results from (A) and (A1) forms are the same
+ at example
+ at verbatim
+print(lon_2D_rrg,"%3.2f,");
+0.00,0.00,180.00,0.00,180.00,0.00,180.00,0.00,
+
+print(lon*10.0, "%g,")
+0,900,1800,2700,
+
+print(att_var at float_att,"%g," )
+73,72,71,70.01,69.001,68.01,67.01,
+ at end verbatim
+ at end example
+
+ at noindent @strong{sprint() & sprint4() @*@*}
+These functions work in an identical fashion to (A1) except that @code{sprint()} outputs a regular netCDF3 @code{NC_CHAR} attribute 
+and @code{sprint4()} outputs a netCDF4 @code{NC_STRING} attribute
+ at example
+ at verbatim
+time at units=sprint(nDays, "%d days since 1970-1-1") 
+bnd at num=sprint4(bnd_idx,"Band number=%d") 
+
+time at arr=sprint4(time,"%.2f,")  // "1.00,2.00,3.00,4.00,5.00,6.00,7.00,8.00,9.00,10.00,"
+ at end verbatim
+ at end example
+
+ at noindent You can also use @code{sprint4()} to convert a @code{NC_CHAR} string to a @code{NC_STRING} string 
+and @code{sprint()} to convert a @code{NC_STRING} to a @code{NC_CHAR}
+ at example
+ at verbatim
+lat_1D_rct at long_name = "Latitude for 2D rectangular grid stored as 1D arrays"; // 
+
+// convert to NC_STRING
+lat_1D_rct at long_name = sprint4(lat_1D_rct at long_name) 
+ at end verbatim
+ at end example
+
+ at noindent @strong{hyperslab a netCDF string @*@*}
+Its possible to index-into a NC_CHAR string. Just like a C-String. Remember  an NC_CHAR string is  has no terminating null.
+You CANNOT index into a NC_STRING. You have to convert to an NC_CHAR first. 
+ at example
+ at verbatim
+global at greeting="hello world!!!"
+ at h=@greeting(0:4);  // "hello"
+ at w=@greeting(6:11); // "world"
+
+// can use negative inidices
+ at x=@greeting(-3:-1);  // "!!!"
+
+// can  use stride
+ at n=@greeting(::2);  // "hlowrd!"
+
+// concatenation
+global at new_greeting=push(@h, " users !!!"); // "hello users!!!"
+
+ at institution="hotel california"s; 
+ at h=@institution(0:4); // BAD 
+
+// convert NC_STRING to NC_CHAR
+ at is=sprint(@institution);
+ at h=@is(0:4);  // "hotel"
+
+// convert NC_CHAR to NC_STRING
+ at h=sprint4(@h);
+ at end verbatim
+ at end example
+
+ at noindent @strong{ get_vars_in() & get_vars_out() }
+
+ at example
+att_lst=get_vars_in(att_regexp?) 
+att_lst=get_vars_out(att_regexp?) 
+ at end example
+
+These functions are used to create a list of vars in Input or Output. The optional arg 'att_regexp'. Can be an NC_CHAR att or a NC_STRING att. If NC_CHAR then only a single reg-exp can be specified. If NC_STRING then multiple reg-exp can be specified.  The output is allways an NC_STRING att. The matching works in an identical fashion to the -v switch in ncks. if there is no arg then all vars are returned. 
+
+ at example
+ at verbatim
+ at slist=get_vars_in("^time");  // "time", "time_bnds", "time_lon", "time_udunits"
+// Use NC_STRINGS
+ at regExp={".*_bnd"s,".*_grd"s}
+ at slist=get_vars_in(@regExp);  // "lat_bnd", "lat_grd", "lev_bnd", "lon_grd", "time_bnds", "cnv_CF_grd"
 @end verbatim
 @end example
 
 @html
 <a name="ncap_miss"></a> <!-- http://nco.sf.net/nco.html#ncap_miss -->
 @end html
- at node Missing values ncap2, Methods and functions, print statement, ncap2 netCDF Arithmetic Processor
+ at node Missing values ncap2, Methods and functions, Print & String methods, ncap2 netCDF Arithmetic Processor
 @subsection Missing values ncap2
 @cindex missing values ncap2
 Missing values operate slightly differently in @command{ncap2} 
@@ -12221,9 +12616,10 @@ n2=-999,-999,11,11,11,11,11,11,999,-999;
 <a name="change_miss"></a> <!-- http://nco.sf.net/nco.html#change_miss -->
 <a name="number_miss"></a> <!-- http://nco.sf.net/nco.html#number_miss -->
 @end html
-The following methods manipulate missing value information associated
-with a variable. 
-They only work on variables in Output. 
+
+The following methods query or manipulate missing value information associated
+with a variable. The methods that ``manipulate'' will only succeed on variables in Output
+
 @table @code
 @item set_miss(expr)
 @cindex @code{set_miss()}
@@ -12257,6 +12653,10 @@ They only work on variables in Output.
 @item number_miss()
 @cindex @code{number_miss()}
  Count the number of missing values a variable contains.
+ at item has_miss()
+ at cindex @code{has_miss()}
+Returns 1 (True) if the variable has a missing value associated with it. 
+else returns 0 (False)
 @end table
 
 @example
@@ -12402,6 +12802,12 @@ Number of dimensions in variable
 @item type() 
 @cindex type()
 Returns the netcdf type (see previous section)
+ at item exists()
+ at cindex exists()
+Return 1 (true) if var or att is present in I/O else return 0 (false)
+ at item getdims()
+ at cindex getdims()
+Returns an NC_STRING attribute of all the dim names of a variable
 @end table
 
 @sp 1
@@ -12418,6 +12824,10 @@ These functions are used to manipulate missing values and @acronym{RAM} variable
  Returns the missing value of a variable in Input or Output  
 @item delete_miss()
  Deletes the missing value associated with a variable.
+ at item has_miss()
+Returns 1 (True) if the variable has a missing else returns 0 (False)
+ at item number_miss
+ Returns the number of missing values a variable contains
 @item ram_write()
  Writes a @acronym{RAM} variable to disk i.e., converts it to a regular disk type variable
 @item ram_delete()
@@ -12601,10 +13011,8 @@ dimensions, then it is made to conform; if it cannot be made to conform
 then script execution halts.   
 @item Missing values in the mask evaluate to False in the where 
 code/block statement and to True in the elsewhere block/statement. 
-LHS variable elements set to missing value are not re-assigned.
-For these reasons, do not explicitly reference missing values in the
-masking condition, e.g., @code{where(foo=foo.get_missing()) foo=1;}
-will not work as expected.
+ at item LHS variable elements set to missing value are treated just like any other
+ elements and can be re-assigned as the mask dictates
 @end itemize
 
 Example:
@@ -12783,7 +13191,7 @@ e=2.71828; // Regular (disk) variable, written to output
 <a name="sort"></a> <!-- http://nco.sf.net/nco.html#sort -->
 <a name="remap"></a> <!-- http://nco.sf.net/nco.html#remap -->
 @end html
- at node Sort methods, Irregular grids, Include files, ncap2 netCDF Arithmetic Processor
+ at node Sort methods, Vpointer, Include files, ncap2 netCDF Arithmetic Processor
 @subsection @command{sort} methods
 @cindex @command{sort}
 @cindex @command{asort}
@@ -13055,12 +13463,147 @@ EOF
 ncap2 -O -v -S ~/ncap2_foo.nco ~/nco/data/in.nc ~/foo.nc
 @end example
 
+
+ at html
+<a name="vpointer"></a> <!-- http://nco.sf.net/nco.html#vpointer -->
+ at end html
+
+ at node Vpointer, Irregular grids, Sort methods, ncap2 netCDF Arithmetic Processor
+ at subsection Vpointer
+ at cindex vpointer
+
+ at noindent A variable-pointer or @emph{vpointer} is a pointer to a variable or attribute. It is most usefull when one needs to apply a set of operations on a list of variables. For example After regular processing one may wish to set the _FillVlaue of all NC_FLOAT variables to a particular value. Or say after processing,  create min/max attributes for all 3D variables of type NC_DOUBLE. A vpointer is not a 'pointer' to a memory location in the normal C/C++ sense. Rather the vpointer is a  [...]
+
+
+Below is a simple illustration using NC_CHAR as the vpointer.@*
+Remember an attribute starting with @@ implies 'global'. eg '@@vpx' is short for 'global@@vpx'
+
+
+ at example
+ at verbatim
+idx=9;
+idy=20;
+t2=time;
+
+global at vpx="idx";
+
+// lets increment idx by one
+*global at vpx++;  
+print(idx);
+
+// multiply by 5
+*@vpx*=5;  // idx now 50
+print(idx);
+
+// lets add 200 (long method)
+*@vpx=*@vpx+200;  //idx now 250
+print(idx);
+
+ at vpy="idy";
+
+// lets add together idx and idy
+idz=*@vpx+*@vpy;  // idz == 270
+print(idz);
+
+// we can also reference variables in  the input file
+// can use an existing att pointer as atts are not written
+// to the netcdf file until after script has finished
+ at vpx="three_dmn_var";
+
+// we can convert the above var to type NC_DOUBLE and 
+// write  it to ouptut all in one go 
+*@vpx=*@vpx.double();
+ at end verbatim
+ at end example
+
+ at noindent The following script writes to Output all vars that are of type   NC_DOUBLE and and have at least 2 dimesions; It then changes their _FillValue to '1.0 E-9'. 
+The function @code{get_vars_in()} creates an NC_STRING attribue that contains all the var names in Input. It is important to note that That a vpointer must a plain attribute and NOT an a attribute expression. So in the below script using @code{*all(idx)} would be a fundamental mistake. In the above example the vpointer @code{var_nm} is of type NC_STRING.
+
+ at example
+ at verbatim
+ at all=get_vars_in();
+
+*sz=@all.size();
+*idx=0;
+
+for(idx=0;idx<sz;idx++)
+{
+  // remember @var_nm is of type NC_STRING
+  @var_nm=@all(idx);
+ 
+  if( *@var_nm.type()==NC_DOUBLE && *@var_nm.ndims()>=2  )
+  {
+     *@var_nm=*@var_nm; 
+     *@var_nm.change_miss(1e-9d);
+  }
+}
+ at end verbatim
+ at end example 
+
+
+
+ at noindent The following script, writes to Output all 3D/4D vars as type NC_FLOAT. Then for each var it calculates a range att that contains min & max; and a total att that is the sum of all elements. Note that in this example vpointer are used to 'point' to attributes
+   
+ at example
+ at verbatim
+
+ at all=get_vars_in();
+*sz=@all.size();
+
+for(*idx=0;idx<sz;idx++)
+{
+  @var_nm=@all(idx);
+  if(*@var_nm.ndims()>=3 )
+  {
+
+    *@var_nm=*@var_nm.float();
+    // The push function also takes a call-by-ref att -if it  doesnt already exist then it is created
+    // the call below is pushing a NC_STRING to an att so the end result is a list of NC_STRINGS   
+    push(&@prc, at var_nm); 
+  }
+} 
+
+*sz=@prc.size();
+
+for(*idx=0;idx<sz;idx++)
+{
+  @var_nm=@prc(idx);
+
+  // we can work with att pointers as well 
+  // sprint - ouptut is of type NC_CHAR
+  @att_total=sprint(@var_nm,"%s at total"); 
+  @att_range=sprint(@var_nm,"%s at range"); 
+
+  // if you are still confused then print out the atts 
+  print(@att_total); 
+  print(@att_range);
+ 
+  *@att_total= *@var_nm.total();
+  *@att_range={ min(*@var_nm), max(*@var_nm)}; 
+} 
+ at end verbatim
+ at end example
+
+ at noindent This is an ncdump of one of the variables that has been processed by the above script
+ at example
+ at verbatim
+float three_dmn_var_int(time, lat, lon) ;
+three_dmn_var_int:_FillValue = -99.f ;
+three_dmn_var_int:long_name = "three dimensional record variable of type int" ;
+three_dmn_var_int:range = 1.f, 80.f ;
+three_dmn_var_int:total = 2701.f ;
+three_dmn_var_int:units = "watt meter-2" ;
+ at end verbatim
+ at end example
+
+
+
 @html
 <a name="rrg"></a> <!-- http://nco.sf.net/nco.html#rrg -->
 <a name="rct"></a> <!-- http://nco.sf.net/nco.html#rct -->
 @end html
 
- at node Irregular grids, Bilinear interpolation, Sort methods, ncap2 netCDF Arithmetic Processor
+ at node Irregular grids, Bilinear interpolation, Vpointer, ncap2 netCDF Arithmetic Processor
 @subsection Irregular Grids
 @cindex irregular grids
 @cindex rectangular grids
@@ -14872,7 +15415,7 @@ This page lists the @command{ncap2} operators in order of precedence (highest to
 @html
 <a name="ncap_nmc"></a> <!-- http://nco.sf.net/nco.html#ncap_nmc -->
 @end html
- at node ID Quoting,  , Operator precedence and associativity , ncap2 netCDF Arithmetic Processor
+ at node ID Quoting, create_bounds() function, Operator precedence and associativity , ncap2 netCDF Arithmetic Processor
 @subsection ID Quoting
 @cindex ID Quoting
 In this section when I refer to a name I mean a variable name, attribute name or a dimension name
@@ -14943,6 +15486,37 @@ netcdf-4.0 Final  2008/08/28@*
 @end example
 @c End HMB documentation
 
+ at node create_bounds() function,  , ID Quoting, ncap2 netCDF Arithmetic Processor
+ at subsection create_bounds() function
+ at cindex create_bounds() function
+The @command{ncap2} custom function 'create_bounds()' takes any monotonic 1D coordinate variable with regular or irregular (e.g., Gaussian) spacing and creates a bounds variable.
+
+ at emph{<bounds_var_out>=create_bounds( <coordinate_var_in>, <dim in>, <string>)}  
+
+ at table @var
+ at item 1st Argument
+The name of the input coordinate variable.
+ at item 2nd Argument
+The dimension name of the second dimension of the output variable. 
+The size of this dimension should always be 2.
+If the dimension does not exist create it using @code{defdim()}. 
+ at item 3rd Argument
+The string value of a "bounds" attribute that is created in the input
+coordinate variable. 
+This must be the variable name to contain the bounds.
+ at end table
+Typical usage:
+ at example
+defdim("nv",2);
+longitude_bounds=create_bounds(longitude,$nv,"longitude_bounds");
+ at end example
+
+Another common CF convention:
+ at example
+defdim("nv",2);
+climatology_bounds=create_bounds(time,$nv,"climatology_bounds");
+ at end example
+
 @page
 @html
 <a name="ncatted"></a> <!-- http://nco.sf.net/nco.html#ncatted -->
@@ -15531,7 +16105,7 @@ omitted in batch scripts.
 <a name="ncmultiply"></a> <!-- http://nco.sf.net/nco.html#ncmultiply -->
 <a name="ncdivide"></a> <!-- http://nco.sf.net/nco.html#ncdivide -->
 @end html
- at node ncbo netCDF Binary Operator, nces netCDF Ensemble Statistics, ncatted netCDF Attribute Editor, Reference Manual
+ at node ncbo netCDF Binary Operator, ncclimo netCDF Climatology Generator, ncatted netCDF Attribute Editor, Reference Manual
 @section @command{ncbo} netCDF Binary Operator
 @findex ncbo
 @findex ncdiff
@@ -15971,7 +16545,7 @@ ncrcat t_anm_8589_??.nc t_anm_8589_0112.nc
 @html
 <a name="ncclimo"></a> <!-- http://nco.sf.net/nco.html#ncclimo -->
 @end html
- at node ncclimo netCDF Climatology Generator, ncremap netCDF Remapper, ncrcat netCDF Record Concatenator, Reference Manual
+ at node ncclimo netCDF Climatology Generator, nces netCDF Ensemble Statistics, ncbo netCDF Binary Operator, Reference Manual
 @section @command{ncclimo} netCDF Climatology Generator
 @cindex climo
 @cindex climatology
@@ -15983,8 +16557,9 @@ SYNTAX
 ncclimo [-a @var{clm_md}] [-b @var{bnd_nm}] [-c @var{caseid}] [-d @var{dbg_lvl}]
 [-e @var{yr_end}] [-f @var{fml_nm}] [-h @var{hst_nm}] [-i @var{drc_in}]
 [-l @var{lnk_flg}] [-m @var{mdl_nm}] [-n @var{nco_opt}] [-O @var{drc_rgr}] [-o @var{drc_out}]
-[-p @var{par_typ}] [-R @var{rgr_opt}] [-r @var{rgr_map}] [-s @var{yr_srt}] [-t @var{thr_nbr}]
-[-v @var{var_lst}] [-x @var{cf_flg}] 
+[-p @var{par_typ}] [-R @var{rgr_opt}] [-r @var{rgr_map}] 
+[-S @var{yr_prv}] [-s @var{yr_srt}] [-t @var{thr_nbr}] [-v @var{var_lst}] [-x @var{cf_flg}] 
+[-X @var{drc_xtn}] [-x @var{drc_prv}] [-Y @var{rgr_xtn}] [-y @var{rgr_prv}]
 @end example
 
 @noindent
@@ -16258,7 +16833,7 @@ See @ref{ncremap netCDF Remapper} for more details (including
 @cindex previous climatology (climo)
 @cindex current climatology (climo)
 @unnumberedsubsec Incremental Climatologies
-As of @acronym{NCO} version 4.6.2 (released July, 2016),
+As of @acronym{NCO} version 4.6.1 (released August, 2016),
 @command{ncclimo} supports generating climatologies incrementally,
 rather as monolithic products generated from the raw monthly data.
 The so-called ``extended climo'' is computed as a weighted mean of two 
@@ -16312,15 +16887,6 @@ Options:
 The starting year of the previous climo. 
 This is the only mandatory argument.
 It is required to trigger incremental climatologies.
- at cindex @code{-x @var{drc_prv}}
- at cindex @var{drc_prv}
- at item -x @var{drc_prv}
-Directory in which the previous native grid climo files reside for an
-incremental climatology. 
-Default value is @var{drc_out}. 
-Unless a separate directory is specified (with @samp{-y}) for the
-previous climo on the analysis grid, it is assumed to reside in
- at var{drc_prv}, too. 
 @cindex @code{-X @var{drc_xtn}}
 @cindex @var{drc_xtn}
 @item -X @var{drc_xtn}
@@ -16330,18 +16896,27 @@ Default value is @var{drc_prv}.
 Unless a separate directory is specified (with @samp{-Y}) for the
 extended climo on the analysis grid, it will be stored in @var{drc_xtn},
 too.  
- at cindex @code{-y @var{drc_rgr_prv}}
- at cindex @var{drc_rgr_prv}
- at item -y @var{drc_rgr_prv}
-Directory in which the previous climo on the analysis grid resides in an
+ at cindex @code{-x @var{drc_prv}}
+ at cindex @var{drc_prv}
+ at item -x @var{drc_prv}
+Directory in which the previous native grid climo files reside for an
 incremental climatology. 
-Default value is @var{drc_prv}.
+Default value is @var{drc_out}. 
+Unless a separate directory is specified (with @samp{-y}) for the
+previous climo on the analysis grid, it is assumed to reside in
+ at var{drc_prv}, too. 
 @cindex @code{-Y @var{drc_rgr_xtn}}
 @cindex @var{drc_rgr_xtn}
 @item -Y @var{drc_rgr_xtn}
 Directory in which the extended analysis grid climo files will be
 stored in an incremental climatology. 
 Default value is @var{drc_xtn}.
+ at cindex @code{-y @var{drc_rgr_prv}}
+ at cindex @var{drc_rgr_prv}
+ at item -y @var{drc_rgr_prv}
+Directory in which the previous climo on the analysis grid resides in an
+incremental climatology. 
+Default value is @var{drc_prv}.
 @end table
 @noindent
 
@@ -16848,7 +17423,7 @@ Moreover, the climatologies can be generated in parallel.
 <a name="nces"></a> <!-- http://nco.sf.net/nco.html#nces -->
 <a name="ncea"></a> <!-- http://nco.sf.net/nco.html#ncea -->
 @end html
- at node nces netCDF Ensemble Statistics, ncecat netCDF Ensemble Concatenator, ncbo netCDF Binary Operator, Reference Manual
+ at node nces netCDF Ensemble Statistics, ncecat netCDF Ensemble Concatenator, ncclimo netCDF Climatology Generator, Reference Manual
 @section @command{nces} netCDF Ensemble Statistics
 @cindex averaging data
 @cindex ensemble average
@@ -17296,7 +17871,13 @@ It contains @w{60 months} of data.
 @end html
 One often prefers that the (new) record dimension have a more
 descriptive, context-based name than simply ``record''. 
-This is easily accomplished with the @samp{-u @var{ulm_nm}} switch:
+This is easily accomplished with the @samp{-u @var{ulm_nm}} switch.
+To add a new record dimension named ``time'' to all variables
+ at example
+ncecat -u time in.nc out.nc
+ at end example
+To glue together multiple files with a new record variable named
+``reaalization'' 
 @example
 ncecat -u realization 85_0[1-5].nc 85.nc
 @end example
@@ -17644,9 +18225,10 @@ ncks [-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b @var{fl_bnr}] [-C] [-c] [--cdl]
 [--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]] [-F] [--fix_rec_dmn @var{dim}] 
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [--grp_xtr_var_xcl]
-[-H] [-h] [--hdn] [--hdr_pad @var{nbr}] [-L @var{dfl_lvl}] [-l @var{path}]
-[-M] [-m] [--map @var{map-file}] [--md5] [--mk_rec_dmn @var{dim}]
-[--no_blank] [--no_tmp_fl] [-O] [-o @var{output-file}] [-P] [-p @var{path}] [--ppc ...]
+[-H] [-h] [--hdn] [--hdr_pad @var{nbr}] [--jsn] [--jsn_att_fmt @var{lvl}] 
+[-L @var{dfl_lvl}] [-l @var{path}] [-M] [-m] [--map @var{map-file}] 
+[--md5] [--mk_rec_dmn @var{dim}] [--no_blank] [--no_tmp_fl] 
+[-O] [-o @var{output-file}] [-P] [-p @var{path}] [--ppc ...]
 [-Q] [-q] [-R] [-r] [--rad] [--ram_all] [--rgr ...] [--rnr=wgt] [-s @var{format}] 
 [-u] [--unn] [-V] [-v @var{var}[, at dots{}]] [-X ...] [-x] [--xml]
 @var{input-file} [[@var{output-file}]]
@@ -17667,23 +18249,24 @@ optionally writes it in flat binary format to @file{fl_bnr}, and
 optionally prints it to screen.
 
 @command{ncks} prints netCDF input data in @acronym{ASCII},
- at acronym{CDL}, or @acronym{NcML} text formats @code{stdout}, like (an
-extended version of) @command{ncdump}.
+ at acronym{CDL}, @acronym{JSON}, or @acronym{NcML/XML} text formats to
+ at code{stdout}, like (an extended version of) @command{ncdump}.
 By default @command{ncks} prints data in a tabular format intended to be
 easy to search for the data you want, one datum per screen line, with
 all dimension subscripts and coordinate values (if any) preceding the
 datum. 
 Option @samp{-s} (or long options @samp{--sng_fmt} and @samp{--string}) 
 permits the user to format data using C-style format strings, while
-option @samp{--cdl} outputs @acronym{CDL} and option @samp{--xml}
-outputs @acronym{NcML}. 
+option @samp{--cdl} outputs @acronym{CDL},
+option @samp{--jsn} (or @samp{json}) outputs @acronym{JSON},
+and option @samp{--xml} (or @samp{ncml}) outputs @acronym{NcML}. 
 @command{ncks} exposes many flexible controls over printed output,
-including @acronym{CDL} and @acronym{NcML}.
+including @acronym{CDL}, @acronym{JSON}, and @acronym{NcML}.
 
-Options @samp{-5}, @samp{-a}, @samp{--cdl}, @samp{-F} , @samp{-H},
- at samp{--hdn}, @samp{-M}, @samp{-m}, @samp{-P}, @samp{-Q}, @samp{-q},
- at samp{-s}, @samp{-u}, @samp{-V}, and @samp{--xml} (and their long option
-counterparts) control the formatted appearance of the data.
+Options @samp{-a}, @samp{--cdl}, @samp{-F} , @samp{-H},
+ at samp{--hdn}, @samp{--jsn}, @samp{-M}, @samp{-m}, @samp{-P}, @samp{-Q},
+ at samp{-q}, @samp{-s}, @samp{-u}, @samp{-V}, and @samp{--xml} (and their
+long option counterparts) control the formatted appearance of the data.
 
 @cindex global attributes
 @cindex attributes, global
@@ -17779,19 +18362,6 @@ Features common to many operators are described in
 @table @samp
 
 @html
-<a name="-5"></a> <!-- http://nco.sf.net/nco.html#-5 -->
-<a name="5"></a> <!-- http://nco.sf.net/nco.html#5 -->
- at end html
- at cindex @code{-5}
- at item -5 
-Print data to screen alphabetically by group, and alphabetically by
-variable within each group.
-This ordering here is used by default in @acronym{CDL}-mode printing,
-and may be selected for traditional mode printing with @samp{-5}
-(The switch for invocation may change to something more descriptive in
-the future). 
-
- at html
 <a name="abc"></a> <!-- http://nco.sf.net/nco.html#abc -->
 <a name="alphabetize"></a> <!-- http://nco.sf.net/nco.html#alphabetize -->
 @end html
@@ -17892,6 +18462,10 @@ limited to at most one record dimension) (@pxref{Group Path Editing}).
 @cindex @code{_Endianness}
 @cindex @code{_Fletcher32}
 @cindex @code{_NOFILL}
+ at cindex @code{_NCProperties}
+ at cindex @code{_IsNetcdf4}
+ at cindex @code{_SuperblockVersion}
+ at item --hdn
 As of @acronym{NCO} version 4.4.0 (January, 2014), the @samp{--hdn}
 or @samp{--hidden} options print hidden (aka special) attributes.
 This is equivalent to @samp{ncdump -s}.
@@ -17900,14 +18474,19 @@ Hidden attributes include: @code{_Format}, @code{_DeflateLevel},
 @code{_Endianness}, @code{_Fletcher32}, and @code{_NOFILL}. 
 Previously @command{ncks} ignored all these attributes in
 @acronym{CDL}/@acronym{XML} modes. 
-Now it prints these attributes as appropriate. 
+Now it prints these attributes as appropriate in all modes. 
 As of @acronym{NCO} version 4.4.6 (September, 2014), @samp{--hdn} 
 also prints the extended file format (i.e., the format of the file
 or server supplying the data) as @code{_SOURCE_FORMAT}.
+As of @acronym{NCO} version 4.6.1 (August, 2016), @samp{--hdn} 
+also prints the hidden attributes @code{_NCProperties},
+ at code{_IsNetcdf4}, and @code{_SuperblockVersion} for netCDF4 files so 
+long as @acronym{NCO} is linked against netCDF library version 4.4.1 or
+later. 
 Users are referred to the
 @uref{http://www.unidata.ucar.edu/software/netcdf/docs, Unidata netCDF Documentation},
 or the man pages for @command{ncgen} or @command{ncdump}, for
-detailed descriptions of the meanings of these attributes. 
+detailed descriptions of the meanings of these hidden attributes. 
 
 @html
 <a name="cdl"></a> <!-- http://nco.sf.net/nco.html#cdl -->
@@ -18057,6 +18636,197 @@ lat[0]=90 lev[0]=1000 lon[3]=270 three_dmn_var[3]=23
 @end example
 
 @html
+<a name="jsn"></a> <!-- http://nco.sf.net/nco.html#jsn -->
+<a name="json"></a> <!-- http://nco.sf.net/nco.html#json -->
+ at end html
+ at cindex @code{--jsn_att_fmt}
+ at cindex @code{--jsn}
+ at cindex @code{--json}
+ at cindex @acronym{JSN}
+ at cindex @acronym{JSON}
+ at cindex JavaScript
+ at item --jsn, --json
+As of @acronym{NCO} version 4.6.2 (November, 2016), @command{ncks} can
+print extracted metadata and data to screen (i.e., @code{stdout}) as
+ at acronym{JSON}, JavaScript Object Notation, defined 
+ at uref{http://www.json.org, here}.
+ at command{ncks} supports @acronym{JSON} output more completely, flexibly,
+and robustly than any other tools to our knowledge.
+With @command{ncks} one can translate entire netCDF3 and netCDF4 files
+into @acronym{JSON}, including metadata and data, using all 
+ at acronym{NCO}'s subsetting and hyperslabbing capabilities.
+Behold @acronym{JSON} output in default mode:
+ at example
+ at verbatim
+zender at aerosol:~$ ncks --jsn -v one ~/nco/data/in.nc
+{
+    "one": {
+      "type": "float",
+      "long_name": "one",
+      "data": 1.0
+    }
+}
+ at end verbatim
+ at end example
+ at acronym{NCO} converts to (using commonsense rules) and prints all
+ at acronym{NC_TYPE}s as one of three atomic types distinguishable as 
+ at acronym{JSON} values: @code{float}, @code{string}, and @code{int}
+ at footnote{The @acronym{JSON} boolean atomic type is not (yet) supported
+as there is no obvious netCDF-equivalent to this type.}.
+Floating-point types (@code{NC_FLOAT} and @code{NC_DOUBLE})
+are printed with a decimal point and at least one signficant digit
+following the decimal point, e.g., @code{1.0} rather than @code{1.} or
+ at code{1}.    
+Integer types (e.g., @code{NC_INT}, @code{NC_UINT64}) are printed
+with no decimal point. 
+String types (@code{NC_CHAR} and @code{NC_STRING}) are enclosed 
+in double-quotes.
+
+The @acronym{JSON} specification allows many possible output formats for  
+netCDF files.  
+ at acronym{NCO} developers implemented a working prototype in Octoboer,
+2016 and, after discussing options with interested parties 
+ at uref{https://sourceforge.net/p/nco/discussion/9829/thread/8c4d7e72, here}, 
+finalized the emitted @acronym{JSON} syntax a few weeks later.
+The resulting @acronym{JSON} backend supports three levels of
+pedanticness, ordered from more concise, flexible, and human-readable to 
+more verbose, restrictive, and 1-to-1 reproducible.
+ at acronym{JSON}-specific switches access these modes and other features. 
+Each @acronym{JSON} configuration option automatically triggers 
+ at acronym{JSON} printing, so that specifying @samp{--json} in addition to
+a @acronym{JSON} configuration option is redundant and unnecessary. 
+
+Request a specific format level with the pedantic level argument to
+the @samp{--jsn_att_fmt @var{lvl}} option.
+This choice has the following effects for the given value of @var{lvl}: 
+ at itemize @bullet
+ at item @math{@var{lvl} = 0} is the default mode, and is also explicitly
+selectable with @samp{--jsn_att_fmt=0}.
+All values are output without the original @acronym{NC_TYPE} token.
+This allows attributes to print as @acronym{JSON} name-value pairs,
+rather than as more complex objects: 
+ at example
+ at verbatim
+% ncks --jsn_att_fmt=0 -v att_var ~/nco/data/in_grp.nc
+...
+"att_var": {
+  "dims": ["time"],
+  "type": "float",
+  "attributes": {
+    "byte_att": [0, 1, 2, 127, -128, -127, -2, -1],
+    "char_att": "Sentence one.\nSentence two.\n",
+    "short_att": 37,
+    "int_att": 73,
+    "long_att": 73,
+    "float_att": [73.0, 72.0, 71.0, 70.010, 69.0010, 68.010, 67.010],
+    "double_att": [73.0, 72.0, 71.0, 70.010, 69.0010, 68.010, 67.0100010]
+  },
+  "data": [10.0, 10.10, 10.20, 10.30, 10.40101, 10.50, 10.60, 10.70, 10.80, 10.990]
+...
+ at end verbatim
+ at end example
+
+This least pedantic mode produces the most easily read results, and
+suffices for many (most?) purposes.  
+Any downstream parser is expected to assign an appropriate type as
+indicated by @acronym{JSON} syntax rules.
+Because the original attribute's @code{NC_TYPE} is not output, it is
+not guaranteed that a downstream parser can exactly reproduce the input  
+file datatypes. 
+For example, whether the original attribute string was stored as
+ at code{NC_CHAR} or @code{NC_STRING} will be unknown to a downstream
+parser.
+Distinctions between @code{NC_FLOAT} and @code{NC_DOUBLE} are similarly
+lost, as are all distinctions among the integer types.
+
+In our experience, these distinctions are immaterial for attributes,
+which are intended for metadata not for large-scale storage.   
+Type-distinctions can, however, significantly impact the size of
+variable data, responsible for nearly all the storage required by
+datasets.
+For instance, storing or transferring an @code{NC_SHORT} field as
+ at code{NC_DOUBLE} would waste a factor of four in space or bandwidth. 
+This is why @acronym{NCO} @emph{always} prints the @code{NC_TYPE} 
+of variable data.
+Downstream parsers can (but are not required to) take advantage of the
+variable's @code{NC_TYPE} to choose the most efficient storage type. 
+
+ at item @math{@var{lvl} = 1} is a medium-pedantic level that prints all
+attributes as objects (with explicit types) @emph{except} those
+attributes whose types match the simplest default @acronym{JSON} value
+types (@code{NC_FLOAT}, 
+ at code{NC_CHAR}/@code{NC_STRING}, @code{NC_INT}).  
+double, string, and int attributes are printed as @acronym{JSON} arrays, 
+as in the @math{@var{lvl} = 0} above:
+ at example
+ at verbatim
+% ncks --jsn_att_fmt=1 -v att_var ~/nco/data/in.nc
+...
+"att_var": {
+  "dims": ["time"],
+  "type": "float",
+  "attributes": {
+    "byte_att": { "type": "byte", "data": [0, 1, 2, 127, -128, -127, -2, -1]},
+    "char_att": "Sentence one.\nSentence two.\n",
+    "short_att": { "type": "short", "data": 37},
+    "int_att": 73,
+    "long_att": 73,
+    "float_att": [73.0, 72.0, 71.0, 70.010, 69.0010, 68.010, 67.010],
+    "double_att": { "type": "double", "data": [73.0, 72.0, 71.0, 70.010, 69.0010, 68.010, 67.0100010]}
+  },
+  "data": [10.0, 10.10, 10.20, 10.30, 10.40101, 10.50, 10.60, 10.70, 10.80, 10.990]
+...
+ at end verbatim
+ at end example
+The attributes of type @code{NC_BYTE}, @code{NC_SHORT}, and
+ at code{NC_DOUBLE} are printed as @acronym{JSON} objects that comprise an
+ at code{NC_TYPE} and a value list, because their values could conceivably 
+not be representable, or would waste space, if interpreted as
+ at code{NC_INT} or @code{NC_FLOAT}, respectively.
+All other attributes may be naturally mapped to the type indicated by
+the @acronym{JSON} syntax of the value, where numbers are assumed to
+correspond to @code{NC_FLOAT} for floating-point, @code{NC_INT} for
+integers, and @code{NC_CHAR} or @code{NC_STRING} for strings.
+This minimal increase in verbosity allows a downstream parser to
+re-construct the original dataset with nearly identical attributes types
+to the original.
+
+ at item @math{@var{lvl} = 2} is the most pedantic mode, and should be used
+when preserving all input types (e.g., to ensure exact reproducibility
+of the input file) is important. 
+This mode always prints attributes as @acronym{JSON} objects with a type
+value so that any downstream parser can (though it need not) guarantee
+exact reproduction of the original dataset:
+ at example
+ at verbatim
+% ncks --jsn_att_fmt=2 -v att_var ~/nco/data/in.nc
+...
+"att_var": {
+  "dims": ["time"],
+  "type": "float",
+  "attributes": {
+    "byte_att": { "type": "byte", "data": [0, 1, 2, 127, -128, -127, -2, -1]},
+    "char_att": { "type": "char", "data": "Sentence one.\nSentence two.\n"},
+    "short_att": { "type": "short", "data": 37},
+    "int_att": { "type": "int", "data": 73},
+    "long_att": { "type": "int", "data": 73},
+    "float_att": { "type": "float", "data": [73.0, 72.0, 71.0, 70.010, 69.0010, 68.010, 67.010]},
+    "double_att": { "type": "double", "data": [73.0, 72.0, 71.0, 70.010, 69.0010, 68.010, 67.0100010]}
+  },
+  "data": [10.0, 10.10, 10.20, 10.30, 10.40101, 10.50, 10.60, 10.70, 10.80, 10.990]
+...
+ at end verbatim
+ at end example
+ at end itemize
+
+ at cindex @command{jsonlint}
+That @acronym{ncks} produces correct translations of for all supported
+datatypes may be verified by @acronym{JSON} syntax checker command
+like @command{jsonlint}. 
+Please let us know how to improve @acronym{JSON} features for your
+application.  
+
+ at html
 <a name="Metadata"></a> <!-- http://nco.sf.net/nco.html#Metadata -->
 <a name="M"></a> <!-- http://nco.sf.net/nco.html#M -->
 @end html
@@ -18306,7 +19076,7 @@ Using @samp{-V} is the same as specifying @samp{-Q --no_nm_prn}.
 
 @html
 <a name="xml"></a> <!-- http://nco.sf.net/nco.html#xml -->
-<a name="ncmnl"></a> <!-- http://nco.sf.net/nco.html#ncml -->
+<a name="ncml"></a> <!-- http://nco.sf.net/nco.html#ncml -->
 @end html
 @cindex @code{--xml}
 @cindex @code{--ncml}
@@ -18315,10 +19085,10 @@ Using @samp{-V} is the same as specifying @samp{-Q --no_nm_prn}.
 @cindex @acronym{NcML}
 @item --xml, --ncml
 As of @acronym{NCO} version 4.3.3 (July, 2013), @command{ncks} can
-print extracted metadata to screen (i.e., @code{stdout}) as
+print extracted data and metadata to screen (i.e., @code{stdout}) as 
 @acronym{XML} in @acronym{NcML}, the netCDF Markup Language.  
- at command{ncks} supports for @acronym{XML} more completely than 
-of @samp{ncdump -x}.
+ at command{ncks} supports @acronym{XML} more completely than 
+ at samp{ncdump -x}.
 With @command{ncks} one can translate entire netCDF3 and netCDF4 files
 into @acronym{NcML}, including metadata and data, using all 
 @acronym{NCO}'s subsetting and hyperslabbing capabilities.
@@ -19562,6 +20332,8 @@ variables.
 As of @acronym{NCO} version 4.6.0 (May, 2016) @command{ncra} can honor 
 the @acronym{CF} @code{climatology} and climatological statistics
 conventions described in @ref{CF Conventions}.
+This functionality only works when each input file contains only a
+single record (timestep).
 Currently this is opt-in with the @samp{--cb} flag (or long-option
 equivalent @samp{--clm_bnd}), or with the @samp{--c2b} flag (or its
 long-option equivalent @samp{--clm2bnd}) switches. 
@@ -19577,7 +20349,7 @@ necessary
 @item Omit any input time coordinate @code{bounds} attribute and
       variable 
 @item Ensure the @code{cell_methods} attribute for all variables is
-      appropriate for climatolgies within and over years.
+      appropriate for climatologies within and over years.
       Climatologies within days will have incorrect units (the switch is
       currently opt-in so that incorrect units are not inadvertently generated).
       Please contact the authors if this functionality is important to you
@@ -19685,7 +20457,7 @@ The last example
 @html
 <a name="ncrcat"></a> <!-- http://nco.sf.net/nco.html#ncrcat -->
 @end html
- at node ncrcat netCDF Record Concatenator, ncclimo netCDF Climatology Generator, ncra netCDF Record Averager, Reference Manual
+ at node ncrcat netCDF Record Concatenator, ncremap netCDF Remapper, ncra netCDF Record Averager, Reference Manual
 @section @command{ncrcat} netCDF Record Concatenator
 @cindex concatenation
 @cindex record concatenation
@@ -19820,7 +20592,7 @@ ncrcat -d time,6.,54. ??.nc 8506_8906.nc
 @html
 <a name="ncremap"></a> <!-- http://nco.sf.net/nco.html#ncremap -->
 @end html
- at node ncremap netCDF Remapper, ncrename netCDF Renamer, ncclimo netCDF Climatology Generator, Reference Manual
+ at node ncremap netCDF Remapper, ncrename netCDF Renamer, ncrcat netCDF Record Concatenator, Reference Manual
 @section @command{ncremap} netCDF Remapper
 @cindex remap
 @cindex regrid
@@ -19833,8 +20605,8 @@ ncremap [-a @var{alg_typ}] [-D @var{dbg_lvl}] [-d @var{dst_fl}] [-E @var{esmf_op
 [-G @var{grd_sng}] [-g @var{grd_dst}] [-I @var{drc_in}] [-i @var{input-file}] [-j @var{job_nbr}]
 [-M] [-m @var{map_fl}] [-n @var{nco_opt}] [-O @var{drc_out}] [-o @var{output-file}]
 [-P @var{pdq_typ}] [-p @var{par_typ}] [-R @var{rgr_opt}] [-s @var{grd_src}] 
-[-T @var{tempest_opt}] [-t @var{thr_nbr}] [-u @var{unq_sfx}] [-V @var{rgr_var}] [-v @var{var_lst}[, at dots{}]] 
-[-w @var{wgt_gnr}] [-x @var{xtn_lst}[, at dots{}]] 
+[-T @var{tempest_opt}] [-t @var{thr_nbr}] [-U @var{drc_tmp}] [-u @var{unq_sfx}] 
+[-V @var{rgr_var}] [-v @var{var_lst}[, at dots{}]] [-w @var{wgt_gnr}] [-x @var{xtn_lst}[, at dots{}]] 
 @end example
 
 @noindent
@@ -19848,7 +20620,7 @@ When no @var{input-file} is provided, @command{ncremap} operates in
 ``map-only'' mode where it exits after producing an annotated map-file. 
 @command{ncremap} was introduced to @acronym{NCO} in version 4.5.4
 (December, 2015). 
-As the newest operator, its interface is evolving in response to user
+As a newer operator, its interface is evolving in response to user
 needs, feedback, and new features. 
 @command{ncremap} orchestrates the regridding features of several
 different programs.
@@ -19863,6 +20635,7 @@ to generate the remapping weights that @acronym{NCO} then applies.
 @cindex @acronym{ERWG}
 @cindex TempestRemap
 @cindex @acronym{NCL}
+ at cindex Conda
 Unlike the rest of @acronym{NCO}, @command{ncremap} is a shell script,
 not a compiled binary. 
 @command{ncremap} wraps the underlying regridder (@command{ncks}) and
@@ -19880,9 +20653,15 @@ generate weights and mapfiles.
 In order to use the weight-generation options, ensure that one or both
 of the weight-generation packages is installed and on your
 @code{$PATH}. 
-The recommended way to obtain @acronym{ERWG} is as distributed in binary
-format with @acronym{NCL}, which many (most?) @acronym{NCO} users
-already have on their system(s).
+The recommended way to obtain @acronym{ERWG} is as distributed in binary 
+format.  
+Many (most?) @acronym{NCO} users already have @acronym{NCL} on their
+system(s), and @acronym{NCL} usually comes with @acronym{ERWG}.
+Since about June, 2016, the Conda @acronym{NCO} package will also
+install @acronym{ERWG}
+ at footnote{   
+Install the Conda @acronym{NCO} package with
+ at samp{conda install -c conda-forge nco}.}. 
 Then be sure the directory containing the @acronym{ERWG} executable is
 on your @code{$PATH} before using @command{ncremap}.
 As a fallback, @acronym{ERWG} may also be installed from source:
@@ -20335,6 +21114,22 @@ Specifies the number of threads used per regridding process
 The @acronym{NCO} regridder scales well up to 8--16 threads.
 
 @html
+<a name="tmp_drc"></a> <!-- http://nco.sf.net/nco.html#tmp_drc -->
+ at end html
+ at cindex @code{-U @var{tmp_drc}}
+ at cindex @var{tmp_drc}
+ at item -U @var{tmp_drc}
+Specifies the directory in which to place intermediate output files.
+Depending on how it is invoked, @command{ncremap} may generate
+a few or many intermediate files (grids and maps) that it will, by
+default, remove upon successful completion.
+These files can be large, so the option to set @var{tmp_drc} is offered
+to ensure their location is convenient to the system.
+If the user does not specify @var{tmp_drc}, then @command{ncremap} uses
+the value of @code{$TMPDIR}, if any, or else @file{/tmp} if it exists,
+or else it uses the current working director (@code{$PWD}).
+
+ at html
 <a name="unq_sfx"></a> <!-- http://nco.sf.net/nco.html#unq_sfx -->
 @end html
 @cindex @code{-u @var{unq_sfx}}
@@ -21624,6 +22419,7 @@ The primary contributors to @acronym{NCO} development have been:
 All concept, design and implementation from 1995--2000.
 Since then autotools, bug-squashing, @acronym{CDL}, chunking,
 documentation, anchoring, recursion, @acronym{GPE}, packing,
+regridding, @acronym{CDL}/@acronym{XML} backends, compression,
 @acronym{NCO} library redesign, @command{ncap2} features,
 @command{ncbo}, @command{ncpdq}, @acronym{SMP} threading and @acronym{MPI} parallelization,
 netCDF4 integration, external funding, project management, science
@@ -21637,6 +22433,7 @@ Migration to netCDF3 @acronym{API}.
 @command{ncap2} parser, lexer, @acronym{GSL}-support, @w{and I/O}.
 Multislabbing algorithm.
 Variable wildcarding.
+ at acronym{JSON} backend.
 Numerous hacks.
 @command{ncap2} language.
 @cindex Rorik Peterson
@@ -21648,7 +22445,7 @@ Debianization.
 Numerous bug-fixes.
 @cindex Joe Hamman
 @item Joe Hamman
-Python bindings (NCOpy).
+Python bindings (PyNCO).
 @cindex Daniel Wang
 @item Daniel Wang
 Script Workflow Analysis for MultiProcessing (@acronym{SWAMP}).
@@ -21661,6 +22458,9 @@ OPeNDAP configuration.
 @item Pedro Vicente
 Windows Visual Studio support.
 netCDF4 groups.
+ at cindex Jerome Mao
+ at item Jerome Mao
+Multi-argument parsing.
 @cindex Russ Rew
 @item Russ Rew
 Advice on @acronym{NCO} structural algorithms
@@ -21776,7 +22576,12 @@ Data with netCDF Operators (NCO), Environ. Modell. Softw., 23(10),
 
 Zender, C. S. and H. J. Mangalam (2007), Scaling Properties of Common
 Statistical Operators for Gridded Datasets, Int. J. High
-Perform. Comput. Appl., 21(4), 485--498, doi:10.1177/1094342007083802.
+Perform. Comput. Appl., 21(4), 485-498, doi:10.1177/1094342007083802.
+
+Zender, C. S. (2016), Bit Grooming: Statistically accurate
+precision-preserving quantization with compression, evaluated in the
+netCDF Operators (NCO, v4.4.8+), Geosci. Model Dev., 9, 3199-3211,
+doi:10.5194/gmd-9-3199-2016.
 
 Zender, C. S. (Year), netCDF Operator (NCO) User Guide, 
 http://nco.sf.net/nco.pdf. 
@@ -21784,8 +22589,9 @@ http://nco.sf.net/nco.pdf.
 @end example
 Use the first when referring to overall design, purpose, and 
 optimization of @acronym{NCO}, the second for the speed and throughput
-of @acronym{NCO}, and the third for specific features and/or the User
-Guide itself, or in a non-academic setting.
+of @acronym{NCO}, the third for compressions, and the fourth for
+specific features and/or the User Guide itself, or in a non-academic
+setting. 
 A complete list of @acronym{NCO} publications and presentations is at
 @url{http://nco.sf.net#pub}.
 This list links to the full papers and seminars themselves.
diff --git a/doc/nco_qt_msvc.shtml b/doc/nco_qt_msvc.shtml
index bfbb874..1d49230 100644
--- a/doc/nco_qt_msvc.shtml
+++ b/doc/nco_qt_msvc.shtml
@@ -15,7 +15,7 @@ scp -p ~/nco/doc/index.shtml ~/nco/doc/nco_qt_msvc.shtml ~/nco/doc/logo_vs2010.p
 <body>
 
 <h2>NCO Qt/MSVC build</h2>
-This page contains instructions regarding building NCO with the Qt system and with Microsoft Windows Visual Studio 2013 (MSVC). 
+This page contains instructions regarding building NCO with the Qt system and with Microsoft Windows Visual Studio 2015 (MSVC). 
 This page is mostly important for developers that want to build NCO from source using Qt or MSVC.
 <br>
 <br>
diff --git a/man/ncclimo.1 b/man/ncclimo.1
index d1bc60d..0cf2bbd 100644
--- a/man/ncclimo.1
+++ b/man/ncclimo.1
@@ -39,14 +39,22 @@ ncclimo
 .IR rgr_opt ] 
 [\-r
 .IR rgr_map ] 
+[\-S
+.IR yr_prv ] 
 [\-s
 .IR yr_srt ] 
 [\-t
 .IR thr_nbr ] 
 [\-v
 .IR var_lst ] 
+[\-X
+.IR drc_xtn ] 
 [\-x
-.IR cf_flg ] 
+.IR drc_prv ] 
+[\-Y
+.IR rgr_xtn ] 
+[\-y
+.IR rgr_prv ] 
 
 .SH DESCRIPTION
 .PP
diff --git a/man/ncflint.1 b/man/ncflint.1
index a6dcdaa..6495647 100644
--- a/man/ncflint.1
+++ b/man/ncflint.1
@@ -36,7 +36,7 @@ ncflint [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 .IR var, val3 ] [\-L 
 .IR dfl_lvl ] [\-l 
 .IR path ]
-[\-\-msa] [\-\-no_tmp_fl] [\-O] [\-p 
+[\-\-msa] [\-N] [\-\-no_tmp_fl] [\-O] [\-p 
 .IR path ]
 [\-\-ppc 
 .IR var1 [,
diff --git a/man/ncremap.1 b/man/ncremap.1
index b81731c..dab36ca 100644
--- a/man/ncremap.1
+++ b/man/ncremap.1
@@ -45,12 +45,18 @@ ncremap
 .IR tempest_opt ] 
 [\-t
 .IR thr_nbr ] 
+[\-U
+.IR drc_tmp ] 
+[\-u
+.IR unq_sfx ] 
+[\-V
+.IR rgr_var ] 
 [\-v
 .IR var_lst ] 
 [\-w
 .IR wgt_gnr ] 
 [\-x
-.IR xtn_var ] 
+.IR xtn_lst ] 
 
 .SH DESCRIPTION
 .PP
diff --git a/qt/libnco/libnco.pro b/qt/libnco/libnco.pro
index 0a17640..8b0cc1e 100644
--- a/qt/libnco/libnco.pro
+++ b/qt/libnco/libnco.pro
@@ -70,7 +70,8 @@ HEADERS += ../../src/nco/libnco.h \
 ../../src/nco/nco_var_lst.h \
 ../../src/nco/nco_var_rth.h \
 ../../src/nco/nco_var_scv.h \
-../../src/nco/nco_var_utl.h
+../../src/nco/nco_var_utl.h \
+../../src/nco/nco_mta.h
 
 SOURCES += ../../src/nco/nco_att_utl.c \
 ../../src/nco/nco_att_utl.c \
@@ -112,5 +113,6 @@ SOURCES += ../../src/nco/nco_att_utl.c \
 ../../src/nco/nco_var_lst.c \
 ../../src/nco/nco_var_rth.c \
 ../../src/nco/nco_var_scv.c \
-../../src/nco/nco_var_utl.c
+../../src/nco/nco_var_utl.c \
+../../src/nco/nco_mta.c
 
diff --git a/qt/libnco/libnco.vcxproj b/qt/libnco/libnco.vcxproj
index d19abb4..f96d678 100644
--- a/qt/libnco/libnco.vcxproj
+++ b/qt/libnco/libnco.vcxproj
@@ -1,77 +1,78 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{E8AACE7E-513A-3A65-B16B-0661B6089A03}</ProjectGuid>
     <RootNamespace>libnco</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>libnco</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>libnco</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libnco</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">libnco</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libnco</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions);NEED_STRSEP</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Lib>
       <OutputFile>$(OutDir)\libnco.lib</OutputFile>
@@ -83,28 +84,28 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Lib>
       <OutputFile>$(OutDir)\libnco.lib</OutputFile>
@@ -116,7 +117,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -142,6 +143,7 @@
     <ClCompile Include="..\..\src\nco\nco_mmr.c" />
     <ClCompile Include="..\..\src\nco\nco_msa.c" />
     <ClCompile Include="..\..\src\nco\nco_mss_val.c" />
+    <ClCompile Include="..\..\src\nco\nco_mta.c" />
     <ClCompile Include="..\..\src\nco\nco_netcdf.c" />
     <ClCompile Include="..\..\src\nco\nco_omp.c" />
     <ClCompile Include="..\..\src\nco\nco_pck.c" />
@@ -189,6 +191,7 @@
     <ClInclude Include="..\..\src\nco\nco_mpi.h" />
     <ClInclude Include="..\..\src\nco\nco_msa.h" />
     <ClInclude Include="..\..\src\nco\nco_mss_val.h" />
+    <ClInclude Include="..\..\src\nco\nco_mta.h" />
     <ClInclude Include="..\..\src\nco\nco_netcdf.h" />
     <ClInclude Include="..\..\src\nco\nco_omp.h" />
     <ClInclude Include="..\..\src\nco\nco_pck.h" />
@@ -215,7 +218,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/libnco/libnco.vcxproj.filters b/qt/libnco/libnco.vcxproj.filters
new file mode 100644
index 0000000..261c393
--- /dev/null
+++ b/qt/libnco/libnco.vcxproj.filters
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\nco_att_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_aux.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_bnr.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_cln_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_cnf_dmn.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_cnf_typ.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_cnk.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_cnv_arm.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_cnv_csm.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_ctl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_dbg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_dmn_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_fl_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_getopt.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_grp_trv.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_grp_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_lmt.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_lst_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_md5.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_mmr.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_msa.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_mss_val.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_netcdf.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_omp.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_pck.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_ppc.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_prn.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_rec_var.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_rgr.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_rth_flt.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_rth_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_scl_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_scm.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_sld.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_sng_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_srm.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_var_avg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_var_lst.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_var_rth.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_var_scv.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_var_utl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco\nco_mta.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\src\nco\libnco.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\ncap.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_att_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_aux.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_bnr.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_cln_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_cnf_dmn.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_cnf_typ.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_cnk.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_cnv_arm.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_cnv_csm.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_ctl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_dbg.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_dmn_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_fl_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_getopt.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_grp_trv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_grp_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_lmt.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_lst_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_md5.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_mmr.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_mpi.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_msa.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_mss_val.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_netcdf.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_omp.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_pck.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_ppc.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_prn.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_rec_var.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_rgr.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_rth_flt.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_rth_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_scl_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_scm.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_sld.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_sng_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_srm.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_typ.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_uthash.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_var_avg.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_var_lst.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_var_rth.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_var_scv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_var_utl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco\nco_mta.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/libnco_c++/libnco_c++.vcxproj b/qt/libnco_c++/libnco_c++.vcxproj
index bd53fbf..0f957e3 100644
--- a/qt/libnco_c++/libnco_c++.vcxproj
+++ b/qt/libnco_c++/libnco_c++.vcxproj
@@ -1,76 +1,77 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}</ProjectGuid>
     <RootNamespace>libnco_c++</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>libnco_c++</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>libnco_c++</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libnco_c++</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">libnco_c++</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libnco_c++</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);$(HEADER_GSL);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);$(HEADER_GSL);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Lib>
       <OutputFile>$(OutDir)\libnco_c++.lib</OutputFile>
@@ -82,27 +83,27 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);$(HEADER_GSL);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);$(HEADER_GSL);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Lib>
       <OutputFile>$(OutDir)\libnco_c++.lib</OutputFile>
@@ -114,7 +115,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;ENABLE_GSL;ENABLE_UDUNITS;HAVE_UDUNITS2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -138,7 +139,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/libnco_c++/libnco_c++.vcxproj.filters b/qt/libnco_c++/libnco_c++.vcxproj.filters
new file mode 100644
index 0000000..3ba20a5
--- /dev/null
+++ b/qt/libnco_c++/libnco_c++.vcxproj.filters
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco_c++\nco_att.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco_c++\nco_dmn.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco_c++\nco_fl.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco_c++\nco_hgh.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco_c++\nco_utl.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco_c++\nco_var.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\src\nco_c++\libnco_c++.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco_c++\nco_att.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco_c++\nco_dmn.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco_c++\nco_fl.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco_c++\nco_hgh.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco_c++\nco_utl.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco_c++\nco_var.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncap2/ncap2.vcxproj b/qt/ncap2/ncap2.vcxproj
index 23fb0b5..7a0ec9b 100644
--- a/qt/ncap2/ncap2.vcxproj
+++ b/qt/ncap2/ncap2.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}</ProjectGuid>
     <RootNamespace>ncap2</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncap2</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncap2</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncap2</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncap2</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncap2</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(HEADER_ANTLR);..\..\src\nco;..\..\src\nco++;C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(HEADER_ANTLR);..\..\src\nco;..\..\src\nco++;$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_ANTLR_REL);$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_ANTLR);$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncap2.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(HEADER_ANTLR);..\..\src\nco;..\..\src\nco++;C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(HEADER_ANTLR);..\..\src\nco;..\..\src\nco++;$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_ANTLR);$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_ANTLR_REL);$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncap2.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -179,7 +180,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncap2/ncap2.vcxproj.filters b/qt/ncap2/ncap2.vcxproj.filters
new file mode 100644
index 0000000..42a14dc
--- /dev/null
+++ b/qt/ncap2/ncap2.vcxproj.filters
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco++\Invoke.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\NcapVar.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\NcapVarVector.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\fmc_all_cls.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\fmc_cls.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\fmc_gsl_cls.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\ncap2.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\ncap2_utl.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\ncoLexer.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\ncoParser.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\ncoTree.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\nco_gsl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\prs_cls.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\sdo_utl.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\nco++\sym_cls.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\src\nco++\Invoke.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\NcapVar.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\NcapVarVector.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\NcapVector.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\VarOp.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\fmc_all_cls.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\fmc_cls.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\fmc_gsl_cls.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\libnco++.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\map_srt_tmp.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\ncap2.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\ncap2_utl.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\ncoEnumTokenTypes.hpp">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\ncoTree.hpp">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\nco_gsl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\prs_cls.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\sdo_utl.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\sym_cls.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\nco++\vtl_cls.hh">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncatted/ncatted.vcxproj b/qt/ncatted/ncatted.vcxproj
index 46f5589..b289a4b 100644
--- a/qt/ncatted/ncatted.vcxproj
+++ b/qt/ncatted/ncatted.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{662B7468-C1B2-3EA3-98DE-D2B8A870CAAE}</ProjectGuid>
     <RootNamespace>ncatted</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncatted</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncatted</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncatted</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncatted</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncatted</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncatted.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncatted.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncatted/ncatted.vcxproj.filters b/qt/ncatted/ncatted.vcxproj.filters
new file mode 100644
index 0000000..79047ac
--- /dev/null
+++ b/qt/ncatted/ncatted.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncatted.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncbo/ncbo.vcxproj b/qt/ncbo/ncbo.vcxproj
index f2f304c..2a75636 100644
--- a/qt/ncbo/ncbo.vcxproj
+++ b/qt/ncbo/ncbo.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{05AA5FAF-8D8D-32F1-8215-3712F8CC38E0}</ProjectGuid>
     <RootNamespace>ncbo</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncbo</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncbo</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncbo</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncbo</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncbo</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncbo.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncbo.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncbo/ncbo.vcxproj.filters b/qt/ncbo/ncbo.vcxproj.filters
new file mode 100644
index 0000000..f2d7dec
--- /dev/null
+++ b/qt/ncbo/ncbo.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncbo.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncea/ncea.vcxproj b/qt/ncea/ncea.vcxproj
index 9461f5a..ab973ab 100644
--- a/qt/ncea/ncea.vcxproj
+++ b/qt/ncea/ncea.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{ED83DCD6-3659-3227-8BAE-CAE51E45E95D}</ProjectGuid>
     <RootNamespace>ncea</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncea</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncea</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncea</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncea</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncea</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncea.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncea.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncea/ncea.vcxproj.filters b/qt/ncea/ncea.vcxproj.filters
new file mode 100644
index 0000000..7e2d907
--- /dev/null
+++ b/qt/ncea/ncea.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncra.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncecat/ncecat.vcxproj b/qt/ncecat/ncecat.vcxproj
index 93086db..bddd9ae 100644
--- a/qt/ncecat/ncecat.vcxproj
+++ b/qt/ncecat/ncecat.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{62931E91-8CDE-3A32-BE30-3CED418E09CF}</ProjectGuid>
     <RootNamespace>ncecat</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncecat</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncecat</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncecat</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncecat</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncecat</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncecat.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncecat.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncecat/ncecat.vcxproj.filters b/qt/ncecat/ncecat.vcxproj.filters
new file mode 100644
index 0000000..4eebc7e
--- /dev/null
+++ b/qt/ncecat/ncecat.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncecat.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncflint/ncflint.vcxproj b/qt/ncflint/ncflint.vcxproj
index a458977..feaf970 100644
--- a/qt/ncflint/ncflint.vcxproj
+++ b/qt/ncflint/ncflint.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{4F01E3BE-0797-3130-88FA-F5C1CD8A0651}</ProjectGuid>
     <RootNamespace>ncflint</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncflint</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncflint</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncflint</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncflint</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncflint</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncflint.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncflint.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncflint/ncflint.vcxproj.filters b/qt/ncflint/ncflint.vcxproj.filters
new file mode 100644
index 0000000..d8bedc8
--- /dev/null
+++ b/qt/ncflint/ncflint.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncflint.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncks/ncks.vcxproj b/qt/ncks/ncks.vcxproj
index 3c471e7..b062e3e 100644
--- a/qt/ncks/ncks.vcxproj
+++ b/qt/ncks/ncks.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{D6E82FA7-5C29-3C68-B0B7-1B352E18E98E}</ProjectGuid>
     <RootNamespace>ncks</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncks</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncks</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncks</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncks</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncks</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncks.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncks.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncks/ncks.vcxproj.filters b/qt/ncks/ncks.vcxproj.filters
new file mode 100644
index 0000000..e5b9d65
--- /dev/null
+++ b/qt/ncks/ncks.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncks.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/nco.pri b/qt/nco.pri
index 55f8443..2981fe1 100644
--- a/qt/nco.pri
+++ b/qt/nco.pri
@@ -26,6 +26,7 @@ win32{
  DEFINES += HAVE_UDUNITS2_H
  DEFINES += ENABLE_GSL
  DEFINES += ENABLE_DAP
+ DEFINES += NEED_STRSEP
 }
 
 win32{
@@ -48,5 +49,8 @@ win32{
  LIBS += $(LIB_UDUNITS)
  LIBS += $(LIB_EXPAT)
  LIBS += $(LIB_CURL)
+ LIBS += ws2_32.lib
+ LIBS += winmm.lib
+ LIBS += wldap32.lib
 }
 
diff --git a/qt/nco.sln b/qt/nco.sln
index f61b3f9..7508a0c 100644
--- a/qt/nco.sln
+++ b/qt/nco.sln
@@ -1,6 +1,6 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.30723.0
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnco", "libnco\libnco.vcxproj", "{E8AACE7E-513A-3A65-B16B-0661B6089A03}"
 EndProject
@@ -60,9 +60,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncea", "ncea\ncea.vcxproj",
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnco_c++", "libnco_c++\libnco_c++.vcxproj", "{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}"
-	ProjectSection(ProjectDependencies) = postProject
-		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
-	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tst_nco_c++", "tst_nco_c++\tst_nco_c++.vcxproj", "{0F656B77-3E08-343A-96F8-2875D7A0B3D0}"
 	ProjectSection(ProjectDependencies) = postProject
@@ -72,6 +69,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tst_nco_c++", "tst_nco_c++\
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncap2", "ncap2\ncap2.vcxproj", "{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}"
 	ProjectSection(ProjectDependencies) = postProject
+		{0F656B77-3E08-343A-96F8-2875D7A0B3D0} = {0F656B77-3E08-343A-96F8-2875D7A0B3D0}
 		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 		{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4} = {BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}
 	EndProjectSection
@@ -147,6 +145,6 @@ Global
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
-		Qt5Version = msvc2013
+		Qt5Version = qtbase
 	EndGlobalSection
 EndGlobal
diff --git a/qt/ncpdq/ncpdq.vcxproj b/qt/ncpdq/ncpdq.vcxproj
index c788232..311b28a 100644
--- a/qt/ncpdq/ncpdq.vcxproj
+++ b/qt/ncpdq/ncpdq.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{0FD04465-7DAA-322F-9F66-241608F4423F}</ProjectGuid>
     <RootNamespace>ncpdq</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncpdq</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncpdq</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncpdq</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncpdq</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncpdq</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncpdq.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncpdq.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncpdq/ncpdq.vcxproj.filters b/qt/ncpdq/ncpdq.vcxproj.filters
new file mode 100644
index 0000000..a4f5189
--- /dev/null
+++ b/qt/ncpdq/ncpdq.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncpdq.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncra/ncra.vcxproj b/qt/ncra/ncra.vcxproj
index 0100c84..31a1041 100644
--- a/qt/ncra/ncra.vcxproj
+++ b/qt/ncra/ncra.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{D6FDCE37-425F-33B0-87F4-92A8CBC20C8A}</ProjectGuid>
     <RootNamespace>ncra</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncra</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncra</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncra</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncra</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncra</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncra.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncra.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncra/ncra.vcxproj.filters b/qt/ncra/ncra.vcxproj.filters
new file mode 100644
index 0000000..7e2d907
--- /dev/null
+++ b/qt/ncra/ncra.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncra.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncrcat/ncrcat.vcxproj b/qt/ncrcat/ncrcat.vcxproj
index d158271..706fe4e 100644
--- a/qt/ncrcat/ncrcat.vcxproj
+++ b/qt/ncrcat/ncrcat.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{D9A7EC37-F172-3427-AD47-6B0A1B89B67F}</ProjectGuid>
     <RootNamespace>ncrcat</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncrcat</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncrcat</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncrcat</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncrcat</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncrcat</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncrcat.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncrcat.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncrcat/ncrcat.vcxproj.filters b/qt/ncrcat/ncrcat.vcxproj.filters
new file mode 100644
index 0000000..7e2d907
--- /dev/null
+++ b/qt/ncrcat/ncrcat.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncra.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncrename/ncrename.vcxproj b/qt/ncrename/ncrename.vcxproj
index c5557d3..e28a6fa 100644
--- a/qt/ncrename/ncrename.vcxproj
+++ b/qt/ncrename/ncrename.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{B5D4FE11-143A-3C0A-8540-C2B86CF3898A}</ProjectGuid>
     <RootNamespace>ncrename</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncrename</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncrename</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncrename</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncrename</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncrename</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncrename.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncrename.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncrename/ncrename.vcxproj.filters b/qt/ncrename/ncrename.vcxproj.filters
new file mode 100644
index 0000000..6b1984d
--- /dev/null
+++ b/qt/ncrename/ncrename.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncrename.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/ncwa/ncwa.vcxproj b/qt/ncwa/ncwa.vcxproj
index 8353e46..827653d 100644
--- a/qt/ncwa/ncwa.vcxproj
+++ b/qt/ncwa/ncwa.vcxproj
@@ -1,87 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{24FE043D-0522-3D7C-A57A-FE178EF42806}</ProjectGuid>
     <RootNamespace>ncwa</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncwa</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncwa</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncwa</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncwa</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ncwa</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncwa.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -93,36 +93,37 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;$(HEADER_NETCDF);$(HEADER_GSL);$(HEADER_UDUNITS);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(LIB_UDUNITS);$(LIB_EXPAT);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\ncwa.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -134,7 +135,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_UDUNITS;HAVE_UDUNITS2_H;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -144,7 +145,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncwa/ncwa.vcxproj.filters b/qt/ncwa/ncwa.vcxproj.filters
new file mode 100644
index 0000000..8c9046e
--- /dev/null
+++ b/qt/ncwa/ncwa.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco\ncwa.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/qt/tst_nco_c++/tst_nco_c++.vcxproj b/qt/tst_nco_c++/tst_nco_c++.vcxproj
index 34e9b26..881d08e 100644
--- a/qt/tst_nco_c++/tst_nco_c++.vcxproj
+++ b/qt/tst_nco_c++/tst_nco_c++.vcxproj
@@ -1,86 +1,86 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{0F656B77-3E08-343A-96F8-2875D7A0B3D0}</ProjectGuid>
     <RootNamespace>tst_nco_c++</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>tst_nco_c++</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <PlatformToolSet>v120</PlatformToolSet>
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v140</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>tst_nco_c++</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">tst_nco_c++</TargetName>
+    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">tst_nco_c++</TargetName>
     <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">tst_nco_c++</TargetName>
-    <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
-      <DebugInformationFormat>None</DebugInformationFormat>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco_c++/release/libnco_c++.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco_c++/debug/libnco_c++.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_CURL);%(AdditionalDependencies);ws2_32.lib;winmm.lib;wldap32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
-      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\tst_nco_c++.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -92,35 +92,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);C:\qt\qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <AdditionalIncludeDirectories>.;..\..\src\nco_c++;$(HEADER_NETCDF);$(QTDIR)\win32-msvc2013;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release\</AssemblerListingLocation>
       <BrowseInformation>false</BrowseInformation>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco_c++/debug/libnco_c++.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>../libnco_c++/release/libnco_c++.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_CURL);%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
       <DataExecutionPrevention>true</DataExecutionPrevention>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
       <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
       <OutputFile>$(OutDir)\tst_nco_c++.exe</OutputFile>
       <RandomizedBaseAddress>true</RandomizedBaseAddress>
       <SubSystem>Console</SubSystem>
@@ -132,7 +133,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -142,7 +143,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="qtbase" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/tst_nco_c++/tst_nco_c++.vcxproj.filters b/qt/tst_nco_c++/tst_nco_c++.vcxproj.filters
new file mode 100644
index 0000000..845e686
--- /dev/null
+++ b/qt/tst_nco_c++/tst_nco_c++.vcxproj.filters
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\nco_c++\tst.cc">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/src/nco++/fmc_all_cls.cc b/src/nco++/fmc_all_cls.cc
index d0cd16c..c50a9bb 100644
--- a/src/nco++/fmc_all_cls.cc
+++ b/src/nco++/fmc_all_cls.cc
@@ -2556,7 +2556,7 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
       
   nbr_args=args_vtr.size();  
 
-  susg="usage: var_out="+sfnm+"(coordinate_var,$dim, string_nm ?"; 
+  susg="usage: var_out="+sfnm+"(coordinate_var,$dim, string_nm?)"; 
 
   
   if(nbr_args<2)
@@ -4479,7 +4479,7 @@ var_sct *vlist_cls::push_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cl
     if(fmc_vtr.empty()){
       fmc_vtr.push_back( fmc_cls("print",this,(int)PPRINT));
       fmc_vtr.push_back( fmc_cls("sprint",this,(int)PSPRINT));
-      fmc_vtr.push_back( fmc_cls("snprint",this,(int)PSNPRINT));
+      fmc_vtr.push_back( fmc_cls("sprint4",this,(int)PSNPRINT));
 
     }
   }		      
diff --git a/src/nco++/fmc_gsl_cls.cc b/src/nco++/fmc_gsl_cls.cc
index 0604e27..e2f1a3a 100644
--- a/src/nco++/fmc_gsl_cls.cc
+++ b/src/nco++/fmc_gsl_cls.cc
@@ -2887,7 +2887,7 @@ var_sct *gsl_cls::hnd_fnc_uerx(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cls
           if( ui64p[idx]>INT_MAX ) {
 	    // bomb out if necessary  
             ostringstream os; 
-            os<<"Possible integer overflow. You have rquested the generation of integers up to the value of " <<ui64p[idx]<<" .This is greater than "<<INT_MAX<<" - the maximum value that can be stored in the netcdf datatype NC_INT. Consider using another random number generator e.g., ran0,fishman18 or knuthran. Consult the GSL manual for details. Alternatively recompile nco for netcdf4 and set the compile flag NCO_TYP_GSL_UINT=NC_UINT\n"; 
+            os<<"Possible integer overflow. You have requested the generation of integers up to the value of " <<ui64p[idx]<<" .This is greater than "<<INT_MAX<<" - the maximum value that can be stored in the netcdf datatype NC_INT. Consider using another random number generator e.g., ran0,fishman18 or knuthran. Consult the GSL manual for details. Alternatively recompile nco for netcdf4 and set the compile flag NCO_TYP_GSL_UINT=NC_UINT\n"; 
             err_prn(sfnm,os.str());
           }
           
diff --git a/src/nco++/ncap2_utl.cc b/src/nco++/ncap2_utl.cc
index 145b884..635d23b 100644
--- a/src/nco++/ncap2_utl.cc
+++ b/src/nco++/ncap2_utl.cc
@@ -17,6 +17,43 @@ ncap_var_is_att( var_sct *var) {
   return False;
 }
 
+std::vector<std::string> /* [O] [vector] array of files paths to be used to locate include files */
+ncap_make_include_paths(const char *spaths)       /* list of file path(s) delimited by ':' */
+{
+  int vdx;
+  size_t srt; 
+  size_t idx; 
+  std::vector<std::string> str_vtr;  
+ 
+  // ncopath= getenv("NCOPATH");
+
+  if(strlen(spaths)==0)
+    return str_vtr;                 
+
+  std::string sin(spaths);
+  // strings must always terminate with ':'  
+  sin+=":";
+
+  srt=0;
+  idx=sin.find(':',srt);
+  
+  do
+  { 
+    if(idx-srt > 0)                
+       str_vtr.push_back(sin.substr(srt, idx-srt));   
+    srt=idx+1; 
+    idx=sin.find(':',srt);   
+  } while(idx!=std::string::npos); 
+  
+  /* append to path '/' if not present */
+  for(vdx=0;vdx<str_vtr.size();vdx++)
+     if(*str_vtr[vdx].end() !='/') 
+        str_vtr[vdx]+="/";  
+     
+  return str_vtr;
+}
+
+
 // initialize var to defaults & undefined to true;
 var_sct *
 ncap_var_udf(const char *var_nm)
diff --git a/src/nco++/ncap2_utl.hh b/src/nco++/ncap2_utl.hh
index ea63243..ba0d192 100644
--- a/src/nco++/ncap2_utl.hh
+++ b/src/nco++/ncap2_utl.hh
@@ -96,6 +96,10 @@ std::string va_nm,       /* I [sng] att name of form var_nm&att_nm */
 prs_cls *prs_arg);       /* I/O vectors of atts & vars & file names  */
 
 
+std::vector<std::string> /* [O] [vector] list of files paths to be used to locate include files */
+ncap_make_include_paths  
+(const char *sin);       /* list of file path(s) delimited by ':' */
+
 int
 ncap_att_gnrl
 (const std::string s_dst,
diff --git a/src/nco++/ncoGrammer.g b/src/nco++/ncoGrammer.g
index 490909f..6666087 100644
--- a/src/nco++/ncoGrammer.g
+++ b/src/nco++/ncoGrammer.g
@@ -342,12 +342,22 @@ tokens {
 {
 private:
     prs_cls *prs_arg;
+    std::vector<std::string> paths_vtr;      
+
 public:
 
     // Customized constructor !!
    ncoLexer(ANTLR_USE_NAMESPACE(std)istream& in, prs_cls *prs_in )
    : ANTLR_USE_NAMESPACE(antlr)CharScanner(new ANTLR_USE_NAMESPACE(antlr)CharBuffer(in),true)
-   {
+   {    
+        char *spaths;
+
+        /* a list of include paths delimited by ':' */   
+        /* if nco NCO_PATH then NULL */
+        spaths=getenv("NCO_PATH");  
+        if( spaths &&  strlen(spaths) >0  ) 
+          paths_vtr=ncap_make_include_paths(spaths);
+
         prs_arg=prs_in;
         // This shouldn't really be here 
         // fxm:: should call default constructor
@@ -360,7 +370,10 @@ public:
             // Do not allow EOF until main lexer 
             // Force selector to retry for another token
             parser->inc_vtr.pop_back();
-            std::cout<<"Setting parser(filename)=" <<parser->inc_vtr.back()<<std::endl; 
+
+            if(nco_dbg_lvl_get() >= 1)
+               std::cout<<"Setting parser(filename)=" <<parser->inc_vtr.back()<<std::endl; 
+
             parser->setFilename(parser->inc_vtr.back());
 			selector.pop(); // return to old lexer/stream
 			selector.retry();
@@ -630,11 +643,27 @@ INCLUDE
 		{
 		// ANTLR_USING_NAMESPACE(std)
 		// create lexer to handle include
+        int idx; 
+        int sz=paths_vtr.size(); 
 		std::string f_nm=f->getText();
+
 		std::ifstream* input=new std::ifstream(f_nm.c_str());
+        // if(*input==NULL){ // 20150413: Trips clang 6.0 MACOSX Yosemite warning from -Wnull-arithmetic and subsequent error "invalid operands to binary expression" 
 		if(!(*input)){
-            //		if(*input==NULL){ // 20150413: Trips clang 6.0 MACOSX Yosemite warning from -Wnull-arithmetic and subsequent error "invalid operands to binary expression" 
-            err_prn("Lexer cannot find include file "+f_nm);
+          // only search include paths if f_nm NOT an absolute path  
+          // add include paths and stop if opened ok  
+          if( sz==0 || f_nm[0]=='/')  
+              err_prn("Lexer cannot find include file \""+f_nm+"\""); 
+             
+          for(idx=0;idx<sz;idx++)
+          {   
+              input=new std::ifstream( (paths_vtr[idx] + f_nm).c_str()); 
+              if(*input)
+                break;  
+          }
+          if(idx==sz) 
+             err_prn("Lexer cannot find the include file \""+f_nm+ "\" in the locations specified in the env-var \"NCO_PATH\""); 
+
 		}
 		ncoLexer* sublexer = new ncoLexer(*input,prs_arg);
 		// make sure errors are reported in right file
@@ -2944,12 +2973,161 @@ att2var returns [ RefAST tr ]
 
 
 
+
 value_list returns [var_sct *var]
 {
 const std::string fnc_nm("value_list");
 var=NULL_CEWI; 
 }
  :(vlst:VALUE_LIST) {
+         char *cp;  
+         int nbr_lst;
+         int idx;
+         int tsz;
+
+         nc_type type=NC_NAT;
+         var_sct *var_ret;                        
+         var_sct *var_int; 
+         RefAST rRef;
+
+         rRef=vlst->getFirstChild();
+
+         nbr_lst=vlst->getNumberOfChildren(); 
+
+         /* get type of first element */ 
+         var_int=out(rRef);       
+
+         /* first element undefined */  
+         if(var_int->undefined)
+          {   
+            var_ret=ncap_var_udf("~zz at value_list");  
+            goto end_val; 
+          } 
+          
+          type=var_int->type;   
+
+          if(type==NC_STRING) 
+          { 
+           var_ret=value_list_string(vlst); 
+           goto end_val; 
+          }
+   
+
+          var_ret=(var_sct *)nco_malloc(sizeof(var_sct));
+          /* Set defaults */
+          (void)var_dfl_set(var_ret); 
+
+          /* Overwrite with attribute expression information */
+          var_ret->nm=strdup("~zz at value_list");
+          var_ret->nbr_dim=0;
+          var_ret->sz=nbr_lst;
+          var_ret->type=type;
+
+          /* deal with initial scan */   
+          if(prs_arg->ntl_scn)
+             goto end_val;
+
+          /* create some space for output */
+          tsz=nco_typ_lng(type);
+          var_ret->val.vp=(void*)nco_malloc(nbr_lst*tsz);
+
+          /* copy first value over */
+          memcpy(var_ret->val.vp, var_int->val.vp, tsz);  
+          var_int=nco_var_free(var_int); 
+          rRef=rRef->getNextSibling();
+
+          /* rest of values */
+          for(idx=1;idx<nbr_lst;idx++) 
+          {
+            var_int=out(rRef);   
+            nco_var_cnf_typ(type,var_int);  
+            cp=(char*)(var_ret->val.vp)+ (ptrdiff_t)(idx*tsz);
+            memcpy(cp,var_int->val.vp,tsz);
+ 
+            var_int=nco_var_free(var_int); 
+            rRef=rRef->getNextSibling();
+          }
+          
+          end_val: if(var_int)
+                      nco_var_free(var_int);  
+          var=var_ret;
+
+    } // end action
+;
+
+
+value_list_string returns [var_sct *var]
+{
+const std::string fnc_nm("value_list");
+var=NULL_CEWI; 
+}
+ :(vlst:VALUE_LIST) {
+
+         char *cp;
+         int nbr_lst;
+         int idx;
+         int tsz;
+
+         nc_type type=NC_NAT;
+         var_sct *var_ret;                        
+         var_sct *var_int; 
+         RefAST rRef;
+         
+         rRef=vlst->getFirstChild();
+
+         nbr_lst=vlst->getNumberOfChildren(); 
+         
+         type=NC_STRING;   
+
+         var_ret=(var_sct *)nco_malloc(sizeof(var_sct));
+         /* Set defaults */
+         (void)var_dfl_set(var_ret); 
+
+         /* Overwrite with attribute expression information */
+         var_ret->nm=strdup("~zz at value_list");
+         var_ret->nbr_dim=0;
+         var_ret->sz=nbr_lst;
+         var_ret->type=type;
+
+         /* deal with initial scan */   
+         if(prs_arg->ntl_scn)
+             goto end_val;
+
+         /* create some space for output */
+         tsz=nco_typ_lng(type);
+         var_ret->val.vp=(void*)nco_malloc(nbr_lst*tsz);
+         (void)cast_void_nctype((nc_type)NC_STRING,&var_ret->val);
+
+         for(idx=0;idx<nbr_lst;idx++) 
+             {
+                 var_int=out(rRef);   
+                 if(var_int->type != NC_STRING)
+                     err_prn(fnc_nm," error processing value list string: to successfully parse value list of strings all elements must be of type NC_STRING");    
+
+                 (void)cast_void_nctype((nc_type)NC_STRING,&var_int->val);
+                 var_ret->val.sngp[idx]=strdup(var_int->val.sngp[0]); 
+                 // cast pointer back
+                 (void)cast_nctype_void((nc_type)NC_STRING,&var_int->val);
+
+                 nco_var_free(var_int);  
+                 rRef=rRef->getNextSibling();
+             }
+         (void)cast_nctype_void((nc_type)NC_STRING,&var_ret->val);
+
+    end_val: var=var_ret;
+
+
+    } // end action
+;
+
+
+
+value_list_old returns [var_sct *var]
+{
+const std::string fnc_nm("value_list");
+var=NULL_CEWI; 
+}
+ :(vlst:VALUE_LIST) {
 
          char *cp;
          int nbr_lst;
@@ -2968,11 +3146,12 @@ var=NULL_CEWI;
            rRef=rRef->getNextSibling();
          }       
          nbr_lst=exp_vtr.size();
+         
 
          // if any types are NC_STRING then call value_list_string() action 
          for(idx=0;idx <nbr_lst ;idx++)
            if(exp_vtr[idx]->type == NC_STRING){
-             var_ret=value_list_string(rRef,exp_vtr);
+             var_ret=value_list_string_old(rRef,exp_vtr);
              goto end_val;
            }
       
@@ -3038,9 +3217,13 @@ var=NULL_CEWI;
         } // end action
 ;
 
+
+
+
+
 // Deal here with a value list of strings
 // Called only from value_list
-value_list_string[ std::vector<var_sct*> &exp_vtr] returns [var_sct *var]
+value_list_string_old[ std::vector<var_sct*> &exp_vtr] returns [var_sct *var]
 {
 const std::string fnc_nm("value_list_string");
 var=NULL_CEWI; 
diff --git a/src/nco++/ncoLexer.cpp b/src/nco++/ncoLexer.cpp
index 89a767a..b117203 100644
--- a/src/nco++/ncoLexer.cpp
+++ b/src/nco++/ncoLexer.cpp
@@ -1,4 +1,4 @@
-/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoLexer.cpp"$ */
+/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoLexer.cpp"$ */
 #include "ncoLexer.hpp"
 #include <antlr/CharBuffer.hpp>
 #include <antlr/TokenStreamException.hpp>
@@ -1339,7 +1339,7 @@ void ncoLexer::mBLASTOUT(bool _createToken) {
 	ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
 	
 	matchNot(EOF/*_CHAR*/);
-#line 457 "ncoGrammer.g"
+#line 470 "ncoGrammer.g"
 	
 	// blast out of lexer & parser
 	// Can't use RecognitionException() as 
@@ -1396,7 +1396,7 @@ void ncoLexer::mUNUSED_OPS(bool _createToken) {
 	}
 	}
 	}
-#line 473 "ncoGrammer.g"
+#line 486 "ncoGrammer.g"
 	
 	
 	ostringstream os;
@@ -1430,7 +1430,7 @@ void ncoLexer::mWS(bool _createToken) {
 	case 0x9 /* '\t' */ :
 	{
 		match('\t' /* charlit */ );
-#line 486 "ncoGrammer.g"
+#line 499 "ncoGrammer.g"
 		tab();
 #line 1436 "ncoLexer.cpp"
 		break;
@@ -1443,7 +1443,7 @@ void ncoLexer::mWS(bool _createToken) {
 	case 0xa /* '\n' */ :
 	{
 		match('\n' /* charlit */ );
-#line 486 "ncoGrammer.g"
+#line 499 "ncoGrammer.g"
 		newline();
 #line 1449 "ncoLexer.cpp"
 		break;
@@ -1454,7 +1454,7 @@ void ncoLexer::mWS(bool _createToken) {
 	}
 	}
 	}
-#line 487 "ncoGrammer.g"
+#line 500 "ncoGrammer.g"
 	_ttype = antlr::Token::SKIP;
 #line 1460 "ncoLexer.cpp"
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
@@ -1484,7 +1484,7 @@ void ncoLexer::mCXX_COMMENT(bool _createToken) {
 	_loop154:;
 	} // ( ... )*
 	match('\n' /* charlit */ );
-#line 492 "ncoGrammer.g"
+#line 505 "ncoGrammer.g"
 	_ttype = antlr::Token::SKIP; newline();
 #line 1490 "ncoLexer.cpp"
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
@@ -1525,7 +1525,7 @@ void ncoLexer::mC_COMMENT(bool _createToken) {
 			}
 			}
 			}
-#line 499 "ncoGrammer.g"
+#line 512 "ncoGrammer.g"
 			newline();
 #line 1531 "ncoLexer.cpp"
 		}
@@ -1542,7 +1542,7 @@ void ncoLexer::mC_COMMENT(bool _createToken) {
 	_loop159:;
 	} // ( ... )*
 	match("*/");
-#line 503 "ncoGrammer.g"
+#line 516 "ncoGrammer.g"
 	_ttype = antlr::Token::SKIP;
 #line 1548 "ncoLexer.cpp"
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
@@ -1581,7 +1581,7 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 	}
 	
 	}
-#line 510 "ncoGrammer.g"
+#line 523 "ncoGrammer.g"
 	_ttype = NCAP_DOUBLE;
 #line 1587 "ncoLexer.cpp"
 	{
@@ -1607,7 +1607,7 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 		}
 		}
 		}
-#line 511 "ncoGrammer.g"
+#line 524 "ncoGrammer.g"
 		_ttype = NCAP_DOUBLE;
 #line 1613 "ncoLexer.cpp"
 		break;
@@ -1633,7 +1633,7 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 		}
 		}
 		}
-#line 512 "ncoGrammer.g"
+#line 525 "ncoGrammer.g"
 		_ttype = NCAP_FLOAT;
 #line 1639 "ncoLexer.cpp"
 		break;
@@ -1659,7 +1659,7 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 		}
 		}
 		}
-#line 513 "ncoGrammer.g"
+#line 526 "ncoGrammer.g"
 		_ttype = NCAP_DOUBLE;
 #line 1665 "ncoLexer.cpp"
 		break;
@@ -1696,7 +1696,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 	}
 	_loop170:;
 	}  // ( ... )+
-#line 518 "ncoGrammer.g"
+#line 531 "ncoGrammer.g"
 	_ttype = NCAP_INT;
 #line 1702 "ncoLexer.cpp"
 	{
@@ -1751,7 +1751,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		
 		}
 		}
-#line 519 "ncoGrammer.g"
+#line 532 "ncoGrammer.g"
 		_ttype = NCAP_DOUBLE;
 #line 1757 "ncoLexer.cpp"
 		break;
@@ -1762,7 +1762,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		{
 		mXPN(false);
 		}
-#line 520 "ncoGrammer.g"
+#line 533 "ncoGrammer.g"
 		_ttype = NCAP_DOUBLE;
 #line 1768 "ncoLexer.cpp"
 		break;
@@ -1788,7 +1788,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 522 "ncoGrammer.g"
+#line 535 "ncoGrammer.g"
 		_ttype = NCAP_SHORT;
 #line 1794 "ncoLexer.cpp"
 		break;
@@ -1814,7 +1814,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 523 "ncoGrammer.g"
+#line 536 "ncoGrammer.g"
 		_ttype = NCAP_BYTE;
 #line 1820 "ncoLexer.cpp"
 		break;
@@ -1839,7 +1839,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 528 "ncoGrammer.g"
+#line 541 "ncoGrammer.g"
 			_ttype = NCAP_UINT64;
 #line 1845 "ncoLexer.cpp"
 		}
@@ -1862,7 +1862,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 524 "ncoGrammer.g"
+#line 537 "ncoGrammer.g"
 			_ttype = NCAP_UBYTE;
 #line 1868 "ncoLexer.cpp"
 		}
@@ -1885,7 +1885,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 525 "ncoGrammer.g"
+#line 538 "ncoGrammer.g"
 			_ttype = NCAP_USHORT;
 #line 1891 "ncoLexer.cpp"
 		}
@@ -1908,7 +1908,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 527 "ncoGrammer.g"
+#line 540 "ncoGrammer.g"
 			_ttype = NCAP_INT64;
 #line 1914 "ncoLexer.cpp"
 		}
@@ -1931,7 +1931,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 521 "ncoGrammer.g"
+#line 534 "ncoGrammer.g"
 			_ttype = NCAP_INT;
 #line 1937 "ncoLexer.cpp"
 		}
@@ -1954,7 +1954,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			
 			}
-#line 526 "ncoGrammer.g"
+#line 539 "ncoGrammer.g"
 			_ttype = NCAP_UINT;
 #line 1960 "ncoLexer.cpp"
 		}
@@ -1985,7 +1985,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 530 "ncoGrammer.g"
+#line 543 "ncoGrammer.g"
 		_ttype = NCAP_FLOAT;
 #line 1991 "ncoLexer.cpp"
 		break;
@@ -2011,7 +2011,7 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 531 "ncoGrammer.g"
+#line 544 "ncoGrammer.g"
 		_ttype = NCAP_DOUBLE;
 #line 2017 "ncoLexer.cpp"
 		break;
@@ -2119,7 +2119,7 @@ void ncoLexer::mVAR_ATT(bool _createToken) {
 	}
 	_loop193:;
 	} // ( ... )*
-#line 541 "ncoGrammer.g"
+#line 554 "ncoGrammer.g"
 	
 	// try to intelligently guess the type to avoid un-necessary function search    
 	bool bDoSearch;
@@ -2245,7 +2245,7 @@ void ncoLexer::mVAR_ATT(bool _createToken) {
 		}
 		_loop197:;
 		} // ( ... )*
-#line 577 "ncoGrammer.g"
+#line 590 "ncoGrammer.g"
 		_ttype = ATT_ID;
 #line 2251 "ncoLexer.cpp"
 	}
@@ -2273,7 +2273,7 @@ void ncoLexer::mVAR_ATT_QT(bool _createToken) {
 	text.erase(_saveIndex);
 	}
 	mVAR_NM_QT(false);
-#line 583 "ncoGrammer.g"
+#line 596 "ncoGrammer.g"
 	_ttype = VAR_ID;
 #line 2279 "ncoLexer.cpp"
 	{
@@ -2282,7 +2282,7 @@ void ncoLexer::mVAR_ATT_QT(bool _createToken) {
 	{
 		match('@' /* charlit */ );
 		mVAR_NM_QT(false);
-#line 584 "ncoGrammer.g"
+#line 597 "ncoGrammer.g"
 		_ttype = ATT_ID;
 #line 2288 "ncoLexer.cpp"
 		break;
@@ -2401,7 +2401,7 @@ void ncoLexer::mATT_ID(bool _createToken) {
 	}
 	_loop205:;
 	} // ( ... )*
-#line 589 "ncoGrammer.g"
+#line 602 "ncoGrammer.g"
 	string an=text.substr(_begin,text.length()-_begin);{ text.erase(_begin); text += "global"+an; };_ttype = ATT_ID;
 #line 2407 "ncoLexer.cpp"
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
@@ -2424,7 +2424,7 @@ void ncoLexer::mSTR_ATT_QT(bool _createToken) {
 	}
 	match('@' /* charlit */ );
 	mVAR_NM_QT(false);
-#line 594 "ncoGrammer.g"
+#line 607 "ncoGrammer.g"
 	_ttype = STR_ATT_QT;
 #line 2430 "ncoLexer.cpp"
 	{
@@ -2455,7 +2455,7 @@ void ncoLexer::mDIM_QT(bool _createToken) {
 	match('$' /* charlit */ );
 	text.erase(_saveIndex);
 	mVAR_NM_QT(false);
-#line 601 "ncoGrammer.g"
+#line 614 "ncoGrammer.g"
 	_ttype = DIM_ID;
 #line 2461 "ncoLexer.cpp"
 	}
@@ -2469,7 +2469,7 @@ void ncoLexer::mDIM_QT(bool _createToken) {
 		_saveIndex = text.length();
 		match(".size");
 		text.erase(_saveIndex);
-#line 603 "ncoGrammer.g"
+#line 616 "ncoGrammer.g"
 		_ttype = DIM_ID_SIZE;
 #line 2475 "ncoLexer.cpp"
 	}
@@ -2578,7 +2578,7 @@ void ncoLexer::mDIM_VAL(bool _createToken) {
 	}
 	_loop217:;
 	} // ( ... )*
-#line 608 "ncoGrammer.g"
+#line 621 "ncoGrammer.g"
 	_ttype = DIM_ID;
 #line 2584 "ncoLexer.cpp"
 	{
@@ -2586,7 +2586,7 @@ void ncoLexer::mDIM_VAL(bool _createToken) {
 		_saveIndex = text.length();
 		match(".size");
 		text.erase(_saveIndex);
-#line 610 "ncoGrammer.g"
+#line 623 "ncoGrammer.g"
 		_ttype = DIM_ID_SIZE;
 #line 2592 "ncoLexer.cpp"
 	}
@@ -2657,7 +2657,7 @@ void ncoLexer::mNSTRING(bool _createToken) {
 	_saveIndex = text.length();
 	match('\"' /* charlit */ );
 	text.erase(_saveIndex);
-#line 624 "ncoGrammer.g"
+#line 637 "ncoGrammer.g"
 	_ttype = NSTRING;
 #line 2663 "ncoLexer.cpp"
 	{
@@ -2665,7 +2665,7 @@ void ncoLexer::mNSTRING(bool _createToken) {
 		_saveIndex = text.length();
 		match('s' /* charlit */ );
 		text.erase(_saveIndex);
-#line 625 "ncoGrammer.g"
+#line 638 "ncoGrammer.g"
 		_ttype = N4STRING;
 #line 2671 "ncoLexer.cpp"
 	}
@@ -2710,15 +2710,31 @@ void ncoLexer::mINCLUDE(bool _createToken) {
 	}
 	mNSTRING(true);
 	f=_returnToken;
-#line 630 "ncoGrammer.g"
+#line 643 "ncoGrammer.g"
 	
 			// ANTLR_USING_NAMESPACE(std)
 			// create lexer to handle include
+	int idx; 
+	int sz=paths_vtr.size(); 
 			std::string f_nm=f->getText();
+	
 			std::ifstream* input=new std::ifstream(f_nm.c_str());
+	// if(*input==NULL){ // 20150413: Trips clang 6.0 MACOSX Yosemite warning from -Wnull-arithmetic and subsequent error "invalid operands to binary expression" 
 			if(!(*input)){
-	//		if(*input==NULL){ // 20150413: Trips clang 6.0 MACOSX Yosemite warning from -Wnull-arithmetic and subsequent error "invalid operands to binary expression" 
-	err_prn("Lexer cannot find include file "+f_nm);
+	// only search include paths if f_nm NOT an absolute path  
+	// add include paths and stop if opened ok  
+	if( sz==0 || f_nm[0]=='/')  
+	err_prn("Lexer cannot find include file \""+f_nm+"\""); 
+	
+	for(idx=0;idx<sz;idx++)
+	{   
+	input=new std::ifstream( (paths_vtr[idx] + f_nm).c_str()); 
+	if(*input)
+	break;  
+	}
+	if(idx==sz) 
+	err_prn("Lexer cannot find the include file \""+f_nm+ "\" in the locations specified in the env-var \"NCO_PATH\""); 
+	
 			}
 			ncoLexer* sublexer = new ncoLexer(*input,prs_arg);
 			// make sure errors are reported in right file
@@ -2740,7 +2756,7 @@ void ncoLexer::mINCLUDE(bool _createToken) {
 			// of the new instance of this lexer.
 			selector.retry(); // throws TokenStreamRetryException
 			
-#line 2744 "ncoLexer.cpp"
+#line 2760 "ncoLexer.cpp"
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
 	   _token = makeToken(_ttype);
 	   _token->setText(text.substr(_begin, text.length()-_begin));
diff --git a/src/nco++/ncoLexer.hpp b/src/nco++/ncoLexer.hpp
index 16b57a7..a3eefd6 100644
--- a/src/nco++/ncoLexer.hpp
+++ b/src/nco++/ncoLexer.hpp
@@ -2,7 +2,7 @@
 #define INC_ncoLexer_hpp_
 
 #include <antlr/config.hpp>
-/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoLexer.hpp"$ */
+/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoLexer.hpp"$ */
 #include <antlr/CommonToken.hpp>
 #include <antlr/InputBuffer.hpp>
 #include <antlr/BitSet.hpp>
@@ -57,12 +57,22 @@ class CUSTOM_API ncoLexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public
 
 private:
     prs_cls *prs_arg;
+    std::vector<std::string> paths_vtr;      
+
 public:
 
     // Customized constructor !!
    ncoLexer(ANTLR_USE_NAMESPACE(std)istream& in, prs_cls *prs_in )
    : ANTLR_USE_NAMESPACE(antlr)CharScanner(new ANTLR_USE_NAMESPACE(antlr)CharBuffer(in),true)
-   {
+   {    
+        char *spaths;
+
+        /* a list of include paths delimited by ':' */   
+        /* if nco NCO_PATH then NULL */
+        spaths=getenv("NCO_PATH");  
+        if( spaths &&  strlen(spaths) >0  ) 
+          paths_vtr=ncap_make_include_paths(spaths);
+
         prs_arg=prs_in;
         // This shouldn't really be here 
         // fxm:: should call default constructor
@@ -75,7 +85,10 @@ public:
             // Do not allow EOF until main lexer 
             // Force selector to retry for another token
             parser->inc_vtr.pop_back();
-            std::cout<<"Setting parser(filename)=" <<parser->inc_vtr.back()<<std::endl; 
+
+            if(nco_dbg_lvl_get() >= 1)
+               std::cout<<"Setting parser(filename)=" <<parser->inc_vtr.back()<<std::endl; 
+
             parser->setFilename(parser->inc_vtr.back());
 			selector.pop(); // return to old lexer/stream
 			selector.retry();
diff --git a/src/nco++/ncoParser.cpp b/src/nco++/ncoParser.cpp
index d0ee3e8..b239a07 100644
--- a/src/nco++/ncoParser.cpp
+++ b/src/nco++/ncoParser.cpp
@@ -1,4 +1,4 @@
-/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoParser.cpp"$ */
+/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoParser.cpp"$ */
 #include "ncoParser.hpp"
 #include <antlr/NoViableAltException.hpp>
 #include <antlr/SemanticException.hpp>
diff --git a/src/nco++/ncoParser.hpp b/src/nco++/ncoParser.hpp
index 0cd633e..f5b9b60 100644
--- a/src/nco++/ncoParser.hpp
+++ b/src/nco++/ncoParser.hpp
@@ -2,7 +2,7 @@
 #define INC_ncoParser_hpp_
 
 #include <antlr/config.hpp>
-/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoParser.hpp"$ */
+/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoParser.hpp"$ */
 #include <antlr/TokenStream.hpp>
 #include <antlr/TokenBuffer.hpp>
 #include "ncoParserTokenTypes.hpp"
diff --git a/src/nco++/ncoParserTokenTypes.hpp b/src/nco++/ncoParserTokenTypes.hpp
index 94c587d..f141853 100644
--- a/src/nco++/ncoParserTokenTypes.hpp
+++ b/src/nco++/ncoParserTokenTypes.hpp
@@ -1,7 +1,7 @@
 #ifndef INC_ncoParserTokenTypes_hpp_
 #define INC_ncoParserTokenTypes_hpp_
 
-/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoParserTokenTypes.hpp"$ */
+/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoParserTokenTypes.hpp"$ */
 
 #ifndef CUSTOM_API
 # define CUSTOM_API
diff --git a/src/nco++/ncoTree.cpp b/src/nco++/ncoTree.cpp
index a34e3a5..760ecff 100644
--- a/src/nco++/ncoTree.cpp
+++ b/src/nco++/ncoTree.cpp
@@ -1,4 +1,4 @@
-/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoTree.cpp"$ */
+/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoTree.cpp"$ */
 #include "ncoTree.hpp"
 #include <antlr/Token.hpp>
 #include <antlr/AST.hpp>
@@ -13,7 +13,7 @@ ncoTree::ncoTree()
 }
 
 int  ncoTree::lmt_peek(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 1128 "ncoGrammer.g"
+#line 1157 "ncoGrammer.g"
 	int nbr_dmn=0;
 #line 19 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST lmt_peek_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -24,7 +24,7 @@ int  ncoTree::lmt_peek(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		match(_t,LMT_LIST);
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 1130 "ncoGrammer.g"
+#line 1159 "ncoGrammer.g"
 			
 			RefAST aRef;     
 			aRef=lmt->getFirstChild();
@@ -51,7 +51,7 @@ int  ncoTree::lmt_peek(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 1141 "ncoGrammer.g"
+#line 1170 "ncoGrammer.g"
 	int iret=0;
 #line 57 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST statements_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -69,7 +69,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	ANTLR_USE_NAMESPACE(antlr)RefAST stmt2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST dtyp = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST def = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 1141 "ncoGrammer.g"
+#line 1170 "ncoGrammer.g"
 	
 	var_sct *var=NULL;
 	var_sct *var2=NULL;
@@ -91,7 +91,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,BLOCK);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1151 "ncoGrammer.g"
+#line 1180 "ncoGrammer.g"
 				
 				//std::cout <<"Num of Children in block="<<blk->getNumberOfChildren()<<endl;
 				iret=run_exe(blk->getFirstChild(),lpp_vtr.size() );
@@ -113,7 +113,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t231;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1158 "ncoGrammer.g"
+#line 1187 "ncoGrammer.g"
 				
 				int aType; 
 				
@@ -146,7 +146,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t232;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1178 "ncoGrammer.g"
+#line 1207 "ncoGrammer.g"
 				
 				
 				var=out(fss);
@@ -174,7 +174,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t233;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1188 "ncoGrammer.g"
+#line 1217 "ncoGrammer.g"
 				
 				//if can have only 3 or 4 parts  , 1 node and 2 or 3 siblings
 				// IF LOGICAL_EXP STATEMENT1 STATEMENT2
@@ -222,7 +222,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t234;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1218 "ncoGrammer.g"
+#line 1247 "ncoGrammer.g"
 				
 				// convert mask to short 
 				RefAST tr; 
@@ -285,7 +285,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t235;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1262 "ncoGrammer.g"
+#line 1291 "ncoGrammer.g"
 				
 				
 				bool br;
@@ -339,7 +339,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t236;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1291 "ncoGrammer.g"
+#line 1320 "ncoGrammer.g"
 				
 				bool b1,b2,b3,br;
 				var_sct *var_f1;
@@ -400,7 +400,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,ELSE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1342 "ncoGrammer.g"
+#line 1371 "ncoGrammer.g"
 				iret=ELSE;
 #line 406 "ncoTree.cpp"
 			}
@@ -412,7 +412,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,BREAK);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1343 "ncoGrammer.g"
+#line 1372 "ncoGrammer.g"
 				iret=BREAK;
 #line 418 "ncoTree.cpp"
 			}
@@ -424,7 +424,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,CONTINUE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1344 "ncoGrammer.g"
+#line 1373 "ncoGrammer.g"
 				iret=CONTINUE;
 #line 430 "ncoTree.cpp"
 			}
@@ -436,7 +436,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NULL_NODE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1345 "ncoGrammer.g"
+#line 1374 "ncoGrammer.g"
 				iret=NULL_NODE;
 #line 442 "ncoTree.cpp"
 			}
@@ -522,7 +522,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t237;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1347 "ncoGrammer.g"
+#line 1376 "ncoGrammer.g"
 				
 				
 				bool bunlimited=false;      
@@ -587,7 +587,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2155 "ncoGrammer.g"
+#line 2184 "ncoGrammer.g"
 	var_sct *var;
 #line 593 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST out_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -631,7 +631,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	ANTLR_USE_NAMESPACE(antlr)RefAST val_uint = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST val_int64 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST val_uint64 = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2155 "ncoGrammer.g"
+#line 2184 "ncoGrammer.g"
 	
 	bool bret=true;   
 	const std::string fnc_nm("out"); 
@@ -668,7 +668,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t308;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2196 "ncoGrammer.g"
+#line 2225 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, TIMES );
 #line 674 "ncoTree.cpp"
 			}
@@ -687,7 +687,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t309;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2199 "ncoGrammer.g"
+#line 2228 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, DIVIDE );
 #line 693 "ncoTree.cpp"
 			}
@@ -706,7 +706,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t310;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2201 "ncoGrammer.g"
+#line 2230 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, MOD);
 #line 712 "ncoTree.cpp"
 			}
@@ -725,7 +725,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t311;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2203 "ncoGrammer.g"
+#line 2232 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, CARET);
 #line 731 "ncoTree.cpp"
 			}
@@ -742,7 +742,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t312;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2206 "ncoGrammer.g"
+#line 2235 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,NULL_CEWI, LNOT );
 #line 748 "ncoTree.cpp"
 			}
@@ -761,7 +761,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t319;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2225 "ncoGrammer.g"
+#line 2254 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LAND );
 #line 767 "ncoTree.cpp"
 			}
@@ -780,7 +780,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t320;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2227 "ncoGrammer.g"
+#line 2256 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LOR );
 #line 786 "ncoTree.cpp"
 			}
@@ -799,7 +799,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t321;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2230 "ncoGrammer.g"
+#line 2259 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LTHAN );
 #line 805 "ncoTree.cpp"
 			}
@@ -818,7 +818,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t322;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2232 "ncoGrammer.g"
+#line 2261 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, GTHAN );
 #line 824 "ncoTree.cpp"
 			}
@@ -837,7 +837,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t323;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2234 "ncoGrammer.g"
+#line 2263 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, GEQ );
 #line 843 "ncoTree.cpp"
 			}
@@ -856,7 +856,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t324;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2236 "ncoGrammer.g"
+#line 2265 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LEQ );
 #line 862 "ncoTree.cpp"
 			}
@@ -875,7 +875,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t325;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2238 "ncoGrammer.g"
+#line 2267 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, EQ );
 #line 881 "ncoTree.cpp"
 			}
@@ -894,7 +894,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t326;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2240 "ncoGrammer.g"
+#line 2269 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, NEQ );
 #line 900 "ncoTree.cpp"
 			}
@@ -913,7 +913,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t327;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2243 "ncoGrammer.g"
+#line 2272 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, FLTHAN );
 #line 919 "ncoTree.cpp"
 			}
@@ -932,7 +932,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t328;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2245 "ncoGrammer.g"
+#line 2274 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, FGTHAN );
 #line 938 "ncoTree.cpp"
 			}
@@ -950,7 +950,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t412;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2378 "ncoGrammer.g"
+#line 2407 "ncoGrammer.g"
 				
 				var=out(att2var(attz));    
 				
@@ -970,7 +970,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t413;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2384 "ncoGrammer.g"
+#line 2413 "ncoGrammer.g"
 				
 				
 				
@@ -992,7 +992,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t414;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2389 "ncoGrammer.g"
+#line 2418 "ncoGrammer.g"
 				
 				bool br;
 				
@@ -1025,7 +1025,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t415;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2407 "ncoGrammer.g"
+#line 2436 "ncoGrammer.g"
 				
 				// The lexer has appended the index of the function to the function name m - (name#index)
 				//  the index is into fmc_vtr  
@@ -1057,7 +1057,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t416;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2418 "ncoGrammer.g"
+#line 2447 "ncoGrammer.g"
 				
 				// The lexer has appended the index of the function to the function name m - (name#index)
 				//  the index is into fmc_vtr  
@@ -1076,7 +1076,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,DIM_ID_SIZE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2428 "ncoGrammer.g"
+#line 2457 "ncoGrammer.g"
 				
 				string sDim=dval->getText();
 				dmn_sct *dmn_fd;
@@ -1126,7 +1126,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,VALUE_LIST);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2669 "ncoGrammer.g"
+#line 2698 "ncoGrammer.g"
 				
 				var=value_list(vlst);
 				
@@ -1140,7 +1140,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NSTRING);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2674 "ncoGrammer.g"
+#line 2703 "ncoGrammer.g"
 				
 				/* use malloc here rather than strdup(str->getText().c_str()) as this causes 
 				an invalid-read when using GCC compiler */ 
@@ -1174,7 +1174,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,N4STRING);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2702 "ncoGrammer.g"
+#line 2731 "ncoGrammer.g"
 				
 				char *tsng;
 				tsng=(char*)nco_malloc(str1->getText().size()+1);    
@@ -1212,7 +1212,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_FLOAT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2732 "ncoGrammer.g"
+#line 2761 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~float"),(nc_type)NC_FLOAT,false); else var=ncap_sclr_var_mk(SCS("~float"),static_cast<float>(std::strtod(val_float->getText().c_str(),(char **)NULL)));
 #line 1218 "ncoTree.cpp"
 			}
@@ -1224,7 +1224,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_DOUBLE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2734 "ncoGrammer.g"
+#line 2763 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~double"),(nc_type)NC_DOUBLE,false); else var=ncap_sclr_var_mk(SCS("~double"),strtod(val_double->getText().c_str(),(char **)NULL));
 #line 1230 "ncoTree.cpp"
 			}
@@ -1236,7 +1236,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_INT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2736 "ncoGrammer.g"
+#line 2765 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~int"),(nc_type)NC_INT,false); else var=ncap_sclr_var_mk(SCS("~int"),static_cast<nco_int>(std::strtol(val_int->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
 #line 1242 "ncoTree.cpp"
 			}
@@ -1248,7 +1248,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_SHORT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2738 "ncoGrammer.g"
+#line 2767 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~short"),(nc_type)NC_SHORT,false); else var=ncap_sclr_var_mk(SCS("~short"),static_cast<nco_short>(std::strtol(val_short->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
 #line 1254 "ncoTree.cpp"
 			}
@@ -1260,7 +1260,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_BYTE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2740 "ncoGrammer.g"
+#line 2769 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~byte"),(nc_type)NC_BYTE,false); else var=ncap_sclr_var_mk(SCS("~byte"),static_cast<nco_byte>(std::strtol(val_byte->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
 #line 1266 "ncoTree.cpp"
 			}
@@ -1272,7 +1272,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_UBYTE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2745 "ncoGrammer.g"
+#line 2774 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~ubyte"),(nc_type)NC_UBYTE,false); else var=ncap_sclr_var_mk(SCS("~ubyte"),static_cast<nco_ubyte>(std::strtoul(val_ubyte->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
 #line 1278 "ncoTree.cpp"
 			}
@@ -1284,7 +1284,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_USHORT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2749 "ncoGrammer.g"
+#line 2778 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~ushort"),(nc_type)NC_USHORT,false); else var=ncap_sclr_var_mk(SCS("~ushort"),static_cast<nco_ushort>(std::strtoul(val_ushort->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
 #line 1290 "ncoTree.cpp"
 			}
@@ -1296,7 +1296,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_UINT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2751 "ncoGrammer.g"
+#line 2780 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~uint"),(nc_type)NC_UINT,false); else var=ncap_sclr_var_mk(SCS("~uint"),static_cast<nco_uint>(std::strtoul(val_uint->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
 #line 1302 "ncoTree.cpp"
 			}
@@ -1308,7 +1308,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_INT64);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2753 "ncoGrammer.g"
+#line 2782 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~int64"),(nc_type)NC_INT64,false); else var=ncap_sclr_var_mk(SCS("~int64"),sng2nbr(val_int64->getText(),nco_int64_CEWI));
 #line 1314 "ncoTree.cpp"
 			}
@@ -1320,7 +1320,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_UINT64);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2757 "ncoGrammer.g"
+#line 2786 "ncoGrammer.g"
 				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(SCS("~uint64"),(nc_type)NC_UINT64,false); else var=ncap_sclr_var_mk(SCS("~uint64"),sng2nbr(val_uint64->getText(),nco_uint64_CEWI));
 #line 1326 "ncoTree.cpp"
 			}
@@ -1366,7 +1366,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				_t = __t279;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 2176 "ncoGrammer.g"
+#line 2205 "ncoGrammer.g"
 					var=ncap_var_var_op(var1,var2, PLUS );
 #line 1372 "ncoTree.cpp"
 				}
@@ -1411,7 +1411,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 					_t = __t283;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 2178 "ncoGrammer.g"
+#line 2207 "ncoGrammer.g"
 						var=ncap_var_var_op(var1,var2, MINUS );
 #line 1417 "ncoTree.cpp"
 					}
@@ -1466,7 +1466,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 						_t = __t288;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 2179 "ncoGrammer.g"
+#line 2208 "ncoGrammer.g"
 							
 							var1=out(att2var(aposti));     
 							var=ncap_var_var_inc(var1,NULL_CEWI,POST_INC,false,bret,prs_arg);      
@@ -1524,7 +1524,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 							_t = __t294;
 							_t = _t->getNextSibling();
 							if ( inputState->guessing==0 ) {
-#line 2183 "ncoGrammer.g"
+#line 2212 "ncoGrammer.g"
 								
 								var1=out(att2var(apostd));     
 								var=ncap_var_var_inc(var1,NULL_CEWI,POST_DEC,false,bret,prs_arg);      
@@ -1582,7 +1582,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 								_t = __t300;
 								_t = _t->getNextSibling();
 								if ( inputState->guessing==0 ) {
-#line 2187 "ncoGrammer.g"
+#line 2216 "ncoGrammer.g"
 									
 									var1=out(att2var(aprei));     
 									var=ncap_var_var_inc(var1,NULL_CEWI,INC,false,bret,prs_arg);      
@@ -1640,7 +1640,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t306;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2191 "ncoGrammer.g"
+#line 2220 "ncoGrammer.g"
 										
 										var1=out(att2var(apred));     
 										var=ncap_var_var_inc(var1,NULL_CEWI,DEC,false,bret,prs_arg);      
@@ -1658,7 +1658,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t313;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2208 "ncoGrammer.g"
+#line 2237 "ncoGrammer.g"
 										var=ncap_var_var_op(var1,NULL_CEWI, MINUS );
 #line 1664 "ncoTree.cpp"
 									}
@@ -1683,7 +1683,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t315;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2212 "ncoGrammer.g"
+#line 2241 "ncoGrammer.g"
 										var=ncap_var_var_inc(var1,NULL_CEWI,INC,false,bret,prs_arg);
 #line 1689 "ncoTree.cpp"
 									}
@@ -1698,7 +1698,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t316;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2215 "ncoGrammer.g"
+#line 2244 "ncoGrammer.g"
 										var=ncap_var_var_inc(var1,NULL_CEWI, DEC,false,bret,prs_arg );
 #line 1704 "ncoTree.cpp"
 									}
@@ -1713,7 +1713,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t317;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2217 "ncoGrammer.g"
+#line 2246 "ncoGrammer.g"
 										
 										var=ncap_var_var_inc(var1,NULL_CEWI,POST_INC,false,bret,prs_arg);
 										
@@ -1730,7 +1730,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t318;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2220 "ncoGrammer.g"
+#line 2249 "ncoGrammer.g"
 										
 										var=ncap_var_var_inc(var1,NULL_CEWI,POST_DEC,false,bret,prs_arg);
 										
@@ -1799,7 +1799,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 										_t = __t333;
 										_t = _t->getNextSibling();
 										if ( inputState->guessing==0 ) {
-#line 2253 "ncoGrammer.g"
+#line 2282 "ncoGrammer.g"
 											
 											var=ncap_var_var_inc(var1,var2,PLUS_ASSIGN ,false, bret,prs_arg);
 											
@@ -1859,7 +1859,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 											_t = __t338;
 											_t = _t->getNextSibling();
 											if ( inputState->guessing==0 ) {
-#line 2257 "ncoGrammer.g"
+#line 2286 "ncoGrammer.g"
 												
 												var=ncap_var_var_inc(var1,var2, PLUS_ASSIGN ,true, bret,prs_arg);
 												
@@ -1920,7 +1920,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 												_t = __t344;
 												_t = _t->getNextSibling();
 												if ( inputState->guessing==0 ) {
-#line 2261 "ncoGrammer.g"
+#line 2290 "ncoGrammer.g"
 													
 													
 													var1=out(att2var(atp));     
@@ -1991,7 +1991,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 													_t = __t350;
 													_t = _t->getNextSibling();
 													if ( inputState->guessing==0 ) {
-#line 2268 "ncoGrammer.g"
+#line 2297 "ncoGrammer.g"
 														
 														var=ncap_var_var_inc(var1,var2, MINUS_ASSIGN ,false, bret,prs_arg);
 														
@@ -2051,7 +2051,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 														_t = __t355;
 														_t = _t->getNextSibling();
 														if ( inputState->guessing==0 ) {
-#line 2272 "ncoGrammer.g"
+#line 2301 "ncoGrammer.g"
 															
 															var=ncap_var_var_inc(var1,var2, MINUS_ASSIGN ,true, bret,prs_arg);
 															
@@ -2112,7 +2112,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 															_t = __t361;
 															_t = _t->getNextSibling();
 															if ( inputState->guessing==0 ) {
-#line 2276 "ncoGrammer.g"
+#line 2305 "ncoGrammer.g"
 																
 																var1=out(att2var(atm));     
 																var=ncap_var_var_inc(var1,var2, MINUS_ASSIGN ,false, bret,prs_arg);
@@ -2182,7 +2182,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																_t = __t367;
 																_t = _t->getNextSibling();
 																if ( inputState->guessing==0 ) {
-#line 2281 "ncoGrammer.g"
+#line 2310 "ncoGrammer.g"
 																	
 																	var=ncap_var_var_inc(var1,var2, TIMES_ASSIGN ,false, bret,prs_arg);
 																	
@@ -2242,7 +2242,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																	_t = __t372;
 																	_t = _t->getNextSibling();
 																	if ( inputState->guessing==0 ) {
-#line 2285 "ncoGrammer.g"
+#line 2314 "ncoGrammer.g"
 																		
 																		var=ncap_var_var_inc(var1,var2, TIMES_ASSIGN ,true, bret,prs_arg);
 																		
@@ -2303,7 +2303,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																		_t = __t378;
 																		_t = _t->getNextSibling();
 																		if ( inputState->guessing==0 ) {
-#line 2289 "ncoGrammer.g"
+#line 2318 "ncoGrammer.g"
 																			
 																			var1=out(att2var(attm));     
 																			var=ncap_var_var_inc(var1,var2, TIMES_ASSIGN ,false, bret,prs_arg);
@@ -2373,7 +2373,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																			_t = __t384;
 																			_t = _t->getNextSibling();
 																			if ( inputState->guessing==0 ) {
-#line 2294 "ncoGrammer.g"
+#line 2323 "ncoGrammer.g"
 																				
 																				var=ncap_var_var_inc(var1,var2, DIVIDE_ASSIGN ,false, bret,prs_arg);
 																				
@@ -2433,7 +2433,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																				_t = __t389;
 																				_t = _t->getNextSibling();
 																				if ( inputState->guessing==0 ) {
-#line 2298 "ncoGrammer.g"
+#line 2327 "ncoGrammer.g"
 																					
 																					var=ncap_var_var_inc(var1,var2, DIVIDE_ASSIGN ,true, bret,prs_arg);
 																					
@@ -2494,7 +2494,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																					_t = __t395;
 																					_t = _t->getNextSibling();
 																					if ( inputState->guessing==0 ) {
-#line 2302 "ncoGrammer.g"
+#line 2331 "ncoGrammer.g"
 																						
 																						var1=out(att2var(atd));        
 																						var=ncap_var_var_inc(var1,var2, DIVIDE_ASSIGN ,false, bret,prs_arg);
@@ -2561,7 +2561,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																						_t = __t401;
 																						_t = _t->getNextSibling();
 																						if ( inputState->guessing==0 ) {
-#line 2308 "ncoGrammer.g"
+#line 2337 "ncoGrammer.g"
 																							
 																							if(prs_arg->ntl_scn)
 																							var=assign_ntl(asn,false,bret); 
@@ -2621,7 +2621,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																							_t = __t406;
 																							_t = _t->getNextSibling();
 																							if ( inputState->guessing==0 ) {
-#line 2316 "ncoGrammer.g"
+#line 2345 "ncoGrammer.g"
 																								
 																								
 																								RefAST tr;
@@ -2683,7 +2683,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																							_t = __t408;
 																							_t = _t->getNextSibling();
 																							if ( inputState->guessing==0 ) {
-#line 2332 "ncoGrammer.g"
+#line 2361 "ncoGrammer.g"
 																								
 																								// Check for RAM variable - if present 
 																								// change tree - for example from:
@@ -2768,7 +2768,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																								_t = __t420;
 																								_t = _t->getNextSibling();
 																								if ( inputState->guessing==0 ) {
-#line 2469 "ncoGrammer.g"
+#line 2498 "ncoGrammer.g"
 																									
 																											
 																											    // fxm: 4 Oct 2015
@@ -2836,7 +2836,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																									_t = __t424;
 																									_t = _t->getNextSibling();
 																									if ( inputState->guessing==0 ) {
-#line 2497 "ncoGrammer.g"
+#line 2526 "ncoGrammer.g"
 																										
 																										
 																										std::string att_nm=attl->getText();
@@ -2946,7 +2946,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																									match(_t,VAR_ID);
 																									_t = _t->getNextSibling();
 																									if ( inputState->guessing==0 ) {
-#line 2603 "ncoGrammer.g"
+#line 2632 "ncoGrammer.g"
 																										
 																										//dbg_prn(fnc_nm,"getting regular var in out "+v->getText());
 																										
@@ -2985,7 +2985,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																									match(_t,ATT_ID);
 																									_t = _t->getNextSibling();
 																									if ( inputState->guessing==0 ) {
-#line 2635 "ncoGrammer.g"
+#line 2664 "ncoGrammer.g"
 																										
 																										
 																										var=att_plain(att);  
@@ -3042,7 +3042,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	bool bram,bool bret
 ) {
-#line 1390 "ncoGrammer.g"
+#line 1419 "ncoGrammer.g"
 	var_sct *var;
 #line 3048 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST assign_ntl_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -3054,7 +3054,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	ANTLR_USE_NAMESPACE(antlr)RefAST att = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 1390 "ncoGrammer.g"
+#line 1419 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign_ntl"); 
 	var=NULL_CEWI;
@@ -3099,7 +3099,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			_t = __t243;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1395 "ncoGrammer.g"
+#line 1424 "ncoGrammer.g"
 				
 				
 				std::string var_nm; 
@@ -3193,7 +3193,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				_t = __t248;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1427 "ncoGrammer.g"
+#line 1456 "ncoGrammer.g"
 					
 					
 					int idx;
@@ -3277,7 +3277,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				match(_t,VAR_ID);
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1503 "ncoGrammer.g"
+#line 1532 "ncoGrammer.g"
 					
 					
 					var_sct *var_rhs;
@@ -3350,7 +3350,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					_t = __t252;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 1535 "ncoGrammer.g"
+#line 1564 "ncoGrammer.g"
 						
 						
 						//In Initial scan all newly defined atts are flagged as Undefined
@@ -3412,7 +3412,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						_t = __t256;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1556 "ncoGrammer.g"
+#line 1585 "ncoGrammer.g"
 							
 							;
 							
@@ -3424,7 +3424,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						match(_t,ATT_ID);
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1559 "ncoGrammer.g"
+#line 1588 "ncoGrammer.g"
 							
 							
 							//In Initial scan all newly defined atts are flagged as Undefined
@@ -3469,7 +3469,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	bool bram,bool bret
 ) {
-#line 1582 "ncoGrammer.g"
+#line 1611 "ncoGrammer.g"
 	var_sct *var;
 #line 3475 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST assign_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -3482,7 +3482,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	ANTLR_USE_NAMESPACE(antlr)RefAST lmta = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 1582 "ncoGrammer.g"
+#line 1611 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign"); 
 	var=NULL_CEWI;
@@ -3527,7 +3527,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			_t = __t261;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1588 "ncoGrammer.g"
+#line 1617 "ncoGrammer.g"
 				
 				
 				int idx;
@@ -3786,7 +3786,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				_t = __t266;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1786 "ncoGrammer.g"
+#line 1815 "ncoGrammer.g"
 					
 					
 					var_sct *var1;
@@ -3892,7 +3892,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				match(_t,VAR_ID);
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1884 "ncoGrammer.g"
+#line 1913 "ncoGrammer.g"
 					
 					
 					// Set class wide variables
@@ -4005,7 +4005,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					_t = __t270;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 1956 "ncoGrammer.g"
+#line 1985 "ncoGrammer.g"
 						
 						
 						long srt,end,cnt,srd;  
@@ -4201,7 +4201,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						_t = __t274;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 2111 "ncoGrammer.g"
+#line 2140 "ncoGrammer.g"
 							
 							;
 							
@@ -4213,7 +4213,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						match(_t,ATT_ID);
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 2114 "ncoGrammer.g"
+#line 2143 "ncoGrammer.g"
 							
 							
 							var_sct *var1;
@@ -4275,14 +4275,14 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 }
 
 var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2768 "ncoGrammer.g"
+#line 2797 "ncoGrammer.g"
 	var_sct *var;
 #line 4281 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST out_asn_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2768 "ncoGrammer.g"
+#line 2797 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign_asn");
 	var=NULL_CEWI; 
@@ -4308,7 +4308,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t426;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2778 "ncoGrammer.g"
+#line 2807 "ncoGrammer.g"
 				
 				if(vid1->getFirstChild())
 				err_prn(fnc_nm,"Invalid Lvalue " +vid1->getText() );
@@ -4336,7 +4336,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,VAR_ID);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2796 "ncoGrammer.g"
+#line 2825 "ncoGrammer.g"
 				
 				var_nm_s=vid->getText();  
 				if(vid->getFirstChild())
@@ -4367,7 +4367,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,ATT_ID);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2817 "ncoGrammer.g"
+#line 2846 "ncoGrammer.g"
 				
 				// check "output"
 				NcapVar *Nvar=NULL;
@@ -4428,12 +4428,12 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2857 "ncoGrammer.g"
+#line 2886 "ncoGrammer.g"
 	var_sct *var;
 #line 4434 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST att_plain_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2857 "ncoGrammer.g"
+#line 2886 "ncoGrammer.g"
 	
 	const std::string fnc_nm("att_plain");
 	var=NULL_CEWI; 
@@ -4448,7 +4448,7 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		match(_t,ATT_ID);
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 2867 "ncoGrammer.g"
+#line 2896 "ncoGrammer.g"
 			
 			// check "output"
 			NcapVar *Nvar=NULL;
@@ -4496,12 +4496,12 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
  RefAST  ncoTree::att2var(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2904 "ncoGrammer.g"
+#line 2933 "ncoGrammer.g"
 	 RefAST tr ;
 #line 4502 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST att2var_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2904 "ncoGrammer.g"
+#line 2933 "ncoGrammer.g"
 	
 	var_sct *var=NULL_CEWI; 
 	NcapVar *Nvar;
@@ -4519,7 +4519,7 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		_t = _t->getNextSibling();
 		}
 		if ( inputState->guessing==0 ) {
-#line 2915 "ncoGrammer.g"
+#line 2944 "ncoGrammer.g"
 			
 			/* sn can be empty on 1st Parse but not 2nd */
 			att_nm=att->getText();
@@ -4565,12 +4565,12 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2947 "ncoGrammer.g"
+#line 2977 "ncoGrammer.g"
 	var_sct *var;
 #line 4571 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST value_list_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vlst = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2947 "ncoGrammer.g"
+#line 2977 "ncoGrammer.g"
 	
 	const std::string fnc_nm("value_list");
 	var=NULL_CEWI; 
@@ -4584,7 +4584,212 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		_t = _t->getNextSibling();
 		}
 		if ( inputState->guessing==0 ) {
-#line 2952 "ncoGrammer.g"
+#line 2982 "ncoGrammer.g"
+			
+			char *cp;  
+			int nbr_lst;
+			int idx;
+			int tsz;
+			
+			nc_type type=NC_NAT;
+			var_sct *var_ret;                        
+			var_sct *var_int; 
+			RefAST rRef;
+			
+			rRef=vlst->getFirstChild();
+			
+			nbr_lst=vlst->getNumberOfChildren(); 
+			
+			/* get type of first element */ 
+			var_int=out(rRef);       
+			
+			/* first element undefined */  
+			if(var_int->undefined)
+			{   
+			var_ret=ncap_var_udf("~zz at value_list");  
+			goto end_val; 
+			} 
+			
+			type=var_int->type;   
+			
+			if(type==NC_STRING) 
+			{ 
+			var_ret=value_list_string(vlst); 
+			goto end_val; 
+			}
+			
+			
+			var_ret=(var_sct *)nco_malloc(sizeof(var_sct));
+			/* Set defaults */
+			(void)var_dfl_set(var_ret); 
+			
+			/* Overwrite with attribute expression information */
+			var_ret->nm=strdup("~zz at value_list");
+			var_ret->nbr_dim=0;
+			var_ret->sz=nbr_lst;
+			var_ret->type=type;
+			
+			/* deal with initial scan */   
+			if(prs_arg->ntl_scn)
+			goto end_val;
+			
+			/* create some space for output */
+			tsz=nco_typ_lng(type);
+			var_ret->val.vp=(void*)nco_malloc(nbr_lst*tsz);
+			
+			/* copy first value over */
+			memcpy(var_ret->val.vp, var_int->val.vp, tsz);  
+			var_int=nco_var_free(var_int); 
+			rRef=rRef->getNextSibling();
+			
+			/* rest of values */
+			for(idx=1;idx<nbr_lst;idx++) 
+			{
+			var_int=out(rRef);   
+			nco_var_cnf_typ(type,var_int);  
+			cp=(char*)(var_ret->val.vp)+ (ptrdiff_t)(idx*tsz);
+			memcpy(cp,var_int->val.vp,tsz);
+			
+			var_int=nco_var_free(var_int); 
+			rRef=rRef->getNextSibling();
+			}
+			
+			end_val: if(var_int)
+			nco_var_free(var_int);  
+			var=var_ret;
+			
+			
+#line 4663 "ncoTree.cpp"
+		}
+	}
+	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
+		if( inputState->guessing == 0 ) {
+			reportError(ex);
+			if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
+				_t = _t->getNextSibling();
+		} else {
+			throw;
+		}
+	}
+	_retTree = _t;
+	return var;
+}
+
+var_sct * ncoTree::value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
+#line 3059 "ncoGrammer.g"
+	var_sct *var;
+#line 4682 "ncoTree.cpp"
+	ANTLR_USE_NAMESPACE(antlr)RefAST value_list_string_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
+	ANTLR_USE_NAMESPACE(antlr)RefAST vlst = ANTLR_USE_NAMESPACE(antlr)nullAST;
+#line 3059 "ncoGrammer.g"
+	
+	const std::string fnc_nm("value_list");
+	var=NULL_CEWI; 
+	
+#line 4690 "ncoTree.cpp"
+	
+	try {      // for error handling
+		{
+		vlst = _t;
+		match(_t,VALUE_LIST);
+		_t = _t->getNextSibling();
+		}
+		if ( inputState->guessing==0 ) {
+#line 3064 "ncoGrammer.g"
+			
+			
+			char *cp;
+			int nbr_lst;
+			int idx;
+			int tsz;
+			
+			nc_type type=NC_NAT;
+			var_sct *var_ret;                        
+			var_sct *var_int; 
+			RefAST rRef;
+			
+			rRef=vlst->getFirstChild();
+			
+			nbr_lst=vlst->getNumberOfChildren(); 
+			
+			type=NC_STRING;   
+			
+			var_ret=(var_sct *)nco_malloc(sizeof(var_sct));
+			/* Set defaults */
+			(void)var_dfl_set(var_ret); 
+			
+			/* Overwrite with attribute expression information */
+			var_ret->nm=strdup("~zz at value_list");
+			var_ret->nbr_dim=0;
+			var_ret->sz=nbr_lst;
+			var_ret->type=type;
+			
+			/* deal with initial scan */   
+			if(prs_arg->ntl_scn)
+			goto end_val;
+			
+			/* create some space for output */
+			tsz=nco_typ_lng(type);
+			var_ret->val.vp=(void*)nco_malloc(nbr_lst*tsz);
+			(void)cast_void_nctype((nc_type)NC_STRING,&var_ret->val);
+			
+			for(idx=0;idx<nbr_lst;idx++) 
+			{
+			var_int=out(rRef);   
+			if(var_int->type != NC_STRING)
+			err_prn(fnc_nm," error processing value list string: to successfully parse value list of strings all elements must be of type NC_STRING");    
+			
+			(void)cast_void_nctype((nc_type)NC_STRING,&var_int->val);
+			var_ret->val.sngp[idx]=strdup(var_int->val.sngp[0]); 
+			// cast pointer back
+			(void)cast_nctype_void((nc_type)NC_STRING,&var_int->val);
+			
+			nco_var_free(var_int);  
+			rRef=rRef->getNextSibling();
+			}
+			(void)cast_nctype_void((nc_type)NC_STRING,&var_ret->val);
+			
+			end_val: var=var_ret;
+			
+			
+			
+#line 4757 "ncoTree.cpp"
+		}
+	}
+	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
+		if( inputState->guessing == 0 ) {
+			reportError(ex);
+			if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
+				_t = _t->getNextSibling();
+		} else {
+			throw;
+		}
+	}
+	_retTree = _t;
+	return var;
+}
+
+var_sct * ncoTree::value_list_old(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
+#line 3125 "ncoGrammer.g"
+	var_sct *var;
+#line 4776 "ncoTree.cpp"
+	ANTLR_USE_NAMESPACE(antlr)RefAST value_list_old_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
+	ANTLR_USE_NAMESPACE(antlr)RefAST vlst = ANTLR_USE_NAMESPACE(antlr)nullAST;
+#line 3125 "ncoGrammer.g"
+	
+	const std::string fnc_nm("value_list");
+	var=NULL_CEWI; 
+	
+#line 4784 "ncoTree.cpp"
+	
+	try {      // for error handling
+		{
+		vlst = _t;
+		match(_t,VALUE_LIST);
+		_t = _t->getNextSibling();
+		}
+		if ( inputState->guessing==0 ) {
+#line 3130 "ncoGrammer.g"
 			
 			
 			char *cp;
@@ -4605,10 +4810,11 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			}       
 			nbr_lst=exp_vtr.size();
 			
+			
 			// if any types are NC_STRING then call value_list_string() action 
 			for(idx=0;idx <nbr_lst ;idx++)
 			if(exp_vtr[idx]->type == NC_STRING){
-			var_ret=value_list_string(rRef,exp_vtr);
+			var_ret=value_list_string_old(rRef,exp_vtr);
 			goto end_val;
 			}
 			
@@ -4672,7 +4878,7 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			var=var_ret;
 			
 			
-#line 4676 "ncoTree.cpp"
+#line 4882 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4688,23 +4894,23 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	return var;
 }
 
-var_sct * ncoTree::value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
+var_sct * ncoTree::value_list_string_old(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	 std::vector<var_sct*> &exp_vtr
 ) {
-#line 3043 "ncoGrammer.g"
+#line 3226 "ncoGrammer.g"
 	var_sct *var;
-#line 4697 "ncoTree.cpp"
-	ANTLR_USE_NAMESPACE(antlr)RefAST value_list_string_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
-#line 3043 "ncoGrammer.g"
+#line 4903 "ncoTree.cpp"
+	ANTLR_USE_NAMESPACE(antlr)RefAST value_list_string_old_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
+#line 3226 "ncoGrammer.g"
 	
 	const std::string fnc_nm("value_list_string");
 	var=NULL_CEWI; 
 	
-#line 4704 "ncoTree.cpp"
+#line 4910 "ncoTree.cpp"
 	
 	try {      // for error handling
 		if ( inputState->guessing==0 ) {
-#line 3049 "ncoGrammer.g"
+#line 3232 "ncoGrammer.g"
 			
 			int idx;
 			int nbr_lst;
@@ -4753,7 +4959,7 @@ var_sct * ncoTree::value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			end_val: var=var_ret;
 			
 			
-#line 4757 "ncoTree.cpp"
+#line 4963 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4772,25 +4978,25 @@ var_sct * ncoTree::value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	var_sct *var_msk
 ) {
-#line 3100 "ncoGrammer.g"
+#line 3283 "ncoGrammer.g"
 	bool bret=false;
-#line 4778 "ncoTree.cpp"
+#line 4984 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST where_assign_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 3100 "ncoGrammer.g"
+#line 3283 "ncoGrammer.g"
 	
 	const std::string fnc_nm("where_assign");
 	var_sct *var_rhs;
 	
 	
-#line 4787 "ncoTree.cpp"
+#line 4993 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t434 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t438 = _t;
 		ANTLR_USE_NAMESPACE(antlr)RefAST tmp266_AST_in = _t;
 		match(_t,EXPR);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t435 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t439 = _t;
 		ANTLR_USE_NAMESPACE(antlr)RefAST tmp267_AST_in = _t;
 		match(_t,ASSIGN);
 		_t = _t->getFirstChild();
@@ -4799,12 +5005,12 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 		_t = _t->getNextSibling();
 		var_rhs=out(_t);
 		_t = _retTree;
-		_t = __t435;
+		_t = __t439;
 		_t = _t->getNextSibling();
-		_t = __t434;
+		_t = __t438;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3106 "ncoGrammer.g"
+#line 3289 "ncoGrammer.g"
 			
 			
 			bool bfr=false;
@@ -4906,7 +5112,7 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			prs_arg->ncap_var_write(var_lhs,false);
 			bret=true;
 			
-#line 4910 "ncoTree.cpp"
+#line 5116 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4923,42 +5129,42 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 }
 
 var_sct * ncoTree::var_lmt_one(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 3211 "ncoGrammer.g"
+#line 3394 "ncoGrammer.g"
 	var_sct *var;
-#line 4929 "ncoTree.cpp"
+#line 5135 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST var_lmt_one_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 3211 "ncoGrammer.g"
+#line 3394 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt_one");
 	var=NULL_CEWI; 
 	var_sct *var_nbr;
 	
-#line 4938 "ncoTree.cpp"
+#line 5144 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t437 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t441 = _t;
 		vid = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 		match(_t,VAR_ID);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t438 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t442 = _t;
 		ANTLR_USE_NAMESPACE(antlr)RefAST tmp268_AST_in = _t;
 		match(_t,LMT_LIST);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t439 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t443 = _t;
 		ANTLR_USE_NAMESPACE(antlr)RefAST tmp269_AST_in = _t;
 		match(_t,LMT);
 		_t = _t->getFirstChild();
 		var_nbr=out(_t);
 		_t = _retTree;
-		_t = __t439;
+		_t = __t443;
 		_t = _t->getNextSibling();
-		_t = __t438;
+		_t = __t442;
 		_t = _t->getNextSibling();
-		_t = __t437;
+		_t = __t441;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3217 "ncoGrammer.g"
+#line 3400 "ncoGrammer.g"
 			
 			
 			int idx;
@@ -5059,7 +5265,7 @@ var_sct * ncoTree::var_lmt_one(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			end0:       var_nbr=nco_var_free(var_nbr);
 			var_rhs=nco_var_free(var_rhs);   
 			
-#line 5063 "ncoTree.cpp"
+#line 5269 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -5078,42 +5284,42 @@ var_sct * ncoTree::var_lmt_one(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 var_sct * ncoTree::var_lmt_one_lhs(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	bool bram
 ) {
-#line 3322 "ncoGrammer.g"
+#line 3505 "ncoGrammer.g"
 	var_sct *var;
-#line 5084 "ncoTree.cpp"
+#line 5290 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST var_lmt_one_lhs_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 3322 "ncoGrammer.g"
+#line 3505 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt_one_lhs");
 	var=NULL_CEWI; 
 	var_sct *var_nbr;
 	
-#line 5093 "ncoTree.cpp"
+#line 5299 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t441 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t445 = _t;
 		vid = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 		match(_t,VAR_ID);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t442 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t446 = _t;
 		ANTLR_USE_NAMESPACE(antlr)RefAST tmp270_AST_in = _t;
 		match(_t,LMT_LIST);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t443 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t447 = _t;
 		ANTLR_USE_NAMESPACE(antlr)RefAST tmp271_AST_in = _t;
 		match(_t,LMT);
 		_t = _t->getFirstChild();
 		var_nbr=out(_t);
 		_t = _retTree;
-		_t = __t443;
+		_t = __t447;
 		_t = _t->getNextSibling();
-		_t = __t442;
+		_t = __t446;
 		_t = _t->getNextSibling();
-		_t = __t441;
+		_t = __t445;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3328 "ncoGrammer.g"
+#line 3511 "ncoGrammer.g"
 			
 			int idx; 
 			int var_id; 
@@ -5258,7 +5464,7 @@ var_sct * ncoTree::var_lmt_one_lhs(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			var_rhs=nco_var_free(var_rhs); 
 			var_nbr=nco_var_free(var_nbr); 
 			
-#line 5262 "ncoTree.cpp"
+#line 5468 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -5275,31 +5481,31 @@ var_sct * ncoTree::var_lmt_one_lhs(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 }
 
 var_sct * ncoTree::var_lmt(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 3476 "ncoGrammer.g"
+#line 3659 "ncoGrammer.g"
 	var_sct *var;
-#line 5281 "ncoTree.cpp"
+#line 5487 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST var_lmt_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST lmt = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 3476 "ncoGrammer.g"
+#line 3659 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt");
 	var=NULL_CEWI; 
 	
-#line 5290 "ncoTree.cpp"
+#line 5496 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t445 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t449 = _t;
 		vid = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 		match(_t,VAR_ID);
 		_t = _t->getFirstChild();
 		lmt = _t;
 		match(_t,LMT_LIST);
 		_t = _t->getNextSibling();
-		_t = __t445;
+		_t = __t449;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3481 "ncoGrammer.g"
+#line 3664 "ncoGrammer.g"
 			
 			bool bram;   // Check for a RAM variable
 			bool bnrm;
@@ -5540,7 +5746,7 @@ var_sct * ncoTree::var_lmt(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			
 			end2: var_rhs=nco_var_free(var_rhs); 
 			
-#line 5544 "ncoTree.cpp"
+#line 5750 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
diff --git a/src/nco++/ncoTree.hpp b/src/nco++/ncoTree.hpp
index 15b3237..4ee9c91 100644
--- a/src/nco++/ncoTree.hpp
+++ b/src/nco++/ncoTree.hpp
@@ -3,7 +3,7 @@
 
 #include <antlr/config.hpp>
 #include "ncoParserTokenTypes.hpp"
-/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoTree.hpp"$ */
+/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoTree.hpp"$ */
 #include <antlr/TreeParser.hpp>
 
 #line 1 "ncoGrammer.g"
@@ -51,7 +51,7 @@
 #line 52 "ncoTree.hpp"
 class CUSTOM_API ncoTree : public ANTLR_USE_NAMESPACE(antlr)TreeParser, public ncoParserTokenTypes
 {
-#line 662 "ncoGrammer.g"
+#line 691 "ncoGrammer.g"
 
 
 private:
@@ -545,7 +545,9 @@ public:
 	public: var_sct * att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t);
 	public:  RefAST  att2var(ANTLR_USE_NAMESPACE(antlr)RefAST _t);
 	public: var_sct * value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t);
-	public: var_sct * value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
+	public: var_sct * value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t);
+	public: var_sct * value_list_old(ANTLR_USE_NAMESPACE(antlr)RefAST _t);
+	public: var_sct * value_list_string_old(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 		 std::vector<var_sct*> &exp_vtr
 	);
 	public: bool  where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
diff --git a/src/nco/Makefile.am b/src/nco/Makefile.am
index 61f1f08..83a604a 100644
--- a/src/nco/Makefile.am
+++ b/src/nco/Makefile.am
@@ -105,6 +105,7 @@ nco_mmr.h \
 nco_mpi.h \
 nco_msa.h \
 nco_mss_val.h \
+nco_mta.h \
 nco_netcdf.h \
 nco_omp.h \
 nco_pck.h \
@@ -165,6 +166,7 @@ nco_md5.c \
 nco_mmr.c \
 nco_msa.c \
 nco_mss_val.c \
+nco_mta.c \
 nco_netcdf.c \
 nco_omp.c \
 nco_pck.c \
diff --git a/src/nco/Makefile.in b/src/nco/Makefile.in
index 76f30f4..a4ce744 100644
--- a/src/nco/Makefile.in
+++ b/src/nco/Makefile.in
@@ -154,21 +154,21 @@ am__libnco_la_SOURCES_DIST = libnco.h nco_getopt.h ncap.h ncap_yacc.h \
 	nco_cnf_dmn.h nco_cnf_typ.h nco_cnk.h nco_cnv_arm.h \
 	nco_cnv_csm.h nco_ctl.h nco_dbg.h nco_dmn_utl.h nco_fl_utl.h \
 	nco_grp_utl.h nco_grp_trv.h nco_lmt.h nco_lst_utl.h nco_md5.h \
-	nco_mmr.h nco_mpi.h nco_msa.h nco_mss_val.h nco_netcdf.h \
-	nco_omp.h nco_pck.h nco_ppc.h nco_prn.h nco_rec_var.h \
-	nco_rgr.h nco_rth_flt.h nco_rth_utl.h nco_scl_utl.h nco_scm.h \
-	nco_sld.h nco_sng_utl.h nco_srm.h nco_typ.h nco_uthash.h \
-	nco_var_avg.h nco_var_lst.h nco_var_rth.h nco_var_scv.h \
-	nco_var_utl.h nco_getopt.c nco_att_utl.c nco_aux.c nco_bnr.c \
-	nco_cln_utl.c nco_cnf_dmn.c nco_cnf_typ.c nco_cnk.c \
-	nco_cnv_arm.c nco_cnv_csm.c nco_ctl.c nco_dbg.c nco_dmn_utl.c \
-	nco_fl_utl.c nco_grp_utl.c nco_grp_trv.c nco_lmt.c \
-	nco_lst_utl.c nco_md5.c nco_mmr.c nco_msa.c nco_mss_val.c \
-	nco_netcdf.c nco_omp.c nco_pck.c nco_ppc.c nco_prn.c \
-	nco_rec_var.c nco_rgr.c nco_rth_flt.c nco_rth_utl.c \
-	nco_scl_utl.c nco_scm.c nco_sld.c nco_sng_utl.c nco_srm.c \
-	nco_var_avg.c nco_var_lst.c nco_var_rth.c nco_var_scv.c \
-	nco_var_utl.c
+	nco_mmr.h nco_mpi.h nco_msa.h nco_mss_val.h nco_mta.h \
+	nco_netcdf.h nco_omp.h nco_pck.h nco_ppc.h nco_prn.h \
+	nco_rec_var.h nco_rgr.h nco_rth_flt.h nco_rth_utl.h \
+	nco_scl_utl.h nco_scm.h nco_sld.h nco_sng_utl.h nco_srm.h \
+	nco_typ.h nco_uthash.h nco_var_avg.h nco_var_lst.h \
+	nco_var_rth.h nco_var_scv.h nco_var_utl.h nco_getopt.c \
+	nco_att_utl.c nco_aux.c nco_bnr.c nco_cln_utl.c nco_cnf_dmn.c \
+	nco_cnf_typ.c nco_cnk.c nco_cnv_arm.c nco_cnv_csm.c nco_ctl.c \
+	nco_dbg.c nco_dmn_utl.c nco_fl_utl.c nco_grp_utl.c \
+	nco_grp_trv.c nco_lmt.c nco_lst_utl.c nco_md5.c nco_mmr.c \
+	nco_msa.c nco_mss_val.c nco_mta.c nco_netcdf.c nco_omp.c \
+	nco_pck.c nco_ppc.c nco_prn.c nco_rec_var.c nco_rgr.c \
+	nco_rth_flt.c nco_rth_utl.c nco_scl_utl.c nco_scm.c nco_sld.c \
+	nco_sng_utl.c nco_srm.c nco_var_avg.c nco_var_lst.c \
+	nco_var_rth.c nco_var_scv.c nco_var_utl.c
 am__objects_1 =
 am__objects_2 = $(am__objects_1)
 @NCO_NEED_GETOPT_LONG_TRUE at am__objects_3 = nco_getopt.lo
@@ -178,11 +178,11 @@ am_libnco_la_OBJECTS = $(am__objects_2) $(am__objects_3) \
 	nco_cnv_csm.lo nco_ctl.lo nco_dbg.lo nco_dmn_utl.lo \
 	nco_fl_utl.lo nco_grp_utl.lo nco_grp_trv.lo nco_lmt.lo \
 	nco_lst_utl.lo nco_md5.lo nco_mmr.lo nco_msa.lo nco_mss_val.lo \
-	nco_netcdf.lo nco_omp.lo nco_pck.lo nco_ppc.lo nco_prn.lo \
-	nco_rec_var.lo nco_rgr.lo nco_rth_flt.lo nco_rth_utl.lo \
-	nco_scl_utl.lo nco_scm.lo nco_sld.lo nco_sng_utl.lo nco_srm.lo \
-	nco_var_avg.lo nco_var_lst.lo nco_var_rth.lo nco_var_scv.lo \
-	nco_var_utl.lo
+	nco_mta.lo nco_netcdf.lo nco_omp.lo nco_pck.lo nco_ppc.lo \
+	nco_prn.lo nco_rec_var.lo nco_rgr.lo nco_rth_flt.lo \
+	nco_rth_utl.lo nco_scl_utl.lo nco_scm.lo nco_sld.lo \
+	nco_sng_utl.lo nco_srm.lo nco_var_avg.lo nco_var_lst.lo \
+	nco_var_rth.lo nco_var_scv.lo nco_var_utl.lo
 libnco_la_OBJECTS = $(am_libnco_la_OBJECTS)
 AM_V_lt = $(am__v_lt_ at AM_V@)
 am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
@@ -732,6 +732,7 @@ nco_mmr.h \
 nco_mpi.h \
 nco_msa.h \
 nco_mss_val.h \
+nco_mta.h \
 nco_netcdf.h \
 nco_omp.h \
 nco_pck.h \
@@ -791,6 +792,7 @@ nco_md5.c \
 nco_mmr.c \
 nco_msa.c \
 nco_mss_val.c \
+nco_mta.c \
 nco_netcdf.c \
 nco_omp.c \
 nco_pck.c \
@@ -1045,6 +1047,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nco_mmr.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nco_msa.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nco_mss_val.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nco_mta.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nco_netcdf.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nco_omp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nco_pck.Plo at am__quote@
diff --git a/src/nco/libnco.h b/src/nco/libnco.h
index 5e39353..567c745 100644
--- a/src/nco/libnco.h
+++ b/src/nco/libnco.h
@@ -41,6 +41,7 @@
 #include "nco_mmr.h" /* Memory management */
 #include "nco_msa.h" /* Multi-slabbing algorithm */
 #include "nco_mss_val.h" /* Missing value utilities */
+#include "nco_mta.h" /* Multi-argument parsing */
 #include "nco_omp.h" /* OpenMP utilities */
 #include "nco_pck.h" /* Packing and unpacking variables */
 #include "nco_ppc.h" /* Precision-Preserving Compression */
diff --git a/src/nco/ncks.c b/src/nco/ncks.c
index 721102c..2797530 100644
--- a/src/nco/ncks.c
+++ b/src/nco/ncks.c
@@ -177,6 +177,7 @@ main(int argc,char **argv)
 
   int *in_id_arr; /* [id] netCDF file IDs used by OpenMP code */
 
+  int JSN_ATT_FMT=0; /* [enm] JSON format for netCDF attributes: 0 (no object, only data), 1 (data only for string, char, int, and floating-point types, otherwise object), 2 (always object) */
   int abb_arg_nbr=0;
   int att_glb_nbr;
   int att_grp_nbr;
@@ -216,7 +217,7 @@ main(int argc,char **argv)
   kvm_sct *sld_nfo=NULL; /* [sct] Container for SLD/SCRIP information */
 
   md5_sct *md5=NULL; /* [sct] MD5 configuration */
-
+ 
   nco_bool ALPHABETIZE_OUTPUT=True; /* Option a */
   nco_bool CPY_GRP_METADATA; /* [flg] Copy group metadata (attributes) */
   nco_bool EXCLUDE_INPUT_LIST=False; /* Option x */
@@ -371,8 +372,11 @@ main(int argc,char **argv)
     {"glb_att_add",required_argument,0,0}, /* [sng] Global attribute add */
     {"hdr_pad",required_argument,0,0},
     {"header_pad",required_argument,0,0},
+    {"jsn_att_fmt",required_argument,0,0}, /* [enm] JSON attribute format */
     {"mk_rec_dmn",required_argument,0,0}, /* [sng] Name of record dimension in output */
     {"mk_rec_dim",required_argument,0,0}, /* [sng] Name of record dimension in output */
+    {"mta_dlm",required_argument,0,0}, /* [sng] Multi-argument delimiter */
+    {"dlm_mta",required_argument,0,0}, /* [sng] Multi-argument delimiter */
     {"ppc",required_argument,0,0}, /* [nbr] Precision-preserving compression, i.e., number of total or decimal significant digits */
     {"precision_preserving_compression",required_argument,0,0}, /* [nbr] Precision-preserving compression, i.e., number of total or decimal significant digits */
     {"quantize",required_argument,0,0}, /* [nbr] Precision-preserving compression, i.e., number of total or decimal significant digits */
@@ -615,6 +619,7 @@ main(int argc,char **argv)
         if(nco_dbg_lvl >= nco_dbg_std) (void)fprintf(stderr,"%s: INFO Will write MD5 digests as attributes\n",nco_prg_nm_get());
       } /* endif "md5_wrt_att" */
       if(!strcmp(opt_crr,"msa_usr_rdr") || !strcmp(opt_crr,"msa_user_order")) MSA_USR_RDR=True; /* [flg] Multi-Slab Algorithm returns hyperslabs in user-specified order */
+      if(!strcmp(opt_crr,"mta_dlm") || !strcmp(opt_crr,"dlm_mta")) nco_mta_dlm_set(optarg);
       if(!strcmp(opt_crr,"no_blank") || !strcmp(opt_crr,"no-blank") || !strcmp(opt_crr,"noblank")) PRN_MSS_VAL_BLANK=!PRN_MSS_VAL_BLANK;
       if(!strcmp(opt_crr,"no_clb") || !strcmp(opt_crr,"no-clobber") || !strcmp(opt_crr,"no_clobber") || !strcmp(opt_crr,"noclobber")) FORCE_NOCLOBBER=!FORCE_NOCLOBBER;
       if(!strcmp(opt_crr,"no_nm_prn") || !strcmp(opt_crr,"no_dmn_var_nm")) PRN_DMN_VAR_NM=False; /* endif "no_nm_prn" */
@@ -691,6 +696,11 @@ main(int argc,char **argv)
         (void)nco_vrs_prn(CVS_Id,CVS_Revision);
         nco_exit(EXIT_SUCCESS);
       } /* endif "vrs" */
+      if(!strcmp(opt_crr,"jsn_att_fmt")){
+	PRN_JSN=True; /* [flg] Print JSON */
+	JSN_ATT_FMT=(int)strtoul(optarg,&sng_cnv_rcd,NCO_SNG_CNV_BASE10);
+	if(*sng_cnv_rcd) nco_sng_cnv_err(optarg,"strtoul",sng_cnv_rcd);
+      } /* !jsn_att_fmt */
       if(!strcmp(opt_crr,"wrt_tmp_fl") || !strcmp(opt_crr,"write_tmp_fl")) WRT_TMP_FL=True;
       if(!strcmp(opt_crr,"no_tmp_fl")) WRT_TMP_FL=False;
       if(!strcmp(opt_crr,"jsn") || !strcmp(opt_crr,"json") || !strcmp(opt_crr,"w10") || !strcmp(opt_crr,"w10n")) PRN_JSN=True; /* [flg] Print JSON */
@@ -1151,12 +1161,12 @@ main(int argc,char **argv)
     prn_flg.xml_lcn=PRN_XML_LOCATION;
     prn_flg.gpe=gpe;
     prn_flg.md5=md5;
-    prn_flg.nbr_zro=0;
     prn_flg.ndn=0; /* Initialize for prn_flg->trd */
     prn_flg.spc_per_lvl=2;
     prn_flg.sxn_fst=2;
     prn_flg.var_fst=2;
     prn_flg.tab=4;
+    prn_flg.nbr_zro=0;  
     if(nco_dbg_lvl >= nco_dbg_scl) prn_flg.fll_pth=True; else prn_flg.fll_pth=False;
     if(prn_flg.xml) prn_flg.nwl_pst_val=False; else prn_flg.nwl_pst_val=True;
     prn_flg.dlm_sng=dlm_sng;
@@ -1170,20 +1180,22 @@ main(int argc,char **argv)
     prn_flg.PRN_MSS_VAL_BLANK=PRN_MSS_VAL_BLANK;
     prn_flg.PRN_VAR_DATA=PRN_VAR_DATA;
     prn_flg.PRN_VAR_METADATA=PRN_VAR_METADATA;
+
     /* Derived formats */
     if(prn_flg.cdl){
       prn_flg.PRN_DMN_UNITS=False;
       prn_flg.PRN_DMN_VAR_NM=True;
       prn_flg.PRN_MSS_VAL_BLANK=True;
     } /* endif */
+
     if(prn_flg.jsn){
-      /* JSON either prints metadata or data, not both */
-      if(prn_flg.PRN_VAR_DATA){
-	prn_flg.PRN_VAR_METADATA=False;
-	prn_flg.PRN_GLB_METADATA=False;
-      } /* !PRN_VAR_DATA */
-      if(prn_flg.PRN_GLB_METADATA) prn_flg.PRN_VAR_METADATA=False;
+      /* In JSON, notation 0. or 20. is invalid---correct is 0.0, 20.0 */
+      prn_flg.nbr_zro=1;
+      /* JSON numerical arrays have no notion of missing values */
+      prn_flg.PRN_MSS_VAL_BLANK=False;
+      prn_flg.jsn_att_fmt=JSN_ATT_FMT;  
     } /* endif JSON */
+
     if(prn_flg.xml) prn_flg.PRN_MSS_VAL_BLANK=False;
 
     /* File summary */
@@ -1192,7 +1204,7 @@ main(int argc,char **argv)
       smr_xtn_sng=(char *)nco_malloc(300L*sizeof(char)); /* [sng] File extended summary string */
       if(nco_dbg_lvl > nco_dbg_std) (void)sprintf(smr_xtn_sng," (representation of extended/underlying filetype %s)",nco_fmt_xtn_sng(nco_fmt_xtn_get())); else smr_xtn_sng[0]='\0';
       (void)sprintf(smr_sng,"Summary of %s: filetype = %s%s, %i groups (max. depth = %i), %i dimensions (%i fixed, %i record), %i variables (%i atomic-type, %i non-atomic), %i attributes (%i global, %i group, %i variable)",fl_in,nco_fmt_sng(fl_in_fmt),smr_xtn_sng,grp_nbr_fl,grp_dpt_fl,trv_tbl->nbr_dmn,trv_tbl->nbr_dmn-dmn_rec_fl,dmn_rec_fl,var_nbr_fl+var_ntm_fl,var_nbr_fl,var_ntm_fl,att_glb_nbr+att_grp_nbr+att_var_nbr,att_glb_nbr,att_grp_nbr,att_var_nbr);
-      if(!prn_flg.cdl && !prn_flg.xml && !prn_flg.srm) (void)fprintf(stdout,"%s\n\n",smr_sng);
+      // if(!prn_flg.cdl && !prn_flg.xml && !prn_flg.srm) (void)fprintf(stdout,"%s\n\n",smr_sng);
     } /* endif summary */
 
     if(!prn_flg.new_fmt){
@@ -1229,8 +1241,14 @@ main(int argc,char **argv)
       } /* !PRN_SRM */
 
       if(ALPHA_BY_FULL_GROUP || ALPHA_BY_STUB_GROUP){
-	/* Ineptly named nco_grp_prn() emits full CDL and XML formats, and partial JSN */
-        rcd+=nco_grp_prn(in_id,trv_pth,&prn_flg,trv_tbl);
+	/* Ineptly named nco_grp_prn() emits full CDL and XML formats, and partial JSN 
+	   rcd+=nco_grp_prn(in_id,trv_pth,&prn_flg,trv_tbl); */
+
+        if(prn_flg.jsn) rcd+=nco_grp_prn_jsn(in_id,trv_pth,&prn_flg,trv_tbl);
+        else if(prn_flg.xml) rcd+=nco_grp_prn_xml(in_id,trv_pth,&prn_flg,trv_tbl);
+        else rcd+=nco_grp_prn(in_id,trv_pth,&prn_flg,trv_tbl);
+        /* else if(prn_flg.cdl || prn_flg.trd) rcd+=nco_grp_prn_cdl_trd(in_id,trv_pth,&prn_flg,trv_tbl); */   
+ 
       }else{
 	/* Place-holder for other options for organization/alphabetization */
 	if(PRN_VAR_METADATA) (void)nco_prn_xtr_mtd(in_id,&prn_flg,trv_tbl);
diff --git a/src/nco/nco.h b/src/nco/nco.h
index 8bd5551..52f4bd9 100644
--- a/src/nco/nco.h
+++ b/src/nco/nco.h
@@ -91,7 +91,7 @@ extern "C" {
    and only defines them when __DARWIN_C_LEVEL >= 199506L
    NCO uses these math constants in nco_aux.c (M_PI), nco_ppc.c (M_LN2,M_LN10), and nco_rgr.c (M_PI)
    Rather than have backup-definitions in the three corresponding .h files, 
-   we #ifndef all necessary math constants once in the common header nco.h */
+   we #ifndef all necessary math constants once in common header nco.h */
 #ifndef M_LN10
 # define M_LN10      2.30258509299404568401799145468436421   /* loge(10)       */
 #endif /* M_LN10 */
@@ -99,8 +99,11 @@ extern "C" {
 # define M_LN2       0.693147180559945309417232121458176568  /* loge(2)        */
 #endif /* M_LN2 */
 #ifndef M_PI
-#define M_PI        3.14159265358979323846264338327950288   /* pi             */
+# define M_PI        3.14159265358979323846264338327950288   /* pi             */
 #endif /* M_PI */
+#ifndef M_PI_2
+# define M_PI_2      1.57079632679489661923132169163975144   /* pi/2           */
+#endif /* M_PI_2 */
 
   /* Variables marked CEWI "Compiler Error Warning Initialization" are initialized
      to prevent spurious "warning: `float foo' might be used uninitialized in 
@@ -215,6 +218,7 @@ extern "C" {
 
   /* Prototype global functions before defining them in next block */
   char *nco_mss_val_sng_get(void); /* [sng] Missing value attribute name */
+  char *nco_mta_dlm_get(void); /* [sng] Multi-argument delimiter */
   char *nco_not_mss_val_sng_get(void); /* [sng] Not missing value attribute name */
   char *nco_prg_nm_get(void);
   int nco_prg_id_get(void);
@@ -225,6 +229,7 @@ extern "C" {
   unsigned short nco_rth_cnv_get(void);
   unsigned short nco_upk_cnv_get(void);
   void nco_fmt_xtn_set(unsigned short nco_fmt_xtn_arg);
+  void nco_mta_dlm_set(char *nco_mta_dlm_arg);
 
 #ifdef MAIN_PROGRAM_FILE /* Current file contains main() */
   
@@ -236,6 +241,11 @@ extern "C" {
   char *nco_prg_nm; /* [sng] Program name */
   char *nco_prg_nm_get(void){return nco_prg_nm;} /* [sng] Program name */
   
+  char *nco_mta_dlm=NULL; /* [sng] Multi-argument delimiter */
+  char *nco_mta_dlm_get(void){if(!nco_mta_dlm){nco_mta_dlm=(char *)strdup("#");}
+    return nco_mta_dlm;} /* [sng] Multi-argument delimiter */
+  void nco_mta_dlm_set(char *nco_mta_dlm_arg){nco_mta_dlm=nco_mta_dlm_arg;} /* [sng] Multi-argument delimiter */
+  
   unsigned short nco_baa_cnv=0; /* [enm] Bit-Adjustment Algorithm */
   unsigned short nco_baa_cnv_get(void){return nco_baa_cnv;} /* [enm] Bit-Adjustment Algorithm */
 
@@ -319,7 +329,7 @@ extern "C" {
 # define NCO_VERSION_MINOR 6
 #endif /* !NCO_VERSION_MINOR */
 #ifndef NCO_VERSION_PATCH
-# define NCO_VERSION_PATCH 1
+# define NCO_VERSION_PATCH 2
 #endif /* !NCO_VERSION_PATCH */
 #ifndef NCO_VERSION_NOTE
 # define NCO_VERSION_NOTE "" /* Blank for final versions, non-blank (e.g., "beta37") for pre-release versions */
@@ -329,7 +339,7 @@ extern "C" {
 # define NCO_LIB_VERSION ( NCO_VERSION_MAJOR * 100 + NCO_VERSION_MINOR * 10 + NCO_VERSION_PATCH )
 #endif /* !NCO_LIB_VERSION */
 #ifndef NCO_VERSION
-# define NCO_VERSION "4.6.1"
+# define NCO_VERSION "4.6.2"
 #endif /* !NCO_VERSION */
 
 /* Compatibility tokens new to netCDF4 netcdf.h: */
@@ -917,6 +927,7 @@ extern "C" {
 
   /* Print flags structure */
   typedef struct{ /* prn_fmt_sct */
+    char *dlm_sng; /* [sng] User specified delimiter string for printed output */
     char *fl_in; /* [sng] Input filename */
     char *fl_stb; /* [sng] Input filename stub */
     char *smr_sng; /* [sng] Summary string */
@@ -935,14 +946,14 @@ extern "C" {
     nco_bool nfo_xtr; /* [flg] Print extra information in CDL/XML mode */
     nco_bool new_fmt; /* [flg] Print in new format */
     nco_bool nwl_pst_val; /* [flg] Print newline after variable values */
+    int fll_pth; /* [nbr] Print full paths */
+    int jsn_att_fmt; /* [enm] JSON format for netCDF attributes: 0 (no object, only data), 1 (data only for string, char, int, and floating-point types, otherwise object), 2 (always object) */ 
     int nbr_zro; /* [nbr] Trailing zeros allowed after decimal point */
     int ndn; /* [nbr] Indentation */
-    int fll_pth; /* [nbr] Print full paths */
-    int tab; /* [nbr] Number of spaces in tab */
     int spc_per_lvl; /* [nbr] Indentation spaces per group level */
     int sxn_fst; /* [nbr] Offset of section from group name */
+    int tab; /* [nbr] Number of spaces in tab */
     int var_fst; /* [nbr] Offset of variable from section name */
-    char *dlm_sng; /* User specified delimiter string for printed output */
     nco_bool ALPHA_BY_FULL_GROUP; /* [flg] Print alphabetically by full group */
     nco_bool ALPHA_BY_FULL_OBJECT; /* [flg] Print alphabetically by full object */
     nco_bool ALPHA_BY_STUB_GROUP; /* [flg] Print alphabetically by stub group */
diff --git a/src/nco/nco_att_utl.c b/src/nco/nco_att_utl.c
index 78b1122..8d414b6 100644
--- a/src/nco/nco_att_utl.c
+++ b/src/nco/nco_att_utl.c
@@ -1238,7 +1238,7 @@ nco_prs_aed_lst /* [fnc] Parse user-specified attribute edits into structure lis
     case 'o': aed_lst[idx].mode=aed_overwrite; break;
     default: 
       (void)fprintf(stderr,"%s: ERROR `%s' is not a supported mode\n",nco_prg_nm_get(),arg_lst[2]);
-      (void)fprintf(stderr,"%s: HINT: Valid modes are `a' = append, `c' = create,`d' = delete, `m' = modify, and `o' = overwrite",nco_prg_nm_get());
+      (void)fprintf(stderr,"%s: HINT: Valid modes are `a' = append, `c' = create,`d' = delete, `m' = modify, `n' = nappend, and `o' = overwrite",nco_prg_nm_get());
       nco_exit(EXIT_FAILURE);
       break;
     } /* end switch */
@@ -1333,6 +1333,24 @@ nco_prs_aed_lst /* [fnc] Parse user-specified attribute edits into structure lis
         case NC_DOUBLE: 
           val_arg_dbl=(double *)nco_malloc(aed_lst[idx].sz*sizeof(double));
           for(lmn=0L;lmn<aed_lst[idx].sz;lmn++){
+#ifdef WIN32
+	    /* 20161104: strtod() on MinGW fails to parse "nan" so implement a "NaN-trap". Test with:
+	       ncatted -O -a _FillValue,fll_val,m,f,nan ~/nco/data/in.nc ~/foo.nc
+	       ncks -C -v fll_val ~/foo.nc */
+	    size_t chr_nbr=3;
+	    char nan_trap[]="NaN-trap"; /* [sng] Test for NaN-like number */
+	    /* Copy first three characters */
+	    strncpy(nan_trap,arg_lst[idx_att_val_arg],chr_nbr);
+	    nan_trap[chr_nbr]='\0'; /* NUL-terminate */
+	    if(!strncasecmp(nan_trap,"NaN",chr_nbr)){
+	    /* http://stackoverflow.com/questions/16691207/c-c-nan-constant-literal: NAN literal is in C <math.h>, while C++ requires <limits> header 
+	       #ifdef __cplusplus
+	       val_arg_dbl[lmn]=std::numeric_limits<double>::quiet_NaN();
+	       #endif __cplusplus */
+	    val_arg_dbl[lmn]=NAN;
+	    continue;
+	  } /* !NaN */
+#endif /* !WIN32 */
             val_arg_dbl[lmn]=strtod(arg_lst[idx_att_val_arg+lmn],&sng_cnv_rcd);
             if(*sng_cnv_rcd) nco_sng_cnv_err(arg_lst[idx_att_val_arg+lmn],"strtod",sng_cnv_rcd);
           } /* end loop over elements */
@@ -1933,41 +1951,22 @@ nco_glb_att_add /* [fnc] Add global attributes */
 {
   /* Purpose: Decode arguments into attributes and add as global metadata to output file */
   aed_sct gaa_aed;
-  int gaa_idx;
-  int gaa_arg_idx;
+  int gaa_idx=0;
   int gaa_nbr=0;
   kvm_sct *gaa_lst=NULL; /* [sct] List of all GAA specifications */
-  kvm_sct kvm;
   ptr_unn att_val;
+  /* Join arguments together */
+  char *sng_fnl=nco_join_sng(gaa_arg,gaa_arg_nbr);
+  gaa_lst=nco_arg_mlt_prs(sng_fnl);
 
-  gaa_lst=(kvm_sct *)nco_malloc(NC_MAX_VARS*sizeof(kvm_sct));
+  if(sng_fnl) sng_fnl=(char *)nco_free(sng_fnl);
 
-  /* Parse GAAs */
-  for(gaa_arg_idx=0;gaa_arg_idx<gaa_arg_nbr;gaa_arg_idx++){
-    if(!strstr(gaa_arg[gaa_arg_idx],"=")){
-      (void)fprintf(stdout,"%s: Invalid --gaa specification: %s. Must contain \"=\" sign, e.g., \"key=value\".\n",nco_prg_nm_get(),gaa_arg[gaa_arg_idx]);
-      if(gaa_lst) gaa_lst=(kvm_sct *)nco_free(gaa_lst);
-      nco_exit(EXIT_FAILURE);
-    } /* endif */
-    kvm=nco_sng2kvm(gaa_arg[gaa_arg_idx]);
-    /* nco_sng2kvm() converts argument "--gaa one,two=3" into kvm.key="one,two" and kvm.val=3
-       Then nco_lst_prs_2D() converts kvm.key into two items, "one" and "two", with the same value, 3 */
-    if(kvm.key){
-      int att_idx; /* [idx] Index over attribute names in current GAA argument */
-      int att_nbr; /* [nbr] Number of attribute names in current GAA argument */
-      char **att_lst;
-      att_lst=nco_lst_prs_2D(kvm.key,",",&att_nbr);
-      for(att_idx=0;att_idx<att_nbr;att_idx++){ /* Expand multi-attribute-name specification */
-        gaa_lst[gaa_nbr].key=strdup(att_lst[att_idx]);
-	/* 20160714: Allow for empty arguments by only using strdup() on non-NULL pointers */
-	gaa_lst[gaa_nbr].val= kvm.val ? strdup(kvm.val) : NULL;
-        gaa_nbr++;
-      } /* end for */
-      att_lst=nco_sng_lst_free(att_lst,att_nbr);
-    } /* end if */
-  } /* end for */
+  /* jm fxm use more descriptive name than i---what does i count? */
+  for(int index=0;gaa_lst[index].key;index++){
+      gaa_nbr=index;
+  } /* end loop over i */
 
-  for(gaa_idx=0;gaa_idx<gaa_nbr;gaa_idx++){
+  for(gaa_idx=0;gaa_idx<=gaa_nbr;gaa_idx++){
     /* Insert attribute value */
     att_val.cp=gaa_lst[gaa_idx].val;
     /* Initialize attribute edit structure */
diff --git a/src/nco/nco_att_utl.h b/src/nco/nco_att_utl.h
index 9cdb71e..f524ded 100644
--- a/src/nco/nco_att_utl.h
+++ b/src/nco/nco_att_utl.h
@@ -36,6 +36,7 @@
 #include "nco_ctl.h" /* Program flow control functions */
 #include "nco_lst_utl.h" /* List utilities */
 #include "nco_mmr.h" /* Memory management */
+#include "nco_mta.h" /* Multi-argument parsing */
 #include "nco_mss_val.h" /* Missing value utilities */
 #ifdef _MSC_VER
 # include "nco_rth_flt.h" /* Float-precision arithmetic, MSVC macros */
diff --git a/src/nco/nco_aux.c b/src/nco/nco_aux.c
index 74a31eb..fa4fbcf 100644
--- a/src/nco/nco_aux.c
+++ b/src/nco/nco_aux.c
@@ -11,10 +11,13 @@
    Cells that contain a value within the user-requested range are considered a match.
    Could be useful to look at the CF bounds variable instead but harder.
    
-   Author: Karen Schuchardt
+   Original Author: Karen Schuchardt, PNNL
    
    Example usage:
-   ncks -X 0.,45.,0.,90. -X 180.,225.,-90.,0. ~/nco/data/in.nc ~/foo.nc */
+   ncks -v gds_3dvar -X 0.,45.,0.,90. -X 180.,225.,-90.,0. ~/nco/data/in.nc ~/foo.nc
+   ncks -X -99,-93,28,32 ${DATA}/hdf/nwm.t18z.short_range.channel_rt.f015.conus.nc_georeferenced.nc ~/foo.nc
+   ncatted -O -a standard_name,latitude,o,c,latitude -a standard_name,longitude,o,c,longitude ${DATA}/hdf/nwm.t18z.short_range.channel_rt.f015.conus.nc_georeferenced.nc ~/foo.nc
+   ncks -O -D 3 -X -99,-93,28,32 ~/foo.nc ~/foo2.nc */
 
 #include "nco_aux.h" /* Auxiliary coordinates */
 
diff --git a/src/nco/nco_cnv_csm.c b/src/nco/nco_cnv_csm.c
index 04c7c38..a37d378 100644
--- a/src/nco/nco_cnv_csm.c
+++ b/src/nco/nco_cnv_csm.c
@@ -420,7 +420,7 @@ nco_cnv_cf_cll_mth_add               /* [fnc] Add cell_methods attributes */
     strcpy(aed.att_nm,"cell_method");
     rcd=nco_inq_att_flg(grp_out_id,var_out_id,aed.att_nm,&att_typ,&att_lng);
     if(rcd == NC_NOERR){
-      if(FIRST_WARNING) (void)fprintf(stderr,"%s: WARNING: Variable \"%s\" uses the non-standard attribute name \"cell_method\" instead of \"cell_methods\", the correct attribute name. The CAM3 model (and others?) have this problem. Expect \"double attributes\" in output. This message is printed only once per invocation, although the problem likely occurs in more variables.\n",nco_prg_nm_get(),aed.var_nm);
+      if(FIRST_WARNING) (void)fprintf(stderr,"%s: WARNING: Variable \"%s\" uses the non-standard attribute name \"cell_method\" instead of \"cell_methods\", the correct attribute name. The CAM3 model (and others?) have this problem. Expect \"double attributes\" in output. This message is printed only once per invocation, although the problem likely occurs in multiple variables.\n",nco_prg_nm_get(),aed.var_nm);
       FIRST_WARNING=False;
     } /* endif attribute exists */
 
diff --git a/src/nco/nco_ctl.c b/src/nco/nco_ctl.c
index c914a05..a53cbaf 100644
--- a/src/nco/nco_ctl.c
+++ b/src/nco/nco_ctl.c
@@ -843,7 +843,7 @@ nco_nmn_get(void) /* [fnc] Return mnemonic that describes current NCO version */
 { 
   /* Purpose: Return mnemonic describing current NCO version
      Always include terminal \n so mnemonic does not dangle */
-  return "Rio\n";
+  return "Argonauts\n";
 } /* end nco_nmn_get() */
 
 char * /* O [sng] nm_in stripped of any path (i.e., program name stub) */ 
@@ -966,7 +966,7 @@ nco_usg_prn(void)
     opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_crd] [--fl_fmt fmt] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-i var,val] [-L lvl] [-l path] [--msa] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [-v ...] [-X box] [-x] [-w wgt_1[,wgt_2]] in_1.nc in_2.nc [out.nc]\n");
     break;
   case ncks:
-    opt_sng=(char *)strdup("[-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b fl_bnr] [--bfr byt] [-C] [-c] [--cdl] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_dmn dim] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [--grp_xtr_var_xcl] [-H] [-h] [--hdn] [--hdr_pad nbr] [-L lvl] [-l path] [-M] [-m] [--map map.nc] [--md5_dgs] [--md5_wrt] [--mk_rec_dmn dim] [--msa] [--no_blank] [--no_tmp_fl] [-O] [-o out. [...]
+    opt_sng=(char *)strdup("[-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b fl_bnr] [--bfr byt] [-C] [-c] [--cdl] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_dmn dim] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [--grp_xtr_var_xcl] [-H] [-h] [--hdn] [--hdr_pad nbr] [--jsn] [--jsn_att_fmt lvl] [-L lvl] [-l path] [-M] [-m] [--map map.nc] [--md5_dgs] [--md5_wrt] [--mk_rec_dmn dim] [--msa] [--no_blank] [...]
     break;
   case ncpdq:
     opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [-a ...] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [-M pck_map] [--mrd] [--msa] [--no_tmp_fl] [-O] [-o out.nc] [-P pck_plc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [--unn] [-U] [-v ...] [-X box] [-x] in.nc [out.nc]\n");
@@ -1001,8 +1001,8 @@ nco_usg_prn(void)
 #ifdef ENABLE_NETCDF4
   if(strstr(opt_sng,"[-4]")) (void)fprintf(stdout,"-4, --4, --netcdf4\t\tOutput file in netCDF4 (HDF5) storage format\n");
 #endif /* !ENABLE_NETCDF4 */
-  if(strstr(opt_sng,"[-5]")) (void)fprintf(stdout,"-5, --5, \t\tPrint alphabetically by group then variable\n");
-  if(strstr(opt_sng,"[-6]")) (void)fprintf(stdout,"-6, --6, --64, --fl_fmt=64bit\tOutput file in netCDF3 64-bit offset storage format\n");
+  if(strstr(opt_sng,"[-5]")) (void)fprintf(stdout,"-5, --5, --fl_fmt=64bit_data\tOutput file in netCDF3 64-bit data (i.e., CDF5) storage format\n");
+  if(strstr(opt_sng,"[-6]")) (void)fprintf(stdout,"-6, --6, --64, --fl_fmt=64bit_offset\tOutput file in netCDF3 64-bit offset storage format\n");
   if(strstr(opt_sng,"[-7]")) (void)fprintf(stdout,"-7, --7, --fl_fmt=netcdf4_classic\tOutput file in netCDF4 CLASSIC format (3+4=7)\n");
   if(strstr(opt_sng,"[-A]")) (void)fprintf(stdout,"-A, --apn, --append\tAppend to existing output file, if any\n");
   if(strstr(opt_sng,"[-a")){
@@ -1045,9 +1045,9 @@ nco_usg_prn(void)
   if(strstr(opt_sng,"--fix_rec_crd")) (void)fprintf(stdout,"    --fix_rec_crd\tDo not interpolate/multiply record coordinate variables\n");
   if(strstr(opt_sng,"--fix_rec_dmn dim")) (void)fprintf(stdout,"    --fix_rec_dmn dim\tChange dimension dim (or all) to fixed dimension in output file\n");
 #ifdef ENABLE_NETCDF4
-  if(strstr(opt_sng,"--fl_fmt")) (void)fprintf(stdout,"    --fl_fmt, --file_format fmt\tFile format [classic,64bit,netcdf4,netcdf4_classic]\n");
+  if(strstr(opt_sng,"--fl_fmt")) (void)fprintf(stdout,"    --fl_fmt, --file_format fmt\tFile format for output [classic,64bit_offset,64bit_data,netcdf4,netcdf4_classic]\n");
 #else /* !ENABLE_NETCDF4 */
-  if(strstr(opt_sng,"--fl_fmt")) (void)fprintf(stdout,"    --fl_fmt, --file_format fmt\tFile format [classic,64bit]\n");
+  if(strstr(opt_sng,"--fl_fmt")) (void)fprintf(stdout,"    --fl_fmt, --file_format fmt\tFile format for output [classic,64bit_offset,64bit_data]\n");
 #endif /* !ENABLE_NETCDF4 */
 #ifdef ENABLE_NETCDF4
   if(strstr(opt_sng,"--gag")) (void)fprintf(stdout,"    --gag, --aggregate_group\tGroup Aggregation (not Record Aggregation)\n");
@@ -1069,6 +1069,8 @@ nco_usg_prn(void)
   if(strstr(opt_sng,"--hdr_pad")) (void)fprintf(stdout,"    --hdr_pad, --header_pad\tPad output header with nbr bytes\n");
   if(strstr(opt_sng,"[-i var,val]")) (void)fprintf(stdout,"-i, --ntp, --interpolate var,val\tInterpolant and value\n");
   if(strstr(opt_sng,"[-I]")) (void)fprintf(stdout,"-I, --wgt_msk_crd_var\tDo not weight or mask coordinate variables\n");
+  if(strstr(opt_sng,"--jsn")) (void)fprintf(stdout,"    --jsn\t\tPrint JSON (JavaScript Object Notation)\n");
+  if(strstr(opt_sng,"--jsn_att_fmt lvl")) (void)fprintf(stdout,"    --jsn_att_fmt lvl\tVerbosity of attribute format [0 = least verbose, 2 = most pedantic]\n");
 #ifdef ENABLE_NETCDF4
   if(strstr(opt_sng,"[-L")) (void)fprintf(stdout,"-L, --dfl_lvl, --deflate lvl\tLempel-Ziv deflation/compression (lvl=0..9) for netCDF4 output\n");
 #endif /* !ENABLE_NETCDF4 */
diff --git a/src/nco/nco_dmn_utl.c b/src/nco/nco_dmn_utl.c
index f620fa7..7d2ff9f 100644
--- a/src/nco/nco_dmn_utl.c
+++ b/src/nco/nco_dmn_utl.c
@@ -338,6 +338,7 @@ nco_dmn_sct_cmp   /* [fnc] Check that dims in list 2 are a subset of list 1 and
 	
     if(dim_2[idx]->cnt != dim_1[jdx]->cnt){
       (void)fprintf(stderr,"%s: ERROR %sdimension size mismatch: dimension %s in file %s is size %li while dimension %s in file %s is size %li\n",nco_prg_nm_get(),(dim_1[jdx]->is_rec_dmn) ? "record " : "",dim_1[jdx]->nm,fl_sng_1,dim_1[jdx]->cnt,dim_2[idx]->nm,fl_sng_2,dim_2[idx]->cnt);
+      if(dim_1[idx]->cnt == 1 || dim_2[jdx]->cnt == 1) (void)fprintf(stderr,"%s: HINT Mismatch is due to degenerate (of size 1) dimension. Re-try command after first removing degenerate dimension from one file with, e.g.,\nncwa -a %s %s %s\n",nco_prg_nm_get(),(dim_1[idx]->cnt == 1) ? dim_1[idx]->nm : dim_2[idx]->nm,(dim_1[idx]->cnt == 1) ? fl_sng_1 : fl_sng_2,(dim_1[idx]->cnt == 1) ? fl_sng_1 : fl_sng_2);
       nco_exit(EXIT_FAILURE); 
     } /* endif size mismatch */
   } /* end loop over dimensions */
diff --git a/src/nco/nco_grp_utl.c b/src/nco/nco_grp_utl.c
index 274a2ae..40978c9 100644
--- a/src/nco/nco_grp_utl.c
+++ b/src/nco/nco_grp_utl.c
@@ -707,164 +707,165 @@ nco_xtr_mk                            /* [fnc] Check -v and -g input names and c
       usr_sng_lng=strlen(usr_sng);
 
       /* Turn-off recursion for groups? */
-      if(obj_typ == nco_obj_typ_grp)
+      if(obj_typ == nco_obj_typ_grp){
         if(usr_sng_lng > 1L && usr_sng[usr_sng_lng-1L] == sls_chr){
           /* Remove trailing slash for subsequent searches since canonical group names do not end with slash */
           flg_rcr_mch_grp=False;
           usr_sng[usr_sng_lng-1L]='\0';
           usr_sng_lng--;
         } /* flg_rcr_mch_grp */
+      } /* !nco_obj_typ_grp */
+      
+      /* Turn-on root-anchoring for groups? */
+      if(obj_typ == nco_obj_typ_grp)
+	if(usr_sng[0L] == sls_chr)
+	  flg_ncr_mch_grp=True;
 
-        /* Turn-on root-anchoring for groups? */
-        if(obj_typ == nco_obj_typ_grp)
-          if(usr_sng[0L] == sls_chr)
-            flg_ncr_mch_grp=True;
-
-        /* Convert pound signs (back) to commas */
-        nco_hash2comma(usr_sng);
+      /* Convert pound signs (back) to commas */
+      nco_hash2comma(usr_sng);
 
-        /* If usr_sng is regular expression ... */
-        if(strpbrk(usr_sng,".*^$\\[]()<>+?|{}")){
-          /* ... and regular expression library is present */
+      /* If usr_sng is regular expression ... */
+      if(strpbrk(usr_sng,".*^$\\[]()<>+?|{}")){
+	/* ... and regular expression library is present */
 #ifdef NCO_HAVE_REGEX_FUNCTIONALITY
-          if((rx_mch_nbr=nco_trv_rx_search(usr_sng,obj_typ,trv_tbl))) flg_usr_mch_obj=True;
-          if(!rx_mch_nbr) (void)fprintf(stdout,"%s: WARNING: Regular expression \"%s\" does not match any %s\nHINT: See regular expression syntax examples at http://nco.sf.net/nco.html#rx\n",nco_prg_nm_get(),usr_sng,(obj_typ == nco_obj_typ_grp) ? "group" : "variable"); 
-          continue;
+	if((rx_mch_nbr=nco_trv_rx_search(usr_sng,obj_typ,trv_tbl))) flg_usr_mch_obj=True;
+	if(!rx_mch_nbr) (void)fprintf(stdout,"%s: WARNING: Regular expression \"%s\" does not match any %s\nHINT: See regular expression syntax examples at http://nco.sf.net/nco.html#rx\n",nco_prg_nm_get(),usr_sng,(obj_typ == nco_obj_typ_grp) ? "group" : "variable"); 
+	continue;
 #else /* !NCO_HAVE_REGEX_FUNCTIONALITY */
-          (void)fprintf(stdout,"%s: ERROR: Sorry, wildcarding (extended regular expression matches to variables) was not built into this NCO executable, so unable to compile regular expression \"%s\".\nHINT: Make sure libregex.a is on path and re-build NCO.\n",nco_prg_nm_get(),usr_sng);
-          nco_exit(EXIT_FAILURE);
+	(void)fprintf(stdout,"%s: ERROR: Sorry, wildcarding (extended regular expression matches to variables) was not built into this NCO executable, so unable to compile regular expression \"%s\".\nHINT: Make sure libregex.a is on path and re-build NCO.\n",nco_prg_nm_get(),usr_sng);
+	nco_exit(EXIT_FAILURE);
 #endif /* !NCO_HAVE_REGEX_FUNCTIONALITY */
-        } /* end if regular expression */
-
+      } /* end if regular expression */
+      
         /* usr_sng is not rx, so manually search for multicomponent matches */
-        for(unsigned int tbl_idx=0;tbl_idx<trv_tbl->nbr;tbl_idx++){
-
-          /* Create shallow copy to avoid indirection */
-          trv_obj=trv_tbl->lst[tbl_idx];
-
-          if(trv_obj.nco_typ == obj_typ){
-
-            /* Initialize defaults for current candidate path to match */
-            flg_pth_srt_bnd=False;
-            flg_pth_end_bnd=False;
-            flg_var_cnd=False;
-            flg_rcr_mch_crr=True;
-            flg_ncr_mch_crr=True;
-
-            /* Look for partial match, not necessarily on path boundaries */
-            /* 20130829: Variables and group names may be proper subsets of ancestor group names
-	       e.g., variable named g9 in group named g90 is /g90/g9
-	       e.g., group named g1 in group named g10 is g10/g1
-	       Search algorithm must test same full name multiple times in such cases
-	       For variables, only final match (closest to end full name) need be fully tested */
-            sbs_srt=NULL;
-            sbs_srt_nxt=trv_obj.nm_fll;
-            while((sbs_srt_nxt=strstr(sbs_srt_nxt,usr_sng))){
-              /* Object name contains usr_sng at least once */
-              /* Complete path-check below will begin at this substring ... */
-              sbs_srt=sbs_srt_nxt; 
-              /* ...for groups always at first occurence of substring... */
-              if(obj_typ == nco_obj_typ_grp) break;
-              /* ...and also here for variables unless match is found in next iteration after advancing substring... */
-              if(sbs_srt_nxt+usr_sng_lng <= trv_obj.nm_fll+trv_obj.nm_fll_lng) sbs_srt_nxt+=usr_sng_lng; else break;
-            } /* end while */
-
+      for(unsigned int tbl_idx=0;tbl_idx<trv_tbl->nbr;tbl_idx++){
+	
+	/* Create shallow copy to avoid indirection */
+	trv_obj=trv_tbl->lst[tbl_idx];
+	
+	if(trv_obj.nco_typ == obj_typ){
+	  
+	  /* Initialize defaults for current candidate path to match */
+	  flg_pth_srt_bnd=False;
+	  flg_pth_end_bnd=False;
+	  flg_var_cnd=False;
+	  flg_rcr_mch_crr=True;
+	  flg_ncr_mch_crr=True;
+	  
+	  /* Look for partial match, not necessarily on path boundaries */
+	  /* 20130829: Variables and group names may be proper subsets of ancestor group names
+	     e.g., variable named g9 in group named g90 is /g90/g9
+	     e.g., group named g1 in group named g10 is g10/g1
+	     Search algorithm must test same full name multiple times in such cases
+	     For variables, only final match (closest to end full name) need be fully tested */
+	  sbs_srt=NULL;
+	  sbs_srt_nxt=trv_obj.nm_fll;
+	  while((sbs_srt_nxt=strstr(sbs_srt_nxt,usr_sng))){
+	    /* Object name contains usr_sng at least once */
+	    /* Complete path-check below will begin at this substring ... */
+	    sbs_srt=sbs_srt_nxt; 
+	    /* ...for groups always at first occurence of substring... */
+	    if(obj_typ == nco_obj_typ_grp) break;
+	    /* ...and also here for variables unless match is found in next iteration after advancing substring... */
+	    if(sbs_srt_nxt+usr_sng_lng <= trv_obj.nm_fll+trv_obj.nm_fll_lng) sbs_srt_nxt+=usr_sng_lng; else break;
+	  } /* end while */
+	  
             /* Does object name contain usr_sng? */
-            if(sbs_srt){
-              /* Ensure match spans (begins and ends on) whole path-component boundaries
-		 Full path-check starts at current substring */
-
-              /* Does match begin at path component boundary ... directly on a slash? */
-              if(*sbs_srt == sls_chr) flg_pth_srt_bnd=True;
-
-              /* ...or one after a component boundary? */
-              if((sbs_srt > trv_obj.nm_fll) && (*(sbs_srt-1L) == sls_chr)) flg_pth_srt_bnd=True;
-
-              /* Does match end at path component boundary ... directly on a slash? */
-              sbs_end=sbs_srt+usr_sng_lng-1L;
-
-              if(*sbs_end == sls_chr) flg_pth_end_bnd=True;
-
-              /* ...or one before a component boundary? */
-              if(sbs_end <= trv_obj.nm_fll+trv_obj.nm_fll_lng-1L)
-                if((*(sbs_end+1L) == sls_chr) || (*(sbs_end+1L) == '\0'))
-                  flg_pth_end_bnd=True;
-
-              /* Additional condition for variables is user-supplied string must end with short form of variable name */
-              if(obj_typ == nco_obj_typ_var){
-                if(trv_obj.nm_lng <= usr_sng_lng){
-                  var_mch_srt=usr_sng+usr_sng_lng-trv_obj.nm_lng;
-                  if(!strcmp(var_mch_srt,trv_obj.nm)) flg_var_cnd=True;
-                } /* endif */
-                if(nco_dbg_lvl_get() >= nco_dbg_sbr && nco_dbg_lvl_get() != nco_dbg_dev) (void)fprintf(stderr,"%s: INFO %s reports variable %s %s additional conditions for variable match with %s.\n",nco_prg_nm_get(),fnc_nm,usr_sng,(flg_var_cnd) ? "meets" : "fails",trv_obj.nm_fll);
-              } /* endif var */
-
+	  if(sbs_srt){
+	    /* Ensure match spans (begins and ends on) whole path-component boundaries
+	       Full path-check starts at current substring */
+	    
+	    /* Does match begin at path component boundary ... directly on a slash? */
+	    if(*sbs_srt == sls_chr) flg_pth_srt_bnd=True;
+	    
+	    /* ...or one after a component boundary? */
+	    if((sbs_srt > trv_obj.nm_fll) && (*(sbs_srt-1L) == sls_chr)) flg_pth_srt_bnd=True;
+	    
+	    /* Does match end at path component boundary ... directly on a slash? */
+	    sbs_end=sbs_srt+usr_sng_lng-1L;
+	    
+	    if(*sbs_end == sls_chr) flg_pth_end_bnd=True;
+	    
+	    /* ...or one before a component boundary? */
+	    if(sbs_end <= trv_obj.nm_fll+trv_obj.nm_fll_lng-1L)
+	      if((*(sbs_end+1L) == sls_chr) || (*(sbs_end+1L) == '\0'))
+		flg_pth_end_bnd=True;
+	    
+	    /* Additional condition for variables is user-supplied string must end with short form of variable name */
+	    if(obj_typ == nco_obj_typ_var){
+	      if(trv_obj.nm_lng <= usr_sng_lng){
+		var_mch_srt=usr_sng+usr_sng_lng-trv_obj.nm_lng;
+		if(!strcmp(var_mch_srt,trv_obj.nm)) flg_var_cnd=True;
+	      } /* endif */
+	      if(nco_dbg_lvl_get() >= nco_dbg_sbr && nco_dbg_lvl_get() != nco_dbg_dev) (void)fprintf(stderr,"%s: INFO %s reports variable %s %s additional conditions for variable match with %s.\n",nco_prg_nm_get(),fnc_nm,usr_sng,(flg_var_cnd) ? "meets" : "fails",trv_obj.nm_fll);
+	    } /* endif var */
+	    
               /* If anchoring, match must begin at root */
-              if(flg_ncr_mch_grp && *sbs_srt != sls_chr) flg_ncr_mch_crr=False;
-
-              /* If no recursion, match must terminate user-supplied string */
-              if(!flg_rcr_mch_grp && *(sbs_end+1L)) flg_rcr_mch_crr=False;
-
-              /* Set traversal table flags */
-              if(obj_typ == nco_obj_typ_var){
-                /* Variables must meet necessary flags for variables */
-                if(flg_pth_srt_bnd && flg_pth_end_bnd && flg_var_cnd){
-                  trv_tbl->lst[tbl_idx].flg_mch=True;
-                  trv_tbl->lst[tbl_idx].flg_rcr=False;
-                  /* Was matched variable specified as full path (i.e., beginning with slash?) */
-                  if(*usr_sng == sls_chr) trv_tbl->lst[tbl_idx].flg_vfp=True;
-                } /* end flags */
-              }else if (obj_typ == nco_obj_typ_grp){ /* !nco_obj_typ_var */
-                /* Groups must meet necessary flags for groups */
-                if(flg_pth_srt_bnd && flg_pth_end_bnd && flg_ncr_mch_crr && flg_rcr_mch_crr){
-                  trv_tbl->lst[tbl_idx].flg_mch=True;
-                  trv_tbl->lst[tbl_idx].flg_rcr=flg_rcr_mch_grp;
-                } /* end flags */
-              } /* !nco_obj_typ_var */
-
+	    if(flg_ncr_mch_grp && *sbs_srt != sls_chr) flg_ncr_mch_crr=False;
+	    
+	    /* If no recursion, match must terminate user-supplied string */
+	    if(!flg_rcr_mch_grp && *(sbs_end+1L)) flg_rcr_mch_crr=False;
+	    
+	    /* Set traversal table flags */
+	    if(obj_typ == nco_obj_typ_var){
+	      /* Variables must meet necessary flags for variables */
+	      if(flg_pth_srt_bnd && flg_pth_end_bnd && flg_var_cnd){
+		trv_tbl->lst[tbl_idx].flg_mch=True;
+		trv_tbl->lst[tbl_idx].flg_rcr=False;
+		/* Was matched variable specified as full path (i.e., beginning with slash?) */
+		if(*usr_sng == sls_chr) trv_tbl->lst[tbl_idx].flg_vfp=True;
+	      } /* end flags */
+	    }else if (obj_typ == nco_obj_typ_grp){ /* !nco_obj_typ_var */
+	      /* Groups must meet necessary flags for groups */
+	      if(flg_pth_srt_bnd && flg_pth_end_bnd && flg_ncr_mch_crr && flg_rcr_mch_crr){
+		trv_tbl->lst[tbl_idx].flg_mch=True;
+		trv_tbl->lst[tbl_idx].flg_rcr=flg_rcr_mch_grp;
+	      } /* end flags */
+	    } /* !nco_obj_typ_var */
+	    
               /* Set function return condition */
-              if(trv_tbl->lst[tbl_idx].flg_mch) flg_usr_mch_obj=True;
-
-              if(nco_dbg_lvl_get() == nco_dbg_old){
-                /* Redundant call to nco_flg_set_grp_var_ass() here in debugging mode only to set flags for following print statements 
-		   Essential call to nco_flg_set_grp_var_ass() occurs after itr loop
-		   Most debugging info is available in debugging section at routine end
-		   However, group boundary/anchoring/recursion info is only available here */
-                if(trv_tbl->lst[tbl_idx].flg_mch) nco_flg_set_grp_var_ass(trv_obj.grp_nm_fll,obj_typ,trv_tbl);
-                (void)fprintf(stderr,"%s: INFO %s reports %s %s matches filepath %s. Begins on boundary? %s. Ends on boundary? %s. Extract? %s.",nco_prg_nm_get(),fnc_nm,(obj_typ == nco_obj_typ_grp) ? "group" : "variable",usr_sng,trv_obj.nm_fll,(flg_pth_srt_bnd) ? "Yes" : "No",(flg_pth_end_bnd) ? "Yes" : "No",(trv_tbl->lst[tbl_idx].flg_mch) ?  "Yes" : "No");
-                if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," Anchored? %s.",(flg_ncr_mch_grp) ? "Yes" : "No");
-                if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," Recursive? %s.",(trv_tbl->lst[tbl_idx].flg_rcr) ? "Yes" : "No");
-                if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," flg_gcv? %s.",(trv_tbl->lst[tbl_idx].flg_gcv) ? "Yes" : "No");
-                if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," flg_ncs? %s.",(trv_tbl->lst[tbl_idx].flg_ncs) ? "Yes" : "No");
-                if(obj_typ == nco_obj_typ_var) (void)fprintf(stderr," flg_vfp? %s.",(trv_tbl->lst[tbl_idx].flg_vfp) ? "Yes" : "No");
-                if(obj_typ == nco_obj_typ_var) (void)fprintf(stderr," flg_vsg? %s.",(trv_tbl->lst[tbl_idx].flg_vsg) ? "Yes" : "No");
-                (void)fprintf(stderr,"\n");
-              } /* end if dbg */
-
-            } /* endif strstr() */
-          } /* endif nco_obj_typ */
-        } /* end loop over tbl_idx */
-
-        if(!flg_usr_mch_obj && !EXCLUDE_INPUT_LIST){
-          (void)fprintf(stderr,"%s: ERROR %s reports user-supplied %s name or regular expression \'%s\' is not in and/or does not match contents of input file\n",nco_prg_nm_get(),fnc_nm,(obj_typ == nco_obj_typ_grp) ? "group" : "variable",usr_sng);
-          nco_exit(EXIT_FAILURE);
-        } /* flg_usr_mch_obj */
+	    if(trv_tbl->lst[tbl_idx].flg_mch) flg_usr_mch_obj=True;
+	    
+	    if(nco_dbg_lvl_get() == nco_dbg_old){
+	      /* Redundant call to nco_flg_set_grp_var_ass() here in debugging mode only to set flags for following print statements 
+		 Essential call to nco_flg_set_grp_var_ass() occurs after itr loop
+		 Most debugging info is available in debugging section at routine end
+		 However, group boundary/anchoring/recursion info is only available here */
+	      if(trv_tbl->lst[tbl_idx].flg_mch) nco_flg_set_grp_var_ass(trv_obj.grp_nm_fll,obj_typ,trv_tbl);
+	      (void)fprintf(stderr,"%s: INFO %s reports %s %s matches filepath %s. Begins on boundary? %s. Ends on boundary? %s. Extract? %s.",nco_prg_nm_get(),fnc_nm,(obj_typ == nco_obj_typ_grp) ? "group" : "variable",usr_sng,trv_obj.nm_fll,(flg_pth_srt_bnd) ? "Yes" : "No",(flg_pth_end_bnd) ? "Yes" : "No",(trv_tbl->lst[tbl_idx].flg_mch) ?  "Yes" : "No");
+	      if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," Anchored? %s.",(flg_ncr_mch_grp) ? "Yes" : "No");
+	      if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," Recursive? %s.",(trv_tbl->lst[tbl_idx].flg_rcr) ? "Yes" : "No");
+	      if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," flg_gcv? %s.",(trv_tbl->lst[tbl_idx].flg_gcv) ? "Yes" : "No");
+	      if(obj_typ == nco_obj_typ_grp) (void)fprintf(stderr," flg_ncs? %s.",(trv_tbl->lst[tbl_idx].flg_ncs) ? "Yes" : "No");
+	      if(obj_typ == nco_obj_typ_var) (void)fprintf(stderr," flg_vfp? %s.",(trv_tbl->lst[tbl_idx].flg_vfp) ? "Yes" : "No");
+	      if(obj_typ == nco_obj_typ_var) (void)fprintf(stderr," flg_vsg? %s.",(trv_tbl->lst[tbl_idx].flg_vsg) ? "Yes" : "No");
+	      (void)fprintf(stderr,"\n");
+	    } /* end if dbg */
+	    
+	  } /* endif strstr() */
+	} /* endif nco_obj_typ */
+      } /* end loop over tbl_idx */
+      
+      if(!flg_usr_mch_obj && !EXCLUDE_INPUT_LIST){
+	(void)fprintf(stderr,"%s: ERROR %s reports user-supplied %s name or regular expression \'%s\' is not in and/or does not match contents of input file\n",nco_prg_nm_get(),fnc_nm,(obj_typ == nco_obj_typ_grp) ? "group" : "variable",usr_sng);
+	nco_exit(EXIT_FAILURE);
+      } /* flg_usr_mch_obj */
         /* Free dynamic memory */
-        if(usr_sng) usr_sng=(char *)nco_free(usr_sng);
-
+      if(usr_sng) usr_sng=(char *)nco_free(usr_sng);
+      
     } /* obj_idx */
-
+    
     if(nco_dbg_lvl_get() >= nco_dbg_sbr && nco_dbg_lvl_get() != nco_dbg_dev){
       (void)fprintf(stdout,"%s: INFO %s reports following %s match sub-setting and regular expressions:\n",nco_prg_nm_get(),fnc_nm,(obj_typ == nco_obj_typ_grp) ? "groups" : "variables");
       trv_tbl_prn_flg_mch(trv_tbl,obj_typ);
     } /* endif dbg */
-
+    
   } /* itr_idx */
-
+  
   /* Compute intersection of groups and variables if necessary
      Intersection criteria flag, flg_nsx, is satisfied by default. Unset later when necessary. */
   for(unsigned int obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++) trv_tbl->lst[obj_idx].flg_nsx=True;
-
+  
   /* Each object with flg_mch set needs to have its associated objects set
      An object (group or variable) may have had its flg_mch set multiple times, e.g., once via rx and once via explicit listing
      And since rx's often match multiple objects, no sense in flagging associated objects inside rx loop
@@ -872,7 +873,7 @@ nco_xtr_mk                            /* [fnc] Check -v and -g input names and c
      Now speed through table once and set associated objects for all groups and variables flagged with flg_mch */
   for(unsigned int obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
     if(trv_tbl->lst[obj_idx].flg_mch) nco_flg_set_grp_var_ass(trv_tbl->lst[obj_idx].grp_nm_fll,trv_tbl->lst[obj_idx].nco_typ,trv_tbl);
-
+  
   /* Union is same as intersection if either variable or group list is empty, otherwise check intersection criteria */
   if(flg_unn || !grp_xtr_nbr || !var_xtr_nbr) flg_unn_ffc=True; else flg_unn_ffc=False;
   if(!flg_unn_ffc){
@@ -891,7 +892,7 @@ nco_xtr_mk                            /* [fnc] Check -v and -g input names and c
       } /* nco_obj_typ_grp */
     } /* end loop over obj_idx */
   } /* flg_unn */
-
+  
   /* Does matched or default group contain only metadata? 
      Flag used in nco_xtr_grp_mrk() to preserve metadata-only groups on extraction list */
   for(unsigned int obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
@@ -1077,6 +1078,7 @@ nco_xtr_cf_var_add /* [fnc] Add variables associated (via CF) with specified var
   char att_nm[NC_MAX_NAME+1L]; /* [sng] Attribute name */
 
   const char dlm_sng[]=" "; /* [sng] Delimiter string */
+  const char fnc_nm[]="nco_xtr_cf_var_add()"; /* [sng] Function name */
 
   int grp_id; /* [id] Group ID */
   int nbr_att; /* [nbr] Number of attributes */
@@ -1103,7 +1105,7 @@ nco_xtr_cf_var_add /* [fnc] Add variables associated (via CF) with specified var
       /* Yes, get list of specified attributes */
       (void)nco_inq_att(grp_id,var_id,att_nm,&att_typ,&att_sz);
       if(att_typ != NC_CHAR){
-        (void)fprintf(stderr,"%s: WARNING \"%s\" attribute for variable %s is type %s, not %s. This violates CF convention for specifying additional attributes. Therefore will skip this attribute. If you want CF to support NC_STRING attributes, please tell them and CC: NCO.\n",nco_prg_nm_get(),att_nm,var_trv->nm_fll,nco_typ_sng(att_typ),nco_typ_sng(NC_CHAR));
+        (void)fprintf(stderr,"%s: WARNING \"%s\" attribute for variable %s is type %s, not %s. This violates the CF convention for specifying additional attributes. Therefore %s will skip this attribute. If you want CF to support NC_STRING attributes, please tell them and CC: NCO.\n",nco_prg_nm_get(),att_nm,var_trv->nm_fll,nco_typ_sng(att_typ),nco_typ_sng(NC_CHAR),fnc_nm);
         return;
       } /* end if */
       att_val=(char *)nco_malloc((att_sz+1L)*sizeof(char));
@@ -4273,6 +4275,8 @@ nco_cpy_var_dfn_trv                 /* [fnc] Define specified variable in output
        Again, this can happen when appending, e.g., from lower-to-higher precision */
     (void)nco_inq_vartype(grp_out_id,var_out_id,&var_typ_out);
     if(var_typ_out != var_trv->var_typ) (void)fprintf(stdout,"%s: WARNING %s reports variable \"%s\" output type = %s does not equal input type = %s. This is legal yet usually ill-advised when appending variables (i.e., with -A). Writing values into slots created for a different type is begging for trouble (e.g., data corruption, truncation, gingivitis).\n",nco_prg_nm_get(),fnc_nm,var_nm,nco_typ_sng(var_typ_out),nco_typ_sng(var_trv->var_typ));
+    /* 20160930: Potential bug? Function returns var_out_id without other outputs (var_trv_dmn_cmn_out,nbr_dmn_cmn_out)
+       Inexplicable errors in Append mode, when variable is already defined in output file, could be due to early return here */
     return var_out_id;
   } /* endif */
 
@@ -4412,7 +4416,7 @@ nco_cpy_var_dfn_trv                 /* [fnc] Define specified variable in output
     udm_out_id_grp=(int *)nco_malloc(nbr_udm_out_grp*sizeof(int));
     (void)nco_inq_unlimdims(grp_dmn_out_id,&nbr_udm_out_grp,udm_out_id_grp);
 
-    /* Is dimension is already defined? */
+    /* Is dimension already defined? */
     for(int idx_dmn_grp=0;idx_dmn_grp<nbr_dmn_out_grp;idx_dmn_grp++){
 
       /* Get dimension name and size from ID */
@@ -7178,6 +7182,7 @@ nco_var_has_cf /* [fnc] Variable has CF-compliant attributes ("ancillary_variabl
      http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#coordinate-system */ 
 
   const char dlm_sng[]=" "; /* [sng] Delimiter string */
+  const char fnc_nm[]="nco_var_has_cf()"; /* [sng] Function name */
 
   char **cf_lst; /* [sng] 1D array of list elements */
   char att_nm[NC_MAX_NAME+1L]; /* [sng] Attribute name */
@@ -7220,8 +7225,7 @@ nco_var_has_cf /* [fnc] Variable has CF-compliant attributes ("ancillary_variabl
       /* Yes, get list of specified attributes */
       (void)nco_inq_att(grp_id,var_id,att_nm,&att_typ,&att_sz);
       if(att_typ != NC_CHAR){
-        (void)fprintf(stderr,"%s: WARNING \"%s\" attribute for variable %s is type %s, not %s. This violates CF convention for specifying additional attributes. Therefore will skip this attribute.\n",
-          nco_prg_nm_get(),att_nm,var_trv->nm_fll,nco_typ_sng(att_typ),nco_typ_sng(NC_CHAR));
+        (void)fprintf(stderr,"%s: WARNING \"%s\" attribute for variable %s is type %s, not %s. This violates the CF convention for specifying additional attributes. Therefore %s will skip this attribute.\n",nco_prg_nm_get(),att_nm,var_trv->nm_fll,nco_typ_sng(att_typ),nco_typ_sng(NC_CHAR),fnc_nm);
         return NULL;
       } /* end if */
       att_val=(char *)nco_malloc((att_sz+1L)*sizeof(char));
@@ -7306,7 +7310,7 @@ nco_prs_aux_crd                       /* [fnc] Parse auxiliary coordinates */
         for(int idx_dmn=0;idx_dmn<var_trv.nbr_dmn;idx_dmn++){
           /* Has 'latitude' auxiliary coordinates */
           if(var_trv.var_dmn[idx_dmn].nbr_lat_crd){
-            /* Use the coordinate with lower group depth (index 0) (These were already sorted ) */
+            /* Use coordinate with lower group depth (index 0) (These were already sorted) */
             lat_trv=trv_tbl_var_nm_fll(var_trv.var_dmn[idx_dmn].lat_crd[0].nm_fll,trv_tbl);
             dmn_idx_fnd=idx_dmn;
             dmn_id_fnd_lat=var_trv.var_dmn[idx_dmn].lat_crd[0].dmn_id;
@@ -7318,7 +7322,7 @@ nco_prs_aux_crd                       /* [fnc] Parse auxiliary coordinates */
         for(int idx_dmn=0;idx_dmn<var_trv.nbr_dmn;idx_dmn++){
           /* Has 'longitude' auxiliary coordinates */
           if(var_trv.var_dmn[idx_dmn].nbr_lon_crd){
-            /* Use the coordinate with lower group depth (index 0) (These were already sorted ) */
+            /* Use coordinate with lower group depth (index 0) (These were already sorted) */
             lon_trv=trv_tbl_var_nm_fll(var_trv.var_dmn[idx_dmn].lon_crd[0].nm_fll,trv_tbl);
             dmn_idx_fnd=idx_dmn;
             dmn_id_fnd_lon=var_trv.var_dmn[idx_dmn].lon_crd[0].dmn_id;
@@ -7348,7 +7352,6 @@ nco_prs_aux_crd                       /* [fnc] Parse auxiliary coordinates */
 
           /* Found limits */
           if(aux_lmt_nbr > 0){
-
             if(nco_dbg_lvl_get() >= nco_dbg_dev) (void)fprintf(stdout,"%s: DEBUG %s variable <%s> (%d) limits\n",nco_prg_nm_get(),fnc_nm,trv_tbl->lst[idx_tbl].nm_fll,aux_lmt_nbr); 
 
             lmt_sct **lmt=aux;
@@ -7361,22 +7364,20 @@ nco_prs_aux_crd                       /* [fnc] Parse auxiliary coordinates */
             /* Apply limits to variable in table */
             (void)nco_lmt_aux_tbl(nc_id,lmt,lmt_dmn_nbr,var_trv.nm_fll,dmn_id_fnd_lat,FORTRAN_IDX_CNV,MSA_USR_RDR,trv_tbl);
 
-            /* Apply limits to *all* 'latitude', 'longitude' variables that share the same ID */
+            /* Apply limits to *all* 'latitude', 'longitude' variables that share same ID */
             (void)nco_lmt_std_att_lat_lon(nc_id,lmt,lmt_dmn_nbr,dmn_id_fnd_lat,FORTRAN_IDX_CNV,MSA_USR_RDR,trv_tbl);   
 
             /* Get unique dimension object from unique dimension ID (e.g., 'gds_crd) */
             dmn_trv_sct *dmn_trv=nco_dmn_trv_sct(dmn_id_fnd_lat,trv_tbl);
 
-            /* The dimension IDs of both 'latitude' and 'longitude' must refer to the same dimemsion (e.g., 'gds_crd) */
+            /* Dimension IDs of both 'latitude' and 'longitude' must refer to same dimemsion (e.g., gds_crd) */
             assert(dmn_id_fnd_lon == dmn_trv->dmn_id);
 
-            /*  Apply limits to the coordinate (e.g., 'gds_crd) */
+            /* Apply limits to coordinate (e.g., gds_crd) */
             (void)nco_lmt_aux_tbl(nc_id,lmt,lmt_dmn_nbr,dmn_trv->nm_fll,dmn_id_fnd_lat,FORTRAN_IDX_CNV,MSA_USR_RDR,trv_tbl);
 
-            if(nco_dbg_lvl_get() == nco_dbg_old) 
-            {
-              for(int idx_lmt=0;idx_lmt<lmt_dmn_nbr;idx_lmt++)
-              {
+            if(nco_dbg_lvl_get() == nco_dbg_old){
+              for(int idx_lmt=0;idx_lmt<lmt_dmn_nbr;idx_lmt++){
                 (void)fprintf(stdout,"\nlimit index %d\n",idx_lmt);
                 nco_lmt_prt(lmt[idx_lmt]);
               }
diff --git a/src/nco/nco_lst_utl.c b/src/nco/nco_lst_utl.c
index 1455c98..c559dd4 100644
--- a/src/nco/nco_lst_utl.c
+++ b/src/nco/nco_lst_utl.c
@@ -803,11 +803,10 @@ nco_sng_lst_free /* [fnc] Free memory associated with string list */
 {
   /* Threads: Routine is thread safe and calls no unsafe routines */
   /* Purpose: Free all memory associated with dynamically allocated string list */
-  int idx;
+  int sng_idx;
 
-  for(idx=0;idx<sng_nbr;idx++){
-    sng_lst[idx]=(char *)nco_free(sng_lst[idx]);
-  } /* end loop over idx */
+  for(sng_idx=0;sng_idx<sng_nbr;sng_idx++)
+    sng_lst[sng_idx]=(char *)nco_free(sng_lst[sng_idx]);
 
   /* Free structure pointer last */
   sng_lst=(char **)nco_free(sng_lst);
diff --git a/src/nco/nco_mmr.c b/src/nco/nco_mmr.c
index e6e39be..3f0c23a 100644
--- a/src/nco/nco_mmr.c
+++ b/src/nco/nco_mmr.c
@@ -199,7 +199,8 @@ nco_malloc_err_hnt_prn /* [fnc] Explain meaning and workarounds for malloc() fai
 (void)
 {
   /* Purpose: Explain meaning and workarounds for malloc() failures */
-  (void)fprintf(stdout,"%s: INFO NCO has reported a malloc() failure. malloc() failures usually indicate that your machine does not have enough free memory (RAM+swap) to perform the requested operation. As such, malloc() failures result from the physical limitations imposed by your hardware. Read http://nco.sf.net/nco.html#mmr for a description of NCO memory usage. The likiest case is that this problem is caused by inadequate RAM on your system, and is not an NCO bug. If so, there are tw [...]
+  (void)fprintf(stdout,"%s: INFO NCO has reported a malloc() failure. malloc() failures usually indicate that your machine does not have enough free memory (RAM+swap) to perform the requested operation. As such, malloc() failures result from the physical limitations imposed by your hardware. Read http://nco.sf.net/nco.html#mmr for a description of NCO memory usage. The likiest case is that this problem is caused by inadequate RAM on your system, and is not an NCO bug. If so, there are tw [...]
+  if(nco_prg_id_get() == ncap) (void)fprintf(stdout,"Large tasks may uncover memory leaks in NCO. ncap2 scripts are completely dynamic and may be of arbitrary length and complexity. A script that contains many thousands of operations may uncover a slow memory leak even though each single operation consumes little additional memory. Memory leaks are usually identifiable by their memory usage signature. Leaks cause peak memory usage to increase monotonically with time regardless of script  [...]
 } /* nco_malloc_err_hnt_prn() */
 
 /* fxm: when are const qualifiers on return values legal? is this a GNUism? */
diff --git a/src/nco/nco_msa.c b/src/nco/nco_msa.c
index 41b27e8..769b87f 100644
--- a/src/nco/nco_msa.c
+++ b/src/nco/nco_msa.c
@@ -285,61 +285,62 @@ nco_msa_clc_idx
     crr_idx=nco_msa_min_idx(indices,mnm,size);
 
     crr_slb=-1;
-    for(sz_idx=0;sz_idx<size;sz_idx++)
+    for(sz_idx=0;sz_idx<size;sz_idx++){
       if(mnm[sz_idx]){crr_slb=sz_idx;break;}
-
-      if(crr_slb == -1){
-        if(lmt->srt == -1L){
-          rcd=False;
-          goto cln_and_xit;
-        }else break;
-      } /* endif */
-
-      if(mnm[prv_slb]) crr_slb=prv_slb;
-
-      if(lmt->srt > -1L && crr_slb != prv_slb) break;
-
-      if(lmt->cnt > 1L){
-        (lmt->cnt)++;
-        lmt->end=crr_idx;
-      } /* end if */
-
-      if(lmt->cnt == 1L){
-        lmt->cnt=2L;
-        lmt->srd=crr_idx-prv_idx;
-        lmt->end=crr_idx;
-      } /* end if */
-
+    } /* !sz_idx */
+    
+    if(crr_slb == -1){
       if(lmt->srt == -1L){
-        lmt->srt=crr_idx;
-        lmt->cnt=1L;
-        lmt->end=crr_idx;
-        lmt->srd=1L;
-      } /* end if */
-
-      for(sz_idx=0;sz_idx<size;sz_idx++){
-        if(mnm[sz_idx]){
-          indices[sz_idx]+=lmt_a->lmt_dmn[sz_idx]->srd;
-          if(indices[sz_idx] > lmt_a->lmt_dmn[sz_idx]->end) indices[sz_idx]=-1L;
-        }
-      } /* end loop over sz_idx */
-      prv_idx=crr_idx;
-      prv_slb=crr_slb;
+	rcd=False;
+	goto cln_and_xit;
+      }else break;
+    } /* endif */
+    
+    if(mnm[prv_slb]) crr_slb=prv_slb;
+    
+    if(lmt->srt > -1L && crr_slb != prv_slb) break;
+    
+    if(lmt->cnt > 1L){
+      (lmt->cnt)++;
+      lmt->end=crr_idx;
+    } /* end if */
+    
+    if(lmt->cnt == 1L){
+      lmt->cnt=2L;
+      lmt->srd=crr_idx-prv_idx;
+      lmt->end=crr_idx;
+    } /* end if */
+    
+    if(lmt->srt == -1L){
+      lmt->srt=crr_idx;
+      lmt->cnt=1L;
+      lmt->end=crr_idx;
+      lmt->srd=1L;
+    } /* end if */
+    
+    for(sz_idx=0;sz_idx<size;sz_idx++){
+      if(mnm[sz_idx]){
+	indices[sz_idx]+=lmt_a->lmt_dmn[sz_idx]->srd;
+	if(indices[sz_idx] > lmt_a->lmt_dmn[sz_idx]->end) indices[sz_idx]=-1L;
+      }
+    } /* end loop over sz_idx */
+    prv_idx=crr_idx;
+    prv_slb=crr_slb;
   } /* end while */
-
+  
   *slb=prv_slb;
-
+  
   /* Normalize slab */
   if(NORMALIZE){
     lmt->srt=(lmt->srt-lmt_a->lmt_dmn[*slb]->srt)/(lmt_a->lmt_dmn[*slb]->srd);
     lmt->end=(lmt->end-lmt_a->lmt_dmn[*slb]->srt)/(lmt_a->lmt_dmn[*slb]->srd);
     lmt->srd=1L;
   } /* end if */
-
+  
   rcd=True;
-
+  
   /* Jump here if only one string */
-cln_and_xit:
+ cln_and_xit:
   mnm=(nco_bool *)nco_free(mnm);
 
   return rcd;
diff --git a/src/nco/nco_mta.c b/src/nco/nco_mta.c
new file mode 100644
index 0000000..7dd8f5a
--- /dev/null
+++ b/src/nco/nco_mta.c
@@ -0,0 +1,253 @@
+/* $Header$ */
+
+/* Purpose: Multi-argument utilities */
+
+/* Copyright (C) 2016--2016 Charlie Zender
+   This file is part of NCO, the netCDF Operators. NCO is free software.
+   You may redistribute and/or modify NCO under the terms of the 
+   GNU General Public License (GPL) Version 3 with exceptions described in the LICENSE file
+   
+   Original Author: Jerome Mao, UCI */
+
+#include "nco_mta.h" /* Multi-argument parsing */
+
+const char *nco_mta_sub_dlm=","; /* [sng] Multi-argument sub-delimiter */
+
+kvm_sct /* O [kvm_sct] key-value pair*/
+nco_sng2kvm /* [fnc] Convert string to key-value pair */
+(const char *args) /* I [sng] Input string argument with equal sign connecting key & value */
+{
+  /* Implementation: parsing args so they can be sent to kvm (fake kvm here) as key-value pair
+   *
+   * Example 1: ... --gaa a=1 ... should be exported as kvm.key = a; kvm.value = 1
+   * Example 2: ... --gaa "a;b;c"=1 should be exported as kvm[0].key="a", kvm[1].key="b", kvm[2].key="c"
+   *          and kvm[@] = 1 (the ";" will be parsed by caller). 
+   *
+   * IMPORTANT: free() fake_kvm after using string_to_kvm. */
+  const char fnc_nm[]="nco_sng2kvm()"; /* [sng] Function name */
+  char *args_copy=strdup(args);
+  char *ptr_for_free=args_copy;
+  kvm_sct kvm;
+  
+  kvm.key=strdup(strsep(&args_copy,"="));
+  kvm.val=strdup(args_copy);
+  
+  nco_free(ptr_for_free);
+  
+  /* If nco_malloc() cannot allocate sufficient memory then key or value are NULL */
+  if(!kvm.key || !kvm.val){
+    (void)fprintf(stderr,"%s: ERROR %s reports system has insufficient memory\n",nco_prg_nm_get(),fnc_nm);
+    nco_exit(EXIT_FAILURE);
+  } /* kvm.key */
+  return kvm;
+} /* nco_sng2kvm() */
+
+char * /* O [sng] Stripped-string */
+nco_sng_strip /* [fnc] Strip leading and trailing white space */
+(char *sng) /* I/O [sng] String to strip */
+{
+  /* fxm: seems not working for \n??? */
+  char *srt=sng;
+  while(isspace(*srt)) srt++;
+  size_t end=strlen(srt);
+  if(srt != sng){
+    memmove(sng,srt,end);
+    sng[end]='\0';
+  } /* endif */
+  while(isblank(*(sng+end-1L))) end--;
+  sng[end]='\0';
+  return sng;
+} /* end nco_sng_strip() */
+
+kvm_sct * /* O [sct] Pointer to free'd kvm list */
+nco_kvm_lst_free /* [fnc] Relinquish dynamic memory from list of kvm structures */
+(kvm_sct *kvm, /* I/O [sct] List of kvm structures */
+ const int kvm_nbr) /* I [nbr] Number of kvm structures */
+{
+  /* Purpose: Relinquish dynamic memory from list of kvm structures
+     End of list is indicated by NULL in key slot */
+  for(int kvm_idx=0;kvm_idx<kvm_nbr;kvm_idx++){
+    /* Check pointers' nullity */
+    if(kvm[kvm_idx].key){kvm[kvm_idx].key=(char *)nco_free(kvm[kvm_idx].key);}
+    if(kvm[kvm_idx].val){kvm[kvm_idx].val=(char *)nco_free(kvm[kvm_idx].val);}
+  } /* end for */
+  if(kvm) kvm=(kvm_sct *)nco_free(kvm);
+  return kvm;
+} /* end nco_kvm_lst_free() */
+
+void
+nco_kvm_prn(kvm_sct kvm)
+{
+  if(kvm.key) (void)fprintf(stdout,"%s = %s\n",kvm.key,kvm.val); else return;
+} /* end nco_kvm_prn() */
+
+char *nco_remove_backslash(char *args)
+{ /* Purpose: recursively remove backslash from string */
+  char *backslash_pos=strstr(args,"\\"); 
+  if(backslash_pos){
+    int absolute_pos=backslash_pos-args;/* Get memory address offset */
+    memmove(&args[absolute_pos],&args[absolute_pos+1L],strlen(args)-absolute_pos);
+    return nco_remove_backslash(args);
+  }else return args;
+}
+
+char ** /* O [sng] Group of split strings */
+nco_sng_split /* [fnc] Split string by delimiter */
+(const char *source, /* I [sng] Source string */
+ const char *delimiter) /* I [char] Delimiter */
+{
+  /* Split string into double character pointer, each secondary pointer represents a string after splitting.
+     Example: a, b=1 will be split into *<a> = "a" *<b> = "b=1" with delimiter of SUBDELIMITER 
+     Remember to free() after calling this function */
+  char **sng_fnl=NULL;
+  char *sng_tmp=strdup(source);
+  int *idx_lst=NULL;
+  size_t counter=nco_count_blocks(source,delimiter);
+  size_t dlm_idx=0L;    
+  
+  /* Special case for single argument */
+  if(!strstr(sng_tmp,delimiter)){
+    sng_fnl=(char **)nco_malloc(sizeof(char *));
+    sng_fnl[0]=sng_tmp;
+    return sng_fnl;
+  }
+  
+  /* Count positions where delimiter appears */
+  sng_fnl=(char **)nco_malloc(sizeof(char *)*counter);
+  idx_lst=(int *)nco_malloc(sizeof(int)*(counter+2));
+  if(sng_fnl){
+    char *sng_tmp_ptr=sng_tmp;
+    while(sng_tmp_ptr){
+      if(sng_tmp_ptr == sng_tmp || (sng_tmp_ptr-1)[0] != '\\') idx_lst[dlm_idx++]=sng_tmp_ptr-sng_tmp;
+      sng_tmp_ptr=strstr(sng_tmp_ptr+1L,delimiter);
+    } /* !sng_tmp_ptr */
+    idx_lst[dlm_idx]=strlen(sng_tmp);
+
+    /* Copy first token since it is not preceded by delimiter */
+    sng_fnl[0]=(char *)nco_malloc(idx_lst[1]*sizeof(char)+1L);
+    memcpy(sng_fnl[0],sng_tmp,idx_lst[1]);
+    sng_fnl[0][idx_lst[1]]='\0';
+
+    /* Copy rest of tokens based on positions of delimiter */
+    for(dlm_idx=1;dlm_idx<counter;dlm_idx++){
+      int sng_sz=idx_lst[dlm_idx+1]-idx_lst[dlm_idx]-strlen(delimiter);
+      sng_fnl[dlm_idx]=(char *)nco_malloc(sng_sz*sizeof(char)+1L);
+      memcpy(sng_fnl[dlm_idx],sng_tmp+idx_lst[dlm_idx]+strlen(delimiter),sng_sz);
+      sng_fnl[dlm_idx][sng_sz]='\0';  
+    } /* !dlm_idx */
+    if(idx_lst) idx_lst=(int *)nco_free(idx_lst);
+    if(sng_tmp) sng_tmp=(char *)nco_free(sng_tmp);
+  }else{
+    if(idx_lst) idx_lst=(int *)nco_free(idx_lst);
+    if(sng_tmp) sng_tmp=(char *)nco_free(sng_tmp);
+    return NULL;
+  } /* !sng_fnl */
+  
+  return sng_fnl;
+} /* end nco_sng_split() */
+
+int /* O [flg] Input has valid syntax */
+nco_input_check /* [fnc] Check whether input has valid syntax */
+(const char *args) /* O [sng] Input arguments */
+{
+  /* Check argument syntax
+   * If return value is false the parser will terminate the program */
+  const char fnc_nm[]="nco_input_check()"; /* [sng] Function name */
+
+  if(!strstr(args,"=")){ // If no equal sign in arguments
+    (void)fprintf(stderr,"%s: ERROR %s did not detect equal sign between key and value. HINT: This can occur when the designated or default key-value delimiter \"%s\" is mixed into the literal text of the value. Try changing the delimiter to a string guaranteed not to appear in the value string with, e.g., --dlm=\"##\".\n",nco_prg_nm_get(),fnc_nm,nco_mta_dlm_get());
+    return NCO_ERR;
+  }
+  if(strstr(args,"=") == args){ // Equal sign is at argument start (no key)
+    (void)fprintf(stderr,"%s: ERROR %s reports no key in key-value pair.\n",nco_prg_nm_get(),fnc_nm); 
+    return NCO_ERR;
+  }
+  if(strstr(args,"=") == args+strlen(args)-1L){ // Equal sign is at argument end
+    (void)fprintf(stderr,"%s: ERROR %s reports no value in key-value pair. HINT: This usually occurs when the value of a key is unintentionally omitted, e.g., --gaa foo= , --ppc foo= , --rgr foo= , or --trr foo= . Each equal sign must be followed by a value.\n",nco_prg_nm_get(),fnc_nm); 
+    return NCO_ERR;
+  }
+  return NCO_NOERR;
+} /* !nco_input_check() */
+
+int // O [int] Number of string blocks that will be split with delimiter
+nco_count_blocks // [fnc] Check number of string blocks that will be split with delimiter
+(const char *args, // I [sng] String to be split
+ const char *delimiter) // I [sng] Delimiter
+{
+  int sng_nbr=1;
+  const char *crnt_chr=strstr(args,delimiter);
+  
+  while(crnt_chr){
+    if((crnt_chr-1L)[0] != '\\') sng_nbr++;
+    crnt_chr=strstr(crnt_chr+1L,delimiter);
+  }
+  return sng_nbr;
+} /* !nco_count_blocks() */
+
+kvm_sct * /* O [kvm_sct] the pointer to the first kvm structure */
+nco_arg_mlt_prs /* [fnc] main parser, split the string and assign to kvm structure */
+(const char *args) /* I [sng] input string */
+{
+  /* Main parser: Split whole argument into key value pair and send to sng2kvm */
+  if(!args) return NULL;
+  
+  char *nco_mta_dlm=nco_mta_dlm_get(); /* [sng] Multi-argument delimiter */
+  char **separate_args=nco_sng_split(args,(const char *)nco_mta_dlm);
+  size_t counter=nco_count_blocks(args,nco_mta_dlm)*nco_count_blocks(args,nco_mta_sub_dlm); /* [nbr] Maximum number of kvm structures in this argument */
+
+  for(int index=0;index<nco_count_blocks(args,nco_mta_dlm);index++){
+    if(!nco_input_check(separate_args[index])) nco_exit(EXIT_FAILURE);
+  } /* !index */
+  
+  /* kvm array to return */
+  kvm_sct *kvm_set=(kvm_sct *)nco_malloc(sizeof(kvm_sct)*(counter+5L));
+  size_t kvm_idx=0;
+  
+  for(int sng_idx=0;sng_idx<nco_count_blocks(args,nco_mta_dlm);sng_idx++){
+    char *value=strdup(strstr(separate_args[sng_idx],"="));
+    char *set_of_keys=strdup(strtok(separate_args[sng_idx],"=")); 
+    char **individual_args=nco_sng_split(set_of_keys,nco_mta_sub_dlm);
+    
+    for(int sub_idx=0;sub_idx<nco_count_blocks(set_of_keys,nco_mta_sub_dlm);sub_idx++){
+      char *temp_value=strdup(individual_args[sub_idx]);
+      temp_value=(char *)nco_realloc(temp_value,strlen(temp_value)+strlen(value)+1L);
+      temp_value=strcat(temp_value,value);
+      kvm_set[kvm_idx++]=nco_sng2kvm(nco_remove_backslash(temp_value));
+      nco_free(temp_value);
+    } /* !sub_idx */
+    individual_args=nco_sng_lst_free(individual_args,nco_count_blocks(set_of_keys,nco_mta_sub_dlm));
+    nco_free(set_of_keys);
+    nco_free(value);
+  } /* end outer loop */
+  separate_args=nco_sng_lst_free(separate_args,nco_count_blocks(args,nco_mta_dlm));
+  /* Ending flag for kvm array */
+  kvm_set[kvm_idx].key=NULL;
+
+  return kvm_set;
+} /* !nco_arg_mlt_prs() */
+
+char * /* O [sng] Joined strings */
+nco_join_sng /* [fnc] Join strings with delimiter */
+(X_CST_PTR_CST_PTR_Y(char,sng_lst), /* I [sng] List of strings to join */
+ const int sng_nbr) /* I [int] Number of strings */
+{
+  /* Purpose: Concatenate strings with delimiters */
+
+  char *nco_mta_dlm=nco_mta_dlm_get(); /* [sng] Multi-argument delimiter */
+
+  if(sng_nbr == 1) return strdup(sng_lst[0]);
+  
+  size_t sng_lng=0L;
+  size_t cpy_ctr=0L;
+  for(int sng_idx=0;sng_idx<sng_nbr;sng_idx++)
+    sng_lng+=strlen(sng_lst[sng_idx])+1L;
+
+  char *sng_fnl=(char *)nco_malloc(sng_lng*sizeof(char)+1L);
+  for(int sng_idx=0;sng_idx<sng_nbr;sng_idx++){
+    size_t tmp_lng=strlen(sng_lst[sng_idx]);
+    strcpy(sng_fnl+cpy_ctr,sng_lst[sng_idx]);
+    if(sng_idx<sng_nbr-1) strcpy(sng_fnl+cpy_ctr+tmp_lng,nco_mta_dlm);
+    cpy_ctr+=(tmp_lng+1L);
+  } /* !sng_idx */
+  return sng_fnl;
+} /* !nco_join_sng() */
diff --git a/src/nco/nco_mta.h b/src/nco/nco_mta.h
new file mode 100644
index 0000000..b6cbeea
--- /dev/null
+++ b/src/nco/nco_mta.h
@@ -0,0 +1,83 @@
+/* $Header$ */
+
+/* Purpose: Multi-argument parsing */
+
+/* Copyright (C) 1995--2016 Charlie Zender
+   This file is part of NCO, the netCDF Operators. NCO is free software.
+   You may redistribute and/or modify NCO under the terms of the 
+   GNU General Public License (GPL) Version 3 with exceptions described in the LICENSE file */
+
+/* Usage:
+   #include "nco_mta.h" *//* Multi-argument parsing */
+
+#ifndef NCO_MTA_H
+#define NCO_MTA_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h> /* Autotools tokens */
+#endif /* !HAVE_CONFIG_H */
+
+/* Standard header files */
+#include <stdio.h> /* stderr, FILE, NULL, printf */
+#include <string.h> /* strcmp() */
+
+/* 3rd party vendors */
+
+/* Personal headers */
+#include "nco.h" /* netCDF Operator (NCO) definitions */
+#include "nco_lst_utl.h" /* List utilities */
+#include "nco_mmr.h" /* Memory management */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+  kvm_sct /* O [sct] Key-value pair */
+  nco_sng2kvm /* [fnc] Parse string into key-value pair */
+  (const char *sng); /* I [sng] String to parse, including "=" */
+  
+  char * /* O [sng] Stripped-string */
+  nco_sng_strip /* [fnc] Strip leading and trailing white space */
+  (char *sng); /* I/O [sng] String to strip */
+  
+  kvm_sct * /* O [sct] Pointer to free'd kvm list */
+  nco_kvm_lst_free /* [fnc] Relinquish dynamic memory from list of kvm structures */
+  (kvm_sct *kvm, /* I/O [sct] List of kvm structures */
+   const int kvm_nbr); /* I [nbr] Number of kvm structures */
+  
+  void
+  nco_kvm_prn /* [fnc] Print kvm contents */
+  (kvm_sct kvm); /* [fnc] kvm to print */
+
+  char *
+  nco_remove_backslash
+  (char* args);
+
+  char ** /* O [sng] Group of split strings */
+  nco_sng_split /* [fnc] Split string by delimiter */
+  (const char *source, /* I [sng] Source string */
+   const char *delimiter); /* I [char] Delimiter */
+
+  int /* O [int] the boolean for the checking result */
+  nco_input_check /* [fnc] check whether the input is legal and give feedback accordingly. */
+  (const char *args); /* O [sng] input arguments */
+
+  kvm_sct * /* O [kvm_sct] Pointer to first kvm structure */
+  nco_arg_mlt_prs /* [fnc] Main parser, split string and assign to kvm structure */
+  (const char *args); /* I [sng] Input string */
+
+  char * /* O [sng] Joined strings */
+  nco_join_sng /* [fnc] Join strings with delimiter */
+  (X_CST_PTR_CST_PTR_Y(char,sng_lst), /* I [sng] List of strings to join */
+   const int sng_nbr); /* I [int] Number of strings */
+
+  int // O [int] Number of string blocks that will be split with delimiter
+  nco_count_blocks // [fnc] Check number of string blocks that will be split with delimiter
+  (const char *args, // I [sng] String to be split
+   const char *delimiter); // I [sng] Delimiter
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif /* __cplusplus */
+
+#endif /* NCO_MTA_H */
diff --git a/src/nco/nco_netcdf.c b/src/nco/nco_netcdf.c
index 0f01610..fc73f5f 100644
--- a/src/nco/nco_netcdf.c
+++ b/src/nco/nco_netcdf.c
@@ -286,6 +286,43 @@ xml_typ_nm /* [fnc] Return string describing native XML type */
   return (char *)NULL;
 } /* end xml_typ_nm() */
 
+const char * /* O [sng] Native JSON type */
+jsn_typ_nm /* [fnc] Return string describing native JSON type */
+(const nc_type type) /* I [enm] netCDF type */
+{
+  /* Purpose: Divine JSON type string from netCDF external type enum */
+  switch(type){
+  case NC_FLOAT:
+    return "float";
+  case NC_DOUBLE:
+    return "double";
+  case NC_INT:
+    return "int";
+  case NC_SHORT:
+    return "short";
+  case NC_CHAR:
+    return "char";
+  case NC_BYTE:
+    return "byte";
+  case NC_UBYTE:
+    return "ubyte";
+  case NC_USHORT:
+    return "ushort";
+  case NC_UINT:
+    return "uint";
+  case NC_INT64:
+    return "int64";
+  case NC_UINT64:
+    return "uint64";
+  case NC_STRING:
+    return "string";
+  default: nco_dfl_case_nc_type_err(); break;
+  } /* end switch */
+
+  /* Some compilers, e.g., SGI cc, need return statement to end non-void functions */
+  return (char *)NULL;
+} /* end xml_typ_nm() */
+
 const char * /* O [sng] Native CDL type suffix */
 cdl_typ_sfx /* [fnc] Return suffix string for CDL type */
 (const nc_type type) /* I [enm] netCDF type */
diff --git a/src/nco/nco_netcdf.h b/src/nco/nco_netcdf.h
index 4ca646c..fbc1139 100644
--- a/src/nco/nco_netcdf.h
+++ b/src/nco/nco_netcdf.h
@@ -215,6 +215,10 @@ const char * /* O [sng] Native XML type */
 xml_typ_nm /* [fnc] Return string describing native XML type */
 (const nc_type type); /* I [enm] netCDF type */
 
+const char * /* O [sng] Native JSON type */
+jsn_typ_nm /* [fnc] Return string describing native JSON type */
+(const nc_type type); /* I [enm] netCDF type */
+
 const char * /* O [sng] String describing extended file format */
 nco_fmt_xtn_sng /* [fnc] Convert netCDF extended file format enum to string */
 (const int fl_fmt_xtn); /* I [enm] netCDF extended file format */
@@ -410,7 +414,9 @@ int nco_get_att(const int nc_id,const int var_id,const char * const att_nm,void
 #ifndef NC_HAVE_RENAME_GRP
   int nc_rename_grp(int grp_id,const char * const grp_nm);
 #endif /* NC_HAVE_RENAME_GRP */
-#if NC_LIB_VERSION < 440
+#if NC_LIB_VERSION >= 440
+# include <netcdf_mem.h> /* nc_open_mem() */	 
+#else /* 4.4.0 */
   int nc_open_mem(const char * const fl_nm,const int mode,const size_t sz,void * const void_ptr,int * const nc_id);
 #endif /* 4.4.0 */
 
diff --git a/src/nco/nco_omp.c b/src/nco/nco_omp.c
index 64de490..a2588d2 100644
--- a/src/nco/nco_omp.c
+++ b/src/nco/nco_omp.c
@@ -77,7 +77,7 @@ nco_openmp_ini /* [fnc] Initialize OpenMP threading environment */
 
   if(thr_nbr == 0)
     if(nco_dbg_lvl_get() >= nco_dbg_scl && nco_dbg_lvl_get() != nco_dbg_dev )
-      (void)fprintf(fp_stderr,"%s: INFO User did not specify thread request > 0 on command line. NCO will automatically assign threads based on OMP_NUM_THREADS environment and machine capabilities.\nHINT: Not specifiying any --thr_nbr (or specifying --thr_nbr=0) causes NCO to try to pick the optimal thread number. Specifying --thr_nbr=1 tells NCO to execute in Uni-Processor (UP) (i.e., single-threaded) mode.\n",nco_prg_nm_get());
+      (void)fprintf(fp_stderr,"%s: INFO User did not specify thread request > 0 on command line. NCO will automatically assign threads based on OMP_NUM_THREADS environment and machine capabilities.\nHINT: Not specifying any --thr_nbr (or specifying --thr_nbr=0) causes NCO to try to pick the optimal thread number. Specifying --thr_nbr=1 tells NCO to execute in Uni-Processor (UP) (i.e., single-threaded) mode.\n",nco_prg_nm_get());
 
   if(thr_nbr > 0) USR_SPC_THR_RQS=True;
 
diff --git a/src/nco/nco_ppc.c b/src/nco/nco_ppc.c
index 256a233..94416b7 100644
--- a/src/nco/nco_ppc.c
+++ b/src/nco/nco_ppc.c
@@ -64,11 +64,9 @@ nco_ppc_ini /* Set PPC based on user specifications */
  const int ppc_arg_nbr, /* I [nbr] Number of PPC specified */
  trv_tbl_sct * const trv_tbl) /* I/O [sct] Traversal table */
 {
-  int ppc_arg_idx; /* [idx] Index over ppc_arg (i.e., separate invocations of "--ppc var1[,var2]=val") */
   int ppc_var_idx; /* [idx] Index over ppc_lst (i.e., all names explicitly specified in all "--ppc var1[,var2]=val" options) */
   int ppc_var_nbr=0;
   kvm_sct *ppc_lst; /* [sct] List of all PPC specifications */
-  kvm_sct kvm;
 
   if(fl_out_fmt == NC_FORMAT_NETCDF4 || fl_out_fmt == NC_FORMAT_NETCDF4_CLASSIC){
     /* If user did not explicitly set deflate level for this file ... */
@@ -80,31 +78,45 @@ nco_ppc_ini /* Set PPC based on user specifications */
     if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stderr,"%s: INFO Requested Precision-Preserving Compression (PPC) on netCDF3 output dataset. Unlike netCDF4, netCDF3 does not support internal compression. To take full advantage of PPC consider writing file as netCDF4 enhanced (e.g., %s -4 ...) or classic (e.g., %s -7 ...). Or consider compressing the netCDF3 file afterwards with, e.g., gzip or bzip2. File must then be uncompressed with, e.g., gunzip or bunzip2 before netCDF readers [...]
   } /* endelse */
 
-  ppc_lst=(kvm_sct *)nco_malloc(NC_MAX_VARS*sizeof(kvm_sct));
-
-  /* Parse PPCs */
-  for(ppc_arg_idx=0;ppc_arg_idx<ppc_arg_nbr;ppc_arg_idx++){
-    if(!strstr(ppc_arg[ppc_arg_idx],"=")){
-      (void)fprintf(stdout,"%s: Invalid --ppc specification: %s. Must contain \"=\" sign.\n",nco_prg_nm_get(),ppc_arg[ppc_arg_idx]);
-      if(ppc_lst) ppc_lst=(kvm_sct *)nco_free(ppc_lst);
-      nco_exit(EXIT_FAILURE);
-    } /* endif */
-    kvm=nco_sng2kvm(ppc_arg[ppc_arg_idx]);
-    /* nco_sng2kvm() converts argument "--ppc one,two=3" into kvm.key="one,two" and kvm.val=3
-       Then nco_lst_prs_2D() converts kvm.key into two items, "one" and "two", with the same value, 3 */
-    if(kvm.key){
-      int var_idx; /* [idx] Index over variables in current PPC argument */
-      int var_nbr; /* [nbr] Number of variables in current PPC argument */
-      char **var_lst;
-      var_lst=nco_lst_prs_2D(kvm.key,",",&var_nbr);
-      for(var_idx=0;var_idx<var_nbr;var_idx++){ /* Expand multi-variable specification */
-        ppc_lst[ppc_var_nbr].key=strdup(var_lst[var_idx]);
-        ppc_lst[ppc_var_nbr].val=strdup(kvm.val);
-        ppc_var_nbr++;
-      } /* end for */
-      var_lst=nco_sng_lst_free(var_lst,var_nbr);
-    } /* end if */
-  } /* end for */
+  char *sng_fnl=NULL;
+
+  /* Join arguments together */
+  sng_fnl=nco_join_sng(ppc_arg, ppc_arg_nbr);
+  ppc_lst=nco_arg_mlt_prs(sng_fnl);
+
+  if(sng_fnl) sng_fnl=(char *)nco_free(sng_fnl);
+
+  /* jm fxm use more descriptive name than i---what does i count? */
+  for(int index=0;(ppc_lst+index)->key;index++){
+      ppc_var_nbr=index;
+  } /* end loop over i */
+  ppc_var_nbr++;
+
+  // ppc_lst=(kvm_sct *)nco_malloc(NC_MAX_VARS*sizeof(kvm_sct));
+
+  // /* Parse PPCs */
+  // for(ppc_arg_idx=0;ppc_arg_idx<ppc_arg_nbr;ppc_arg_idx++){
+  //   if(!strstr(ppc_arg[ppc_arg_idx],"=")){
+  //     (void)fprintf(stdout,"%s: Invalid --ppc specification: %s. Must contain \"=\" sign.\n",nco_prg_nm_get(),ppc_arg[ppc_arg_idx]);
+  //     if(ppc_lst) ppc_lst=(kvm_sct *)nco_free(ppc_lst);
+  //     nco_exit(EXIT_FAILURE);
+  //   } /* endif */
+  //   kvm=nco_sng2kvm(ppc_arg[ppc_arg_idx]);
+  //   /* nco_sng2kvm() converts argument "--ppc one,two=3" into kvm.key="one,two" and kvm.val=3
+  //      Then nco_lst_prs_2D() converts kvm.key into two items, "one" and "two", with the same value, 3 */
+  //   if(kvm.key){
+  //     int var_idx; /* [idx] Index over variables in current PPC argument */
+  //     int var_nbr; /* [nbr] Number of variables in current PPC argument */
+  //     char **var_lst;
+  //     var_lst=nco_lst_prs_2D(kvm.key,",",&var_nbr);
+  //     for(var_idx=0;var_idx<var_nbr;var_idx++){ /* Expand multi-variable specification */
+  //       ppc_lst[ppc_var_nbr].key=strdup(var_lst[var_idx]);
+  //       ppc_lst[ppc_var_nbr].val=strdup(kvm.val);
+  //       ppc_var_nbr++;
+  //     } /* end for */
+  //     var_lst=nco_sng_lst_free(var_lst,var_nbr);
+  //   } /* end if */
+  // } /* end for */
 
   /* PPC "default" specified, set all non-coordinate variables to default first */
   for(ppc_var_idx=0;ppc_var_idx<ppc_var_nbr;ppc_var_idx++){
diff --git a/src/nco/nco_ppc.h b/src/nco/nco_ppc.h
index ee3b511..403cd36 100644
--- a/src/nco/nco_ppc.h
+++ b/src/nco/nco_ppc.h
@@ -27,6 +27,7 @@
 /* Personal headers */
 #include "nco.h" /* netCDF Operator (NCO) definitions */
 #include "nco_mmr.h" /* Memory management */
+#include "nco_mta.h" /* Multi-argument parsing */
 #include "nco_sng_utl.h" /* String utilities */
 
 /* Minimum number of explicit significand bits to preserve when zeroing/bit-masking floating point values
diff --git a/src/nco/nco_prn.c b/src/nco/nco_prn.c
index 8f1bb68..3713b2c 100644
--- a/src/nco/nco_prn.c
+++ b/src/nco/nco_prn.c
@@ -9,6 +9,24 @@
 
 #include "nco_prn.h" /* Print variables, attributes, metadata */
 
+int 
+nco_att_nbr        /* [fnc] return number of atts in var or global atts in group */ 
+(const int grp_id, /* I [id] netCDF group ID */
+ const int var_id) /* I [id] netCDF input variable ID */
+{
+  int att_nbr;
+
+  if(var_id == NC_GLOBAL){
+    /* Get number of global attributes in group */
+    (void)nco_inq(grp_id,(int *)NULL,(int *)NULL,&att_nbr,(int *)NULL);
+  }else{
+    /* Get name and number of attributes for variable */
+    (void)nco_inq_var(grp_id,var_id,(char*)NULL,(int*)NULL,(int*)NULL,(int *)NULL,&att_nbr);
+  } /* end else */
+
+  return att_nbr; 
+} /* !nco_att_nbr() */
+
 void 
 nco_prn_att /* [fnc] Print all attributes of single variable or group */
 (const int grp_id, /* I [id] netCDF group ID */
@@ -26,8 +44,9 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
   const char spc_sng[]=""; /* [sng] Space string */
 
   char *nm_cdl;
+  char *nm_jsn;
   char *sng_val_sng=NULL_CEWI; /* [sng] String of NC_CHAR */
-  char *sng_val_sng_cpy; /* [sng] Copy of sng_val_sng to avoid cppcheck error about using sng_val_sng as both parameter and desitnation in sprintf(). NB: free() only one of these two pointers. */
+  char *sng_val_sng_cpy; /* [sng] Copy of sng_val_sng to avoid cppcheck error about using sng_val_sng as both parameter and destination in sprintf(). NB: free() only one of these two pointers. */
   char *spr_sng=NULL; /* [sng] Output separator string */
 
   char cma_sng[]=", "; /* [sng] Comma string */
@@ -69,7 +88,8 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
   nc_type var_typ;
 
   nco_bool flg_glb=False; /* [flg] Printing attributes for root-level group */
-
+  
+  bool jsn_obj=False; /* if true then print att in own object */
   const nco_bool CDL=prn_flg->cdl; /* [flg] CDL output */
   const nco_bool XML=prn_flg->xml; /* [flg] XML output */
   const nco_bool TRD=prn_flg->trd; /* [flg] Traditional output */
@@ -96,6 +116,7 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
     (void)nco_inq_var(grp_id,var_id,src_sng,&var_typ,&dmn_nbr,(int *)NULL,&att_nbr_vsb);
     if(CDL) prn_ndn+=2*prn_flg->var_fst;
     if(XML) prn_ndn+=prn_flg->sxn_fst;
+    if(JSN) prn_ndn+=prn_flg->sxn_fst;
     if(prn_flg->new_fmt && TRD) prn_ndn+=prn_flg->var_fst;
   } /* end else */
 
@@ -296,6 +317,11 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
     } /* !NC_GLOBAL */
   } /* !hdn, NC_FORMAT_NETCDF4, NC_FORMAT_NETCDF4_CLASSIC */
 
+  if(JSN && att_nbr_ttl > 0){
+    (void)fprintf(stdout,"%*s\"attributes\": {\n",prn_ndn,spc_sng);
+    prn_ndn+=prn_flg->sxn_fst;  
+  } /* !JSN */
+ 
   /* Get attributes' names, types, lengths, and values */
   for(idx=0;idx<att_nbr_ttl;idx++){
 
@@ -318,7 +344,21 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
       (void)fprintf(stdout,"%*s%s%s:%s = ",prn_ndn,spc_sng,(att[idx].type == NC_STRING) ? "string " : "",src_sng,nm_cdl); 
       nm_cdl=(char *)nco_free(nm_cdl);
     } /* !cdl */
-    if(JSN) (void)fprintf(stdout,"{\"name\": \"%s\", \"value\": ",att[idx].nm);
+
+    if(JSN){ 
+      nm_jsn=nm2sng_jsn(att[idx].nm);
+
+      jsn_obj=False;         
+      if(prn_flg->jsn_att_fmt == 2 ||
+	 (prn_flg->jsn_att_fmt == 1 && (att[idx].type != NC_FLOAT && att[idx].type != NC_INT && att[idx].type != NC_STRING && att[idx].type != NC_CHAR)))
+        jsn_obj=True;   
+ 
+      if(jsn_obj) (void)fprintf(stdout,"%*s\"%s\": { \"type\": \"%s\", \"data\": ",prn_ndn,spc_sng,nm_jsn,jsn_typ_nm(att[idx].type)); else (void)fprintf(stdout,"%*s\"%s\": ",prn_ndn,spc_sng,nm_jsn); 
+ 
+      /* Multi-element so print array open */ 
+      if(att_sz > 1L && att[idx].type != NC_CHAR) (void)fprintf(stdout,"["); 
+      nm_jsn=(char *)nco_free(nm_jsn);    
+    } /* !JSN */
     if(TRD) (void)fprintf(stdout,"%*s%s attribute %i: %s, size = %li %s, value = ",prn_ndn,spc_sng,src_sng,idx,att[idx].nm,att_sz,nco_typ_sng(att[idx].type));
 
     spr_sng=cma_sng; /* [sng] Output separator string */
@@ -377,8 +417,8 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
     /* Typecast pointer to values before access */
     (void)cast_void_nctype(att[idx].type,&att[idx].val);
 
-    (void)sprintf(att_sng_pln,"%s",(CDL_OR_JSN) ? nco_typ_fmt_sng_att_cdl(att[idx].type) : (XML) ? nco_typ_fmt_sng_att_xml(att[idx].type) : nco_typ_fmt_sng(att[idx].type));
-    (void)sprintf(att_sng_dlm,"%s%%s",(CDL_OR_JSN) ? nco_typ_fmt_sng_att_cdl(att[idx].type) : (XML) ? nco_typ_fmt_sng_att_xml(att[idx].type) : nco_typ_fmt_sng(att[idx].type));
+    (void)sprintf(att_sng_pln,"%s", CDL ? nco_typ_fmt_sng_att_cdl(att[idx].type) : (XML||JSN) ? nco_typ_fmt_sng_att_xml(att[idx].type) : nco_typ_fmt_sng(att[idx].type));
+    (void)sprintf(att_sng_dlm,"%s%%s", CDL ? nco_typ_fmt_sng_att_cdl(att[idx].type) : (XML||JSN) ? nco_typ_fmt_sng_att_xml(att[idx].type) : nco_typ_fmt_sng(att[idx].type));
     switch(att[idx].type){
     case NC_FLOAT:
       for(lmn=0;lmn<att_sz;lmn++){
@@ -426,8 +466,8 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
 	    if(CDL_OR_JSN) (void)fprintf(stdout,"\"");
 	    sng_val_sng[0]='\0';
 	  } /* endif new string */
-	  (void)strcat(sng_val_sng,(CDL_OR_JSN) ? chr2sng_cdl(chr_val,val_sng) : chr2sng_xml(chr_val,val_sng));
-	  if(chr_val == '\n' && lmn != att_szm1 && CDL_OR_JSN) (void)sprintf(sng_val_sng,"%s\",\n%*s\"",sng_val_sng_cpy,prn_ndn+prn_flg->var_fst,spc_sng);
+	  (void)strcat(sng_val_sng,(CDL ? chr2sng_cdl(chr_val,val_sng) : XML ? chr2sng_xml(chr_val,val_sng) : chr2sng_jsn(chr_val,val_sng)));
+	  if(chr_val == '\n' && lmn != att_szm1 && CDL) (void)sprintf(sng_val_sng,"%s\",\n%*s\"",sng_val_sng_cpy,prn_ndn+prn_flg->var_fst,spc_sng);
 	  if(lmn%sng_lng == sng_lngm1){
 	    (void)fprintf(stdout,"%s%s",sng_val_sng,(CDL_OR_JSN) ? "\"" : "");
 	    /* Print separator after non-final string */
@@ -463,15 +503,16 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
 	sng_val=att[idx].val.sngp[lmn];
 	sng_lng=strlen(sng_val);
 	sng_lngm1=sng_lng-1UL;
-	if(CDL_OR_JSN_OR_XML){
+	if(CDL||XML||JSN){
 	  /* Worst case is printable strings are six or four times longer than unformatted, i.e., '\"' == """ or '\\' == "\\\\" */
 	  sng_val_sng=(char *)nco_malloc(6*sng_lng+1UL);
-	  if(CDL) (void)fprintf(stdout,"\"");
+	  if(CDL||JSN) (void)fprintf(stdout,"\"");
 	  sng_val_sng[0]='\0';
 	  for(chr_idx=0;chr_idx<sng_lng;chr_idx++){
 	    val_sng[0]='\0';
 	    chr_val=sng_val[chr_idx];
-	    (void)strcat(sng_val_sng,(CDL) ? chr2sng_cdl(chr_val,val_sng) : chr2sng_xml(chr_val,val_sng));
+	    /* (void)strcat(sng_val_sng,(CDL) ? chr2sng_cdl(chr_val,val_sng) : chr2sng_xml(chr_val,val_sng)); */
+	    (void)strcat(sng_val_sng,(CDL ? chr2sng_cdl(chr_val,val_sng) : XML ? chr2sng_xml(chr_val,val_sng) : chr2sng_jsn(chr_val,val_sng)));
 	  } /* end loop over character */
 	  (void)fprintf(stdout,"%s%s",sng_val_sng,(XML) ? "" : "\"");
 	  /* Print separator after non-final string */
@@ -486,13 +527,24 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
       break;
     } /* end switch */
     if(CDL) (void)fprintf(stdout," ;\n");
-    if(JSN) (void)fprintf(stdout,"}%s",(idx < att_nbr_ttl-1) ? ", " : "");
     if(TRD) (void)fprintf(stdout,"\n");
     if(XML) (void)fprintf(stdout,"\" />\n");
+    if(JSN){ 
+      /* Close list for multi-element attributes */ 
+      if(att_sz > 1L && att[idx].type != NC_CHAR) (void)fprintf(stdout,"]");          
+      /* Close JSON object tag */  
+      if(jsn_obj) (void)fprintf(stdout,"%s",(idx < att_nbr_ttl-1) ? "},\n" : "}"); else (void)fprintf(stdout,"%s",(idx < att_nbr_ttl-1) ? ",\n" : "");
+    } /* !JSN */
+
     rcd_prn+=0; /* CEWI */
-    
   } /* end loop over attributes */
 
+  /* Omit comma and carriage-return for final attribute */
+  if(JSN && att_nbr_ttl>0){
+    prn_ndn-=prn_flg->sxn_fst;  
+    (void)fprintf(stdout,"\n%*s}",prn_ndn,spc_sng);
+  } /* !JSN */
+
   /* Print extra line after global attributes */
   if(CDL && flg_glb) (void)fprintf(stdout,"\n");
   if(!prn_flg->new_fmt && CDL_OR_TRD) (void)fprintf(stdout,"\n");
@@ -539,7 +591,7 @@ nco_typ_fmt_sng_var_cdl /* [fnc] Provide sprintf() format string for specified t
 (const nc_type typ) /* I [enm] netCDF type to provide CDL format string for */
 {
   /* Purpose: Provide sprintf() format string for specified type variable
-     Unidata formats shown in ncdump.c near ling 459
+     Unidata formats shown in netcdf-c/ncdump/ncdump.c pr_att_valgs() near line 593
      Float formats called float_att_fmt, double_att_fmt are in dumplib.c,
      and are user-configurable with -p float_digits,double_digits.
      These default to 7 and 15, respectively. */
@@ -595,7 +647,7 @@ nco_typ_fmt_sng_att_cdl /* [fnc] Provide sprintf() format string for specified a
 (const nc_type typ) /* I [enm] netCDF attribute type to provide CDL format string for */
 {
   /* Purpose: Provide sprintf() format string for specified type attribute in CDL
-     Unidata formats shown in ncdump.c near line 459
+     Unidata formats shown in netcdf-c/ncdump/ncdump.c pr_att_valgs() near line 593
      Float formats called float_att_fmt, double_att_fmt are in dumplib.c,
      and are user-configurable with -p float_digits,double_digits.
      These default to 7 and 15, respectively. */
@@ -609,9 +661,9 @@ nco_typ_fmt_sng_att_cdl /* [fnc] Provide sprintf() format string for specified a
 
   static const char fmt_NC_UBYTE[]="%hhuub"; /*  */
   static const char fmt_NC_USHORT[]="%huus"; /*  */
-  static const char fmt_NC_UINT[]="%uu"; /*  */
-  static const char fmt_NC_INT64[]="%llil"; /*  */
-  static const char fmt_NC_UINT64[]="%lluul"; /*  */
+  static const char fmt_NC_UINT[]="%uul"; /*  */
+  static const char fmt_NC_INT64[]="%llill"; /*  */
+  static const char fmt_NC_UINT64[]="%lluull"; /*  */
   static const char fmt_NC_STRING[]="\"%s\""; /*  */
 
   switch (typ){
@@ -651,7 +703,7 @@ nco_typ_fmt_sng_att_xml /* [fnc] Provide sprintf() format string for specified a
 (const nc_type typ) /* I [enm] netCDF attribute type to provide XML format string for */
 {
   /* Purpose: Provide sprintf() format string for specified type attribute
-     Unidata formats shown in ncdump.c near line 459
+     Unidata formats shown in netcdf-c/ncdump/ncdump.c pr_att_valgs() near line 593
      Float formats called float_att_fmt, double_att_fmt are in dumplib.c,
      and are user-configurable with -p float_digits,double_digits.
      These default to 7 and 15, respectively
@@ -1203,6 +1255,7 @@ nco_prn_var_dfn                     /* [fnc] Print variable metadata */
 
   char *dmn_sng=NULL;
   char *nm_cdl;
+  char *nm_jsn;
 
   char sng_foo[NC_MAX_NAME+10]; /* Add 10 for extra formatting characters */
   char sz_sng[100];
@@ -1274,13 +1327,16 @@ nco_prn_var_dfn                     /* [fnc] Print variable metadata */
   } /* end loop over dimensions */
 
   /* Print header for variable */
-  if(prn_flg->new_fmt && !prn_flg->xml) prn_ndn=prn_flg->sxn_fst+prn_flg->var_fst+var_trv->grp_dpt*prn_flg->spc_per_lvl;
+  if(prn_flg->new_fmt && !prn_flg->xml && !prn_flg->jsn) prn_ndn=prn_flg->sxn_fst+prn_flg->var_fst+var_trv->grp_dpt*prn_flg->spc_per_lvl;
   if(prn_flg->xml) prn_ndn=prn_flg->sxn_fst+var_trv->grp_dpt*prn_flg->spc_per_lvl;
+  if(prn_flg->jsn) prn_ndn=prn_flg->ndn;
+
   if(prn_flg->trd){
     if(nco_fmt_xtn_get() != nco_fmt_xtn_hdf4 || NC_LIB_VERSION >= 433) (void)fprintf(stdout,"%*s%s: type %s, %i dimension%s, %i attribute%s, compressed? %s, chunked? %s, packed? %s\n",prn_ndn,spc_sng,var_trv->nm,nco_typ_sng(var_typ),nbr_dim,(nbr_dim == 1) ? "" : "s",nbr_att,(nbr_att == 1) ? "" : "s",(deflate) ? "yes" : "no",(srg_typ == NC_CHUNKED) ? "yes" : "no",(packing) ? "yes" : "no"); else (void)fprintf(stdout,"%*s%s: type %s, %i dimension%s, %i attribute%s, compressed? HDF4_UNKNOWN, [...]
     if(nco_dbg_lvl_get() >= nco_dbg_var) (void)fprintf(stdout,"%*s%s id = %d\n",prn_ndn,spc_sng,var_trv->nm,var_id);
   } /* !trd */
   if(prn_flg->xml) (void)fprintf(stdout,"%*s<variable name=\"%s\" type=\"%s\"",prn_ndn,spc_sng,var_trv->nm,xml_typ_nm(var_typ));
+  if(prn_flg->jsn) (void)fprintf(stdout,"%*s\"%s\": {\n",prn_ndn,spc_sng,var_trv->nm);
 
   /* Print type, shape, and total size of variable */
   /* Use nbr_dmn+1 in malloc() to handle case when nbr_dim == 0 and allow for formatting characters */
@@ -1290,10 +1346,20 @@ nco_prn_var_dfn                     /* [fnc] Print variable metadata */
     if(prn_flg->trd) (void)fprintf(stdout,"%*s%s size (RAM) = %ld*sizeof(%s) = %ld*%lu = %lu bytes\n",prn_ndn,spc_sng,var_trv->nm,var_sz,nco_typ_sng(var_typ),var_sz,(unsigned long)nco_typ_lng(var_typ),(unsigned long)(var_sz*nco_typ_lng(var_typ)));
     /* 20131122: Implement ugly NcML requirement that scalars have shape="" attribute */
     if(prn_flg->xml) (void)sprintf(dmn_sng," shape=\"\"");
+
+    /* if scalar var then print NOTHING  
+    if(prn_flg->jsn) (void)sprintf(dmn_sng,"%*s\"dims\": [],", prn_ndn+prn_flg->sxn_fst,spc_sng); 
+    */
   }else{
     for(dmn_idx=0;dmn_idx<nbr_dim;dmn_idx++){
       if(prn_flg->xml){
 	(void)sprintf(sng_foo,"%s%s%s",(dmn_idx == 0) ? " shape=\"" : "",var_trv->var_dmn[dmn_idx].dmn_nm,(dmn_idx < nbr_dim-1) ? " " : "\""); 
+      }else if(prn_flg->jsn){
+        /* indent content */ 
+        nm_jsn=nm2sng_jsn(var_trv->var_dmn[dmn_idx].dmn_nm);
+        if(dmn_idx==0) (void)sprintf(dmn_sng,"%*s\"dims\": [", prn_ndn+prn_flg->sxn_fst,spc_sng); 
+	(void)sprintf(sng_foo,"\"%s\"%s",nm_jsn,(dmn_idx < nbr_dim-1) ? "," : "],"); 
+	nm_jsn=(char *)nco_free(nm_jsn);
       }else{
 	nm_cdl=nm2sng_cdl(var_trv->var_dmn[dmn_idx].dmn_nm);
 	(void)sprintf(sng_foo,"%s%s%s",(dmn_idx == 0) ? "(" : "",nm_cdl,(dmn_idx < nbr_dim-1) ? "," : ")");
@@ -1328,6 +1394,15 @@ nco_prn_var_dfn                     /* [fnc] Print variable metadata */
   if(prn_flg->xml){
     if(prn_flg->PRN_VAR_DATA || prn_flg->PRN_VAR_METADATA) (void)fprintf(stdout,"%s>\n",dmn_sng); else (void)fprintf(stdout,"%s />\n",dmn_sng);
   } /* !xml */
+
+  /* add a comma as next in queue is the atts - nb DONT LIKE THIS */
+  if(prn_flg->jsn){
+    if(nbr_dim > 0)
+       (void)fprintf(stdout,"%s\n",dmn_sng); 
+    /* print netCDF type - use same names as XML */ 
+    (void)fprintf(stdout,"%*s\"type\": \"%s\"",prn_ndn+prn_flg->sxn_fst,spc_sng,jsn_typ_nm(var_typ));
+  } /* !xml */
+
   if(dmn_sng) dmn_sng=(char *)nco_free(dmn_sng);
 
   /* Print dimension sizes and names */
@@ -1460,7 +1535,7 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
   var_sct var; /* [sct] Variable structure */
   var_sct var_crd; /* [sct] Variable structure for associated coordinate variable */
 
-  if(prn_flg->new_fmt && CDL_OR_TRD) prn_ndn=prn_flg->ndn+prn_flg->var_fst;
+  if(prn_flg->new_fmt && (CDL||TRD||JSN)) prn_ndn=prn_flg->ndn+prn_flg->var_fst;
   if(XML) prn_ndn=prn_flg->ndn;
 
   /* Obtain group ID where variable is located */
@@ -1579,13 +1654,25 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
     nco_bool is_compound; /* [flg] Variable is compound (has non-leading record dimension) */
     nco_bool cpd_rec_dmn[NC_MAX_DIMS]; /* [flg] Dimension is compound */
     char * (*chr2sng_sf)(const char chr_val, /* I [chr] Character to process */
-			  char * const val_sng); /* I/O [sng] String to stuff printable result into */
-    if(CDL) chr2sng_sf=chr2sng_cdl; else chr2sng_sf=chr2sng_xml;
-    if(CDL_OR_JSN) (void)sprintf(fmt_sng,"%s",nco_typ_fmt_sng_var_cdl(var.type));
-    if(XML) (void)sprintf(fmt_sng,"%s",nco_typ_fmt_sng_att_xml(var.type));
-    if(JSN) (void)fprintf(stdout,"\"data\": [");
+    char * const val_sng); /* I/O [sng] String to stuff printable result into */
+
+    if(CDL){     
+      chr2sng_sf=chr2sng_cdl;
+      (void)sprintf(fmt_sng,"%s",nco_typ_fmt_sng_var_cdl(var.type)); 
+    } /* !CDL */
+    if(XML){     
+      chr2sng_sf=chr2sng_xml;
+      (void)sprintf(fmt_sng,"%s",nco_typ_fmt_sng_att_xml(var.type));   
+    } /* !XML */
+    if(JSN){
+      chr2sng_sf=chr2sng_jsn;
+      (void)sprintf(fmt_sng,"%s",nco_typ_fmt_sng_att_xml(var.type));   
+      /* If var is size=1 (scalar?) then no array brackets */   
+      if(var.sz == 1) (void)fprintf(stdout,"%*s\"data\": ",prn_ndn,spc_sng); else (void)fprintf(stdout,"%*s\"data\": [",prn_ndn,spc_sng);   
+    } /* !JSN */
 
     nm_cdl=nm2sng_cdl(var_nm);
+
     if(XML){
       /* User may override default separator string for XML only */
       if(var.type == NC_STRING || var.type == NC_CHAR) spr_sng= (prn_flg->spr_chr) ? prn_flg->spr_chr : spr_xml_chr; else spr_sng= (prn_flg->spr_nmr) ? prn_flg->spr_nmr : spr_xml_nmr;
@@ -1675,9 +1762,9 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
         case NC_CHAR: 
           chr_val=var.val.cp[lmn];
           if(var.nbr_dim == 0){
-            if(CDL_OR_TRD) (void)fprintf(stdout,"\"");
+            if(CDL||TRD||JSN) (void)fprintf(stdout,"\"");
             if(chr_val != '\0') (void)fprintf(stdout,"%s",(*chr2sng_sf)(chr_val,val_sng));
-            if(CDL_OR_TRD) (void)fprintf(stdout,"\"");
+            if(CDL||TRD||JSN) (void)fprintf(stdout,"\"");
             val_sng[0]='\0';
           }else{ /* var.nbr_dim > 0 */
             /* Multi-dimensional string arrays of NC_CHAR */
@@ -1690,13 +1777,13 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
             } /* endif first element of string array */
             /* New string begins each element where penultimate dimension changes */
             if(lmn%sng_lng == 0L){
-              if(CDL) (void)fprintf(stdout,"\"");
+              if(CDL||JSN) (void)fprintf(stdout,"\"");
               sng_val_sng[0]='\0';
             } /* endif new string */
             if(chr_val != '\0') (void)fprintf(stdout,"%s",(*chr2sng_sf)(chr_val,val_sng));
             if(chr_val == '\n' && lmn != var_szm1) (void)sprintf(sng_val_sng,"%s\",\n%*s\"",sng_val_sng_cpy,prn_ndn+prn_flg->var_fst,spc_sng);
             if(lmn%sng_lng == sng_lngm1){
-              (void)fprintf(stdout,"%s%s",sng_val_sng,(CDL) ? "\"" : "");
+              (void)fprintf(stdout,"%s%s",sng_val_sng,(CDL||JSN) ? "\"" : "");
               /* Print separator after non-final string */
               if(lmn != var_szm1) (void)fprintf(stdout,"%s",spr_sng);
             } /* endif string end */
@@ -1715,7 +1802,7 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
           sng_lngm1=sng_lng-1UL;
           /* Worst case is printable strings are six or four times longer than unformatted, i.e., '\"' == """ or '\\' == "\\\\" */
           sng_val_sng=(char *)nco_malloc(6*sng_lng+1UL);
-          if(CDL) (void)fprintf(stdout,"\"");
+          if(CDL||JSN) (void)fprintf(stdout,"\"");
           sng_val_sng[0]='\0';
           for(chr_idx=0;chr_idx<sng_lng;chr_idx++){
             val_sng[0]='\0';
@@ -1735,7 +1822,8 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
     rcd_prn+=0; /* CEWI */
     if(CDL) (void)fprintf(stdout," ;\n");
     if(XML) (void)fprintf(stdout,"</values>\n");
-    if(JSN) (void)fprintf(stdout,"], ");
+    /* close out array bracket if sz>1 */ 
+    if(JSN && var.sz > 1 ) (void)fprintf(stdout,"]");
 
   } /* end if CDL_OR_JSN_OR_XML */
 
@@ -2173,8 +2261,8 @@ nco_grp_prn /* [fnc] Recursively print group contents */
 {
   /* Purpose: Recursively print group contents
      Assumptions: 
-     1. Input group name is a valid group to be extracted (set in nco_xtr_dfn()). 
-        Hence no need to check for group type, or if group is extracted.
+     1. Input is a valid group name on extraction list (set in nco_xtr_dfn())
+        Hence no need to check for group type, or if group is extracted
      2. Input ID is netCDF file ID, not extracted group ID */
 
   /* Testing: 
@@ -2188,6 +2276,7 @@ nco_grp_prn /* [fnc] Recursively print group contents */
   char var_nm[NC_MAX_NAME+1L];      /* [sng] Variable name */ 
 
   char *nm_cdl;
+  char *nm_jsn;
   char *var_nm_fll;                /* [sng] Full path for variable */
 
   int *grp_ids;                    /* [ID] Sub-group IDs array */  
@@ -2204,7 +2293,8 @@ nco_grp_prn /* [fnc] Recursively print group contents */
   int var_id;                      /* [id] Variable ID */
   int var_idx;                     /* [idx] Variable index */
   int var_nbr_xtr;                 /* [nbr] Number of extracted variables */
-
+  
+  nco_bool JSN_BLOCK=False;         /* turns true is we have output a jsnblock -need so we add commas where needed */ 
   const nco_bool CDL=prn_flg->cdl; /* [flg] CDL output */
   const nco_bool XML=prn_flg->xml; /* [flg] XML output */
   const nco_bool TRD=prn_flg->trd; /* [flg] Traditional output */
@@ -2214,6 +2304,7 @@ nco_grp_prn /* [fnc] Recursively print group contents */
   const nco_bool CDL_OR_TRD=prn_flg->cdl || prn_flg->trd; /* [flg] CDL or Traditional output */
   const nco_bool CDL_OR_JSN_OR_TRD=prn_flg->cdl || prn_flg->jsn || prn_flg->trd; /* [flg] CDL or JSON or Traditional output */
   const nco_bool CDL_OR_TRD_OR_XML=prn_flg->cdl || prn_flg->trd || prn_flg->xml; /* [flg] CDL or Traditional or XML output */
+  
 
   nm_id_sct *dmn_lst; /* [sct] Dimension list */
   nm_id_sct *var_lst; /* [sct] Variable list */
@@ -2284,12 +2375,19 @@ nco_grp_prn /* [fnc] Recursively print group contents */
     if(prn_flg->fll_pth) (void)fprintf(stdout," // fullname: %s\n",nco_gpe_evl(prn_flg->gpe,grp_nm_fll)); else (void)fprintf(stdout,"\n");
     if(grp_dpt == 0 && prn_flg->nfo_xtr && prn_flg->PRN_GLB_METADATA) (void)fprintf(stdout,"%*s// %s\n",prn_flg->sxn_fst,spc_sng,prn_flg->smr_sng);
     if(grp_dpt == 0 && prn_flg->nfo_xtr) (void)fprintf(stdout,"%*s// ncgen -k netCDF-4 -b -o %s.nc %s.cdl\n",prn_flg->sxn_fst,spc_sng,prn_flg->fl_stb,prn_flg->fl_stb);
-  } /* !XML */
+  } else if(JSN){
 
+    nm_jsn=nm2sng_jsn(nco_gpe_evl_stb(prn_flg->gpe,trv_tbl->lst[obj_idx].nm_fll));
+    /* JSN print main opening brace */
+    if(grp_dpt==0) (void)fprintf(stdout,"{\n"); else (void)fprintf(stdout,"%*s\"%s\": {\n",prn_flg->sxn_fst+grp_dpt*prn_flg->spc_per_lvl,spc_sng,nm_jsn);
+    nm_jsn=(char *)nco_free(nm_jsn);  
+  }
+  
   /* Print dimension information for group */
   prn_ndn=prn_flg->ndn=prn_flg->sxn_fst+grp_dpt*prn_flg->spc_per_lvl;
-  if(dmn_nbr > 0 && CDL_OR_TRD) (void)fprintf(stdout,"%*sdimensions:\n",prn_flg->ndn,spc_sng);
-  if(CDL) prn_ndn+=prn_flg->var_fst;
+  if(dmn_nbr > 0 && CDL_OR_TRD) (void)fprintf(stdout,"%*sdimensions:\n",prn_flg->ndn,spc_sng); 
+  if(dmn_nbr > 0 && JSN) (void)fprintf(stdout,"%*s\"dimensions\": {\n",prn_flg->ndn,spc_sng);
+  if(CDL||JSN) prn_ndn+=prn_flg->var_fst;
   for(dmn_idx=0;dmn_idx<dmn_nbr;dmn_idx++){
     if(XML){
       (void)fprintf(stdout,"%*s<dimension name=\"%s\" length=\"%lu\" %s/>\n",prn_ndn,spc_sng,dmn_lst[dmn_idx].nm,(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt,trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].is_rec_dmn ? "isUnlimited=\"true\" " : "");
@@ -2298,6 +2396,19 @@ nco_grp_prn /* [fnc] Recursively print group contents */
       if(trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].is_rec_dmn) (void)fprintf(stdout,"%*s%s = UNLIMITED%s// (%lu currently)\n",prn_ndn,spc_sng,nm_cdl,(CDL) ? " ; " : " ",(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt); else (void)fprintf(stdout,"%*s%s = %lu%s\n",prn_ndn,spc_sng,nm_cdl,(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt,(CDL) ? " ;" : "");
       nm_cdl=(char *)nco_free(nm_cdl);
     } /* !XML */
+    if(JSN){ 
+      nm_jsn=nm2sng_jsn(dmn_lst[dmn_idx].nm);
+      (void)fprintf(stdout,"%*s\"%s\": %lu",prn_ndn,spc_sng,nm_jsn,(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt);   
+      /* Add comma and carriage-return unless last element */
+      if(dmn_idx<dmn_nbr-1) (void)printf(",\n");
+      else{  
+        prn_ndn-=prn_flg->var_fst;
+	(void)printf("\n%*s}",prn_ndn,spc_sng);         
+      } /* !dmn_idx */
+       
+      nm_jsn=(char *)nco_free(nm_jsn);   
+      JSN_BLOCK=True;    
+    } /* !JSN */
   } /* end loop over dimension */
 
   /* Dimension list no longer needed */
@@ -2308,6 +2419,7 @@ nco_grp_prn /* [fnc] Recursively print group contents */
   /* Create array to hold names and indices of extracted variables in this group */
   var_lst=(nm_id_sct *)nco_malloc(nbr_var*(sizeof(nm_id_sct)));
 
+      
   for(var_idx=0;var_idx<nbr_var;var_idx++){
     /* Get variable name */
     rcd+=nco_inq_varname(grp_id,var_idx,var_nm);
@@ -2349,41 +2461,134 @@ nco_grp_prn /* [fnc] Recursively print group contents */
 
   /* Sort variables alphabetically */
   if(var_nbr_xtr > 1) var_lst=nco_lst_srt_nm_id(var_lst,var_nbr_xtr,prn_flg->ALPHA_BY_STUB_GROUP);
+    
 
-  if(JSN) (void)fprintf(stdout,"{\n");
+  // if(JSN) (void)fprintf(stdout,"{\n");
 
   /* Print variable information for group */
   if(var_nbr_xtr > 0 && CDL_OR_TRD) (void)fprintf(stdout,"\n%*svariables:\n",prn_flg->ndn,spc_sng);
+
   for(var_idx=0;var_idx<var_nbr_xtr;var_idx++){
     trv_sct var_trv=trv_tbl->lst[var_lst[var_idx].id];
+    /* Obtain variable ID */
+    (void)nco_inq_varid(grp_id,var_trv.nm,&var_id);
 
     /* Print variable full name */
     if(var_trv.grp_dpt > 0 && prn_flg->fll_pth && TRD) (void)fprintf(stdout,"%*s%s\n",prn_flg->ndn,spc_sng,var_trv.nm_fll);
 
-    /* Print variable metadata */ 
-    if(prn_flg->PRN_VAR_METADATA || CDL_OR_XML) (void)nco_prn_var_dfn(nc_id,prn_flg,&var_trv);
+    /* NB: CDL and TRD place data in seperate tag, while XML and JSN place data in same tag as metadata */  
+   
+    /* Following IFs are mutually exclusive */
+    if(CDL||TRD){
+      if(CDL || (TRD && prn_flg->PRN_VAR_METADATA)) (void)nco_prn_var_dfn(nc_id,prn_flg,&var_trv);
+
+      /* nco_prn_att() prints final brace but no return, as we may need to add a comma */ 
+      if(prn_flg->PRN_VAR_METADATA) (void)nco_prn_att(grp_id,prn_flg,var_id);
+           
+      if((CDL||TRD) && var_idx != var_nbr_xtr-1) (void)fprintf(stdout,"\n"); 
+    } /* !CDL_OR_TRD */
+
+    /* All options can toggle printing of data-  only JSN and XML place data "inside" var markup */ 
+    if(XML)
+    {
+      (void)nco_prn_var_dfn(nc_id,prn_flg,&var_trv); 
+      
+      if( prn_flg->PRN_VAR_METADATA )  
+        (void)nco_prn_att(grp_id,prn_flg,var_id);
+   
+
+      if( prn_flg->PRN_VAR_DATA) 
+        (void)nco_prn_var_val_trv(nc_id,prn_flg,&trv_tbl->lst[var_lst[var_idx].id],trv_tbl);
+      /* XML close variable tag */
+      (void)fprintf(stdout,"%*s</variable>\n",prn_ndn,spc_sng);
+    }  
+
+
+    if(JSN)  
+    { 
+      /* deal with first iteration */   
+      if(var_idx==0) 
+      { 
+        if(JSN_BLOCK) 
+           (void)fprintf(stdout,",\n"); 
+        else
+	  JSN_BLOCK=True;              
+         
+        (void)fprintf(stdout,"%*s\"variables\": {\n",prn_flg->ndn,spc_sng  );   
+      } 
+        
+      /* DOES NOT include a return as we may wanna add a COMMA */
+      (void)nco_prn_var_dfn(nc_id,prn_flg,&var_trv);
+      prn_flg->ndn+=prn_flg->sxn_fst;  
+
+      /* nco_prn_att() prints the final brace but no return - as we may need to add a comma */ 
+      if( prn_flg->PRN_VAR_METADATA  && nco_att_nbr(grp_id,var_id)>0)
+      {     
+        (void)fprintf(stdout,",\n");            
+        (void)nco_prn_att(grp_id,prn_flg,var_id);
+      } 
+        
+      if( prn_flg->PRN_VAR_DATA)
+      {  
+        (void)fprintf(stdout,",\n");  
+        (void)nco_prn_var_val_trv(nc_id,prn_flg,&trv_tbl->lst[var_lst[var_idx].id],trv_tbl);      
+      }
+      else 
+      {
+        (void)fprintf(stdout,"\n");        
+      }
+      /* close json object tag -but dont add return as we may need to add comma later*/
+      (void)fprintf(stdout,"%*s}%s",prn_flg->ndn,spc_sng, (var_idx<var_nbr_xtr-1 ?",\n":"\n")  );   
+      /* special indents for jsn */
+      prn_flg->ndn-=prn_flg->sxn_fst;  
+    }
+   
 
-    /* Obtain variable ID */
-    (void)nco_inq_varid(grp_id,var_trv.nm,&var_id);
+    
+   } /* end loop over var_idx */
 
-    /* Print variable attributes */
-    if(JSN && prn_flg->PRN_VAR_METADATA) (void)fprintf(stdout,"\"attributes\": [");
-    if(CDL_OR_TRD_OR_XML || (JSN && prn_flg->PRN_VAR_METADATA)) (void)nco_prn_att(grp_id,prn_flg,var_id);
-    if(JSN && prn_flg->PRN_VAR_METADATA) (void)fprintf(stdout,"], \n");
+  /* close out json variable tag */
+  if(JSN && var_nbr_xtr>0) 
+    (void)fprintf(stdout,"%*s}",prn_flg->ndn,spc_sng );   
 
-    if(XML && prn_flg->PRN_VAR_DATA) (void)nco_prn_var_val_trv(nc_id,prn_flg,&trv_tbl->lst[var_lst[var_idx].id],trv_tbl);
-    if(XML && (prn_flg->PRN_VAR_DATA || prn_flg->PRN_VAR_METADATA)) (void)fprintf(stdout,"%*s</variable>\n",prn_ndn,spc_sng);
 
-    if(var_idx != var_nbr_xtr-1 && CDL_OR_TRD) (void)fprintf(stdout,"\n");
-  } /* end loop over var_idx */
 
-  /* Print attribute information for group */
+  /* Print attribute information for group 
   if((nbr_att > 0 || (prn_flg->hdn && grp_dpt == 0)) && prn_flg->PRN_GLB_METADATA && CDL_OR_TRD) (void)fprintf(stdout,"\n%*s%s%sattributes:\n",prn_flg->ndn,spc_sng,(CDL) ? "// " : "",(grp_dpt == 0) ? "global " : "group ");
-  if((nbr_att > 0 || (prn_flg->hdn && grp_dpt == 0)) && prn_flg->PRN_GLB_METADATA) nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
-
-  /* Print data for group */
-  if(CDL_OR_JSN_OR_TRD && var_nbr_xtr > 0 && prn_flg->PRN_VAR_DATA){
-    if(CDL_OR_TRD) (void)fprintf(stdout,"\n%*sdata:\n",prn_flg->ndn,spc_sng);
+  if((nbr_att > 0 || (prn_flg->hdn && grp_dpt == 0)) && prn_flg->PRN_GLB_METADATA){ 
+     (void)fprintf(stdout,",\n");          
+     nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
+  }else{
+     (void)fprintf(stdout,"\n");           
+     } */
+
+  if((nbr_att > 0 || (prn_flg->hdn && grp_dpt == 0)) && prn_flg->PRN_GLB_METADATA)
+  {
+    if(CDL||TRD)
+    { 
+      (void)fprintf(stdout,"\n%*s%s%sattributes:\n",prn_flg->ndn,spc_sng,(CDL) ? "// " : "",(grp_dpt == 0) ? "global " : "group ");
+      nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
+    }
+    if(XML)
+    {
+      nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
+    }   
+    if(JSN && nco_att_nbr(grp_id,NC_GLOBAL)>0 )
+    {
+      if(JSN_BLOCK) 
+        (void)fprintf(stdout,",\n"); 
+      else
+	JSN_BLOCK=True;              
+
+      nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
+
+    }
+
+  }  
+
+  /* Print data for group only CDL and TRD have a separate data block*/
+  if( (CDL||TRD) && var_nbr_xtr > 0 && prn_flg->PRN_VAR_DATA){
+    (void)fprintf(stdout,"\n%*sdata:\n",prn_flg->ndn,spc_sng);
     for(var_idx=0;var_idx<var_nbr_xtr;var_idx++) (void)nco_prn_var_val_trv(nc_id,prn_flg,&trv_tbl->lst[var_lst[var_idx].id],trv_tbl);
   } /* end if */
 
@@ -2394,56 +2599,960 @@ nco_grp_prn /* [fnc] Recursively print group contents */
   grp_ids=(int *)nco_malloc(nbr_grp*sizeof(int)); 
   rcd+=nco_inq_grps(grp_id,(int *)NULL,grp_ids);
 
-  if(JSN && prn_flg->PRN_GLB_METADATA) (void)fprintf(stdout,"\"nodes\": [");
+  //if(JSN && prn_flg->PRN_GLB_METADATA) (void)fprintf(stdout,"\"nodes\": [");
 
-  /* Call recursively for all extracted subgroups */
-  for(grp_idx=0;grp_idx<nbr_grp;grp_idx++){
-    char *sub_grp_nm_fll=NULL; /* [sng] Sub group path */
-    int gid=grp_ids[grp_idx]; /* [id] Current group ID */  
 
-    /* Get sub-group name */
-    rcd+=nco_inq_grpname(gid,grp_nm);
 
-    if(JSN) (void)fprintf(stdout,"{\"name\": \"%s\"}%s",grp_nm,(grp_idx == nbr_grp-1) ? "" : ", ");
+  /* recursive block for evrything else */
+  if(!JSN)
+  {
+    /* Call recursively for all extracted subgroups */
+    for(grp_idx=0;grp_idx<nbr_grp;grp_idx++){
+      char *sub_grp_nm_fll=NULL; /* [sng] Sub group path */
+      int gid=grp_ids[grp_idx]; /* [id] Current group ID */  
 
-    /* Allocate path buffer including space for trailing NUL */ 
-    sub_grp_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(grp_nm)+2L);
+      /* Get sub-group name */
+      rcd+=nco_inq_grpname(gid,grp_nm);
 
-    /* Initialize path with current absolute group path */
-    strcpy(sub_grp_nm_fll,grp_nm_fll);
+      /* Allocate path buffer including space for trailing NUL */ 
+      sub_grp_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(grp_nm)+2L);
 
-    /* If not root group, concatenate separator */
-    if(strcmp(grp_nm_fll,sls_sng)) strcat(sub_grp_nm_fll,sls_sng);
+      /* Initialize path with current absolute group path */
+      strcpy(sub_grp_nm_fll,grp_nm_fll);
 
-    /* Concatenate current group to absolute group path */
-    strcat(sub_grp_nm_fll,grp_nm); 
+      /* If not root group, concatenate separator */
+      if(strcmp(grp_nm_fll,sls_sng)) strcat(sub_grp_nm_fll,sls_sng);
 
-    /* Find sub-group in traversal table */
-    for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
-      if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
-	if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,sub_grp_nm_fll))
-	  break;
+      /* Concatenate current group to absolute group path */
+      strcat(sub_grp_nm_fll,grp_nm); 
+
+      /* Find sub-group in traversal table */
+      for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+	if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+	  if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,sub_grp_nm_fll))
+	    break;
     
-    /* Is sub-group to be extracted? If so, recurse */
-    if(!JSN && trv_tbl->lst[obj_idx].flg_xtr) rcd+=nco_grp_prn(nc_id,sub_grp_nm_fll,prn_flg,trv_tbl);
+      /* Is sub-group to be extracted? If so, recurse */
+      if(trv_tbl->lst[obj_idx].flg_xtr) rcd+=nco_grp_prn(nc_id,sub_grp_nm_fll,prn_flg,trv_tbl);
+
+      /* Free constructed name */
+      sub_grp_nm_fll=(char *)nco_free(sub_grp_nm_fll);
+    } /* end loop over grp_idx */
+
+
+  }
+  /* recurse block for JSN  */
+  else
+  {
+    int nbr_grp_xtr=0;   
+    if( nbr_grp > 0) 
+    {  
+       if(JSN_BLOCK) (void)fprintf(stdout,",\n"); 
+       (void)fprintf(stdout,"%*s\"groups\": {\n",prn_ndn,spc_sng);       
+       JSN_BLOCK=True; 
+    }
+      
 
-    /* Free constructed name */
-    sub_grp_nm_fll=(char *)nco_free(sub_grp_nm_fll);
-  } /* end loop over grp_idx */
+    /* Call recursively for all extracted subgroups */
+    for(grp_idx=0;grp_idx<nbr_grp;grp_idx++){
+      char *sub_grp_nm_fll=NULL; /* [sng] Sub group path */
+      int gid=grp_ids[grp_idx]; /* [id] Current group ID */  
+
+      /* Get sub-group name */
+      rcd+=nco_inq_grpname(gid,grp_nm);
+
+      /* if(grp_idx>0) */
+      /* 	  (void)fprintf(stdout,"\n");  */
+      /* else */
+      /* 	(void)fprintf(stdout,"%*s\"%s\":{\n",prn_ndn,spc_sng,grp_nm); */
+      
 
-  if(JSN && prn_flg->PRN_GLB_METADATA) (void)fprintf(stdout,"], \n"); /* End node-list */
-  if(JSN) (void)fprintf(stdout,"\"w10n\": [{\"name\": \"spec\", \"value\": \"draft-20091228\"}, {\"name\": \"application\", \"value\": \"%s\"}, {\"name\": \"type\", \"value\": \"%s\"}, {\"name\": \"path\", \"value\": \"%s\"}, {\"name\": \"identifier\", \"value\": \"/\"}]}, \n",nco_prg_nm_get(),jsn_fmt_xtn_nm(nco_fmt_xtn_get()),prn_flg->fl_in);
-  if(JSN && prn_flg->PRN_GLB_METADATA) (void)fprintf(stdout,"\"name\": \"%s\"\n",(grp_dpt == 0) ? "" : trv_tbl->lst[obj_idx_crr].nm);
+      /* Allocate path buffer including space for trailing NUL */ 
+      sub_grp_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(grp_nm)+2L);
 
+      /* Initialize path with current absolute group path */
+      strcpy(sub_grp_nm_fll,grp_nm_fll);
+
+      /* If not root group, concatenate separator */
+      if(strcmp(grp_nm_fll,sls_sng)) strcat(sub_grp_nm_fll,sls_sng);
+
+      /* Concatenate current group to absolute group path */
+      strcat(sub_grp_nm_fll,grp_nm); 
+
+      /* Find sub-group in traversal table */
+      for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+	if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+	  if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,sub_grp_nm_fll))
+	    break;
+    
+      /* Is sub-group to be extracted? If so, recurse */
+      if(trv_tbl->lst[obj_idx].flg_xtr)
+      { 
+        if(nbr_grp_xtr++ > 0) 
+            (void)fprintf(stdout,",\n"); 
+
+        rcd+=nco_grp_prn(nc_id,sub_grp_nm_fll,prn_flg,trv_tbl);
+    
+      } 
+
+      /* Free constructed name */
+      sub_grp_nm_fll=(char *)nco_free(sub_grp_nm_fll);
+    } /* end loop over grp_idx */
+
+  }
+
+  /* if JSN then print closing tag to group */
+  if(JSN && nbr_grp>0 ){
+    (void)fprintf(stdout,"\n%*s}",prn_ndn,spc_sng);
+  }
+  
   /* Mark end of output */
   if(CDL_OR_TRD) (void)fprintf(stdout,"%*s} // group %s\n",grp_dpt*prn_flg->spc_per_lvl,spc_sng,(grp_dpt == 0) ? grp_nm_fll : nm2sng_cdl(nco_gpe_evl(prn_flg->gpe,grp_nm_fll)));
-  if(JSN) (void)fprintf(stdout,"}\n");
+  if(JSN && grp_dpt ==0) (void)fprintf(stdout,"\n}\n"); 
+  // if(JSN && grp_dpt >0) (void)fprintf(stdout,"\n%*s}",prn_ndn,spc_sng); 
+  if(JSN && grp_dpt >0) (void)fprintf(stdout,"\n%*s}", prn_flg->sxn_fst+grp_dpt*prn_flg->spc_per_lvl,spc_sng);
   if(XML && grp_dpt == 0) (void)fprintf(stdout,"</netcdf>\n"); 
   if(XML && grp_dpt != 0) (void)fprintf(stdout,"%*s</group>\n",grp_dpt*prn_flg->spc_per_lvl,spc_sng); 
 
   return rcd;
 } /* end nco_grp_prn() */
 
+
+int /* [rcd] Return code */
+nco_grp_prn_cdl_trd /* [fnc] Recursively print group contents */
+(const int nc_id, /* I [id] netCDF file ID */
+ const char * const grp_nm_fll, /* I [sng] Absolute group name (path) */
+ prn_fmt_sct * const prn_flg, /* I/O [sct] Print-format information */
+ const trv_tbl_sct * const trv_tbl) /* I [sct] Traversal table */
+{
+  /* Purpose: Recursively print group contents
+     Assumptions: 
+     1. Input is a valid group name on extraction list (set in nco_xtr_dfn())
+        Hence no need to check for group type, or if group is extracted
+     2. Input ID is netCDF file ID, not extracted group ID */
+
+  /* Testing: 
+     ncks -5 ~/nco/data/in_grp.nc
+     ncks --cdl ~/nco/data/in_grp.nc */
+
+  const char sls_sng[]="/";        /* [sng] Slash string */
+  const char spc_sng[]="";        /* [sng] Space string */
+
+  char grp_nm[NC_MAX_NAME+1L];      /* [sng] Group name */
+  char var_nm[NC_MAX_NAME+1L];      /* [sng] Variable name */ 
+
+  char *nm_cdl;
+  char *nm_jsn;
+  char *var_nm_fll;                /* [sng] Full path for variable */
+
+  int *grp_ids;                    /* [ID] Sub-group IDs array */  
+
+  int dmn_idx_grp[NC_MAX_DIMS];    /* [ID] Dimension indices array for group */ 
+  int grp_idx;                     /* [idx] Group index */  
+  int grp_id;                      /* [id] netCDF group ID */
+  int grp_dpt;                     /* [nbr] Depth of group (root = 0) */
+  int nbr_att;                     /* [nbr] Number of attributes */
+  int nbr_grp;                     /* [nbr] Number of sub-groups in this group */
+  int nbr_var;                     /* [nbr] Number of variables */
+  int prn_ndn=0;                   /* [nbr] Indentation for printing */
+  int rcd=NC_NOERR;                /* [rcd] Return code */
+  int var_id;                      /* [id] Variable ID */
+  int var_idx;                     /* [idx] Variable index */
+  int var_nbr_xtr;                 /* [nbr] Number of extracted variables */
+  
+  nco_bool JSN_BLOCK=False;         /* turns true is we have output a jsnblock -need so we add commas where needed */ 
+  const nco_bool CDL=prn_flg->cdl; /* [flg] CDL output */
+  const nco_bool XML=prn_flg->xml; /* [flg] XML output */
+  const nco_bool TRD=prn_flg->trd; /* [flg] Traditional output */
+  const nco_bool SRM=prn_flg->srm; /* [flg] Stream output */
+  const nco_bool JSN=prn_flg->jsn; /* [flg] JSON output */
+  const nco_bool CDL_OR_TRD=prn_flg->cdl || prn_flg->trd; /* [flg] CDL or Traditional output */
+  
+
+  nm_id_sct *dmn_lst; /* [sct] Dimension list */
+  nm_id_sct *var_lst; /* [sct] Variable list */
+
+  unsigned int dmn_idx; /* [idx] Index over dimensions */
+  unsigned int dmn_nbr; /* [nbr] Number of dimensions defined in group */
+  unsigned int obj_idx; /* [idx] Index over traversal table */
+  unsigned int obj_idx_crr; /* [idx] Object index for this group */
+
+  /* Initialize */
+  dmn_nbr=0; /* [nbr] Number of dimensions defined in group */
+  var_nbr_xtr=0; /* [nbr] Number of variables to be extracted in group */
+
+  /* Find group in traversal table */
+  for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+    if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+      if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,grp_nm_fll))
+	break;
+    
+  /* Obtain group ID */
+  (void)nco_inq_grp_full_ncid(nc_id,grp_nm_fll,&grp_id);
+
+  /* Obtain group information */
+  obj_idx_crr=obj_idx;
+  grp_dpt=trv_tbl->lst[obj_idx].grp_dpt;
+  nbr_att=trv_tbl->lst[obj_idx].nbr_att;
+  nbr_var=trv_tbl->lst[obj_idx].nbr_var;
+  nbr_grp=trv_tbl->lst[obj_idx].nbr_grp;
+
+  /* Find dimension information for group */
+  for(dmn_idx=0;dmn_idx<trv_tbl->nbr_dmn;dmn_idx++){
+    /* Will dimension be extracted? (or are we printing all dimensions?)*/
+    if(trv_tbl->lst_dmn[dmn_idx].flg_xtr || prn_flg->rad){
+      /* And was dimension defined in this group? */
+      if(!strcmp(grp_nm_fll,trv_tbl->lst_dmn[dmn_idx].grp_nm_fll)){
+	/* Add dimension to list of dimensions defined in group */
+	dmn_idx_grp[dmn_nbr]=dmn_idx;
+	dmn_nbr++;
+      } /* end if */
+    } /* end if flg_xtr */
+  } /* end loop over dmn_idx */
+
+  /* Create arrays of these dimensions */
+  dmn_lst=(nm_id_sct *)nco_malloc(dmn_nbr*(sizeof(nm_id_sct)));
+  for(dmn_idx=0;dmn_idx<dmn_nbr;dmn_idx++){
+    /* NB: ID here is actually index into trv_tbl->lst_dmn. It is NOT an ID. 
+       However, it is same type (int) as an ID so we can use nm_id infrastructure. */
+    dmn_lst[dmn_idx].id=dmn_idx_grp[dmn_idx];
+    dmn_lst[dmn_idx].nm=strdup(trv_tbl->lst_dmn[dmn_idx_grp[dmn_idx]].nm);
+  } /* end loop over dmn_idx */
+
+  /* Sort dimensions alphabetically */
+  if(dmn_nbr > 1) dmn_lst=nco_lst_srt_nm_id(dmn_lst,dmn_nbr,prn_flg->ALPHA_BY_STUB_GROUP);
+
+  { 
+    nm_cdl=nm2sng_cdl(nco_gpe_evl_stb(prn_flg->gpe,trv_tbl->lst[obj_idx].nm_fll));
+    if(grp_dpt == 0 && CDL) (void)fprintf(stdout,"netcdf %s {",prn_flg->fl_stb); else (void)fprintf(stdout,"%*sgroup: %s {",grp_dpt*prn_flg->spc_per_lvl,spc_sng,nm_cdl);
+    nm_cdl=(char *)nco_free(nm_cdl);
+    if(prn_flg->fll_pth) (void)fprintf(stdout," // fullname: %s\n",nco_gpe_evl(prn_flg->gpe,grp_nm_fll)); else (void)fprintf(stdout,"\n");
+    if(grp_dpt == 0 && prn_flg->nfo_xtr && prn_flg->PRN_GLB_METADATA) (void)fprintf(stdout,"%*s// %s\n",prn_flg->sxn_fst,spc_sng,prn_flg->smr_sng);
+    if(grp_dpt == 0 && prn_flg->nfo_xtr) (void)fprintf(stdout,"%*s// ncgen -k netCDF-4 -b -o %s.nc %s.cdl\n",prn_flg->sxn_fst,spc_sng,prn_flg->fl_stb,prn_flg->fl_stb);
+  } 
+
+  
+  /* Print dimension information for group */
+  prn_ndn=prn_flg->ndn=prn_flg->sxn_fst+grp_dpt*prn_flg->spc_per_lvl;
+  if(dmn_nbr > 0 && CDL_OR_TRD) (void)fprintf(stdout,"%*sdimensions:\n",prn_flg->ndn,spc_sng); 
+  if(CDL) prn_ndn+=prn_flg->var_fst;
+
+  for(dmn_idx=0;dmn_idx<dmn_nbr;dmn_idx++){
+     nm_cdl=nm2sng_cdl(dmn_lst[dmn_idx].nm);
+     if(trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].is_rec_dmn) (void)fprintf(stdout,"%*s%s = UNLIMITED%s// (%lu currently)\n",prn_ndn,spc_sng,nm_cdl,(CDL) ? " ; " : " ",(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt); else (void)fprintf(stdout,"%*s%s = %lu%s\n",prn_ndn,spc_sng,nm_cdl,(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt,(CDL) ? " ;" : "");
+      nm_cdl=(char *)nco_free(nm_cdl);
+
+
+  } /* end loop over dimension */
+
+  /* Dimension list no longer needed */
+  dmn_lst=nco_nm_id_lst_free(dmn_lst,dmn_nbr);
+
+  /* Variables */
+
+  /* Create array to hold names and indices of extracted variables in this group */
+  var_lst=(nm_id_sct *)nco_malloc(nbr_var*(sizeof(nm_id_sct)));
+
+      
+  for(var_idx=0;var_idx<nbr_var;var_idx++){
+    /* Get variable name */
+    rcd+=nco_inq_varname(grp_id,var_idx,var_nm);
+
+    /* Allocate path buffer and include space for trailing NUL */ 
+    var_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(var_nm)+2L);
+
+    /* Initialize path with current absolute group path */
+    strcpy(var_nm_fll,grp_nm_fll);
+
+    /* If not root group, concatenate separator */
+    if(strcmp(grp_nm_fll,sls_sng)) strcat(var_nm_fll,sls_sng);
+
+    /* Concatenate variable to absolute group path */
+    strcat(var_nm_fll,var_nm);
+
+    /* Find variable in traversal table */
+    for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+      if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_var)
+	if(!strcmp(trv_tbl->lst[obj_idx].nm_fll,var_nm_fll))
+	  break;
+    
+    /* Is variable to be extracted? */
+    if(trv_tbl->lst[obj_idx].flg_xtr){
+      /* NB: ID here is actually index into trv_tbl->lst. It is NOT an ID. 
+	 However, it is same type (int) as an ID so we re-use nm_id infrastructure */
+      var_lst[var_nbr_xtr].id=obj_idx;
+      var_lst[var_nbr_xtr].nm=strdup(var_nm);
+      var_nbr_xtr++;
+    } /* endif extracted */
+
+    /* Free constructed name */
+    var_nm_fll=(char *)nco_free(var_nm_fll);
+
+  } /* end loop over variables */
+
+  /* Compactify array to hold names and indices of extracted variables in this group */
+  var_lst=(nm_id_sct *)nco_realloc(var_lst,var_nbr_xtr*(sizeof(nm_id_sct)));
+
+  /* Sort variables alphabetically */
+  if(var_nbr_xtr > 1) var_lst=nco_lst_srt_nm_id(var_lst,var_nbr_xtr,prn_flg->ALPHA_BY_STUB_GROUP);
+    
+
+  /* Print variable information for group */
+  if(var_nbr_xtr > 0 ) (void)fprintf(stdout,"\n%*svariables:\n",prn_flg->ndn,spc_sng);
+
+  for(var_idx=0;var_idx<var_nbr_xtr;var_idx++){
+    trv_sct var_trv=trv_tbl->lst[var_lst[var_idx].id];
+    /* Obtain variable ID */
+    (void)nco_inq_varid(grp_id,var_trv.nm,&var_id);
+
+    /* Print variable full name */
+    if(var_trv.grp_dpt > 0 && prn_flg->fll_pth && TRD) (void)fprintf(stdout,"%*s%s\n",prn_flg->ndn,spc_sng,var_trv.nm_fll);
+
+    /* NB: CDL and TRD place data in seperate tag, while XML and JSN place data in same tag as metadata */  
+   
+
+    if(CDL || (TRD && prn_flg->PRN_VAR_METADATA)) (void)nco_prn_var_dfn(nc_id,prn_flg,&var_trv);
+
+    /* nco_prn_att() prints final brace but no return, as we may need to add a comma */ 
+    if(prn_flg->PRN_VAR_METADATA) (void)nco_prn_att(grp_id,prn_flg,var_id);
+           
+    if( var_idx != var_nbr_xtr-1) (void)fprintf(stdout,"\n"); 
+    
+  } /* end loop over var_idx */
+
+
+  if((nbr_att > 0 || (prn_flg->hdn && grp_dpt == 0)) && prn_flg->PRN_GLB_METADATA)
+  {
+    (void)fprintf(stdout,"\n%*s%s%sattributes:\n",prn_flg->ndn,spc_sng,(CDL) ? "// " : "",(grp_dpt == 0) ? "global " : "group ");
+    nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
+  }  
+
+  /* Print data for group only CDL and TRD have a separate data block*/
+  if( var_nbr_xtr > 0 && prn_flg->PRN_VAR_DATA){
+    (void)fprintf(stdout,"\n%*sdata:\n",prn_flg->ndn,spc_sng);
+    for(var_idx=0;var_idx<var_nbr_xtr;var_idx++) (void)nco_prn_var_val_trv(nc_id,prn_flg,&trv_tbl->lst[var_lst[var_idx].id],trv_tbl);
+  } /* end if */
+
+  /* Variable list no longer needed */
+  var_lst=nco_nm_id_lst_free(var_lst,var_nbr_xtr);
+
+  /* Get ready for sub-groups */ 
+  grp_ids=(int *)nco_malloc(nbr_grp*sizeof(int)); 
+  rcd+=nco_inq_grps(grp_id,(int *)NULL,grp_ids);
+
+
+
+  /* Call recursively for all extracted subgroups */
+  for(grp_idx=0;grp_idx<nbr_grp;grp_idx++){
+    char *sub_grp_nm_fll=NULL; /* [sng] Sub group path */
+    int gid=grp_ids[grp_idx]; /* [id] Current group ID */  
+
+    /* Get sub-group name */
+    rcd+=nco_inq_grpname(gid,grp_nm);
+
+    /* Allocate path buffer including space for trailing NUL */ 
+    sub_grp_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(grp_nm)+2L);
+
+    /* Initialize path with current absolute group path */
+    strcpy(sub_grp_nm_fll,grp_nm_fll);
+
+    /* If not root group, concatenate separator */
+    if(strcmp(grp_nm_fll,sls_sng)) strcat(sub_grp_nm_fll,sls_sng);
+
+    /* Concatenate current group to absolute group path */
+    strcat(sub_grp_nm_fll,grp_nm); 
+
+    /* Find sub-group in traversal table */
+    for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+      if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+	if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,sub_grp_nm_fll))
+	  break;
+    
+    /* Is sub-group to be extracted? If so, recurse */
+    if(trv_tbl->lst[obj_idx].flg_xtr) rcd+=nco_grp_prn_cdl_trd(nc_id,sub_grp_nm_fll,prn_flg,trv_tbl);
+
+    /* Free constructed name */
+    sub_grp_nm_fll=(char *)nco_free(sub_grp_nm_fll);
+  } /* end loop over grp_idx */
+
+  
+  /* Mark end of output */
+  (void)fprintf(stdout,"%*s} // group %s\n",grp_dpt*prn_flg->spc_per_lvl,spc_sng,(grp_dpt == 0) ? grp_nm_fll : nm2sng_cdl(nco_gpe_evl(prn_flg->gpe,grp_nm_fll)));
+  return rcd;
+} /* end nco_grp_prn_cdl_trd() */
+
+
+
+int /* [rcd] Return code */
+nco_grp_prn_xml /* [fnc] Recursively print group contents */
+(const int nc_id, /* I [id] netCDF file ID */
+ const char * const grp_nm_fll, /* I [sng] Absolute group name (path) */
+ prn_fmt_sct * const prn_flg, /* I/O [sct] Print-format information */
+ const trv_tbl_sct * const trv_tbl) /* I [sct] Traversal table */
+{
+  /* Purpose: Recursively print group contents
+     Assumptions: 
+     1. Input is a valid group name on extraction list (set in nco_xtr_dfn())
+        Hence no need to check for group type, or if group is extracted
+     2. Input ID is netCDF file ID, not extracted group ID */
+
+  /* Testing: 
+     ncks -5 ~/nco/data/in_grp.nc
+     ncks --cdl ~/nco/data/in_grp.nc */
+
+  const char sls_sng[]="/";        /* [sng] Slash string */
+  const char spc_sng[]="";        /* [sng] Space string */
+
+  char grp_nm[NC_MAX_NAME+1L];      /* [sng] Group name */
+  char var_nm[NC_MAX_NAME+1L];      /* [sng] Variable name */ 
+
+  char *nm_cdl;
+  char *nm_jsn;
+  char *var_nm_fll;                /* [sng] Full path for variable */
+
+  int *grp_ids;                    /* [ID] Sub-group IDs array */  
+
+  int dmn_idx_grp[NC_MAX_DIMS];    /* [ID] Dimension indices array for group */ 
+  int grp_idx;                     /* [idx] Group index */  
+  int grp_id;                      /* [id] netCDF group ID */
+  int grp_dpt;                     /* [nbr] Depth of group (root = 0) */
+  int nbr_att;                     /* [nbr] Number of attributes */
+  int nbr_grp;                     /* [nbr] Number of sub-groups in this group */
+  int nbr_var;                     /* [nbr] Number of variables */
+  int prn_ndn=0;                   /* [nbr] Indentation for printing */
+  int rcd=NC_NOERR;                /* [rcd] Return code */
+  int var_id;                      /* [id] Variable ID */
+  int var_idx;                     /* [idx] Variable index */
+  int var_nbr_xtr;                 /* [nbr] Number of extracted variables */
+  
+  nco_bool JSN_BLOCK=False;         /* turns true is we have output a jsnblock -need so we add commas where needed */ 
+  const nco_bool CDL=prn_flg->cdl; /* [flg] CDL output */
+  const nco_bool XML=prn_flg->xml; /* [flg] XML output */
+  const nco_bool TRD=prn_flg->trd; /* [flg] Traditional output */
+  const nco_bool SRM=prn_flg->srm; /* [flg] Stream output */
+  const nco_bool JSN=prn_flg->jsn; /* [flg] JSON output */
+  
+  nm_id_sct *dmn_lst; /* [sct] Dimension list */
+  nm_id_sct *var_lst; /* [sct] Variable list */
+
+  unsigned int dmn_idx; /* [idx] Index over dimensions */
+  unsigned int dmn_nbr; /* [nbr] Number of dimensions defined in group */
+  unsigned int obj_idx; /* [idx] Index over traversal table */
+  unsigned int obj_idx_crr; /* [idx] Object index for this group */
+
+
+
+  /* Initialize */
+  dmn_nbr=0; /* [nbr] Number of dimensions defined in group */
+  var_nbr_xtr=0; /* [nbr] Number of variables to be extracted in group */
+
+  /* Find group in traversal table */
+  for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+    if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+      if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,grp_nm_fll))
+	break;
+    
+  /* Obtain group ID */
+  (void)nco_inq_grp_full_ncid(nc_id,grp_nm_fll,&grp_id);
+
+  /* Obtain group information */
+  obj_idx_crr=obj_idx;
+  grp_dpt=trv_tbl->lst[obj_idx].grp_dpt;
+  nbr_att=trv_tbl->lst[obj_idx].nbr_att;
+  nbr_var=trv_tbl->lst[obj_idx].nbr_var;
+  nbr_grp=trv_tbl->lst[obj_idx].nbr_grp;
+
+  /* Find dimension information for group */
+  for(dmn_idx=0;dmn_idx<trv_tbl->nbr_dmn;dmn_idx++){
+    /* Will dimension be extracted? (or are we printing all dimensions?)*/
+    if(trv_tbl->lst_dmn[dmn_idx].flg_xtr || prn_flg->rad){
+      /* And was dimension defined in this group? */
+      if(!strcmp(grp_nm_fll,trv_tbl->lst_dmn[dmn_idx].grp_nm_fll)){
+	/* Add dimension to list of dimensions defined in group */
+	dmn_idx_grp[dmn_nbr]=dmn_idx;
+	dmn_nbr++;
+      } /* end if */
+    } /* end if flg_xtr */
+  } /* end loop over dmn_idx */
+
+  /* Create arrays of these dimensions */
+  dmn_lst=(nm_id_sct *)nco_malloc(dmn_nbr*(sizeof(nm_id_sct)));
+  for(dmn_idx=0;dmn_idx<dmn_nbr;dmn_idx++){
+    /* NB: ID here is actually index into trv_tbl->lst_dmn. It is NOT an ID. 
+       However, it is same type (int) as an ID so we can use nm_id infrastructure. */
+    dmn_lst[dmn_idx].id=dmn_idx_grp[dmn_idx];
+    dmn_lst[dmn_idx].nm=strdup(trv_tbl->lst_dmn[dmn_idx_grp[dmn_idx]].nm);
+  } /* end loop over dmn_idx */
+
+  /* Sort dimensions alphabetically */
+  if(dmn_nbr > 1) dmn_lst=nco_lst_srt_nm_id(dmn_lst,dmn_nbr,prn_flg->ALPHA_BY_STUB_GROUP);
+
+
+  if(grp_dpt == 0){
+      if(prn_flg->xml_lcn) (void)fprintf(stdout,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<netcdf xmlns=\"http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2\" location=\"%s\">\n",prn_flg->fl_in); else (void)fprintf(stdout,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<netcdf xmlns=\"http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2\">\n");
+      if(prn_flg->nfo_xtr) (void)fprintf(stdout,"%*s<!-- %s -->\n",prn_flg->sxn_fst,spc_sng,prn_flg->smr_sng);
+  }else{ /* grp_dpt != 0 */
+      (void)fprintf(stdout,"%*s<group name=\"%s\">\n",grp_dpt*prn_flg->spc_per_lvl,spc_sng,trv_tbl->lst[obj_idx].nm);
+  } /* grp_dpt != 0 */
+
+
+  /* Print dimension information for group */
+  prn_ndn=prn_flg->ndn=prn_flg->sxn_fst+grp_dpt*prn_flg->spc_per_lvl;
+
+  for(dmn_idx=0;dmn_idx<dmn_nbr;dmn_idx++)
+      (void)fprintf(stdout,"%*s<dimension name=\"%s\" length=\"%lu\" %s/>\n",prn_ndn,spc_sng,dmn_lst[dmn_idx].nm,(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt,trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].is_rec_dmn ? "isUnlimited=\"true\" " : "");
+
+  
+  /* Dimension list no longer needed */
+  dmn_lst=nco_nm_id_lst_free(dmn_lst,dmn_nbr);
+
+  /* Variables */
+
+  /* Create array to hold names and indices of extracted variables in this group */
+  var_lst=(nm_id_sct *)nco_malloc(nbr_var*(sizeof(nm_id_sct)));
+
+      
+  for(var_idx=0;var_idx<nbr_var;var_idx++){
+    /* Get variable name */
+    rcd+=nco_inq_varname(grp_id,var_idx,var_nm);
+
+    /* Allocate path buffer and include space for trailing NUL */ 
+    var_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(var_nm)+2L);
+
+    /* Initialize path with current absolute group path */
+    strcpy(var_nm_fll,grp_nm_fll);
+
+    /* If not root group, concatenate separator */
+    if(strcmp(grp_nm_fll,sls_sng)) strcat(var_nm_fll,sls_sng);
+
+    /* Concatenate variable to absolute group path */
+    strcat(var_nm_fll,var_nm);
+
+    /* Find variable in traversal table */
+    for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+      if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_var)
+	if(!strcmp(trv_tbl->lst[obj_idx].nm_fll,var_nm_fll))
+	  break;
+    
+    /* Is variable to be extracted? */
+    if(trv_tbl->lst[obj_idx].flg_xtr){
+      /* NB: ID here is actually index into trv_tbl->lst. It is NOT an ID. 
+	 However, it is same type (int) as an ID so we re-use nm_id infrastructure */
+      var_lst[var_nbr_xtr].id=obj_idx;
+      var_lst[var_nbr_xtr].nm=strdup(var_nm);
+      var_nbr_xtr++;
+    } /* endif extracted */
+
+    /* Free constructed name */
+    var_nm_fll=(char *)nco_free(var_nm_fll);
+
+  } /* end loop over variables */
+
+  /* Compactify array to hold names and indices of extracted variables in this group */
+  var_lst=(nm_id_sct *)nco_realloc(var_lst,var_nbr_xtr*(sizeof(nm_id_sct)));
+
+  /* Sort variables alphabetically */
+  if(var_nbr_xtr > 1) var_lst=nco_lst_srt_nm_id(var_lst,var_nbr_xtr,prn_flg->ALPHA_BY_STUB_GROUP);
+    
+
+  for(var_idx=0;var_idx<var_nbr_xtr;var_idx++){
+    trv_sct var_trv=trv_tbl->lst[var_lst[var_idx].id];
+    /* Obtain variable ID */
+    (void)nco_inq_varid(grp_id,var_trv.nm,&var_id);
+
+    /* Print variable full name */
+    // if(var_trv.grp_dpt > 0 && prn_flg->fll_pth && TRD) (void)fprintf(stdout,"%*s%s\n",prn_flg->ndn,spc_sng,var_trv.nm_fll);
+
+    (void)nco_prn_var_dfn(nc_id,prn_flg,&var_trv); 
+      
+    if(prn_flg->PRN_VAR_METADATA )  
+       (void)nco_prn_att(grp_id,prn_flg,var_id);
+   
+
+    if(prn_flg->PRN_VAR_DATA) 
+       (void)nco_prn_var_val_trv(nc_id,prn_flg,&trv_tbl->lst[var_lst[var_idx].id],trv_tbl);
+      /* XML close variable tag */
+      (void)fprintf(stdout,"%*s</variable>\n",prn_ndn,spc_sng);
+      
+  } /* end loop over var_idx */
+
+
+  /* print global metatdata */
+  if((nbr_att > 0 || (prn_flg->hdn && grp_dpt == 0)) && prn_flg->PRN_GLB_METADATA)
+      nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
+
+
+
+  /* Variable list no longer needed */
+  var_lst=nco_nm_id_lst_free(var_lst,var_nbr_xtr);
+
+  /* Get ready for sub-groups */ 
+  grp_ids=(int *)nco_malloc(nbr_grp*sizeof(int)); 
+  rcd+=nco_inq_grps(grp_id,(int *)NULL,grp_ids);
+
+
+  /* Call recursively for all extracted subgroups */
+  for(grp_idx=0;grp_idx<nbr_grp;grp_idx++){
+    char *sub_grp_nm_fll=NULL; /* [sng] Sub group path */
+    int gid=grp_ids[grp_idx]; /* [id] Current group ID */  
+
+    /* Get sub-group name */
+    rcd+=nco_inq_grpname(gid,grp_nm);
+
+    /* Allocate path buffer including space for trailing NUL */ 
+    sub_grp_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(grp_nm)+2L);
+
+    /* Initialize path with current absolute group path */
+    strcpy(sub_grp_nm_fll,grp_nm_fll);
+
+    /* If not root group, concatenate separator */
+    if(strcmp(grp_nm_fll,sls_sng)) strcat(sub_grp_nm_fll,sls_sng);
+
+    /* Concatenate current group to absolute group path */
+    strcat(sub_grp_nm_fll,grp_nm); 
+
+    /* Find sub-group in traversal table */
+    for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+      if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+	if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,sub_grp_nm_fll))
+	  break;
+    
+    /* Is sub-group to be extracted? If so, recurse */
+    if(trv_tbl->lst[obj_idx].flg_xtr) rcd+=nco_grp_prn_xml(nc_id,sub_grp_nm_fll,prn_flg,trv_tbl);
+
+    /* Free constructed name */
+    sub_grp_nm_fll=(char *)nco_free(sub_grp_nm_fll);
+  } /* end loop over grp_idx */
+
+
+  /* Mark end of output */
+  if(grp_dpt == 0) (void)fprintf(stdout,"</netcdf>\n"); 
+  if(grp_dpt > 0) (void)fprintf(stdout,"%*s</group>\n",grp_dpt*prn_flg->spc_per_lvl,spc_sng); 
+
+  return rcd;
+} /* end nco_grp_prn_xml() */
+
+
+
+
+int /* [rcd] Return code */
+nco_grp_prn_jsn /* [fnc] Recursively print group contents */
+(const int nc_id, /* I [id] netCDF file ID */
+ const char * const grp_nm_fll, /* I [sng] Absolute group name (path) */
+ prn_fmt_sct * const prn_flg, /* I/O [sct] Print-format information */
+ const trv_tbl_sct * const trv_tbl) /* I [sct] Traversal table */
+{
+  /* Purpose: Recursively print group contents
+     Assumptions: 
+     1. Input is a valid group name on extraction list (set in nco_xtr_dfn())
+        Hence no need to check for group type, or if group is extracted
+     2. Input ID is netCDF file ID, not extracted group ID */
+
+  /* Testing: 
+     ncks -5 ~/nco/data/in_grp.nc
+     ncks --cdl ~/nco/data/in_grp.nc */
+
+  const char sls_sng[]="/";        /* [sng] Slash string */
+  const char spc_sng[]="";        /* [sng] Space string */
+
+  char grp_nm[NC_MAX_NAME+1L];      /* [sng] Group name */
+  char var_nm[NC_MAX_NAME+1L];      /* [sng] Variable name */ 
+
+  char *nm_cdl;
+  char *nm_jsn;
+  char *var_nm_fll;                /* [sng] Full path for variable */
+
+  int *grp_ids;                    /* [ID] Sub-group IDs array */  
+
+  int dmn_idx_grp[NC_MAX_DIMS];    /* [ID] Dimension indices array for group */ 
+  int grp_idx;                     /* [idx] Group index */  
+  int grp_id;                      /* [id] netCDF group ID */
+  int grp_dpt;                     /* [nbr] Depth of group (root = 0) */
+  int nbr_att;                     /* [nbr] Number of attributes */
+  int nbr_grp;                     /* [nbr] Number of sub-groups in this group */
+  int nbr_var;                     /* [nbr] Number of variables */
+  int prn_ndn=0;                   /* [nbr] Indentation for printing */
+  int rcd=NC_NOERR;                /* [rcd] Return code */
+  int var_id;                      /* [id] Variable ID */
+  int var_idx;                     /* [idx] Variable index */
+  int var_nbr_xtr;                 /* [nbr] Number of extracted variables */
+  int nbr_grp_xtr=0;               /* number of groups currently extracted */  
+  nco_bool JSN_BLOCK=False;         /* turns true is we have output a jsnblock -need so we add commas where needed */ 
+  const nco_bool JSN=prn_flg->jsn; /* [flg] JSON output */
+  
+  nm_id_sct *dmn_lst; /* [sct] Dimension list */
+  nm_id_sct *var_lst; /* [sct] Variable list */
+
+  unsigned int dmn_idx; /* [idx] Index over dimensions */
+  unsigned int dmn_nbr; /* [nbr] Number of dimensions defined in group */
+  unsigned int obj_idx; /* [idx] Index over traversal table */
+  unsigned int obj_idx_crr; /* [idx] Object index for this group */
+
+  /* Initialize */
+  dmn_nbr=0; /* [nbr] Number of dimensions defined in group */
+  var_nbr_xtr=0; /* [nbr] Number of variables to be extracted in group */
+
+  /* Find group in traversal table */
+  for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+    if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+      if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,grp_nm_fll))
+	break;
+    
+  /* Obtain group ID */
+  (void)nco_inq_grp_full_ncid(nc_id,grp_nm_fll,&grp_id);
+
+  /* Obtain group information */
+  obj_idx_crr=obj_idx;
+  grp_dpt=trv_tbl->lst[obj_idx].grp_dpt;
+  nbr_att=trv_tbl->lst[obj_idx].nbr_att;
+  nbr_var=trv_tbl->lst[obj_idx].nbr_var;
+  nbr_grp=trv_tbl->lst[obj_idx].nbr_grp;
+
+  /* Find dimension information for group */
+  for(dmn_idx=0;dmn_idx<trv_tbl->nbr_dmn;dmn_idx++){
+    /* Will dimension be extracted? (or are we printing all dimensions?)*/
+    if(trv_tbl->lst_dmn[dmn_idx].flg_xtr || prn_flg->rad){
+      /* And was dimension defined in this group? */
+      if(!strcmp(grp_nm_fll,trv_tbl->lst_dmn[dmn_idx].grp_nm_fll)){
+	/* Add dimension to list of dimensions defined in group */
+	dmn_idx_grp[dmn_nbr]=dmn_idx;
+	dmn_nbr++;
+      } /* end if */
+    } /* end if flg_xtr */
+  } /* end loop over dmn_idx */
+
+  /* Create arrays of these dimensions */
+  dmn_lst=(nm_id_sct *)nco_malloc(dmn_nbr*(sizeof(nm_id_sct)));
+  for(dmn_idx=0;dmn_idx<dmn_nbr;dmn_idx++){
+    /* NB: ID here is actually index into trv_tbl->lst_dmn. It is NOT an ID. 
+       However, it is same type (int) as an ID so we can use nm_id infrastructure. */
+    dmn_lst[dmn_idx].id=dmn_idx_grp[dmn_idx];
+    dmn_lst[dmn_idx].nm=strdup(trv_tbl->lst_dmn[dmn_idx_grp[dmn_idx]].nm);
+  } /* end loop over dmn_idx */
+
+  /* prn_ndn is the indentation of the group id tag -offsets for vars/atts/groups tag are from this */
+  if(grp_dpt==0)
+      prn_ndn=0;   
+  else
+      prn_ndn=2*grp_dpt*prn_flg->spc_per_lvl;
+     
+  nm_jsn=nm2sng_jsn(nco_gpe_evl_stb(prn_flg->gpe,trv_tbl->lst[obj_idx].nm_fll));
+ 
+ if(grp_dpt==0) (void)fprintf(stdout,"{\n"); else (void)fprintf(stdout,"%*s\"%s\": {\n",prn_ndn,spc_sng,nm_jsn);
+  nm_jsn=(char *)nco_free(nm_jsn);  
+
+
+  if(dmn_nbr > 0 ) 
+      (void)fprintf(stdout,"%*s\"dimensions\": {\n",prn_ndn+prn_flg->spc_per_lvl,spc_sng);
+ 
+  for(dmn_idx=0;dmn_idx<dmn_nbr;dmn_idx++){
+
+    nm_jsn=nm2sng_jsn(dmn_lst[dmn_idx].nm);
+    (void)fprintf(stdout,"%*s\"%s\": %lu",prn_ndn+2*prn_flg->spc_per_lvl,spc_sng,nm_jsn,(unsigned long)trv_tbl->lst_dmn[dmn_lst[dmn_idx].id].lmt_msa.dmn_cnt);   
+    /* Add comma and carriage-return unless last element */
+    if(dmn_idx<dmn_nbr-1) 
+          (void)printf(",\n");
+    else
+      (void)printf("\n%*s}",prn_ndn+prn_flg->spc_per_lvl,spc_sng);         
+       
+    nm_jsn=(char *)nco_free(nm_jsn);   
+    JSN_BLOCK=True;    
+  } /* end loop over dimension */
+
+  /* Dimension list no longer needed */
+  dmn_lst=nco_nm_id_lst_free(dmn_lst,dmn_nbr);
+
+  /* Variables */
+
+  /* Create array to hold names and indices of extracted variables in this group */
+  var_lst=(nm_id_sct *)nco_malloc(nbr_var*(sizeof(nm_id_sct)));
+
+      
+  for(var_idx=0;var_idx<nbr_var;var_idx++){
+    /* Get variable name */
+    rcd+=nco_inq_varname(grp_id,var_idx,var_nm);
+
+    /* Allocate path buffer and include space for trailing NUL */ 
+    var_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(var_nm)+2L);
+
+    /* Initialize path with current absolute group path */
+    strcpy(var_nm_fll,grp_nm_fll);
+
+    /* If not root group, concatenate separator */
+    if(strcmp(grp_nm_fll,sls_sng)) strcat(var_nm_fll,sls_sng);
+
+    /* Concatenate variable to absolute group path */
+    strcat(var_nm_fll,var_nm);
+
+    /* Find variable in traversal table */
+    for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+      if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_var)
+	if(!strcmp(trv_tbl->lst[obj_idx].nm_fll,var_nm_fll))
+	  break;
+    
+    /* Is variable to be extracted? */
+    if(trv_tbl->lst[obj_idx].flg_xtr){
+      /* NB: ID here is actually index into trv_tbl->lst. It is NOT an ID. 
+	 However, it is same type (int) as an ID so we re-use nm_id infrastructure */
+      var_lst[var_nbr_xtr].id=obj_idx;
+      var_lst[var_nbr_xtr].nm=strdup(var_nm);
+      var_nbr_xtr++;
+    } /* endif extracted */
+
+    /* Free constructed name */
+    var_nm_fll=(char *)nco_free(var_nm_fll);
+
+  } /* end loop over variables */
+
+  /* Compactify array to hold names and indices of extracted variables in this group */
+  var_lst=(nm_id_sct *)nco_realloc(var_lst,var_nbr_xtr*(sizeof(nm_id_sct)));
+
+  /* Sort variables alphabetically */
+  if(var_nbr_xtr > 1) var_lst=nco_lst_srt_nm_id(var_lst,var_nbr_xtr,prn_flg->ALPHA_BY_STUB_GROUP);
+    
+
+  for(var_idx=0;var_idx<var_nbr_xtr;var_idx++){
+    trv_sct var_trv=trv_tbl->lst[var_lst[var_idx].id];
+    /* Obtain variable ID */
+    (void)nco_inq_varid(grp_id,var_trv.nm,&var_id);
+
+   
+    /* deal with first iteration */   
+    if(var_idx==0) 
+    { 
+      if(JSN_BLOCK) 
+	(void)fprintf(stdout,",\n"); 
+      else
+	JSN_BLOCK=True;              
+         
+      (void)fprintf(stdout,"%*s\"variables\": {\n",prn_ndn+prn_flg->spc_per_lvl,spc_sng);   
+    } 
+        
+    /* DOES NOT include a return as we may wanna add a COMMA */
+    prn_flg->ndn=prn_ndn+2*prn_flg->spc_per_lvl; 
+
+    (void)nco_prn_var_dfn(nc_id,prn_flg,&var_trv);
+
+
+    /* nco_prn_att() prints the final brace but no return - as we may need to add a comma */ 
+    if( prn_flg->PRN_VAR_METADATA  && nco_att_nbr(grp_id,var_id)>0)
+    {     
+      (void)fprintf(stdout,",\n");            
+      //prn_flg->ndn=prn_ndn+2*prn_flg->spc_per_lvl;  
+      (void)nco_prn_att(grp_id,prn_flg,var_id);
+    } 
+        
+    if( prn_flg->PRN_VAR_DATA)
+    {  
+      (void)fprintf(stdout,",\n");  
+      // prn_flg->ndn=prn_ndn+2*prn_flg->spc_per_lvl;  
+      (void)nco_prn_var_val_trv(nc_id,prn_flg,&trv_tbl->lst[var_lst[var_idx].id],trv_tbl);      
+    }
+    else 
+    {
+      (void)fprintf(stdout,"\n");        
+    }
+    /* close json tag -but dont add return as we may need to add comma later*/
+    (void)fprintf(stdout,"%*s}%s",prn_flg->ndn,spc_sng, (var_idx<var_nbr_xtr-1 ?",\n":"\n")  );   
+    
+  } /* end loop over var_idx */
+
+  /* close out json variable tag */
+  if(var_nbr_xtr>0) 
+    (void)fprintf(stdout,"%*s}",prn_ndn+prn_flg->spc_per_lvl,spc_sng );   
+
+
+
+  if((nbr_att > 0 || (prn_flg->hdn && grp_dpt == 0)) && prn_flg->PRN_GLB_METADATA)
+  {
+    if(JSN_BLOCK) 
+      (void)fprintf(stdout,",\n"); 
+    else
+      JSN_BLOCK=True;              
+
+    prn_flg->ndn=prn_ndn+prn_flg->spc_per_lvl;  
+    nco_prn_att(grp_id,prn_flg,NC_GLOBAL);
+  }  
+
+  /* Variable list no longer needed */
+  var_lst=nco_nm_id_lst_free(var_lst,var_nbr_xtr);
+
+  /* Get ready for sub-groups */ 
+  grp_ids=(int *)nco_malloc(nbr_grp*sizeof(int)); 
+  rcd+=nco_inq_grps(grp_id,(int *)NULL,grp_ids);
+
+
+  /*
+  if( nbr_grp > 0) 
+  {  
+     if(JSN_BLOCK) (void)fprintf(stdout,",\n"); 
+     (void)fprintf(stdout,"%*s\"groups\": {\n",prn_ndn+prn_flg->spc_per_lvl,spc_sng);       
+     JSN_BLOCK=True; 
+  }
+  */
+  
+  /* Call recursively for all extracted subgroups */
+  for(grp_idx=0;grp_idx<nbr_grp;grp_idx++){
+    char *sub_grp_nm_fll=NULL; /* [sng] Sub group path */
+    int gid=grp_ids[grp_idx]; /* [id] Current group ID */  
+
+    /* Get sub-group name */
+    rcd+=nco_inq_grpname(gid,grp_nm);
+
+    /* Allocate path buffer including space for trailing NUL */ 
+    sub_grp_nm_fll=(char *)nco_malloc(strlen(grp_nm_fll)+strlen(grp_nm)+2L);
+
+    /* Initialize path with current absolute group path */
+    strcpy(sub_grp_nm_fll,grp_nm_fll);
+
+    /* If not root group, concatenate separator */
+    if(strcmp(grp_nm_fll,sls_sng)) strcat(sub_grp_nm_fll,sls_sng);
+
+    /* Concatenate current group to absolute group path */
+    strcat(sub_grp_nm_fll,grp_nm); 
+
+    /* Find sub-group in traversal table */
+    for(obj_idx=0;obj_idx<trv_tbl->nbr;obj_idx++)
+      if(trv_tbl->lst[obj_idx].nco_typ == nco_obj_typ_grp)
+	if(!strcmp(trv_tbl->lst[obj_idx].grp_nm_fll,sub_grp_nm_fll))
+	  break;
+    
+    /* Is sub-group to be extracted? If so, recurse */
+    if(trv_tbl->lst[obj_idx].flg_xtr)
+    {  
+      /* print groups tag for first extracted group */ 
+      if(nbr_grp_xtr++==0)    
+      {   
+         if(JSN_BLOCK) 
+             (void)fprintf(stdout,",\n"); 
+
+         (void)fprintf(stdout,"%*s\"groups\": {\n",prn_ndn+prn_flg->spc_per_lvl,spc_sng);       
+
+      }  
+      else   
+         (void)fprintf(stdout,",\n"); 
+
+      rcd+=nco_grp_prn_jsn(nc_id,sub_grp_nm_fll,prn_flg,trv_tbl);        
+    }  
+
+    /* Free constructed name */
+    sub_grp_nm_fll=(char *)nco_free(sub_grp_nm_fll);
+  } /* end loop over grp_idx */
+
+  /* print closing tag for group tag */
+  if( nbr_grp>0 && nbr_grp_xtr>0 )     
+    fprintf(stdout,"\n%*s}",prn_ndn+prn_flg->spc_per_lvl,spc_sng);         
+
+  if(grp_dpt ==0) (void)fprintf(stdout,"\n}\n"); 
+
+  if(grp_dpt >0) (void)fprintf(stdout,"\n%*s}",prn_ndn,spc_sng);
+  
+
+  
+  return rcd;
+  } /* end nco_grp_prn_jsn() */
+
+
 nco_bool                            /* O [flg] Variable is compound */
 nco_prn_cpd_chk                     /* [fnc] Check whether variable is compound */
 (const trv_sct * const var_trv,     /* I [sct] Variable to check */
diff --git a/src/nco/nco_prn.h b/src/nco/nco_prn.h
index c11ac32..1479aa8 100644
--- a/src/nco/nco_prn.h
+++ b/src/nco/nco_prn.h
@@ -101,6 +101,30 @@ nco_grp_prn /* [fnc] Recursively print group contents */
  prn_fmt_sct * const prn_flg, /* I/O [sct] Print-format information */
  const trv_tbl_sct * const trv_tbl); /* I [sct] Traversal table */
 
+int /* [rcd] Return code */
+nco_grp_prn_cdl_trd /* [fnc] Recursively print group contents in JSON format */
+(const int nc_id, /* I [id] netCDF file ID */
+ const char * const grp_nm_fll, /* I [sng] Absolute group name (path) */
+ prn_fmt_sct * const prn_flg, /* I/O [sct] Print-format information */
+ const trv_tbl_sct * const trv_tbl); /* I [sct] Traversal table */
+
+
+int /* [rcd] Return code */
+nco_grp_prn_jsn /* [fnc] Recursively print group contents in JSON format */
+(const int nc_id, /* I [id] netCDF file ID */
+ const char * const grp_nm_fll, /* I [sng] Absolute group name (path) */
+ prn_fmt_sct * const prn_flg, /* I/O [sct] Print-format information */
+ const trv_tbl_sct * const trv_tbl); /* I [sct] Traversal table */
+
+int /* [rcd] Return code */
+nco_grp_prn_xml /* [fnc] Recursively print group contents in XML format */
+(const int nc_id, /* I [id] netCDF file ID */
+ const char * const grp_nm_fll, /* I [sng] Absolute group name (path) */
+ prn_fmt_sct * const prn_flg, /* I/O [sct] Print-format information */
+ const trv_tbl_sct * const trv_tbl); /* I [sct] Traversal table */
+
+
+
 nco_bool /* O [flg] Variable is compound */
 nco_prn_cpd_chk /* [fnc] Check whether variable is compound */
 (const trv_sct * const var_trv, /* I [sct] Variable to check */
diff --git a/src/nco/nco_rgr.c b/src/nco/nco_rgr.c
index 274fe67..931c952 100644
--- a/src/nco/nco_rgr.c
+++ b/src/nco/nco_rgr.c
@@ -205,38 +205,24 @@ nco_rgr_ini /* [fnc] Initialize regridding structure */
   } /* endif */
   
   /* Parse extended kvm options */
+  char *sng_fnl=NULL;
   int cnv_nbr; /* [nbr] Number of elements converted by sscanf() */
-  int rgr_arg_idx; /* [idx] Index over rgr_arg (i.e., separate invocations of "--rgr var1[,var2]=val") */
   int rgr_var_idx; /* [idx] Index over rgr_lst (i.e., all names explicitly specified in all "--rgr var1[,var2]=val" options) */
   int rgr_var_nbr=0;
-  kvm_sct *rgr_lst; /* [sct] List of all regrid specifications */
-  kvm_sct kvm;
+  kvm_sct *rgr_lst=NULL; /* [sct] List of all regrid specifications */
 
-  rgr_lst=(kvm_sct *)nco_malloc(NC_MAX_VARS*sizeof(kvm_sct));
+  if(rgr_arg_nbr > 0){
+    /* Join arguments together */
+    sng_fnl=nco_join_sng(rgr_arg,rgr_arg_nbr);
+    rgr_lst=nco_arg_mlt_prs(sng_fnl);
+    if(sng_fnl) sng_fnl=(char *)nco_free(sng_fnl);
 
-  /* Parse RGRs */
-  for(rgr_arg_idx=0;rgr_arg_idx<rgr_arg_nbr;rgr_arg_idx++){
-    if(!strstr(rgr_arg[rgr_arg_idx],"=")){
-      (void)fprintf(stdout,"%s: Invalid --rgr specification: %s. Must contain \"=\" sign, e.g., \"key=value\".\n",nco_prg_nm_get(),rgr_arg[rgr_arg_idx]);
-      if(rgr_lst) rgr_lst=(kvm_sct *)nco_free(rgr_lst);
-      nco_exit(EXIT_FAILURE);
-    } /* endif */
-    kvm=nco_sng2kvm(rgr_arg[rgr_arg_idx]);
-    /* nco_sng2kvm() converts argument "--rgr one,two=3" into kvm.key="one,two" and kvm.val=3
-       Then nco_lst_prs_2D() converts kvm.key into two items, "one" and "two", with the same value, 3 */
-    if(kvm.key){
-      int var_idx; /* [idx] Index over variables in current RGR argument */
-      int var_nbr; /* [nbr] Number of variables in current RGR argument */
-      char **var_lst;
-      var_lst=nco_lst_prs_2D(kvm.key,",",&var_nbr);
-      for(var_idx=0;var_idx<var_nbr;var_idx++){ /* Expand multi-variable specification */
-        rgr_lst[rgr_var_nbr].key=strdup(var_lst[var_idx]);
-        rgr_lst[rgr_var_nbr].val=strdup(kvm.val);
-        rgr_var_nbr++;
-      } /* end for */
-      var_lst=nco_sng_lst_free(var_lst,var_nbr);
-    } /* end if */
-  } /* end for */
+    /* Count number of keys */
+    for(rgr_var_idx=0;(rgr_lst+rgr_var_idx)->key;rgr_var_idx++){
+      rgr_var_nbr=rgr_var_idx;
+    } /* !rgr_var_idx */
+    rgr_var_nbr++;
+  } /* !rgr_arg_nbr */
 
   /* NULL-initialize key-value properties required for string variables */
   rgr->area_nm=NULL; /* [sng] Name of variable containing gridcell area */
@@ -953,11 +939,11 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 
   /* Check-for and workaround faulty Tempest and MPAS-O/I grid sizes */
   if(flg_grd_in_1D && (rgr_map.src_grid_size != dmn_sz_in_int[0])){
-    (void)fprintf(stdout,"%s: INFO %s reports input grid dimension sizes disagree: rgr_map.src_grid_size = %ld != %d = dmn_sz_in[0]. Problem may be caused by incorrect src_grid_dims variable. This is a known issue with some Tempest mapfiles generated prior to ~20150901, and in some ESMF mapfiles for MPAS-O/I. This problem can be safely ignored if workaround succeeds. Attempting workaround ...\n",nco_prg_nm_get(),fnc_nm,rgr_map.src_grid_size,dmn_sz_in_int[0]);
+    (void)fprintf(stdout,"%s: INFO %s reports input grid dimension sizes disagree: rgr_map.src_grid_size = %ld != %d = dmn_sz_in[0]. Problem may be caused by incorrect src_grid_dims variable. This is a known issue with some TempestRemap mapfiles generated prior to ~20150901, and in some ESMF mapfiles for MPAS-O/I. This problem can be safely ignored if workaround succeeds. Attempting workaround ...\n",nco_prg_nm_get(),fnc_nm,rgr_map.src_grid_size,dmn_sz_in_int[0]);
       dmn_sz_in_int[0]=rgr_map.src_grid_size;
   } /* !bug */
   if(flg_grd_out_1D && (rgr_map.dst_grid_size != dmn_sz_out_int[0])){
-    (void)fprintf(stdout,"%s: INFO %s reports output grid dimension sizes disagree: rgr_map.dst_grid_size = %ld != %d = dmn_sz_out[0]. Problem may be caused by incorrect dst_grid_dims variable. This is a known issue with some Tempest mapfiles generated prior to ~20150901, and in some ESMF mapfiles for MPAS-O/I. This problem can be safely ignored if workaround succeeds. Attempting workaround ...\n",nco_prg_nm_get(),fnc_nm,rgr_map.dst_grid_size,dmn_sz_out_int[0]);
+    (void)fprintf(stdout,"%s: INFO %s reports output grid dimension sizes disagree: rgr_map.dst_grid_size = %ld != %d = dmn_sz_out[0]. Problem may be caused by incorrect dst_grid_dims variable. This is a known issue with some TempestRemap mapfiles generated prior to ~20150901, and in some ESMF mapfiles for MPAS-O/I. This problem can be safely ignored if workaround succeeds. Attempting workaround ...\n",nco_prg_nm_get(),fnc_nm,rgr_map.dst_grid_size,dmn_sz_out_int[0]);
     dmn_sz_out_int[0]=rgr_map.dst_grid_size;
   } /* !bug */
  
@@ -1358,13 +1344,13 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(idx == (long)grd_sz_out){
     if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"%s: INFO %s reports area_out from mapfile is everywhere zero. This is expected for bilinearly interpolated output maps produced by ESMF_RegridWeightGen. ",nco_prg_nm_get(),fnc_nm);
     if(flg_grd_out_2D && flg_grd_out_rct && (bnd_nbr_out == 2 || bnd_nbr_out == 4)){
-      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"Since the destination grid provides cell bounds information, NCO will diagnose area (and output it as a variable named \"%s\") from the destination gridcell boundaries. NCO diagnoses quadrilateral area for rectangular output grids from a formula that assumes that cell boundaries follow arcs of constant latitude and longitude. This differs from the area of cells with boundaries that follow great circle arcs (used by, e.g., E [...]
+      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"Since the destination grid provides cell bounds information, NCO will diagnose area (and output it as a variable named \"%s\") from the destination gridcell boundaries. NCO diagnoses quadrilateral area for rectangular output grids from a formula that assumes that cell boundaries follow arcs of constant latitude and longitude. This differs from the area of cells with boundaries that follow great circle arcs (used by, e.g., E [...]
       flg_dgn_area_out=True;
     }else if(flg_grd_out_2D && flg_grd_out_crv && (bnd_nbr_out == 2 || bnd_nbr_out == 4)){
-      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"Since the destination grid provides cell bounds information, NCO will diagnose area (and output it as a variable named \"%s\") from the destination gridcell boundaries. NCO diagnoses quadrilateral area for curvilinear output grids from formulae that assume that cell boundaries follow great circle arcs (as do, e.g., ESMF_RegridWeightGen and Tempest). This differs from the area of cells with boundaries that follow lines of co [...]
+      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"Since the destination grid provides cell bounds information, NCO will diagnose area (and output it as a variable named \"%s\") from the destination gridcell boundaries. NCO diagnoses quadrilateral area for curvilinear output grids from formulae that assume that cell boundaries follow great circle arcs (as do, e.g., ESMF_RegridWeightGen and TempestRemap). This differs from the area of cells with boundaries that follow lines  [...]
       flg_dgn_area_out=True;
     }else if(flg_grd_out_1D && flg_bnd_1D_usable){
-      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"Since the destination grid provides cell bounds information, NCO will diagnose area (and output it as a variable name \"%s\") from the destination gridcell boundaries. NCO diagnoses spherical polygon area for unstructured output grids from formulae that assume that cell boundaries follow great circle arcs (as do, e.g., ESMFRegridWeightGen and Tempest). This differs from the area of cells with boundaries that follow lines of [...]
+      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"Since the destination grid provides cell bounds information, NCO will diagnose area (and output it as a variable name \"%s\") from the destination gridcell boundaries. NCO diagnoses spherical polygon area for unstructured output grids from formulae that assume that cell boundaries follow great circle arcs (as do, e.g., ESMFRegridWeightGen and TempestRemap). This differs from the area of cells with boundaries that follow lin [...]
       flg_dgn_area_out=True;
     }else{ /* !1D */
       if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"However, NCO cannot find enough boundary information, or it is too stupid about spherical trigonometry, to diagnose area_out. NCO will output an area variable (named \"%s\") copied from the input mapfile. This area will be everywhere zero.\n",rgr->area_nm);
@@ -1437,7 +1423,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"%s: INFO %s reports global metadata specifies conservative remapping with normalization of type = %s. Furthermore, destination fractions frc_dst = dst_frac = frac_b = frc_out contain non-unity elements (maximum deviation from unity of %g occurs for frc_out[%ld] = %g). Thus normalization issues cannot be ignored. Will apply \'destarea\' normalization (i.e., divide by non-zero frc_out[dst_idx]) to all regridded arrays.\n",nco_p [...]
   } /* !sometimes non-unity */
   if(flg_frc_nrm && rgr->flg_rnr){
-    (void)fprintf(stdout,"%s: WARNING %s reports manual request (with --rnr) to renormalize fields with non-unity frc_dst = dst_frac = frac_b at same time global metadata specifies normalization type = %s. Normalizing twice may be an error, depending on intent of each. Call Charlie and tell him how NCO should handle this :)\n",nco_prg_nm_get(),fnc_nm,nco_rgr_nrm_sng(nco_rgr_nrm_typ));
+    (void)fprintf(stdout,"%s: INFO %s reports manual request (with --rnr) to renormalize fields with non-unity frc_dst = dst_frac = frac_b at same time global metadata specifies normalization type = %s. Normalizing twice can be an error, depending on intent of each. Charlie is all ears on how NCO should handle this :)\n",nco_prg_nm_get(),fnc_nm,nco_rgr_nrm_sng(nco_rgr_nrm_typ));
     //nco_exit(EXIT_FAILURE);
   } /* !flg_rnr */
 
@@ -2932,7 +2918,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 	
 	  for(idx_in=0;idx_in<var_sz_in;idx_in++){
 
-	    /* fxm CEWI fixes uninitialized warning*/
+	    /* fxm CEWI fixes uninitialized warning */
 	    idx_out=73;
 	    
 	    /* dmn_sbs_in are corresponding indices (subscripts) into N-D array */
@@ -3401,8 +3387,8 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
      Robert D. Miller, Computing the area of a spherical polygon, Graphic Gems IV, chapter II.4, pages 132-137.
      http://books.google.com/books?id=CCqzMm_-WucC&pg=PA132&lpg=PA132&dq=miller+area+spherical+polygon+gems&source=bl&ots=mrnvZ6NJcm&sig=CMg8eaD8dzP5snMaPeCQzgoFWUk&hl=sv&ei=4G-YTKv5GsWZOI-mmZQP&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBQQ6AEwAA#v=onepage&q&f=false  
      Mil94 contains similar ideas to my method for spherical polygons (decomposing into adjacent multiple triangles from single vertex)
-     However, his method places the single vertex at the pole, then adds signed areas to obtain the full polygon area
-     Unclear whether his method suffers from degraded precision because of roundoff error and long side-lengths
+     However, his method places single vertex at pole, then adds signed areas to obtain full polygon area
+     His method may suffer from degraded precision because of roundoff error and long side-lengths
      
      So-called "proper" spherical triangle are those for which all angles are less than pi, so a+b+c<3*pi
      Cartesian coordinates of (lat,lon)=(theta,phi) are (x,y,z)=(cos(theta)*cos(phi),cos(theta)*sin(phi),sin(theta)) 
@@ -3437,8 +3423,11 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
         Compute polygon centroid and treat this as hub from which spokes are drawn to all vertices
         This method requires computation of N triangles, though fewer sides due to optimization
 	Moreover, it works on all convex polygons and on slightly concave polygons
-	The centroid/hub has a clear view of the interior of most simple concave polygons */
-
+	Centroid/hub has clear view of interior of most simple concave polygons
+     4. L'Huillier method with exact RLL grids by Zender and Agress 20160918
+        A. Decompose polygon into triangles via and method (e.g., method 2 or 3 above)
+	B. Determine whether triangle is spherical or contains RLL (constant latitude)
+	C. Spherical triangles use L'Huillier, RLL triangles use series expansion */
   const char fnc_nm[]="nco_sph_plg_area()";
   const double dgr2rdn=M_PI/180.0;
   short int bnd_idx;
@@ -3466,6 +3455,12 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
     lon_bnd_sin[idx]=sin(lon_bnd_rdn[idx]);
     lat_bnd_sin[idx]=sin(lat_bnd_rdn[idx]);
   } /* !idx */
+  double area_crc; /* [sr] Latitude-triangle correction to spherical triangle area */
+  double area_ltr; /* [sr] Gridcell area allowing for latitude-triangles */
+  double area_ttl; /* [sr] Sphere area assuming spherical triangles */
+  double area_ltr_ttl; /* [sr] Sphere area allowing for latitude-triangles */
+  double area_crc_ttl; /* [sr] Latitude-triangle correction for whole sphere */
+  double area_crc_abs_ttl; /* [sr] Latitude-triangle absolute correction for whole sphere */
   double lat_dlt; /* [rdn] Latitudinal difference */
   double lon_dlt; /* [rdn] Longitudinal difference */
   double ngl_a; /* [rdn] Interior angle/great circle arc a */
@@ -3479,9 +3474,17 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
   long idx_a; /* [idx] Point A 1-D index */
   long idx_b; /* [idx] Point B 1-D index */
   long idx_c; /* [idx] Point C 1-D index */
+  nco_bool flg_ltr_cll; /* [flg] Any triangle in cell is latitude-triangle */
+  nco_bool flg_ltr_crr; /* [flg] Current triangle is latitude-triangle */
+  area_ttl=0.0;
+  area_ltr_ttl=0.0;
+  area_crc_ttl=0.0;
+  area_crc_abs_ttl=0.0;
   for(unsigned int col_idx=0;col_idx<col_nbr;col_idx++){
+    flg_ltr_cll=False;
     ngl_c=double_CEWI; /* Otherwise compiler unsure ngl_c is initialized first use */
     area[col_idx]=0.0;
+    area_ltr=0.0;
     tri_nbr=0;
     /* A is always first vertice */
     idx_a=bnd_nbr*col_idx; 
@@ -3490,6 +3493,7 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
     /* bnd_idx labels offset from point A of potential location of triangle points B and C 
        We know that bnd_idx(A) == 0, bnd_idx(B) < bnd_nbr-1, bnd_idx(C) < bnd_nbr */
     while(bnd_idx<bnd_nbr-1){
+      flg_ltr_crr=False;
       /* Only first triangle must search for B, subsequent triangles recycle previous C as current B */
       if(tri_nbr == 0){
 	/* Skip repeated points that must occur when polygon has fewer than allowed vertices */
@@ -3518,19 +3522,21 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
       tri_nbr++;
       /* Compute interior angle/great circle arc a for first triangle; subsequent triangles recycle previous arc c */
       if(tri_nbr == 1){
-	/* 20150831: Test by computing ncol=0 area in conus chevrons grid:
-	   ncks -O -D 5 -v FSNT --map ${DATA}/maps/map_ne30np4_to_fv257x512_aave.20150823.nc ${DATA}/ne30/rgr/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc ${DATA}/ne30/rgr/fv_FSNT.nc
+	/* 20150831: Test by computing ncol=0 area in conus chevrons grid, compare to MAT results
+	   ncremap -s ${DATA}/grids/ne30np4_pentagons.091226.nc -g ${DATA}/grids/257x512_SCRIP.20150901.nc -m ${DATA}/maps/map_ne30np4_to_fv257x512_bilin.20150901.nc
+	   ncremap -s ${DATA}/grids/257x512_SCRIP.20150901.nc -g ${DATA}/grids/conusx4v1np4_chevrons_scrip_c150815.nc -m ${DATA}/maps/map_fv257x512_to_conusx4v1np4_chevrons_bilin.20150901.nc
+	   ncks -O -D 5 -v FSNT --map ${DATA}/maps/map_ne30np4_to_fv257x512_bilin.150418.nc ${DATA}/ne30/rgr/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc ${DATA}/ne30/rgr/fv_FSNT.nc
 	   ncks -O -D 5 -v FSNT --map ${DATA}/maps/map_fv257x512_to_conusx4v1np4_chevrons_bilin.20150901.nc ${DATA}/ne30/rgr/fv_FSNT.nc ${DATA}/ne30/rgr/dogfood.nc
-	   ncks -H -s %20.15e -v area -d ncol,0 ${DATA}/ne30/rgr/dogfood.nc
-	   ncks -H -s %20.15e -v grid_area -d grid_size,0 ${DATA}/grids/conusx4v1np4_chevrons_scrip_c150815.nc
+	   ncks -H -s %20.15e, -v area -d ncol,0 ${DATA}/ne30/rgr/dogfood.nc
+	   ncks -H -s %20.15e, -v grid_area -d grid_size,0 ${DATA}/grids/conusx4v1np4_chevrons_scrip_c150815.nc
 	   
 	   ncol=0 on conus chevrons file:
 	   3.653857995295246e-05 raw GLL weight
-	   3.653857995294302e-05 matlab N-2 triangles
-	   3.653857995294301e-05 matlab N   triangles
+	   3.653857995294302e-05 matlab N-2 triangles (CSZ algorithm)
+	   3.653857995294301e-05 matlab N   triangles (MAT algorithm)
 	   3.653857995294258e-05 new NCO (haversine)
 	   3.653857995289623e-05 old NCO (acos) */
-	/* Computing great circle arcs over small arcs requires care since the central angle is near 0 degrees
+	/* Computing great circle arcs over small arcs requires care since central angle is near 0 degrees
 	   Cosine small angles changes slowly for such angles, and leads to precision loss
 	   Use haversine formula instead of spherical law of cosines formula
 	   https://en.wikipedia.org/wiki/Great-circle_distance */
@@ -3539,7 +3545,8 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
 	   lat_bnd_cos[idx_a]*lon_bnd_sin[idx_a]*lat_bnd_cos[idx_b]*lon_bnd_sin[idx_b]+
 	   lat_bnd_sin[idx_a]*lat_bnd_sin[idx_b];ngl_a=acos(cos_a); */
 	/* Interior angle/great circle arc a, haversine formula: */
-	lon_dlt=fabs(lon_bnd_rdn[idx_a]-lon_bnd_rdn[idx_b]);
+	// 20160918: Use branch cut rules for longitude
+	lon_dlt=fabs(nco_lon_dff_brnch_rdn(lon_bnd_rdn[idx_a],lon_bnd_rdn[idx_b]));
 	lat_dlt=fabs(lat_bnd_rdn[idx_a]-lat_bnd_rdn[idx_b]);
 	sin_hlf_tht=sqrt(pow(sin(0.5*lat_dlt),2)+lat_bnd_cos[idx_a]*lat_bnd_cos[idx_b]*pow(sin(0.5*lon_dlt),2));
 	ngl_a=2.0*asin(sin_hlf_tht);
@@ -3547,12 +3554,12 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
 	ngl_a=ngl_c;
       } /* !tri_nbr */
       /* Interior angle/great circle arc b */
-      lon_dlt=fabs(lon_bnd_rdn[idx_b]-lon_bnd_rdn[idx_c]);
+      lon_dlt=fabs(nco_lon_dff_brnch_rdn(lon_bnd_rdn[idx_b],lon_bnd_rdn[idx_c]));
       lat_dlt=fabs(lat_bnd_rdn[idx_b]-lat_bnd_rdn[idx_c]);
       sin_hlf_tht=sqrt(pow(sin(0.5*lat_dlt),2)+lat_bnd_cos[idx_b]*lat_bnd_cos[idx_c]*pow(sin(0.5*lon_dlt),2));
       ngl_b=2.0*asin(sin_hlf_tht);
       /* Interior angle/great circle arc c */
-      lon_dlt=fabs(lon_bnd_rdn[idx_c]-lon_bnd_rdn[idx_a]);
+      lon_dlt=fabs(nco_lon_dff_brnch_rdn(lon_bnd_rdn[idx_c],lon_bnd_rdn[idx_a]));
       lat_dlt=fabs(lat_bnd_rdn[idx_c]-lat_bnd_rdn[idx_a]);
       sin_hlf_tht=sqrt(pow(sin(0.5*lat_dlt),2)+lat_bnd_cos[idx_c]*lat_bnd_cos[idx_a]*pow(sin(0.5*lon_dlt),2));
       ngl_c=2.0*asin(sin_hlf_tht);
@@ -3568,25 +3575,122 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
       xcs_sph_qtr_tan=sqrt(tan(0.5*prm_smi)*tan(0.5*(prm_smi-ngl_a))*tan(0.5*(prm_smi-ngl_b))*tan(0.5*(prm_smi-ngl_c)));
       xcs_sph=4.0*atan(xcs_sph_qtr_tan);
       area[col_idx]+=xcs_sph;
+      area_ltr+=xcs_sph;
+      area_ttl+=xcs_sph;
+      area_ltr_ttl+=xcs_sph;
       /* Begin search for next B at current C */
       bnd_idx=idx_c-idx_a;
+      /* 20160918 from here to end of loop is non-spherical work
+	 Canonical latitude-triangle geometry has point A at apex and points B and C at same latitude
+	 Generate area field for latitude-triangles by fxm
+	 ncremap -s ${DATA}/grids/257x512_SCRIP.20150901.nc -g ${DATA}/grids/ne30np4_pentagons.091226.nc -m ${DATA}/maps/map_fv257x512_to_ne30np4_bilin.20150901.nc
+	 ncap2 -O -s area_b=0.0 ${DATA}/maps/map_fv257x512_to_ne30np4_bilin.20150901.nc ~/rgr/map_fv257x512_to_ne30np4_bilin.no_area_b.nc
+	 ncks -O -D 5 -v FSNT --map ${DATA}/maps/map_ne30np4_to_fv257x512_bilin.150418.nc ${DATA}/ne30/rgr/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc ${DATA}/ne30/rgr/fv_FSNT.nc
+	 ncks -O -D 5 -v FSNT --map ${DATA}/rgr/map_fv257x512_to_ne30np4_bilin.no_area_b.nc ${DATA}/ne30/rgr/fv_FSNT.nc ${DATA}/ne30/rgr/ne30_FSNT.nc > ~/foo.txt 2>&1 */
+      if(lat_bnd_rdn[idx_a] == lat_bnd_rdn[idx_b] ||
+	 lat_bnd_rdn[idx_b] == lat_bnd_rdn[idx_c] ||
+	 lat_bnd_rdn[idx_c] == lat_bnd_rdn[idx_a]){
+	flg_ltr_cll=flg_ltr_crr=True;
+      } /* endif */
+      if(flg_ltr_crr){
+	double ngl_ltr_a; /* [rdn] Interior angle/small circle arc a, canonical latitude-triangle geometry */
+	double ngl_ltr_b; /* [rdn] Interior angle/great circle arc b, canonical latitude-triangle geometry */
+	double ngl_ltr_c; /* [rdn] Interior angle/great circle arc c, canonical latitude-triangle geometry */
+	double ngl_plr; /* [rdn] Polar angle (co-latitude) */
+	long idx_ltr_a; /* [idx] Point A (apex) of canonical latitude-triangle geometry, 1-D index */
+	long idx_ltr_b; /* [idx] Point B (base) of canonical latitude-triangle geometry, 1-D index */
+	long idx_ltr_c; /* [idx] Point C (base) of canonical latitude-triangle geometry, 1-D index */
+	/* Rotate labels to standard position with vertex A, equi-latitude points B and C */
+	if(lat_bnd_rdn[idx_a] == lat_bnd_rdn[idx_b]){
+	  idx_ltr_a=idx_c;
+	  idx_ltr_b=idx_a;
+	  idx_ltr_c=idx_b;
+	  ngl_ltr_a=ngl_c;
+	  ngl_ltr_b=ngl_a;
+	  ngl_ltr_c=ngl_b;
+	  ngl_plr=fabs(M_PI_2-lat_bnd_rdn[idx_a]);
+	}else if(lat_bnd_rdn[idx_b] == lat_bnd_rdn[idx_c]){
+	  idx_ltr_a=idx_a;
+	  idx_ltr_b=idx_b;
+	  idx_ltr_c=idx_c;
+	  ngl_ltr_a=ngl_a;
+	  ngl_ltr_b=ngl_b;
+	  ngl_ltr_c=ngl_c;
+	  ngl_plr=fabs(M_PI_2-lat_bnd_rdn[idx_b]);
+	}else if(lat_bnd_rdn[idx_c] == lat_bnd_rdn[idx_a]){
+	  idx_ltr_a=idx_b;
+	  idx_ltr_b=idx_c;
+	  idx_ltr_c=idx_a;
+	  ngl_ltr_a=ngl_b;
+	  ngl_ltr_b=ngl_c;
+	  ngl_ltr_c=ngl_a;
+	  ngl_plr=fabs(M_PI_2-lat_bnd_rdn[idx_c]);
+	}else{
+	  abort();
+	} /* endif */
+	/* 20160918: Compute area of latitude triangle wedge exactly */
+	double xpn_x; /* [frc] Expansion parameter */
+	lon_dlt=fabs(nco_lon_dff_brnch_rdn(lon_bnd_rdn[idx_ltr_b],lon_bnd_rdn[idx_ltr_c]));
+	/* Numeric conditioning uncertain. Approaches divide-by-zero when lon_dlt << 1 */
+	xpn_x=lat_bnd_sin[idx_ltr_b]*(1.0-cos(lon_dlt))/sin(lon_dlt);
+	area_crc=2.0*atan(xpn_x);
+	if(xpn_x < 0.0) abort();
+	// if(lat_bnd[idx_ltr_b] > 0.0) area_crc+=-lon_dlt*lat_bnd_sin[idx_ltr_b]; else area_crc+=+lon_dlt*lat_bnd_sin[idx_ltr_b];
+	area_crc+=-lon_dlt*lat_bnd_sin[idx_ltr_b];
+	area_ltr+=area_crc;
+	area_ltr_ttl+=area_crc;
+	area_crc_ttl+=area_crc;
+	area_crc_abs_ttl+=fabs(area_crc);
+	if(0){
+	  /* 20160918: Compute area of latitude triangle wedge using power expansion */
+	  double xpn_x_sqr; /* [frc] Expansion parameter squared */
+	  double xpn_sum; /* [frc] Expansion sum */
+	  double xpn_nmr; /* [frc] Expansion term numerator */
+	  double xpn_trm; /* [frc] Expansion term */
+	  double xpn_dnm; /* [frc] Expansion term denominator */
+	  const unsigned short int rdr_xpn=3; /* [nbr] Order of N in trigonometric series expansion */
+	  unsigned short int idx_xpn; /* [idx] Index in series expansion */
+	  xpn_x=cos(ngl_plr)*(1.0-cos(lon_dlt))/sin(lon_dlt);
+	  xpn_x_sqr=xpn_x*xpn_x;
+	  xpn_nmr=xpn_x;
+	  xpn_dnm=1.0;
+	  xpn_trm=xpn_nmr/xpn_dnm;
+	  xpn_sum+=xpn_trm;
+	  for(idx_xpn=3;idx_xpn<=rdr_xpn;idx_xpn+=2){
+	    xpn_nmr*=xpn_x_sqr;
+	    xpn_dnm*=(idx_xpn-1)*idx_xpn;
+	    xpn_trm=xpn_nmr/xpn_dnm;
+	    xpn_sum+=xpn_trm;
+	  } /* !idx_xpn */
+	  (void)fprintf(stdout,"%s: Latitude-triangle area using series approximation...not implemented yet\n",nco_prg_nm_get());
+	} /* !0 */
+	if(nco_dbg_lvl_get() >= nco_dbg_std){
+	  (void)fprintf(stdout,"%s: INFO %s col_idx = %u triangle %d spherical area, latitude-triangle area, %% difference: %g, %g, %g\n",nco_prg_nm_get(),fnc_nm,col_idx,tri_nbr,xcs_sph,xcs_sph+area_crc,100.0*area_crc/xcs_sph);
+	  if(fabs(area_crc/xcs_sph) > 0.1){
+	    (void)fprintf(stdout,"%s: DBG Non-spherical correction exceeds 10%% for current triangle with ABC vertices at lat,lon [dgr] = %g, %g\n%g, %g\n%g, %g\n",nco_prg_nm_get(),lat_bnd[idx_ltr_a],lon_bnd[idx_ltr_a],lat_bnd[idx_ltr_b],lon_bnd[idx_ltr_b],lat_bnd[idx_ltr_c],lon_bnd[idx_ltr_c]);
+	  } /* !fabs */
+	} /* !dbg */
+      } /* !flg_ltr_crr */
     } /* !tri_idx */
-    if(nco_dbg_lvl_get() >= nco_dbg_io) (void)fprintf(stdout,"%s: INFO %s reports col_idx = %u has %d triangles\n",nco_prg_nm_get(),fnc_nm,col_idx,tri_nbr);
+    if(flg_ltr_cll){
+      /* Current gridcell contained at least one latitude-triangle */
+      (void)fprintf(stdout,"%s: INFO %s col_idx = %u spherical area, latitude-gridcell area, %% difference: %g, %g, %g\n",nco_prg_nm_get(),fnc_nm,col_idx,area[col_idx],area_ltr,100.0*(area_ltr-area[col_idx])/area[col_idx]);
+    } /* !flg_ltr_cll */    
   } /* !col_idx */
+  (void)fprintf(stdout,"%s: INFO %s total spherical area, latitude-gridcell area, %% difference, crc_ttl, crc_abs_ttl: %g, %g, %g, %g, %g\n",nco_prg_nm_get(),fnc_nm,area_ttl,area_ltr_ttl,100.0*(area_ltr_ttl-area_ttl)/area_ttl,area_crc_ttl,area_crc_abs_ttl);
   if(lat_bnd_rdn) lat_bnd_rdn=(double *)nco_free(lat_bnd_rdn);
   if(lon_bnd_rdn) lon_bnd_rdn=(double *)nco_free(lon_bnd_rdn);
   if(lat_bnd_cos) lat_bnd_cos=(double *)nco_free(lat_bnd_cos);
   if(lon_bnd_cos) lon_bnd_cos=(double *)nco_free(lon_bnd_cos);
   if(lat_bnd_sin) lat_bnd_sin=(double *)nco_free(lat_bnd_sin);
   if(lon_bnd_sin) lon_bnd_sin=(double *)nco_free(lon_bnd_sin);
-
 } /* !nco_sph_plg_area() */
 
 int /* O [enm] Return code */
-nco_rgr_tps /* [fnc] Regrid using Tempest library */
+nco_rgr_tps /* [fnc] Regrid using TempestRemap library */
 (rgr_sct * const rgr) /* I/O [sct] Regridding structure */
 {
-  /* Purpose: Regrid fields using Tempest remapping "library" (more precisely, executables)
+  /* Purpose: Regrid fields using TempestRemap "library" (more precisely, executables)
 
      Test Tempest library: no way to activate yet
      export DATA_TEMPEST='/data/zender/rgr';ncks -O --rgr=Y ${DATA}/rgr/essgcm14_clm.nc ~/foo.nc */
@@ -3601,7 +3705,7 @@ nco_rgr_tps /* [fnc] Regrid using Tempest library */
   int rcd_sys;
   int lat_nbr_rqs=180;
   int lon_nbr_rqs=360;
-  nco_rgr_cmd_typ nco_rgr_cmd; /* [enm] Tempest remap command enum */
+  nco_rgr_cmd_typ nco_rgr_cmd; /* [enm] TempestRemap command enum */
 
   char *nvr_DATA_TEMPEST; /* [sng] Directory where Tempest grids, meshes, and weights are stored */
   nvr_DATA_TEMPEST=getenv("DATA_TEMPEST");
@@ -3627,7 +3731,7 @@ nco_rgr_tps /* [fnc] Regrid using Tempest library */
   (void)sprintf(cmd_rgr,cmd_rgr_fmt,lat_nbr_rqs,lon_nbr_rqs,fl_grd_dst_cdl);
   rcd_sys=system(cmd_rgr);
   if(rcd_sys == -1){
-    (void)fprintf(stdout,"%s: ERROR %s unable to complete Tempest regridding command \"%s\"\n",nco_prg_nm_get(),fnc_nm,cmd_rgr);
+    (void)fprintf(stdout,"%s: ERROR %s unable to complete TempestRemap regridding command \"%s\"\n",nco_prg_nm_get(),fnc_nm,cmd_rgr);
     nco_exit(EXIT_FAILURE);
   } /* end if */
   if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stderr,"done\n");
@@ -3734,7 +3838,7 @@ nco_rgr_mth_sng /* [fnc] Convert regridding method enum to string */
   case nco_rgr_mth_conservative: return "Conservative remapping";
   case nco_rgr_mth_bilinear: return "Bilinear remapping";
   case nco_rgr_mth_none: return "none";
-  case nco_rgr_mth_unknown: return "Unknown (Tempest)";
+  case nco_rgr_mth_unknown: return "Unknown (TempestRemap)";
   default: nco_dfl_case_generic_err(); break;
   } /* end switch */
 
@@ -3767,7 +3871,7 @@ nco_rgr_nrm_sng /* [fnc] Convert regridding normalization enum to string */
   case nco_rgr_nrm_fracarea: return "fracarea";
   case nco_rgr_nrm_destarea: return "destarea";
   case nco_rgr_nrm_none: return "none";
-  case nco_rgr_nrm_unknown: return "Unknown (Tempest)";
+  case nco_rgr_nrm_unknown: return "Unknown (TempestRemap)";
   default: nco_dfl_case_generic_err(); break;
   } /* end switch */
 
@@ -3776,10 +3880,10 @@ nco_rgr_nrm_sng /* [fnc] Convert regridding normalization enum to string */
 } /* end nco_rgr_nrm_sng() */
 
 const char * /* O [sng] String containing regridding command and format */
-nco_tps_cmd_fmt_sng /* [fnc] Convert Tempest remap command enum to command string */
-(const nco_rgr_cmd_typ nco_rgr_cmd) /* I [enm] Tempest remap command enum */
+nco_tps_cmd_fmt_sng /* [fnc] Convert TempestRemap command enum to command string */
+(const nco_rgr_cmd_typ nco_rgr_cmd) /* I [enm] TempestRemap command enum */
 {
-  /* Purpose: Convert Tempest remap command enum to command string and format */
+  /* Purpose: Convert TempestRemap command enum to command string and format */
   switch(nco_rgr_cmd){
   case nco_rgr_ApplyOfflineMap:
     return "ApplyOfflineMap";
@@ -3813,10 +3917,10 @@ nco_tps_cmd_fmt_sng /* [fnc] Convert Tempest remap command enum to command strin
 } /* end nco_tps_cmd_fmt_sng() */
 
 const char * /* O [sng] String containing regridding command name */
-nco_tps_cmd_sng /* [fnc] Convert Tempest remap command enum to command name */
-(const nco_rgr_cmd_typ nco_rgr_cmd) /* I [enm] Tempest remap command enum */
+nco_tps_cmd_sng /* [fnc] Convert TempestRemap command enum to command name */
+(const nco_rgr_cmd_typ nco_rgr_cmd) /* I [enm] TempestRemap command enum */
 {
-  /* Purpose: Convert Tempest remap command enum to command string */
+  /* Purpose: Convert TempestRemap command enum to command string */
   switch(nco_rgr_cmd){
   case nco_rgr_ApplyOfflineMap: return "ApplyOfflineMap";
   case nco_rgr_CalculateDiffNorms: return "CalculateDiffNorms";
@@ -4094,8 +4198,8 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
   grd_crn_lon=(double *)nco_malloc(grd_crn_nbr*grd_sz_nbr*nco_typ_lng(crd_typ));
   
   /* Define variable values */
-  int lon_psn; /* [idx] Ordinal position of longitude size in rectangular grid */
-  int lat_psn; /* [idx] Ordinal position of latitude  size in rectangular grid */
+  int lon_psn=int_CEWI; /* [idx] Ordinal position of longitude size in rectangular grid */
+  int lat_psn=int_CEWI; /* [idx] Ordinal position of latitude  size in rectangular grid */
   if(grd_rnk_nbr == dmn_nbr_2D){
     lon_psn=0; /* SCRIP introduced [lon,lat] convention because more natural for Fortran */
     lat_psn=1;
@@ -5018,7 +5122,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   long crn_idx; /* [idx] Counting index for corners */
   long dmn_sz; /* [nbr] Size of current dimension */
   long grd_crn_nbr; /* [nbr] Number of corners in gridcell */
-  long grd_rnk_nbr; /* [nbr] Number of dimensions in grid */
+  long grd_rnk_nbr=int_CEWI; /* [nbr] Number of dimensions in grid */
   long grd_sz_nbr; /* [nbr] Number of gridcells in grid */
   long idx2; /* [idx] Counting index for unrolled grids */
   long idx; /* [idx] Counting index for unrolled grids */
@@ -5723,7 +5827,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	idx_fk=lat_idx*(lon_nbr+2)+lon_idx; /* 1D-offset of extrapolated point on bottom row of fake grid */
 	idx_rl=lat_idx*lon_nbr+lon_idx-1; /* 1D-offset of neighboring point on bottom row of real grid */
 	lat_ctr_fk[idx_fk]=lat_ctr[idx_rl]-(lat_ctr[idx_rl+lon_nbr]-lat_ctr[idx_rl]);
-	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]-nco_lon_dff_brnch(lon_ctr[idx_rl+lon_nbr],lon_ctr[idx_rl]);
+	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]-nco_lon_dff_brnch_dgr(lon_ctr[idx_rl+lon_nbr],lon_ctr[idx_rl]);
       } /* !lon */
       /* Top row */
       lat_idx=lat_nbr+1; /* lat idx of extrapolated point on fake grid */
@@ -5731,7 +5835,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	idx_fk=lat_idx*(lon_nbr+2)+lon_idx; /* 1D-offset of extrapolated point on top row of fake grid */
 	idx_rl=(lat_nbr-1)*lon_nbr+lon_idx-1; /* 1D-offset of neighboring point on top row of real grid */
 	lat_ctr_fk[idx_fk]=lat_ctr[idx_rl]+(lat_ctr[idx_rl]-lat_ctr[idx_rl-lon_nbr]);
-	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]+nco_lon_dff_brnch(lon_ctr[idx_rl],lon_ctr[idx_rl-lon_nbr]);
+	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]+nco_lon_dff_brnch_dgr(lon_ctr[idx_rl],lon_ctr[idx_rl-lon_nbr]);
       } /* !lon */
       /* Left side */
       lon_idx=0; /* lon idx of extrapolated point on fake grid */
@@ -5739,7 +5843,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	idx_fk=lat_idx*(lon_nbr+2)+lon_idx; /* 1D-offset of extrapolated point on left side of fake grid */
 	idx_rl=(lat_idx-1)*lon_nbr+lon_idx; /* 1D-offset of neighboring point on left side of real grid */
 	lat_ctr_fk[idx_fk]=lat_ctr[idx_rl]-(lat_ctr[idx_rl+1]-lat_ctr[idx_rl]);
-	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]-nco_lon_dff_brnch(lon_ctr[idx_rl+1],lon_ctr[idx_rl]);
+	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]-nco_lon_dff_brnch_dgr(lon_ctr[idx_rl+1],lon_ctr[idx_rl]);
       } /* !lat */
       /* Right side */
       lon_idx=lon_nbr+1; /* lon idx of extrapolated point on fake grid */
@@ -5747,20 +5851,20 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	idx_fk=lat_idx*(lon_nbr+2)+lon_idx; /* 1D-offset of extrapolated point on right side of fake grid */
 	idx_rl=(lat_idx-1)*lon_nbr+lon_idx-2; /* 1D-offset of neighboring point on right side of real grid */
 	lat_ctr_fk[idx_fk]=lat_ctr[idx_rl]+(lat_ctr[idx_rl]-lat_ctr[idx_rl-1]);
-	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]+nco_lon_dff_brnch(lon_ctr[idx_rl],lon_ctr[idx_rl-1]);
+	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl]+nco_lon_dff_brnch_dgr(lon_ctr[idx_rl],lon_ctr[idx_rl-1]);
       } /* !lat */
       /* LL */
       lat_ctr_fk[0]=lat_ctr_fk[lon_nbr+2]-(lat_ctr_fk[2*(lon_nbr+2)]-lat_ctr_fk[lon_nbr+2]);
-      lon_ctr_fk[0]=lon_ctr_fk[1]-nco_lon_dff_brnch(lon_ctr_fk[2],lon_ctr_fk[1]);
+      lon_ctr_fk[0]=lon_ctr_fk[1]-nco_lon_dff_brnch_dgr(lon_ctr_fk[2],lon_ctr_fk[1]);
       /* LR */
       lat_ctr_fk[lon_nbr+1]=lat_ctr_fk[2*(lon_nbr+2)-1]-(lat_ctr_fk[3*(lon_nbr+2)-1]-lat_ctr_fk[2*(lon_nbr+2)-1]);
-      lon_ctr_fk[lon_nbr+1]=lon_ctr_fk[lon_nbr]+nco_lon_dff_brnch(lon_ctr_fk[lon_nbr],lon_ctr_fk[lon_nbr-1]);
+      lon_ctr_fk[lon_nbr+1]=lon_ctr_fk[lon_nbr]+nco_lon_dff_brnch_dgr(lon_ctr_fk[lon_nbr],lon_ctr_fk[lon_nbr-1]);
       /* UR */
       lat_ctr_fk[(lat_nbr+2)*(lon_nbr+2)-1]=lat_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-1]+(lat_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-1]-lat_ctr_fk[lat_nbr*(lon_nbr+2)-1]);
-      lon_ctr_fk[(lat_nbr+2)*(lon_nbr+2)-1]=lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-2]+nco_lon_dff_brnch(lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-2],lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-3]);
+      lon_ctr_fk[(lat_nbr+2)*(lon_nbr+2)-1]=lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-2]+nco_lon_dff_brnch_dgr(lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-2],lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)-3]);
       /* UL */
       lat_ctr_fk[(lat_nbr+1)*(lon_nbr+2)]=lat_ctr_fk[lat_nbr*(lon_nbr+2)]+(lat_ctr_fk[lat_nbr*(lon_nbr+2)]-lat_ctr_fk[(lat_nbr-1)*(lon_nbr+2)]);
-      lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)]=lon_ctr_fk[lat_nbr*(lon_nbr+2)+1]-nco_lon_dff_brnch(lon_ctr_fk[lat_nbr*(lon_nbr+2)+2],lon_ctr_fk[lat_nbr*(lon_nbr+2)+1]);
+      lon_ctr_fk[(lat_nbr+1)*(lon_nbr+2)]=lon_ctr_fk[lat_nbr*(lon_nbr+2)+1]-nco_lon_dff_brnch_dgr(lon_ctr_fk[lat_nbr*(lon_nbr+2)+2],lon_ctr_fk[lat_nbr*(lon_nbr+2)+1]);
 
       if(nco_dbg_lvl_get() >= nco_dbg_std){
 	long idx_dbg;
@@ -5791,6 +5895,8 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       double *crn_lon;
       crn_lat=(double *)nco_malloc(grd_crn_nbr*sizeof(double));
       crn_lon=(double *)nco_malloc(grd_crn_nbr*sizeof(double));
+      size_t wrn_nbr_max=20;
+      size_t wrn_nbr=0;
       for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
 	for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
 	  /* 9-point template valid at all interior (non-edge) points in real grid, and at all points (including edges) in fake grid
@@ -5851,7 +5957,11 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	  crn_lon[2]=lon_crn[idx_crn_ur];
 	  crn_lon[3]=lon_crn[idx_crn_ul];
 	  flg_ccw=nco_ccw_chk(crn_lat,crn_lon,grd_crn_nbr,idx_ccw,rcr_lvl);
-	  if(!flg_ccw) (void)fprintf(stdout,"%s: %s WARNING reports non-CCW gridcell at idx=%li, (lat,lon)_idx=(%li,%li), (lat,lon) = (%g, %g)\n",nco_prg_nm_get(),fnc_nm,idx_rl,lat_idx,lon_idx,lat_ctr[lat_idx],lon_ctr[lon_idx]);
+	  if(!flg_ccw && wrn_nbr < wrn_nbr_max){
+	    (void)fprintf(stdout,"%s: %s WARNING reports non-CCW gridcell at idx=%li, (lat,lon)_idx=(%li,%li), (lat,lon) = (%g, %g)\n",nco_prg_nm_get(),fnc_nm,idx_rl,lat_idx,lon_idx,lat_ctr[lat_idx],lon_ctr[lon_idx]);
+	    wrn_nbr++;
+	    if(wrn_nbr == wrn_nbr_max) (void)fprintf(stdout,"%s: %s INFO Number of non-CCW errors reached maximum = %li, not printing anymore\n",nco_prg_nm_get(),fnc_nm,wrn_nbr_max);
+	  } /* endif */
 	  lat_crn[idx_crn_ll]=crn_lat[0];
 	  lat_crn[idx_crn_lr]=crn_lat[1];
 	  lat_crn[idx_crn_ur]=crn_lat[2];
@@ -6608,14 +6718,14 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 } /* !nco_grd_nfr() */
 
 double /* O [dgr] Longitude difference (lon_r-lon_l) */
-nco_lon_dff_brnch /* [fnc] Subtract longitudes with branch-cut rules */
+nco_lon_dff_brnch_dgr /* [fnc] Subtract longitudes with branch-cut rules */
 (double lon_r, /* I [dgr] Longitude on right of gridcell (subtractor) */
  double lon_l) /* I [dgr] Longitude on  left of gridcell (subtractee) */
 {
   /* Purpose: Return difference of two longitudes in degrees
      Assume longitudes are within 180 degrees of eachother
      Default orientation is monotonically increasing longitude from left to right */
-  const char fnc_nm[]="nco_lon_dff_brnch()";
+  const char fnc_nm[]="nco_lon_dff_brnch_dgr()";
   const double lon_dff=lon_r-lon_l; /* [dgr] Longitude difference (lon_r-lon_l) */
   if(lon_dff >= 180.0){
     (void)fprintf(stdout,"%s: WARNING %s reports lon_r, lon_l, lon_dff = %g, %g, %g\n",nco_prg_nm_get(),fnc_nm,lon_r,lon_l,lon_dff);
@@ -6625,7 +6735,30 @@ nco_lon_dff_brnch /* [fnc] Subtract longitudes with branch-cut rules */
   } /* !lon_dff */
 
   return lon_dff;
-} /* !nco_lon_dff_brnch() */
+} /* !nco_lon_dff_brnch_dgr() */
+
+double /* O [rdn] Longitude difference (lon_r-lon_l) */
+nco_lon_dff_brnch_rdn /* [fnc] Subtract longitudes with branch-cut rules */
+(double lon_r, /* I [rdn] Longitude on right of gridcell (subtractor) */
+ double lon_l) /* I [rdn] Longitude on  left of gridcell (subtractee) */
+{
+  /* Purpose: Return difference of two longitudes in radians
+     Assume longitudes are within pi radians of eachother
+     Default orientation is monotonically increasing longitude from left to right */
+  const char fnc_nm[]="nco_lon_dff_brnch_rdn()";
+  const double lon_dff=lon_r-lon_l; /* [rdn] Longitude difference (lon_r-lon_l) */
+  //nco_bool dbg_prn=False; /* [flg] Print warning when longitude difference is suspicious */
+  /* longitudes on different branch cuts are expected when computing polygon area, so warn only if requested with high debugging level */
+  if(lon_dff >= M_PI){
+    if(nco_dbg_lvl_get() >= nco_dbg_crr) (void)fprintf(stdout,"%s: WARNING %s reports lon_r, lon_l, lon_dff = %g, %g, %g\n",nco_prg_nm_get(),fnc_nm,lon_r,lon_l,lon_dff);
+    return lon_dff-M_PI-M_PI;
+  }else if(lon_dff <= -M_PI){
+    if(nco_dbg_lvl_get() >= nco_dbg_crr) (void)fprintf(stdout,"%s: WARNING %s reports lon_r, lon_l, lon_dff = %g, %g, %g\n",nco_prg_nm_get(),fnc_nm,lon_r,lon_l,lon_dff);
+    return lon_dff+M_PI+M_PI;
+  } /* !lon_dff */
+
+  return lon_dff;
+} /* !nco_lon_dff_brnch_rdn() */
 
 double /* O [dgr] Longitude average (lon_r-lon_l) */
 nco_lon_crn_avg_brnch /* [fnc] Average quadrilateral longitude with branch-cut rules */
diff --git a/src/nco/nco_rgr.h b/src/nco/nco_rgr.h
index 757a007..b8f5f99 100644
--- a/src/nco/nco_rgr.h
+++ b/src/nco/nco_rgr.h
@@ -207,10 +207,15 @@ extern "C" {
   (const nco_rgr_cmd_typ nco_rgr_cmd); /* I [enm] Tempest remap command enum */
 
   double /* O [dgr] Longitude difference (lon_r-lon_l) */
-  nco_lon_dff_brnch /* [fnc] Subtract longitudes with branch-cut rules */
+  nco_lon_dff_brnch_dgr /* [fnc] Subtract longitudes with branch-cut rules */
   (double lon_r, /* I [dgr] Longitude on right of gridcell (subtractor) */
    double lon_l); /* I [dgr] Longitude on  left of gridcell (subtractee) */
 
+  double /* O [rdn] Longitude difference (lon_r-lon_l) */
+  nco_lon_dff_brnch_rdn /* [fnc] Subtract longitudes with branch-cut rules */
+  (double lon_r, /* I [rdn] Longitude on right of gridcell (subtractor) */
+   double lon_l); /* I [rdn] Longitude on  left of gridcell (subtractee) */
+
   double /* O [dgr] Longitude average (lon_r-lon_l) */
   nco_lon_crn_avg_brnch /* [fnc] Average quadrilateral longitude with branch-cut rules */
   (double lon_ll, /* I [dgr] Longitude at lower left  of gridcell */
diff --git a/src/nco/nco_sld.c b/src/nco/nco_sld.c
index 8e32ff5..06a2a93 100644
--- a/src/nco/nco_sld.c
+++ b/src/nco/nco_sld.c
@@ -19,7 +19,7 @@ nco_trr_ini /* [fnc] Initialize Terraref structure */
  char * const trr_out, /* I [sng] File containing netCDF Terraref imagery */
  char * const trr_wxy) /* I [sng] Terraref dimension sizes */
 {
-  /* Purpose: Initialize regridding structure */
+  /* Purpose: Initialize Terraref structure */
      
   const char fnc_nm[]="nco_trr_ini()";
   
@@ -54,37 +54,22 @@ nco_trr_ini /* [fnc] Initialize Terraref structure */
   } /* endif dbg */
   
   /* Parse extended kvm options */
-  int trr_arg_idx; /* [idx] Index over trr_arg (i.e., separate invocations of "--trr var1[,var2]=val") */
   int trr_var_idx; /* [idx] Index over trr_lst (i.e., all names explicitly specified in all "--trr var1[,var2]=val" options) */
   int trr_var_nbr=0;
   kvm_sct *trr_lst; /* [sct] List of all regrid specifications */
-  kvm_sct kvm;
+  char *sng_fnl=NULL;
 
-  trr_lst=(kvm_sct *)nco_malloc(NC_MAX_VARS*sizeof(kvm_sct));
+  /* Join arguments together */
+  sng_fnl=nco_join_sng(trr_arg,trr_arg_nbr);
+  trr_lst=nco_arg_mlt_prs(sng_fnl);
 
-  /* Parse TRRs */
-  for(trr_arg_idx=0;trr_arg_idx<trr_arg_nbr;trr_arg_idx++){
-    if(!strstr(trr_arg[trr_arg_idx],"=")){
-      (void)fprintf(stdout,"%s: Invalid --trr specification: %s. Must contain \"=\" sign, e.g., \"key=value\".\n",nco_prg_nm_get(),trr_arg[trr_arg_idx]);
-      if(trr_lst) trr_lst=(kvm_sct *)nco_free(trr_lst);
-      nco_exit(EXIT_FAILURE);
-    } /* endif */
-    kvm=nco_sng2kvm(trr_arg[trr_arg_idx]);
-    /* nco_sng2kvm() converts argument "--trr one,two=3" into kvm.key="one,two" and kvm.val=3
-       Then nco_lst_prs_2D() converts kvm.key into two items, "one" and "two", with the same value, 3 */
-    if(kvm.key){
-      int var_idx; /* [idx] Index over variables in current TRR argument */
-      int var_nbr; /* [nbr] Number of variables in current TRR argument */
-      char **var_lst;
-      var_lst=nco_lst_prs_2D(kvm.key,",",&var_nbr);
-      for(var_idx=0;var_idx<var_nbr;var_idx++){ /* Expand multi-variable specification */
-        trr_lst[trr_var_nbr].key=strdup(var_lst[var_idx]);
-        trr_lst[trr_var_nbr].val=strdup(kvm.val);
-        trr_var_nbr++;
-      } /* end for */
-      var_lst=nco_sng_lst_free(var_lst,var_nbr);
-    } /* end if */
-  } /* end for */
+  if(sng_fnl) sng_fnl=(char *)nco_free(sng_fnl);
+
+  /* jm fxm use more descriptive name than i---what does i count? */
+  for(int index=0;(trr_lst+index)->key;index++){
+      trr_var_nbr=index;
+  } /* end loop over i */
+  trr_var_nbr++;
   
   /* NULL-initialize key-value properties required for string variables */
   trr->ttl=NULL; /* [sng] Title */
@@ -238,14 +223,12 @@ int /* O [rcd] Return code */
 nco_trr_read /* [fnc] Read, parse, and print contents of TERRAREF file */
 (trr_sct *trr) /* I/O [sct] Terraref information */
 {
-  /* Purpose: Read TERRAREF file */
+  /* Purpose: Read raw TERRAREF input file, write netCDF4 output */
   const char fnc_nm[]="nco_trr_read()"; /* [sng] Function name */
 
   const int dmn_nbr_3D=3; /* [nbr] Rank of 3-D grid variables */
   const int dmn_nbr_grd_max=dmn_nbr_3D; /* [nbr] Maximum rank of grid variables */
 
-  //  const nc_type crd_typ=NC_FLOAT;
-
   char *fl_in;
   char *fl_out;
   char *fl_out_tmp=NULL_CEWI;
@@ -258,13 +241,14 @@ nco_trr_read /* [fnc] Read, parse, and print contents of TERRAREF file */
 
   int dmn_ids[dmn_nbr_grd_max]; /* [id] Dimension IDs array for output variable */
 
-  int dmn_idx_wvl; /* [idx] Index of wavelength dimension */
-  int dmn_idx_ydm; /* [idx] Index of y-coordinate dimension */
-  int dmn_idx_xdm; /* [idx] Index of x-coordinate dimension */
+  int dmn_idx_wvl=int_CEWI; /* [idx] Index of wavelength dimension */
+  int dmn_idx_ydm=int_CEWI; /* [idx] Index of y-coordinate dimension */
+  int dmn_idx_xdm=int_CEWI; /* [idx] Index of x-coordinate dimension */
   int dmn_id_wvl; /* [id] Wavelength dimension ID */
   int dmn_id_xdm; /* [id] X-dimension ID */
   int dmn_id_ydm; /* [id] Y-dimension ID */
   int dfl_lvl; /* [enm] Deflate level [0..9] */
+  /* Terraref raw image files can be ~64 GB large so use netCDF4 */
   int fl_out_fmt=NC_FORMAT_NETCDF4; /* [enm] Output file format */
   int out_id; /* I [id] Output netCDF file ID */
   int rcd=NC_NOERR;
@@ -413,6 +397,9 @@ nco_trr_read /* [fnc] Read, parse, and print contents of TERRAREF file */
     dmn_idx_wvl=1;
     dmn_idx_ydm=0;
     dmn_idx_xdm=2;
+  }else{
+    (void)fprintf(stderr,"%s: ERROR %s reports unknown ntl_typ_out = %d\n",nco_prg_nm_get(),fnc_nm,ntl_typ_out);
+    nco_exit(EXIT_FAILURE);
   } /* !ntl_typ_out */
   dmn_ids[dmn_idx_wvl]=dmn_id_wvl;
   dmn_ids[dmn_idx_xdm]=dmn_id_xdm;
diff --git a/src/nco/nco_sng_utl.c b/src/nco/nco_sng_utl.c
index fcf55e7..126c289 100644
--- a/src/nco/nco_sng_utl.c
+++ b/src/nco/nco_sng_utl.c
@@ -9,6 +9,30 @@
 
 #include "nco_sng_utl.h" /* String utilities */
 
+#ifdef NEED_STRSEP
+/* 20161106 UNIX always provides strsep(), MSVC never does */
+char * /* O [sng] String to separate */
+strsep /* [fnc] Separate strings */
+(char ** const sng_trg, /* I [sng] String to separate */
+ const char * const sng_dlm) /* I [sng] Delimiter */
+{
+  /* Purpose: NCO replacement for strsep() for Windows MSVC
+     http://stackoverflow.com/questions/8512958/is-there-a-windows-variant-of-strsep */
+  char* sng_srt = *sng_trg;
+  char* sng_ptr;
+
+  sng_ptr= (sng_srt != NULL) ? strpbrk(sng_srt,sng_dlm) : NULL;
+
+  if(sng_ptr == NULL){
+    *sng_trg = NULL;
+  }else{
+    *sng_ptr='\0';
+    *sng_trg=sng_ptr+1;
+  } /* endif */
+  return sng_srt;
+} /* !strsep() */
+#endif /* !NEED_STRSEP */
+
 #ifdef NEED_STRCASECMP
 int /* O [enm] [-1,0,1] sng_1 [<,=,>] sng_2 */
 strcasecmp /* [fnc] Lexicographical case-insensitive string comparison */
@@ -292,6 +316,74 @@ nm2sng_cdl /* [fnc] Turn variable/dimension/attribute name into legal CDL */
   return nm_cdl;
 } /* end nm2sng_cdl() */
 
+char * /* O [sng] JSON-compatible name */
+nm2sng_jsn /* [fnc] Turn variable/dimension/attribute name into legal CDL */
+(const char * const nm_sng) /* I [sng] Name to CDL-ize */
+{
+  /* Valid JSON strings can be any selected set of control chars, any non-conrol chars from ASCII and Unicode 
+     Leave unicode for now see Reference: http://www.json.org */   
+ 
+  char *chr_in_ptr; /* [sng] Pointer to current character in input name */
+  char *chr_out_ptr; /* [sng] Pointer to current character in output name */
+  char *nm_jsn; /* [sng] CDL-compatible name */
+  char *nm_cpy; /* [sng] Copy of input */
+
+  int nm_lng; /* [nbr] Length of original name */
+  
+  if(nm_sng == NULL) return NULL;
+
+  /* Otherwise name may contain special character(s)... */
+  nm_lng=strlen(nm_sng);
+  /* Maximum conceivable length of CDL-ized name */
+  chr_out_ptr=nm_jsn=(char *)nco_malloc(4*nm_lng+1L);
+  /* Copy to preserve const-ness */
+  chr_in_ptr=nm_cpy=(char *)strdup(nm_sng);
+  /* NUL-terminate in case input string is empty so will be output string */
+  chr_out_ptr[0]='\0';
+
+  /* Search and replace special characters */
+  while(*chr_in_ptr)
+  {
+    if(iscntrl(*chr_in_ptr))
+    { 
+      switch(*chr_in_ptr)
+      {    
+         case '\b':
+         case '\f':
+         case '\n':
+         case '\r':
+         case '\t': 
+         case '\\': 
+         case '\"': 
+	 /* according to json spec control char  '/' should be escaped bu this is mangles filepaths so leave it out for now */
+         /* case '\/': */
+         case '\0':	
+           *chr_out_ptr++='\\';
+	   *chr_out_ptr++=*chr_in_ptr;
+	   break;
+         default: 
+            /* ignore other control chars */
+      	  break;
+      }
+    }
+    else
+    {
+      *chr_out_ptr++=*chr_in_ptr;
+    }
+    /* Advance character */
+    chr_in_ptr++;
+  }      
+  /* NUL-terminate */
+  *chr_out_ptr='\0';
+
+  /* Free memory */
+  nm_cpy=(char *)nco_free(nm_cpy);
+
+  return nm_jsn;
+} /* end nm2sng_jsn() */
+
+
+
 char * /* O [sng] CDL-compatible name */
 nm2sng_fl /* [fnc] Turn file name into legal string for shell commands */
 (const char * const nm_sng) /* I [sng] Name to sanitize */
@@ -411,7 +503,7 @@ chr2sng_cdl /* [fnc] Translate C language character to printable, visible ASCII
   } /* end switch */
 
   return val_sng;
-} /* end chr2sng_cdl(0 */
+} /* end chr2sng_cdl() */
 
 char * /* O [sng] String containing printable result */
 chr2sng_xml /* [fnc] Translate C language character to printable, visible ASCII bytes */
@@ -441,7 +533,35 @@ chr2sng_xml /* [fnc] Translate C language character to printable, visible ASCII
   } /* end switch */
 
   return val_sng;
-} /* end chr2sng_xml(0 */
+} /* end chr2sng_xml() */
+
+char * /* O [sng] String containing printable result */
+chr2sng_jsn /* [fnc] Translate C language character to printable, visible ASCII bytes */
+(const char chr_val, /* I [chr] Character to process */
+ char * const val_sng) /* I/O [sng] String to stuff printable result into */
+{
+  /* Purpose: Translate character to C-printable, visible ASCII bytes for JSON
+     Reference: http://www.json.org */
+  switch(chr_val){              /* man ascii:Oct   Dec   Hex   Char \X  */
+  case '\b': strcpy(val_sng,"\\b"); break; /* 010   8     08    BS  '\b' Backspace */
+  case '\f': strcpy(val_sng,"\\f"); break; /* 014   12    0C    FF  '\f' Formfeed */
+  case '\n': strcpy(val_sng,"\\n"); break; /* 012   10    0A    LF  '\n' Linefeed */
+  case '\r': strcpy(val_sng,"\\r"); break; /* 015   13    0D    CR  '\r' Carriage return */
+  case '\t': strcpy(val_sng,"\\t"); break; /* 011   9     09    HT  '\t' Horizontal tab */
+  case '\\': strcpy(val_sng,"\\\\"); break; /* 134  92    5C    \   '\\' */
+  case '\"': strcpy(val_sng,"\\\""); break;/* Unsure why or if this works! */
+  /* fxm: According to JSON spec '/' should be escaped but this mangles UNIX filepaths so leave it out for now */
+  /* case '\/': strcpy(val_sng,"\\/"); break; */ /* 057   47    2F    /   '\\' */
+  case '\0':	
+    break;
+  default: 
+    /* json is quite strict about control-chars - only the above are allowed */
+    if(iscntrl(chr_val)) *val_sng=0; else sprintf(val_sng,"%c",chr_val);
+    break;
+  } /* end switch */
+
+  return val_sng;
+} /* end chr2sng_jsn() */
 
 int /* O [nbr] Number of escape sequences translated */
 sng_ascii_trn /* [fnc] Replace C language '\X' escape codes in string with ASCII bytes */
@@ -645,79 +765,3 @@ nco_sng2typ /* [fnc] Convert user-supplied string to netCDF type enum */
 
 } /* end nco_sng2typ() */
 
-kvm_sct /* O [sct] Key-value pair */
-nco_sng2kvm /* [fnc] Parse string into key-value pair */
-(char *sng) /* I [sng] String to parse, including "=" */
-{
-  /* Purpose: Convert string separated by single delimiter into two strings
-     Routine converts argument "--ppc key1,key2,...,keyN=val" into kvm.key="key1,key2,...keyN" and kvm.val=val
-     e.g., routine converts argument "--ppc one,two=3" into kvm.key="one,two" and kvm.val=3 */
-  char *tkn_sng;
-  const char dlm[]="="; /* [sng] Delimiter */
-  int arg_idx=0; /* [nbr] */
-  kvm_sct kvm;
-
-  /* 20160324: Initialize val to NULL so that can handle empty values, e.g., --gaa history="" */
-  kvm.val=NULL;
-  
-  /* NB: Replace strtok() by strsep()? strtok() does not handle consecutive delimiters well
-     20160216: String values that contain delimiter will fail
-     fxm replace all but first delimiter with temporary character until strtok() finishes */
-  tkn_sng=strtok(sng,dlm);
-  while(tkn_sng){
-    arg_idx++;
-    /* fxm: Whitespace-stripping may be unnecessary */
-    nco_sng_strip(tkn_sng);
-    switch(arg_idx){
-    case 1:
-      kvm.key=strdup(tkn_sng);
-      break;
-    case 2:
-      kvm.val=strdup(tkn_sng);
-      break;
-    default:
-      (void)fprintf(stderr,"nco_sng2kvm() cannot get key-value pair from input: %s\n",sng);
-      break;
-    }/* end switch */
-    tkn_sng=strtok(NULL,dlm);
-  }/* end while */
-  return kvm;
-} /* end nco_sng2kvm() */
-
-char * /* O [sng] Stripped-string */
-nco_sng_strip /* [fnc] Strip leading and trailing white space */
-(char *sng) /* I/O [sng] String to strip */
-{
-  /* fxm: seems not working for \n??? */
-  char *srt=sng;
-  while(isspace(*srt)) srt++;
-  size_t end=strlen(srt);
-  if(srt != sng){
-    memmove(sng,srt,end);
-    sng[end]='\0';
-  } /* endif */
-  while(isblank(*(sng+end-1L))) end--;
-  sng[end]='\0';
-  return sng;
-} /* end nco_sng_strip() */
-
-kvm_sct * /* O [sct] Pointer to free'd kvm list */
-nco_kvm_lst_free /* [fnc] Relinquish dynamic memory from list of kvm structures */
-(kvm_sct *kvm, /* I/O [sct] List of kvm structures */
- const int kvm_nbr) /* I [nbr] Number of kvm structures */
-{
-  /* Purpose: Relinquish dynamic memory from list of kvm structures
-     End of list is indicated by NULL in key slot */
-  for(int kvm_idx=0;kvm_idx<kvm_nbr;kvm_idx++){
-    kvm[kvm_idx].key=(char *)nco_free(kvm[kvm_idx].key);
-    kvm[kvm_idx].val=(char *)nco_free(kvm[kvm_idx].val);
-  } /* end for */
-  if(kvm) kvm=(kvm_sct *)nco_free(kvm);
-  return kvm;
-} /* end nco_kvm_lst_free() */
-
-void
-nco_kvm_prn(kvm_sct kvm)
-{
-  if(kvm.key) (void)fprintf(stdout,"%s = %s\n",kvm.key,kvm.val); else return;
-} /* end nco_kvm_prn() */
diff --git a/src/nco/nco_sng_utl.h b/src/nco/nco_sng_utl.h
index ded2aa7..f7d6301 100644
--- a/src/nco/nco_sng_utl.h
+++ b/src/nco/nco_sng_utl.h
@@ -48,6 +48,13 @@ extern "C" {
   (const int chr); /* I [enm] Character to check */
 #endif /* !NEED_ISBLANK */
   
+#ifdef NEED_STRSEP
+  char * /* O [sng] String to separate */
+  strsep /* [fnc] Separate strings */
+  (char ** const sng_trg, /* I [sng] String to separate */
+   const char * const sng_dlm); /* I [sng] Delimiter */
+#endif /* !NEED_STRSEP */
+
 #ifdef NEED_STRCASECMP
   int /* O [enm] [-1,0,1] sng_1 [<,=,>] sng_2 */
   strcasecmp /* [fnc] Lexicographical case-insensitive string comparison */
@@ -94,6 +101,11 @@ extern "C" {
   char * /* O [sng] CDL-compatible name */
   nm2sng_cdl /* [fnc] Turn variable/dimension/attribute name into legal CDL */
   (const char * const nm_sng); /* I [sng] Name to CDL-ize */
+
+  char * /* O [sng] JSON -compatible name */
+  nm2sng_jsn /* [fnc] Turn variable/dimension/attribute name into legal JSON */
+  (const char * const nm_sng); /* I [sng] Name to CDL-ize */
+
   
   char * /* O [sng] CDL-compatible name */
   nm2sng_fl /* [fnc] Turn file name into legal string for shell commands */
@@ -108,6 +120,11 @@ extern "C" {
   chr2sng_xml /* [fnc] Translate C language character to printable, visible ASCII bytes */
   (const char chr_val, /* I [chr] Character to process */
    char * const val_sng); /* I/O [sng] String to stuff printable result into */
+
+  char * /* O [sng] String containing printable result */
+  chr2sng_jsn /* [fnc] Translate C language character to printable, visible ASCII bytes */
+  (const char chr_val, /* I [chr] Character to process */
+   char * const val_sng); /* I/O [sng] String to stuff printable result into */
   
   int /* O [nbr] Number of escape sequences translated */
   sng_ascii_trn /* [fnc] Replace C language '\X' escape codes in string with ASCII bytes */
@@ -126,23 +143,6 @@ extern "C" {
   nco_sng2typ /* [fnc] Convert user-supplied string to netCDF type enum */
   (const char * const typ_sng); /* I [sng] String indicating type */
 
-  kvm_sct /* O [sct] Key-value pair */
-  nco_sng2kvm /* [fnc] Parse string into key-value pair */
-  (char *sng); /* I [sng] String to parse, including "=" */
-  
-  char * /* O [sng] Stripped-string */
-  nco_sng_strip /* [fnc] Strip leading and trailing white space */
-  (char *sng); /* I/O [sng] String to strip */
-  
-  kvm_sct * /* O [sct] Pointer to free'd kvm list */
-  nco_kvm_lst_free /* [fnc] Relinquish dynamic memory from list of kvm structures */
-  (kvm_sct *kvm, /* I/O [sct] List of kvm structures */
-   const int kvm_nbr); /* I [nbr] Number of kvm structures */
-  
-  void
-  nco_kvm_prn /* [fnc] Print kvm contents */
-  (kvm_sct kvm); /* [fnc] kvm to print */
-  
 #ifdef __cplusplus
 } /* end extern "C" */
 #endif /* __cplusplus */
diff --git a/src/nco/nco_var_lst.c b/src/nco/nco_var_lst.c
index bad73b9..60e899a 100644
--- a/src/nco/nco_var_lst.c
+++ b/src/nco/nco_var_lst.c
@@ -1073,13 +1073,13 @@ nco_var_lst_dvd /* [fnc] Divide input lists into output lists */
       (void)fprintf(stdout,"%s: HINT Extraction list must contain a variable that shares at least one dimension with the re-order list\n",nco_prg_nm_get());
       break;
     case ncra:
-      (void)fprintf(stdout,"%s: HINT Extraction list must contain at least one record variable that is not NC_CHAR or NC_STRING. A record variable is a variable defined with a record dimension. Often the record dimension, aka unlimited dimension, refers to time. For more information on creating record dimensions within existing datasets, see http://nco.sf.net/nco.html#mk_rec_dmn\n",nco_prg_nm_get());
+      (void)fprintf(stdout,"%s: HINT Extraction list must contain at least one record variable that is not NC_CHAR or NC_STRING. A record variable is a variable defined with a record dimension. Often the record dimension, aka unlimited dimension, refers to time. To change an existing dimension from a fixed to a record dimensions see http://nco.sf.net/nco.html#mk_rec_dmn or to add a new record dimension to all variables see http://nco.sf.net/nco.html#ncecat_rnm\n",nco_prg_nm_get());
       break;
     case ncrcat:
-      (void)fprintf(stdout,"%s: HINT Extraction list must contain a record variable which to concatenate. A record variable is a variable defined with a record dimension. Often the record dimension, aka unlimited dimension, refers to time. For more information on creating record dimensions within existing datasets, see http://nco.sf.net/nco.html#mk_rec_dmn\n",nco_prg_nm_get());
+      (void)fprintf(stdout,"%s: HINT Extraction list must contain a record variable which to concatenate. A record variable is a variable defined with a record dimension. Often the record dimension, aka unlimited dimension, refers to time. To change an existing dimension from a fixed to a record dimensions see http://nco.sf.net/nco.html#mk_rec_dmn or to add a new record dimension to all variables see http://nco.sf.net/nco.html#ncecat_rnm\n",nco_prg_nm_get());
       break;
     case ncwa:
-      (void)fprintf(stdout,"%s: HINT Extraction list must contain a non-character variable with an averaging dimension\n",nco_prg_nm_get());
+      (void)fprintf(stdout,"%s: HINT Extraction list must contain a non-character variable with a dimension to be averaged\n",nco_prg_nm_get());
       break;
     default: nco_dfl_case_prg_id_err(); break;
     } /* end switch */
diff --git a/src/nco/nco_var_utl.c b/src/nco/nco_var_utl.c
index 9b866f5..984e859 100644
--- a/src/nco/nco_var_utl.c
+++ b/src/nco/nco_var_utl.c
@@ -1418,6 +1418,7 @@ nco_is_spc_in_cf_att /* [fnc] Variable is listed in this CF attribute, thereby a
   int var_id; /* [id] Variable ID */
   long att_sz;
   nc_type att_typ;
+  static nco_bool FIRST_WARNING=True;
 
   /* May need variable name for later comparison to those listed in this attribute */
   rcd+=nco_inq_varname(nc_id,var_trg_id,var_trg_nm);
@@ -1437,7 +1438,8 @@ nco_is_spc_in_cf_att /* [fnc] Variable is listed in this CF attribute, thereby a
         rcd+=nco_inq_att(nc_id,var_id,att_nm,&att_typ,&att_sz);
         if(att_typ != NC_CHAR){
           rcd=nco_inq_varname(nc_id,var_id,var_nm);
-          (void)fprintf(stderr,"%s: WARNING the \"%s\" attribute for variable %s is type %s, not %s. This violates the CF convention for specifying additional attributes. Therefore %s will skip this attribute.\n",nco_prg_nm_get(),att_nm,var_nm,nco_typ_sng(att_typ),nco_typ_sng(NC_CHAR),fnc_nm);
+          if(FIRST_WARNING) (void)fprintf(stderr,"%s: WARNING the \"%s\" attribute for variable %s is type %s, not %s. This violates the CF convention for specifying additional attributes. Therefore %s will skip this attribute. NB: To avoid excessive noise, NCO prints this WARNING at most once per dataset.\n",nco_prg_nm_get(),att_nm,var_nm,nco_typ_sng(att_typ),nco_typ_sng(NC_CHAR),fnc_nm);
+	  FIRST_WARNING=False;
           return IS_SPC_IN_CF_ATT;
         } /* end if */
         att_val=(char *)nco_malloc((att_sz+1L)*sizeof(char));
diff --git a/src/nco/ncra.c b/src/nco/ncra.c
index 9515f0e..7c2c93a 100644
--- a/src/nco/ncra.c
+++ b/src/nco/ncra.c
@@ -1489,7 +1489,12 @@ main(int argc,char **argv)
       } /* end idx_rec loop over different record variables to process */
 
       if(flg_cb && nco_prg_id == ncra){
-	/* Obtain climatology bounds from input file */
+	/* Obtain climatology bounds from input file
+	   20160824: Currently dmn_srt_srt and dmn_srt_end indices are 0 and 1, respectively
+	   This means values are always/only taken for first record in input file
+	   Thus climatology_bounds are only correct for input files with single timestep
+	   To fix this requires updating dmn_srt_srt and dmn_srt_end with correct indices
+	   Correct indices must account for multiple input records per file and hyperslabbing (e.g., -d time,3,5) */
 	int var_id_in;
 	double val_dbl;
 	var_id_in= cb->tm_bnd_in ? cb->tm_bnd_id_in : cb->clm_bnd_id_in;
diff --git a/src/nco/ncwa.c b/src/nco/ncwa.c
index 44c4465..c6a07e6 100644
--- a/src/nco/ncwa.c
+++ b/src/nco/ncwa.c
@@ -1025,40 +1025,41 @@ main(int argc,char **argv)
 	   sometimes, before the tally array for var_prc_out[idx] is created. 
 	   When this occurs the nco_var_dpl() call in nco_var_cnf_dmn() does not copy
 	   tally array into wgt_avg. See related note about this above. TODO #114.*/
-        if(wgt_avg->sz > 0)
+        if(wgt_avg->sz > 0){
           if(!(wgt_avg->tally=(long *)nco_realloc(wgt_avg->tally,wgt_avg->sz*sizeof(long)))){
             (void)fprintf(fp_stdout,"%s: ERROR Unable to realloc() %ld*%ld bytes for tally buffer for weight %s in main()\n",nco_prg_nm_get(),wgt_avg->sz,(long)sizeof(long),wgt_avg->nm);
             nco_exit(EXIT_FAILURE); 
           } /* end if */
-          /* Average weight over specified dimensions (tally array is set here) */
-          wgt_avg=nco_var_avg(wgt_avg,dmn_avg,dmn_avg_nbr,nco_op_avg,flg_rdd,&ddra_info);
-
-          if(MULTIPLY_BY_TALLY){
-            /* NB: Currently this is not implemented */
-            /* Multiply numerator (weighted sum of variable) by tally 
-	       We deviously accomplish this by dividing denominator by tally */
-            (void)nco_var_nrm(wgt_avg->type,wgt_avg->sz,wgt_avg->has_mss_val,wgt_avg->mss_val,wgt_avg->tally,wgt_avg->val);
-          } /* endif */
+	} /* wgt_avg->sz */
+        /* Average weight over specified dimensions (tally array is set here) */
+	wgt_avg=nco_var_avg(wgt_avg,dmn_avg,dmn_avg_nbr,nco_op_avg,flg_rdd,&ddra_info);
+
+	if(MULTIPLY_BY_TALLY){
+	  /* NB: Currently this is not implemented */
+	  /* Multiply numerator (weighted sum of variable) by tally 
+	     We deviously accomplish this by dividing denominator by tally */
+	  (void)nco_var_nrm(wgt_avg->type,wgt_avg->sz,wgt_avg->has_mss_val,wgt_avg->mss_val,wgt_avg->tally,wgt_avg->val);
+	} /* endif */
           /* Divide numerator by denominator */
           /* Diagnose common PEBCAK before it causes core dump */
-          if(var_prc_out[idx]->sz == 1L && var_prc_out[idx]->type == NC_INT && var_prc_out[idx]->val.ip[0] == 0){
-            (void)fprintf(fp_stdout,"%s: ERROR Weight in denominator weight = 0.0, will cause SIGFPE\n%s: HINT Sum of masked, averaged weights must be non-zero\n%s: HINT A possible workaround is to remove variable \"%s\" from output file using \"%s -x -v %s ...\"\n%s: Expecting core dump...now!\n",nco_prg_nm,nco_prg_nm,nco_prg_nm,var_prc_out[idx]->nm,nco_prg_nm,var_prc_out[idx]->nm,nco_prg_nm);
-          } /* end if */
+	if(var_prc_out[idx]->sz == 1L && var_prc_out[idx]->type == NC_INT && var_prc_out[idx]->val.ip[0] == 0){
+	  (void)fprintf(fp_stdout,"%s: ERROR Weight in denominator weight = 0.0, will cause SIGFPE\n%s: HINT Sum of masked, averaged weights must be non-zero\n%s: HINT A possible workaround is to remove variable \"%s\" from output file using \"%s -x -v %s ...\"\n%s: Expecting core dump...now!\n",nco_prg_nm,nco_prg_nm,nco_prg_nm,var_prc_out[idx]->nm,nco_prg_nm,var_prc_out[idx]->nm,nco_prg_nm);
+	} /* end if */
           /* Rather complex conditional statement is shorter than switch() */
-          if( /* Normalize by weighted tally if ....  */
-	     var_prc[idx]->is_crd_var || /* ...variable is a coordinate or ...*/
-	     ((nco_op_typ != nco_op_min) && /* ...operation is not min() and... */
-	      (nco_op_typ != nco_op_max) && /* ...operation is not max() and... */
-	      (nco_op_typ != nco_op_mabs) && /* ...operation is not mabs() and... */
-	      (nco_op_typ != nco_op_mibs) && /* ...operation is not mibs() and... */
-	      (nco_op_typ != nco_op_tabs) && /* ...operation is not tabs() and... */
-	      (nco_op_typ != nco_op_ttl)) /* ...operation is not ttl() and... */
-	      ){ /* Divide numerator by masked, averaged, weights */
-	    (void)nco_var_dvd(var_prc_out[idx]->type,var_prc_out[idx]->sz,var_prc_out[idx]->has_mss_val,var_prc_out[idx]->mss_val,wgt_avg->val,var_prc_out[idx]->val);
-          } /* endif */
+	if( /* Normalize by weighted tally if ....  */
+	   var_prc[idx]->is_crd_var || /* ...variable is a coordinate or ...*/
+	   ((nco_op_typ != nco_op_min) && /* ...operation is not min() and... */
+	    (nco_op_typ != nco_op_max) && /* ...operation is not max() and... */
+	    (nco_op_typ != nco_op_mabs) && /* ...operation is not mabs() and... */
+	    (nco_op_typ != nco_op_mibs) && /* ...operation is not mibs() and... */
+	    (nco_op_typ != nco_op_tabs) && /* ...operation is not tabs() and... */
+	    (nco_op_typ != nco_op_ttl)) /* ...operation is not ttl() and... */
+	    ){ /* Divide numerator by masked, averaged, weights */
+	  (void)nco_var_dvd(var_prc_out[idx]->type,var_prc_out[idx]->sz,var_prc_out[idx]->has_mss_val,var_prc_out[idx]->mss_val,wgt_avg->val,var_prc_out[idx]->val);
+	} /* endif */
           /* Free wgt_avg, but keep wgt_out, after each use */
-          if(wgt_avg) wgt_avg=nco_var_free(wgt_avg);
-          /* End of branch for normalization when weights were specified */
+	if(wgt_avg) wgt_avg=nco_var_free(wgt_avg);
+	/* End of branch for normalization when weights were specified */
       }else if(NRM_BY_DNM){
         /* Branch for normalization when no weights were specified
 	   Normalization is just due to tally */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/nco.git



More information about the Pkg-grass-devel mailing list