[nco] 01/07: Imported Upstream version 4.5.4

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Jan 8 01:06:51 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 6a8cf1d43ee679e40d52d732bc7e9bc8baf415a5
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Jan 8 01:21:07 2016 +0100

    Imported Upstream version 4.5.4
---
 README.md                          |    1 +
 bld/Makefile                       |   30 +-
 bld/nco.spec                       |   11 +-
 bld/nco_dst.pl                     |   30 +-
 bm/NCO_bm.pm                       |    2 +-
 bm/NCO_rgr.pm                      |  276 ++++----
 bm/nco_bm.pl                       |    3 +-
 config.h.in                        |    6 +
 configure                          |   40 +-
 configure.ac                       |   16 +-
 configure.eg                       |   16 +
 data/Makefile.am                   |    4 +
 data/Makefile.in                   |   98 ++-
 data/gsl_sf.in                     |   18 +-
 data/in.cdl                        |   96 ++-
 data/in_grp.cdl                    |    8 +-
 data/in_grp_3.cdl                  |   23 +-
 data/nccf                          |  192 +++++
 data/ncremap                       |  729 +++++++++++++++++++
 data/sld_nco.sh                    |  384 ----------
 debian/changelog                   |    6 +
 doc/ANNOUNCE                       |  186 +++--
 doc/ChangeLog                      |  261 +++++++
 doc/MANIFEST                       |    3 +-
 doc/TODO                           |   12 +-
 doc/VERSION                        |    2 +-
 doc/debian.txt                     |  162 ++---
 doc/index.shtml                    |   40 +-
 doc/man_end.txt                    |    1 +
 doc/nco.texi                       |  804 +++++++++++++++++++--
 doc/nco_qt_msvc.shtml              |   64 +-
 man/Makefile.am                    |    2 +-
 man/Makefile.in                    |    2 +-
 man/ncap.1                         |    2 +-
 man/ncap2.1                        |    2 +-
 man/ncatted.1                      |    4 +-
 man/ncbo.1                         |    2 +-
 man/ncdiff.1                       |  387 ----------
 man/ncea.1                         |  195 ------
 man/ncecat.1                       |    4 +-
 man/nces.1                         |    2 +-
 man/ncflint.1                      |    2 +-
 man/ncks.1                         |    4 +-
 man/nco.1                          |    3 +-
 man/ncpdq.1                        |    2 +-
 man/ncra.1                         |    4 +-
 man/ncrcat.1                       |    2 +-
 doc/man_end.txt => man/ncremap.1   |   74 +-
 man/ncrename.1                     |    4 +-
 man/ncwa.1                         |    4 +-
 qt/libnco/libnco.pro               |  245 +++----
 qt/libnco/libnco.vcxproj           |  102 +--
 qt/libnco_c++/libnco_c++.pro       |  109 ++-
 qt/libnco_c++/libnco_c++.vcxproj   |  103 ++-
 qt/ncap2/ncap2.pro                 |  162 ++---
 qt/ncap2/ncap2.vcxproj             |   95 ++-
 qt/ncatted/ncatted.pro             |   45 +-
 qt/ncatted/ncatted.vcxproj         |   95 ++-
 qt/ncbo/ncbo.pro                   |   44 +-
 qt/ncbo/ncbo.vcxproj               |   95 ++-
 qt/ncea/ncea.pro                   |   40 +-
 qt/ncea/ncea.vcxproj               |   95 ++-
 qt/ncecat/ncecat.pro               |   46 +-
 qt/ncecat/ncecat.vcxproj           |   95 ++-
 qt/ncflint/ncflint.pro             |   44 +-
 qt/ncflint/ncflint.vcxproj         |   95 ++-
 qt/ncks/ncks.pro                   |   42 +-
 qt/ncks/ncks.vcxproj               |   95 ++-
 qt/nco.pri                         |   45 +-
 qt/nco.pro                         |    1 +
 qt/nco.sln                         |  191 ++---
 qt/ncpdq/ncpdq.pro                 |   44 +-
 qt/ncpdq/ncpdq.vcxproj             |   95 ++-
 qt/ncra/ncra.pro                   |   44 +-
 qt/ncra/ncra.vcxproj               |   95 ++-
 qt/ncrcat/ncrcat.pro               |   12 +-
 qt/ncrcat/ncrcat.vcxproj           |   95 ++-
 qt/ncrename/ncrename.pro           |   43 +-
 qt/ncrename/ncrename.vcxproj       |   95 ++-
 qt/ncwa/ncwa.pro                   |   12 +-
 qt/ncwa/ncwa.vcxproj               |   95 ++-
 qt/tst_nco_c++/tst_nco_c++.pro     |  100 ++-
 qt/tst_nco_c++/tst_nco_c++.vcxproj |   97 ++-
 src/nco++/Makefile.old             |    6 +-
 src/nco++/fmc_all_cls.cc           |  317 ++++++++-
 src/nco++/fmc_all_cls.hh           |   27 +-
 src/nco++/fmc_cls.hh               |    2 +-
 src/nco++/fmc_gsl_cls.cc           |   81 ++-
 src/nco++/fmc_gsl_cls.hh           |    8 +-
 src/nco++/libnco++.hh              |    2 +-
 src/nco++/ncap2.cc                 |   10 +-
 src/nco++/ncap2_utl.cc             |   48 +-
 src/nco++/ncap2_utl.hh             |   10 +-
 src/nco++/ncoEnumTokenTypes.hpp    |  217 +++---
 src/nco++/ncoGrammer.g             |  380 +++++-----
 src/nco++/ncoLexer.cpp             |  426 +++++++----
 src/nco++/ncoLexer.hpp             |    4 +-
 src/nco++/ncoParser.cpp            |  774 ++++++++++----------
 src/nco++/ncoParser.hpp            |    9 +-
 src/nco++/ncoParserTokenTypes.hpp  |  219 +++---
 src/nco++/ncoTree.cpp              | 1357 +++++++++++++++++++-----------------
 src/nco++/ncoTree.hpp              |   79 +--
 src/nco++/nco_gsl.c                |    2 +-
 src/nco++/nco_gsl.h                |    2 +-
 src/nco++/prs_cls.cc               |    2 +-
 src/nco++/prs_cls.hh               |    2 +-
 src/nco++/sdo_utl.cc               |    2 +-
 src/nco++/sdo_utl.hh               |    2 +-
 src/nco/libnco.h                   |    2 +-
 src/nco/mpncbo.c                   |    2 +-
 src/nco/mpncecat.c                 |    2 +-
 src/nco/mpncflint.c                |    2 +-
 src/nco/mpncpdq.c                  |    2 +-
 src/nco/mpncra.c                   |    2 +-
 src/nco/mpncwa.c                   |    2 +-
 src/nco/ncap.c                     |    2 +-
 src/nco/ncap.h                     |    2 +-
 src/nco/ncap_utl.c                 |    2 +-
 src/nco/ncap_yacc.y                |    2 +-
 src/nco/ncatted.c                  |    2 +-
 src/nco/ncbo.c                     |    2 +-
 src/nco/ncecat.c                   |    2 +-
 src/nco/ncflint.c                  |    2 +-
 src/nco/ncks.c                     |    2 +-
 src/nco/nco.h                      |   64 +-
 src/nco/nco_att_utl.c              |    2 +-
 src/nco/nco_att_utl.h              |    2 +-
 src/nco/nco_aux.c                  |    2 +-
 src/nco/nco_aux.h                  |    9 +-
 src/nco/nco_bnr.c                  |    2 +-
 src/nco/nco_bnr.h                  |    2 +-
 src/nco/nco_cln_utl.c              |    2 +-
 src/nco/nco_cln_utl.h              |    8 +-
 src/nco/nco_cnf_dmn.c              |    2 +-
 src/nco/nco_cnf_dmn.h              |    2 +-
 src/nco/nco_cnf_typ.c              |    2 +-
 src/nco/nco_cnf_typ.h              |    2 +-
 src/nco/nco_cnk.c                  |    2 +-
 src/nco/nco_cnk.h                  |    2 +-
 src/nco/nco_cnv_arm.c              |    2 +-
 src/nco/nco_cnv_arm.h              |    2 +-
 src/nco/nco_cnv_csm.c              |   15 +-
 src/nco/nco_cnv_csm.h              |    2 +-
 src/nco/nco_ctl.c                  |    6 +-
 src/nco/nco_ctl.h                  |    2 +-
 src/nco/nco_dbg.c                  |    2 +-
 src/nco/nco_dbg.h                  |    2 +-
 src/nco/nco_dmn_utl.c              |    2 +-
 src/nco/nco_dmn_utl.h              |    2 +-
 src/nco/nco_fl_utl.c               |    2 +-
 src/nco/nco_fl_utl.h               |    2 +-
 src/nco/nco_grp_trv.c              |    2 +-
 src/nco/nco_grp_trv.h              |    2 +-
 src/nco/nco_grp_utl.c              |   23 +-
 src/nco/nco_grp_utl.h              |    2 +-
 src/nco/nco_lmt.c                  |    4 +-
 src/nco/nco_lmt.h                  |    2 +-
 src/nco/nco_lst_utl.c              |    2 +-
 src/nco/nco_lst_utl.h              |    2 +-
 src/nco/nco_md5.c                  |    2 +-
 src/nco/nco_md5.h                  |    2 +-
 src/nco/nco_mmr.c                  |    2 +-
 src/nco/nco_mmr.h                  |    2 +-
 src/nco/nco_mpi.h                  |    2 +-
 src/nco/nco_msa.c                  |    2 +-
 src/nco/nco_msa.h                  |    2 +-
 src/nco/nco_mss_val.c              |    2 +-
 src/nco/nco_mss_val.h              |    2 +-
 src/nco/nco_netcdf.c               |    2 +-
 src/nco/nco_netcdf.h               |    2 +-
 src/nco/nco_omp.c                  |    2 +-
 src/nco/nco_omp.h                  |    2 +-
 src/nco/nco_pck.c                  |    2 +-
 src/nco/nco_pck.h                  |    2 +-
 src/nco/nco_ppc.c                  |    2 +-
 src/nco/nco_ppc.h                  |   11 +-
 src/nco/nco_prn.c                  |   23 +-
 src/nco/nco_prn.h                  |    2 +-
 src/nco/nco_rec_var.c              |    2 +-
 src/nco/nco_rec_var.h              |    2 +-
 src/nco/nco_rgr.c                  | 1167 ++++++++++++++++++++-----------
 src/nco/nco_rgr.h                  |    7 +-
 src/nco/nco_rth_flt.c              |   18 +-
 src/nco/nco_rth_flt.h              |   47 +-
 src/nco/nco_rth_utl.c              |    2 +-
 src/nco/nco_rth_utl.h              |    2 +-
 src/nco/nco_scl_utl.c              |    2 +-
 src/nco/nco_scl_utl.h              |    2 +-
 src/nco/nco_scm.c                  |    4 +-
 src/nco/nco_scm.h                  |    2 +-
 src/nco/nco_sld.c                  |    2 +-
 src/nco/nco_sld.h                  |    2 +-
 src/nco/nco_sng_utl.c              |    2 +-
 src/nco/nco_sng_utl.h              |    8 +-
 src/nco/nco_srm.c                  |    2 +-
 src/nco/nco_srm.h                  |    2 +-
 src/nco/nco_typ.h                  |    2 +-
 src/nco/nco_var_avg.c              |    2 +-
 src/nco/nco_var_avg.h              |    2 +-
 src/nco/nco_var_lst.c              |    6 +-
 src/nco/nco_var_lst.h              |    2 +-
 src/nco/nco_var_rth.c              |    2 +-
 src/nco/nco_var_rth.h              |    2 +-
 src/nco/nco_var_scv.c              |    2 +-
 src/nco/nco_var_scv.h              |    2 +-
 src/nco/nco_var_utl.c              |    2 +-
 src/nco/nco_var_utl.h              |    2 +-
 src/nco/ncpdq.c                    |   55 +-
 src/nco/ncra.c                     |    4 +-
 src/nco/ncrename.c                 |    2 +-
 src/nco/ncwa.c                     |    2 +-
 src/nco_c++/Makefile.old           |    2 +-
 src/nco_c++/libnco_c++.hh          |    2 +-
 src/nco_c++/nco_att.cc             |    2 +-
 src/nco_c++/nco_att.hh             |    2 +-
 src/nco_c++/nco_dmn.cc             |    2 +-
 src/nco_c++/nco_dmn.hh             |    2 +-
 src/nco_c++/nco_fl.cc              |    2 +-
 src/nco_c++/nco_fl.hh              |    2 +-
 src/nco_c++/nco_hgh.cc             |    2 +-
 src/nco_c++/nco_hgh.hh             |    2 +-
 src/nco_c++/nco_utl.cc             |    2 +-
 src/nco_c++/nco_utl.hh             |    2 +-
 src/nco_c++/nco_var.cc             |    2 +-
 src/nco_c++/nco_var.hh             |    2 +-
 225 files changed, 7230 insertions(+), 5371 deletions(-)

diff --git a/README.md b/README.md
index efcd50f..9acdfda 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,7 @@ techniques for climate data analysis:
 | `ncpdq` | netCDF Permute Dimensions Quickly, Pack Data Quietly | [here](http://nco.sf.net/nco.html#ncpdq) |
 | `ncra` | netCDF Record Averager       | [here](http://nco.sf.net/nco.html#ncra) |
 | `ncrcat` | netCDF Record conCATenator | [here](http://nco.sf.net/nco.html#ncrcat) |
+| `ncremap` | netCDF REMAPer          | [here](http://nco.sf.net/nco.html#ncremap) |
 | `ncrename` | netCDF RENAMEer          | [here](http://nco.sf.net/nco.html#ncrename) |
 | `ncwa` | netCDF Weighted Averager     | [here](http://nco.sf.net/nco.html#ncwa) |
 
diff --git a/bld/Makefile b/bld/Makefile
index eed10c3..c7e212d 100644
--- a/bld/Makefile
+++ b/bld/Makefile
@@ -3,7 +3,7 @@
 # Purpose: GNU Makefile for NCO module nco
 # Requires GNU Make---AT&T Make chokes on GNU syntax
 
-# Copyright (C) 1994--2015 Charlie Zender
+# Copyright (C) 1994--2016 Charlie Zender
 # License: GNU General Public License (GPL) Version 3
 # See http://www.gnu.org/copyleft/gpl.html for full license text
 
@@ -27,7 +27,6 @@
 # edison.nersc.gov   : NCO          Configure All else Intel
 # travis CI          : NCO          Configure All else gcc,clang,g++
 
-
 # Usage (testing):
 # make tst                           # Vanilla regression test
 # make FL_FMT=netcdf4 tst            # netCDF4 regression test
@@ -522,6 +521,7 @@ CPP_PTH := $(foreach dir,${MDL_PTH},-I${dir})
 # Variables having to do with binary executables created by module
 MDL_BIN_TRG := ncap ncatted ncbo ncecat ncflint ncks ncpdq ncra ncrename ncwa # NCO binary targets
 MDL_BIN_SYM_LNK := ncdiff ncea nces ncrcat # Symbolic links
+MDL_BIN_SPT := ncremap # Scripts
 ifeq (${MPI},Y)
 # MDL_MPI_TRG := mpncbo mpncecat mpncflint mpncpdq mpncra mpncwa # MPI binary targets
  MDL_MPI_TRG := # MPI binary targets
@@ -534,7 +534,7 @@ ifeq (${MPI},Y)
  MDL_BIN_TRG += ${MDL_MPI_TRG} # NCO binary targets
  MDL_BIN_SYM_LNK += ${MDL_MPI_SYM_LNK} # Symbolic links
 endif # endif MPI
-MDL_BIN_STB := ${MDL_BIN_TRG} ${MDL_BIN_SYM_LNK} # All NCO files in MY_BIN_DIR
+MDL_BIN_STB := ${MDL_BIN_TRG} ${MDL_BIN_SPT} ${MDL_BIN_SYM_LNK} # All NCO files in MY_BIN_DIR
 MDL_BIN := $(addprefix ${MY_BIN_DIR}/,${MDL_BIN_STB}) # distclean removes these files
 
 # Variables having to do with header files created by module
@@ -1585,10 +1585,10 @@ CXXCPPFLAGS := ${CPPFLAGS} -I${NCO_CXX_SRC_DIR}
 libnco := ${MY_LIB_DIR}/libnco
 
 # Default targets
-all: dir lib ${MDL_BIN_TRG} data
-non_ncap: dir lib $(filter-out ncap,${MDL_BIN_TRG}) data
+all: dir lib ${MDL_BIN_TRG} ${MDL_BIN_SPT} data
+non_ncap: dir lib $(filter-out ncap,${MDL_BIN_TRG}) ${MDL_BIN_SPT} data
 # .PHONY tells make to remake the following non-file targets 
-.PHONY: all cln dst_cln dbg ${MDL_BIN_TRG}
+.PHONY: all cln dst_cln dbg ${MDL_BIN_TRG} ${MDL_BIN_SPT}
 # Delete default suffixes---this should increase speed
 .SUFFIXES: 
 # Define suffixes that matter
@@ -1691,6 +1691,9 @@ ${MY_BIN_DIR}/ncra:	${MY_OBJ_DIR}/ncra.o lib
 	cd ${MY_BIN_DIR}; rm -f ncea; ln -s -f ncra ncea
 	cd ${MY_BIN_DIR}; rm -f nces; ln -s -f ncra nces
 	cd ${MY_BIN_DIR}; rm -f ncrcat; ln -s -f ncra ncrcat
+ncremap:   ${MY_BIN_DIR}/ncremap
+${MY_BIN_DIR}/ncremap:	${MY_DAT_DIR}/ncremap
+	/bin/cp -f ${MY_DAT_DIR}/ncremap ${MY_BIN_DIR}
 ncrename:   ${MY_BIN_DIR}/ncrename
 ${MY_BIN_DIR}/ncrename:	${MY_OBJ_DIR}/ncrename.o lib
 	${CC} -o $@${BNR_SFX} $< ${LDFLAGS}
@@ -1698,12 +1701,12 @@ ${MY_BIN_DIR}/ncrename:	${MY_OBJ_DIR}/ncrename.o lib
 ncwa:   ${MY_BIN_DIR}/ncwa
 ${MY_BIN_DIR}/ncwa:	${MY_OBJ_DIR}/ncwa.o ${MY_OBJ_DIR}/ncap_yacc.o ${MY_OBJ_DIR}/ncap_lex.o ${MY_OBJ_DIR}/ncap_utl.o lib
 ifeq (${MSVC},TRUE)
-	${CC} -o $@${BNR_SFX} $<  ${LDFLAGS}
+	${CC} -o $@${BNR_SFX} $< ${LDFLAGS}
 else
-	${CC} -o $@${BNR_SFX} $<  ${MY_OBJ_DIR}/ncap_yacc.o ${MY_OBJ_DIR}/ncap_lex.o ${MY_OBJ_DIR}/ncap_utl.o ${LDFLAGS}
+	${CC} -o $@${BNR_SFX} $< ${MY_OBJ_DIR}/ncap_yacc.o ${MY_OBJ_DIR}/ncap_lex.o ${MY_OBJ_DIR}/ncap_utl.o ${LDFLAGS}
 endif
 	chmod 755 $@${BNR_SFX}
-bin: ${MDL_BIN_TRG}
+bin: ${MDL_BIN_TRG} ${MDL_BIN_SPT}
 binclean: bin_cln
 bin_cln: 
 	rm -f ${MDL_BIN}
@@ -1969,10 +1972,10 @@ src: ${MDL_NCAP}
 src_cln:
 	rm -f ${MDL_NCAP}
 # Targets in /usr/local
-sys: ${MDL_BIN_TRG}
-	- cd ${MY_BIN_DIR};sudo /bin/cp -f ${MDL_BIN_TRG} ncap2 /usr/local/bin; cd /usr/local/bin; sudo rm -f ncdiff ncea nces ncrcat ncunpack; sudo ln -s -f ncbo ncdiff; sudo ln -s -f ncra ncea;  sudo ln -s -f ncra nces; sudo ln -s -f ncra ncrcat; sudo ln -s -f ncpdq ncunpack; sudo ln -s -f ncpdq ncpack; cd ${HOME}/nco/src/nco++; ${MAKE} -f Makefile.old OPTS=${OPTS} $@
+sys: ${MDL_BIN_TRG} ${MDL_BIN_SPT}
+	- cd ${MY_BIN_DIR};sudo /bin/cp -f ${MDL_BIN_TRG} ${MDL_BIN_SPT} ncap2 /usr/local/bin; cd /usr/local/bin; sudo rm -f ncdiff ncea nces ncrcat ncunpack; sudo ln -s -f ncbo ncdiff; sudo ln -s -f ncra ncea; sudo ln -s -f ncra nces; sudo ln -s -f ncra ncrcat; sudo ln -s -f ncpdq ncunpack; sudo ln -s -f ncpdq ncpack; cd ${HOME}/nco/src/nco++; ${MAKE} -f Makefile.old OPTS=${OPTS} $@
 sys_cln:
-	- cd /usr/local/bin;rm -f ${MDL_BIN_TRG}
+	- cd /usr/local/bin;rm -f ${MDL_BIN_TRG} ${MDL_BIN_SPT} ${MDL_BIN_SYM_LNK}
 
 # Housekeeping
 clean: cln
@@ -2019,6 +2022,9 @@ dbg:
 	@printf "LIB_NCAR = ${LIB_NCAR}\n"
 	@printf "LINUX_CC = ${LINUX_CC}\n"
 	@printf "LINUX_CXX = ${LINUX_CXX}\n"
+	@printf "MDL_BIN = ${MDL_BIN}\n"
+	@printf "MDL_BIN_SPT = ${MDL_BIN_SPT}\n"
+	@printf "MDL_BIN_SYM_LNK = ${MDL_BIN_SYM_LNK}\n"
 	@printf "MDL_BIN_TRG = ${MDL_BIN_TRG}\n"
 	@printf "MDL_DPN = ${MDL_DPN}\n"
 	@printf "MDL_MAN = ${MDL_MAN}\n"
diff --git a/bld/nco.spec b/bld/nco.spec
index 8d2c6db..4463201 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.5.3
+Version:        4.5.4
 Release:        1%{?dist}
 Summary:        Programs that manipulate netCDF files
 Group:          Applications/Engineering
 License:        GPL3
 URL:            http://nco.sf.net/
 
-# Obtain NCO version 4.5.3-1 tar.gz from Sourceforge using CVS:
+# Obtain NCO version 4.5.4-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.5.3-1 -d nco-%{version} nco
-# tar czf nco-%{version}.tar.gz --exclude='nco-4.5.3/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.5.4-1 -d nco-%{version} nco
+# tar czf nco-%{version}.tar.gz --exclude='nco-4.5.4/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 Jan 07 2016 Charlie Zender <zender at uci.edu> - 4.5.4-1
+- new upstream 4.5.4
+
 * Sun Oct 18 2015 Charlie Zender <zender at uci.edu> - 4.5.3-1
 - new upstream 4.5.3
 
diff --git a/bld/nco_dst.pl b/bld/nco_dst.pl
index 3c320fe..8dba517 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.4.4.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.5.3 # Build, do not release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.5.3 # Build, release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.5.3 # Install, do not build
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.5.3 # Build and install
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.5.3
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.5.3
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.5.3
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.5.3
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.5.3
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.5.3
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.5.3
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.5.3
+# /usr/bin/scp ${DATA}/nco-4.5.4.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.5.4 # Build, do not release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.5.4 # Build, release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.5.4 # Install, do not build
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.5.4 # Build and install
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.5.4
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.5.4
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.5.4
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.5.4
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.5.4
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.5.4
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.5.4
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.5.4
 
 # 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.5.3/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.5.4/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_bm.pm b/bm/NCO_bm.pm
index 3811ffb..11e7ccd 100644
--- a/bm/NCO_bm.pm
+++ b/bm/NCO_bm.pm
@@ -136,7 +136,7 @@ appending history to file.
 This script is part of the netCDF Operators package:
 http://nco.sf.net
 
-Copyright 1995--2015 Charlie Zender
+Copyright 1995--2016 Charlie Zender
 
 USAGE
 exit(0);
diff --git a/bm/NCO_rgr.pm b/bm/NCO_rgr.pm
index 2b0ea14..c5ebf01 100644
--- a/bm/NCO_rgr.pm
+++ b/bm/NCO_rgr.pm
@@ -317,7 +317,40 @@ print "\n";
 	$tst_cmd[6]="SS_OK";
 	NCO_bm::tst_run(\@tst_cmd);
 	$#tst_cmd=0; # Reset array
-    } # !CSZ
+
+# ncks -O --rgr grid=~/foo_grid.nc --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+# ncks -O -H -u -C -s %18.15f -d grid_size,0 -v grid_center_lat ~/foo_grid.nc
+# 20151205: using %tmp_fl_00% in arguments like "--rgr grid=%tmp_fl_00%" leads to epic fail, so hard-code filenames that are arguments
+	$dsc_sng="Generate T42 gridfile";
+	$tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg --rgr grid=foo_grid.nc --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr $in_pth_arg in.nc %tmp_fl_01%";
+	$tst_cmd[1]="ncks -O $fl_fmt $nco_D_flg -H -u -C -s %18.15f -d grid_size,0 -v grid_center_lat foo_grid.nc";
+	$tst_cmd[2]="-87.863798839232629";
+	$tst_cmd[3]="SS_OK";
+	NCO_bm::tst_run(\@tst_cmd);
+	$#tst_cmd=0; # Reset array
+
+# ncks -O -D 1 --rgr skl=~/foo_skl.nc --rgr grid=~/foo_grid.nc --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+# ncks -O -H -u -C -s %g -d lat,0 -v gw ~/foo_skl.nc
+	$dsc_sng="Generate T42-grid skeleton file";
+	$tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg --rgr skl=foo_skl.nc --rgr grid=foo_grid.nc --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr $in_pth_arg in.nc %tmp_fl_02%";
+	$tst_cmd[1]="ncks -O $fl_fmt $nco_D_flg -H -u -C -s %g -d lat,0 -v gw foo_skl.nc";
+	$tst_cmd[2]="0.00178328";
+	$tst_cmd[3]="SS_OK";
+	NCO_bm::tst_run(\@tst_cmd);
+	$#tst_cmd=0; # Reset array
+
+# ncks -O --rgr nfr=y --rgr grid=~/foo_grid.nc ~/nco/data/ne30_2D.nc ~/foo.nc
+# ncks -O -H -u -C -s %8.5f -d grid_size,256 -v grid_center_lat ~/foo_grid.nc
+# 20151205: using %tmp_fl_00% in arguments like "--rgr grid=%tmp_fl_00%" leads to epic fail, so hard-code filenames that are arguments
+	$dsc_sng="Infer 129x256 FV gridfile (uses SSH/scp to dust.ess.uci.edu)";
+	$tst_cmd[0]="scp dust.ess.uci.edu:data/ne30/rgr/ne30_2D.nc .";
+	$tst_cmd[1]="ncks -O $fl_fmt $nco_D_flg --rgr nfr=y --rgr grid=foo_grid.nc ne30_2D.nc %tmp_fl_01%";
+	$tst_cmd[2]="ncks -O $fl_fmt $nco_D_flg -H -u -C -s %8.5f -d grid_size,256 -v grid_center_lat foo_grid.nc";
+	$tst_cmd[3]="-88.59375";
+	$tst_cmd[4]="SS_OK";
+	NCO_bm::tst_run(\@tst_cmd);
+	$#tst_cmd=0; # Reset array
+    } # !zender
     
     if($dodap eq "FALSE"){
 ####################
@@ -674,7 +707,6 @@ print "\n";
 # ncbo -O -y add -g g4 -v one_dmn_rec_var ~/nco/data/in_grp.nc ~/nco/data/in_grp.nc ~/foo.nc
 # ncks -C -H -s '%d' -d time,0,0,1 -g g4 -v one_dmn_rec_var ~/foo.nc
 # /g4/one_dmn_rec_var
-
     $dsc_sng="(Groups) Addition with limits -d time,1,1,1 -y add -g g4 -v one_dmn_rec_var";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg -d time,1,1,1 -y add -g g4 -v one_dmn_rec_var $in_pth_arg in_grp.nc in_grp.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%d' -d time,0,0,1 -g g4 -v one_dmn_rec_var %tmp_fl_00%";
@@ -687,7 +719,6 @@ print "\n";
 # ncbo -O -v one_dmn_rec_var ~/nco/data/in_grp.nc ~/nco/data/in_grp.nc ~/foo.nc
 # ncks -C -H -s '%d' -d time,0,0,1 -g g4 -v one_dmn_rec_var ~/foo.nc
 # /g4/one_dmn_rec_var
-
     $dsc_sng="(Groups) Subtraction -v one_dmn_rec_var";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg -v one_dmn_rec_var $in_pth_arg in_grp.nc in_grp.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%d' -d time,1,1,1 -g g4 -v one_dmn_rec_var %tmp_fl_00%";
@@ -700,7 +731,6 @@ print "\n";
 # ncbo -O -y mlt -g g4 -v one_dmn_rec_var ~/nco/data/in_grp.nc ~/nco/data/in_grp.nc ~/foo.nc
 # ncks -C -H -s '%d' -d time,0,0,1 -g g4 -v one_dmn_rec_var ~/foo.nc
 # /g4/one_dmn_rec_var
-
     $dsc_sng="(Groups) Multiplication with limits -d time,2,2,1 -y add -g g4 -v one_dmn_rec_var";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg -d time,2,2,1 -y mlt -g g4 -v one_dmn_rec_var $in_pth_arg in_grp.nc in_grp.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%d' -d time,0,0,1 -g g4 -v one_dmn_rec_var %tmp_fl_00%";
@@ -713,8 +743,6 @@ print "\n";
 # ncbo -O -y mlt -g g4 -v one_dmn_rec_var ~/nco/data/in_grp.nc ~/nco/data/in_grp.nc ~/foo.nc
 # ncks -C -H -s '%d' -d time,0,0,1 -g g4 -v one_dmn_rec_var ~/foo.nc
 # /g4/one_dmn_rec_var
-
-
     $dsc_sng="(Groups) Division with limits -d time,2,2,1 -y add -g g4 -v one_dmn_rec_var";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg -d time,2,2,1 -y dvd -g g4 -v one_dmn_rec_var $in_pth_arg in_grp.nc in_grp.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%d' -d time,0,0,1 -g g4 -v one_dmn_rec_var %tmp_fl_00%";
@@ -730,7 +758,6 @@ print "\n";
 # Absolute match test
 # ncbo #21
 # ncbo -O in_grp_1.nc in_grp_2.nc ~/foo.nc
-
     $dsc_sng="(Groups) Process absolute match variables -v var1 in_grp_1.nc in_grp_2.nc";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg $in_pth_arg in_grp_1.nc in_grp_2.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -v var1 %tmp_fl_00%";
@@ -742,7 +769,6 @@ print "\n";
 
 # ncbo #22
 # ncbo -O -v var1 in_grp_1.nc in_grp_2.nc ~/foo.nc
-
     $dsc_sng="(Groups) Process absolute match variables -v var1 in_grp_1.nc in_grp_2.nc";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg -v var1 $in_pth_arg in_grp_1.nc in_grp_2.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C %tmp_fl_00%";
@@ -756,7 +782,6 @@ print "\n";
 #ncbo -O --op_typ=add  mdl_1.nc mdl_2.nc ~/foo.nc
 #ncks -C -g cesm_01 -v tas1 ~/foo.nc
 # 544.4 = (file 1 tas1) 272.1 + (file 2 tas1) 272.3
-
     $dsc_sng="(Groups) Process ensembles in both files mdl_1.nc mdl_2.nc";
     $tst_cmd[0]="ncbo -O --op_typ=add $fl_fmt $nco_D_flg $in_pth_arg mdl_1.nc mdl_2.nc %tmp_fl_00%";
 	$tst_cmd[1]="ncks -C -g cesm_01 -v tas1 %tmp_fl_00%";
@@ -768,7 +793,6 @@ print "\n";
 # ncbo #24
 #ncbo -O mdl_1.nc mdl_2.nc ~/foo.nc
 #ncks -g cesm_01 -v time ~/foo.nc
-
     $dsc_sng="(Groups) Process ensembles in both files mdl_1.nc mdl_2.nc (check fixed variables)";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg $in_pth_arg mdl_1.nc mdl_2.nc %tmp_fl_00%";
 	$tst_cmd[1]="ncks -g cesm_01 -v time %tmp_fl_00%";
@@ -781,7 +805,6 @@ print "\n";
 #ncbo -O --op_typ=add  mdl_1.nc obs.nc ~/foo.nc
 #ncks -C -g cesm_01 -v tas1 ~/foo.nc
 # 544.1 = (file 1 tas1) 272.1 + (file 2 tas1) 273.0
-
     $dsc_sng="(Groups) Process ensembles in file 1 with common variable at root in file 2";
     $tst_cmd[0]="ncbo -O --op_typ=add $fl_fmt $nco_D_flg $in_pth_arg mdl_1.nc obs.nc %tmp_fl_00%";
 	$tst_cmd[1]="ncks -C -g cesm_01 -v tas1 %tmp_fl_00%";
@@ -793,7 +816,6 @@ print "\n";
 # ncbo #26
 #ncbo -O mdl_1.nc obs.nc ~/foo.nc
 #ncks -g ecmwf_01 -v time
-
     $dsc_sng="(Groups) Process ensembles in file 1 with common variable at root in file 2 (check fixed variables)";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg $in_pth_arg mdl_1.nc obs.nc %tmp_fl_00%";
 	$tst_cmd[1]="ncks -g ecmwf_01 -v time %tmp_fl_00%";
@@ -811,7 +833,6 @@ print "\n";
 #FXM ncbo group broadcasting, "time" dimension is created at root because conflicting logic in nco_prc_cmn() uses 
 # both RNK_1_GTR and table flag of file 1 or 2
 # result is time[3] instead of time[3]=4
-
     if(0) {
     $dsc_sng="(Groups) Process ensembles in file 2 with common variable at root in file 1";
     $tst_cmd[0]="ncbo -O --op_typ=add $fl_fmt $nco_D_flg $in_pth_arg obs.nc mdl_1.nc  %tmp_fl_00%";
@@ -826,7 +847,6 @@ print "\n";
 #ncbo -O cmip5.nc obs.nc ~/foo.nc
 #ncks -C -g ecmwf -v tas1 ~/foo.nc
 # obs.nc tas1=273, cmip5.nc giss tas1=274
-
     $dsc_sng="(Groups) Process relative matches, first file greater (cmip5.nc obs.nc)";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg $in_pth_arg cmip5.nc obs.nc %tmp_fl_00%";
 	$tst_cmd[1]="ncks -C -g giss -v tas1 %tmp_fl_00%";
@@ -839,7 +859,6 @@ print "\n";
 #ncbo -O  obs.nc cmip5.nc ~/foo.nc
 #ncks -C -g ecmwf -v tas1 ~/foo.nc
 # obs.nc tas1=273, cmip5.nc giss tas1=274
-
     $dsc_sng="(Groups) Process relative matches, second file greater (obs.nc cmip5.nc)";
     $tst_cmd[0]="ncbo -O $fl_fmt $nco_D_flg $in_pth_arg obs.nc cmip5.nc %tmp_fl_00%";
 	$tst_cmd[1]="ncks -C -g giss -v tas1 %tmp_fl_00%";
@@ -861,7 +880,6 @@ print "\n";
 #time[0]=1 tas1[0]=272.1
 #result =
 # 544.25 = 272.15 + 272.1
-
     $dsc_sng="(Groups) Ensemble with 1 member (mdl_3.nc)";
 	$tst_cmd[0]="ncra -Y ncge -O $fl_fmt $nco_D_flg $in_pth_arg mdl_3.nc %tmp_fl_00%";
     $tst_cmd[1]="ncbo --op_typ=add -O $fl_fmt $nco_D_flg %tmp_fl_00% $in_pth/mdl_3.nc %tmp_fl_01%";
@@ -881,7 +899,6 @@ print "\n";
 ####################
     
 #nces #01	
-	
     $tst_cmd[0]="ncra -Y ncfe $omp_flg -h -O $fl_fmt $nco_D_flg -v one_dmn_rec_var -d time,4 $in_pth_arg in.nc in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%d' -v one_dmn_rec_var %tmp_fl_00%";
     $dsc_sng="ensemble mean of int across two files";
@@ -1708,11 +1725,11 @@ print "\n";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
     
-#ncks #26 groups: Extract "bounds" variables (extract /g8/ilev)
+#ncks #26 groups: Extract "bounds" variables (extract /g8/lev_bnd)
     $dsc_sng="(Groups) Extract 'bounds' variables";
     $tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg -v lev $in_pth_arg in_grp.nc %tmp_fl_00%";
-    $tst_cmd[1]="ncks -a -O -H -s '%g' %tmp_fl_00% ";    
-    $tst_cmd[2]="1005001000";
+    $tst_cmd[1]="ncks -O -H -s '%g' %tmp_fl_00% ";    
+    $tst_cmd[2]="03003007507501013.25";
     $tst_cmd[3]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
@@ -1750,9 +1767,9 @@ print "\n";
     
 #ncks #30 2D variable definition
     $dsc_sng="2D variable definition";
-    $tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg -C -v ilev $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg -C -v lev_bnd $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks %tmp_fl_00%";
-    $tst_cmd[2]="lev[2] vrt_nbr[1] ilev[5]=1013.25";
+    $tst_cmd[2]="lev[2] vrt_nbr[1] lev_bnd[5]=1013.25";
     $tst_cmd[3]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array   
@@ -1920,19 +1937,19 @@ print "\n";
     $#tst_cmd=0; # Reset array 		
 	
 #ncks #47 Extract CF 'bounds' variables (netCDF4 file)
-#lev:bounds = "ilev";
+#lev:bounds = "lev_bnd";
     $dsc_sng="(Groups) Extract CF 'bounds' variables (netCDF4 file)";
-    $tst_cmd[0]="ncks $nco_D_flg -g g8 -v lev $in_pth_arg in_grp_3.nc | grep -w /g8/ilev";
-    $tst_cmd[1]="/g8/ilev";
+    $tst_cmd[0]="ncks $nco_D_flg -g g8 -v lev $in_pth_arg in_grp_3.nc | grep -w /g8/lev_bnd";
+    $tst_cmd[1]="/g8/lev_bnd";
     $tst_cmd[2]="SS_OK";   
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array 		
 	
 #ncks #48 Extract CF 'bounds' variables (netCDF3 file)
-#lev:bounds = "ilev";
+#lev:bounds = "lev_bnd";
     $dsc_sng="Extract CF 'bounds' variables (netCDF3 file)";
-    $tst_cmd[0]="ncks $nco_D_flg -v lev $in_pth_arg in.nc | grep -o -w ilev";
-    $tst_cmd[1]="ilev";
+    $tst_cmd[0]="ncks $nco_D_flg -v lev $in_pth_arg in.nc | grep -o -w lev_bnd";
+    $tst_cmd[1]="lev_bnd";
     $tst_cmd[2]="SS_OK";   
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array 			
@@ -2700,9 +2717,9 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 #####################    
     
 #ncpdq #1
+    $dsc_sng="Reverse coordinate -a -lat -v lat";
     $tst_cmd[0]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -a -lat -v lat $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%g' -v lat -d lat,0 %tmp_fl_00%";
-    $dsc_sng="Reverse coordinate -a -lat -v lat";
     $tst_cmd[2]="90";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -2710,29 +2727,29 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     
 #ncpdq #2
 #three_dmn_var(lat,lev,lon);
+    $dsc_sng="Reverse 3D variable a -lat,-lev,-lon -v three_dmn_var";
     $tst_cmd[0]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -a -lat,-lev,-lon -v three_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v three_dmn_var -d lat,0 -d lev,0 -d lon,0 %tmp_fl_00%";
-    $dsc_sng="Reverse 3D variable a -lat,-lev,-lon -v three_dmn_var";
     $tst_cmd[2]=23;
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
     
-#ncpdq #3 NEW NCO 4.3.2
+#ncpdq #3 
 # ncpdq -h -O -C -a lon,lat -v three_dmn_var ~/nco/data/in.nc ~/foo.nc
 # ncks -C -H -s '%f' -v three_dmn_var -d lat,0 -d lev,2 -d lon,3 ~/foo.nc
+    $dsc_sng="Re-order 3D variable (no associated coordinates) -C -a lon,lat -v three_dmn_var ";
     $tst_cmd[0]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -C -a lon,lat -v three_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v three_dmn_var -d lat,0 -d lev,2 -d lon,3 %tmp_fl_00%";
-    $dsc_sng="Re-order 3D variable (no associated coordinates) -C -a lon,lat -v three_dmn_var ";
     $tst_cmd[2]="11";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array    
     
 #ncpdq #4 
+    $dsc_sng="Re-order 3D variable (associated coordinates) -a lon,lat -v three_dmn_var ";
     $tst_cmd[0]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -a lon,lat -v three_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v three_dmn_var -d lat,0 -d lev,2 -d lon,3 %tmp_fl_00%";
-    $dsc_sng="Re-order 3D variable (associated coordinates) -a lon,lat -v three_dmn_var ";
     $tst_cmd[2]="11";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -2741,300 +2758,281 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 #ncpdq #5
 #three_dmn_var_dbl(time,lat,lon);
 #ncpdq -h -O -C -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3 in.nc
+    $dsc_sng="Re-order 3D variable with MSA -C -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3";
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v three_dmn_var_dbl -d lat,0 -d lon,1 -d time,2 %tmp_fl_00%";
-    $dsc_sng="Re-order 3D variable with MSA -C -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3";
     $tst_cmd[2]="20";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array  
  
-#NEW NCO 4.3.2 
 #ncpdq #6 (same run as #5) 
 #make sure first dimension is record
-    $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3 $in_pth_arg in.nc %tmp_fl_00%";
-    $tst_cmd[1]="ncks -v three_dmn_var_dbl %tmp_fl_00% | grep  'three_dmn_var_dbl dimension 0: lat, size = 2 (Record non-coordinate dimension)'";
+#pvn20151105: changed test so that it handles netCDF4 case (output string differs by 'chunksize = 2')
+#ncks -4 in.nc in4.nc
+#ncpdq -h -O -C -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3 in4.nc out2.nc
+#ncks -v three_dmn_var_dbl out2.nc | grep 'dimension 0' | grep 'Record' | cut -d ' ' -f 1
     $dsc_sng="Re-order 3D variable with MSA -C -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3";
-    $tst_cmd[2]="three_dmn_var_dbl dimension 0: lat, size = 2 (Record non-coordinate dimension)";
+    $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -a lat,lon,time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3 $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -v three_dmn_var_dbl %tmp_fl_00% | grep 'dimension 0' | grep 'Record' | cut -d ' ' -f 1";
+    $tst_cmd[2]="three_dmn_var_dbl";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
     
-#NEW NCO 4.3.2 
 #ncpdq #7 MSA stride
 #ncpdq -h -O -a lat,lon,time -d time,1,3,2 -d lat,1,1,1 -d lon,1,3,2 -v three_dmn_var_dbl in.nc ~/foo.nc 
 #ncks -C -H -v three_dmn_var_dbl -d lat,0,0 -d lon,1,1 -d time,0 ~/foo.nc
 #lat[0]=90 lon[1]=270 time[0]=2 three_dmn_var_dbl[2]=16 
+    $dsc_sng="Re-order 3D variable with MSA (stride) -a lat,lon,time -d time,1,3,2 -d lat,1,1,1 -d lon,1,3,2 -v three_dmn_var_dbl";
     $tst_cmd[0]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -a lat,lon,time -d time,1,3,2 -d lat,1,1,1 -d lon,1,3,2 -v three_dmn_var_dbl  $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v three_dmn_var_dbl -d lat,0,0 -d lon,1,1 -d time,0 %tmp_fl_00%";
-    $dsc_sng="Re-order 3D variable with MSA (stride) -a lat,lon,time -d time,1,3,2 -d lat,1,1,1 -d lon,1,3,2 -v three_dmn_var_dbl";
     $tst_cmd[2]="lat[0]=90 lon[1]=270 time[0]=2 three_dmn_var_dbl[2]=16";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
    
 #ncpdq #8
+    $dsc_sng="Re-order 3D variable with MSA+ reversal of time dim -C -a lat,lon,-time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3";
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -a lat,lon,-time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v three_dmn_var_dbl -d lat,1 -d lon,1 -d time,4 %tmp_fl_00%";
-    $dsc_sng="Re-order 3D variable with MSA+ reversal of time dim -C -a lat,lon,-time -v three_dmn_var_dbl -d time,0,3 -d time,9,9 -d lon,0,0 -d lon,3,3";
     $tst_cmd[2]="8";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
 
 #ncpdq #9
-     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -a lon,lat -v three_dmn_var_dbl -d time,0,2 -d time,4 -d lat,1 -d lat,1 --msa_usr_rdr $in_pth_arg in.nc %tmp_fl_00%";
-    $tst_cmd[1]="ncks -C -H -s '%2.f,' -v three_dmn_var_dbl -d time,1 -d lon,0 %tmp_fl_00%";
     $dsc_sng="Re-order 3D variable with MSA and --msa_usr_rdr flag -C -a lon,lat -v three_dmn_var_dbl -d time,0,2 -d time,4 -d lat,1 -d lat,1 --msa_usr_rdr";
+    $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -a lon,lat -v three_dmn_var_dbl -d time,0,2 -d time,4 -d lat,1 -d lat,1 --msa_usr_rdr $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -C -H -s '%2.f,' -v three_dmn_var_dbl -d time,1 -d lon,0 %tmp_fl_00%";
     $tst_cmd[2]="13,13";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
     
-#NEW NCO 4.3.2
 #ncpdq #10
 # two_dmn_var (lat,lev) no change
 # ncpdq -O -C -a lat,lev -v two_dmn_var ~/nco/data/in.nc ~/foo.nc
 # ncks -d lat,1,1 -d lev,1,1 ~/foo.nc
-
+  $dsc_sng="Re-order 2D variable (-C, no MSA, no-reorder) -v two_dmn_var -a lat,lev";
   $tst_cmd[0]="ncpdq $omp_flg -O -C $fl_fmt $nco_D_flg -a lat,lev -v two_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_var -d lat,1,1 -d lev,1,1 %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable (-C, no MSA, no-reorder) -v two_dmn_var -a lat,lev";
   $tst_cmd[2]="lat[1] lev[1] two_dmn_var[4]=17.5 fraction";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array
     
-#NEW NCO 4.3.2
 #ncpdq #11
 # two_dmn_var (lat,lev) -C, no MSA (no associated coordinates)
 # ncpdq -O -C -a lev,lat -v two_dmn_var ~/nco/data/in.nc ~/foo.nc
 # ncks -v two_dmn_var -d lat,1,1 -d lev,1,1 ~/foo.nc
+  $dsc_sng="Re-order 2D variable (-C, no MSA) -v two_dmn_var -a lev,lat";
   $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -C -a lev,lat -v two_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_var -d lat,1,1 -d lev,1,1 %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable (-C, no MSA) -v two_dmn_var -a lev,lat";
   $tst_cmd[2]="lev[1] lat[1] two_dmn_var[3]=17.5 fraction";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array   
 
-#NEW NCO 4.3.2
 #ncpdq #12
 # two_dmn_var (lat,lev) no MSA (associated coordinates)
 # ncpdq -O -a lev,lat -v two_dmn_var ~/nco/data/in.nc ~/foo.nc
 # ncks -C -d lat,1,1 -d lev,1,1 ~/foo.nc
 #$tst_cmd[2]="lev[1]=500 lat[1]=90 two_dmn_var[3]=17.5 fraction";
+  $dsc_sng="Re-order 2D variable (no -C, no MSA) -v two_dmn_var -a lev,lat";
   $tst_cmd[0]="ncpdq $omp_flg -O $fl_fmt $nco_D_flg -a lev,lat -v two_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -C -v two_dmn_var -d lat,1,1 -d lev,1,1 %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable (no -C, no MSA) -v two_dmn_var -a lev,lat";
   $tst_cmd[2]="lev[1]=500 lat[1]=90 two_dmn_var[3]=17.5 fraction";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array     
 
-#NEW NCO 4.3.2
 #ncpdq #13
 # two_dmn_var (lat,lev) -C, MSA (no associated coordinates)
 # ncpdq -O -C -a lev,lat -d lat,1,1 -d lev,1,1 -v two_dmn_var ~/nco/data/in.nc ~/foo.nc
 # ncks ~/foo.nc
+  $dsc_sng="Re-order 2D variable (-C, MSA) -v two_dmn_var -a lev,lat -d lat,1,1 -d lev,1,1";
   $tst_cmd[0]="ncpdq $omp_flg -O -C $fl_fmt $nco_D_flg -a lev,lat -d lat,1,1 -d lev,1,1 -v two_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_var %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable (-C, MSA) -v two_dmn_var -a lev,lat -d lat,1,1 -d lev,1,1";
   $tst_cmd[2]="lev[0] lat[0] two_dmn_var[0]=17.5 fraction";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array   
   
-#NEW NCO 4.3.2
 #ncpdq #14
 # two_dmn_var (lat,lev) MSA (associated coordinates)
 # ncpdq -O -a lev,lat -d lat,1,1 -d lev,1,1 -v two_dmn_var ~/nco/data/in.nc ~/foo.nc
 # ncks ~/foo.nc
+  $dsc_sng="Re-order 2D variable (no -C, MSA) -v two_dmn_var -a lev,lat -d lat,1,1 -d lev,1,1";
   $tst_cmd[0]="ncpdq $omp_flg -O $fl_fmt $nco_D_flg -a lev,lat -d lat,1,1 -d lev,1,1 -v two_dmn_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_var %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable (no -C, MSA) -v two_dmn_var -a lev,lat -d lat,1,1 -d lev,1,1";
   $tst_cmd[2]="lev[0]=500 lat[0]=90 two_dmn_var[0]=17.5 fraction";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.2
 #ncpdq #15
 # two_dmn_rec_var(time,lev) 2D variable with record  (-C, no MSA)
 # ncpdq -O -C -a lev,time -v two_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
 # ncks -d time,1,1 -d lev,1,1 ~/foo.nc
+  $dsc_sng="Re-order 2D variable with record (-C, no MSA) -v two_dmn_rec_var -C -a lev,time";
   $tst_cmd[0]="ncpdq $omp_flg -O $fl_fmt $nco_D_flg -C -a lev,time -v two_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_rec_var -d time,1,1 -d lev,1,1 %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable with record (-C, no MSA) -v two_dmn_rec_var -C -a lev,time";
   $tst_cmd[2]="lev[1] time[1] two_dmn_rec_var[11]=2.1 watt meter-2";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array  
 
-
-#NEW NCO 4.3.2
 #ncpdq #16
 # two_dmn_rec_var(time,lev) 2D variable with record  (no MSA)
 # ncpdq -O -a lev,time -v two_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
 # ncks -d time,1,1 -d lev,1,1 ~/foo.nc
+  $dsc_sng="Re-order 2D variable with record (no -C, no MSA) -v two_dmn_rec_var -a lev,time";
   $tst_cmd[0]="ncpdq $omp_flg -O $fl_fmt $nco_D_flg -a lev,time -v two_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_rec_var -d time,1,1 -d lev,1,1 %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable with record (no -C, no MSA) -v two_dmn_rec_var -a lev,time";
   $tst_cmd[2]="lev[1]=500 time[1]=2 two_dmn_rec_var[11]=2.1 watt meter-2";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.2
 #ncpdq #17
 # two_dmn_rec_var(time,lev) 2D variable with record  (MSA)
 # ncpdq -O -C -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
 # ncks ~/foo.nc
+  $dsc_sng="Re-order 2D variable with record (-C, MSA) -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var";
   $tst_cmd[0]="ncpdq $omp_flg -O $fl_fmt $nco_D_flg -C -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_rec_var %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable with record (-C, MSA) -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var";
   $tst_cmd[2]="lev[0] time[0] two_dmn_rec_var[0]=2.1 watt meter-2";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array   
   
-#NEW NCO 4.3.2
 #ncpdq #18
 # two_dmn_rec_var(time,lev) 2D variable with record  (MSA)
 # ncpdq -O -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
 # ncks ~/foo.nc
+  $dsc_sng="Re-order 2D variable with record (no -C, MSA) -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var";
   $tst_cmd[0]="ncpdq $omp_flg -O $fl_fmt $nco_D_flg -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
   $tst_cmd[1]="ncks -v two_dmn_rec_var %tmp_fl_00%";
-  $dsc_sng="Re-order 2D variable with record (no -C, MSA) -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var";
   $tst_cmd[2]="lev[0]=500 time[0]=2 two_dmn_rec_var[0]=2.1 watt meter-2";
   $tst_cmd[3]="SS_OK";
   if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
   $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.2
 #ncpdq #19
 #three_dmn_var_dbl(time,lat,lon);
 #ncpdq -h -O -a lat,time -v three_dmn_var -d time,1,1 -d lat,1,1 -d lon,1,1 in.nc ~/foo.nc
+    $dsc_sng="Reverse/Re-order 3D variable -a -lat,-time -v three_dmn_var_dbl -d time,1,1 -d lat,1,1 -d lon,1,1";
     $tst_cmd[0]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -a -lat,-time -v three_dmn_var_dbl -d time,1,6,2 -d lat,0,1 -d lon,1,1 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -H -C -v three_dmn_var_dbl -d lat,1,1 -d time,2,2 %tmp_fl_00%";
-    $dsc_sng="Reverse/Re-order 3D variable -a -lat,-time -v three_dmn_var_dbl -d time,1,1 -d lat,1,1 -d lon,1,1";
     $tst_cmd[2]="lat[1]=-90 time[2]=2 lon[0]=90 three_dmn_var_dbl[5]=10";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array  
     
-#NEW NCO 4.3.2
 #ncpdq #20
 #three_dmn_rec_var(time,lat,lon);
 #ty(time,lat);
 #ncpdq -h -O -a lat,time -v ty,three_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
+    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (no MSA) Test1";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v ty,three_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v ty -d time,1,1 -d lat,1,1 %tmp_fl_00%";
-    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (no MSA) Test1";
     $tst_cmd[2]="lat[1]=90 time[1]=2 ty[11]=4";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array   
 
-#NEW NCO 4.3.2
 #ncpdq #21 (same run as #20)
 #three_dmn_rec_var(time,lat,lon);
 #ty(time,lat);
 #ncpdq -h -O -a lat,time -v ty,three_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
+    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (no MSA) Test2";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v ty,three_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v three_dmn_rec_var -d time,1,1 -d lat,1,1 -d lon,1,1 %tmp_fl_00%";
-    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (no MSA) Test2";
     $tst_cmd[2]="lat[1]=90 time[1]=2 lon[1]=90 three_dmn_rec_var[45]=14";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array         
   
-#NEW NCO 4.3.2
 #ncpdq #22
 #three_dmn_rec_var(time,lat,lon); MSA
 #ty(time,lat);
 #ncpdq -h -O -a lat,time -v ty,three_dmn_rec_var -d time,1,6,2 -d lat,1,1 in.nc ~/foo.nc
+    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (MSA) Test1 read ty";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v ty,three_dmn_rec_var -d time,1,6,2 -d lat,1,1 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v ty -d time,2,2 %tmp_fl_00%";
-    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (MSA) Test1 read ty";
     $tst_cmd[2]="lat[0]=90 time[2]=6 ty[2]=12";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array 
 
-#NEW NCO 4.3.2
 #ncpdq #23 (same run as #22)
 #three_dmn_rec_var(time,lat,lon); MSA
 #ty(time,lat);
 #ncpdq -h -O -a lat,time -v ty,three_dmn_rec_var -d time,1,6,2 -d lat,1,1 in.nc ~/foo.nc
+    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (MSA) Test2 read three_dmn_rec_var";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v ty,three_dmn_rec_var -d time,1,6,2 -d lat,1,1 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v three_dmn_rec_var -d lat,0,0 -d time,1,1 -d lon,1,1 %tmp_fl_00%";
-    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var (MSA) Test2 read three_dmn_rec_var";
     $tst_cmd[2]="lat[0]=90 time[1]=4 lon[1]=90 three_dmn_rec_var[5]=30";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.2
 #ncpdq #24 (same run as #22) check if output is the right record
-#three_dmn_rec_var(time,lat,lon); 
-#ty(time,lat);
 #ncpdq -h -O -a lat,time -v ty,three_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
-    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v ty,three_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
-    $tst_cmd[1]="ncks -m -C -v three_dmn_rec_var %tmp_fl_00% | grep 'three_dmn_rec_var dimension 0: lat, size = 2 NC_FLOAT (Record coordinate is lat)'";
+#ncks -m -C -v three_dmn_rec_var ~/foo.nc | grep 'Record' |  cut -d ' ' -f 1-7 # NB: the 'cut' call handles netCDF3/4 common output part
     $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var Test3 check record for lat";
-    $tst_cmd[2]="three_dmn_rec_var dimension 0: lat, size = 2 NC_FLOAT (Record coordinate is lat)";
+    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v ty,three_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncks -m -C -v three_dmn_rec_var %tmp_fl_00% | grep 'Record' | cut -d ' ' -f 1-7";
+    $tst_cmd[2]="three_dmn_rec_var dimension 0: lat, size = 2";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.2
 #ncpdq #25 (same run as #22) check if output is the right record
 #three_dmn_rec_var(time,lat,lon); 
 #ty(time,lat);
 #ncpdq -h -O -a lat,time -v ty,three_dmn_rec_var ~/nco/data/in.nc ~/foo.nc
+#ncks -m -C -v three_dmn_rec_var ~/foo.nc | grep 'three_dmn_rec_var dimension 1: time, size = 10 NC_DOUBLE (Coordinate is time)'"
+    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var Test4 check non-record dim is time";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v ty,three_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
-    $tst_cmd[1]="ncks -m -C -v three_dmn_rec_var %tmp_fl_00% | grep 'three_dmn_rec_var dimension 1: time, size = 10 NC_DOUBLE (Coordinate is time)'";
-    $dsc_sng="Re-order several variables -a lat,time -v ty,three_dmn_rec_var Test4 check non record for time";
-    $tst_cmd[2]="three_dmn_rec_var dimension 1: time, size = 10 NC_DOUBLE (Coordinate is time)";
+    $tst_cmd[1]="ncks -m -C -v three_dmn_rec_var %tmp_fl_00% | grep 'three_dmn_rec_var dimension 1' | rev ";
+    $tst_cmd[2]=")emit si etanidrooC(";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.2
 #ncpdq #26
 #four_dmn_rec_var(time,lat,lev,lon); MSA
 #ncpdq -h -O -a lev,time,-lon,-lat -v four_dmn_rec_var -d time,1,6,2 -d lat,1,1 -d lon,1,1 -d lev,1,1 in.nc ~/foo.nc
 #ncks -C -H -v four_dmn_rec_var -d time,2,2 ~/foo.nc
+    $dsc_sng="Reverse/Re-order 4D variable -a lev,time,-lon,-lat -v four_dmn_rec_var (MSA)";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lev,time,-lon,-lat -v four_dmn_rec_var -d time,1,6,2 -d lat,1,1 -d lon,1,1 -d lev,1,1 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v four_dmn_rec_var -d time,2,2 %tmp_fl_00%";
-    $dsc_sng="Reverse/Re-order 4D variable -a lev,time,-lon,-lat -v four_dmn_rec_var (MSA)";
     $tst_cmd[2]="lev[0]=500 time[2]=6 lon[0]=90 lat[0]=90 four_dmn_rec_var[2]=138";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array  
     
-#NEW NCO 4.3.2
 #ncpdq #27 : reorder 2 variables with -a lat,time and check a variable that only has 1 (lat)
 #PS(time,lat,lon)
 #three_dmn_var_crd(lev,lat,lon);
 #ncpdq -h -O -a lat,time -v PS,three_dmn_var_crd -d lev,1,1 -d lat,1,1 -d lon,1,1 -d lev,1,1 in.nc ~/foo.nc
 #ncks -C -H -v three_dmn_var_crd ~/foo.nc
+    $dsc_sng="Re-order 3D variable (only 1 in -a) -a lat,time -v PS,three_dmn_var_crd (MSA)";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -v PS,three_dmn_var_crd -d lev,1,1 -d lat,1,1 -d lon,1,1 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -H -C -v three_dmn_var_crd %tmp_fl_00%";
-    $dsc_sng="Re-order 3D variable (only 1 in -a) -a lat,time -v PS,three_dmn_var_crd (MSA)";
     $tst_cmd[2]="lat[0]=90 lev[0]=500 lon[0]=90 three_dmn_var_crd[0]=17";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array  
  
-#NEW NCO 4.3.2
 #ncpdq #28 
 #ncpdq -h -O -a lat,time -d time,1,6,2 -d lat,1,1 in.nc ~/foo.nc
 #ncks -C -H -v -d time,2,2 four_dmn_rec_var ~/foo.nc
+    $dsc_sng="Re-order all variables -a lat,time (MSA)";
     $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -a lat,time -d time,1,1 -d lat,1,1 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v four_dmn_rec_var -d lon,2,2 -d lev,2,2 %tmp_fl_00%";
-    $dsc_sng="Re-order all variables -a lat,time (MSA)";
     $tst_cmd[2]="lat[0]=90 time[0]=2 lev[2]=1000 lon[2]=180 four_dmn_rec_var[10]=47";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -3045,29 +3043,29 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 #####################       
     
 #ncpdq #29
+    $dsc_sng="Pack and then unpack scalar (uses only add_offset) -P all_new -v upk";
     $tst_cmd[0]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -P all_new -v upk $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -P upk -v upk %tmp_fl_00% %tmp_fl_00%";
     $tst_cmd[2]="ncks -C -H -s '%g' -v upk %tmp_fl_00%";
-    $dsc_sng="Pack and then unpack scalar (uses only add_offset) -P all_new -v upk";
     $tst_cmd[3]="3";
     $tst_cmd[4]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
 
 #ncpdq #30
+    $dsc_sng="Unpack 1D variable with MSA -C P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6";
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v rec_var_dbl_mss_val_dbl_pck -d time,5 %tmp_fl_00%";
-    $dsc_sng="Unpack 1D variable with MSA -C P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6";
     $tst_cmd[2]="7";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
 
 #ncpdq #31
+    ##### TODO 880
+    $dsc_sng="Pack 3D variable with MSA -C -P all_xst -v three_dmn_var_dbl -d time,0,2 -d time,8,9 -d lon,0 -d lon,1 -d lat,1"; 
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P all_xst -v three_dmn_var_dbl -d time,0,2 -d time,8,9 -d lon,0 -d lon,1 -d lat,1 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%i' -v three_dmn_var_dbl -d time,2 -d lon,1 -d lat,0 %tmp_fl_00%";
-    $dsc_sng="Pack 3D variable with MSA -C -P all_xst -v three_dmn_var_dbl -d time,0,2 -d time,8,9 -d lon,0 -d lon,1 -d lat,1"; 
-    ##### TODO 880
     $tst_cmd[2]="17505";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -3083,25 +3081,19 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 #### ncpdq GROUP tests 
 #####################    
 
-#NEW NCO 4.3.2
-#ncpdq #11
+#ncpdq #32
 # two_dmn_var (lat,lev) -C, no MSA (no associated coordinates)
 # ncpdq -O -C -a lev,lat -v two_dmn_var ~/nco/data/in.nc ~/foo.nc
 # ncks -v two_dmn_var -d lat,1,1 -d lev,1,1 ~/foo.nc
-
 # same as previous but with group
-    
-#NEW NCO 4.3.2
-#ncpdq #32
 # group: g19 { 
 # dimensions:lat=2;lev=3;lon=4;time=unlimited;
-#ncpdq #11
 # two_dmn_var (lat,lev) -C, no MSA (no associated coordinates)
 # ncpdq -O -C -g g19g1 -a lev,lat -v two_dmn_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks -g g19g1 -v two_dmn_var -d lat,1,1 -d lev,1,1 ~/foo.nc
+   $dsc_sng="(Groups) Re-order 2D variable (-C, no MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -C -g g19g1 -a lev,lat -v two_dmn_var $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -g g19g1 -v two_dmn_var -d lat,1,1 -d lev,1,1 %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable (-C, no MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[2]="lev[1] lat[1] two_dmn_var[3]=17.5 fraction";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -3116,7 +3108,6 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 
 # same as previous but with group
     
-#NEW NCO 4.3.2
 #ncpdq #33
 # group: g19 { 
 # dimensions:lat=2;lev=3;lon=4;time=unlimited;
@@ -3124,15 +3115,14 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 # two_dmn_var (lat,lev) no -C, no MSA 
 # ncpdq -O -g g19g1 -a lev,lat -v two_dmn_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks -C -g g19g1 -v two_dmn_var -d lat,1,1 -d lev,1,1 ~/foo.nc
+   $dsc_sng="(Groups) Re-order 2D variable (no -C, no MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -g g19g1 -a lev,lat -v two_dmn_var $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -C -g g19g1 -v two_dmn_var -d lat,1,1 -d lev,1,1 %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable (no -C, no MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[2]="lev[1]=500 lat[1]=90 two_dmn_var[3]=17.5 fraction";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array    
 
-#NEW NCO 4.3.2
 #ncpdq #13
 # two_dmn_var (lat,lev) -C, MSA (no associated coordinates)
 # ncpdq -O -C -a lev,lat -d lat,1,1 -d lev,1,1 -v two_dmn_var ~/nco/data/in.nc ~/foo.nc
@@ -3140,7 +3130,6 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 
 # same as previous but with group
     
-#NEW NCO 4.3.2
 #ncpdq #34
 # group: g19 { 
 # dimensions:lat=2;lev=3;lon=4;time=unlimited;
@@ -3148,9 +3137,9 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 # two_dmn_var (lat,lev) -C, MSA (no associated coordinates)
 # ncpdq -O -C -a lev,lat -d lat,1,1 -d lev,1,1 -v two_dmn_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks ~/foo.nc
+   $dsc_sng="(Groups) Re-order 2D variable (-C, MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -g g19g1 -C -a lev,lat -v two_dmn_var -d lat,1,1 -d lev,1,1 $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -g g19g1 -v two_dmn_var %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable (-C, MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[2]="lev[0] lat[0] two_dmn_var[0]=17.5 fraction";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -3165,16 +3154,15 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 
 # same as previous but with group
     
-#NEW NCO 4.3.2
 #ncpdq #35
 # group: g19 { 
 # dimensions:lat=2;lev=3;lon=4;time=unlimited;
 # two_dmn_var (lat,lev) MSA (associated coordinates)
 # ncpdq -O -g g19g1 -a lev,lat -d lat,1,1 -d lev,1,1 -v two_dmn_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks -C -g g19g1 -v two_dmn_var ~/foo.nc
+   $dsc_sng="(Groups) Re-order 2D variable (no -C, MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -g g19g1 -a lev,lat -v two_dmn_var -d lat,1,1 -d lev,1,1 $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -C -g g19g1 -v two_dmn_var %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable (no -C, MSA) -v two_dmn_var -a lev,lat";
    $tst_cmd[2]="lev[0]=500 lat[0]=90 two_dmn_var[0]=17.5 fraction";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -3188,78 +3176,75 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 
 # same as previous but with group
     
-#NEW NCO 4.3.2
 #ncpdq #36
 # group: g19 { 
 # dimensions:lat=2;lev=3;lon=4;time=unlimited;
 # ncpdq -O -g g19g2 -C -a lev,time -v two_dmn_rec_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks -d time,1,1 -d lev,1,1 ~/foo.nc
+   $dsc_sng="(Groups) Re-order 2D variable with record (-C, no MSA) -v two_dmn_rec_var -C -a lev,time";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -g g19g2 -C -a lev,time -v two_dmn_rec_var $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -g g19g2 -v two_dmn_rec_var -d time,1,1 -d lev,1,1 %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable with record (-C, no MSA) -v two_dmn_rec_var -C -a lev,time";
    $tst_cmd[2]="lev[1] time[1] two_dmn_rec_var[11]=2.1 watt meter-2";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array      
 
-#NEW NCO 4.3.2
 #ncpdq #37
 # two_dmn_rec_var(time,lev) 2D variable with record  (no -C, no MSA)
 # ncpdq -O -g g19g2 -a lev,time -v two_dmn_rec_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks -C -g g19g2 -d time,1,1 -d lev,1,1 ~/foo.nc
 # same #16 as previous but with group
+   $dsc_sng="(Groups) Re-order 2D variable with record (no -C, no MSA) -v two_dmn_rec_var -C -a lev,time";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -g g19g2 -a lev,time -v two_dmn_rec_var $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -C -g g19g2 -d time,1,1 -d lev,1,1 %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable with record (no -C, no MSA) -v two_dmn_rec_var -C -a lev,time";
    $tst_cmd[2]="lev[1]=500 time[1]=2 two_dmn_rec_var[11]=2.1 watt meter-2";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array      
 
-#NEW NCO 4.3.2
 #ncpdq #38
 # two_dmn_rec_var(time,lev) 2D variable with record  (MSA)
 # ncpdq -O -C -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks -g g19g2 -v two_dmn_rec_var ~/foo.nc
 # same as #17 but with group
+   $dsc_sng="(Groups) Re-order 2D variable with record (-C, MSA) -v two_dmn_rec_var -C -a lev,time";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -C -g g19g2 -a lev,time -v two_dmn_rec_var -d time,1,1 -d lev,1,1 $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -g g19g2 -v two_dmn_rec_var %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable with record (-C, MSA) -v two_dmn_rec_var -C -a lev,time";
    $tst_cmd[2]="lev[0] time[0] two_dmn_rec_var[0]=2.1 watt meter-2";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array      
 
-#NEW NCO 4.3.2
 #ncpdq #39
 # two_dmn_rec_var(time,lev) 2D variable with record  (MSA)
 # ncpdq -O -g g19g2 -a lev,time -d time,1,1 -d lev,1,1 -v two_dmn_rec_var ~/nco/data/in_grp_3.nc ~/foo.nc
 # ncks -C -g g19g2 -v two_dmn_rec_var ~/foo.nc
 # $tst_cmd[2]="lev[0]=500 time[0]=2 two_dmn_rec_var[0]=2.1 watt meter-2";
 # same as #18 but with group
+   $dsc_sng="(Groups) Re-order 2D variable with record (no -C, MSA) -v two_dmn_rec_var";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -g g19g2 -a lev,time -v two_dmn_rec_var -d time,1,1 -d lev,1,1 $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -C -g g19g2 -v two_dmn_rec_var %tmp_fl_00%";
-   $dsc_sng="(Groups) Re-order 2D variable with record (no -C, MSA) -v two_dmn_rec_var";
    $tst_cmd[2]="lev[0]=500 time[0]=2 two_dmn_rec_var[0]=2.1 watt meter-2";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array  
 
 #NEW NCO 4.3.5
+#ncpdq #40
 #ncpdq -O -a -lat -g g23,g24 ~/nco/data/in_grp_3.nc ~/foo.nc
+   $dsc_sng="(Groups) Reverse -a lat -g g23 several groups";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -a -lat -g g23,g24 $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -v lat -g g23 %tmp_fl_00%";
-   $dsc_sng="(Groups) Reverse -a lat -g g23 several groups";
    $tst_cmd[2]="lat[1]=-60 degrees_north";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.5
+#ncpdq #41
 #ncpdq -O -a -lat -g g23,g24 ~/nco/data/in_grp_3.nc ~/foo.nc
+   $dsc_sng="(Groups) Reverse -a lat -g g24 several groups";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -O -a -lat -g g23,g24 $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -v lat -g g24 %tmp_fl_00%";
-   $dsc_sng="(Groups) Reverse -a lat -g g24 several groups";
    $tst_cmd[2]="lat[1]=-60 degrees_north";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -3269,39 +3254,35 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 #### ncpdq PACK GROUP tests 
 #####################   
 
-#NEW NCO 4.3.2patch
-#ncpdq #40
+#ncpdq #42
 #ncpdq -h -O -P all_new -v upk in.nc ~/foo.nc
 #ncpdq -h -O -P upk -v upk ~/foo.nc ~/foo.nc
 #ncks -C -H -s '%g' -v upk ~/foo.nc
 # same as #29 but with group
+   $dsc_sng="(Groups) Pack and then unpack scalar (uses only add_offset) -P all_new -v upk";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -h -O -g g19g4 -P all_new -v upk $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncpdq $omp_flg -h -O $fl_fmt $nco_D_flg -P upk -v upk %tmp_fl_00% %tmp_fl_00%";
-   $dsc_sng="(Groups) Pack and then unpack scalar (uses only add_offset) -P all_new -v upk";
    $tst_cmd[2]="ncks -C -H -s '%g' -v upk %tmp_fl_00%";
    $tst_cmd[3]="3";
    $tst_cmd[4]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array  
 
-#NEW NCO 4.3.2patch
-#ncpdq #41
+#ncpdq #43
 # same as ncpdq #30
-#ncpdq -g g19g4 -h -O -C -P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6 in_grp_3.nc ~/foo.nc
-#ncks -g g19g4 -C -H -s '%f' -v rec_var_dbl_mss_val_dbl_pck -d time,5 ~/foo.nc
+# ncpdq -g g19g4 -h -O -C -P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6 in_grp_3.nc ~/foo.nc
+# ncks -g g19g4 -C -H -s '%f' -v rec_var_dbl_mss_val_dbl_pck -d time,5 ~/foo.nc
 #$tst_cmd[2]="7";
 # same as #30 but with group
-
+   $dsc_sng="(Groups) Unpack 1D variable with MSA -C P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6";
    $tst_cmd[0]="ncpdq $omp_flg $fl_fmt $nco_D_flg -g g19g4 -h -O -C -P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6 $in_pth_arg in_grp_3.nc %tmp_fl_00%";
    $tst_cmd[1]="ncks -g g19g4 -C -H -s '%f' -v rec_var_dbl_mss_val_dbl_pck -d time,5 %tmp_fl_00%";
-   $dsc_sng="(Groups) Unpack 1D variable with MSA -C P upk -v rec_var_dbl_mss_val_dbl_pck -d time,0,4 -d time,6";
    $tst_cmd[2]="7";
    $tst_cmd[3]="SS_OK";
    if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
    $#tst_cmd=0; # Reset array  
    	
-#NEW NCO 4.4.0
-#ncpdq #46
+#ncpdq #44
 # ncpdq -O -4 -a lon,lat --cnk_min=1 --cnk_plc=xpl --cnk_dmn lat,1 --cnk_dmn lon,2 -v lat_2D_rct ~/nco/data/in.nc ~/foo.nc
 # ncks -m ~/foo.nc | grep 'lat_2D_rct dimension 0'
    $dsc_sng="Chunking -a lon,lat --cnk_min=1 --cnk_plc=xpl --cnk_dmn lat,1 --cnk_dmn lon,2 -v lat_2D_rct";
@@ -3314,39 +3295,39 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 	
 } ##### Group tests	
 	
-#ncpdq #42
+#ncpdq #45
+    $dsc_sng="Unpack 1D variable twice to verify first unpacking does not inadvertently store packing attributes";
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P upk -v pck_7 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P upk -v pck_7 %tmp_fl_00% %tmp_fl_01%";
     $tst_cmd[2]="ncks -C -H -s '%f' -v pck_7 %tmp_fl_01%";
-    $dsc_sng="Unpack 1D variable twice to verify first unpacking does not inadvertently store packing attributes";
     $tst_cmd[3]="7";
     $tst_cmd[4]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
 	
-#ncpdq #43	
+#ncpdq #46
+    $dsc_sng="Unpack 1D variable with netCDF convention";
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P upk -v pck_7 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v pck_7 %tmp_fl_00%";
-    $dsc_sng="Unpack 1D variable with netCDF convention";
     $tst_cmd[2]="7";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
 	
-#ncpdq #44	
+#ncpdq #47
+    $dsc_sng="Unpack 1D variable with HDF convention";
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P upk --hdf_upk -v pck_7 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%f' -v pck_7 %tmp_fl_00%";
-    $dsc_sng="Unpack 1D variable with HDF convention";
     $tst_cmd[2]="-8";
     $tst_cmd[3]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
     $#tst_cmd=0; # Reset array
 	
-#ncpdq #45	
+#ncpdq #48
+    $dsc_sng="Re-pack 1D variable from HDF convention to netCDF convention";
     $tst_cmd[0]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P xst_new --hdf_upk -v pck_7 $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncpdq $omp_flg -h -O -C $fl_fmt $nco_D_flg -P upk -v pck_7 %tmp_fl_00% %tmp_fl_01%";
     $tst_cmd[2]="ncks -C -H -s '%f' -v pck_7 %tmp_fl_01%";
-    $dsc_sng="Re-pack 1D variable from HDF convention to netCDF convention";
     $tst_cmd[3]="-8";
     $tst_cmd[4]="SS_OK";
     if($mpi_prc == 0 || ($mpi_prc > 0 && !($localhostname =~ /pbs/))){NCO_bm::tst_run(\@tst_cmd);} # ncpdq hangs with MPI TODO nco772
@@ -3361,63 +3342,58 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 #ncrcat #01
 
 #if($mpi_prc == 0){ # fxm test hangs because of ncrcat TODO 593
+    $dsc_sng="Concatenate float with double missing values across two files";
     $tst_cmd[0]="ncra -Y ncrcat $omp_flg -h -O $fl_fmt $nco_D_flg -v rec_var_flt_mss_val_dbl $in_pth_arg in.nc in.nc %tmp_fl_00% 2> %tmp_fl_02%";
     $tst_cmd[1]="ncks -C -H -d time,11 -s '%f' -v rec_var_flt_mss_val_dbl %tmp_fl_00%";
-    $dsc_sng="Concatenate float with double missing values across two files";
     $tst_cmd[2]="2";
     $tst_cmd[3]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
 	
 #ncrcat #02	
-
+    $dsc_sng="Concatenate record coordinate-bounded variable across two non-monotonic files";
     $tst_cmd[0]="ncra -Y ncrcat $omp_flg -h -O $fl_fmt $nco_D_flg -v one_dmn_rec_var $in_pth_arg in.nc in.nc -d time,2.,3. %tmp_fl_00% 2> %tmp_fl_02%";
     $tst_cmd[1]="ncks -C -H -s '%d ' -v one_dmn_rec_var %tmp_fl_00%";
-    $dsc_sng="Concatenate record coordinate-bounded variable across two non-monotonic files";
     $tst_cmd[2]="2 3 2 3";
     $tst_cmd[3]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
 	
 #ncrcat #03	
-
+    $dsc_sng="Concatenate float variable with multislabs across two files";
     $tst_cmd[0]="ncra -Y ncrcat $omp_flg -h -O $fl_fmt $nco_D_flg -v three_dmn_var_dbl $in_pth_arg -d time,,2 -d lat,0,0 -d lon,0,0 -d lon,3,3 in.nc in.nc %tmp_fl_00% 2> %tmp_fl_02%";
     $tst_cmd[1]="ncwa $omp_flg -h -O $fl_fmt $nco_D_flg -y max %tmp_fl_00% %tmp_fl_01%"; 
     $tst_cmd[2]="ncks -C -H -s '%f' -v three_dmn_var_dbl %tmp_fl_01%";
-    $dsc_sng="Concatenate float variable with multislabs across two files";
     $tst_cmd[3]="20";
     $tst_cmd[4]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
 	
 #ncrcat #04	
-
+    $dsc_sng="Concatenate int variable with multislabs across two files";
     $tst_cmd[0]="ncra -Y ncrcat $omp_flg -h -O $fl_fmt $nco_D_flg -v three_dmn_var_int $in_pth_arg -d time,,6 -d lat,0,0 -d lon,0,0 -d lon,3,3 in.nc in.nc %tmp_fl_00% 2> %tmp_fl_02%";
     $tst_cmd[1]="ncwa $omp_flg -h -O $fl_fmt $nco_D_flg %tmp_fl_00% %tmp_fl_01%"; 
     $tst_cmd[2]="ncks -C -H -s '%d' -v three_dmn_var_int %tmp_fl_01%";
-    $dsc_sng="Concatenate int variable with multislabs across two files";
     $tst_cmd[3]="28";
     $tst_cmd[4]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
 	
 #ncrcat #05	
-
+    $dsc_sng="Concatenate float 4D variable with multislabs across two files";
     $tst_cmd[0]="ncra -Y ncrcat $omp_flg -h -O $fl_fmt $nco_D_flg -v four_dmn_rec_var $in_pth_arg -d time,0,,4 -d lat,0,0 -d lon,0,1 -d lon,3,3 in.nc in.nc %tmp_fl_00% 2> %tmp_fl_02%";
     $tst_cmd[1]="ncwa $omp_flg -h -y max -O $fl_fmt $nco_D_flg %tmp_fl_00% %tmp_fl_01%"; 
     $tst_cmd[2]="ncks -C -H -s '%f' -v four_dmn_rec_var %tmp_fl_01%";
-    $dsc_sng="Concatenate float 4D variable with multislabs across two files";
     $tst_cmd[3]="204";
     $tst_cmd[4]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
 	
 #ncrcat #06	
-
+    $dsc_sng="Concatenate 1D variable with stride across two files";
     $tst_cmd[0]="ncap2 -h -O $fl_fmt $nco_D_flg -v -s 'time+=10;' $in_pth_arg in.nc %tmp_fl_00%";    
     $tst_cmd[1]="ncra -Y ncrcat -O $omp_flg $fl_fmt $nco_D_flg -C -v time -d time,0,,4 $in_pth/in.nc %tmp_fl_00% %tmp_fl_01% 2> %tmp_fl_02%";
     $tst_cmd[2]="ncks -C -H -s '%2.f,' -v time %tmp_fl_01%";
-    $dsc_sng="Concatenate 1D variable with stride across two files";
     $tst_cmd[3]=" 1, 5, 9,13,17";
     $tst_cmd[4]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
@@ -4228,7 +4204,7 @@ if(0){
 # Test MSA running averages
 # ncra -O -C -v one_dmn_rec_var -d time,0,0 -d time,1,1 ~/nco/data/in.nc ~/foo.nc
 # ncks -C -H -s '%g' -v one_dmn_rec_var ~/foo.nc
-    $dsc_sng="Test MSA running average";
+    $dsc_sng="Test MSA running average (expect failure TODO nco1126)";
     $tst_cmd[0]="ncra -h -O $fl_fmt $nco_D_flg -C -v one_dmn_rec_var $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -s '%g' -v one_dmn_rec_var %tmp_fl_00%";
     $tst_cmd[2]="1.5";
diff --git a/bm/nco_bm.pl b/bm/nco_bm.pl
index 9d7183d..5dec176 100755
--- a/bm/nco_bm.pl
+++ b/bm/nco_bm.pl
@@ -1,6 +1,5 @@
 #!/usr/bin/env perl
-# Shebang line above may have to be set explicitly to /usr/local/bin/perl
-# on ESMF when running in queue. Otherwise it may pick up older perl
+# Shebang line above may have to be set explicitly to /usr/local/bin/perl on ESMF when running in queue. Otherwise it may pick up older perl.
 
 # $Header$
 
diff --git a/config.h.in b/config.h.in
index 49eb34d..a2af187 100644
--- a/config.h.in
+++ b/config.h.in
@@ -418,9 +418,15 @@
 /* Building TeXInfo documentation requires version greater than 4.8 */
 #undef MAKEINFO_VERSION
 
+/* GSL major version number */
+#undef NCO_GSL_MAJOR_VERSION
+
 /* GSL minor version number */
 #undef NCO_GSL_MINOR_VERSION
 
+/* GSL version number */
+#undef NCO_GSL_VERSION
+
 /* POSIX extended regular expressions available */
 #undef NCO_HAVE_REGEX_FUNCTIONALITY
 
diff --git a/configure b/configure
index 3190a29..02c7b3a 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.5.3.
+# Generated by GNU Autoconf 2.69 for NCO netCDF Operators 4.5.4.
 #
 # 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.5.3'
-PACKAGE_STRING='NCO netCDF Operators 4.5.3'
+PACKAGE_VERSION='4.5.4'
+PACKAGE_STRING='NCO netCDF Operators 4.5.4'
 PACKAGE_BUGREPORT='nco-bugs at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1393,7 +1393,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.5.3 to adapt to many kinds of systems.
+\`configure' configures NCO netCDF Operators 4.5.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1464,7 +1464,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of NCO netCDF Operators 4.5.3:";;
+     short | recursive ) echo "Configuration of NCO netCDF Operators 4.5.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1629,7 +1629,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-NCO netCDF Operators configure 4.5.3
+NCO netCDF Operators configure 4.5.4
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2495,7 +2495,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.5.3, which was
+It was created by NCO netCDF Operators $as_me 4.5.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3744,7 +3744,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='nco'
- VERSION='4.5.3'
+ VERSION='4.5.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -19770,17 +19770,31 @@ $as_echo "$as_me: WARNING: GSL support disabled (missing/unusable library or hea
     elif test "${enable_gsl}" = 'yes'; then
 # Assumes GSL version in form 1.[0-9]+  extract minor version only
 	GSL_VER="`${GSL_CONFIG} --version`"
-	GSL_VER=`echo "${GSL_VER}" | sed -e 's/^1\.//'`
+	GSL_MAJOR="`echo "${GSL_VER}" | cut -d '.' -f 1`"
+	GSL_MINOR="`echo "${GSL_VER}" | cut -d '.' -f 2`"
+        GSL_VER=`expr $GSL_MAJOR \* 100 + $GSL_MINOR`
 	if test "x${GSL_VER}" = 'x'; then
 	    # 20100115: Fix for machines like bluefire that lack gsl-config
-	    GSL_VER='4'
+	    GSL_VER='104'
+            GSL_MAJOR='1'
+            GSL_MINOR='4'
 	fi
 
 $as_echo "#define ENABLE_GSL 1" >>confdefs.h
 
 
 cat >>confdefs.h <<_ACEOF
-#define NCO_GSL_MINOR_VERSION ${GSL_VER}
+#define NCO_GSL_MINOR_VERSION ${GSL_MINOR}
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define NCO_GSL_MAJOR_VERSION ${GSL_MAJOR}
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define NCO_GSL_VERSION ${GSL_VER}
 _ACEOF
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: GSL support enabled" >&5
@@ -21453,7 +21467,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.5.3, which was
+This file was extended by NCO netCDF Operators $as_me 4.5.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21519,7 +21533,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.5.3
+NCO netCDF Operators config.status 4.5.4
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 8315b81..54a3b05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 # Purpose: Template autoconf uses to generate NCO configure script
 # Newer convention names this file configure.ac, rather than configure.in
 
-# Copyright (C) 2003--2015 Charlie Zender
+# Copyright (C) 2003--2016 Charlie Zender
 # License: GNU General Public License (GPL) Version 3
 # See http://www.gnu.org/copyleft/gpl.html for full license text
 
@@ -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.5.3],[nco-bugs at lists.sourceforge.net],[nco])
+AC_INIT([NCO netCDF Operators],[4.5.4],[nco-bugs at lists.sourceforge.net],[nco])
 
 # Print GNU copyright in configure script
 AC_COPYRIGHT
@@ -651,13 +651,19 @@ if test "${enable_gsl}" != 'no'; then
     elif test "${enable_gsl}" = 'yes'; then
 # Assumes GSL version in form 1.[0-9]+  extract minor version only   
 	GSL_VER="`${GSL_CONFIG} --version`" 
-	GSL_VER=`echo "${GSL_VER}" | sed -e 's/^1\.//'`  
+	GSL_MAJOR="`echo "${GSL_VER}" | cut -d '.' -f 1`"
+	GSL_MINOR="`echo "${GSL_VER}" | cut -d '.' -f 2`"
+        GSL_VER=`expr $GSL_MAJOR \* 100 + $GSL_MINOR`  
 	if test "x${GSL_VER}" = 'x'; then
 	    # 20100115: Fix for machines like bluefire that lack gsl-config
-	    GSL_VER='4' 
+	    GSL_VER='104' 
+            GSL_MAJOR='1'
+            GSL_MINOR='4'
 	fi
 	AC_DEFINE(ENABLE_GSL,1,Compile operators with GSL support)
-	AC_DEFINE_UNQUOTED(NCO_GSL_MINOR_VERSION,${GSL_VER},GSL minor version number)
+	AC_DEFINE_UNQUOTED(NCO_GSL_MINOR_VERSION,${GSL_MINOR},GSL minor version number)
+	AC_DEFINE_UNQUOTED(NCO_GSL_MAJOR_VERSION,${GSL_MAJOR},GSL major version number)
+	AC_DEFINE_UNQUOTED(NCO_GSL_VERSION,${GSL_VER},GSL version number)
 	AC_MSG_NOTICE([GSL support enabled])
     fi
 fi
diff --git a/configure.eg b/configure.eg
index a3eb3c1..3e7e3cd 100644
--- a/configure.eg
+++ b/configure.eg
@@ -268,6 +268,22 @@ 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 develop/install/update netCDF4-enabled NCO in personal directories on cori:
+# Used 20151204-
+module load szip
+module load gsl
+module load udunits
+module load cray-netcdf
+export GNU_TRP=`~/nco/autobld/config.guess`
+cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
+ANTLR_ROOT=${HOME} CC='icc' CXX='icpc' GSL_ROOT='/usr/common/software/gsl/1.16/intel' NETCDF_ROOT='/opt/cray/netcdf/4.3.3.1/INTEL/14.0' UDUNITS2_PATH='/usr/common/software/udunits/2.2.19/hsw/intel' ./configure --prefix=${HOME} --bindir=${HOME}/bin --datadir=${HOME}/nco/data --libdir=${HOME}/lib --mandir=${HOME}/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
+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 develop/install/update netCDF4-enabled NCO in personal directories on edison:
 # Used 20150825-
 module load szip
diff --git a/data/Makefile.am b/data/Makefile.am
index de5a063..a55bc00 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -69,6 +69,10 @@ mdl_3.nc : mdl_3.cdl
 
 all: ${test_data} ${test_data_netCDF4}
 
+# Autoconf/automake instructions for scripts:
+# https://www.gnu.org/software/automake/manual/html_node/Scripts.html
+dist_bin_SCRIPTS = ncremap
+
 EXTRA_DIST = big.cdl dsm.cdl hdn.cdl mrd.cdl in.cdl in_grp.cdl in_grp_1.cdl in_grp_2.cdl in_grp_3.cdl in_grp_4.cdl in_grp_5.cdl in_grp_6.cdl in_grp_7.cdl in_1.cdl in_2.cdl cmip5.cdl obs.cdl mdl_1.cdl buggy.cdl in_rec_zero.cdl ncap.in ncap.in2 ncap2.in tst.nco
 
 # Automake manual section 14:
diff --git a/data/Makefile.in b/data/Makefile.in
index 39075d7..e7522e6 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -15,6 +15,7 @@
 @SET_MAKE@
 
 # $Header$ -*-makefile-*-
+
 VPATH = @srcdir@
 am__is_gnu_make = { \
   if test -z '$(MAKELEVEL)'; then \
@@ -98,11 +99,41 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(SHELL) $(top_srcdir)/autobld/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(bindir)"
+SCRIPTS = $(dist_bin_SCRIPTS)
 AM_V_P = $(am__v_P_ at AM_V@)
 am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -274,6 +305,10 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 test_data = big.nc in.nc in_rec_zero.nc
 test_data_netCDF4 = in_4c.nc in_grp.nc in_grp_1.nc in_grp_2.nc in_grp_3.nc in_grp_4.nc in_grp_5.nc in_grp_6.nc in_grp_7.nc cmip5.nc obs.nc mdl_1.nc mdl_2.nc mdl_3.nc hdn.nc mrd.nc
+
+# Autoconf/automake instructions for scripts:
+# https://www.gnu.org/software/automake/manual/html_node/Scripts.html
+dist_bin_SCRIPTS = ncremap
 EXTRA_DIST = big.cdl dsm.cdl hdn.cdl mrd.cdl in.cdl in_grp.cdl in_grp_1.cdl in_grp_2.cdl in_grp_3.cdl in_grp_4.cdl in_grp_5.cdl in_grp_6.cdl in_grp_7.cdl in_1.cdl in_2.cdl cmip5.cdl obs.cdl mdl_1.cdl buggy.cdl in_rec_zero.cdl ncap.in ncap.in2 ncap2.in tst.nco
 
 # Automake manual section 14:
@@ -316,6 +351,41 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-dist_binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -361,8 +431,11 @@ distdir: $(DISTFILES)
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile
+all-am: Makefile $(SCRIPTS)
 installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -422,7 +495,7 @@ install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am:
+install-exec-am: install-dist_binSCRIPTS
 
 install-html: install-html-am
 
@@ -460,21 +533,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-dist_binSCRIPTS
 
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
 	cscopelist-am ctags-am distclean distclean-generic \
 	distclean-libtool distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags-am uninstall uninstall-am
+	install install-am install-data install-data-am \
+	install-dist_binSCRIPTS install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+	uninstall-am uninstall-dist_binSCRIPTS
 
 .PRECIOUS: Makefile
 
diff --git a/data/gsl_sf.in b/data/gsl_sf.in
index b46273a..8d13a75 100644
--- a/data/gsl_sf.in
+++ b/data/gsl_sf.in
@@ -200,13 +200,17 @@ nbr_err_ttl=0;
 
   // d2,d3 identical
   d2=gsl_sf_legendre_Plm(time.int()-1,0,0.7);
-  d3=time;
-  gsl_sf_legendre_Plm_array(9,0,0.7,&d3);
+
+    
+  // not in gsl 2.0
+  //gsl_sf_legendre_Plm_array(9,0,0.7,&d3);
 
   // d4,d5 identical
   d4=gsl_sf_legendre_sphPlm(leg,0,0.7);
-  d5=leg.double();
-  gsl_sf_legendre_sphPlm_array(3,0,0.7,&d5);
+  
+
+  // not in gsl 2.0
+  // gsl_sf_legendre_sphPlm_array(3,0,0.7,&d5);
 
 
   if( fabs(d0.total()-d1.total() ) >0.01){
@@ -214,14 +218,14 @@ nbr_err_ttl=0;
      nbr_err++;	
   }
 
-
-  if( fabs(d2.total()-d3.total() ) >0.01){
+  
+  if( fabs(d2.total()- 1.56887  ) >0.01){
      print("ERROR: d2:Legendre functions\n");
      nbr_err++;	
   }
 
 
-  if( fabs(d4.avg()-d5.avg() ) >0.01){
+  if( fabs(d4.ttl()- 0.628677 ) >0.01){
      print("ERROR: d4:Legendre functions\n");
      nbr_err++;	
   }
diff --git a/data/in.cdl b/data/in.cdl
index 6a29c68..717c9b9 100644
--- a/data/in.cdl
+++ b/data/in.cdl
@@ -63,7 +63,7 @@
 
 netcdf in {
 dimensions:
-  dgn=1,bnd=2,lat=2,lat_grd=3,lev=3,rlev=3,lon=4,lon_grd=5,char_dmn_lng80=80,char_dmn_lng26=26,char_dmn_lng04=4,date_dmn=5,fl_dmn=3,lsmlev=6,wvl=2,time_udunits=3;lon_T42=128,lat_T42=64,lat_times_lon=8,gds_crd=8,gds_ncd=8,vrt_nbr=2,lon_cal=10,lat_cal=10,Lon=4,Lat=2,time=unlimited;
+  dgn=1,bnd=2,lat=2,lat_grd=3,lev=3,rlev=3,ilev=4,lon=4,lon_grd=5,char_dmn_lng80=80,char_dmn_lng26=26,char_dmn_lng04=4,date_dmn=5,fl_dmn=3,lsmlev=6,wvl=2,time_udunits=3;lon_T42=128,lat_T42=64,lat_times_lon=8,gds_crd=8,gds_ncd=8,vrt_nbr=2,lon_cal=10,lat_cal=10,Lon=4,Lat=2,time=unlimited;
 variables:
   :Conventions = "CF-1.5";
   :history = "History global attribute.\nTextual attributes like history often have embedded newlines like this.\nSuch newlines should serve as linebreaks on the screen to enhance legibility like this.\nFriendly CDL converters print a single NC_CHAR attribute as a comma-separated list of strings where each embedded delimiter marks a linebreak. This makes poetry embedded in CDL much nicer to read:\n\nA POET by Hafiz\n\nA poet is someone\nWho can pour light into a cup,\nThen raise it to no [...]
@@ -139,18 +139,35 @@ variables:
 
 	float lev(lev);
 	lev:purpose = "Monotonically increasing coordinate pressure";
-	lev:units = "hybrid_sigma_pressure";
+	lev:long_name = "hybrid level at midpoints (1000*(A+B))";
+	lev:units = "hPa";
 	lev:positive = "down";
 	lev:A_var = "hyam";
 	lev:B_var = "hybm";
 	lev:P0_var = "P0";
 	lev:PS_var = "PS";
-	lev:bounds = "ilev";
-
-	float ilev(lev,vrt_nbr);
-	ilev:purpose = "Cell boundaries for lev coordinate";
-
-	float rlev(rlev);
+	lev:bounds = "lev_bnd";
+        lev:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate";
+        lev:formula_terms = "a: hyam b: hybm p0: P0 ps: PS";
+        lev:formula_readable = "prs_mdp[time,lat,lon,lev]=P0*hyam+PS*hybm";
+
+	float ilev(ilev);
+	ilev:purpose = "Monotonically increasing coordinate pressure";
+	ilev:long_name = "hybrid level at interfaces (1000*(A+B))";
+	ilev:units = "hPa";
+	ilev:positive = "down";
+	ilev:A_var = "hyai";
+	ilev:B_var = "hybi";
+	ilev:P0_var = "P0";
+	ilev:PS_var = "PS";
+        ilev:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate";
+        ilev:formula_terms = "a: hyai b: hybi p0: P0 ps: PS";
+        ilev:formula_readable = "prs_ntf[time,lat,lon,ilev]=P0*hyai+PS*hybi";
+
+	float lev_bnd(lev,vrt_nbr);
+	lev_bnd:purpose = "Cell boundaries for lev coordinate";
+
+ 	float rlev(rlev);
 	rlev:purpose = "Monotonically decreasing coordinate pressure";
 
 	float lon(lon);
@@ -259,6 +276,12 @@ variables:
 	float hybm(lev);
 	hybm:long_name = "hybrid B coefficient at layer midpoints";
 
+	float hyai(ilev);
+	hyai:long_name = "hybrid A coefficient at layer interfaces";
+
+	float hybi(ilev);
+	hybi:long_name = "hybrid B coefficient at layer interfaces";
+
 	float P0;
 	P0:long_name = "reference pressure";
 	P0:units = "pascal";
@@ -348,7 +371,7 @@ variables:
 
 	float lon_wgt(lon);
 	lon_wgt:long_name = "Gaussian weights";
-	lon_wgt:purpose = "Gaussian weights which sum to two for n = 4. These weights are all have floor of 0.0 so should cause SIGFPE when applied to integer types in weighted average.";
+	lon_wgt:purpose = "Gaussian weights which sum to two for n = 4. These weights all have floor of 0.0 so should cause SIGFPE when applied to integer types in weighted average.";
 
 	double ppc_dbl(time);
         ppc_dbl:long_name = "Precision-Preserving Compression, double precision";
@@ -650,6 +673,18 @@ variables:
 	float g;
 	g:long_name = "g";
 
+	float grv_sfc;
+	grv_sfc:long_name = "Surface gravity on Earth";
+	grv_sfc:units = "meter second-2";
+
+	float vmr_CO2;
+	vmr_CO2:long_name = "Volumetric mixing ratio of CO2";
+	vmr_CO2:units = "molecule molecule-1";
+
+	float mmr_CO2;
+	mmr_CO2:long_name = "Mass mixing ratio of CO2";
+	mmr_CO2:units = "kilogram kilogram-1";
+
 	float dps_dry;
 	dps_dry:long_name = "Dry Deposition";
 
@@ -679,7 +714,7 @@ variables:
 	att_var:char_att = "Sentence one.\nSentence two.\n";
 	att_var:short_att = 37s;
 	att_var:int_att = 73;
-	att_var:long_att = 73l;
+	att_var:long_att = 73;
         att_var:float_att = 73.0f,72.0f,71.0f,70.010f,69.0010f,68.010000f,67.01000100f;
 	att_var:double_att = 73.0,72.0,71.0,70.010,69.0010,68.010000,67.01000100;
 
@@ -688,7 +723,7 @@ variables:
 	bnd_var:char_att = "Sentence one.\nSentence two.\n";
 	bnd_var:short_att = 37s;
 	bnd_var:int_att = 73;
-	bnd_var:long_att = 73l;
+	bnd_var:long_att = 73;
 	bnd_var:float_att = 73.f;
 	bnd_var:double_att = 73.d;
 
@@ -824,6 +859,26 @@ variables:
 	var_msk:long_name = "Float field for testing masks and wheres";
 	var_msk:units = "fraction";
 
+	float var_mss_nil(lon);
+        var_mss_nil:purpose = "Test mismatched missing values in variables, masks, and weights. Missing no elements.";
+	var_mss_nil:_FillValue = 1.0e36f;
+
+	float var_mss_0(lon);
+        var_mss_0:purpose = "Test mismatched missing values in variables, masks, and weights. Missing element index 0.";
+	var_mss_0:_FillValue = 1.0e36f;
+
+	float var_mss_1(lon);
+        var_mss_1:purpose = "Test mismatched missing values in variables, masks, and weights. Missing element index 1.";
+	var_mss_1:_FillValue = 1.0e36f;
+
+	float var_mss_2(lon);
+        var_mss_2:purpose = "Test mismatched missing values in variables, masks, and weights. Missing element index 2.";
+	var_mss_2:_FillValue = 1.0e36f;
+	
+	float var_mss_3(lon);
+        var_mss_3:purpose = "Test mismatched missing values in variables, masks, and weights. Missing element index 3.";
+	var_mss_3:_FillValue = 1.0e36f;
+	
 	float mask(lat,lon);
 	mask:long_name = "Purpose is to mask a variable like ORO";
 	mask:units = "fraction";
@@ -1100,6 +1155,7 @@ variables:
 	float four_dmn_rec_var(time,lat,lev,lon);
 	four_dmn_rec_var:long_name = "four dimensional record variable";
 	four_dmn_rec_var:units = "watt meter-2";
+	four_dmn_rec_var:coordinates = "time lat lev lon";
 
 //	double three_double_dmn(time,lon,lon);
 	
@@ -1201,10 +1257,15 @@ data:
 	float_var=10.;
 	four=4.;
 	g=9.8;
+	grv_sfc=9.80665;
+	vmr_CO2=400e-6;
+	mmr_CO2=611e-6;
 	gw=10.,10.;
 	gw_T42=-87.863799,-85.096527,-82.312913,-79.525607,-76.736900,-73.947515,-71.157752,-68.367756,-65.577607,-62.787352,-59.997020,-57.206632,-54.416200,-51.625734,-48.835241,-46.044727,-43.254195,-40.463648,-37.673090,-34.882521,-32.091944,-29.301360,-26.510769,-23.720174,-20.929574,-18.138971,-15.348365,-12.557756,-9.767146,-6.976534,-4.185921,-1.395307,1.395307,4.185921,6.976534,9.767146,12.557756,15.348365,18.138971,20.929574,23.720174,26.510769,29.301360,32.091944,34.882521,37.673090, [...]
-	hyam=0.0802583,0.0438226,0.0;
-	hybm=0.0187849,0.457453,0.992528;
+	hyam=0.0036,0.0019894,0.0;
+	hyai=0.002255,0.0438226,0.0,0.0;
+	hybm=0.0,0.52,0.992;
+	hybi=0.0,0.457453,0.985,1.0;
 	P0=100000;
 	gds_crd=0,1,2,3,4,5,6,7;
 	gds_var=273.1,273.2,273.3,273.4,273.5,273.6,273.7,273.8;
@@ -1245,7 +1306,8 @@ data:
 	lat_T42=-88.240089,-85.092445,-82.311981,-79.525253,-76.736732,-73.947418,-71.157700,-68.367722,-65.577576,-62.787331,-59.997005,-57.206619,-54.416191,-51.625729,-48.835236,-46.044724,-43.254192,-40.463646,-37.673088,-34.882519,-32.091942,-29.301357,-26.510769,-23.720173,-20.929573,-18.138969,-15.348364,-12.557755,-9.767145,-6.976533,-4.185921,-1.395307,1.395307,4.185921,6.976533,9.767145,12.557755,15.348364,18.138969,20.929573,23.720173,26.510769,29.301357,32.091942,34.882519,37.673088 [...]
 	lsmlev=0.05,0.1,0.2,0.5,1.0,3.0;
 	lev=100,500,1000;
-	ilev=0,300,300,750,750,1013.25;
+	ilev=50,200,750,1005;
+	lev_bnd=0,300,300,750,750,1013.25;
 	lev_cpy=100,500,1000;
 	lev_var=100.,500.,1000.;
 	lev_wgt=10,2,1;
@@ -1270,6 +1332,12 @@ data:
 	ppc_zro_dbl=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0;
 	ppc_zro_int=0,0,0,0,0,0,0,0,0,0;
 	var_msk=0.,1.,0.,0.,1.,1.,0.,2.;
+	var_mss_nil=0.,1.,2.,3.;
+	var_mss_0=_,1.,2.,3.;
+	var_mss_1=0.,_,2.,3.;
+	var_mss_2=0.,1.,_,3.;
+	var_mss_3=0.,1.,2.,_;
+	var_msk=0.,1.,0.,0.,1.,1.,0.,2.;
 	ORO=0.,1.,0.,0.,1.,1.,0.,2.;
 	mask=0.,1.,0.,0.,1.,1.,0.,2.;
 //	mask=0.,0.,0.,0.,0.,0.,0.,0.;
diff --git a/data/in_grp.cdl b/data/in_grp.cdl
index b504d93..a3a74bc 100644
--- a/data/in_grp.cdl
+++ b/data/in_grp.cdl
@@ -72,10 +72,10 @@ netcdf in_grp {
   
   float lev(lev);
   lev:units = "hybrid_sigma_pressure";
-  lev:bounds = "ilev";
+  lev:bounds = "lev_bnd";
    
-  float ilev(lev,vrt_nbr);
-  ilev:purpose = "Cell boundaries for lev coordinate"; 
+  float lev_bnd(lev,vrt_nbr);
+  lev_bnd:purpose = "Cell boundaries for lev coordinate"; 
   
   float area(lat);
   area:units = "meter2";
@@ -106,7 +106,7 @@ netcdf in_grp {
   area=10.,10.;
   lat=-90,90;
   lat_lon=1.,2.,3.,4.,5.,6.,7.,8;
-  ilev=0,300,300,750,750,1013.25;
+  lev_bnd=0,300,300,750,750,1013.25;
   lev=100,500,1000;
   lon=0,90,180,270;
   one=1.;
diff --git a/data/in_grp_3.cdl b/data/in_grp_3.cdl
index 86cbd5c..8799c3d 100644
--- a/data/in_grp_3.cdl
+++ b/data/in_grp_3.cdl
@@ -110,19 +110,19 @@ netcdf in_grp_3 {
     
     //coordinate variable (/g8/lev)
     float lev(lev); 
-    lev:bounds = "ilev";
+    lev:bounds = "lev_bnd";
     
     //coordinate variable (/g8/vrt_nbr)
     float vrt_nbr(vrt_nbr);
     
-    float ilev(lev,vrt_nbr);
+    float lev_bnd(lev,vrt_nbr);
 	float lev_wgt(lev);
   data:
     lon=-180,0; 
     lev=100,500,1000;
-    ilev=0,300,300,750,750,1013.25;
+    lev_bnd=0,300,300,750,750,1013.25;
     vrt_nbr=1,2;
-	lev_wgt=9,2,1;
+    lev_wgt=9,2,1;
   } // end g8
   
  
@@ -494,21 +494,20 @@ netcdf in_grp_3 {
    dimensions:
     lat=2;
     lon=3;
-	time=unlimited;
+    time=unlimited;
     variables:
     float lat(lat);
     lat:units = "degrees_north";
     float lon(lon);
     lon:units = "degrees_east";
-	double time(time);
+    double time(time);
     float snd(time,lat,lon);
     snd:long_name = "Snow Depth timeseries";
     data:
     lat=-60,0;
     lon=0,120,240;
-	time=1,2;
-    snd=1,2,3,4,5,6,
-	    7,8,9,10,11,12;
+    time=1,2;
+    snd=1,2,3,4,5,6,7,8,9,10,11,12;
   } // end g23
   
   //
@@ -518,19 +517,19 @@ netcdf in_grp_3 {
    dimensions:
     lat=2;
     lon=3;
-	time=unlimited;
+    time=unlimited;
     variables:
     float lat(lat);
     lat:units = "degrees_north";
     float lon(lon);
     lon:units = "degrees_east";
-	double time(time);
+    double time(time);
     float snd(time,lat,lon);
     snd:long_name = "Snow Depth timeseries";
     data:
     lat=-60,0;
     lon=0,120,240;
-	time=4;
+    time=4;
     snd=1,2,3,4,5,6;
   } // end g24
   
diff --git a/data/nccf b/data/nccf
new file mode 100755
index 0000000..859f2f2
--- /dev/null
+++ b/data/nccf
@@ -0,0 +1,192 @@
+#!/bin/sh
+
+# Purpose: CF-check netCDF3/netCDF4/HDF4/HDF5 files
+# Dismember them first if necessary or requested
+# Dismembering places each input file group in separate netCDF3 output file 
+# Described in NCO User Guide at http://nco.sf.net/nco.html#nccf
+# Originally incarnated as ncdismember in NCO 4.3.6, September 2013 
+# Re-incarnated with getopt as nccf in NCO 4.5.1, July 2015
+# Requirements: NCO 4.3.x+, UNIX shell utilities awk, grep, sed
+# Optional: Decker CFchecker https://bitbucket.org/mde_/cfchecker
+
+# Usage:
+# nccf -c cf_chk -f fl_in -i drc_in -o drc_out -n nco_opt -v cf_vrs
+# where fl_in is input file/URL to check/dismember, drc_in/out are
+# input and output directories, respectively
+# CF-compliance check is performed by default, unless -c 'no' is given
+# Default checker is Decker's cfchecker installed locally
+# Specify cf_chk=nerc for smallified uploads to NERC checker
+# Option cf_vrs is CF version to check
+# Option nco_opt passes straight-through to ncks
+# Arguments must not use shell expansion/globbing
+# NB: nccf does not clean-up output directory, so user must
+# chmod a+x ~/sh/nccf
+# Examples:
+# nccf ~/nco/data/mdl_1.nc /data/zender/tmp
+# nccf http://dust.ess.uci.edu/nco/mdl_1.nc /tmp
+# nccf http://thredds-test.ucar.edu/thredds/dodsC/testdods/foo.nc /tmp
+# nccf ~/nco/data/mdl_1.nc /data/zender/nco/tmp cf
+# nccf ~/nco/data/mdl_1.nc /data/zender/nco/tmp nerc
+# nccf ~/nco/data/mdl_1.nc /data/zender/nco/tmp cf 1.3
+# nccf ~/nco/data/mdl_1.nc /data/zender/nco/tmp cf 1.5 --fix_rec_dmn=all
+
+# Set script name
+spt_nm=`basename ${0}` # [sng] Script name
+
+# Set fonts for legibility
+fnt_nrm=`tput sgr0` # Normal
+fnt_bld=`tput bold` # Bold
+fnt_rvr=`tput smso` # Reverse
+
+# Command-line argument defaults
+fl_in="${HOME}/nco/data/mdl_1.nc" # [sng] Input file to dismember/check
+drc_in='' # [sng] Input directory
+drc_out="${DATA}/nco/tmp" # [sng] Output directory
+#cf_chk='dck' # [sng] Checker
+cf_chk='nerc' # [sng] Checker
+cf_flg='Yes' # [flg] CF-check files?
+cf_vrs='1.5' # [sng] Compliance-check this CF version (e.g., '1.5')
+opt='' # [flg] Additional ncks options (e.g., '--fix_rec_dmn=all')
+# Use single quotes to pass multiple arguments to opt=${5}
+# Otherwise arguments would be seen as ${5}, ${6}, ${7} ...
+
+function fnc_usg_prn {
+    # Print usage
+    printf "\nQuick documentation for ${fnt_bld}${spt_nm}${fnt_nrm} (read script for more thorough explanation)\n\n"
+    printf "${fnt_rvr}Basic usage:${fnt_nrm} ${fnt_bld}$spt_nm -c cf_chk -f fl_in -o drc_out${fnt_nrm}\n\n"
+    echo "Command-line options:"
+    echo "${fnt_rvr}-c${fnt_nrm} ${fnt_bld}cf_chk${fnt_nrm}   CF checker to use (empty means none) (default ${fnt_bld}${cf_chk}${fnt_nrm})"
+    echo "${fnt_rvr}-d${fnt_nrm} ${fnt_bld}dbg_lvl${fnt_nrm}  Debugging level (default ${fnt_bld}${dbg_lvl}${fnt_nrm})"
+    echo "${fnt_rvr}-f${fnt_nrm} ${fnt_bld}fl_in${fnt_nrm}    Input file (default ${fnt_bld}${fl_in}${fnt_nrm})"
+    echo "${fnt_rvr}-i${fnt_nrm} ${fnt_bld}drc_in${fnt_nrm}   Input directory ${fnt_bld}drc_in${fnt_nrm} (default ${fnt_bld}${drc_in}${fnt_nrm})"
+    echo "${fnt_rvr}-n${fnt_nrm} ${fnt_bld}nco_opt${fnt_nrm}  NCO options (empty means none) (default ${fnt_bld}${nco_opt}${fnt_nrm})"
+    echo "${fnt_rvr}-o${fnt_nrm} ${fnt_bld}drc_out${fnt_nrm}  Output directory (default ${fnt_bld}${drc_out}${fnt_nrm})"
+    echo "${fnt_rvr}-v${fnt_nrm} ${fnt_bld}cf_vrs${fnt_nrm}   Version of CF to use (default ${fnt_bld}${cf_vrs}${fnt_nrm})"
+    printf "\n"
+    printf "Examples: ${fnt_bld}$spt_nm -c ${caseid} -s ${yyyy_srt} -e ${yyyy_end} -i ${drc_in} -o ${drc_out} ${fnt_nrm}\n"
+    printf "\n\n"
+    exit 1
+} # end fnc_usg_prn()
+
+# Check argument number and complain accordingly
+arg_nbr=$#
+#echo -e \\n"dbg: Number of arguments: ${arg_nbr}"
+if [ ${arg_nbr} -eq 0 ]; then
+  fnc_usg_prn
+fi # !arg_nbr
+
+# Parse command-line options:
+cmd_ln="${@}"
+while getopts :c:d:f:hi:n:o::v: OPT; do
+    case ${OPT} in
+	c) cf_chk=${OPTARG} ;; # Checker to use
+	d) dbg_lvl=${OPTARG} ;; # Debugging level
+	f) fl_in=${OPTARG} ;; # Input file 
+	i) drc_in=${OPTARG} ;; # Input directory
+	n) nco_opt=${OPTARG} ;; # NCO options
+	o) drc_out=${OPTARG} ;; # Output directory
+	v) cf_vrs=${OPTARG} ;; # CF Version
+	h) fnc_usg_prn ;; # Help
+	\?) # Unrecognized option
+	    echo -e \\n"Option -${fnt_bld}$OPTARG${fnt_nrm} not allowed."
+	    fnc_usg_prn ;;
+    esac
+done
+shift $((OPTIND-1)) # Advance one argument
+
+# Derived variables
+chk_dck='n'
+chk_nrc='n'
+if [ ${cf_chk} = 'nerc' ]; then
+    chk_nrc='y'
+fi # chk_nrc
+if [ ${cf_chk} != '0' ] && [ ${cf_chk} != 'nerc' ]; then
+    chk_dck='y'
+    hash cfchecker 2>/dev/null || { echo >&2 "Local cfchecker command not found, will smallify and upload to NERC checker instead"; chk_nrc='y'; chk_dck='n'; }
+fi # !cf_chk
+
+# Print initial state
+if [ ${dbg_lvl} -ge 1 ]; then
+    printf "dbg: chk_dck  = ${chk_dck}\n"
+    printf "dbg: chk_nerc = ${chk_nerc}\n"
+    printf "dbg: cf_chk   = ${cf_chk}\n"
+    printf "dbg: cf_flg   = ${cf_flg}\n"
+    printf "dbg: cf_vrs   = ${cf_vrs}\n"
+    printf "dbg: dbg_lvl  = ${dbg_lvl}\n"
+    printf "dbg: drc_in   = ${drc_in}\n"
+    printf "dbg: drc_out  = ${drc_out}\n"
+    printf "dbg: mdl_nm   = ${mdl_nm}\n"
+    printf "dbg: nco_opt  = ${nco_opt}\n"
+fi # !dbg
+
+# Human-readable summary
+echo "Checking and/or dismembering file ${fl_in}"
+if [ ${dbg_lvl} -ge 1 ]; then
+    printf "${spt_nm} invoked with command:\n"
+    echo "${spt_nm} ${cmd_ln}"
+fi # !dbg
+date_srt=$(date +"%s")
+printf "Started at `date`.\n"
+
+# Prepare and move-to output directory
+fl_stb=$(basename ${fl_in})
+drc_out=${drc_out}/${fl_stb}
+mkdir -p ${drc_out}
+cd ${drc_out}
+
+# Obtain group list
+grp_lst=`ncks --cdl -m ${fl_in} | grep '// group' | awk '{$1=$2=$3="";sub(/^  */,"",$0);print}'`
+IFS=$'\n' # Change Internal-Field-Separator from <Space><Tab><Newline> to <Newline>
+for grp_in in ${grp_lst} ; do
+    # Replace slashes by dots for output group filenames
+    grp_out=`echo ${grp_in} | sed 's/\///' | sed 's/\//./g'`
+    if [ "${grp_out}" = '' ]; then grp_out='root' ; fi
+    # Tell older NCO/netCDF if HDF4 with --hdf4 switch (signified by .hdf/.HDF suffix)
+    hdf4=`echo ${fl_in} | awk '{if(match(tolower($1),".hdf$")) hdf4="--hdf4"; print hdf4}'`
+    # Flatten to netCDF3, anchor, no history, no temporary file, padding, HDF4 flag, options
+    cmd="ncks -O -3 -G : -g ${grp_in}/ -h --no_tmp_fl --hdr_pad=40 ${hdf4} ${opt} ${fl_in} ${drc_out}/${grp_out}.nc"
+    # Use eval in case ${opt} contains multiple arguments separated by whitespace
+    eval ${cmd}
+    if [ ${chk_dck} = 'y' ]; then
+       # Decker checker needs Conventions <= 1.6
+       no_bck_sls=`echo ${drc_out}/${grp_out} | sed 's/\\\ / /g'`
+       ncatted -h -a Conventions,global,o,c,CF-${cf_vrs} ${no_bck_sls}.nc
+    else # !chk_dck
+       echo ${drc_out}/${grp_out}.nc
+    fi # !chk_dck
+done
+if [ ${chk_dck} = 'y' ]; then
+    echo 'Decker CFchecker reports CF-compliance of each group in flat netCDF3 format'
+    cfchecker -c ${cf_vrs} *.nc
+fi
+if [ ${chk_nrc} = 'y' ]; then
+    # Smallification and NERC upload from qdcf script by Phil Rasch (PJR)
+    echo 'Using remote CFchecker http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl'
+    cf_lcn='http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl'
+    for fl in ${drc_out}/*.nc ; do
+	fl_sml=${fl}
+	cf_out=${fl%.nc}.html
+	dmns=`ncdump -h ${fl_in} | sed -n -e '/dimensions/,/variables/p' | grep = | sed -e 's/=.*//'`
+	hyp_sml=''
+	for dmn in ${dmns}; do
+	    dmn_lc=`echo ${dmn} | tr "[:upper:]" "[:lower:]"`
+	    if [ ${dmn_lc} = 'lat' ] || [ ${dmn_lc} = 'latitude' ] || [ ${dmn_lc} = 'lon' ] || [ ${dmn_lc} = 'longitude' ] || [ ${dmn_lc} = 'time' ]; then
+		hyp_sml=`echo ${hyp_sml}" -d ${dmn},0"`
+	    fi # !dmn_lc
+	done
+	# Create small version of input file by sampling only first element of lat, lon, time
+	ncks -O ${hyp_sml} ${fl} ${fl_sml}
+	# Send small file to NERC checker
+	curl --form cfversion=1.6 --form upload=@${fl_sml} --form press="Check%20file" ${cf_lcn} -o ${cf_out}
+	# Strip most HTML to improve readability
+	cat ${cf_out} | sed -e "s/<[^>]*>//g" -e "/DOCTYPE/,/\]\]/d" -e "s/CF-Convention//g" -e "s/Output of//g" -e "s/Compliance Checker//g" -e "s/Check another//g" -e "s/CF-Checker follows//g" -e "s/Received//g" -e "s/for NetCDF//g" -e "s/NetCDF format//g" -e "s/against CF version 1//g" -e "s/\.\.\.//g"
+	echo "Full NERC compliance-check log for ${fl} in ${cf_out}"
+    done
+fi # !nerc
+
+date_end=$(date +"%s")
+printf "Completed climatology generation for model-run ${caseid} at `date`.\n"
+date_dff=$((date_end-date_srt))
+echo "Elapsed time $((date_dff/60))m$((date_dff % 60))s"
+
+exit 0
diff --git a/data/ncremap b/data/ncremap
new file mode 100755
index 0000000..fa93744
--- /dev/null
+++ b/data/ncremap
@@ -0,0 +1,729 @@
+#!/bin/bash
+
+# Purpose: Regrid (subsets of) variables from netCDF files
+# Regrids all input files (possibly on different grids) to a single specified output grid
+
+# Copyright (C) 2015-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.
+
+# As a special exception to the terms of the GPL, you are permitted 
+# to link the NCO source code with the HDF, netCDF, OPeNDAP, and UDUnits
+# libraries and to distribute the resulting executables under the terms 
+# of the GPL, but in addition obeying the extra stipulations of the 
+# HDF, netCDF, OPeNDAP, and UDUnits licenses.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+# See the GNU General Public License for more details.
+
+# The original author of this software, Charlie Zender, seeks to improve
+# it with your suggestions, contributions, bug-reports, and patches.
+# Please contact the NCO project at http://nco.sf.net or write to
+# Charlie Zender
+# Department of Earth System Science
+# University of California, Irvine
+# Irvine, CA 92697-3100
+
+# Source: https://github.com/nco/nco/tree/master/data/ncremap
+
+# Prerequisites: Bash, NCO, ESMF_RegridWeightGen
+# Script could use other shells, e.g., dash (Debian default) after re-writing function definition and looping constructs
+# Script could use other weight-generators, e.g., TempestRemap by re-writing map-file command
+
+# Script runs in one of four modes:
+# 1. Free-will: Infer source and destination grids to generate map-file, then regrid
+# 2. Old Grid: Use known-good destination grid to generate map-file then regrid
+# 3. New Grid: Generate source-grid from ncks parameter string
+# 4. Pre-Destination: Apply supplied map-file to all input files
+# By default, ncremap deletes any intermediate grids and map-file that it generates
+# 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
+
+# Additional Documentation:
+
+# Configure paths at High-Performance Computer Centers (HPCCs) based on ${HOSTNAME}
+if [ -z "${HOSTNAME}" ]; then
+    if [ -f /bin/hostname ] && [ -x /bin/hostname ] ; then
+	export HOSTNAME=`/bin/hostname`
+    elif [ -f /usr/bin/hostname ] && [ -x /usr/bin/hostname ] ; then
+	export HOSTNAME=`/usr/bin/hostname`
+    fi # !hostname
+fi # HOSTNAME
+# Default input and output directory is ${DATA}
+if [ -z "${DATA}" ]; then
+    case "${HOSTNAME}" in 
+	cooley* | cc* ) DATA="/projects/HiRes_EarthSys/${USER}" ; ;; # ALCF cooley compute nodes named ccNNN
+	edison* | hopper* | nid* ) DATA="${SCRATCH}" ; ;; # NERSC edison compute nodes named nidNNNNN
+	pileus* ) DATA="/lustre/atlas/proj-shared/cli115/${USER}" ; ;; # OLCF CADES
+	rhea* ) DATA="/lustre/atlas/proj-shared/cli115/${USER}" ; ;; # OLCF rhea compute nodes named rheaNNN
+	* ) DATA='/tmp' ; ;; # Other
+    esac # !HOSTNAME
+fi # DATA
+
+# Test cases (examples for Charlie's machines):
+# ls ${DATA}/sld/raw/*.nc | ncremap -a conserve -D 0 -d ${DATA}/dstmch90/dstmch90_clm.nc -O ~/rgr
+# ncremap -a conserve -v FSNT -I ${DATA}/ne30/raw -s ${DATA}/grids/ne30np4_pentagons.091226.nc -d ${DATA}/dstmch90/dstmch90_clm.nc -O ~/rgr
+# ls ${DATA}/essgcm14/essgcm14*cam*0007*.nc | ncremap -a conserve -M -d ${DATA}/dstmch90/dstmch90_clm.nc -O ~/rgr
+# ncremap -a conserve -v FSNT -I ${DATA}/ -s ${DATA}/grids/ne30np4_pentagons.091226.nc -d ${DATA}/dstmch90/dstmch90_clm.nc -O ~/rgr
+# ncremap -i AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -d ${DATA}/dstmch90/dstmch90_clm.nc -O ~/rgr
+# ncremap -v TSurfAir -i ${DATA}/hdf/AIRS.2015.01.15.001.L2.RetStd.v6.0.11.0.G15015142014.hdf -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -v CloudFrc_A -i ${DATA}/hdf/AIRS.2002.08.01.L3.RetStd_H031.v4.0.21.0.G06104133732.hdf -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/hdf/MOD04_L2.A2000055.0005.006.2014307165927.hdf -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/hdf/OMI-Aura_L2-OMIAuraSO2_2012m1222-o44888_v01-00-2014m0107t114720.h5 -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -v T -i ${DATA}/hdf/wrfout_v2_Lambert_notime.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -v StepTwoO3 -i ${DATA}/hdf/OMI-Aura_L2-OMTO3_2015m0731t0034-o58727_v003-2015m0731t080836.he5.nc -d ${DATA}/hdf/cam_time.nc -O ~/rgr
+# ncremap -v TSurfStd -i ${DATA}/sld/raw/AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -G "--rgr grd_ttl='Default internally-generated grid' --rgr grid=~/rgr/ncremap_tmp_grd_dst.nc --rgr latlon=100,100 --rgr snwe=30.0,70.0,-130.0,-90.0" -O ~/rgr
+# ncremap -x TSurfStd_ct -i ${DATA}/sld/raw/AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/hdf/cice_hi_flt.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/hdf/cam_time.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# CESM & ACME:
+# ncremap -i ${DATA}/ne120/raw/b1850c5_m2a.cam.h0.0060-01.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/ne120/raw/b1850c5_m2a.clm2.h0.0060-01.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/ne120/raw/b1850c5_m2a.cice.h.0060-01.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/ne120/raw/b1850c5_m2a.pop.h.0060-01.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ncremap -i ${DATA}/ne120/raw/b1850c5_m2a.rtm.h0.0060-01.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -O ~/rgr
+# ACME benchmarks:
+# ncremap -v FSNT,AODVIS -i ${DATA}/ne30/raw/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc -m 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 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
+
+# Debugging and Benchmarking:
+# ncremap -D 1 -i ${DATA}/sld/raw/AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -d ${DATA}/dstmch90/dstmch90_clm.nc -O ~/rgr > ~/ncremap.out 2>&1 &
+
+# 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_
+#          3 = As in dbg_lvl=1, and pass debug level through to NCO/ncks
+# thr_nbr: Thread number to use in NCO regridder, '-t 1' for one thread, '-t 2' for two threads...
+
+# Set script name and run directory
+drc_pwd=${PWD}
+spt_nm=$(basename ${0}) # [sng] Script name
+nco_version=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
+
+# Set fonts for legibility
+fnt_nrm=`tput sgr0` # Normal
+fnt_bld=`tput bold` # Bold
+fnt_rvr=`tput smso` # Reverse
+
+# Defaults for command-line options and some derived variables
+# Modify these defaults to save typing later
+alg_typ='conserve' # [nbr] Algorithm for ESMF interpolation (bilinear|patch|neareststod|nearestdtos|conserve)
+dbg_lvl=0 # [nbr] Debugging level
+#drc_in="${drc_pwd}" # [sng] Input file directory
+drc_in='' # [sng] Input file directory
+drc_in_xmp='~/drc_in' # [sng] Input file directory for examples
+drc_out="${drc_pwd}" # [sng] Output file directory
+drc_out_xmp="~/rgr" # [sng] Output file directory for examples
+dst_fl='' # [sng] Destination file
+dst_xmp='dst.nc' # [sng] Destination file for examples
+#esmf_opt='--src_regional --dst_regional --ignore_unmapped' # [sng] ESMF_RegridWeightGen options
+esmf_opt='--ignore_unmapped' # [sng] ESMF_RegridWeightGen options
+#fml_nm='' # [sng] Family name (e.g., 'amip', 'control', 'experiment')
+fl_nbr=0 # [nbr] Number of files to remap
+gaa_sng="--gaa rgr_script=${spt_nm} --gaa rgr_hostname=${HOSTNAME} --gaa rgr_version=${nco_version}" # [sng] Global attributes to add
+grd_dst='' # [sng] Destination grid-file
+grd_dst_glb="${DATA}/grids/180x360_SCRIP.20150901.nc" # [sng] Grid-file (destination) global
+grd_dst_xmp='grd_dst.nc' # [sng] Destination grid-file for examples
+grd_sng='' # [sng] Grid string
+grd_src='' # [sng] Source grid-file
+grd_src_xmp='grd_src.nc' # [sng] Source grid-file for examples
+hdr_pad='1000' # [B] Pad at end of header section
+in_fl='' # [sng] Input file
+#in_fl='AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc' # [sng] Input file
+in_xmp='in.nc' # [sng] Input file for examples
+map_fl='' # [sng] Map-file
+map_xmp='map.nc' # [sng] Map-file for examples
+mlt_map_flg='Yes' # [sng] Multi-map flag
+mpi_flg='No' # [sng] Parallelize over nodes
+msh_fl='' # [sng] Mesh-file (for Tempest)
+nco_opt='-O --no_tmp_fl' # [sng] NCO defaults (e.g., '-O -6 -t 1')
+nco_usr='' # [sng] NCO user-configurable options (e.g., '-D 1')
+out_fl='' # [sng] Output file
+out_xmp='out.nc' # [sng] Output file for examples
+par_typ='' # [sng] Parallelism type
+rgr_opt='--rgr lat_nm_out=lat --rgr lon_nm_out=lon' # [sng] Regridding options (e.g., '--rgr col_nm=lndgrid')
+tps_opt='' # [sng] TempestRemap options
+thr_nbr=2 # [nbr] Thread number for regridder
+#var_lst='FSNT,AODVIS' # [sng] Variables to process (empty means all)
+tmp_out_fl='ncremap_grd_tmp.nc' # [sng] Temporary output file
+var_lst='' # [sng] Variables to process (empty means all)
+var_xmp='FSNT' # [sng] Variable list for examples
+wgt_gnr='esmf' # [sng] Weight-generator program
+xtn_var='' # [sng] Extensive variables (e.g., 'TSurfStd_ct')
+
+function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_nm{} syntax
+    # Print usage
+    printf "\nQuick documentation for ${fnt_bld}${spt_nm}${fnt_nrm} (more at http://nco.sf.net/nco.html#ncremap)\n\n"
+    printf "${fnt_rvr}Basic usage:${fnt_nrm} ${fnt_bld}$spt_nm -i in_fl -d dst_fl -o out_fl${fnt_nrm}\n\n"
+    echo "Command-line options:"
+    echo "${fnt_rvr}-a${fnt_nrm} ${fnt_bld}alg_typ${fnt_nrm}  Algorithm for ESMF weight generation (default ${fnt_bld}${alg_typ}${fnt_nrm})"
+    echo "${fnt_rvr}-d${fnt_nrm} ${fnt_bld}dst_fl${fnt_nrm}   Data file to infer destination grid from (empty means none, i.e., use grd_fl, grd_sng or map_fl)) (default ${fnt_bld}${dst_fl}${fnt_nrm})"
+    echo "${fnt_rvr}-D${fnt_nrm} ${fnt_bld}dbg_lvl${fnt_nrm}  Debugging level (default ${fnt_bld}${dbg_lvl}${fnt_nrm})"
+    echo "${fnt_rvr}-E${fnt_nrm} ${fnt_bld}esmf_opt${fnt_nrm} ESMF ESMF_RegridWeightGen options (default ${fnt_bld}${esmf_opt}${fnt_nrm})"
+#    echo "${fnt_rvr}-f${fnt_nrm} ${fnt_bld}fml_nm${fnt_nrm}   Family name (empty means none) (default ${fnt_bld}${fml_nm}${fnt_nrm})"
+    echo "${fnt_rvr}-g${fnt_nrm} ${fnt_bld}grd_dst${fnt_nrm}  Grid-file (destination) (empty means none, i.e., infer from dst_fl or use grd_sng or map_fl) (default ${fnt_bld}${grd_dst}${fnt_nrm})"
+    echo "${fnt_rvr}-G${fnt_nrm} ${fnt_bld}grd_sng${fnt_nrm}  Grid generation argument string (empty means none) (default ${fnt_bld}${grd_sng}${fnt_nrm})"
+    echo "${fnt_rvr}-I${fnt_nrm} ${fnt_bld}drc_in${fnt_nrm}   Input directory (empty means none) (default ${fnt_bld}${drc_in}${fnt_nrm})"
+    echo "${fnt_rvr}-i${fnt_nrm} ${fnt_bld}in_fl${fnt_nrm}    Input file (empty means use stdin or drc_in) (default ${fnt_bld}${in_fl}${fnt_nrm})"
+    echo "${fnt_rvr}-M${fnt_nrm}          Multi-map-file toggle (unset means generate one map-file per input file)"
+    echo "${fnt_rvr}-m${fnt_nrm} ${fnt_bld}map_fl${fnt_nrm}   Map-file (empty means generate internally) (default ${fnt_bld}${map_fl}${fnt_nrm})"
+    echo "${fnt_rvr}-n${fnt_nrm} ${fnt_bld}nco_opt${fnt_nrm}  NCO options (empty means none) (default ${fnt_bld}${nco_opt}${fnt_nrm})"
+    echo "${fnt_rvr}-O${fnt_nrm} ${fnt_bld}drc_out${fnt_nrm}  Output directory (default ${fnt_bld}${drc_out}${fnt_nrm})"
+    echo "${fnt_rvr}-o${fnt_nrm} ${fnt_bld}out_fl${fnt_nrm}   Output-file (regridded file) (empty copies Input filename) (default ${fnt_bld}${out_fl}${fnt_nrm})"
+    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}-v${fnt_nrm} ${fnt_bld}var_lst${fnt_nrm}  Variable list (empty means all) (default ${fnt_bld}${var_lst}${fnt_nrm})"
+    echo "${fnt_rvr}-w${fnt_nrm} ${fnt_bld}wgt_gnr${fnt_nrm}  Weight-generator (default ${fnt_bld}${wgt_gnr}${fnt_nrm})"
+    echo "${fnt_rvr}-x${fnt_nrm} ${fnt_bld}xtn_var${fnt_nrm}  Extensive variables (empty means none) (default ${fnt_bld}${xtn_var}${fnt_nrm})"
+    printf "\n"
+    printf "Examples: ${fnt_bld}$spt_nm -i ${in_xmp} -m ${map_xmp} -o ${out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -i ${in_xmp} -d ${dst_xmp} -o ${out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -i ${in_xmp} -g ${grd_dst_xmp} -o ${out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -a bilinear -i ${in_xmp} -d ${dst_xmp} -o ${out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -a conserve -i ${in_xmp} -d ${dst_xmp} -o ${out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -w tempest  -i ${in_xmp} -d ${dst_xmp} -o ${out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -v ${var_xmp} -i ${in_xmp} -m ${map_xmp} -o ${out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -I ${drc_in_xmp} -m ${map_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -M -I ${drc_in_xmp} -d ${dst_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -M -I ${drc_in_xmp} -g ${grd_dst_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -I ${drc_in_xmp} -s ${grd_src_xmp} -d ${dst_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -I ${drc_in_xmp} -s ${grd_src_xmp} -g ${grd_dst_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -I ${drc_in_xmp} -d ${dst_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}$spt_nm -I ${drc_in_xmp} -g ${grd_dst_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}ls mdl*2005*nc | $spt_nm -m ${map_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    printf "          ${fnt_bld}ls mdl*2005*nc | $spt_nm -d ${dst_xmp} -O ${drc_out_xmp} ${fnt_nrm}\n"
+    exit 1
+} # end fnc_usg_prn()
+
+function dst_is_grd {
+    # Is destination grid specified as SCRIP grid-file?
+    # Usage: dst_is_grd ${fl}
+    fl=${1}
+    flg='Yes'
+    #flg='No'
+} # end dst_is_grd()
+
+# Check argument number and complain accordingly
+arg_nbr=$#
+#printf "\ndbg: Number of arguments: ${arg_nbr}"
+if [ ${arg_nbr} -eq 0 ]; then
+  fnc_usg_prn
+fi # !arg_nbr
+
+# Parse command-line options:
+# http://stackoverflow.com/questions/402377/using-getopts-in-bash-shell-script-to-get-long-and-short-command-line-options
+# http://tuxtweaks.com/2014/05/bash-getopts
+cmd_ln="${@}"
+while getopts :a:D:d:E:f:g:G:h:I:i:Mm:n:O:o:p:R:s:T:t:v:w:x: OPT; do
+    case ${OPT} in
+	a) alg_typ=${OPTARG} ;; # Algorithm
+	D) dbg_lvl=${OPTARG} ;; # Debugging level
+	d) dst_fl=${OPTARG} ;; # Destination file
+	E) esmf_opt=${OPTARG} ;; # ESMF options
+#	f) fml_nm=${OPTARG} ;; # Family name
+	g) grd_dst=${OPTARG} ;; # Destination grid-file
+	G) grd_sng=${OPTARG} ;; # Grid generation string
+	I) drc_in=${OPTARG} ;; # Input directory
+	i) in_fl=${OPTARG} ;; # Input file
+	M) mlt_map_flg='No' ;; # Multi-map flag
+	m) map_fl=${OPTARG} ;; # Map-file
+	n) nco_usr=${OPTARG} ;; # NCO options
+	O) drc_out=${OPTARG} ;; # Output directory
+	o) out_fl=${OPTARG} ;; # Output file
+	p) par_typ=${OPTARG} ;; # Parallelism type
+	R) rgr_opt=${OPTARG} ;; # Regridding options
+	s) grd_src=${OPTARG} ;; # Source grid-file
+	T) tps_opt=${OPTARG} ;; # Tempest options
+	t) thr_usr=${OPTARG} ;; # Thread number
+	v) var_lst=${OPTARG} ;; # Variables
+	w) wgt_usr=${OPTARG} ;; # Weight-generator
+	x) xtn_var=${OPTARG} ;; # Extensive variables
+	\?) # Unrecognized option
+	    printf "\nERROR: Option ${fnt_bld}-$OPTARG${fnt_nrm} not allowed"
+	    fnc_usg_prn ;;
+    esac
+done
+shift $((OPTIND-1)) # Advance one argument
+
+# Derived variables
+grd_dst_dfl="${drc_out}/ncremap_tmp_grd_dst.nc" # [sng] Grid-file (destination) default
+grd_src_dfl="${drc_out}/ncremap_tmp_grd_src.nc" # [sng] Grid-file (source) default
+tmp_out_fl="${drc_out}/${tmp_out_fl}" # [sng] Temporary output file
+if [ ${alg_typ} = 'bilinear' ] || [ ${alg_typ} = 'bln' ] ; then 
+    # ESMF algorithms are bilinear|patch|neareststod|nearestdtos|conserve
+    alg_opt='bilinear'
+elif [ ${alg_typ} = 'conserve' ] || [ ${alg_typ} = 'conservative' ] || [ ${alg_typ} = 'cns' ] ; then 
+    alg_opt='conserve'
+elif [ ${alg_typ} = 'nearestdtos' ] || [ ${alg_typ} = 'nds' ] || [ ${alg_typ} = 'dtos' ] ; then 
+    alg_opt='nearestdtos'
+elif [ ${alg_typ} = 'neareststod' ] || [ ${alg_typ} = 'nsd' ] || [ ${alg_typ} = 'stod' ] ; then 
+    alg_opt='nearestdtos'
+elif [ ${alg_typ} = 'patch' ] || [ ${alg_typ} = 'pch' ] || [ ${alg_typ} = 'ptc' ] ; then 
+    alg_opt='patch'
+fi # !alg_typ
+if [ -z "${drc_in}" ]; then
+    drc_in="${drc_pwd}"
+else # !drc_in
+    drc_in_usr_flg='Yes'
+fi # !drc_in
+if [ ${dbg_lvl} -ge 2 ]; then
+    nco_opt="-D ${dbg_lvl} ${nco_opt}"
+fi # !dbg_lvl
+if [ -n "${nco_usr}" ]; then 
+    nco_opt="${nco_usr} ${nco_opt}"
+fi # !var_lst
+if [ -n "${gaa_sng}" ]; then 
+    nco_opt="${nco_opt} ${gaa_sng}"
+fi # !var_lst
+if [ -n "${hdr_pad}" ]; then 
+    nco_opt="${nco_opt} --hdr_pad=${hdr_pad}"
+fi # !hdr_pad
+if [ -n "${var_lst}" ]; then 
+    nco_var_lst="-v ${var_lst}"
+fi # !var_lst
+if [ -n "${xtn_var}" ]; then 
+    rgr_opt="${rgr_opt} --xtn=${xtn_var}"
+fi # !var_lst
+if [ -n "${par_typ}" ]; then
+    if [ "${par_typ}" != 'bck' ] && [ "${par_typ}" != 'mpi' ] && [ "${par_typ}" != 'nil' ]; then 
+	    echo "ERROR: Invalid -p par_typ option = ${par_typ}"
+	    echo "HINT: Valid par_typ arguments are 'bck', 'mpi', and 'nil'"
+	    exit 1
+    fi # !par_typ
+fi # !par_typ
+if [ "${par_typ}" = 'bck' ]; then 
+    par_opt=' &'
+elif [ "${par_typ}" = 'mpi' ]; then 
+    mpi_flg='Yes'
+    par_opt=' &'
+fi # !par_typ
+if [ -n "${out_fl}" ]; then 
+    out_usr_flg='Yes'
+fi # !out_fl
+if [ -n "${thr_usr}" ]; then 
+    thr_nbr="${thr_usr}"
+fi # !thr_usr
+if [ -n "${wgt_usr}" ]; then 
+    wgt_gnr="${wgt_usr}"
+fi # !wgt_usr    
+if [ "${wgt_gnr}" != 'esmf' ] && [ "${wgt_gnr}" != 'tempest' ] ; then 
+	    echo "ERROR: Invalid -w wgt_gnr option = ${wgt_gnr}"
+	    echo "HINT: Valid wgt_gnr arguments are 'esmf' and 'tempest'"
+	    exit 1
+fi # !wgt_gnr
+
+if [ -n "${in_fl}" ]; then
+    # Single file argument
+    fl_in[${fl_nbr}]=${in_fl}
+    let fl_nbr=${fl_nbr}+1
+else # !in_fl
+    # Detecting input on stdin:
+    # http://stackoverflow.com/questions/2456750/detect-presence-of-stdin-contents-in-shell-script
+    # ls ${DATA}/ne30/raw/famipc5*1979*.nc | ncremap -D 1 -m ${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc -O ~/rgr
+    if [ -t 0 ]; then 
+	if [ "${drc_in_usr_flg}" = 'Yes' ]; then
+	    for fl in "${drc_in}"/*.nc "${drc_in}"/*.nc3 "${drc_in}"/*.nc4 "${drc_in}"/*.cdf "${drc_in}"/*.hdf "${drc_in}"/*.he5 "${drc_in}"/*.h5 ; do
+		if [ -f "${fl}" ]; then
+		    fl_in[${fl_nbr}]=${fl}
+		    let fl_nbr=${fl_nbr}+1
+		fi # !file
+	    done
+	else # !drc_in
+	    echo "ERROR: Must specify input file with -i or with stdin"
+	    echo "HINT: Pipe file list to script via stdin with, e.g., 'ls *.nc | ${spt_nm}'"
+	    exit 1
+	fi # !drc_in
+    else
+	# Input awaits on unit 0, i.e., on stdin
+	while read -r line; do # NeR05 p. 179
+	    fl_in[${fl_nbr}]=${line}
+	    let fl_nbr=${fl_nbr}+1
+	done < /dev/stdin
+    fi # stdin
+fi # !in_fl
+if [ -n "${dst_fl}" ]; then 
+    if [ ! -e "${dst_fl}" ]; then
+	echo "ERROR: Unable to find specified destination-file ${dst_fl}"
+	echo "HINT: Supply the full path-name for the destination-file"
+	exit 1
+    fi # ! -e
+    dst_usr_flg='Yes'
+fi # !dst_fl
+if [ -n "${grd_dst}" ]; then 
+    if [ ! -e "${grd_dst}" ]; then
+	echo "ERROR: Unable to find specified destination grid-file ${grd_dst}"
+	echo "HINT: Supply the full path-name for the destination grid, or generate one automatically with -G"
+	exit 1
+    fi # ! -e
+    grd_dst_usr_flg='Yes'
+else
+    grd_dst=${grd_dst_dfl} # [sng] Grid-file default
+fi # !grd_dst
+if [ -n "${grd_src}" ]; then 
+    if [ ! -e "${grd_src}" ]; then
+	echo "ERROR: Unable to find specified source grid-file ${grd_src}"
+	exit 1
+    fi # ! -e
+    grd_src_usr_flg='Yes'
+else
+    grd_src=${grd_src_dfl} # [sng] Grid-file default
+fi # !grd_src
+if [ -z "${grd_sng}" ]; then 
+    grd_sng_dfl="--rgr grd_ttl='Default internally-generated grid' --rgr grid=${grd_dst_dfl} --rgr latlon=100,100 --rgr snwe=30.0,70.0,-130.0,-90.0" # [sng] Grid string default
+    grd_sng="${grd_sng_dfl}"
+else
+    grd_sng_usr_flg='Yes'
+fi # !grd_sng
+if [ -n "${map_fl}" ]; then 
+    if [ ! -e "${map_fl}" ]; then
+	echo "ERROR: Unable to find specified regrid map ${map_fl}"
+	echo "HINT: Supply the full path-name for the regridding map"
+	exit 1
+    fi # ! -e
+    map_usr_flg='Yes'
+else
+    if [ "${wgt_gnr}" = 'esmf' ]; then 
+	map_fl_dfl="${drc_out}/ncremap_tmp_map_${wgt_gnr}_${alg_opt}.nc" # [sng] Map-file default
+    fi # !esmf
+    if [ "${wgt_gnr}" = 'tempest' ]; then 
+	map_fl_dfl="${drc_out}/ncremap_tmp_map_${wgt_gnr}.nc" # [sng] Map-file default
+	msh_fl_dfl="${drc_out}/ncremap_tmp_msh_ovr_${wgt_gnr}.g" # [sng] Mesh-file default
+	msh_fl=${msh_fl_dfl}
+    fi # !tempest
+    map_fl=${map_fl_dfl}
+fi # !map_fl
+
+# Print initial state
+if [ ${dbg_lvl} -ge 2 ]; then
+    printf "dbg: alg_opt  = ${alg_opt}\n"
+    printf "dbg: dbg_lvl  = ${dbg_lvl}\n"
+    printf "dbg: drc_in   = ${drc_in}\n"
+    printf "dbg: drc_out  = ${drc_out}\n"
+    printf "dbg: dst_fl   = ${dst_fl}\n"
+#    printf "dbg: fml_nm   = ${fml_nm}\n"
+    printf "dbg: gaa_sng  = ${gaa_sng}\n"
+    printf "dbg: grd_dst  = ${grd_dst}\n"
+    printf "dbg: grd_sng  = ${grd_sng}\n"
+    printf "dbg: grd_src  = ${grd_src}\n"
+    printf "dbg: hdr_pad  = ${hdr_pad}\n"
+    printf "dbg: in_fl    = ${in_fl}\n"
+    printf "dbg: map_fl   = ${map_fl}\n"
+    printf "dbg: mlt_map  = ${mlt_map_flg}\n"
+    printf "dbg: mpi_flg  = ${mpi_flg}\n"
+    printf "dbg: nco_opt  = ${nco_opt}\n"
+    printf "dbg: nd_nbr   = ${nd_nbr}\n"
+    printf "dbg: out_fl   = ${out_fl}\n"
+    printf "dbg: par_typ  = ${par_typ}\n"
+    printf "dbg: thr_nbr  = ${thr_nbr}\n"
+    printf "dbg: var_lst  = ${var_lst}\n"
+    printf "Asked to regrid ${fl_nbr} files:\n"
+    for ((fl_idx=0;fl_idx<${fl_nbr};fl_idx++)); do
+	printf "${fl_in[${fl_idx}]}\n"
+    done # !fl_idx
+fi # !dbg
+if [ ${dbg_lvl} -ge 2 ]; then
+    if [ ${mpi_flg} = 'Yes' ]; then
+	for ((nd_idx=0;nd_idx<${nd_nbr};nd_idx++)); do
+	    printf "dbg: nd_nm[${nd_idx}] = ${nd_nm[${nd_idx}]}\n"
+	done # !nd
+    fi # !mpi
+fi # !dbg
+
+# Create output directory
+mkdir -p ${drc_out}
+
+# Human-readable summary
+if [ ${dbg_lvl} -ge 1 ]; then
+    printf "NCO regridder invoked with command:\n"
+    echo "${spt_nm} ${cmd_ln}"
+fi # !dbg
+date_srt=$(date +"%s")
+
+if [ -f 'PET0.RegridWeightGen.Log' ]; then
+    printf "${spt_nm}: Removing PET0.RegridWeightGen.Log file from current directory before running\n"
+    /bin/rm -f PET0.RegridWeightGen.Log
+fi # !PETO
+printf "Started processing at `date`.\n"
+printf "NCO version is ${nco_version}\n"
+if [ "${map_usr_flg}" = 'Yes' ] && [ -n "${wgt_usr}" ] ; then
+    printf "${spt_nm}: ERROR Specifying both '-m map_fl' and '-w wgt_gnr' is not allowed (the weight-generator is unnecessary)\n"
+    exit 1
+fi # wgt_usr
+if [ "${grd_src_usr_flg}" = 'Yes' ]; then
+    if [ "${map_usr_flg}" = 'Yes' ]; then 
+	printf "${spt_nm}: ERROR Specifying both '-s grd_src' and '-m map_fl' is ambiguous and forbidden\n"
+	exit 1
+    fi # !map_usr_flg
+fi # !grd_src_usr_flg
+    
+if [ "${dst_usr_flg}" = 'Yes' ]; then 
+    if [ "${map_usr_flg}" = 'Yes' ]; then 
+	printf "${spt_nm}: ERROR Specify either '-d dst_fl' or '-m map_fl' not both\n"
+	exit 1
+    fi # !map_usr_flg
+    if [ "${grd_dst_usr_flg}" = 'Yes' ]; then 
+	printf "${spt_nm}: ERROR Specify either '-d dst_fl' or '-g grd_dst' not both\n"
+	exit 1
+    fi # !grd_dst_usr_flg
+else # !dst_usr_flg
+    if [ "${grd_dst_usr_flg}" = 'Yes' ]; then 
+	if [ "${map_usr_flg}" = 'Yes' ]; then 
+	    printf "${spt_nm}: ERROR Specify either '-g grd_dst' or '-m map_fl' not both\n"
+	    exit 1
+	fi # !map_usr_flg
+    else
+	if [ "${map_usr_flg}" != 'Yes' ] && [ "${grd_sng_usr_flg}" != 'Yes' ] ; then 
+	    printf "${spt_nm}: ERROR Must use one of '-d dst_fl', '-g grd_dst', '-G grd_sng', or '-m map_fl'\n"
+	    exit 1
+	fi # !map_usr_flg
+    fi # !grd_dst_usr_flg
+fi # !dst_usr_flg
+
+# Generate destination grid, if necessary, once (only) before loop over input files
+# Block 1: Destination grid
+# Unlike source grid, same destination grid is used for all files
+# Generate destination grid at most one-time
+# Eventually we will allow destination grid to be provided as grid-file, map-file, or data-file
+# Currently we require user to know (and specify) means by which destination grid is provided
+if [ "${map_usr_flg}" = 'Yes' ]; then 
+    printf "Source and destination grids will both be read from supplied map-file ${map_fl}\n"
+else # !map_usr_flg
+    fl_idx=0 # [idx] Current file index
+    if [ "${dst_usr_flg}" = 'Yes' ]; then 
+	# Block 1 Loop 1: Generate, check, and store (but do not yet execute) commands
+	# Infer destination grid-file from data file
+	printf "Destination grid will be inferred from data-file ${dst_fl} and stored as ${grd_dst}\n"
+	cmd_dst[${fl_idx}]="ncks ${nco_opt} --rgr nfr=y --rgr grid=${grd_dst} ${dst_fl} ${tmp_out_fl}"
+    else # !dst_usr_flg
+	if [ "${grd_dst_usr_flg}" = 'Yes' ]; then 
+	    printf "Destination grid supplied by user as ${grd_dst}\n"
+	else
+	    if [ "${grd_sng_usr_flg}" = 'Yes' ]; then 
+		printf "Destination grid will be generated from NCO grid string ${grd_sng}\n"
+		cmd_dst[${fl_idx}]="ncks ${nco_opt} ${grd_sng} ${fl_in[0]} ${tmp_out_fl}"
+	    else
+		printf "${spt_nm}: ERROR Grid string grd_sng not provided\n"
+		exit 1
+	    fi # !grd_sng_usr_flg
+	fi # !grd_dst_usr_flg
+    fi # !dst_usr_flg
+    if [ "${dst_usr_flg}" = 'Yes' ] || [ "${grd_dst_usr_flg}" != 'Yes' ]; then 
+	# Block 1 Loop 2: Execute and/or echo commands
+	if [ ${dbg_lvl} -ge 1 ]; then
+	    echo ${cmd_dst[${fl_idx}]}
+	fi # !dbg
+	if [ ${dbg_lvl} -ne 2 ]; then
+	    eval ${cmd_dst[${fl_idx}]}
+	    if [ $? -ne 0 ]; then
+		printf "${spt_nm}: ERROR Failed to generate destination grid. Debug this:\n${cmd_dst[${fl_idx}]}\n"
+		exit 1
+	    fi # !err
+	    if [ "${grd_sng_usr_flg}" = 'Yes' ]; then 
+		/bin/rm -f ${tmp_out_fl}
+	    fi # !grd_sng_usr_flg
+	fi # !dbg
+    fi # !dst_usr_flg || grd_dst_usr_flg
+    printf "Weight-generation type: ${wgt_gnr}\n"
+    if [ "${wgt_gnr}" = 'esmf' ]; then 
+	printf "ESMF's ESMF_RegridWeightGen will generate map-file internally and store it as ${map_fl}\n"
+	printf "Algorithm used to generate weights in map-file is: ${alg_opt}\n"
+    fi # !esmf
+    if [ "${wgt_gnr}" = 'tempest' ]; then 
+	printf "TempestRemap's GenerateOverlapMesh and GenerateOfflineMap will generate map-file internally and store it as ${map_fl}\n"
+    fi # !tempest
+    if [ ${fl_nbr} -ge 2 ]; then 
+	if [ "${mlt_map_flg}" = 'Yes' ]; then 
+	    printf "Input files assumed to use unique input grids, one map-file will be generated per input file\n"
+	else # !mlt_map_flg
+	    printf "Input files assumed to use same input grid, only one map-file will be generated\n"
+	fi # !mlt_map_flg
+    fi # !fl_nbr
+fi # !map_usr
+
+# If user provides source gridfile, assume it applies to every input file
+# Do not infer source gridfiles from input files within file loop
+# Generate map-file once outside of file loop, and re-use it for every input file
+if [ "${grd_src_usr_flg}" = 'Yes' ]; then
+    printf "Source grid supplied by user as ${grd_src}\n"
+    fl_idx=0
+    if [ "${wgt_gnr}" = 'esmf' ]; then 
+	cmd_map[${fl_idx}]="ESMF_RegridWeightGen -s ${grd_src} -d ${grd_dst} -w ${map_fl} --method ${alg_opt} ${esmf_opt} > /dev/null"
+    fi # !esmf
+    if [ "${wgt_gnr}" = 'tempest' ]; then 
+	cmd_msh[${fl_idx}]="GenerateOverlapMesh --a ${grd_src} --b ${grd_dst} --out ${msh_fl} > /dev/null"
+	cmd_map[${fl_idx}]="GenerateOfflineMap --in_mesh ${grd_src} --out_mesh ${grd_dst} --ov_mesh ${msh_fl} --out_map ${map_fl} ${tps_opt} > /dev/null"
+	# 20160101: TempestRemap programs have false positive error returns (failures reported as successes) so remove old map/mesh before generating new
+	/bin/rm -f ${msh_fl} ${map_fl}
+	if [ ${dbg_lvl} -ge 1 ]; then
+	    echo ${cmd_msh[${fl_idx}]}
+	fi # !dbg
+	if [ ${dbg_lvl} -ne 2 ]; then
+	    eval ${cmd_msh[${fl_idx}]}
+	    if [ $? -ne 0 ] || [ ! -f ${msh_fl} ] ; then
+		printf "${spt_nm}: ERROR Failed to generate mesh-file. Debug this:\n${cmd_msh[${fl_idx}]}\n"
+		exit 1
+	    fi # !err
+	fi # !dbg
+    fi # !tempest
+    if [ ${dbg_lvl} -ge 1 ]; then
+	echo ${cmd_map[${fl_idx}]}
+    fi # !dbg
+    if [ ${dbg_lvl} -ne 2 ]; then
+	eval ${cmd_map[${fl_idx}]}
+	if [ $? -ne 0 ] || [ ! -f ${map_fl} ] ; then
+	    printf "${spt_nm}: ERROR Failed to generate map-file. Debug this:\n${cmd_map[${fl_idx}]}\n"
+	    if [ "${wgt_gnr}" = 'esmf' ]; then 
+		printf "${spt_nm}: HINT When ESMF fails to generate map-files, it often puts additional debugging information in the file named PET0.RegridWeightGen.Log in the invocation directory (${drc_pwd})\n"
+	    fi # !esmf
+	    exit 1
+	fi # !err
+    fi # !dbg
+    # Set map_usr_flg to 'Yes' here to avoid re-generating map within file loop
+    map_usr_flg='Yes'
+fi # !grd_src_usr_flg
+
+# Begin loop over input files
+for ((fl_idx=0;fl_idx<${fl_nbr};fl_idx++)); do
+    in_fl=${fl_in[${fl_idx}]}
+    if [ "$(basename ${in_fl})" = "${in_fl}" ]; then
+	in_fl="${drc_pwd}/${in_fl}"
+    fi # !basename
+    if [ "${out_usr_flg}" = 'Yes' ]; then 
+	if [ ${fl_nbr} -ge 2 ]; then 
+	    echo "ERROR: Single output filename specified with -o for multiple input files"
+	    echo "HINT: For multiple input files use -O option to specify output directory and do not use -o option. Output files will have same name as input files, but will be in different directory."
+	    exit 1
+	fi # !fl_nbr
+    else # !out_usr_flg
+	out_fl="${drc_out}/$(basename ${in_fl})" # [sng] Output-file default
+    fi # !out_fl
+    if [ "${in_fl}" = "${out_fl}" ]; then
+	echo "ERROR: Input file = Output file = ${in_fl}"
+	echo "HINT: To prevent inadvertent data loss, ${spt_nm} insists that Input file and Output filenames differ"
+	exit 1
+    fi # !basename
+
+    # Generate new map unless map-file was supplied or already-generated (as indicated by map_usr_flg)
+    if [ "${map_usr_flg}" != 'Yes' ]; then
+	# Block 2: Source grid
+	# Block 2 Loop 1: Source gridfile command
+	if [ ! -e "${in_fl}" ]; then
+	    echo "${spt_nm}: ERROR Unable to find Input file ${in_fl}"
+	    echo "HINT: All files implied to exist must be in the directory specified by their filename or in ${drc_in} before ${spt_nm} will proceed"
+	    exit 1
+	fi # ! -e
+	# Infer source grid-file from input data file
+	cmd_src[${fl_idx}]="ncks ${nco_opt} --rgr nfr=y --rgr grid=${grd_src} ${in_fl} ${tmp_out_fl}"
+	
+	# Block 2 Loop 2: Execute and/or echo commands
+	if [ ${dbg_lvl} -ge 1 ]; then
+	    echo ${cmd_src[${fl_idx}]}
+	fi # !dbg
+	if [ ${dbg_lvl} -ne 2 ]; then
+	    eval ${cmd_src[${fl_idx}]}
+	    if [ $? -ne 0 ]; then
+		printf "${spt_nm}: ERROR Failed to generate source grid. Debug this:\n${cmd_src[${fl_idx}]}\n"
+		exit 1
+	    fi # !err
+	fi # !dbg
+	
+	# Block 3: Source->destination maps
+	# Block 3 Loop 1: Map-file commands
+	printf "Grid(src): ${grd_src}\n"
+	printf "Grid(dst): ${grd_dst}\n"
+	printf "Map-File : ${map_fl}\n"
+	if [ "${wgt_gnr}" = 'esmf' ]; then 
+	    cmd_map[${fl_idx}]="ESMF_RegridWeightGen -s ${grd_src} -d ${grd_dst} -w ${map_fl} --method ${alg_opt} ${esmf_opt} > /dev/null"
+	fi # !esmf
+	if [ "${wgt_gnr}" = 'tempest' ]; then 
+	    printf "Mesh-File: ${msh_fl}\n"
+	    cmd_msh[${fl_idx}]="GenerateOverlapMesh --a ${grd_src} --b ${grd_dst} --out ${msh_fl} ${tps_opt} > /dev/null"
+	    cmd_map[${fl_idx}]="GenerateOfflineMap --in_mesh ${grd_src} --out_mesh ${grd_dst} --ov_mesh ${msh_fl} --out_map ${map_fl} ${tps_opt} > /dev/null"
+	    # 20160101: TempestRemap programs have false negative error returns (failures reported as successes) so remove old map/mesh before generating new
+	    /bin/rm -f ${msh_fl} ${map_fl}
+	    if [ ${dbg_lvl} -ge 1 ]; then
+		echo ${cmd_msh[${fl_idx}]}
+	    fi # !dbg
+	    if [ ${dbg_lvl} -ne 2 ]; then
+		eval ${cmd_msh[${fl_idx}]}
+		if [ $? -ne 0 ] || [ ! -f ${msh_fl} ] ; then
+		    printf "${spt_nm}: ERROR Failed to generate mesh-file. Debug this:\n${cmd_msh[${fl_idx}]}\n"
+		    exit 1
+		fi # !err
+	    fi # !dbg
+	fi # !tempest
+	
+	# Block 3 Loop 2: Execute and/or echo commands
+	if [ ${dbg_lvl} -ge 1 ]; then
+	    echo ${cmd_map[${fl_idx}]}
+	fi # !dbg
+	if [ ${dbg_lvl} -ne 2 ]; then
+	    eval ${cmd_map[${fl_idx}]}
+	    if [ $? -ne 0 ] || [ ! -f ${map_fl} ] ; then
+		printf "${spt_nm}: ERROR Failed to generate map-file. Debug this:\n${cmd_map[${fl_idx}]}\n"
+		if [ "${wgt_gnr}" = 'esmf' ]; then 
+		    printf "${spt_nm}: HINT When ESMF fails to generate map-files, it often puts additional debugging information in the file named PET0.RegridWeightGen.Log in the invocation directory (${drc_pwd})\n"
+		fi # !esmf
+		exit 1
+	    fi # !err
+	fi # !dbg
+
+	# Prevent creating new source gridfile and map-file after first iteration
+	if [ "${mlt_map_flg}" = 'No' ] && [ ${fl_idx} -eq 0 ] ; then 
+	    map_usr_flg='Yes'
+	fi # !mlt_map_flg
+
+    fi # !map_usr_flg
+    
+    # Block 4: Regrid
+    printf "Input : ${in_fl}\n"
+    printf "Output: ${out_fl}\n"
+    cmd_rgr[${fl_idx}]="ncks -t ${thr_nbr} ${nco_opt} ${nco_var_lst} ${rgr_opt} --map=${map_fl} ${in_fl} ${out_fl}"
+    
+    # Block 4 Loop 2: Execute and/or echo commands
+    if [ ${dbg_lvl} -ge 1 ]; then
+	echo ${cmd_rgr[${fl_idx}]}
+    fi # !dbg
+    if [ ${dbg_lvl} -ne 2 ]; then
+	eval ${cmd_rgr[${fl_idx}]}
+	if [ -z "${par_opt}" ]; then
+	    eval ${cmd_rgr[${fl_idx}]}
+	    if [ $? -ne 0 ]; then
+		printf "${spt_nm}: ERROR Failed to regrid. cmd_rgr[${fl_idx}] failed. Debug this:\n${cmd_rgr[${fl_idx}]}\n"
+		exit 1
+	    fi # !err
+	else # !par_typ
+	    eval ${cmd_rgr[${fl_idx}]} ${par_opt}
+	    rgr_pid[${fl_idx}]=$!
+	fi # !par_typ
+    fi # !dbg
+done # !fl_idx
+
+# wait() for parallel regridding, if any, to finish
+if [ -n "${par_opt}" ]; then
+    for ((fl_idx=0;fl_idx<${fl_nbr};fl_idx++)); do
+	wait ${rgr_pid[${fl_idx}]}
+	if [ $? -ne 0 ]; then
+	    printf "${spt_nm}: ERROR Failed to regrid. cmd_rgr[${fl_idx}] failed. Debug this:\n${cmd_rgr[${fl_idx}]}\n"
+	    exit 1
+	fi # !err
+    done # !fl_idx
+fi # !par_typ
+
+date_end=$(date +"%s")
+printf "Completed processing of ${fl_nbr} file(s) at `date`.\n"
+date_dff=$((date_end-date_srt))
+echo "Quick plots of results from last regridded file:"
+echo "ncview  ${out_fl} &"
+echo "panoply ${out_fl} &"
+echo "Elapsed time $((date_dff/60))m$((date_dff % 60))s"
+
+exit 0
diff --git a/data/sld_nco.sh b/data/sld_nco.sh
deleted file mode 100755
index ee3987c..0000000
--- a/data/sld_nco.sh
+++ /dev/null
@@ -1,384 +0,0 @@
-#!/bin/sh
-
-# Purpose: Regridding script tailored for Swath-Like-Data (SLD)
-# This script regrids all input SLD files to specified output grid
-
-# Author: C. Zender
-# Created: 20150909
-
-# Source: https://github.com/nco/nco/tree/master/data/sld_nco.c
-
-# Additional Documentation:
-
-# Configure paths at High-Performance Computer Centers (HPCCs) based on ${HOSTNAME}
-if [ -z "${HOSTNAME}" ]; then
-    if [ -f /bin/hostname ] && [ -x /bin/hostname ] ; then
-	export HOSTNAME=`/bin/hostname`
-    elif [ -f /usr/bin/hostname ] && [ -x /usr/bin/hostname ] ; then
-	export HOSTNAME=`/usr/bin/hostname`
-    fi # !hostname
-fi # HOSTNAME
-# Default input and output directory is ${DATA}
-if [ -z "${DATA}" ]; then
-    case "${HOSTNAME}" in 
-	cooley* | cc* ) DATA="/projects/HiRes_EarthSys/${USER}" ; ;; # ALCF cooley compute nodes named ccNNN
-	edison* | hopper* | nid* ) DATA="${SCRATCH}" ; ;; # NERSC edison compute nodes named nidNNNNN
-	pileus* ) DATA="/lustre/atlas/proj-shared/cli115/${USER}" ; ;; # OLCF CADES
-	rhea* ) DATA="/lustre/atlas/proj-shared/cli115/${USER}" ; ;; # OLCF rhea compute nodes named rheaNNN
-	* ) DATA='/tmp' ; ;; # Other
-    esac # !HOSTNAME
-fi # DATA
-
-# Production usage:
-# chmod a+x ~/sld_nco.sh
-# sld_nco.sh -s AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -o ${DATA}/sld/rgr
-# sld_nco.sh -s AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -i ${DATA}/sld/raw -o ${DATA}/sld/rgr
-# sld_nco.sh -s ${DATA}/sld/raw/AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -o ${DATA}/sld/rgr
-# sld_nco.sh -x TSurfStd_ct -s ${DATA}/sld/raw/AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -o ${DATA}/sld/rgr
-
-# Debugging and Benchmarking:
-# sld_nco.sh > ~/sld_nco.txt 2>&1 &
-# sld_nco.sh -s AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc -i ${DATA}/sld/raw -o ${DATA}/sld/rgr > ~/sld_nco.txt 2>&1 &
-
-# Set script name and run directory
-drc_pwd=${PWD}
-spt_nm=$(basename ${0}) # [sng] Script name
-nco_version=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
-
-# Set fonts for legibility
-fnt_nrm=`tput sgr0` # Normal
-fnt_bld=`tput bold` # Bold
-fnt_rvr=`tput smso` # Reverse
-
-# Defaults for command-line options and some derived variables
-# Modify these defaults to save typing later
-#caseid='AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc' # [sng] Case ID
-dbg_lvl=0 # [nbr] Debugging level
-drc_in='' # [sng] Input file directory
-drc_out="${DATA}/sld/rgr" # [sng] Output file directory
-esmf_opt='> /dev/null' # [sng] ESMF_RegridWeightGen options
-fml_nm='' # [sng] Family name (e.g., 'amip', 'control', 'experiment')
-gaa_sng="--gaa sld_script=${spt_nm} --gaa sld_hostname=${HOSTNAME} --gaa sld_version=${nco_version}" # [sng] Global attributes to add
-grd_fl='' # [sng] Grid-file
-grd_sng='' # [sng] Grid string
-hdr_pad='1000' # [B] Pad at end of header section
-map_fl='' # [sng] Map-file
-mpi_flg='No' # [sng] Parallelize over nodes
-nco_opt='-O -t 1 --no_tmp_fl' # [sng] NCO defaults (e.g., '-O -6 -t 1')
-nco_usr='' # [sng] NCO user-configurable options (e.g., '-D 1')
-par_typ='bck' # [sng] Parallelism type
-rgr_fl='' # [sng] Regridded file
-rgr_opt='--rgr lat_nm_out=lat --rgr lon_nm_out=lon' # [sng] Regridding options (e.g., '--rgr col_nm=lndgrid')
-sld_fl='AIRS.2014.10.01.202.L2.TSurfStd.Regrid010.1DLatLon.hole.nc' # [sng] SLD file
-thr_nbr=2 # [nbr] Thread number for regridder
-#var_lst='FSNT,AODVIS' # [sng] Variables to process (empty means all)
-var_lst='' # [sng] Variables to process (empty means all)
-xtn_var='' # [sng] Extensive variables (e.g., 'TSurfStd_ct')
-yyyy_srt='1980' # [yyyy] Start year
-yyyy_end='1983' # [yyyy] End year
-
-# Derived defaults
-grd_dst_dfl="${drc_out}/grd_dst.nc" # [sng] Grid-file (destination) default
-grd_dst_glb="${DATA}/grids/180x360_SCRIP.20150901.nc" # [sng] Grid-file (destination) global
-grd_src="${drc_out}/grd_src.nc" # [sng] Grid-file (source) 
-
-function fnc_usg_prn {
-    # Print usage
-    printf "\nQuick documentation for ${fnt_bld}${spt_nm}${fnt_nrm} (read script for more thorough explanations)\n\n"
-    printf "${fnt_rvr}Basic usage:${fnt_nrm} ${fnt_bld}$spt_nm -s sld_fl -g grd_fl -i drc_in -o drc_out${fnt_nrm}\n\n"
-    echo "Command-line options:"
-#    echo "${fnt_rvr}-c${fnt_nrm} ${fnt_bld}caseid${fnt_nrm}   Case ID string (default ${fnt_bld}${caseid}${fnt_nrm})"
-    echo "${fnt_rvr}-d${fnt_nrm} ${fnt_bld}dbg_lvl${fnt_nrm}  Debugging level (default ${fnt_bld}${dbg_lvl}${fnt_nrm})"
-#    echo "${fnt_rvr}-e${fnt_nrm} ${fnt_bld}yyyy_end${fnt_nrm} Ending year in YYYY format (default ${fnt_bld}${yyyy_end}${fnt_nrm})"
-    echo "${fnt_rvr}-f${fnt_nrm} ${fnt_bld}fml_nm${fnt_nrm}   Family name (empty means none) (default ${fnt_bld}${fml_nm}${fnt_nrm})"
-    echo "${fnt_rvr}-g${fnt_nrm} ${fnt_bld}grd_fl${fnt_nrm}   Grid-file (destination) (empty means generate internally) (default ${fnt_bld}${grd_fl}${fnt_nrm})"
-    echo "${fnt_rvr}-G${fnt_nrm} ${fnt_bld}grd_sng${fnt_nrm}  Grid generation string (empty means none) (default ${fnt_bld}${grd_sng}${fnt_nrm})"
-    echo "${fnt_rvr}-i${fnt_nrm} ${fnt_bld}drc_in${fnt_nrm}   Input directory (empty means look in current directory) (default ${fnt_bld}${drc_in}${fnt_nrm})"
-    echo "${fnt_rvr}-m${fnt_nrm} ${fnt_bld}map_fl${fnt_nrm}   Map-file (empty means generate internally) (default ${fnt_bld}${map_fl}${fnt_nrm})"
-    echo "${fnt_rvr}-n${fnt_nrm} ${fnt_bld}nco_opt${fnt_nrm}  NCO options (empty means none) (default ${fnt_bld}${nco_opt}${fnt_nrm})"
-    echo "${fnt_rvr}-o${fnt_nrm} ${fnt_bld}drc_out${fnt_nrm}  Output directory (default ${fnt_bld}${drc_out}${fnt_nrm})"
-    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_fl${fnt_nrm}   Regridded-file (empty copies SLD filename) (default ${fnt_bld}${rgr_fl}${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}sld_fl${fnt_nrm}   SLD file (mandatory) (default ${fnt_bld}${sld_fl}${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})"
-    echo "${fnt_rvr}-x${fnt_nrm} ${fnt_bld}xtn_var${fnt_nrm}  Extensive variables (empty means none) (default ${fnt_bld}${xtn_var}${fnt_nrm})"
-    printf "\n"
-    printf "Examples: ${fnt_bld}$spt_nm -s ${sld_fl} -g ${grd_dst_dfl} -o ${drc_out} ${fnt_nrm}\n"
-    printf "          ${fnt_bld}$spt_nm -x TSurfStd_ct -s ${sld_fl} -g ${grd_dst_dfl} -o ${drc_out} ${fnt_nrm}\n"
-    printf "          ${fnt_bld}$spt_nm -v TSurfAir -s ${DATA}/hdf/AIRS.2015.01.15.001.L2.RetStd.v6.0.11.0.G15015142014.hdf -g ${grd_dst_glb} -o ${drc_out} ${fnt_nrm}\n"
-    printf "          ${fnt_bld}$spt_nm -v CloudFrc_A -s ${DATA}/hdf/AIRS.2002.08.01.L3.RetStd_H031.v4.0.21.0.G06104133732.hdf -g ${grd_dst_glb} -o ${drc_out} ${fnt_nrm}\n"
-    printf "          ${fnt_bld}$spt_nm -s ${DATA}/hdf/MOD04_L2.A2000055.0005.006.2014307165927.hdf -g ${grd_dst_glb} -o ${drc_out} ${fnt_nrm}\n"
-    printf "          ${fnt_bld}$spt_nm -s ${DATA}/hdf/OMI-Aura_L2-OMIAuraSO2_2012m1222-o44888_v01-00-2014m0107t114720.h5 -g ${grd_dst_glb} -o ${drc_out} ${fnt_nrm}\n"
-    printf "          ${fnt_bld}$spt_nm -v T -s ${DATA}/hdf/wrfout_v2_Lambert_notime.nc -g ${grd_dst_glb} -o ${drc_out} ${fnt_nrm}\n"
-    exit 1
-} # end fnc_usg_prn()
-
-# Check argument number and complain accordingly
-arg_nbr=$#
-#printf "\ndbg: Number of arguments: ${arg_nbr}"
-if [ ${arg_nbr} -eq 0 ]; then
-  fnc_usg_prn
-fi # !arg_nbr
-
-# Parse command-line options:
-# http://stackoverflow.com/questions/402377/using-getopts-in-bash-shell-script-to-get-long-and-short-command-line-options
-# http://tuxtweaks.com/2014/05/bash-getopts
-cmd_ln="${@}"
-while getopts :d:f:g:G:h:i:m:n:o:p:R:r:s:v:x: OPT; do
-    case ${OPT} in
-#	c) caseid=${OPTARG} ;; # CASEID
-	d) dbg_lvl=${OPTARG} ;; # Debugging level
-#	e) yyyy_end=${OPTARG} ;; # End year
-	f) fml_nm=${OPTARG} ;; # Family name
-	g) grd_fl=${OPTARG} ;; # Grid-file
-	G) grd_sng=${OPTARG} ;; # Grid generation string
-	i) drc_in=${OPTARG} ;; # Input directory
-	m) map_fl=${OPTARG} ;; # Map-file
-	n) nco_usr=${OPTARG} ;; # NCO options
-	o) drc_out=${OPTARG} ;; # Output directory
-	p) par_typ=${OPTARG} ;; # Parallelism type
-	r) rgr_fl=${OPTARG} ;; # Regridded file
-	R) rgr_opt=${OPTARG} ;; # Regridding options
-	s) sld_fl=${OPTARG} ;; # SLD file
-	v) var_lst=${OPTARG} ;; # Variables
-	x) xtn_var=${OPTARG} ;; # Extensive variables
-	\?) # Unrecognized option
-	    printf "\nERROR: Option ${fnt_bld}-$OPTARG${fnt_nrm} not allowed"
-	    fnc_usg_prn ;;
-    esac
-done
-shift $((OPTIND-1)) # Advance one argument
-
-# Derived variables
-if [ -z "${drc_in}" ]; then
-    drc_in="${drc_pwd}"
-fi # !drc_in
-out_nm=${sld_fl}
-if [ -n "${fml_nm}" ]; then 
-    out_nm="${fml_nm}"
-fi # !fml_nm
-if [ -n "${nco_usr}" ]; then 
-    nco_opt="${nco_usr} ${nco_opt}"
-fi # !var_lst
-if [ -n "${gaa_sng}" ]; then 
-    nco_opt="${nco_opt} ${gaa_sng}"
-fi # !var_lst
-if [ -n "${hdr_pad}" ]; then 
-    nco_opt="${nco_opt} --hdr_pad=${hdr_pad}"
-fi # !hdr_pad
-if [ -n "${var_lst}" ]; then 
-    nco_opt="${nco_opt} -v ${var_lst}"
-fi # !var_lst
-if [ -n "${xtn_var}" ]; then 
-    rgr_opt="${rgr_opt} --xtn=${xtn_var}"
-fi # !var_lst
-if [ ${par_typ} = 'bck' ]; then 
-    par_opt=' &'
-    par_opt_cf=''
-elif [ ${par_typ} = 'mpi' ]; then 
-    mpi_flg='Yes'
-    par_opt=' &'
-    par_opt_cf=''
-fi # !par_typ
-
-if [ -n "${grd_fl}" ]; then 
-    if [ ! -e "${grd_fl}" ]; then
-	echo "ERROR: Unable to find specified grid-file ${grd_fl}"
-	echo "HINT: Supply the full path-name for the destination grid, or generate one automatically with -G"
-	exit 1
-    fi # ! -e
-    grd_dst=${grd_fl}
-    grd_usr_flg='Yes'
-else
-    grd_dst=${grd_dst_dfl} # [sng] Grid-file default
-fi # !grd_fl
-if [ -z "${grd_sng}" ]; then 
-    grd_sng_dfl="--rgr grd_ttl='Default internally-generated grid' --rgr grid=${grd_dst_dfl} --rgr lat_nbr=100 --rgr lon_nbr=100 --rgr snwe=30.0,70.0,-130.0,-90.0" # [sng] Grid string default
-    grd_sng="${grd_sng_dfl}"
-fi # !grd_sng
-if [ -n "${map_fl}" ]; then 
-    if [ ! -e "${map_fl}" ]; then
-	echo "ERROR: Unable to find specified regrid map ${map_fl}"
-	echo "HINT: Supply the full path-name for the regridding map"
-	exit 1
-    fi # ! -e
-    map_usr_flg='Yes'
-else
-    map_fl_dfl="${drc_out}/map_src_to_dst_bilin.nc" # [sng] Map-file default
-    map_fl=${map_fl_dfl}
-fi # !map_fl
-if [ -n "${rgr_fl}" ]; then 
-    rgr_usr_flg='Yes'
-else
-    rgr_fl="${drc_out}/$(basename ${sld_fl})" # [sng] Map-file default
-fi # !rgr_fl
-
-# Doubly-derived fields
-if [ "$(basename ${sld_fl})" = "${sld_fl}" ]; then
-    sld_fl="${drc_in}/${sld_fl}"
-fi # !basename
-if [ "${sld_fl}" = "${rgr_fl}" ]; then
-    echo "ERROR: SLD file = Regridded file = ${sld_fl}"
-    echo "HINT: To prevent inadvertent data loss, ${spt_nm} insists that SLD file and regridded file be different"
-    exit 1
-fi # !basename
-
-# Print initial state
-if [ ${dbg_lvl} -ge 1 ]; then
-#    printf "dbg: caseid   = ${caseid}\n"
-    printf "dbg: dbg_lvl  = ${dbg_lvl}\n"
-    printf "dbg: drc_in   = ${drc_in}\n"
-    printf "dbg: drc_out  = ${drc_out}\n"
-    printf "dbg: fml_nm   = ${fml_nm}\n"
-    printf "dbg: gaa_sng  = ${gaa_sng}\n"
-    printf "dbg: grd_dst  = ${grd_dst}\n"
-    printf "dbg: grd_sng  = ${grd_sng}\n"
-    printf "dbg: grd_src  = ${grd_src}\n"
-    printf "dbg: hdr_pad  = ${hdr_pad}\n"
-    printf "dbg: map_fl   = ${map_fl}\n"
-    printf "dbg: mpi_flg  = ${mpi_flg}\n"
-    printf "dbg: nco_opt  = ${nco_opt}\n"
-    printf "dbg: nd_nbr   = ${nd_nbr}\n"
-    printf "dbg: par_typ  = ${par_typ}\n"
-    printf "dbg: rgr_fl   = ${rgr_fl}\n"
-    printf "dbg: sld_fl   = ${sld_fl}\n"
-    printf "dbg: thr_nbr  = ${thr_nbr}\n"
-    printf "dbg: var_lst  = ${var_lst}\n"
-#    printf "dbg: yyyy_end = ${yyyy_end}\n"
-fi # !dbg
-if [ ${dbg_lvl} -ge 2 ]; then
-    if [ ${mpi_flg} = 'Yes' ]; then
-	for ((nd_idx=0;nd_idx<${nd_nbr};nd_idx++)); do
-	    printf "dbg: nd_nm[${nd_idx}] = ${nd_nm[${nd_idx}]}\n"
-	done # !nd
-    fi # !mpi
-fi # !dbg
-
-# Create output directory, go to working directory
-mkdir -p ${drc_out}
-cd ${drc_out}
-
-# Human-readable summary
-if [ ${dbg_lvl} -ge 1 ]; then
-    printf "Swath-Like Data (SLD) processor invoked with command:\n"
-    echo "${spt_nm} ${cmd_ln}"
-fi # !dbg
-date_srt=$(date +"%s")
-printf "Started SLD processing for file pattern ${sld_fl} at `date`.\n"
-printf "Source grid will be inferred from SLD file and stored as ${grd_src}\n"
-if [ "${grd_usr_flg}" = 'Yes' ]; then 
-    printf "Destination grid-file supplied by user as ${grd_dst}\n"
-else
-    printf "Destination grid-file will be generated internally and stored as ${grd_dst}\n"
-    if [ ${dbg_lvl} -ge 0 ]; then
-	printf "Destination grid characteristics: ${grd_sng}\n"
-    fi # !dbg
-fi # !grd_usr_flg
-if [ "${map_usr_flg}" = 'Yes' ]; then 
-    printf "Map-file supplied as ${map_fl}\n"
-else
-    printf "Map-file will be generated internally and stored as ${map_fl}\n"
-fi # !map_usr_flg
-printf "Regridded file will be stored as ${rgr_fl}\n"
-printf "NCO version is ${nco_version}\n"
-
-# Block 1: Destination grid
-if [ "${grd_usr_flg}" != 'Yes' ]; then 
-    printf "Generate destination grid...\n"
-    # Block 1 Loop 1: Generate, check, and store (but do not yet execute) commands
-    clm_idx=1
-    cmd_clm[${clm_idx}]="ncks ${nco_opt} ${grd_sng} ~/nco/data/in.nc ~/foo.nc"
-
-    # Block 1 Loop 2: Execute and/or echo commands
-    for ((clm_idx=1;clm_idx<=1;clm_idx++)); do
-	if [ ${dbg_lvl} -ge 1 ]; then
-	    echo ${cmd_clm[${clm_idx}]}
-	fi # !dbg
-	if [ ${dbg_lvl} -le 1 ]; then
-	    eval ${cmd_clm[${clm_idx}]}
-	    if [ $? -ne 0 ]; then
-		printf "${spt_nm}: ERROR Failed to generate destination grid\n"
-		exit 1
-	    fi # !err
-	fi # !dbg
-    done # !clm_idx
-fi # !grd_usr_flg
-wait
-
-# Block 2: Source grid(s)
-# Block 2 Loop 1: Source gridfile commands
-printf "Generate source grids...\n"
-clm_idx=2
-if [ ! -e "${sld_fl}" ]; then
-    echo "${spt_nm}: ERROR Unable to find SLD file ${sld_fl}"
-    echo "HINT: All files implied to exist must be in the directory specified by their filename or in ${drc_in} before ${spt_nm} will proceed"
-    exit 1
-fi # ! -e
-cmd_clm[${clm_idx}]="ncks ${nco_opt} --rgr nfr=y --rgr grid=${grd_src} ${sld_fl} ~/foo.nc"
-
-# Block 2 Loop 2: Execute and/or echo commands
-for ((clm_idx=2;clm_idx<=2;clm_idx++)); do
-    if [ ${dbg_lvl} -ge 1 ]; then
-	echo ${cmd_clm[${clm_idx}]}
-    fi # !dbg
-    if [ ${dbg_lvl} -le 1 ]; then
-	eval ${cmd_clm[${clm_idx}]}
-	if [ $? -ne 0 ]; then
-	    printf "${spt_nm}: ERROR Failed to generate source grid\n"
-	    exit 1
-	fi # !err
-    fi # !dbg
-done # !clm_idx
-wait
-
-# Block 3: Source->destination maps
-if [ "${map_usr_flg}" != 'Yes' ]; then 
-    # Block 3 Loop 1: Mapfile commands
-    printf "Generate source->destination mapping weights...\n"
-    clm_idx=3
-    cmd_clm[${clm_idx}]="ESMF_RegridWeightGen -s ${grd_src} -d ${grd_dst} -w ${map_fl} --method bilinear --src_regional --dst_regional --ignore_unmapped ${esmf_opt}"
-
-    # Block 3 Loop 2: Execute and/or echo commands
-    for ((clm_idx=3;clm_idx<=3;clm_idx++)); do
-	if [ ${dbg_lvl} -ge 1 ]; then
-	    echo ${cmd_clm[${clm_idx}]}
-	fi # !dbg
-	if [ ${dbg_lvl} -le 1 ]; then
-	    eval ${cmd_clm[${clm_idx}]}
-	    if [ $? -ne 0 ]; then
-		printf "${spt_nm}: ERROR Failed to generate mapfile\n"
-		exit 1
-	    fi # !err
-	fi # !dbg
-    done # !clm_idx
-fi # !map_usr_flg
-wait
-
-# Block 4: Regrid
-printf "Regridding...\n"
-clm_idx=4
-cmd_clm[${clm_idx}]="ncks ${nco_opt} ${rgr_opt} --map=${map_fl} ${sld_fl} ${rgr_fl}"
-
-# Block 4 Loop 2: Execute and/or echo commands
-for ((clm_idx=4;clm_idx<=4;clm_idx++)); do
-    if [ ${dbg_lvl} -ge 1 ]; then
-	echo ${cmd_clm[${clm_idx}]}
-    fi # !dbg
-    if [ ${dbg_lvl} -le 1 ]; then
-	eval ${cmd_clm[${clm_idx}]}
-	if [ $? -ne 0 ]; then
-	    printf "${spt_nm}: ERROR Failed to regrid\n"
-	    exit 1
-	fi # !err
-    fi # !dbg
-done # !clm_idx
-wait
-
-date_end=$(date +"%s")
-printf "Completed processing for SLD file ${sld_fl} at `date`.\n"
-date_dff=$((date_end-date_srt))
-echo "Quick plots of results: ncview ${rgr_fl} &"
-echo "Elapsed time $((date_dff/60))m$((date_dff % 60))s"
-
-exit 0
diff --git a/debian/changelog b/debian/changelog
index dba3edf..e66cf82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+nco (4.5.4-1) unstable; urgency=low
+
+  * new upstream version ncremap fix ncpdq nfr cap, XML _Unsigned, crv dateline, GSL2
+
+ -- Charlie Zender <zender at uci.edu>  Thu, 07 Jan 2016 12:25:12 -0700
+
 nco (4.5.3-1) unstable; urgency=low
 
   * new upstream version nfr skl crv snwe frc_out bugs airs ncecat gag ncatted del
diff --git a/doc/ANNOUNCE b/doc/ANNOUNCE
index dfc911c..e51bfb6 100644
--- a/doc/ANNOUNCE
+++ b/doc/ANNOUNCE
@@ -1,119 +1,114 @@
 $Header$ -*-text-*-
 
-The netCDF Operators NCO version 4.5.3 are ready. 
+The netCDF Operators NCO version 4.5.4 are ready. 
 
 http://nco.sf.net (Homepage, Mailing lists)
 http://github.com/nco (Source Code, Releases, Developers)
 
-This release mainly advances features related to regridding.
-The primary advance is support for curvilinear regridding.
-Latitude and longitude may now be two-dimensional coordinates.
-NCO will now rectangular and curvilinear grids from most
-(well-behaved) input data files, so regridding swath-like data (SLD)
-(e.g., WRF and much NASA L2 data) just became a lot easier. 
-The ~/nco/data/sld_nco.sh script integrates the most common regridding
-tasks into a (hopefully) turnkey solution in time for Thanksgiving.
-Feedback welcome!
-
-According to https://www2.cisl.ucar.edu/resources/yellowstone/software 
-NCAR CISL supports CDO but not NCO on Yellowstone/Geyser/Caldera.
-Please contact the CISL Help Desk cislhelp at ucar.edu if you would like
-CISL to support NCO on these platforms. Thank you.
-
-Work on NCO 4.5.4 has commenced and will better support eliciting
-latitude/longitude coordinates using the CF "coordinates" convention,
-regridding variables whose horizontal dimensions are not the
-most-rapidly-varying.
+We are pleased to introduce ncremap, a new operator for regridding. 
+ncremap is a shell script that wraps ncks to produce a friendly
+interface to regridding features. Without any external dependencies,
+ncremap applies weights from a pre-exisiting mapfile to a source
+data file to produce a regridded dataset. Source and destination
+datasets may be on any Curvilinear, Rectangular, or Unstructured
+Data (CRUD) grid. When necessary ncremap calls ESMF_RegridWeightGen
+or TempestRemap to generate weights and uses those to regrid. ncremap
+hides the complexity of regridding from the user, who can know
+next-to-nothing about regridding.
+
+Work on NCO 4.5.5 has commenced and will better support eliciting
+latitude/longitude coordinates using the CF "coordinates" convention
+and regridding variables whose horizontal dimensions are not the
+most-rapidly-varying, and ncremap support for calling TempestRemap.  
 
 Enjoy,
 Charlie
 
 NEW FEATURES (full details always in ChangeLog):
 
-A. NCO's new configure --disable-doc switch allows NCO (but not its
-   documentation) to build on vanilla OSX again.  It has long been
-   possible to build/install NCO on MacOSX with a common packaging
-   system, e.g., MacPorts, Fink, etc.  However, it recently become
-   important to build NCO from source on vanilla MacOSX without any
-   packaging system. Apple has not updated some GNU tools (like
-   Texinfo) for over 10 years, and maintaining backwards compatibility
-   of the documentation on vanilla OSX is not feasible. Docs continue
-   to build fine with MacPorts, Fink, etc.
-
-B. ncks --rgr nfr reads any/all grid information from input files,
-   infers any necessary but missing information (e.g., estimates cell
-   interface locations from cell midpoints), and outputs the gridfile
-   in SCRIP-format for easy use by offline regridders. The procedure
-   works on input files where NCO can identify lat/lon coordinates. 
-   ncks --rgr nfr --rgr grid=infer.nc in.nc out.nc
-   http://nco.sf.net/nco.html#grid
-
-C. ncks --rgr skl='y' creates a "skeleton" version of a data file
-   with the specified geometry. This skeleton file contains grid
-   center and interfaces locations and gridcell area. These can be
-   more easily be assessed, and continental outlines examined, than
-   with the corresponding SCRIP file. The skeleton can also be
-   manually populated with data rather than relying on a model. 
-   # Generate T42 Gaussian grid file t42_SCRIP.nc and skeleton file t42_skl.nc
-   ncks --rgr skl=${DATA}/grids/t42_skl.nc --rgr grid=${DATA}/grids/t42_SCRIP.nc \
-     --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr \
-     ~zender/nco/data/in.nc ~/foo.nc
-   http://nco.sf.net/nco.html#skl
-
-D. Generate 2-D regional grids in SCRIP format, and, in conjunction
-   with a mapfile, regrid to/from regional bounding boxes.
-   During grid generation, specify bounding box edges with
-   --rgr wesn=lon_wst,lon_est,lat_sth,lat_nrt or
-   --rgr snwe=lat_sth,lat_nrt,lon_wst,lon_est
-   This feature debuted 4.5.2 but was not announced because it 
-   was not yet documented.
-   # Regrid global file to regional domain
-   ncks --map map_global_to_regional_bilin.nc in.nc out.nc
-   http://nco.sf.net/nco.html#grid
-   http://nco.sf.net/nco.html#regrid
-
-E. Use --xtn_var or --extensive to specify extensive variables.
-   Extensive variables are summed not averaged during regridding. 
-   The support for extensive variables is not yet robust, yet we
-   are ready to receive feedback from early adopters.
-   ncks --xtn count --map map.nc in.nc out.nc
-   http://nco.sf.net/nco.html#regrid
+A. ncremap: A new netCDF operator for regridding.
+   ncremap is a shell script that wraps ncks to produce a friendly
+   interface to regridding features. Without any external dependencies,
+   ncremap applies weights from a pre-exisiting mapfile to input data
+   file(s) to produce a regrided dataset(s). Source and destination 
+   datasets may be on any Curvilinear, Rectangular, or Unstructured
+   Data (CRUD) grid. ncremap will also, when necessary, use external
+   programs (ESMF's ESMF_RegridWeightGen (ERWG), or TempestRemap's
+   GenerateOverlapMesh/GenerateOfflineMap) to generate weights and
+   mapfiles and use those to regrid. ERWG is distributed in binary
+   format with NCL, which many (most?) users already have on their
+   system. Or ERWG and TempestRemap may be installed from source. 
+   Please try ncremap and send us your feedback and suggestions.
+   Examples:
+   ncremap -i src.nc -d dst.nc -o out.nc
+   ls gcm14*cam*0007*.nc | ncremap -a conserve -M -d dst_1x1.nc -O ~/rgr
+   http://dust.ess.uci.edu/smn/pst_nco_agu_201512.pdf # AGU Poster
+   http://nco.sf.net/nco.html#ncremap
+
+B. ncks prints XML "_Unsigned" attribute for unsigned attribute types.
+   Formerly, ncks did not preserve the signedness of attributes.
+   Thanks to Aleksandar Jelenak and Ed Armstrong for this suggestion.
+   % ncks -v att_var --xml ~/nco/data/in_4.nc | grep Unsigned
+    <attribute name="ubyte_att" type="byte" isUnsigned="true" value="0 1 2 127 128 254 255 0" />
+    <attribute name="ushort_att" type="short" isUnsigned="true" value="37" />
+    <attribute name="uint64_att" type="long" isUnsigned="true" value="0" />
+   http://nco.sf.net/nco.html#xml
+
+C. ncap2 now accepts [] and () syntax interchangeably.
+   Expressions which formerly had to use one or the other can now
+   use either. Brought to you by Henry.
+
+D. ncap2 now conforms arrays by hyperslabbed dimension size rather
+   than by dimension name. This mean, e.g., that hyperslabs from
+   one dimension can be used to fill-in other dimensions.
+   A prototypical example is determining pressure thickness of layers
+   as the difference between interface pressure levels.
+   For hybrid coordinate system models like CAM, this is now a
+   (relatively) simple two-step command with a mixture of different
+   dimensions on the LHS and RHS:
+   prs_ntf[time,lat,lon,ilev]=P0*hyai+PS*hybi; // Interface pressures
+   prs_dlt[time,lat,lon,lev]=prs_ntf(:,:,:,1:$ilev.size-1)-prs_ntf(:,:,:,0:$ilev.size-2);
+   http://nco.sf.net/nco.html#pdel
+   Thanks to Philip Cameron-Smith for suggesting and to Henry Butowsky
+   for implementing this new feature.
+
+E. NCO now treats variables named wgt_* as weights and avoids
+   performing math on them when possible. E.g., ncbo will preserve
+   (and not difference) the variable wgt_1. This is the same behavior
+   that NCO uses for coordinates, "gw", and masks (named with msk_*.)
+   The idea is that weights are a property of the grid and should not
+   be differenced, averaged, etc., unless necesssary.
+   http://nco.sf.net/nco.html#prc_xcp
+
+F. ncap2 now accepts "sum" as a synonym for "total" in its methods.
+   Additionally, ncap2 has a new function,
+   ncap_stats_wvariance(var,wgt) to computed weighted standard
+   deviations where missing values may be present.
+   Additionally, ncap2 now builds with GSL 2.x. All thanks to Henry.
+   http://nco.sf.net/nco.html#ncap2
 
 BUG FIXES:
 
-A. ncks fixes two newly uncovered regridder bugs that were exposed by 
-   multi-level fields that contain missing values and underwent
-   non-conservative (e.g., bilinear) regridding. The bugs were in
-   threaded code and show up in compiler-specific ways. 
-   The solution is to upgrade to 4.5.3.
-   Thanks to PNNL for first reporting problems.
-
-B. ncap2 now evaluates logical expressions with a method that does
-   not convert the type of the arguments to lesser precision. 
-   This fixes incorrect results that could occur when an argument
-   could not be represented by the lesser precision.
-   The solution is to upgrade to 4.5.3. Thanks to Maxim Petrenko for 
-   reporting this problem, and to Henry Butowsky for fixing it.
-
-C. ncecat version 4.4.9 introduced a problem that could cause it
-   to fail when using --gag mode on a single file. This problem
-   has been fixed. The solution is to upgrade to 4.5.3, or to use
-   versions 4.4.8 and prior if you encounter this problem.
-   Thanks to Huan Wu for reporting this problem.
-
-D. ncatted version 4.5.1 introduced a bug that dumps core when
-   attribute deletion is requested without a specific attribute name,
-   i.e., whenever all attributes are to be deleted. The workaround is
-   to specify the attribute name(s) to be deleted, to use versions
-   4.5.0 and earlier, or to upgrade to 4.5.3. Thanks to Richard Strub
-   for reporting this problem.
+A. ncks -V in (at least) versions 4.5.1--4.5.3 could segfault.
+   NB: This is the "-V" (uppercase) not "-v" (lowercase) option. 
+   The workaround is not to use -V, solution is to upgrade to 4.5.4. 
+   Thanks to Patrick Nichols for reporting the problem.
+
+B. After dimension reduction operations, ncra and ncwa excise the
+   reduced dimensions from the CF "coordinates" attribute, if any.
+   Versions 4.4.9--4.5.3 could, under certain circumstances involving
+   multiple dimensions, retain extra whitespace in "coordinates".
+   A workaround is to dump (ncks --cdl in.nc > out.cdl) then
+   regenerate (ncgen -b out.nc out.cdl) the file.
+   The solution is to upgrade to 4.5.4.
+   Thanks to Richard Strub for reporting the problem.
 
 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.5.3 built/tested with netCDF
-   4.4.0-development (20150818) on top of HDF5 hdf5-1.8.13 with:
+   4.4.0-development (20160101) on top of HDF5 hdf5-1.8.13 with:
 
    cd ~/nco;./configure # Configure mechanism -or-
    cd ~/nco/bld;make dir;make allinone # Old Makefile mechanism
@@ -167,6 +162,7 @@ B. NOT YET FIXED (netCDF4 library bug)
 
    20150922: Confirmed problem reported by Isabelle Dast, reported to Unidata
    20150924: Unidata confirmed problem
+   20151221: Verified problem still exists in netCDF library
 
    Bug tracking: https://www.unidata.ucar.edu/jira/browse/fxm
    More details: http://nco.sf.net/nco.html#ncrename_crd
diff --git a/doc/ChangeLog b/doc/ChangeLog
index c1ba28f..4cdefc5 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,264 @@
+2016-01-07  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.5.4 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4 final changes';git push
+	git tag -a 4.5.4 -m 'Version 4.5.4 new features: ncremap fix ncpdq nfr cap, XML _Unsigned, crv dateline, GSL2';git push --tags
+
+2016-01-04  Charlie Zender  <zender at uci.edu>
+
+	* Change copyright year to 2016
+
+2016-01-04  Henry Butowsky  <henryb at hush.com>
+
+	* Add sum() as synonym for total() in ncap2 aggregate methods
+
+	* ncap2 method ncap_stats_wvariance(var,weight)	conforms wgt to var
+
+2016-01-03  Henry Butowsky  <henryb at hush.com>
+
+	* First-cut of custom method weighted variance for Christine smit v=ncap_stats_wvariance(var,weight)
+
+2016-01-01  Charlie Zender  <zender at uci.edu>
+
+	* Complete ncremap documentation, including limitations
+
+	* ncremap recover gracefully from Tempest failures (false negative return codes)
+
+	* Implement -E and -T for ESMF and TempestRemap options
+
+	* Remove --src/dst_regional switches from ESMF default
+
+	* Change default ESMF interpolation algorithm from bilinear to conserve
+
+2015-12-31  Charlie Zender  <zender at uci.edu>
+
+	* Add ncremap TempestRemap option with -w 'tempest'
+
+	* NCO 4.5.4-beta04 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-beta04 final changes';git push
+	git tag -a 4.5.4-beta04 -m 'Version 4.5.4-beta04 new features: ncremap solidity';git push --tags
+
+	* Barrage of tweaks to give ncremap sensible defaults on non-CSZ machines
+
+	* Add ncremap -M mlt_map_flg toggle switch, clean-up examples, finish documentation
+
+2015-12-30  Charlie Zender  <zender at uci.edu>
+
+	* Support specifying source grid instead of inferring from source file
+
+	* Re-arrange ncremap options again, use -i for in_fl, -s for src_grd
+
+	* Add MODIS L2 coordinate information to usual suspects database
+
+	* Introduce basic background parallelism and PID-based status checking into ncremap
+
+	* Note that inferred ACME grids are unusable by ERWG due to lack of corner information
+
+2015-12-29  Charlie Zender  <zender at uci.edu>
+
+	* Treat variables named wgt_* like coordinates (and gw and msk_*): avoid math when possible
+
+2015-12-28  Charlie Zender  <zender at uci.edu>
+
+	* Restructure ncremap to use -m map_fl and allow stdin
+
+2015-12-24  Charlie Zender  <zender at uci.edu>
+
+	* Improve ncremap documentation in nco.texi
+
+	* Fix mebs formula in nco.texi
+
+2015-12-23  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.5.4-beta03 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-beta03 final changes';git push
+	git tag -a 4.5.4-beta03 -m 'Version 4.5.4-beta03 new features: ncremap in autotools;ncpdq bug;netCDF 4.4.0 tokens';git push --tags
+
+	* Finish minimal ncremap.1 man page
+
+	* Note ncra test #39 is expected to fail due to TODO nco1126
+
+	* Add ncremap script to bin directory in data/Makefile.am, bld/Makefile, man/Makefile.am, man/man1
+
+	* Simplify broken ncpdq handling of dimension reversal list. Change dmn_rvr_rdr from static to dynamic array.
+	Prevent writing past end of dmn_rvr_rdr. Index dmn_rvr_rdr same as dmn_rdr. Fixes Feng Ding's command:
+	ncpdq -O -a StdPressureLev,GeoTrack,GeoXTrack ${DATA}/hdf/AIRS.2014.10.01.202.L2.RetStd.v6.0.11.0.G14275134307.hdf.nc ~/foo.nc
+	Breaks regression test ncpdq #41
+
+2015-12-22  Charlie Zender  <zender at uci.edu>
+
+	* Backward-compatible definitions of new tokens in netCDF 4.4.0 including NC_FORMATX_* tokens and NC_FORMAT_64BIT_[DATA/OFFSET] for CDF5
+
+	* Add XLAT_M, XLONG_M coordinates to regridder database of usual suspects
+
+	* Re-assign some ncremap switches to be more heuristic
+
+	* Add ncremap to documentation
+
+2015-12-21  Charlie Zender  <zender at uci.edu>
+
+	* Compare grid spans and interfaces in single-precision (e.g., to 180.0f, 360.0f) to be more error-tolerant
+
+	* ncremap pass through dbg_lvl >= 3 to ncks, enable user-defined thr_nbr
+
+2015-12-20  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.5.4-beta02 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-beta02 final changes';git push
+	git tag -a 4.5.4-beta02 -m 'Version 4.5.4-beta02 new features: fix nfr lon 180; free nc_string patch';git push --tags
+
+	* Check for lon == -180 not lon == 180 when inferring longitude	grid-type lon_typ
+
+2015-12-18  Charlie Zender  <zender at uci.edu>
+
+	* Use ignore environment to protect comments from PDF documentation (which ignores @c comment sentinels!)
+
+2015-12-17  Charlie Zender  <zender at uci.edu>
+
+	* Free var.val.sngp[:] before freeing var.val.vp in nco_prn.c (patch from Pedro)
+
+2015-12-16  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.5.4-beta01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-beta01 final changes';git push
+	git tag -a 4.5.4-beta01 -m 'Version 4.5.4-beta01 new features: fix nfr cap grd; ncremap';git push --tags
+
+	* Move grid-span check from curvilinear code to work for all grids
+
+	* Restrict inferred rectangular lat boundaries to [-90.0,90.0] when extrapolating from grid centers
+
+	* Propagate 20151214 commit *.g changes into *.[ch]pp files
+
+2015-12-14  Charlie Zender  <zender at uci.edu>
+
+	* Fix typo in AIRS HDF dimension name
+
+2015-12-14  Henry Butowsky  <henryb at hush.com>
+
+	* Fix assign when var is in input but not read during assign action e.g., time=10;
+	  ncap2 -O -v -s 'one_dmn_rec_var=0' in.nc foo.nc;ncks -v one_dmn_rec_var -C -m -H foo.nc
+
+2015-12-08  Charlie Zender  <zender at uci.edu>
+
+	* sld_nco.sh now infers destination grid from -d dst_fl
+
+	* Ignore masked values diagnostic grid span for curvilinear grids
+
+2015-12-07  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.5.4-alpha04 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-alpha04 final changes';git push
+	git tag -a 4.5.4-alpha04 -m 'Version 4.5.4-alpha04 new features: nfr POP CICE, nfr 1D, XML _Unsigned att, ncap2';git push --tags
+
+	* Print XML "_Unsigned" attribute to denote unsigned attribute types as per Aleksandar Jelenak and Ed Armstrong
+
+	* Patches to correctly infer grids for POP, CICE, CLM2 files
+
+	* Allow corners not to be inferred for unstructured grids
+
+	* Define M_LN10 and M_LN2 for Cygwin so PPC compiles. Update M_PI.
+
+2015-12-06  Charlie Zender  <zender at uci.edu>
+
+	* Account for missing values in curvilinear coordinate center and mask grids when diagnosing extrapolation issues and grid span
+
+	* In nco_grd_nfr(), convert input mask values that are missing value to integer zero for output
+
+2015-12-05  Charlie Zender  <zender at uci.edu>
+
+	* Improve nco_grd_mk() and nco_grd_nfr() regression tests, and make them passable, finally
+
+	* Regression tests for ncpdq now work for netCDF4 in.nc by checking answers independent of chunking text
+
+2015-12-04  Henry Butowsky  <henryb at hush.com>
+
+	* Modify where statment such that the assign statment in where body is NOT missing value aware
+
+2015-12-04  Henry Butowsky  <henryb at hush.com>
+
+	* Parser can now cast variables with (): temp($time,lev,$lat,$lon)=0.0; is equivalent to temp[$time,lev,$lat,$lon]=0.0
+
+	* In the conflict between a function call and a cast the function call wins e.g.,
+	tally=three_dmn_var_int.total($time,$lat,$lon) is valid	and total($time,$lat,$lon)=1.0d is invalid
+
+2015-12-01  Charlie Zender  <zender at uci.edu>
+
+	* Allow input masks of any type in nco_grd_nfr() (CICE has tmask as NC_FLOAT) and always convert output to NC_INT
+
+	* Add tmask as usual suspect for mask in nco_grd_nfr()
+
+	* NCO 4.5.4-alpha03 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-alpha03 final changes';git push
+	git tag -a 4.5.4-alpha03 -m 'Version 4.5.4-alpha03 new features: nfr crv dateline swaths';git push --tags
+
+2015-11-29  Charlie Zender  <zender at uci.edu>
+
+	* Restrict grid to real latitudes and to the 360-degree range detected from input cell-centers
+
+	* nco_grd_nfr() sanity-check for extrapolated corners outside [-90.0,90.0], [-180.0,360.0]
+
+2015-11-19  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.5.4-alpha02 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-alpha02 final changes';git push
+	git tag -a 4.5.4-alpha02 -m 'Version 4.5.4-alpha02 new features: crd xcs, skl bug, GSL2';git push --tags
+
+	* Correct whitespace when excising dimension names from "coordinates" attribute	in nco_cnv_cf_cll_mth_add() after dimension reduction operations
+
+2015-11-18  Charlie Zender  <zender at uci.edu>
+
+	* Expose interpolation algorithm to sld_nco.sh with -a (bilinear|patch|neareststod|nearestdtos|conserve)
+
+	* Only pass variable list to ncks in regridding phase of sld_nco.sh
+
+	* Add nTimes and nXtrack to usual suspect list for lat/lon to support OMI L2 data
+
+2015-11-17  Charlie Zender  <zender at uci.edu>
+
+	* Merge Wenshan's patch to accept CICE dimensions TLAT,ULAT,TLONG,ULONG
+
+	* Add latt_bounds, latu_bounds, lont_bounds, lonu_bounds to regrid exclusion list (for CICE) as per Wenshan
+
+	* Initialize lat/lon/col_nm_out in nco_grd_mk() skeleton code (broken in 4.5.3?)
+
+2015-11-12  Charlie Zender  <zender at uci.edu>
+
+	* Remove "l" suffix from NC_LONG integer constants (which are deprecated) so buggy ncgen 4.4.0 can parse in.cdl
+
+2015-11-09  Charlie Zender  <zender at uci.edu>
+
+	* Thoroughly run autoconf to propagate GSL changes
+
+2015-11-08  Charlie Zender  <zender at uci.edu>
+
+	* Add hyai, hybi to in.cdl and prs_dlt example to manual
+
+2015-11-08  Henry Butowsky  <henryb at hush.com>
+
+	* Support GSL library version 2.x. Modify configure.ac, config.h.in. Add tokens:
+          #define NCO_GSL_VERSION = 100 * NCO_GSL_MAJOR_VERSION + NCO_GSL_MINOR_VERSION
+
+	* Downstream GSL mods in fmc_gsl_cls.cc, fmc_gsl_cls.hh
+
+2015-10-30  Charlie Zender  <zender at uci.edu>
+
+	* Add stdin infrastructure for passing regridding file list
+
+	* NCO 4.5.4-alpha01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.5.4-alpha01 final changes';git push
+	git tag -a 4.5.4-alpha01 -m 'Version 4.5.4-alpha01 tag:	100% Geometry';git push --tags
+
+	* Check-for and if found, retain, record dimension property during regridding
+
+2015-10-27  Charlie Zender  <zender at uci.edu>
+
+	* Ensure dim[idx].val.vp is NULL-initialized (and thus not inadvertently free'd) when PRN_DMN_IDX_CRD_VAL is False
+	Fixes GitHub issue #18 reported by Pat Nichols
+
+2015-10-21  Charlie Zender  <zender at uci.edu>
+
+	* Change ncap2 token names to, e.g., NCAP_FLOAT, NCAP_INT, etc to prevent namespace clashes with FLOAT, INT, ... in MSVC windef.h
+
 2015-10-20  Charlie Zender  <zender at uci.edu>
 
 	* NCO 4.5.3 release procedure:
diff --git a/doc/MANIFEST b/doc/MANIFEST
index cad192f..beddcc8 100644
--- a/doc/MANIFEST
+++ b/doc/MANIFEST
@@ -112,6 +112,7 @@ nco/data/ncap2.in	Sample ncap2 input script
 nco/data/ncap2_tst.nco  ncap2 self-printing test script
 nco/data/ncl.ncl	NCL script to compare to NCO scripts for speed
 nco/data/nco_bnch.sh	Old (deprecated) NCO benchmark script
+nco/data/ncremap	ncremap operator
 nco/data/netcdf4.nco	Sample input script for netCDF4-enabled ncap2
 nco/data/obs.cdl 	CDL file to test group broadcasting
 nco/data/psd.nco	Sample ncap2 script that computes particle size distributions
@@ -174,7 +175,6 @@ nco/man/Makefile.in(v)	Autotools-generated Makefile
 nco/man/ncap.1		ncap man page
 nco/man/ncatted.1	ncatted man page
 nco/man/ncbo.1		ncbo man page
-nco/man/ncdiff.1	ncdiff man page
 nco/man/nces.1		nces man page
 nco/man/ncecat.1	ncecat man page
 nco/man/ncflint.1	ncflint man page
@@ -183,6 +183,7 @@ nco/man/nco.1		NCO man page
 nco/man/ncpdq.1		ncpdq man page
 nco/man/ncra.1		ncra man page
 nco/man/ncrcat.1	ncrcat man page
+nco/man/ncremap.1	ncremap man page
 nco/man/ncrename.1	ncrename man page
 nco/man/ncwa.1		ncwa man page
 
diff --git a/doc/TODO b/doc/TODO
index d568b6f..6ef1c49 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -606,9 +606,6 @@ nco1054. nco: ncap2 rgr 11 Casting variable with a single dim of sz=1. works for
 	 ncap2 -O -C -v -s 'defdim("a",1);b[$a]=10;c=b(0:0);' ~/nco/data/in.nc ~/foo.nc
 nco1014. nco: option to eliminate ncap2 intermediate tmp file writing
 	 ncap2 -s 'time=time+999999' ~/nco/data/in.nc
-nco1058. ncap2: allow new variables within where() statement
-	 ncap2 -v -O -s 'valid=0*time;where(time<7) valid=time;' ~/nco/data/in.nc ~/foo.nc # works
-	 ncap2 -v -O -s 'valid=0*time;time2=time;where(time2<7) valid=time;' ~/nco/data/in.nc ~/foo.nc # fails
 nco1059. nco: ncatted keep type same by default when modifying/overwriting attribute
 nco1063. use '--with-nc-config=path' in configure when possible (rich signell idea) 
 nco1065. ncra2.c move input_complete break to precede record loop but remember to close open filehandles
@@ -663,9 +660,6 @@ nco1113. nco: rsp parker norton help srd slowdown issue help 20140718 completely
 nco1114. ncrcat fails when single record dimension is not first dimension
 nco1116. --add_bnds for creating bounds variables
 nco1117. ncks human-readable times
-nco1119. nco: ncap2 RNG works with arrays, fails with scalars (john 20150317)
-      ncap2 -O -s 'defdim("r1",10);data[r1]=10;data=gsl_rng_uniform_int(data);print(data);' ~/nco/data/in.nc ~/foo.nc # works
-      ncap2 -O -s 'data=10;data=gsl_rng_uniform_int(data);print(data);' ~/nco/data/in.nc ~/foo.nc # borken
 nco1120. brendan discussion 20150312 autoconf requires both --enable-netcdf4=no --and enable-netcdf-4=no to get "ENABLE_NETCDF4....... no" and avoid the "configure: Bad news: Simple program does not compile and link with netCDF4 library" message.
 nco1121. ncap2 attribute propagation occurs for re-defined input variables Christine Smit https://sourceforge.net/p/nco/discussion/9829/thread/142457da/?limit=25
 nco1122. cnk slowdown Barry McInnes 3/9
@@ -676,7 +670,11 @@ nco1123. ESGF access
       ncks -M http://esgf-data2.ceda.ac.uk/thredds/dodsC/cmip5.output1.MOHC.HadGEM2-ES.rcp85.mon.ocean.Omon.r1i1p1.uo.20111014.aggregation.1
 nco1124. ncra fix ncra --wgt_nm to work (i.e., correctly normalize) with missing values
 nco1125. ncpdq add option for user-specified scale_factor/add_offset
-nco1126. 
+nco1126. ncra segfault with MSA christine smit regardless of presence of scale_factor, add_offset. appears that ncra does not play well with MSA on record dimension. leads to free() error.
+      ncra -O -d time,1,1 -d time,3,3 ~/christine.nc ~/foo.nc # borken
+      ncra -O -C -v one_dmn_rec_var -d time,0,0 -d time,2,2 ~/nco/data/in.nc ~/foo.nc # borken
+      ncra -O -C -v one_dmn_rec_var -d time,0,0 -d time,1,1 ~/nco/data/in.nc ~/foo.nc # works
+nco1127. 
 qrk
 ************************************************************************
 End ncoXXX TODOs
diff --git a/doc/VERSION b/doc/VERSION
index 4e298cc..0ed2bfe 100644
--- a/doc/VERSION
+++ b/doc/VERSION
@@ -1 +1 @@
-4.5.3
+4.5.4
diff --git a/doc/debian.txt b/doc/debian.txt
index b875d82..311b624 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.5.3
-   First we create a clean source distribution of nco and place it in nco-4.5.3
+   For starters, we wish to create .debs of tagged releases, e.g., nco-4.5.4
+   First we create a clean source distribution of nco and place it in nco-4.5.4
    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.5.3
-/bin/rm nco.tar.gz;tar cvzf nco-4.5.3.tar.gz ./nco-4.5.3/*
-cd ~/nco/nco-4.5.3
-dh_make -e zender at uci.edu -f ../nco-4.5.3.tar.gz
+cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-4.5.4
+/bin/rm nco.tar.gz;tar cvzf nco-4.5.4.tar.gz ./nco-4.5.4/*
+cd ~/nco/nco-4.5.4
+dh_make -e zender at uci.edu -f ../nco-4.5.4.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.5.3.tar.gz
    from previous build
 
    cd ~/nco;/bin/rm *.gz
-   cd ~/nco/nco-4.5.3
+   cd ~/nco/nco-4.5.4
    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.5.3 with X.Y.Z+1
+# tags-query replace 4.5.4 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.5.3-1 # Update changelog (-b forces this version number)
+   cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 4.5.4-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.5.3
+   ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.5.4
 # Upload tarball to SF https://sourceforge.net/projects/nco/files 
-   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.5.3.tar.gz .
+   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.5.4.tar.gz .
 
 7. Ubuntu PPA
 https://help.launchpad.net/Packaging/PPA
-dput NCO nco_4.5.3-2~ppa1_source.changes
+dput NCO nco_4.5.4-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.5.3-1.dpkg-buildpackage.txt
-http://dust.ess.uci.edu/nco/src/nco_4.5.3-1.dsc
-http://dust.ess.uci.edu/nco/src/nco_4.5.3-1_i386.changes
-http://dust.ess.uci.edu/nco/src/nco_4.5.3-1_i386.deb
-http://dust.ess.uci.edu/nco/src/nco_4.5.3.orig.tar.gz
+http://dust.ess.uci.edu/nco/src/nco_4.5.4-1.dpkg-buildpackage.txt
+http://dust.ess.uci.edu/nco/src/nco_4.5.4-1.dsc
+http://dust.ess.uci.edu/nco/src/nco_4.5.4-1_i386.changes
+http://dust.ess.uci.edu/nco/src/nco_4.5.4-1_i386.deb
+http://dust.ess.uci.edu/nco/src/nco_4.5.4.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.5.3 ${DATA}/nco_4.5.3* ${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.5.3-1 -d nco-4.5.3 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.5.3 nco # Export most recent
-tar cvzf ./nco_4.5.3.orig.tar.gz --exclude='nco-4.5.3/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.5.3 
-/bin/rm -rf ${DATA}/nco-4.5.3 # Remove cvs-exported directory
-tar xvzf ./nco_4.5.3.orig.tar.gz # Untar to get directory without excluded files
-mkdir -p ${DATA}/nco-4.5.3/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.5.3/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.5.3/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
+sudo /bin/rm -rf ${DATA}/nco-4.5.4 ${DATA}/nco_4.5.4* ${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.5.4-1 -d nco-4.5.4 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.5.4 nco # Export most recent
+tar cvzf ./nco_4.5.4.orig.tar.gz --exclude='nco-4.5.4/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.5.4 
+/bin/rm -rf ${DATA}/nco-4.5.4 # Remove cvs-exported directory
+tar xvzf ./nco_4.5.4.orig.tar.gz # Untar to get directory without excluded files
+mkdir -p ${DATA}/nco-4.5.4/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.5.4/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.5.4/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.5.3;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
-#cd ${DATA}/nco-4.5.3;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
-cd ${DATA}/nco-4.5.3;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
+#cd ${DATA}/nco-4.5.4;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
+#cd ${DATA}/nco-4.5.4;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
+cd ${DATA}/nco-4.5.4;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
 sudo dpkg --remove nco
-sudo dpkg --install ${DATA}/nco_4.5.3-1_*.deb
+sudo dpkg --install ${DATA}/nco_4.5.4-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.5.3-1_*.deb
-ls -l ${DATA}/nco_4.5.3*
+lintian ${DATA}/nco_4.5.4-1_*.deb
+ls -l ${DATA}/nco_4.5.4*
 m ~/foo.nco
 # Upload Ubuntu (rather than Debian) packages to websites
-scp ${DATA}/nco_4.5.3* dust.ess.uci.edu:/var/www/html/nco/src
-scp ${DATA}/nco_4.5.3* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+scp ${DATA}/nco_4.5.4* dust.ess.uci.edu:/var/www/html/nco/src
+scp ${DATA}/nco_4.5.4* 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.5.3-1_*.changes
+# cd ${DATA};dupload -t mentors nco_4.5.4-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.5.3* # Cleanup prior build
+sudo /bin/rm /var/cache/pbuilder/result/nco_4.5.4* # 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.5.3-1.dsc > ~/foo.nco.pbuilder 2>&1
-cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.5.3-1_*.changes
-lintian /var/cache/pbuilder/result/nco_4.5.3-1_*.deb
+cd ${DATA};DIST=sid sudo pbuilder build nco_4.5.4-1.dsc > ~/foo.nco.pbuilder 2>&1
+cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.5.4-1_*.changes
+lintian /var/cache/pbuilder/result/nco_4.5.4-1_*.deb
 sudo dpkg --remove nco
-sudo dpkg --install /var/cache/pbuilder/result/nco_4.5.3-1_*.deb
+sudo dpkg --install /var/cache/pbuilder/result/nco_4.5.4-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.5.3-1_*.changes
+cd /var/cache/pbuilder/result;dupload -t mentors nco_4.5.4-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.5.3 ${DATA}/nco-4.5.3* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.5.4 ${DATA}/nco-4.5.4* # Cleanup last build
 ${sudo_sng} /bin/rm -r -f \
-${rpm_root}/BUILD/nco-4.5.3 \
-${rpm_root}/RPMS/i386/nco-4.5.3-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.5.3-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.5.3-?.i386.rpm \
-${rpm_root}/SOURCES/nco-4.5.3.tar.gz \
-${rpm_root}/SPECS/nco-4.5.3.spec \
-${rpm_root}/SRPMS/nco-4.5.3-?.src.rpm
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.5.3-1 -d nco-4.5.3 nco # Export based on tag
-${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.5.3.spec
-tar cvzf ./nco-4.5.3.tar.gz --exclude='nco-4.5.3/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.5.3 
-${sudo_sng} /bin/cp ${DATA}/nco-4.5.3.tar.gz ${rpm_root}/SOURCES
+${rpm_root}/BUILD/nco-4.5.4 \
+${rpm_root}/RPMS/i386/nco-4.5.4-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.5.4-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.5.4-?.i386.rpm \
+${rpm_root}/SOURCES/nco-4.5.4.tar.gz \
+${rpm_root}/SPECS/nco-4.5.4.spec \
+${rpm_root}/SRPMS/nco-4.5.4-?.src.rpm
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.5.4-1 -d nco-4.5.4 nco # Export based on tag
+${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.5.4.spec
+tar cvzf ./nco-4.5.4.tar.gz --exclude='nco-4.5.4/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.5.4 
+${sudo_sng} /bin/cp ${DATA}/nco-4.5.4.tar.gz ${rpm_root}/SOURCES
 cd ${rpm_root}/SPECS
-${sudo_sng} rpmbuild -ba --sign nco-4.5.3.spec > ~/foo.nco 2>&1
+${sudo_sng} rpmbuild -ba --sign nco-4.5.4.spec > ~/foo.nco 2>&1
 scp \
-${rpm_root}/RPMS/i386/nco-4.5.3-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.5.3-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.5.3-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.5.3-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.5.4-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.5.4-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.5.4-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.5.4-?.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/RPMS/i386/nco-4.5.3-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.5.3-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.5.3-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.5.3-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.5.4-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.5.4-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.5.4-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.5.4-?.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.5.3 ${DATA}/nco-4.5.3* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.5.4 ${DATA}/nco-4.5.4* # Cleanup last build
 /bin/rm -r -f \
-${rpm_root}/nco-4.5.3-?.src.rpm \
-${rpm_root}/nco-4.5.3.spec \
-${rpm_root}/nco-4.5.3.tar.gz \
-${rpm_root}/*/nco-4.5.3-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.5.3-?.*.rpm \
-${rpm_root}/*/nco-devel-4.5.3-?.*.rpm
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.5.3-1 -d nco-4.5.3 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.5.3 nco # Export most recent and build as 4.5.3-1
-tar cvzf ./nco-4.5.3.tar.gz --exclude='nco-4.5.3/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.5.3 
-/bin/cp ${DATA}/nco-4.5.3.tar.gz ${rpm_root}
+${rpm_root}/nco-4.5.4-?.src.rpm \
+${rpm_root}/nco-4.5.4.spec \
+${rpm_root}/nco-4.5.4.tar.gz \
+${rpm_root}/*/nco-4.5.4-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.5.4-?.*.rpm \
+${rpm_root}/*/nco-devel-4.5.4-?.*.rpm
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.5.4-1 -d nco-4.5.4 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.5.4 nco # Export most recent and build as 4.5.4-1
+tar cvzf ./nco-4.5.4.tar.gz --exclude='nco-4.5.4/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.5.4 
+/bin/cp ${DATA}/nco-4.5.4.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.5.3-?.*.rpm
+rpmlint ${rpm_root}/*/nco-4.5.4-?.*.rpm
 sudo yum remove nco
-sudo yum install ${rpm_root}/*/nco-4.5.3-?.*.rpm
+sudo yum install ${rpm_root}/*/nco-4.5.4-?.*.rpm
 scp \
-${rpm_root}/*/nco-4.5.3-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.5.3-?.*.rpm \
-${rpm_root}/*/nco-devel-4.5.3-?.*.rpm \
-${rpm_root}/nco-4.5.3-?.*.src.rpm \
+${rpm_root}/*/nco-4.5.4-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.5.4-?.*.rpm \
+${rpm_root}/*/nco-devel-4.5.4-?.*.rpm \
+${rpm_root}/nco-4.5.4-?.*.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/*/nco-4.5.3-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.5.3-?.*.rpm \
-${rpm_root}/*/nco-devel-4.5.3-?.*.rpm \
-${rpm_root}/nco-4.5.3-?.*.src.rpm \
+${rpm_root}/*/nco-4.5.4-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.5.4-?.*.rpm \
+${rpm_root}/*/nco-devel-4.5.4-?.*.rpm \
+${rpm_root}/nco-4.5.4-?.*.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 86428b1..e27378a 100644
--- a/doc/index.shtml
+++ b/doc/index.shtml
@@ -8,11 +8,11 @@ file:///home/zender/nco/doc/index.shtml
 
 Usage:
 /usr/bin/scp ~/nco/doc/index.shtml zender,nco at web.sf.net:/home/project-web/nco/htdocs
-scp -p ~/nco/doc/index.shtml dust.ess.uci.edu:/var/www/html/nco
+scp -p ~/nco/doc/index.shtml dust.ess.uci.edu:Sites/nco
 /usr/bin/scp ~/nco/doc/doe.jpg ~/nco/doc/index.shtml ~/nco/doc/logo_cog.png ~/nco/doc/logo_cog_nmr.png ~/nco/doc/logo_nco_stk.png ~/nco/doc/logo_pch.png ~/nco/doc/logo_srl.png ~/nco/doc/nasa.png ~/nco/doc/nco.png ~/nco/doc/nsf.png zender,nco at web.sf.net:/home/project-web/nco/htdocs
-scp -p ~/nco/doc/index.shtml ~/nco/doc/logo_cog.png ~/nco/doc/logo_cog_nmr.png ~/nco/doc/logo_nco_stk.png ~/nco/doc/logo_pch.png ~/nco/doc/logo_srl.png ~/nco/doc/nasa.png ~/nco/doc/nco.png ~/nco/doc/nsf.png dust.ess.uci.edu:/var/www/html/nco
+scp -p ~/nco/doc/index.shtml ~/nco/doc/logo_cog.png ~/nco/doc/logo_cog_nmr.png ~/nco/doc/logo_nco_stk.png ~/nco/doc/logo_pch.png ~/nco/doc/logo_srl.png ~/nco/doc/nasa.png ~/nco/doc/nco.png ~/nco/doc/nsf.png dust.ess.uci.edu:Sites/nco
 scp -p ~/nco/doc/.htaccess zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
-scp -p ~/nco/doc/.htaccess dust.ess.uci.edu:/var/www/html/nco/src
+scp -p ~/nco/doc/.htaccess dust.ess.uci.edu:Sites/nco/src
 -->
 
 <!--
@@ -70,7 +70,7 @@ Try to disable Spammers' machines:
 <p><h1 align="center">Welcome to the netCDF Operator (NCO) Homepage</h1>
 
 <p><h2>
-Current stable NCO version is 4.5.2 released <!--#flastmod file="src/nco-4.5.2.tar.gz"-->
+Current stable NCO version is 4.5.4 released <!--#flastmod file="src/nco-4.5.4.tar.gz"-->
 </h2>
 
 <table border=0 width=100%>
@@ -149,7 +149,10 @@ and
 <h2>Recent Releases & Milestones</h2>
 
 <ul>
-<li>2015 Nov ??: 4.5.4 (<i>In progress</i>)
+<li>2015 Jan ??: 4.5.5 (<i>In progress</i>)
+<li>2015 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, California</li>
+<li>2015 Nov 04: <a href="http://dust.ess.uci.edu/smn/smn_nco_acme_201511.pdf">Talk</a> at DOE ACME, Albuquerque, New Mexico</li>
 <li>2015 Oct 20: 4.5.3 (Curvilinear)
 <li>2015 Sep 06: 4.5.2 (Generate SCRIP)
 <li>2015 Jul 10: 4.5.1 (Stability)
@@ -164,7 +167,7 @@ and
 <li>2014 May 29: 4.4.4 (Stability)
 <li>2014 Apr 02: 4.4.3 (Stability)
 <li>2014 Mar 27: <a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201403.pdf">Talk</a> at NASA GSFC, Greenbelt, Maryland</li>
-<li>2014 Mar 25: <a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201403.pdf">Poster</a> for NASA ESDSWG, Greenbelt, Maryland</li>
+<li>2014 Mar 25: <a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201403.pdf">Poster</a> at NASA ESDSWG, Greenbelt, Maryland</li>
 <li>2014 Feb 20: 4.4.2 (Stability)
 <li>2014 Jan 29: 4.4.1 (Stability)
 <li>2014 Jan 09: 4.4.0 (Stability)
@@ -172,7 +175,7 @@ and
 <li>2013 Dec 02: 4.3.9 (new operator, <tt>nces</tt>)
 <li>2013 Nov 06: 4.3.8 (<tt>ncatted</tt> groups)
 <li>2013 Oct 17: 4.3.7 (HDF4, XML, <tt>ncrename</tt> groups)
-<li>2013 Oct 02: <a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201310.pdf">Poster</a> for NASA ESDSWG, Greenbelt, Maryland</li>
+<li>2013 Oct 02: <a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201310.pdf">Poster</a> at NASA ESDSWG, Greenbelt, Maryland</li>
 <li>2013 Sep 27: 4.3.6 (<tt>--dbl</tt> default, <tt>ncdismember</tt>)
 <li>2013 Sep 20: 4.3.5 (<tt>nces</tt>, <tt>ncra</tt>, <tt>ncrcat</tt> groups)
 <li>2013 Aug 01: 4.3.4 (<tt>ncpdq</tt> bugfix, HDF unpacking)
@@ -243,6 +246,7 @@ techniques for climate data analysis:
 <li><a href="./nco.html#ncpdq"><tt>ncpdq</tt></a> netCDF Permute Dimensions Quickly, Pack Data Quietly (<a href="./nco.html#xmp_ncpdq">examples</a>)</li>
 <li><a href="./nco.html#ncra"><tt>ncra</tt></a> netCDF Record Averager (<a href="./nco.html#xmp_ncra">examples</a>)</li>
 <li><a href="./nco.html#ncrcat"><tt>ncrcat</tt></a> netCDF Record conCATenator (<a href="./nco.html#xmp_ncrcat">examples</a>)</li>
+<li><a href="./nco.html#ncremap"><tt>ncremap</tt></a> netCDF REMAPer (<a href="./nco.html#xmp_ncremap">examples</a>)</li>
 <li><a href="./nco.html#ncrename"><tt>ncrename</tt></a> netCDF RENAMEer (<a href="./nco.html#xmp_ncrename">examples</a>)</li>
 <li><a href="./nco.html#ncwa"><tt>ncwa</tt></a></td> netCDF Weighted Averager (<a href="./nco.html#xmp_ncwa">examples</a>)</li>
 </ul>
@@ -692,16 +696,24 @@ Stable releases receive unique tags and their tarballs are stored
 You may also retrieve the source of tagged versions directly
 <a name="#Source">with <tt>git clone -b 4.5.2 http://github.com/nco/nco.git nco-4.5.2</tt></a>.
 <ul>
-<li><b>NCO 4.5.5</b>: (<i>Future</i>) 
+<li><b>NCO 4.5.6</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?;
 Optimize diskless files?;</li>
-<li><b>NCO 4.5.4</b>: (<i>In Progress, features in-progress or completed include</i>)
+<li><b>NCO 4.5.5</b>: (<i>In Progress, features in-progress or completed include</i>)
 <tt>ncks</tt> regridder uses CF to find coordinates;
-<tt>ncks --xtn</tt> better extensive variable treatment;</li>
-<li><b>NCO 4.5.3</b>: (<i>Current Stable Release</i>)
+<tt>ncks --xtn</tt> better extensive variable treatment;
+<tt>ncpdq</tt> fix permutation with multiple groups;</li>
+<li><b>NCO 4.5.4</b>: (<i>Current Stable Release</i>)
+<tt>ncap2</tt> syntax simplification/fixes;
+<tt>ncks -V</tt> bugfix;
+<tt>ncks</tt> XML <tt>_Unsigned</tt> attribute;
+<tt>ncremap</tt> debuts;
+<tt>ncwa</tt> fix whitespace in <tt>coordinates</tt> attribute;</li>
+<li><b>NCO 4.5.3</b>: 
 <tt>ncatted</tt> fix deletion of all attributes;
 <tt>ncecat</tt> fix <tt>gag</tt> mode;
 <tt>ncks</tt> infers rectangular and curvilinear grids;
@@ -947,12 +959,12 @@ Thanks to Gavin Burris and Kyle Wilcox for documenting build procedures for RHEL
 <h3><a href="http://www.apple.com/macosx/">Mac OS X/Darwin</a></h3>
 <ul>
 <!-- 
-# Mac OS X 10.10 (Yosemite) systems (aerosol):
+# Mac OS X 10.11 (El Capitan) systems (aerosol):
 /usr/bin/scp ~/nco/doc/index.shtml zender,nco at web.sf.net:/home/project-web/nco/htdocs
-cd ~/bin;tar cvzf ${DATA}/nco-4.5.2.macosx.10.10.tar.gz nc*;scp ${DATA}/nco-4.5.2.macosx.10.10.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+cd ~/bin;tar cvzf ${DATA}/nco-4.5.4.macosx.10.11.tar.gz nc*;scp ${DATA}/nco-4.5.4.macosx.10.11.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 -->
 The most up-to-date binaries are probably those in the tarball below. Those unfamiliar with installing executables from tarballs may try the (older) <a href="http://en.wikipedia.org/wiki/Apple_Disk_Image">DMG</a> files (you may need to add <tt>/opt/local/bin</tt> to your executable path to access those operators).
-<li><a href="src/nco-4.5.2.macosx.10.10.tar.gz">nco-4.5.2.macosx.10.10.tar.gz</a> (<!--#fsize file="src/nco-4.5.2.macosx.10.10.tar.gz"-->): Executables MacOSX 10.10-compatible (last updated <!--#flastmod file="src/nco-4.5.2.macosx.10.10.tar.gz"-->). 
+<li><a href="src/nco-4.5.4.macosx.10.11.tar.gz">nco-4.5.4.macosx.10.11.tar.gz</a> (<!--#fsize file="src/nco-4.5.4.macosx.10.11.tar.gz"-->): Executables MacOSX 10.11-compatible (last updated <!--#flastmod file="src/nco-4.5.4.macosx.10.11.tar.gz"-->). 
 (NB: These executables require
   the <a href="http://trac.macosforge.org/projects/macports/wiki">MacPorts</a>
   <a href="#bld_macports">dependencies</a> for <a href="http://svn.macports.org/repository/macports/trunk/dports/science/nco">NCO</a>). Maintained by NCO Project.</li>
diff --git a/doc/man_end.txt b/doc/man_end.txt
index 6a7e3ae..fe9be17 100644
--- a/doc/man_end.txt
+++ b/doc/man_end.txt
@@ -57,6 +57,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/doc/nco.texi b/doc/nco.texi
index cc62a25..4865015 100644
--- a/doc/nco.texi
+++ b/doc/nco.texi
@@ -6,14 +6,13 @@
 @c Hyper-text systems (texi2html, makeinfo) do not require texinfo.tex
 
 @ignore
-
 $Header$
 
 Purpose: TeXInfo documentation for netCDF Operators (NCO)
 
 URL: http://nco.sf.net/nco.texi
 
-Copyright (C) 1995--2015 Charlie Zender
+Copyright (C) 1995--2016 Charlie Zender
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3
 or any later version published by the Free Software Foundation;
@@ -114,12 +113,12 @@ Octave TeXInfo manual shows clean TeXInfo structure
 @setfilename nco.info
 
 @c Define edition, date, ...
- at set nco-edition 4.5.3
- at set doc-edition 4.5.3
- at set copyright-years 1995--2015
+ at set nco-edition 4.5.4
+ at set doc-edition 4.5.4
+ at set copyright-years 1995--2016
 @set update-year 2015
- at set update-date 18 October 2015
- at set update-month October 2015
+ at set update-date 1 January 2016
+ at set update-month January 2016
 
 @settitle @acronym{NCO} @value{nco-edition} User Guide
 
@@ -4819,7 +4818,6 @@ if [ ${chk_nrc} = 'y' ]; then
 	echo "Full NERC compliance-check log for ${fl} in ${cf_out}"
     done
 fi # !nerc
-
 EOF
 chmod 755 ~/ncdismember # Make command executable
 /bin/mv -f ~/ncdismember ~/sh # Store in location on $PATH, e.g., /usr/local/bin
@@ -6042,14 +6040,14 @@ It will not be altered.
 The destination file (e.g., @file{foo.nc}) will be overwritten. 
 Its contents are immaterial. 
 
- at cindex @var{lat_grd}
- at cindex @var{lon_grd}
- at cindex @samp{--rgr lon_grd=@var{lon_grd}}
- at cindex @samp{--rgr lat_grd=@var{lat_grd}}
- at item Grid Types: @var{lat_grd}, @var{lon_grd}
+ at cindex @var{lat_typ}
+ at cindex @var{lon_typ}
+ at cindex @samp{--rgr lon_typ=@var{lon_typ}}
+ at cindex @samp{--rgr lat_typ=@var{lat_typ}}
+ at item Grid Types: @var{lat_typ}, @var{lon_typ}
 The keys that hold the longitude and latitude gridtypes (which
-are, by the way, independent of eachother) are @var{lon_grd} and
- at var{lat_grd}. 
+are, by the way, independent of eachother) are @var{lon_typ} and
+ at var{lat_typ}. 
 The @var{lat_typ} options for global grids are @samp{uni} for
 Uniform, @samp{cap} (or @samp{fv}) for Capped (equivalent to
 @acronym{FV}), and @samp{gss} for Gaussian.  
@@ -6312,7 +6310,7 @@ overwritten (its contents are immaterial).
 @cindex @code{--rgr_map}
 @cindex @var{--map-file}
 @cartouche
-Availability: @command{ncks}@* 
+Availability: @command{ncks}, @command{ncremap}@*
 Short options: None@*
 Long options: 
 @samp{--map @var{map-file}} or @samp{--rgr_map @var{map-file}}@*
@@ -7772,8 +7770,8 @@ The three lossy compression algorithms are Packing
 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 almost unpacks into a (much) smaller dynamic range than
-the floating-point data can represent. 
+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.
@@ -9063,7 +9061,9 @@ Most files originally written in @acronym{HDF} format use the
 This algorithm is incompatible with the netCDF packing algorithm 
 described above.   
 The unpacking component of the @acronym{HDF} algorithm (described
- at uref{http://www.hdfgroup.org/HDF5/doc/UG/UG_frame10Datasets.html, here}) is
+ at uref{http://www.hdfgroup.org/HDF5/doc/UG/UG_frame10Datasets.html, here}
+and in Section 3.10.6 of the HDF4 Users Guide
+ at uref{http://www.hdfgroup.org/release4/doc/UsrGuide_html/UG_PDF.pdf, here}) is
 @tex
 $$
 \rm
@@ -9364,10 +9364,9 @@ $$
 Thus the minimum and maximum absolute values are determined after any weights are applied.
 The mean absolute value of~$\xxx$ (@code{-y mebs}) is 
 $$
-\bar \xxx_{\jjj} = \left( {\sum_{\idx=1}^{\idx=\lmnnbr}
+\bar \xxx_{\jjj} = {\sum_{\idx=1}^{\idx=\lmnnbr}
 \mssflg_{\idx} \mskflg_{\idx} \wgt_{\idx} |\xxx_{\idx}| \over
 \sum_{\idx=1}^{\idx=\lmnnbr} \mssflg_{\idx} \mskflg_{\idx} \wgt_{\idx}} 
-\right)^{2}    
 $$
 
 The square of the mean value of~$\xxx$ (@code{-y sqravg}) is 
@@ -9431,19 +9430,21 @@ Therefore when @code{-y rmssdn} is requested and weights are specified,
 @command{nces} and @command{ncra}, which do not allow weights to be
 specified, always implement the @code{rmssdn} procedure when asked.
 
- at c 20130827: Fedora Core 19 (FC19) broke here with "./nco.texi:6394: Missing dollarsign inserted."
- at c Ubuntu always built nco.texi fine
- at c Adding a dollarsign character right here breaks Ubuntu builds too
- at c Hence I must carefully spell-out the word dollarsign instead
- at c 20130829: Making many smaller TeX environments does not solve problem
- at c 20130910: Using latest texinfo.tex from GNU does not solve problem
- at c 20130910: Karl Berry solved problem by fixing bug in texinfo.tex
- at c Bug was triggered in Fedora by apostrophe in "User's Guide" (manual title)
- at c Bug not present in texinfo.tex version 2008-04-18.10 (used by Ubuntu 13.04)
- at c Bug     present in texinfo.tex version 2013-02-01.11 (used by FC19)
- at c Bug just fixed  in texinfo.tex version 2013-09-11 (committed by Karl)
- at c nco/autobld/texinfo.tex now contains fixed version
- at c Breakage always occurs near here
+ at ignore
+20130827: Fedora Core 19 (FC19) broke here with "./nco.texi:6394: Missing dollarsign inserted."
+Ubuntu always built nco.texi fine
+Adding a dollarsign character right here breaks Ubuntu builds too
+Hence I must carefully spell-out the word dollarsign instead
+20130829: Making many smaller TeX environments does not solve problem
+20130910: Using latest texinfo.tex from GNU does not solve problem
+20130910: Karl Berry solved problem by fixing bug in texinfo.tex
+Bug was triggered in Fedora by apostrophe in "User's Guide" (manual title)
+Bug not present in texinfo.tex version 2008-04-18.10 (used by Ubuntu 13.04)
+Bug     present in texinfo.tex version 2013-02-01.11 (used by FC19)
+Bug just fixed  in texinfo.tex version 2013-09-11 (committed by Karl)
+nco/autobld/texinfo.tex now contains fixed version
+Breakage always occurs near here
+ at end ignore
 The square root of the mean of~$\xxx$ (@code{-y sqrt}) is 
 $$
 \bar \xxx_{\jjj} = \sqrt{ {\sum_{\idx=1}^{\idx=\lmnnbr} \mssflg_{\idx}
@@ -9545,8 +9546,8 @@ The procedure to compute the variance is identical except for the use of
 @command{ncap2} can also compute statistics like standard deviations.
 Brute-force implementation of formulae is one option, e.g.,
 @example
-ncap2 -s 'prs_sfc_sdn=sqrt((prs_sfc-prs_sfc.avg($time)^2).total($time)/($time.size-1))'
-      in.nc out.nc
+ncap2 -s 'prs_sfc_sdn=sqrt((prs_sfc-prs_sfc.avg($time)^2). \
+      total($time)/($time.size-1))' in.nc out.nc
 @end example
 The operation may, of course, be broken into multiple steps in order  
 to archive intermediate quantities, such as the time-anomalies
@@ -9570,26 +9571,39 @@ ncwa -O -v prs_sfc,gw -a lat,lon -w gw in.nc out.nc
 ncbo -O -v prs_sfc,gw in.nc out.nc out.nc
 ncwa -O -y rmssdn -v prs_sfc -a lat,lon -w gw out.nc out.nc
 @end example
-First the appropriately weighted (with @samp{-w gw}) spatial mean values
-are written to the output file.  
-This example includes the use of a weighted variable specified with
- at samp{-w gw}. 
+First the spatially weighted (by @samp{-w gw}) mean values
+are written to the output file, as are the mean weights.
+The initial output file is then overwritten with the gridpoint
+deviations from the spatial mean.
+It is important that the output file after the second line contain
+the original, non-averaged weights.
+This will be the case if the weights are named so that @acronym{NCO}
+treats them like a coordinate (@pxref{CF Conventions}).
+One such name is @code{gw}, and any variable whose name begins with
+ at code{msk_} (for ``mask'') or @code{wgt_} (for ``weight'') will likewise
+be treated as a coordinate, and will be copied (not differenced)
+straight from @file{in.nc} to @file{out.nc} in the second step.
 When using weights to compute standard deviations one must remember to
 include the weights in the initial output files so that they may be used
 again in the final step. 
-The initial output file is then overwritten with the gridpoint
-deviations from the spatial mean.
 Finally the root-mean-square of the appropriately weighted spatial
 deviations is taken.  
 
-The @command{ncap2} solution to the spatially-weighted standard
-deviation problem is 
+No elegant @command{ncap2} solution exists to compute weighted standard
+deviations.  
+Those brave of heart may try to formulate one.
+A general formula should allow weights to have fewer than and variables
+to have more than the minimal spatial dimensions (latitude and
+longitude). 
+ at ignore
+ at c Until 20151229 ncap2 example was FUBAR, and did not handle weights in denominator
 @example
-ncap2 -s 'prs_sfc_sdn=(prs_sfc*gw-prs_sfc*gw.avg($lat,$lon)).rmssdn($lat,$lon)' \
-      in.nc out.nc
+ncap2 -s 'prs_sfc_sdn=((gw*(prs_sfc-((gw*prs_sfc).ttl($lat,$lon)/gw.ttl($lat,$lon)))^2).ttl($lat,$lon)/ \ 
+      gw.ttl()).sqrt()' in.nc out.nc
 @end example
-Be sure to multiply the variable by the weight prior to computing the
+Note how the weight multiplies the variable prior to computing the
 the anomalies and the standard deviation.
+ at end ignore
 
 The procedure to compute the standard deviation of a time-series across
 multiple files involves one extra step since all the input must first be
@@ -10572,7 +10586,8 @@ pack, etc.) the following variables:
 @code{hybm}, 
 @code{lat_bnds}, 
 @code{lon_bnds},
- at code{msk_*}.
+ at code{msk_*},
+ at code{wgt_*}.
 These variables represent Gaussian weights, land/sea masks,
 time fields, hybrid pressure coefficients, and latititude/longitude
 boundaries.
@@ -10584,9 +10599,10 @@ Users usually want @emph{all} grid properties to remain unaltered in the
 output file. 
 To be treated as a grid property, the variable name must @emph{exactly}
 match a name in the above list, or be a coordinate variable. 
-The handling of @code{msk_*} is exceptional in that @emph{any} variable 
-name beginning with the string @code{msk_} is considered to be a
-``mask'' and is thus preserved (not operated on arithmetically).
+Handling of @code{msk_*} and @code{wgt_*} is exceptional in that
+ at emph{any} variable whose name starts with @code{msk_} or @code{wgt_} 
+is considered to be a ``mask'' or a ``weight'' and is thus preserved
+(not operated on when arithmetic can be avoided). 
 
 As of @acronym{NCO} version 4.5.0 (June, 2015), @acronym{NCO} began
 to support behavior required for the @acronym{DOE} @acronym{ACME}
@@ -10875,6 +10891,7 @@ described in any detail in the sections below.
 * ncpdq netCDF Permute Dimensions Quickly::
 * ncra netCDF Record Averager::
 * ncrcat netCDF Record Concatenator::
+* ncremap netCDF Remapper::
 * ncrename netCDF Renamer::
 * ncwa netCDF Weighted Averager::
 @end menu
@@ -11376,6 +11393,9 @@ Without @acronym{LHS} casting, the dimensional ordering of @var{lat_lon}
 would be undefined and, hopefully, @command{ncap2} would print an error
 message. 
 
+ at html
+<a name="prs_mdp"></a> <!-- http://nco.sf.net/nco.html#prs_mdp -->
+ at end html
 Consider now a slightly more complex example.
 In geophysical models, a coordinate system based on 
 a blend of terrain-following and density-following surfaces is 
@@ -11398,6 +11418,52 @@ Manipulating the four fields which define the pressure in a hybrid
 coordinate system is easy with left hand casting.
 
 @html
+<a name="pdel"></a> <!-- http://nco.sf.net/nco.html#pdel -->
+<a name="prs_ntf"></a> <!-- http://nco.sf.net/nco.html#prs_ntf -->
+ at end html
+Finally, we show how to use interface quantities to define midpoint
+quantities.
+In particular, we will define interface pressures using the standard
+ at acronym{CESM} output hybrid coordinate parameters, and then difference
+those interface pressures to obtain the pressure difference between
+the interfaces. 
+The pressure difference is necessary obtain gridcell mass path
+and density (which are midpoint quantities).
+Definitions are as in the above example, with new variables
+ at var{hyai} and @var{hybi} defined at grid cell vertical
+interfaces (rather than midpoints like @var{hyam} and @var{hybm}).
+The approach naturally fits into two lines:
+ at example
+ at verbatim
+cat > ~/pdel.nco << 'EOF'
+*prs_ntf[time,lat,lon,ilev]=P0*hyai+PS*hybi;
+// Requires NCO 4.5.4 and later:
+prs_dlt[time,lat,lon,lev]=prs_ntf(:,:,:,1:$ilev.size-1)-prs_ntf(:,:,:,0:$ilev.size-2);
+// Derived variable that require pressure thickness:
+// Divide by gravity to obtain total mass path in layer aka mpl [kg m-2] 
+mpl=prs_dlt/grv_sfc;
+// Multiply by mass mixing ratio to obtain mass path of constituent
+// Everything up to here works fine. The following line (commented-out) breaks the script.
+// However, it breaks it silently, no error is printed. Please try to fix this.
+mpl_CO2=mpl*mmr_CO2;
+EOF
+ncap2 -O -v -S ~/pdel.nco ~/nco/data/in.nc ~/foo.nc
+ncks -O -C -v prs_dlt ~/foo.nc
+ at end verbatim
+ at end example
+The first line defines the four-dimensional interface pressures 
+ at code{prs_ntf} as a @acronym{RAM} variable because those are not desired 
+in the output file. 
+The second differences each pressure level from the pressure above it
+to obtain the pressure difference. 
+This line employs both left-hand casting and array hyperslabbing.
+However, this syntax only works with @acronym{NCO} version 4.5.4
+(November, 2015) and later because earlier versions require that 
+ at acronym{LHS} and @acronym{RHS} dimension names (not just sizes) match. 
+From the pressure differences, one can obtain the mass path in each
+layer as shown.
+
+ at html
 <a name="ncap_arr"></a> <!-- http://nco.sf.net/nco.html#ncap_arr -->
 @end html
 @node Arrays and hyperslabs, Attributes, Left hand casting, ncap2 netCDF Arithmetic Processor
@@ -15044,14 +15110,15 @@ positive infinity and negative infinity
 return False, contrary to the behavior of all other numbers.
 This is difficult to inuit, yet is the behavior defined for NaN by
 @w{@acronym{IEEE} 754}.
-Using NaN for the missing value in datasets is legal.
-We strongly discourage it.}. 
+Although using NaN for the missing value in datasets is legal, 
+we strongly discourage it.}. 
 One way to work-around this problem is to change @acronym{IEEE} NaNs to
 normal missing values. 
 As of @acronym{NCO} 4.1.0 (March, 2012), @command{ncatted} works with
 NaNs.
 First set the missing value (i.e., the value of the @code{_FillValue}
-attribute) for the variable(s) in question to the @acronym{IEEE} NaN value. 
+attribute) for the variable(s) in question to the @acronym{IEEE} NaN
+value.  
 @example
 ncatted -a _FillValue,,o,f,NaN in.nc
 @end example
@@ -18330,7 +18397,7 @@ weighted mean statistics.
 @html
 <a name="ncrcat"></a> <!-- http://nco.sf.net/nco.html#ncrcat -->
 @end html
- at node ncrcat netCDF Record Concatenator, ncrename netCDF Renamer, 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
@@ -18462,9 +18529,623 @@ ncrcat -d time,6.,54. ??.nc 8506_8906.nc
 
 @page
 @html
+<a name="ncremap"></a> <!-- http://nco.sf.net/nco.html#ncremap -->
+ at end html
+ at node ncremap netCDF Remapper, ncrename netCDF Renamer, ncrcat netCDF Record Concatenator, Reference Manual
+ at section @command{ncremap} netCDF Remapper
+ at cindex remap
+ at cindex regrid
+ at findex ncremap
+
+ at noindent
+SYNTAX
+ at example
+ncremap [-a @var{alg_typ}] [-D @var{dbg_lvl}] [-d @var{dst_fl}] [-E @var{esmf_opt}]
+[-G @var{grd_sng}] [-g @var{grd_dst}] [-I @var{drc_in}] [-i @var{input-file}]
+[-M] [-m @var{map_fl}] [-n @var{nco_opt}] [-O @var{drc_out}] [-o @var{output-file}]
+[-p @var{par_typ}] [-R @var{rgr_opt}] [-s @var{grd_src}] [-T @var{tempest_opt}] [-t @var{thr_nbr}]
+[-v @var{var_lst}[, at dots{}]] [-w @var{wgt_gnr}] [-x @var{xtn_lst}[, at dots{}]] 
+ at end example
+
+ at noindent
+DESCRIPTION
+
+ at command{ncremap} remaps the data file(s) in @var{input-file}, in
+ at var{drc_in}, or piped through standard input, to the grid specified by 
+(in descending order of precedence) @var{map_fl}, @var{grd_dst}, or
+ at var{dst_fl} and stores the result in @var{output-file}(s). 
+ at command{ncremap} was introduced to @acronym{NCO} in version 4.5.4
+(December, 2015). 
+As the newest operator, its interface is still evolving to respond to
+user needs, feedback, and new features.
+ at command{ncremap} orchestrates the regridding features of several
+different programs.
+Under the hood, @acronym{NCO} generates and infers grids, and calls
+external programs to generate the remapping weights that @acronym{NCO}
+then applies.  
+
+ at cindex @command{ncremap}
+ at cindex @command{ESMF_RegridWeightGen}
+ at cindex @command{GenerateOfflineMap}
+ at cindex @command{GenerateOverlapMesh}
+ at cindex @acronym{ERWG}
+ at cindex TempestRemap
+ at cindex @acronym{NCL}
+Unlike the rest of @acronym{NCO}, @command{ncremap} is a shell script,
+not a compiled binary. 
+ at command{ncremap} wraps the underlying regridder (@command{ncks}) and
+external executables to produce a friendly interface to regridding.
+Without any external dependencies, @command{ncremap} applies weights
+from a pre-exisiting mapfile to a source data file to produce a
+regridded dataset. 
+Source and destination datasets may be on any Curvilinear, Rectangular,
+or Unstructured Data (@acronym{CRUD}) grid. 
+ at command{ncremap} will also, when necessary, use external programs
+ at acronym{ESMF}'s @command{ESMF_RegridWeightGen} (@acronym{ERWG}) or 
+TempestRemap's
+ at command{GenerateOverlapMesh}/@command{GenerateOfflineMap}) to
+generate weights and mapfiles.
+ at acronym{ERWG} is distributed in binary format with @acronym{NCL}, which
+many (most?) @acronym{NCO} users already have on their system(s). 
+ at acronym{ERWG} may also be installed from source:
+ at url{https://earthsystemcog.org/projects/esmf/download_last_public}.
+ at command{ncremap} can also generate and utilize mapfiles created by
+TempestRemap, 
+ at url{https://github.com/ClimateGlobalChange/tempestremap}.
+Please contact those projects for support on building and installing
+their software, which makes @command{ncremap} more functional and
+user-friendly.
+
+ at unnumberedsubsec Options specific to @command{ncremap}
+
+The following summarizes features unique to @command{ncremap}.  
+Features common to many operators are described in 
+ at ref{Shared features}. 
+
+ at table @samp
+
+ at html
+<a name="alg_typ"></a> <!-- http://nco.sf.net/nco.html#alg_typ -->
+ at end html
+ at cindex @code{-a @var{alg_typ}}
+ at cindex @var{alg_typ}
+ at item -a @var{alg_typ}
+Specifies the interpolation algorithm for weight-generation for use by
+ at command{ESMF_RegridWeightGen} (@acronym{ERWG}).
+ at command{ncremap} unbundles this algorithm choice from the rest of
+the @acronym{ERWG} invocation syntax because interpolation algorithms
+are more frequently change by users than other @acronym{ERWG} options
+(that can be changed with @samp{-E @var{esmf_opt}}).
+The @var{alg_typ} argument must be one of @acronym{ERWG}'s five
+interpolation algorithms: 
+ at code{bilinear} (default, acceptable abbreviations are @code{bln}), 
+ at code{conserve} (or @code{conservative} or @code{cns}), 
+ at code{nearestdtos} (or @code{nds} or @code{dtos}), 
+ at code{neareststod} (or @code{nds} or @code{stod}), 
+and @code{patch} (or @code{pch} or @code{ptc}). 
+See @acronym{ERWG} documentation
+ at uref{http://www.earthsystemmodeling.org/esmf_releases/public/ESMF_6_3_0rp1/ESMF_refdoc/node3.html#SECTION03020000000000000000, here}
+for detailed descriptions of each algorithm. 
+This option currently has no effect on TempestRemap weight-generation. 
+
+ at html
+<a name="dbg_lvl"></a> <!-- http://nco.sf.net/nco.html#dbg_lvl -->
+ at end html
+ at cindex @code{-D @var{dbg_lvl}}
+ at cindex @var{dbg_lvl}
+ at item -D @var{dbg_lvl}
+Specifies a debugging level similar to the rest of @acronym{NCO}.
+If @math{@var{dbg_lvl} = 1}, @command{ncremap} prints more extensive
+diagnostics of its behavior.
+If @math{@var{dbg_lvl} = 2}, @command{ncremap} prints the commands
+it would execute at any higher or lower debugging level, but does
+not execute these commands.
+If @math{@var{dbg_lvl} > 2}, @command{ncremap} prints the diagnostic
+information, executes all commands, and passes-through the debugging
+level to the regridder (@command{ncks}) for additional diagnostics.
+
+ at html
+<a name="dst_fl"></a> <!-- http://nco.sf.net/nco.html#dst_fl -->
+ at end html
+ at cindex @code{-d @var{dst_fl}}
+ at cindex @var{dst_fl}
+ at item -d @var{dst_fl}
+Specifies a data file on the destination grid.
+Currently @var{dst_fl} must be a data file (not a gridfile,
+ at acronym{SCRIP} or otherwise) from which @acronym{NCO} can
+infer the destination grid. 
+The more coordinate and boundary information and metadata 
+the better @acronym{NCO} will do at inferring the grid.
+If @var{dst_fl} has only cell-center coordinates (and no edges),
+then @acronym{NCO} will guess-at or interpolate the edges.
+If @var{dst_fl} has cell boundaries then @acronym{NCO} will use those.
+ at acronym{NCO} only reads coordinate and grid data and metadata from
+ at var{dst_fl}. 
+ at var{dst_fl} is not modified, and may have read-only permissions.
+
+ at html
+<a name="esmf_opt"></a> <!-- http://nco.sf.net/nco.html#esmf_opt -->
+ at end html
+ at cindex @code{-E @var{esmf_opt}}
+ at cindex @var{esmf_opt}
+ at item -E @var{esmf_opt}
+ at command{ncremap} passes @var{esmf_opt} directly through to
+ at acronym{ERWG}. 
+The user-specified contents of @var{esmf_opt} supercede its default
+contents (@samp{--ignore_unmapped}).
+Sometimes users may wish @acronym{ERWG} to assume regional grids,
+in which case @var{esmf_opt} could be @samp{-r --ignore_upmapped}.
+
+ at html
+<a name="grd_dst"></a> <!-- http://nco.sf.net/nco.html#grd_dst -->
+ at end html
+ at cindex @code{-g @var{grd_dst}}
+ at cindex @var{grd_dst}
+ at item -g @var{grd_dst}
+Specifies the destination gridfile in @acronym{SCRIP} format. 
+ at acronym{NCO} will use @acronym{ERWG} to combine @var{grd_dst} with a
+source gridfile (either inferred from @var{input-file}, supplied with
+ at samp{-s @var{grd_src}}, or generated from @samp{-G @var{grd_sng}}) to
+produce the remapping weights. 
+ at var{grd_dst} is not modified, and may have read-only permissions.
+
+ at html
+<a name="grd_sng"></a> <!-- http://nco.sf.net/nco.html#grd_sng -->
+ at end html
+ at cindex @code{-G @var{grd_sng}}
+ at item -G @var{grd_sng}
+Specifies, with @acronym{NCO} options (@pxref{Grid Generation}), 
+a source gridfile to create.
+(Warning: @acronym{NCO}'s syntax for gridfile generations is ugly
+and needs streamlining. 
+It does, however, work well and produces finer rectangular grids
+than any other software we know of.)
+ at acronym{NCO} creates the gridfile in @acronym{SCRIP} format, and then
+uses @acronym{ERWG} to combine that with the destination grid (either
+inferred from @var{input-file} or supplied with @samp{-g @var{grd_dst}}
+and generate mapping weights.
+This option is seldom used since @acronym{NCO} can infer the input 
+grid directly from @var{input-file}.
+However, there may be no easier way to visually tune the choice of
+destination grid than by rapidly generating candidates with this option
+and inspecting the results.
+
+ at html
+<a name="in_drc"></a> <!-- http://nco.sf.net/nco.html#in_drc -->
+ at end html
+ at cindex @code{-I @var{in_drc}}
+ at cindex @var{in_drc}
+ at item -I @var{in_drc}
+Specifies the input directory, i.e., the directory which contains
+the input file(s).
+If @var{in_fl} is also specified, then the input filepath is
+constructed by appending a slash and the filename to the directory:
+ at samp{@var{in_drc}/@var{in_fl}}.
+Specifying @var{in_drc} without @var{in_fl} causes @command{ncremap}
+to attempt to remap every file in @var{in_drc} that ends with one of
+these suffixes: @code{.nc}, @code{.nc3}, @code{.nc4}, @code{.cdf},
+ at code{.hdf}, @code{.he5}, or @code{.h5}.
+When multiple files are regridded, each output file takes the name
+of the corresponding input file.
+There is no namespace conflict because the input and output files are in
+separate directories. 
+Note that @command{ncremap} could instead take the list of multiple 
+input piped through standard input, e.g., @samp{ls *.nc | ncremap ...}.
+
+ at html
+<a name="in_fl"></a> <!-- http://nco.sf.net/nco.html#in_fl -->
+ at end html
+ at cindex @code{-i @var{in_fl}}
+ at cindex @var{in_fl}
+ at item -i @var{in_fl}
+Specifies the file containing data on the source grid to be remapped
+to the destination grid.
+Currently @var{in_fl} must be a data file (not a gridfile,
+ at acronym{SCRIP} or otherwise).
+When provided with the optional @var{map_fl}, @command{ncremap} 
+only reads data from @var{in_fl} in order to regrid it.
+Without the optional @var{map_fl}, @command{ncremap} must infer the
+source grid from @var{in_fl}, and so must read coordinate and metatdata
+information from @var{in_fl}.  
+In this case the more coordinate and boundary information and metadata,
+the better @acronym{NCO} will do at inferring the source grid.
+If @var{in_fl} has only cell-center coordinates (and no edges),
+then @acronym{NCO} guess at or interpolate the edges.
+If @var{in_fl} has cell boundaries then @acronym{NCO} will use those. 
+ at var{in_fl} is not modified, and may have read-only permissions.
+
+ at html
+<a name="map_fl"></a> <!-- http://nco.sf.net/nco.html#map_fl -->
+ at end html
+ at cindex @code{-m @var{map_fl}}
+ at cindex @var{map_fl}
+ at item -m @var{map_fl}
+Specifies a pre-computed mapfile to remap the source to destination grid.
+The @var{map_fl} must be in @acronym{SCRIP} format, although it may have
+been produced by any application (usually @acronym{ERWG} or
+TempestRemap). 
+If @var{map_fl} has only cell-center coordinates (and no edges),
+then @acronym{NCO} will guess-at or interpolate the edges.
+If @var{map_fl} has cell boundaries then @acronym{NCO} will use those.
+ at var{map_fl} is not modified, and may have read-only permissions.
+
+ at html
+<a name="map_mlt"></a> <!-- http://nco.sf.net/nco.html#map_mlt -->
+ at end html
+ at cindex @code{-M}
+ at item -M
+ at command{ncremap} assumes that every input file is on a unique grid
+unless a source gridfile is specified (with @samp{-s @var{grd_src}})
+or multiple-mapfile generation is explicitly turned-off (with
+ at samp{-M}). 
+The @samp{-M} switch is toggled, it requires and accepts no argument. 
+Toggling @samp{-M} tells @command{ncremap} to generate at most one
+mapfile regardless of the number of input files. 
+If @samp{-M} is not toggled (and neither 
+ at samp{-m @var{map_fl}} nor @samp{-s @var{grd_src}} is invoked)   
+then @command{ncremap} will use @acronym{ERWG} to generate a new mapfile
+for each input file. 
+Generating new mapfiles for each input file is necessary for processing
+batches of data on different grids (e.g., swath-like data), and slow,
+tedious, and unnecessary when batch processing data on the same grids.
+
+ at html
+<a name="nco_opt"></a> <!-- http://nco.sf.net/nco.html#nco_opt -->
+ at end html
+ at cindex @code{-n @var{nco_opt}}
+ at cindex @var{nco_opt}
+ at item -n @var{nco_opt}
+Specifies a string of options to pass-through unaltered to
+ at command{ncks}. 
+ at var{nco_opt} defaults to @samp{-O --no_tmp_fl}.
+
+ at html
+<a name="out_drc"></a> <!-- http://nco.sf.net/nco.html#out_drc -->
+ at end html
+ at cindex @code{-O @var{out_drc}}
+ at cindex @var{out_drc}
+ at item -O @var{out_drc}
+Specifies the output directory, i.e., the directory name to contain 
+the output file(s).
+If @var{out_fl} is also specified, then the output filepath is
+constructed by appending a slash and the filename to the directory:
+ at samp{@var{out_drc}/@var{out_fl}}.
+Specifying @var{out_drc} without @var{out_fl} causes @command{ncremap}
+to name each output file the same as the corresponding input file.
+There is no namespace conflict because the input and output files will
+be in separate directories.
+
+ at html
+<a name="out_fl"></a> <!-- http://nco.sf.net/nco.html#out_fl -->
+ at end html
+ at cindex @code{-o @var{out_fl}}
+ at item -o @var{out_fl}
+Specifies the output filename, i.e., the name of the file to contain
+the data from @var{in_fl} remapped to the destination grid.
+If @var{out_fl} already exists it will be overwritten.
+Specifying @var{out_fl} when there are multiple input files (i.e., from
+using @samp{-I @var{in_drc}} or standard input) generates an error 
+(output files will be named the same as input files).
+
+ at html
+<a name="par_typ"></a> <!-- http://nco.sf.net/nco.html#par_typ -->
+ at end html
+ at cindex @code{-p @var{par_typ}}
+ at cindex @var{par_typ}
+ at item -p @var{par_typ}
+Specifies the parallelism mode desired.
+Parallelism accelerate throughput when regridding multiple files in one 
+ at command{ncremap} invocation.
+Valid types are @samp{bck} (for Background mode), 
+ at samp{mpi} (for @acronym{MPI} mode), and @samp{nil} (for none).
+The default @var{par_typ} is @samp{nil}, which means @command{ncremap} 
+will run in serial mode, and process one file at a time.
+Background and @acronym{MPI} parallelism modes both issue all regridding 
+commands at one time.
+In Background mode these commands are spawned as @acronym{UNIX}
+background processes on the local node.
+Nodes with mutiple cores will take advantage of this and simultaneously
+execute regridding commands.
+In @acronym{MPI} mode these commands are issued round-robin fashion
+to all the compute nodes available to the job.
+Typically both parallel modes scale well with sufficent @acronym{CPU}s
+until I/O contention becomes the bottleneck. 
+Currently there is no way to limit the number of regridding commands 
+spawned in parallel mode, so be sure not to overwhelm your system.
+Furthermore, a naming conflict among intermediate files still exists
+(see Limitations, below) so parallel mode is currently only supported
+when all source files share the same grid.
+
+ at html
+<a name="rgr_opt"></a> <!-- http://nco.sf.net/nco.html#rgr_opt -->
+ at end html
+ at cindex @code{-R @var{rgr_opt}}
+ at cindex @var{rgr_opt}
+ at item -R @var{rgr_opt}
+ at command{ncremap} passes @var{rgr_opt} directly through to the
+regridder.  
+This is useful to customize output grids and metadata.
+The default value is @samp{--rgr lat_nm_out=lat --rgr lon_nm_out=lon},
+i.e., by default @command{ncremap} always names latitude and longitude
+``lat'' and ``lon'', respectively, regardless of their input names.
+
+ at html
+<a name="grd_src"></a> <!-- http://nco.sf.net/nco.html#grd_src -->
+ at end html
+ at cindex @code{-s @var{grd_src}}
+ at cindex @var{grd_src}
+ at item -s @var{grd_src}
+Specifies the source gridfile in @acronym{SCRIP} format. 
+ at acronym{NCO} will use @acronym{ERWG} to combine this with a destination
+gridfile (either inferred from @var{dst_fl}, or generated by supplying a  
+ at samp{-G @var{grd_sng}} option) to generate remapping weights.
+ at var{grd_src} is not modified, and may have read-only permissions.
+One appropriate circumstance to specify @var{grd_src} is when the
+ at var{input-file}(s) do not contain sufficient information for 
+ at acronym{NCO} to infer an accurate or complete source grid.
+(Unfortunately many dataset producers do not record information like
+cell edges/vertices in their datasets. 
+This is problematic for non-rectangular grids.)
+ at acronym{NCO} assumes that @var{grd_src}, when supplied, applies to 
+every @var{input-file}.
+Thus @acronym{NCO} will call @acronym{ERWG} only once, and will use that 
+ at var{map_fl} to regrid every @var{input-file}.
+
+ at html
+<a name="tempest_opt"></a> <!-- http://nco.sf.net/nco.html#tempest_opt -->
+ at end html
+ at cindex @code{-T @var{tempest_opt}}
+ at cindex @var{tempest_opt}
+ at item -T @var{tempest_opt}
+ at command{ncremap} passes @var{tempest_opt} directly through to
+ at command{GenerateOfflineMap} (not to @command{GenerateOverlapMesh}).
+The user-specified contents of @var{tempest_opt} supercede its default
+contents, which are currently empty.
+For example, to cause @command{GenerateOfflineMap} to use a
+ at code{_FillValue} of @math{-1}, pass 
+ at samp{-T "--fillvalue -1.0"} to @command{ncremap}.
+
+ at html
+<a name="thr_nbr"></a> <!-- http://nco.sf.net/nco.html#thr_nbr -->
+ at end html
+ at cindex @code{-t @var{thr_nbr}}
+ at cindex @var{thr_nbr}
+ at item -t @var{thr_nbr}
+Specifies the number of threads used per regridding process
+(@pxref{OpenMP Threading}).
+The @acronym{NCO} regridder scales well up to 8--16 threads.
+
+ at html
+<a name="var_lst"></a> <!-- http://nco.sf.net/nco.html#var_lst -->
+ at end html
+ at cindex @code{-v @var{var_lst}}
+ at cindex @var{var_lst}
+ at item -v @var{var_lst}
+The @samp{-v} option causes @command{ncremap} to regrid only the
+variables in @var{var_lst}. 
+It behaves like subsetting (@pxref{Subsetting Files}) in the rest of
+ at acronym{NCO}.   
+
+ at html
+<a name="wgt_gnr"></a> <!-- http://nco.sf.net/nco.html#wgt_gnr -->
+ at end html
+ at cindex @code{-w @var{wgt_gnr}}
+ at cindex @var{wgt_gnr}
+ at item -w @var{wgt_gnr}
+Specifies the weight-generator to use when a map-file is not provided. 
+The @var{wgt_gnr} argument must be @code{esmf} for @acronym{ESMF}'s
+ at command{ESMF_RegridWeightGen} (@acronym{ERWG}), or 
+ at code{tempest} for TempestRemaps's
+ at command{GenerateOverlapMesh} and @command{GenerateOfflineMap}.
+Specifying @var{wgt_gnr} and supplying (with @samp{-m}) a map-file
+is not permitted (since the weight-generator would not be used).
+
+ at html
+<a name="xtn_lst"></a> <!-- http://nco.sf.net/nco.html#xtn_lst -->
+ at end html
+ at cindex @code{-v @var{xtn_lst}}
+ at cindex @var{xtn_lst}
+ at item -x @var{xtn_lst}
+The @samp{-x} option causes @command{ncremap} to treat the variables in
+ at var{xtn_lst} as @dfn{extensive}, meaning that their value depends on
+the gridcell boundaries. 
+Support for extensive variables during regridding is nascent.
+Currently variables marked as extensive are summed, not regridded.
+ at end table
+
+ at unnumberedsubsec Limitatations to @command{ncremap}
+
+There are three significant limitations to @command{ncremap} that we
+hope to remove in the coming year.
+First, the fields to be regridded must have latitude and longitude as
+the final two dimension in @var{in_fl}. 
+Fields with other dimension orders (e.g., @samp{lat,lev,lon}) will not
+regrid properly. 
+To workaround this limitation for the time-being, please employ 
+ at command{ncpdq} (@pxref{ncpdq netCDF Permute Dimensions Quickly})
+to permute the dimensions before (and un-permute them after) regridding.
+For example
+ at example
+# AIRS Level2 vertical profiles
+ncpdq -a StdPressureLev,GeoTrack,GeoXTrack AIRS_L2.hdf AIRS_L2.ncpdq.nc
+ncremap -i AIRS_L2.ncpdq.nc -d dst_1x1.nc -O ~/rgr
+# MPAS-O fields
+ncpdq -a Time,nVertLevels,maxEdges,MaxEdges2,nEdges,nCells mpas.nc mpas_ncpdq.nc
+ncremap -R "--rgr col_nm=nCells" -i mpas_ncpdq.nc -m mpas120_to_t62.nc -O ~/rgr
+ at end example
+ at noindent
+
+The second limitation is that @command{ncremap} does not yet follow
+ at acronym{CF} conventions to identify coordinate variables.
+Instead, @command{ncremap} uses an internal database of ``usual
+suspects'' to identify latitude and longitude coordinate variables.
+Hence even if the @var{input-file} is completely @acronym{CF}-compliant,
+ at command{ncremap} may not automatically identify the spatial dimensions.
+To workaround this limitation, supply @command{ncremap} with the names
+of the horizontal spatial dimensions 
+ at example
+ncremap -R "--rgr lat_nm=xq --rgr lon_nm=zj" -i in.nc -d dst.nc -O ~/rgr
+ at end example
+ at noindent
+
+The third limitation is that @command{ncremap} currently must read
+weights from a mapfile, it cannot compute weights itself in memory.
+This makes @command{ncremap} an ``offline regridder'' and unnecessarily
+slow compared to a program  an ``integrated regridder'' that computes
+weights and immediately applies them in @acronym{RAM} without any
+map-file.   
+In practice, the difference is most noticeable when the weights are 
+easily computable ``on the fly'', e.g., rectangular-to-rectangular
+mappings. 
+Otherwise the weight-generation takes much more time than the
+weight-application, at which @command{ncremap} is quite fast.
+To workaround this limitation, build @command{ESMF_RegridWeightGen} 
+with parallel capabilities and ask me to enhance @command{ncremap} 
+to call @acronym{ERWG} with the options to exploit those capabilities. 
+
+A side-effect of @command{ncremap} being an offline regridder is that,
+when necessary, it generates intermediate files to store grids and maps.  
+(No intermediate files are generated when the map-file is provided).
+These files are named, by default, 
+ at file{ncremap_tmp_grd_dst.nc},
+ at file{ncremap_tmp_grd_src.nc},   
+ at file{ncremap_tmp_gnr_out.nc},  
+ at file{ncremap_tmp_map_*.nc}, and
+ at file{ncremap_tmp_msh_ovr_*.nc}.
+They are placed in @var{drc_out}, which is the current working directory
+unless otherwise specified.
+Should they proliferate and/or annoy you, locate and/or remove all
+intermediate files under the current directory with 
+ at example
+find . -name 'ncremap_tmp*'
+rm `find . -name 'ncremap_tmp*'`
+ at end example
+ at noindent
+When @command{ncremap} is run in parallel mode, the intermediate files
+can interfere with one-another, and must be uniquely named.
+We have not yet addressed this issue, so parallel mode is supported when 
+all input files are on the same grid, and unsupported otherwise.
+If this limitation affects your workflow, please let us know and we will
+increase the priority of addressing it.
+
+ at noindent
+ at html
+<a name="xmp_ncremap"></a> <!-- http://nco.sf.net/nco.html#xmp_ncremap -->
+ at end html
+EXAMPLES
+
+Regrid input file @file{in.nc} to the spatial grid in file @file{dst.nc}
+and write the output to @file{out.nc}: 
+ at example
+ncremap -i in.nc -d dst.nc -o out.nc
+ncremap -i in.nc -d dst.nc -O regrid
+ncremap -i in.nc -d dst.nc -O regrid -o out.nc
+ncremap -i in.nc -d dst.nc -o regrid/out.nc
+ at end example
+ at noindent
+ at acronym{NCO} infers the destination spatial grid from @file{dst.nc} by
+reading its coordinate variables and @acronym{CF} attributes.
+In the first example, @command{ncremap} places the output in
+ at file{out.nc}.
+In the second example, @command{ncremap} places the output in the
+specified output directory.
+Since no output filename is provided, the output file will be named
+ at file{regrid/in.nc}.
+In the third and fourth examples, the output file is
+ at file{regrid/out.nc}. 
+
+To save time generating weights, use a pre-computed mapfile instead
+ at example
+ncremap -i in.nc  -m map.nc -o out.nc
+ncremap -I drc_in -m map.nc -O regrid
+ at end example
+Supplying the mapfile @var{map_fl} considerably reduces wallclock time. 
+The mapfile file may have been generated by a previous @command{ncremap} 
+invocation. 
+
+To test the remapping workflow, limit regridding to one or a few
+variables instad of remapping the entire file: 
+ at example
+ncremap -v T,Q,FSNT -i in.nc -m map.nc -o out.nc
+ at end example
+Regridding generally scales linearly with the size of data to be
+regridded, so eliminating unnecessary variables produces a snappier
+response.  
+
+Regrid multiple input files with a single mapfile @file{map.nc} 
+and write the output to the @file{regrid} directory:
+ at example
+ncremap -I drc_in -m map.nc -O regrid
+ls drc_in/*.nc | ncremap -m map.nc -O regrid
+ at end example
+ at noindent
+The three ways @acronym{NCO} obtains the destination spatial grid are,
+in decreasing order of precedence, 
+from @var{map_fl} (specified with @samp{-m}), 
+from @var{grd_dst} (specified with @samp{-g}), and
+(inferred) from @var{dst_fl} (specified with @samp{-d}).
+In the first example all likely data files from @var{drc_in} are
+regridded using the same specified mapfile, @var{map_fl} = @file{map.nc}.
+Each output file is written to @var{drc_out} = @file{regrid} with the
+same name as the corresponding input file.
+The second example obtains the input file list from standard input,
+and uses the mapfile and output directory as before.
+
+If multiple input files are on the same grid, yet the mapfile does not
+exist in advance, one can still regrid all the input without suffering
+the time-penalty of generating multiple mapfiles. 
+To do so, one must provide the (known-in-advance) source gridfile or
+toggle the @samp{-M} switch:
+ at example
+ncremap -M -I drc_in -d dst.nc -O regrid
+ls drc_in/*.nc | ncremap -M -d dst.nc -O regrid
+ncremap -I drc_in -s grd_src.nc -d dst.nc -O regrid
+ls drc_in/*.nc | ncremap -s grd_src.nc -d dst.nc -O regrid
+ncremap -I drc_in -s grd_src.nc -g grd_dst.nc -O regrid
+ls drc_in/*.nc | ncremap -s grd_src.nc -g grd_dst.nc -O regrid
+ at end example
+ at noindent
+The first two examples explicitly toggle the multi-map-generation switch
+(with @samp{-M}), so that @command{ncremap} refrains from generating
+multiple mapfiles. 
+In this case the source grid is inferred from the first input file,
+the destination grid is inferred from @file{dst.nc}, and
+ at command{ncremap} uses @acronym{ERWG} to generate a single mapfile and
+uses that to regrid every input file.
+The next four examples are variants on this theme.
+In these cases, the user provides (with @samp{-s grd_src.nc}) the source  
+gridfile, which will be used directly instead of being inferred.
+Any of these styles works well when each input file is known in advance
+to be on the same grid, e.g., model data for successive time periods in
+a simulation. 
+
+The most powerful, time-consuming (yet simultaneously time-saving!)
+feature of @command{ncremap} is its ability to regrid multiple input
+files on unique grids.
+Both the input and output can be on any @acronym{CRUD} grid.
+ at example
+ncremap -I drc_in -d dst.nc -O regrid
+ls drc_in/*.nc | ncremap -d dst.nc -O regrid
+ncremap -I drc_in -g grd_dst.nc -O regrid
+ls drc_in/*.nc | ncremap -g grd_dst.nc -O regrid
+ at end example
+ at noindent
+There is no pre-supplied @var{map_fl} or @var{grd_src} in these
+examples, so @command{ncremap} first infers the output grid from
+ at file{dst.nc} (first two examples), or directly uses the supplied
+gridfile @file{grd_dst} (second two examples), and calls @acronym{ERWG}
+to generate a new mapfile for each input file, whose grid it infers.
+This is necessary when each input file is on a unique grid, e.g.,
+swath-like data from satellite observations or models with time-varying
+grids. 
+These examples require remarkably little input, since @command{ncremap}
+automates most of the work.
+
+ at page
+ at html
 <a name="ncrename"></a> <!-- http://nco.sf.net/nco.html#ncrename -->
 @end html
- at node ncrename netCDF Renamer, ncwa netCDF Weighted Averager, ncrcat netCDF Record Concatenator, Reference Manual
+ at node ncrename netCDF Renamer, ncwa netCDF Weighted Averager, ncremap netCDF Remapper, Reference Manual
 @section @command{ncrename} netCDF Renamer
 @cindex renaming variables
 @cindex renaming groups
@@ -18513,8 +19194,8 @@ whose attributes are to be renamed.
 <a name="bug_nc4_rename"></a> <!-- http://nco.sf.net/nco.html#bug_nc4_rename -->
 @end html
 @cartouche
-Caveat lector: Unforunately from 2007--present (October, 2014) the
-netCDF library (versions 4.0.0--4.3.2) contained bugs or limitations
+Caveat lector: Unforunately from 2007--present (January, 2016) the
+netCDF library (versions 4.0.0--4.4.0-rc5) contained bugs or limitations
 that sometimes prevent @acronym{NCO} from correctly renaming coordinate
 variables, dimensions, and groups in netCDF4 files. 
 (To our knowledge the netCDF library calls for renaming always work
@@ -18746,12 +19427,11 @@ ncrename -O -h -a /g1/lon at units,new_units ~/nco/data/in_grp.nc ~/foo.nc
 ncks -v /g1/lon ~/foo.nc # Shows units and new_units are both gone
 @end verbatim
 @end example
-As of netCDF version 4.3.3.1 (March, 2015) there are no known renaming
-bugs. 
 
 Clearly, renaming dimensions in netCDF4 files is non-trivial.
 The latest chapter in this saga is a netCDF4 bug discovered in
-September, 2015.
+September, 2015, and present in version 4.3.3.1 (and possibly earlier
+versions too).  
 This bug causes @command{ncrename} to create corrupted output files
 when attempting to rename two dimensions simultaneously.
 The workaround is to rename the dimensions sequentially, in two separate  
@@ -18763,8 +19443,6 @@ ncrename -d y,rlat -d x,rlon dayclim_withoutpr.nc dayclim2.nc
 ncdump dayclim2.nc # File is unreadable
 @end verbatim
 @end example
-Yet another netCDF4 bug that causes unintended side-effects with
- at command{ncrename} affects only snapshots from January--February, 2015,
 
 @cindex global attributes
 @cindex group attributes
diff --git a/doc/nco_qt_msvc.shtml b/doc/nco_qt_msvc.shtml
index 9118059..bfbb874 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 2010 (MSVC). 
+This page contains instructions regarding building NCO with the Qt system and with Microsoft Windows Visual Studio 2013 (MSVC). 
 This page is mostly important for developers that want to build NCO from source using Qt or MSVC.
 <br>
 <br>
@@ -33,8 +33,6 @@ This page is mostly important for developers that want to build NCO from source
 <tr>
 </table>
 
-
-
 <a target="_top" href="http://qt.nokia.com/products/">Qt</a> is a cross platform build system. As of NCO 4.2.1, it is possible to build NCO with Qt, in a Linux, Mac OSX or 
 Windows enviroment. NCO can be built either from the Qt IDE, QtCreator, or from the command line. To build NCO with QtCreator, just open the file /qt/nco.pro. 
 To build NCO from the command line, do:
@@ -56,64 +54,34 @@ To build NCO from the command line, do:
 <tr>
 </table>
 
-
-As of NCO 4.2.0, it is possible to build NCO with <a target="_top" href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express">Visual Studio 2010</a>. 
+As of NCO 4.2.0, it is possible to build NCO with <a target="_top" href="https://www.visualstudio.com/en-us">Visual Studio 2013</a>. 
 To build NCO with MSVC, open the file /qt/nco.sln with Visual Studio.
 
-<p>NCO depends on several pre-installed libraries, namely HDF5 (including HDF5 High-Level), netCDF, zlib. The NCO supplied Visual Studio projects assume static builds of these libraries. These are specified by means of the following Windows enviroments variables in the projects:</p>
+NCO depends on several pre-installed libraries, namely: HDF5 (including HDF5 High-Level), netCDF, zlib, szip, Antlr, GSL, Curl, UDUnits, Expat.
+The NCO supplied Visual Studio projects assume static builds of these libraries. 
+These are specified by means of the following Windows environment variables in the projects:
+<br> 
+<br> 
 <tt>LIB_NETCDF</tt>
-<br><tt>LIB_DISPATCH</tt>
-<br><tt>LIB_NETCDF4</tt>
 <br><tt>LIB_HDF5</tt>
 <br><tt>LIB_HDF5_HL</tt>
 <br><tt>LIB_ZLIB</tt>
 <br><tt>LIB_SZIP</tt>
 <br><tt>LIB_ANTLR</tt>
+<br><tt>LIB_GSL</tt>
+<br><tt>LIB_CURL</tt>
+<br><tt>LIB_UDUNITS</tt>
+<br><tt>LIB_EXPAT</tt>
 <br>
 <br>
-Additionnaly, the following environment variable must also be defined for the location of the netCDF header files:
-<br><br><tt>HEADER_NETCDF</tt>
-<br>
-<br>
-
-<table border="0" width="100%">
-  <tr>
-    <td width="100%" bgcolor="#C0C0C0"></td>
-  </tr>
-</table>
-
-
-<h2>netCDF 4.2.0 built with MSVC</h2>
-
-For convenience, we include Microsoft Visual Studio 2010 projects that allow to build all the NCO dependency libraries. The following files have MSVC build projects for:
-<br>
+Additionnaly, the following environment variable must also be defined for the location of the netCDF, UDUnits, GSL and Antlr header files:
+<br><tt>HEADER_NETCDF</tt>
+<br><tt>HEADER_UDUNITS</tt>
+<br><tt>HEADER_GSL</tt>
+<br><tt>HEADER_ANTLR</tt>
 <br>
-
-<table border="1" width="70%" >
-<tr>
-<td><b>Library</b></td><td><b>Description</b></td><td><b>File</b></td><td><b>Size</b></td><td><b>Date</b></td>
-</tr>
-<!-- netCDF -->
-<tr>
-<td><tt>netCDF 4.2.0</tt></td><td>Contains the projects:<br>/libsrc<br>/libdispatch<br>/libsrc4<br>/ncdump</td>
-<td><a href="http://glace.ess.uci.edu/libs/netcdf-4.2.tar.gz">netcdf-4.2.0.tar.gz</a></td><td>1.8MB<br></td><td>June 24, 2012<br></td>
-</tr>
-<!-- HDF5 -->
-<tr>
-<td><tt>HDF5 1.8.5 patch1</tt></td><td>Contains the projects:<br>/hdf5<br>/hdf5_hl<br>/h5tinit<br>/h5libsettings</td>
-<td><a href="http://glace.ess.uci.edu/libs/hdf5-1.8.5.patch1.tar.gz">hdf5-1.8.5.patch1.tar.gz</a></td><td>1.8MB<br></td><td>June 24, 2012<br></td>
-</tr>
-<!-- antlr -->
-<tr>
-<td><tt>antlr-2.7.7</tt></td><td>Contains the projects:<br>/antlr</td>
-<td><a href="http://glace.ess.uci.edu/libs/antlr-2.7.7.tar.gz">antlr-2.7.7.tar.gz</a></td><td>4.5MB<br></td><td>June 24, 2012<br></td>
-</tr>
-
-</table>
 <br>
 
-
-
 <table border="0" width="100%">
   <tr>
     <td width="100%" bgcolor="#C0C0C0"></td>
diff --git a/man/Makefile.am b/man/Makefile.am
index 888c4a8..7f9fd9c 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,4 @@
 # $Header$ -*-makefile-*-
 
-man_MANS = ncap.1 ncap2.1 ncatted.1 ncbo.1 ncdiff.1 ncea.1 nces.1 ncecat.1 ncflint.1 ncks.1 nco.1 ncra.1 ncrename.1 ncpdq.1 ncrcat.1 ncwa.1
+man_MANS = ncap.1 ncap2.1 ncatted.1 ncbo.1 nces.1 ncecat.1 ncflint.1 ncks.1 nco.1 ncra.1 ncremap.1 ncrename.1 ncpdq.1 ncrcat.1 ncwa.1
 EXTRA_DIST = $(man_MANS)
diff --git a/man/Makefile.in b/man/Makefile.in
index c4932ce..e9eb358 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -303,7 +303,7 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-man_MANS = ncap.1 ncap2.1 ncatted.1 ncbo.1 ncdiff.1 ncea.1 nces.1 ncecat.1 ncflint.1 ncks.1 nco.1 ncra.1 ncrename.1 ncpdq.1 ncrcat.1 ncwa.1
+man_MANS = ncap.1 ncap2.1 ncatted.1 ncbo.1 nces.1 ncecat.1 ncflint.1 ncks.1 nco.1 ncra.1 ncremap.1 ncrename.1 ncpdq.1 ncrcat.1 ncwa.1
 EXTRA_DIST = $(man_MANS)
 all: all-am
 
diff --git a/man/ncap.1 b/man/ncap.1
index 46f082b..a21596f 100644
--- a/man/ncap.1
+++ b/man/ncap.1
@@ -108,7 +108,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/man/ncap2.1 b/man/ncap2.1
index bf13033..975b1c0 100644
--- a/man/ncap2.1
+++ b/man/ncap2.1
@@ -112,7 +112,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/man/ncatted.1 b/man/ncatted.1
index 4678823..5eef2ca 100644
--- a/man/ncatted.1
+++ b/man/ncatted.1
@@ -489,7 +489,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2012 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -527,7 +527,6 @@ TeX-intensive portions.
 .BR ncap2 (1), 
 .BR ncatted (1), 
 .BR ncbo (1), 
-.BR ncdiff (1), 
 .BR nces (1), 
 .BR ncecat (1), 
 .BR ncflint (1), 
@@ -536,6 +535,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/man/ncbo.1 b/man/ncbo.1
index 41c5d69..d7ef8c2 100644
--- a/man/ncbo.1
+++ b/man/ncbo.1
@@ -355,7 +355,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/man/ncdiff.1 b/man/ncdiff.1
deleted file mode 100644
index 18bdfb4..0000000
--- a/man/ncdiff.1
+++ /dev/null
@@ -1,387 +0,0 @@
-.TH NCDIFF 1
-.SH NAME
-ncdiff \- netCDF Differencer
-.SH SYNTAX
-ncdiff [\-3] [\-4] [\-6] [\-A] [\-C] [\-c] [\-D 
-dbg_lvl ]
-[\-d 
-.IR dim ,[
-.IR min ][,[
-.IR max ]]]
-[\-F]
-[\-\-glb
-.IR att_name=
-.IR att_val ]]
-[\-h] [\-\-hdr_pad
-.IR sz ]
-[\-L 
-.IR dfl_lvl ] 
-[\-l 
-.IR path ]
-[\-O] [\-p 
-.IR path ]
-[\-R] [\-r] [\-v 
-.IR var [,...]]
-[\-x] 
-.I file_1
-.I file_2
-.I "file_3"
-.SH DESCRIPTION
-.PP
-.B ncdiff
-subtracts variables in 
-.I file_2
-from the corresponding
-variables (those with the same name) in 
-.I file_1
-and stores the
-results in 
-.IR file_3 .
-Variables in 
-.I file_2
-are 
-.I broadcast
-to conform to the
-corresponding variable in 
-.I file_1
-if necessary.  
-Broadcasting a variable means creating data in non-existing dimensions
-from the data in existing dimensions.
-For example, a two dimensional variable in 
-.I file_2
-can be
-subtracted from a four, three, or two (but not one or zero)
-dimensional variable (of the same name) in 
-.BR file_1 .
-This functionality allows the user to compute anomalies from the mean.
-Note that variables in 
-.I file_1
-are
-.I not
-broadcast to conform
-to the dimensions in 
-.IR file_2 .
-Thus, 
-.BR ncdiff ,
-the number of dimensions, or 
-.IR rank ,
-of any
-processed variable in 
-.I file_1
-must be greater than or equal to the
-rank of the same variable in 
-.IR file_2 .
-Furthermore, the size of all dimensions common to both 
-.I file_1
-and
-.I file_2
-must be equal. 
-.PP
-When computing anomalies from the mean it is often the case that
-.I file_2
-was created by applying an averaging operator to a file
-with the same dimensions as 
-.IR file_1 ,
-if not 
-.I file_1
-itself.
-In these cases, creating 
-.I file_2
-with 
-.B ncra
-rather than
-.B ncwa
-will cause the 
-.B ncdiff
-operation to fail.
-For concreteness say the record dimension in 
-.B file_1
-is
-.BR time .
-If 
-.I file_2
-were created by averaging 
-.I file_1
-over the
-.B time
-dimension with the 
-.B ncra
-operator rather than with the
-.B ncwa
-operator, then 
-.I file_2
-will have a 
-.B time
-dimension of size 1 rather than having no 
-.B time
-dimension at all 
-In this case the input files to 
-.BR ncdiff ,
-.I file_1
-and
-.IR file_2 ,
-will have unequally sized 
-.B time
-dimensions which
-causes 
-.B ncdiff
-to fail.
-To prevent this from occuring, use 
-.B ncwa
-to remove the 
-.B time
-dimension from 
-.IR file_2 .
-An example is given below.
-.PP
-.B ncdiff
-will never difference coordinate variables or variables of
-type 
-.B NC_CHAR
-or 
-.BR NC_BYTE .
-This ensures that coordinates like (e.g., latitude and longitude) are
-physically meaningful in the output file, 
-.IR file_3 .
-This behavior is hardcoded.
-.B ncdiff
-applies special rules to some NCAR CSM fields (e.g.,
-.BR ORO ).
-See
-.I "NCAR CSM Conventions
-for a complete description.
-Finally, we note that 
-.B ncflint
-(ncflint netCDF File
-Interpolator) can be also perform file subtraction (as well as
-addition, multiplication and interpolation). 
-.PP
-.SH EXAMPLES
-.PP
-Say files 
-.B 85_0112.nc
-and 
-.B 86_0112.nc
-each contain 12 months
-of data.
-Compute the change in the monthly averages from 1985 to 1986:
-.RS
-ncdiff 86_0112.nc 85_0112.nc 86m85_0112.nc
-.RE
-.PP
-The following examples demonstrate the broadcasting feature of
-.BR ncdiff .
-Say we wish to compute the monthly anomalies of 
-.B T
-from the yearly
-average of 
-.B T
-for the year 1985.
-First we create the 1985 average from the monthly data, which is stored
-with the record dimension 
-.BR time .
-.RS
-ncra 85_0112.nc 85.nc
-.br
-ncwa \-O \-a time 85.nc 85.nc
-.RE
-The second command, 
-.BR ncwa ,
-gets rid of the 
-.B time
-dimension
-of size 1 that 
-.B ncra
-left in 
-.BR 85.nc .
-Now none of the variables in 
-.B 85.nc
-has a 
-.B time
-dimension.
-A quicker way to accomplish this is to use 
-.B ncwa
-from the
-beginning:  
-.RS
-ncwa \-a time 85_0112.nc 85.nc
-.RE
-We are now ready to use 
-.B ncdiff
-to compute the anomalies for 1985:
-.RS
-ncdiff \-v T 85_0112.nc 85.nc t_anm_85_0112.nc
-.RE
-Each of the 12 records in 
-.B t_anm_85_0112.nc
-now contains the
-monthly deviation of 
-.B T
-from the annual mean of 
-.B T
-for each
-gridpoint. 
-.PP
-Say we wish to compute the monthly gridpoint anomalies from the zonal
-annual mean. 
-A 
-.I "zonal mean"
-is a quantity that has been averaged over the
-longitudinal (or 
-.IR x )
-direction.
-First we use 
-.B ncwa
-to average over longitudinal direction
-.BR lon ,
-creating 
-.BR xavg_85.nc ,
-the zonal mean of 
-.BR 85.nc .
-Then we use 
-.B ncdiff
-to subtract the zonal annual means from the
-monthly gridpoint data:
-.RS
-ncwa \-a lon 85.nc xavg_85.nc
-.br
-ncdiff 85_0112.nc xavg_85.nc tx_anm_85_0112.nc
-.RE
-Assuming 
-.B 85_0112.nc
-has dimensions 
-.B time
-and 
-.BR lon ,
-this example only works if 
-.B xavg_85.nc
-has no 
-.B time
-or
-.B lon
-dimension.
-.PP
-As a final example, say we have five years of monthly data (i.e., 60 
-months) stored in 
-.B 8501_8912.nc
-and we wish to create a file
-which contains the twelve month seasonal cycle of the average monthly
-anomaly from the five-year mean of this data. 
-The following method is just one permutation of many which will
-accomplish the same result.
-First use 
-.B ncwa
-to create the file containing the five-year mean:
-.RS
-ncwa \-a time 8501_8912.nc 8589.nc
-.RE
-Next use 
-.B ncdiff
-to create a file containing the difference of
-each month's data from the five-year mean:
-.RS
-ncdiff 8501_8912.nc 8589.nc t_anm_8501_8912.nc
-.RE
-Now use 
-.B ncks
-to group the five January anomalies together in one 
-file, and use 
-.B ncra
-to create the average anomaly for all five
-Januarys. 
-These commands are embedded in a shell loop so they are repeated for all
-twelve months:
-.RS
-foreach idx (01 02 03 04 05 06 07 08 09 10 11 12) 
-.br
-ncks \-F \-d time,,,12 t_anm_8501_8912.nc foo.
-.br
-ncra foo. t_anm_8589_.nc
-.br
-end
-.RE
-Note that 
-.B ncra
-understands the 
-.B stride
-argument so the two
-commands inside the loop may be combined into the single command 
-.RS
-ncra \-F \-d time,,,12 t_anm_8501_8912.nc foo.
-.RE
-Finally, use 
-.B ncrcat
-to concatenate the 12 average monthly anomaly
-files into one twelve-record file which contains the entire seasonal
-cycle of the monthly anomalies:
-.RS
-ncrcat t_anm_8589_??.nc t_anm_8589_0112.nc
-.RE
-
-.\" NB: Append man_end.txt here
-.\" $Header$ -*-nroff-*-
-.\" Purpose: Trailer file for common ending to NCO man pages
-.\" Usage: 
-.\" Append this file to end of NCO man pages immediately after marker
-.\" that says "Append man_end.txt here"
-.SH AUTHOR
-.B NCO
-manual pages written by Charlie Zender and originally formatted by Brian Mays.
-
-.SH "REPORTING BUGS"
-Report bugs to <http://sf.net/bugs/?group_id=3331>.
-
-.SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
-.br
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-.SH "SEE ALSO"
-The full documentation for
-.B NCO
-is maintained as a Texinfo manual called the 
-.B NCO User's Guide.
-Because 
-.B NCO
-is mathematical in nature, the documentation includes TeX-intensive
-portions not viewable on character-based displays. 
-Hence the only complete and authoritative versions of the 
-.B NCO User's Guide 
-are the PDF (recommended), DVI, and Postscript versions at
-<http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,
-and <http://nco.sf.net/nco.ps>, respectively.
-HTML and XML versions
-are available at <http://nco.sf.net/nco.html> and
-<http://nco.sf.net/nco.xml>, respectively.
-
-If the
-.B info
-and
-.B NCO
-programs are properly installed at your site, the command
-.IP
-.B info nco
-.PP
-should give you access to the complete manual, except for the
-TeX-intensive portions.
-
-.BR ncap (1), 
-.BR ncap2 (1), 
-.BR ncatted (1), 
-.BR ncbo (1), 
-.BR nces (1), 
-.BR ncecat (1), 
-.BR ncflint (1), 
-.BR ncks (1), 
-.BR nco (1), 
-.BR ncpdq (1), 
-.BR ncra (1), 
-.BR ncrcat (1), 
-.BR ncrename (1), 
-.BR ncwa (1) 
-
-.SH HOMEPAGE
-The 
-.B NCO
-homepage at <http://nco.sf.net> contains more information.
diff --git a/man/ncea.1 b/man/ncea.1
deleted file mode 100644
index 8e3ac58..0000000
--- a/man/ncea.1
+++ /dev/null
@@ -1,195 +0,0 @@
-.\" $Header$ -*-nroff-*-
-.\" Purpose: ROFF man page for ncea
-.\" Usage:
-.\" nroff -man ~/nco/man/ncea.1 | less
-.TH NCEA 1
-.SH NAME
-ncea \- netCDF Ensemble Averager
-.SH SYNTAX
-ncea [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
-[\-\-cnk_map 
-.IR map ]
-[\-\-cnk_plc 
-.IR plc ]
-[\-\-cnk_scl 
-.IR sz ] [\-D 
-.IR dbg_lvl ]
-[\-d 
-.IR dim ,[
-.IR min ][,[
-.IR max ]]]
-[\-\-dbl|flt] [\-F] [\-G
-.IR gpe_dsc ]
-[\-g  
-.IR grp [,...]]
-[\-\-glb
-.IR att_name=
-.IR att_val ]]
-[\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
-[\-L 
-.IR dfl_lvl ] 
-[\-l 
-.IR path ]
-[\-\-msa] [\-N] [\-n 
-.IR loop ]
-[\-\-no_tmp_fl] [\-\-nsm_sfx
-.IR grp_sfx ]
-[\-O] [\-p 
-.IR path ]
-[\-\-ppc 
-.IR var1 [,
-.IR var2 [,...]]=
-.IR prc ]]
-[\-R] [\-r] [\-\-ram_all] [\-t
-.IR thr_nbr ]
-[\--unn] [\-v 
-.IR var [,...]]
-[\-X 
-.IR box ] 
-[\-x] [\-y 
-.IR op_typ ]
-.I input-files
-.I output-file
-.SH DESCRIPTION
-.PP
-.B ncea
-performs gridpoint averages of variables across an arbitrary
-number (an 
-.IR ensemble )
-of input files, with each file receiving an
-equal weight in the average.
-Each variable in the 
-.I output-file
-will be the same size as the same
-variable in any one of the in the 
-.IR input-files ,
-and all
-.I input-files
-must be the same size. 
-Whereas 
-.B ncra
-only performs averages over the record dimension
-(e.g., time), and weights each record in the record dimension evenly, 
-.B ncea
-averages entire files, and weights each file evenly.
-All dimensions, including the record dimension, are treated identically
-and preserved in the 
-.IR output-file .
-.PP
-The file is the logical unit of organization for the results of many
-scientific studies.
-Often one wishes to generate a file which is the gridpoint average of
-many separate files. 
-This may be to reduce statistical noise by combining the results of a
-large number of experiments, or it may simply be a step in a procedure
-whose goal is to compute anomalies from a mean state. 
-In any case, when one desires to generate a file whose properties are
-the mean of all the input files, then 
-.B ncea
-is the operator to
-use. 
-.B ncea
-assumes coordinate variable are properties common to all of
-the experiments and so does not average them across files.
-Instead, 
-.B ncea
-copies the values of the coordinate variables from
-the first input file to the output file.
-.SH EXAMPLES
-.PP
-Consider a model experiment which generated five realizations of one
-year of data, say 1985.
-You can imagine that the experimenter slightly perturbs the
-initial conditions of the problem before generating each new solution.  
-Assume each file contains all twelve months (a seasonal cycle) of data
-and we want to produce a single file containing the ensemble average
-(mean) seasonal cycle.  
-Here the numeric filename suffix denotes the experiment number
-(\c
-.I not
-the month):
-.RS
-ncea 85_01.nc 85_02.nc 85_03.nc 85_04.nc 85_05.nc 85.nc
-.br
-ncea 85_0[1-5].nc 85.nc
-.br
-ncea \-n 5,2,1 85_01.nc 85.nc
-.RE
-These three commands produce identical answers.
-The output file, 
-.BR 85.nc ,
-is the same size as the inputs files.
-It contains 12 months of data (which might or might not be stored in the
-record dimension, depending on the input files), but each value in the
-output file is the average of the five values in the input files.
-.PP
-In the previous example, the user could have obtained the ensemble
-average values in a particular spatio-temporal region by adding a 
-hyperslab argument to the command, e.g.,
-.RS
-ncea \-d time,0,2 \-d lat,\-23.5,23.5 85_??.nc 85.nc
-.RE
-In this case the output file would contain only three slices of data in
-the 
-.I time
-dimension. 
-These three slices are the average of the first three slices from the
-input files.
-Additionally, only data inside the tropics is included.
-
-.\" NB: Append man_end.txt here
-.\" $Header$ -*-nroff-*-
-.\" Purpose: Trailer file for common ending to NCO man pages
-.\" Usage: 
-.\" Append this file to end of NCO man pages immediately after marker
-.\" that says "Append man_end.txt here"
-.SH AUTHOR
-.B NCO
-manual pages written by Charlie Zender and originally formatted by Brian Mays.
-
-.SH "REPORTING BUGS"
-Report bugs to <http://sf.net/bugs/?group_id=3331>.
-
-.SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
-.br
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-.SH "SEE ALSO"
-The full documentation for
-.B NCO
-is maintained as a Texinfo manual called the 
-.B NCO User's Guide.
-Because 
-.B NCO
-is mathematical in nature, the documentation includes TeX-intensive
-portions not viewable on character-based displays. 
-Hence the only complete and authoritative versions of the 
-.B NCO User's Guide 
-are the PDF (recommended), DVI, and Postscript versions at
-<http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,
-and <http://nco.sf.net/nco.ps>, respectively.
-HTML and XML versions
-are available at <http://nco.sf.net/nco.html> and
-<http://nco.sf.net/nco.xml>, respectively.
-
-If the
-.B info
-and
-.B NCO
-programs are properly installed at your site, the command
-.IP
-.B info nco
-.PP
-should give you access to the complete manual, except for the
-TeX-intensive portions.
-
-.SH HOMEPAGE
-The 
-.B NCO
-homepage at <http://nco.sf.net> contains more information.
diff --git a/man/ncecat.1 b/man/ncecat.1
index 0186266..d7269d6 100644
--- a/man/ncecat.1
+++ b/man/ncecat.1
@@ -141,7 +141,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2012 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -179,7 +179,6 @@ TeX-intensive portions.
 .BR ncap2 (1), 
 .BR ncatted (1), 
 .BR ncbo (1), 
-.BR ncdiff (1), 
 .BR nces (1), 
 .BR ncecat (1), 
 .BR ncflint (1), 
@@ -188,6 +187,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/man/nces.1 b/man/nces.1
index ae5f3cf..561fceb 100644
--- a/man/nces.1
+++ b/man/nces.1
@@ -154,7 +154,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/man/ncflint.1 b/man/ncflint.1
index 9abf473..dba85d9 100644
--- a/man/ncflint.1
+++ b/man/ncflint.1
@@ -191,7 +191,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/man/ncks.1 b/man/ncks.1
index fee2e51..19f96b4 100644
--- a/man/ncks.1
+++ b/man/ncks.1
@@ -623,7 +623,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -661,7 +661,6 @@ TeX-intensive portions.
 .BR ncap2 (1), 
 .BR ncatted (1), 
 .BR ncbo (1), 
-.BR ncdiff (1), 
 .BR nces (1), 
 .BR ncecat (1), 
 .BR ncflint (1), 
@@ -670,6 +669,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/man/nco.1 b/man/nco.1
index b5885f1..479d74a 100644
--- a/man/nco.1
+++ b/man/nco.1
@@ -126,7 +126,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -171,6 +171,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/man/ncpdq.1 b/man/ncpdq.1
index a75641f..0892a21 100644
--- a/man/ncpdq.1
+++ b/man/ncpdq.1
@@ -139,7 +139,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/man/ncra.1 b/man/ncra.1
index 9095ef8..5915adc 100644
--- a/man/ncra.1
+++ b/man/ncra.1
@@ -168,7 +168,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -206,7 +206,6 @@ TeX-intensive portions.
 .BR ncap2 (1), 
 .BR ncatted (1), 
 .BR ncbo (1), 
-.BR ncdiff (1), 
 .BR nces (1), 
 .BR ncecat (1), 
 .BR ncflint (1), 
@@ -215,6 +214,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/man/ncrcat.1 b/man/ncrcat.1
index 301918e..5adfc1b 100644
--- a/man/ncrcat.1
+++ b/man/ncrcat.1
@@ -185,7 +185,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/doc/man_end.txt b/man/ncremap.1
similarity index 59%
copy from doc/man_end.txt
copy to man/ncremap.1
index 6a7e3ae..bcb32bc 100644
--- a/doc/man_end.txt
+++ b/man/ncremap.1
@@ -1,4 +1,69 @@
 .\" $Header$ -*-nroff-*-
+.\" Purpose: ROFF man page for ncremap
+.\" Usage:
+.\" nroff -man ~/nco/man/ncremap.1 | less
+.TH NCREMAP 1
+.SH NAME
+ncremap \- netCDF Renamer
+.SH SYNTAX
+ncremap
+[\-a
+.IR alg_typ ]
+[\-D
+.IR dbg_lvl ] 
+[\-d
+.IR dst_fl ] 
+[\-E
+.IR esmf_opt ] 
+[\-G
+.IR grd_sng ] 
+[\-g
+.IR grd_fl ] 
+[\-I
+.IR in_drc ] 
+[\-i
+.IR in_fl ] 
+[\-M] [\-m
+.IR map_fl ] 
+[\-n
+.IR nco_usr ] 
+[\-O
+.IR out_drc ] 
+[\-o
+.IR output-file ] 
+[\-p
+.IR par_typ ] 
+[\-R
+.IR rgr_opt ] 
+[\-s
+.IR grd_src ] 
+[\-T
+.IR tempest_opt ] 
+[\-t
+.IR thr_nbr ] 
+[\-v
+.IR var_lst ] 
+[\-w
+.IR wgt_gnr ] 
+[\-x
+.IR xtn_var ] 
+
+.SH DESCRIPTION
+.PP
+.B ncremap
+remaps the data in the
+.I input-file
+file(s) to the grid specified by (in descending order of precedence)
+.I map_fl ,
+.I dst_fl, 
+.I grd_dst, or
+.I grd_sng,
+and stores the result(s) in the
+.I output-file
+file(s).
+
+.\" NB: Append man_end.txt here
+.\" $Header$ -*-nroff-*-
 .\" Purpose: Trailer file for common ending to NCO man pages
 .\" Usage: 
 .\" Append this file to end of NCO man pages immediately after marker
@@ -11,7 +76,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2012 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -31,8 +96,8 @@ are the PDF (recommended), DVI, and Postscript versions at
 <http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,
 and <http://nco.sf.net/nco.ps>, respectively.
 HTML and XML versions
-are at <http://nco.sf.net/nco.html> and <http://nco.sf.net/nco.xml>,
-respectively. 
+are available at <http://nco.sf.net/nco.html> and
+<http://nco.sf.net/nco.xml>, respectively.
 
 If the
 .B info
@@ -46,7 +111,7 @@ should give you access to the complete manual, except for the
 TeX-intensive portions.
 
 .BR ncap (1), 
-.BR ncap2 (1),
+.BR ncap2 (1), 
 .BR ncatted (1), 
 .BR ncbo (1), 
 .BR nces (1), 
@@ -57,6 +122,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/man/ncrename.1 b/man/ncrename.1
index 97f50fc..564da46 100644
--- a/man/ncrename.1
+++ b/man/ncrename.1
@@ -208,7 +208,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -246,7 +246,6 @@ TeX-intensive portions.
 .BR ncap2 (1), 
 .BR ncatted (1), 
 .BR ncbo (1), 
-.BR ncdiff (1), 
 .BR nces (1), 
 .BR ncecat (1), 
 .BR ncflint (1), 
@@ -255,6 +254,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/man/ncwa.1 b/man/ncwa.1
index ac4b467..3e637e3 100644
--- a/man/ncwa.1
+++ b/man/ncwa.1
@@ -224,7 +224,7 @@ manual pages written by Charlie Zender and originally formatted by Brian Mays.
 Report bugs to <http://sf.net/bugs/?group_id=3331>.
 
 .SH COPYRIGHT
-Copyright \(co 1995-2015 Charlie Zender
+Copyright \(co 1995-2016 Charlie Zender
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -262,7 +262,6 @@ TeX-intensive portions.
 .BR ncap2 (1), 
 .BR ncatted (1), 
 .BR ncbo (1), 
-.BR ncdiff (1), 
 .BR nces (1), 
 .BR ncecat (1), 
 .BR ncflint (1), 
@@ -271,6 +270,7 @@ TeX-intensive portions.
 .BR ncpdq (1), 
 .BR ncra (1), 
 .BR ncrcat (1), 
+.BR ncremap (1), 
 .BR ncrename (1), 
 .BR ncwa (1) 
 
diff --git a/qt/libnco/libnco.pro b/qt/libnco/libnco.pro
index 8a7b403..0a17640 100644
--- a/qt/libnco/libnco.pro
+++ b/qt/libnco/libnco.pro
@@ -1,129 +1,116 @@
-# template type is library
-TEMPLATE = lib
-# name of library
-TARGET = libnco
-# the library is a static library
-CONFIG += staticlib
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-unix:CONFIG( debug, debug|release ) {
-    # debug
-        DESTDIR = ./debug
-} else {
-    # release
-        DESTDIR = ./release
-}
-
-# netCDF library
-# gcc settings to use C99
-unix {
- DEFINES += HAVE_CONFIG_H
- INCLUDEPATH += ../../
- INCLUDEPATH += /usr/local/include
- INCLUDEPATH += /usr/local
- DEFINES += _BSD_SOURCE
- DEFINES += _POSIX_SOURCE
- LIBS +=
- QMAKE_CFLAGS += -std=c99
-}
-
-# common NCO settings
-include (../nco.pri)
-
-SOURCES += ../../src/nco/nco_getopt.c
-HEADERS += ../../src/nco/nco_getopt.h
-
-# header files
-HEADERS += ../../src/nco/libnco.h \
-../../src/nco/ncap.h \
-../../src/nco/nco.h \
-../../src/nco/nco_att_utl.h \
-../../src/nco/nco_aux.h \
-../../src/nco/nco_bnr.h \
-../../src/nco/nco_cln_utl.h \
-../../src/nco/nco_cnf_dmn.h \
-../../src/nco/nco_cnf_typ.h \
-../../src/nco/nco_cnk.h \
-../../src/nco/nco_cnv_arm.h \
-../../src/nco/nco_cnv_csm.h \
-../../src/nco/nco_ctl.h \
-../../src/nco/nco_dbg.h \
-../../src/nco/nco_dmn_utl.h \
-../../src/nco/nco_fl_utl.h \
-../../src/nco/nco_grp_trv.h \
-../../src/nco/nco_grp_utl.h \
-../../src/nco/nco_lmt.h \
-../../src/nco/nco_lst_utl.h \
-../../src/nco/nco_md5.h \
-../../src/nco/nco_mmr.h \
-../../src/nco/nco_mpi.h \
-../../src/nco/nco_msa.h \
-../../src/nco/nco_mss_val.h \
-../../src/nco/nco_netcdf.h \
-../../src/nco/nco_omp.h \
-../../src/nco/nco_pck.h \
-../../src/nco/nco_ppc.h \
-../../src/nco/nco_prn.h \
-../../src/nco/nco_rec_var.h \
-../../src/nco/nco_rgr.h \
-../../src/nco/nco_rth_flt.h \
-../../src/nco/nco_rth_utl.h \
-../../src/nco/nco_scl_utl.h \
-../../src/nco/nco_scm.h \
-../../src/nco/nco_sld.h \
-../../src/nco/nco_sng_utl.h \
-../../src/nco/nco_srm.h \
-../../src/nco/nco_typ.h \
-../../src/nco/nco_uthash.h \
-../../src/nco/nco_var_avg.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
-
-# source files
-SOURCES += ../../src/nco/nco_att_utl.c \
-../../src/nco/nco_att_utl.c \
-../../src/nco/nco_aux.c \
-../../src/nco/nco_bnr.c \
-../../src/nco/nco_cln_utl.c \
-../../src/nco/nco_cnf_dmn.c \
-../../src/nco/nco_cnf_typ.c \
-../../src/nco/nco_cnk.c \
-../../src/nco/nco_cnv_arm.c \
-../../src/nco/nco_cnv_csm.c \
-../../src/nco/nco_ctl.c \
-../../src/nco/nco_dbg.c \
-../../src/nco/nco_dmn_utl.c \
-../../src/nco/nco_fl_utl.c \
-../../src/nco/nco_grp_trv.c \
-../../src/nco/nco_grp_utl.c \
-../../src/nco/nco_lmt.c \
-../../src/nco/nco_lst_utl.c \
-../../src/nco/nco_md5.c \
-../../src/nco/nco_mmr.c \
-../../src/nco/nco_msa.c \
-../../src/nco/nco_mss_val.c \
-../../src/nco/nco_netcdf.c \
-../../src/nco/nco_omp.c \
-../../src/nco/nco_pck.c \
-../../src/nco/nco_ppc.c \
-../../src/nco/nco_prn.c \
-../../src/nco/nco_rec_var.c \
-../../src/nco/nco_rgr.c \
-../../src/nco/nco_rth_flt.c \
-../../src/nco/nco_rth_utl.c \
-../../src/nco/nco_scl_utl.c \
-../../src/nco/nco_sld.c \
-../../src/nco/nco_scm.c \
-../../src/nco/nco_sng_utl.c \
-../../src/nco/nco_srm.c \
-../../src/nco/nco_var_avg.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
-
+TEMPLATE = lib
+TARGET = libnco
+CONFIG += staticlib
+CONFIG -= qt
+CONFIG += debug_and_release
+
+unix:CONFIG( debug, debug|release ) {
+        DESTDIR = ./debug
+} else {
+        DESTDIR = ./release
+}
+
+unix {
+ DEFINES += HAVE_CONFIG_H
+ INCLUDEPATH += ../../
+ INCLUDEPATH += /usr/local/include
+ INCLUDEPATH += /usr/local
+ DEFINES += _BSD_SOURCE
+ DEFINES += _POSIX_SOURCE
+ LIBS +=
+ QMAKE_CFLAGS += -std=c99
+}
+
+include (../nco.pri)
+
+SOURCES += ../../src/nco/nco_getopt.c
+HEADERS += ../../src/nco/nco_getopt.h
+HEADERS += ../../src/nco/libnco.h \
+../../src/nco/ncap.h \
+../../src/nco/nco.h \
+../../src/nco/nco_att_utl.h \
+../../src/nco/nco_aux.h \
+../../src/nco/nco_bnr.h \
+../../src/nco/nco_cln_utl.h \
+../../src/nco/nco_cnf_dmn.h \
+../../src/nco/nco_cnf_typ.h \
+../../src/nco/nco_cnk.h \
+../../src/nco/nco_cnv_arm.h \
+../../src/nco/nco_cnv_csm.h \
+../../src/nco/nco_ctl.h \
+../../src/nco/nco_dbg.h \
+../../src/nco/nco_dmn_utl.h \
+../../src/nco/nco_fl_utl.h \
+../../src/nco/nco_grp_trv.h \
+../../src/nco/nco_grp_utl.h \
+../../src/nco/nco_lmt.h \
+../../src/nco/nco_lst_utl.h \
+../../src/nco/nco_md5.h \
+../../src/nco/nco_mmr.h \
+../../src/nco/nco_mpi.h \
+../../src/nco/nco_msa.h \
+../../src/nco/nco_mss_val.h \
+../../src/nco/nco_netcdf.h \
+../../src/nco/nco_omp.h \
+../../src/nco/nco_pck.h \
+../../src/nco/nco_ppc.h \
+../../src/nco/nco_prn.h \
+../../src/nco/nco_rec_var.h \
+../../src/nco/nco_rgr.h \
+../../src/nco/nco_rth_flt.h \
+../../src/nco/nco_rth_utl.h \
+../../src/nco/nco_scl_utl.h \
+../../src/nco/nco_scm.h \
+../../src/nco/nco_sld.h \
+../../src/nco/nco_sng_utl.h \
+../../src/nco/nco_srm.h \
+../../src/nco/nco_typ.h \
+../../src/nco/nco_uthash.h \
+../../src/nco/nco_var_avg.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
+
+SOURCES += ../../src/nco/nco_att_utl.c \
+../../src/nco/nco_att_utl.c \
+../../src/nco/nco_aux.c \
+../../src/nco/nco_bnr.c \
+../../src/nco/nco_cln_utl.c \
+../../src/nco/nco_cnf_dmn.c \
+../../src/nco/nco_cnf_typ.c \
+../../src/nco/nco_cnk.c \
+../../src/nco/nco_cnv_arm.c \
+../../src/nco/nco_cnv_csm.c \
+../../src/nco/nco_ctl.c \
+../../src/nco/nco_dbg.c \
+../../src/nco/nco_dmn_utl.c \
+../../src/nco/nco_fl_utl.c \
+../../src/nco/nco_grp_trv.c \
+../../src/nco/nco_grp_utl.c \
+../../src/nco/nco_lmt.c \
+../../src/nco/nco_lst_utl.c \
+../../src/nco/nco_md5.c \
+../../src/nco/nco_mmr.c \
+../../src/nco/nco_msa.c \
+../../src/nco/nco_mss_val.c \
+../../src/nco/nco_netcdf.c \
+../../src/nco/nco_omp.c \
+../../src/nco/nco_pck.c \
+../../src/nco/nco_ppc.c \
+../../src/nco/nco_prn.c \
+../../src/nco/nco_rec_var.c \
+../../src/nco/nco_rgr.c \
+../../src/nco/nco_rth_flt.c \
+../../src/nco/nco_rth_utl.c \
+../../src/nco/nco_scl_utl.c \
+../../src/nco/nco_sld.c \
+../../src/nco/nco_scm.c \
+../../src/nco/nco_sng_utl.c \
+../../src/nco/nco_srm.c \
+../../src/nco/nco_var_avg.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
+
diff --git a/qt/libnco/libnco.vcxproj b/qt/libnco/libnco.vcxproj
index aece5d5..d19abb4 100644
--- a/qt/libnco/libnco.vcxproj
+++ b/qt/libnco/libnco.vcxproj
@@ -1,123 +1,122 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{B1435D13-6445-362C-A7A3-8BA4A2AA25D1}</ProjectGuid>
+    <ProjectGuid>{E8AACE7E-513A-3A65-B16B-0661B6089A03}</ProjectGuid>
     <RootNamespace>libnco</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>libnco</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>libnco</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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'">libnco</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libnco</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
     <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>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
-    <Link>
-      <IgnoreImportLibrary>true</IgnoreImportLibrary>
-    </Link>
+    <Lib>
+      <OutputFile>$(OutDir)\libnco.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
     <Midl>
       <DefaultCharType>Unsigned</DefaultCharType>
       <EnableErrorChecks>None</EnableErrorChecks>
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ResourceOutputFileName>$(OutDir)\$(InputName).res</ResourceOutputFileName>
+      <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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
-    <Link>
-      <IgnoreImportLibrary>true</IgnoreImportLibrary>
-    </Link>
+    <Lib>
+      <OutputFile>$(OutDir)\libnco.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
     <Midl>
       <DefaultCharType>Unsigned</DefaultCharType>
       <EnableErrorChecks>None</EnableErrorChecks>
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ResourceOutputFileName>$(OutDir)\$(InputName).res</ResourceOutputFileName>
+      <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>
   <ItemGroup>
@@ -205,6 +204,7 @@
     <ClInclude Include="..\..\src\nco\nco_sng_utl.h" />
     <ClInclude Include="..\..\src\nco\nco_srm.h" />
     <ClInclude Include="..\..\src\nco\nco_typ.h" />
+    <ClInclude Include="..\..\src\nco\nco_uthash.h" />
     <ClInclude Include="..\..\src\nco\nco_var_avg.h" />
     <ClInclude Include="..\..\src\nco\nco_var_lst.h" />
     <ClInclude Include="..\..\src\nco\nco_var_rth.h" />
@@ -215,7 +215,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/libnco_c++/libnco_c++.pro b/qt/libnco_c++/libnco_c++.pro
index fae36e3..0eb5834 100644
--- a/qt/libnco_c++/libnco_c++.pro
+++ b/qt/libnco_c++/libnco_c++.pro
@@ -1,60 +1,49 @@
-# template type is library
-TEMPLATE = lib
-# name of library
-TARGET = libnco_c++
-# the library is a static library
-CONFIG += staticlib
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-INCLUDEPATH += ../../src/nco_c++
-
-
-#nco_c++ library
-unix:CONFIG( debug, debug|release ) {
-    # debug
-        DESTDIR = ./debug
-} else {
-    # release
-        DESTDIR = ./release
-}
-
-unix {
- INCLUDEPATH += /usr/local/include
- INCLUDEPATH += /usr/local
- #RHEL
- INCLUDEPATH += /SNS/users/pvicente/libs/install/netcdf-4.3.1-rc2/include
- INCLUDEPATH += /SNS/users/pvicente/libs/install/udunits-2.1.24/include
-}
-win32 {
- INCLUDEPATH += $(HEADER_NETCDF) 
- DEFINES += _CRT_SECURE_NO_WARNINGS
- DEFINES += _CRT_NONSTDC_NO_DEPRECATE
- 
- # netCDF assumed in Windows build
- DEFINES += ENABLE_NETCDF4
- DEFINES += HAVE_NETCDF4_H
- DEFINES += NEED_STRCASECMP
- DEFINES += NEED_STRCASESTR
- # gsl
- INCLUDEPATH += $(HEADER_GSL)
- DEFINES += ENABLE_GSL
-}
-
-# header files
-HEADERS += ../../src/nco_c++/libnco_c++.hh \
-../../src/nco_c++/nco_dmn.hh \
-../../src/nco_c++/nco_hgh.hh \
-../../src/nco_c++/nco_var.hh \
-../../src/nco_c++/nco_att.hh \
-../../src/nco_c++/nco_fl.hh \
-../../src/nco_c++/nco_utl.hh 
-
-# source files
-SOURCES += ../../src/nco_c++/nco_att.cc \
-../../src/nco_c++/nco_dmn.cc \
-../../src/nco_c++/nco_fl.cc \
-../../src/nco_c++/nco_hgh.cc \
-../../src/nco_c++/nco_utl.cc \
-../../src/nco_c++/nco_var.cc
+TEMPLATE = lib
+TARGET = libnco_c++
+CONFIG += console 
+CONFIG += static
+CONFIG -= qt
+CONFIG += debug_and_release
+
+INCLUDEPATH += ../../src/nco_c++
+
+unix:CONFIG( debug, debug|release ) {
+        DESTDIR = ./debug
+} else {
+        DESTDIR = ./release
+}
+
+unix {
+ INCLUDEPATH += /usr/local/include
+ INCLUDEPATH += /usr/local
+}
+win32 {
+ QMAKE_CFLAGS_RELEASE += /MT
+ QMAKE_CXXFLAGS_RELEASE += /MT
+ QMAKE_CFLAGS_DEBUG += /MTd
+ QMAKE_CXXFLAGS_DEBUG += /MTd
+ DEFINES += _CRT_SECURE_NO_WARNINGS
+ DEFINES += _CRT_NONSTDC_NO_DEPRECATE
+ DEFINES += ENABLE_NETCDF4
+ DEFINES += HAVE_NETCDF4_H
+ DEFINES += ENABLE_GSL
+ DEFINES += ENABLE_UDUNITS
+ DEFINES += HAVE_UDUNITS2_H
+ INCLUDEPATH += $(HEADER_NETCDF) 
+ INCLUDEPATH += $(HEADER_GSL)
+}
+
+HEADERS += ../../src/nco_c++/libnco_c++.hh \
+../../src/nco_c++/nco_dmn.hh \
+../../src/nco_c++/nco_hgh.hh \
+../../src/nco_c++/nco_var.hh \
+../../src/nco_c++/nco_att.hh \
+../../src/nco_c++/nco_fl.hh \
+../../src/nco_c++/nco_utl.hh 
+
+SOURCES += ../../src/nco_c++/nco_att.cc \
+../../src/nco_c++/nco_dmn.cc \
+../../src/nco_c++/nco_fl.cc \
+../../src/nco_c++/nco_hgh.cc \
+../../src/nco_c++/nco_utl.cc \
+../../src/nco_c++/nco_var.cc
diff --git a/qt/libnco_c++/libnco_c++.vcxproj b/qt/libnco_c++/libnco_c++.vcxproj
index 6d32ced..bd53fbf 100644
--- a/qt/libnco_c++/libnco_c++.vcxproj
+++ b/qt/libnco_c++/libnco_c++.vcxproj
@@ -1,123 +1,120 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{2B0DD292-1A49-3877-89E3-7F8E519129B4}</ProjectGuid>
+    <ProjectGuid>{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}</ProjectGuid>
     <RootNamespace>libnco_c++</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>libnco_c++</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>StaticLibrary</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>libnco_c++</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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'">libnco_c++</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">libnco_c++</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
     <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>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>..\..\src\nco_c++;$(HEADER_NETCDF);$(HEADER_GSL);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASESTR;ENABLE_GSL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
-    <Link>
-      <IgnoreImportLibrary>true</IgnoreImportLibrary>
-    </Link>
+    <Lib>
+      <OutputFile>$(OutDir)\libnco_c++.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
     <Midl>
       <DefaultCharType>Unsigned</DefaultCharType>
       <EnableErrorChecks>None</EnableErrorChecks>
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ResourceOutputFileName>$(OutDir)\$(InputName).res</ResourceOutputFileName>
+      <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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"..\..\src\nco_c++";"$(HEADER_NETCDF)";"$(HEADER_GSL)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
-    <Link>
-      <IgnoreImportLibrary>true</IgnoreImportLibrary>
-    </Link>
+    <Lib>
+      <OutputFile>$(OutDir)\libnco_c++.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
     <Midl>
       <DefaultCharType>Unsigned</DefaultCharType>
       <EnableErrorChecks>None</EnableErrorChecks>
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ResourceOutputFileName>$(OutDir)\$(InputName).res</ResourceOutputFileName>
+      <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>
   <ItemGroup>
@@ -141,7 +138,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncap2/ncap2.pro b/qt/ncap2/ncap2.pro
index 36939a5..2ee0ec8 100644
--- a/qt/ncap2/ncap2.pro
+++ b/qt/ncap2/ncap2.pro
@@ -1,92 +1,70 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncap2
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-        win32:LIBS += $(LIB_ANTLR) 
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-        win32:LIBS += $(LIB_ANTLR_REL)
-}
-
-# library dependencies
-unix {
- #INCLUDEPATH += /usr/local/include
- #INCLUDEPATH += /usr/local
- INCLUDEPATH += /home/pvicente/install/netcdf-c-4.3.1.1/include
- LIBS += -L/home/pvicente/install/netcdf-c-4.3.1.1/lib -lnetcdf
- LIBS += -lhdf5_hl -lhdf5 -lgsl -lgslcblas -lm
- LIBS += -L/usr/lib/x86_64-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -lz -ludunits2 -lexpat 
- LIBS += -lantlr
-
- #RHEL
- INCLUDEPATH += /SNS/users/pvicente/libs/install/netcdf-4.3.1-rc2/include
- INCLUDEPATH += /SNS/users/pvicente/libs/install/udunits-2.1.24/include
- LIBS += -L/SNS/users/pvicente/libs/install/netcdf-4.3.1-rc2/lib
- LIBS += -L/SNS/users/pvicente/libs/install/udunits-2.1.24/lib
-}
-
-# common NCO settings
-include (../nco.pri)
-
-win32 {
- INCLUDEPATH += $(HEADER_ANTLR)
-}
-
-# SOURCES
-# HEADERS
-
-INCLUDEPATH += ../../src/nco
-INCLUDEPATH += ../../src/nco++
-
-
-HEADERS   = ../../src/nco++/fmc_all_cls.hh \
-../../src/nco++/fmc_cls.hh \
-../../src/nco++/Invoke.hh \
-../../src/nco++/fmc_cls.hh \
-../../src/nco++/libnco++.hh \
-../../src/nco++/fmc_cls.hh \
-../../src/nco++/map_srt_tmp.hh \
-../../src/nco++/ncap2.hh \
-../../src/nco++/ncap2_utl.hh \
-../../src/nco++/ncap2_utl.hh \
-../../src/nco++/NcapVar.hh \
-../../src/nco++/NcapVarVector.hh  \
-../../src/nco++/NcapVector.hh \
-../../src/nco++/ncoEnumTokenTypes.hpp \
-../../src/nco++/ncoTree.hpp \
-../../src/nco++/prs_cls.hh \
-../../src/nco++/sdo_utl.hh \
-../../src/nco++/sym_cls.hh \
-../../src/nco++/sdo_utl.hh \
-../../src/nco++/VarOp.hh \
-../../src/nco++/vtl_cls.hh \
-../../src/nco++/fmc_gsl_cls.hh \
-../../src/nco++/nco_gsl.h
-
-SOURCES   = ../../src/nco++/Invoke.cc \
-../../src/nco++/ncap2.cc \
-../../src/nco++/ncap2_utl.cc \
-../../src/nco++/sdo_utl.cc \
-../../src/nco++/sym_cls.cc \
-../../src/nco++/fmc_cls.cc \
-../../src/nco++/fmc_all_cls.cc \
-../../src/nco++/fmc_gsl_cls.cc \
-../../src/nco++/NcapVar.cc \
-../../src/nco++/NcapVarVector.cc \
-../../src/nco++/ncoLexer.cpp \
-../../src/nco++/ncoParser.cpp \
-../../src/nco++/ncoTree.cpp \
-../../src/nco++/prs_cls.cc \
-../../src/nco++/nco_gsl.c
-
+TEMPLATE = app
+TARGET = ncap2
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+        win32:LIBS += $(LIB_ANTLR) 
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+        win32:LIBS += $(LIB_ANTLR_REL)
+}
+
+unix {
+ LIBS += -lhdf5_hl -lhdf5 -lgsl -lgslcblas -lnetcdf -lm
+ LIBS += -L/usr/lib/x86_64-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -lz -ludunits2 -lexpat 
+ LIBS += -lantlr
+}
+
+include (../nco.pri)
+
+win32 {
+ INCLUDEPATH += $(HEADER_ANTLR)
+}
+
+INCLUDEPATH += ../../src/nco
+INCLUDEPATH += ../../src/nco++
+
+HEADERS   = ../../src/nco++/fmc_all_cls.hh \
+../../src/nco++/fmc_cls.hh \
+../../src/nco++/Invoke.hh \
+../../src/nco++/fmc_cls.hh \
+../../src/nco++/libnco++.hh \
+../../src/nco++/fmc_cls.hh \
+../../src/nco++/map_srt_tmp.hh \
+../../src/nco++/ncap2.hh \
+../../src/nco++/ncap2_utl.hh \
+../../src/nco++/ncap2_utl.hh \
+../../src/nco++/NcapVar.hh \
+../../src/nco++/NcapVarVector.hh  \
+../../src/nco++/NcapVector.hh \
+../../src/nco++/ncoEnumTokenTypes.hpp \
+../../src/nco++/ncoTree.hpp \
+../../src/nco++/prs_cls.hh \
+../../src/nco++/sdo_utl.hh \
+../../src/nco++/sym_cls.hh \
+../../src/nco++/sdo_utl.hh \
+../../src/nco++/VarOp.hh \
+../../src/nco++/vtl_cls.hh \
+../../src/nco++/fmc_gsl_cls.hh \
+../../src/nco++/nco_gsl.h
+
+SOURCES   = ../../src/nco++/Invoke.cc \
+../../src/nco++/ncap2.cc \
+../../src/nco++/ncap2_utl.cc \
+../../src/nco++/sdo_utl.cc \
+../../src/nco++/sym_cls.cc \
+../../src/nco++/fmc_cls.cc \
+../../src/nco++/fmc_all_cls.cc \
+../../src/nco++/fmc_gsl_cls.cc \
+../../src/nco++/NcapVar.cc \
+../../src/nco++/NcapVarVector.cc \
+../../src/nco++/ncoLexer.cpp \
+../../src/nco++/ncoParser.cpp \
+../../src/nco++/ncoTree.cpp \
+../../src/nco++/prs_cls.cc \
+../../src/nco++/nco_gsl.c
+
diff --git a/qt/ncap2/ncap2.vcxproj b/qt/ncap2/ncap2.vcxproj
index 3d247be..23fb0b5 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{46AC4EA0-1D3E-3A4A-B6BC-CA4E90E718FE}</ProjectGuid>
+    <ProjectGuid>{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}</ProjectGuid>
     <RootNamespace>ncap2</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncap2</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncap2</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncap2</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(HEADER_ANTLR);..\..\src\nco;..\..\src\nco++;$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_ANTLR);$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";"$(HEADER_ANTLR)";"..\..\src\nco";"..\..\src\nco++";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <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_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -180,7 +179,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncatted/ncatted.pro b/qt/ncatted/ncatted.pro
index a5224c2..bbcd999 100644
--- a/qt/ncatted/ncatted.pro
+++ b/qt/ncatted/ncatted.pro
@@ -1,27 +1,18 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncatted
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncatted.c
-
+TARGET = ncatted
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+
+HEADERS   = 
+SOURCES   = ../../src/nco/ncatted.c
+
diff --git a/qt/ncatted/ncatted.vcxproj b/qt/ncatted/ncatted.vcxproj
index 0dfe724..46f5589 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{1D085F3D-EE8C-381F-9CAB-4B36C909FF09}</ProjectGuid>
+    <ProjectGuid>{662B7468-C1B2-3EA3-98DE-D2B8A870CAAE}</ProjectGuid>
     <RootNamespace>ncatted</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncatted</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncatted</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncatted</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncbo/ncbo.pro b/qt/ncbo/ncbo.pro
index bd18635..3cd785d 100644
--- a/qt/ncbo/ncbo.pro
+++ b/qt/ncbo/ncbo.pro
@@ -1,27 +1,17 @@
-
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncbo
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncbo.c
+TARGET = ncbo
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+
+HEADERS   = 
+SOURCES   = ../../src/nco/ncbo.c
diff --git a/qt/ncbo/ncbo.vcxproj b/qt/ncbo/ncbo.vcxproj
index 912694c..f2f304c 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{88AF0DF5-ABE6-32EA-BEFE-61B96F125F44}</ProjectGuid>
+    <ProjectGuid>{05AA5FAF-8D8D-32F1-8215-3712F8CC38E0}</ProjectGuid>
     <RootNamespace>ncbo</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncbo</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncbo</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncbo</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncea/ncea.pro b/qt/ncea/ncea.pro
index 34f7932..c9343ae 100644
--- a/qt/ncea/ncea.pro
+++ b/qt/ncea/ncea.pro
@@ -1,26 +1,16 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncea
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
+TARGET = ncea
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+HEADERS   = 
 SOURCES   = ../../src/nco/ncra.c
\ No newline at end of file
diff --git a/qt/ncea/ncea.vcxproj b/qt/ncea/ncea.vcxproj
index ecda11a..9461f5a 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{40AAEEE2-5064-3C05-8D55-AA7B160B0205}</ProjectGuid>
+    <ProjectGuid>{ED83DCD6-3659-3227-8BAE-CAE51E45E95D}</ProjectGuid>
     <RootNamespace>ncea</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncea</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncea</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncea</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncecat/ncecat.pro b/qt/ncecat/ncecat.pro
index 55fdd1f..aeecf42 100644
--- a/qt/ncecat/ncecat.pro
+++ b/qt/ncecat/ncecat.pro
@@ -1,28 +1,18 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncecat
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncecat.c
-
-
+TARGET = ncecat
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+HEADERS   = 
+SOURCES   = ../../src/nco/ncecat.c
+
+
diff --git a/qt/ncecat/ncecat.vcxproj b/qt/ncecat/ncecat.vcxproj
index d352029..93086db 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{AEBDA630-EFA0-31AD-BC52-8E3DB03F8C74}</ProjectGuid>
+    <ProjectGuid>{62931E91-8CDE-3A32-BE30-3CED418E09CF}</ProjectGuid>
     <RootNamespace>ncecat</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncecat</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncecat</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncecat</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncflint/ncflint.pro b/qt/ncflint/ncflint.pro
index 658ba9f..b272e2e 100644
--- a/qt/ncflint/ncflint.pro
+++ b/qt/ncflint/ncflint.pro
@@ -1,27 +1,17 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncflint
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncflint.c
-
+TARGET = ncflint
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+HEADERS   = 
+SOURCES   = ../../src/nco/ncflint.c
+
diff --git a/qt/ncflint/ncflint.vcxproj b/qt/ncflint/ncflint.vcxproj
index f87c7f6..a458977 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{3286654D-13F4-3912-9034-EC9E4B220887}</ProjectGuid>
+    <ProjectGuid>{4F01E3BE-0797-3130-88FA-F5C1CD8A0651}</ProjectGuid>
     <RootNamespace>ncflint</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncflint</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncflint</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncflint</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncks/ncks.pro b/qt/ncks/ncks.pro
index fe2d39a..3cea7ff 100644
--- a/qt/ncks/ncks.pro
+++ b/qt/ncks/ncks.pro
@@ -1,26 +1,16 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncks
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncks.c
+TARGET = ncks
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+HEADERS   = 
+SOURCES   = ../../src/nco/ncks.c
diff --git a/qt/ncks/ncks.vcxproj b/qt/ncks/ncks.vcxproj
index 2980ef4..3c471e7 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{4E8A7101-FE87-3BA7-96CB-758DE731C1B3}</ProjectGuid>
+    <ProjectGuid>{D6E82FA7-5C29-3C68-B0B7-1B352E18E98E}</ProjectGuid>
     <RootNamespace>ncks</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncks</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncks</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncks</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/nco.pri b/qt/nco.pri
index 0ff084f..55f8443 100644
--- a/qt/nco.pri
+++ b/qt/nco.pri
@@ -1,41 +1,29 @@
-# common NCO Qt dependency library settings for all NCO operators
-# gcc settings to use C99
-# HDF5 and netCDF LIB order is important
-# _BSD_SOURCE and _POSIX_SOURCE needed
+CONFIG += console 
+CONFIG += static
+CONFIG -= qt
+
 unix {
+ CONFIG += largefile
  DEFINES += HAVE_CONFIG_H
  INCLUDEPATH += ../../
  DEFINES += _BSD_SOURCE
  DEFINES += _POSIX_SOURCE
  QMAKE_CFLAGS += -std=c99
- #INCLUDEPATH += /usr/local/include
- #INCLUDEPATH += /usr/local
- INCLUDEPATH += /home/pvicente/install/netcdf-c-4.3.1.1/include
- LIBS += -L/home/pvicente/install/netcdf-c-4.3.1.1/lib -lnetcdf
- LIBS += -lhdf5_hl -lhdf5 -lgsl -lgslcblas -lm
+ LIBS += -L/usr/local/lib/
+ LIBS += -lhdf5_hl -lhdf5 -lgsl -lgslcblas -lnetcdf -lm
  LIBS += -L/usr/lib/x86_64-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -lz -ludunits2 -lexpat
- # Mac Ports netCDF locations
- LIBS += -L/opt/local/lib
- INCLUDEPATH += /opt/local/include 
- # Mac Ports udunits locations
- INCLUDEPATH += /opt/local/include/udunits2
- #RHEL
- INCLUDEPATH += /SNS/users/pvicente/libs/install/netcdf-4.3.1-rc2/include
- INCLUDEPATH += /SNS/users/pvicente/libs/install/udunits-2.1.24/include
- LIBS += -L/SNS/users/pvicente/libs/install/netcdf-4.3.1-rc2/lib
- LIBS += -L/SNS/users/pvicente/libs/install/udunits-2.1.24/lib
 }
 
-CONFIG -= qt
-#CONFIG += netcdf3
-
 win32{
- CONFIG += console 
+ QMAKE_CFLAGS_RELEASE += /MT
+ QMAKE_CXXFLAGS_RELEASE += /MT
+ QMAKE_CFLAGS_DEBUG += /MTd
+ QMAKE_CXXFLAGS_DEBUG += /MTd
+ QMAKE_CXXFLAGS += /TP 
  DEFINES += _CRT_SECURE_NO_WARNINGS
  DEFINES += _CRT_NONSTDC_NO_DEPRECATE
- DEFINES += NEED_STRCASECMP
- # gsl
- INCLUDEPATH += $(HEADER_GSL)
+ DEFINES += ENABLE_UDUNITS
+ DEFINES += HAVE_UDUNITS2_H
  DEFINES += ENABLE_GSL
  DEFINES += ENABLE_DAP
 }
@@ -54,8 +42,11 @@ win32{
  DEFINES += ENABLE_NETCDF4
  DEFINES += HAVE_NETCDF4_H
 }
-
+ INCLUDEPATH += $(HEADER_GSL)
+ INCLUDEPATH += $(HEADER_UDUNITS)
  LIBS += $(LIB_GSL)
+ LIBS += $(LIB_UDUNITS)
+ LIBS += $(LIB_EXPAT)
  LIBS += $(LIB_CURL)
 }
 
diff --git a/qt/nco.pro b/qt/nco.pro
index 9a12ee3..cbc5179 100644
--- a/qt/nco.pro
+++ b/qt/nco.pro
@@ -11,6 +11,7 @@ SUBDIRS += ncra
 SUBDIRS += ncrename
 SUBDIRS += ncwa
 SUBDIRS += ncrcat
+SUBDIRS += ncea
 SUBDIRS += libnco_c++
 SUBDIRS += tst_nco_c++
 SUBDIRS += ncap2
diff --git a/qt/nco.sln b/qt/nco.sln
index 364dacc..f61b3f9 100644
--- a/qt/nco.sln
+++ b/qt/nco.sln
@@ -1,77 +1,79 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnco", "libnco\libnco.vcxproj", "{B1435D13-6445-362C-A7A3-8BA4A2AA25D1}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30723.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnco", "libnco\libnco.vcxproj", "{E8AACE7E-513A-3A65-B16B-0661B6089A03}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncatted", "ncatted\ncatted.vcxproj", "{1D085F3D-EE8C-381F-9CAB-4B36C909FF09}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncatted", "ncatted\ncatted.vcxproj", "{662B7468-C1B2-3EA3-98DE-D2B8A870CAAE}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbo", "ncbo\ncbo.vcxproj", "{88AF0DF5-ABE6-32EA-BEFE-61B96F125F44}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbo", "ncbo\ncbo.vcxproj", "{05AA5FAF-8D8D-32F1-8215-3712F8CC38E0}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncecat", "ncecat\ncecat.vcxproj", "{AEBDA630-EFA0-31AD-BC52-8E3DB03F8C74}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncecat", "ncecat\ncecat.vcxproj", "{62931E91-8CDE-3A32-BE30-3CED418E09CF}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncflint", "ncflint\ncflint.vcxproj", "{3286654D-13F4-3912-9034-EC9E4B220887}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncflint", "ncflint\ncflint.vcxproj", "{4F01E3BE-0797-3130-88FA-F5C1CD8A0651}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncks", "ncks\ncks.vcxproj", "{4E8A7101-FE87-3BA7-96CB-758DE731C1B3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncks", "ncks\ncks.vcxproj", "{D6E82FA7-5C29-3C68-B0B7-1B352E18E98E}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncpdq", "ncpdq\ncpdq.vcxproj", "{36A602E5-7DCB-3989-BAE4-300813BA7A62}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncpdq", "ncpdq\ncpdq.vcxproj", "{0FD04465-7DAA-322F-9F66-241608F4423F}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncra", "ncra\ncra.vcxproj", "{C6C016D2-81D8-3430-A886-89A8341C597E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncra", "ncra\ncra.vcxproj", "{D6FDCE37-425F-33B0-87F4-92A8CBC20C8A}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncrename", "ncrename\ncrename.vcxproj", "{A8A8384E-4BCF-3EBA-9D3E-F05807C392D9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncrename", "ncrename\ncrename.vcxproj", "{B5D4FE11-143A-3C0A-8540-C2B86CF3898A}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncwa", "ncwa\ncwa.vcxproj", "{7AF43FFB-B706-3443-ADDF-9C87DCFC0C57}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncwa", "ncwa\ncwa.vcxproj", "{24FE043D-0522-3D7C-A57A-FE178EF42806}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncrcat", "ncrcat\ncrcat.vcxproj", "{2A149B3A-F723-323D-BAB2-F7E0E30A8F4F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncrcat", "ncrcat\ncrcat.vcxproj", "{D9A7EC37-F172-3427-AD47-6B0A1B89B67F}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncea", "ncea\ncea.vcxproj", "{40AAEEE2-5064-3C05-8D55-AA7B160B0205}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncea", "ncea\ncea.vcxproj", "{ED83DCD6-3659-3227-8BAE-CAE51E45E95D}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnco_c++", "libnco_c++\libnco_c++.vcxproj", "{2B0DD292-1A49-3877-89E3-7F8E519129B4}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnco_c++", "libnco_c++\libnco_c++.vcxproj", "{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
+		{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", "{43F93DE1-97C5-31A5-8DC1-5B291B295868}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tst_nco_c++", "tst_nco_c++\tst_nco_c++.vcxproj", "{0F656B77-3E08-343A-96F8-2875D7A0B3D0}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
-		{2B0DD292-1A49-3877-89E3-7F8E519129B4} = {2B0DD292-1A49-3877-89E3-7F8E519129B4}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
+		{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4} = {BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncap2", "ncap2\ncap2.vcxproj", "{46AC4EA0-1D3E-3A4A-B6BC-CA4E90E718FE}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncap2", "ncap2\ncap2.vcxproj", "{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}"
 	ProjectSection(ProjectDependencies) = postProject
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1} = {B1435D13-6445-362C-A7A3-8BA4A2AA25D1}
-		{2B0DD292-1A49-3877-89E3-7F8E519129B4} = {2B0DD292-1A49-3877-89E3-7F8E519129B4}
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03} = {E8AACE7E-513A-3A65-B16B-0661B6089A03}
+		{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4} = {BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}
 	EndProjectSection
 EndProject
 Global
@@ -80,72 +82,71 @@ Global
 		Release|Win32 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1}.Debug|Win32.Build.0 = Debug|Win32
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1}.Release|Win32.ActiveCfg = Release|Win32
-		{B1435D13-6445-362C-A7A3-8BA4A2AA25D1}.Release|Win32.Build.0 = Release|Win32
-		{1D085F3D-EE8C-381F-9CAB-4B36C909FF09}.Debug|Win32.ActiveCfg = Debug|Win32
-		{1D085F3D-EE8C-381F-9CAB-4B36C909FF09}.Debug|Win32.Build.0 = Debug|Win32
-		{1D085F3D-EE8C-381F-9CAB-4B36C909FF09}.Release|Win32.ActiveCfg = Release|Win32
-		{1D085F3D-EE8C-381F-9CAB-4B36C909FF09}.Release|Win32.Build.0 = Release|Win32
-		{88AF0DF5-ABE6-32EA-BEFE-61B96F125F44}.Debug|Win32.ActiveCfg = Debug|Win32
-		{88AF0DF5-ABE6-32EA-BEFE-61B96F125F44}.Debug|Win32.Build.0 = Debug|Win32
-		{88AF0DF5-ABE6-32EA-BEFE-61B96F125F44}.Release|Win32.ActiveCfg = Release|Win32
-		{88AF0DF5-ABE6-32EA-BEFE-61B96F125F44}.Release|Win32.Build.0 = Release|Win32
-		{AEBDA630-EFA0-31AD-BC52-8E3DB03F8C74}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AEBDA630-EFA0-31AD-BC52-8E3DB03F8C74}.Debug|Win32.Build.0 = Debug|Win32
-		{AEBDA630-EFA0-31AD-BC52-8E3DB03F8C74}.Release|Win32.ActiveCfg = Release|Win32
-		{AEBDA630-EFA0-31AD-BC52-8E3DB03F8C74}.Release|Win32.Build.0 = Release|Win32
-		{3286654D-13F4-3912-9034-EC9E4B220887}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3286654D-13F4-3912-9034-EC9E4B220887}.Debug|Win32.Build.0 = Debug|Win32
-		{3286654D-13F4-3912-9034-EC9E4B220887}.Release|Win32.ActiveCfg = Release|Win32
-		{3286654D-13F4-3912-9034-EC9E4B220887}.Release|Win32.Build.0 = Release|Win32
-		{4E8A7101-FE87-3BA7-96CB-758DE731C1B3}.Debug|Win32.ActiveCfg = Debug|Win32
-		{4E8A7101-FE87-3BA7-96CB-758DE731C1B3}.Debug|Win32.Build.0 = Debug|Win32
-		{4E8A7101-FE87-3BA7-96CB-758DE731C1B3}.Release|Win32.ActiveCfg = Release|Win32
-		{4E8A7101-FE87-3BA7-96CB-758DE731C1B3}.Release|Win32.Build.0 = Release|Win32
-		{36A602E5-7DCB-3989-BAE4-300813BA7A62}.Debug|Win32.ActiveCfg = Debug|Win32
-		{36A602E5-7DCB-3989-BAE4-300813BA7A62}.Debug|Win32.Build.0 = Debug|Win32
-		{36A602E5-7DCB-3989-BAE4-300813BA7A62}.Release|Win32.ActiveCfg = Release|Win32
-		{36A602E5-7DCB-3989-BAE4-300813BA7A62}.Release|Win32.Build.0 = Release|Win32
-		{C6C016D2-81D8-3430-A886-89A8341C597E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C6C016D2-81D8-3430-A886-89A8341C597E}.Debug|Win32.Build.0 = Debug|Win32
-		{C6C016D2-81D8-3430-A886-89A8341C597E}.Release|Win32.ActiveCfg = Release|Win32
-		{C6C016D2-81D8-3430-A886-89A8341C597E}.Release|Win32.Build.0 = Release|Win32
-		{A8A8384E-4BCF-3EBA-9D3E-F05807C392D9}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A8A8384E-4BCF-3EBA-9D3E-F05807C392D9}.Debug|Win32.Build.0 = Debug|Win32
-		{A8A8384E-4BCF-3EBA-9D3E-F05807C392D9}.Release|Win32.ActiveCfg = Release|Win32
-		{A8A8384E-4BCF-3EBA-9D3E-F05807C392D9}.Release|Win32.Build.0 = Release|Win32
-		{7AF43FFB-B706-3443-ADDF-9C87DCFC0C57}.Debug|Win32.ActiveCfg = Debug|Win32
-		{7AF43FFB-B706-3443-ADDF-9C87DCFC0C57}.Debug|Win32.Build.0 = Debug|Win32
-		{7AF43FFB-B706-3443-ADDF-9C87DCFC0C57}.Release|Win32.ActiveCfg = Release|Win32
-		{7AF43FFB-B706-3443-ADDF-9C87DCFC0C57}.Release|Win32.Build.0 = Release|Win32
-		{2A149B3A-F723-323D-BAB2-F7E0E30A8F4F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{2A149B3A-F723-323D-BAB2-F7E0E30A8F4F}.Debug|Win32.Build.0 = Debug|Win32
-		{2A149B3A-F723-323D-BAB2-F7E0E30A8F4F}.Release|Win32.ActiveCfg = Release|Win32
-		{2A149B3A-F723-323D-BAB2-F7E0E30A8F4F}.Release|Win32.Build.0 = Release|Win32
-		{40AAEEE2-5064-3C05-8D55-AA7B160B0205}.Debug|Win32.ActiveCfg = Debug|Win32
-		{40AAEEE2-5064-3C05-8D55-AA7B160B0205}.Debug|Win32.Build.0 = Debug|Win32
-		{40AAEEE2-5064-3C05-8D55-AA7B160B0205}.Release|Win32.ActiveCfg = Release|Win32
-		{40AAEEE2-5064-3C05-8D55-AA7B160B0205}.Release|Win32.Build.0 = Release|Win32
-		{2B0DD292-1A49-3877-89E3-7F8E519129B4}.Debug|Win32.ActiveCfg = Debug|Win32
-		{2B0DD292-1A49-3877-89E3-7F8E519129B4}.Debug|Win32.Build.0 = Debug|Win32
-		{2B0DD292-1A49-3877-89E3-7F8E519129B4}.Release|Win32.ActiveCfg = Release|Win32
-		{2B0DD292-1A49-3877-89E3-7F8E519129B4}.Release|Win32.Build.0 = Release|Win32
-		{43F93DE1-97C5-31A5-8DC1-5B291B295868}.Debug|Win32.ActiveCfg = Debug|Win32
-		{43F93DE1-97C5-31A5-8DC1-5B291B295868}.Debug|Win32.Build.0 = Debug|Win32
-		{43F93DE1-97C5-31A5-8DC1-5B291B295868}.Release|Win32.ActiveCfg = Release|Win32
-		{43F93DE1-97C5-31A5-8DC1-5B291B295868}.Release|Win32.Build.0 = Release|Win32
-		{46AC4EA0-1D3E-3A4A-B6BC-CA4E90E718FE}.Debug|Win32.ActiveCfg = Debug|Win32
-		{46AC4EA0-1D3E-3A4A-B6BC-CA4E90E718FE}.Debug|Win32.Build.0 = Debug|Win32
-		{46AC4EA0-1D3E-3A4A-B6BC-CA4E90E718FE}.Release|Win32.ActiveCfg = Release|Win32
-		{46AC4EA0-1D3E-3A4A-B6BC-CA4E90E718FE}.Release|Win32.Build.0 = Release|Win32
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03}.Debug|Win32.Build.0 = Debug|Win32
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03}.Release|Win32.ActiveCfg = Release|Win32
+		{E8AACE7E-513A-3A65-B16B-0661B6089A03}.Release|Win32.Build.0 = Release|Win32
+		{662B7468-C1B2-3EA3-98DE-D2B8A870CAAE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{662B7468-C1B2-3EA3-98DE-D2B8A870CAAE}.Debug|Win32.Build.0 = Debug|Win32
+		{662B7468-C1B2-3EA3-98DE-D2B8A870CAAE}.Release|Win32.ActiveCfg = Release|Win32
+		{662B7468-C1B2-3EA3-98DE-D2B8A870CAAE}.Release|Win32.Build.0 = Release|Win32
+		{05AA5FAF-8D8D-32F1-8215-3712F8CC38E0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{05AA5FAF-8D8D-32F1-8215-3712F8CC38E0}.Debug|Win32.Build.0 = Debug|Win32
+		{05AA5FAF-8D8D-32F1-8215-3712F8CC38E0}.Release|Win32.ActiveCfg = Release|Win32
+		{05AA5FAF-8D8D-32F1-8215-3712F8CC38E0}.Release|Win32.Build.0 = Release|Win32
+		{62931E91-8CDE-3A32-BE30-3CED418E09CF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{62931E91-8CDE-3A32-BE30-3CED418E09CF}.Debug|Win32.Build.0 = Debug|Win32
+		{62931E91-8CDE-3A32-BE30-3CED418E09CF}.Release|Win32.ActiveCfg = Release|Win32
+		{62931E91-8CDE-3A32-BE30-3CED418E09CF}.Release|Win32.Build.0 = Release|Win32
+		{4F01E3BE-0797-3130-88FA-F5C1CD8A0651}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4F01E3BE-0797-3130-88FA-F5C1CD8A0651}.Debug|Win32.Build.0 = Debug|Win32
+		{4F01E3BE-0797-3130-88FA-F5C1CD8A0651}.Release|Win32.ActiveCfg = Release|Win32
+		{4F01E3BE-0797-3130-88FA-F5C1CD8A0651}.Release|Win32.Build.0 = Release|Win32
+		{D6E82FA7-5C29-3C68-B0B7-1B352E18E98E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D6E82FA7-5C29-3C68-B0B7-1B352E18E98E}.Debug|Win32.Build.0 = Debug|Win32
+		{D6E82FA7-5C29-3C68-B0B7-1B352E18E98E}.Release|Win32.ActiveCfg = Release|Win32
+		{D6E82FA7-5C29-3C68-B0B7-1B352E18E98E}.Release|Win32.Build.0 = Release|Win32
+		{0FD04465-7DAA-322F-9F66-241608F4423F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0FD04465-7DAA-322F-9F66-241608F4423F}.Debug|Win32.Build.0 = Debug|Win32
+		{0FD04465-7DAA-322F-9F66-241608F4423F}.Release|Win32.ActiveCfg = Release|Win32
+		{0FD04465-7DAA-322F-9F66-241608F4423F}.Release|Win32.Build.0 = Release|Win32
+		{D6FDCE37-425F-33B0-87F4-92A8CBC20C8A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D6FDCE37-425F-33B0-87F4-92A8CBC20C8A}.Debug|Win32.Build.0 = Debug|Win32
+		{D6FDCE37-425F-33B0-87F4-92A8CBC20C8A}.Release|Win32.ActiveCfg = Release|Win32
+		{D6FDCE37-425F-33B0-87F4-92A8CBC20C8A}.Release|Win32.Build.0 = Release|Win32
+		{B5D4FE11-143A-3C0A-8540-C2B86CF3898A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B5D4FE11-143A-3C0A-8540-C2B86CF3898A}.Debug|Win32.Build.0 = Debug|Win32
+		{B5D4FE11-143A-3C0A-8540-C2B86CF3898A}.Release|Win32.ActiveCfg = Release|Win32
+		{B5D4FE11-143A-3C0A-8540-C2B86CF3898A}.Release|Win32.Build.0 = Release|Win32
+		{24FE043D-0522-3D7C-A57A-FE178EF42806}.Debug|Win32.ActiveCfg = Debug|Win32
+		{24FE043D-0522-3D7C-A57A-FE178EF42806}.Debug|Win32.Build.0 = Debug|Win32
+		{24FE043D-0522-3D7C-A57A-FE178EF42806}.Release|Win32.ActiveCfg = Release|Win32
+		{24FE043D-0522-3D7C-A57A-FE178EF42806}.Release|Win32.Build.0 = Release|Win32
+		{D9A7EC37-F172-3427-AD47-6B0A1B89B67F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D9A7EC37-F172-3427-AD47-6B0A1B89B67F}.Debug|Win32.Build.0 = Debug|Win32
+		{D9A7EC37-F172-3427-AD47-6B0A1B89B67F}.Release|Win32.ActiveCfg = Release|Win32
+		{D9A7EC37-F172-3427-AD47-6B0A1B89B67F}.Release|Win32.Build.0 = Release|Win32
+		{ED83DCD6-3659-3227-8BAE-CAE51E45E95D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{ED83DCD6-3659-3227-8BAE-CAE51E45E95D}.Debug|Win32.Build.0 = Debug|Win32
+		{ED83DCD6-3659-3227-8BAE-CAE51E45E95D}.Release|Win32.ActiveCfg = Release|Win32
+		{ED83DCD6-3659-3227-8BAE-CAE51E45E95D}.Release|Win32.Build.0 = Release|Win32
+		{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}.Debug|Win32.Build.0 = Debug|Win32
+		{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}.Release|Win32.ActiveCfg = Release|Win32
+		{BF383AEF-8F0C-39FD-96F6-393FDA23EAB4}.Release|Win32.Build.0 = Release|Win32
+		{0F656B77-3E08-343A-96F8-2875D7A0B3D0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0F656B77-3E08-343A-96F8-2875D7A0B3D0}.Debug|Win32.Build.0 = Debug|Win32
+		{0F656B77-3E08-343A-96F8-2875D7A0B3D0}.Release|Win32.ActiveCfg = Release|Win32
+		{0F656B77-3E08-343A-96F8-2875D7A0B3D0}.Release|Win32.Build.0 = Release|Win32
+		{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}.Debug|Win32.Build.0 = Debug|Win32
+		{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}.Release|Win32.ActiveCfg = Release|Win32
+		{DEBDE623-1A7F-3850-AFE7-37FDF3D6EC7F}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
-		QtVersion = qt-everywhere-opensource-src-4.8.3
-		VisualSVNWorkingCopyRoot = ..
+		Qt5Version = msvc2013
 	EndGlobalSection
 EndGlobal
diff --git a/qt/ncpdq/ncpdq.pro b/qt/ncpdq/ncpdq.pro
index 7c9058e..171d8b7 100644
--- a/qt/ncpdq/ncpdq.pro
+++ b/qt/ncpdq/ncpdq.pro
@@ -1,27 +1,17 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncpdq
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncpdq.c
-
+TARGET = ncpdq
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+HEADERS   = 
+SOURCES   = ../../src/nco/ncpdq.c
+
diff --git a/qt/ncpdq/ncpdq.vcxproj b/qt/ncpdq/ncpdq.vcxproj
index 6a9fa99..c788232 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{36A602E5-7DCB-3989-BAE4-300813BA7A62}</ProjectGuid>
+    <ProjectGuid>{0FD04465-7DAA-322F-9F66-241608F4423F}</ProjectGuid>
     <RootNamespace>ncpdq</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncpdq</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncpdq</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncpdq</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncra/ncra.pro b/qt/ncra/ncra.pro
index e234cac..ae51af9 100644
--- a/qt/ncra/ncra.pro
+++ b/qt/ncra/ncra.pro
@@ -1,27 +1,17 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncra
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncra.c
-
+TARGET = ncra
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+HEADERS   = 
+SOURCES   = ../../src/nco/ncra.c
+
diff --git a/qt/ncra/ncra.vcxproj b/qt/ncra/ncra.vcxproj
index 26ed833..0100c84 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{C6C016D2-81D8-3430-A886-89A8341C597E}</ProjectGuid>
+    <ProjectGuid>{D6FDCE37-425F-33B0-87F4-92A8CBC20C8A}</ProjectGuid>
     <RootNamespace>ncra</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncra</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncra</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncra</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncrcat/ncrcat.pro b/qt/ncrcat/ncrcat.pro
index 4d3d9f5..4087a9b 100644
--- a/qt/ncrcat/ncrcat.pro
+++ b/qt/ncrcat/ncrcat.pro
@@ -1,26 +1,16 @@
-# template type is application
-TEMPLATE = app
-# name
 TARGET = ncrcat
-
+TEMPLATE = app
 CONFIG -= qt
 CONFIG += debug_and_release
 
-# NCO library
 CONFIG( debug, debug|release ) {
-    # debug
         win32:LIBS += ../libnco/debug/libnco.lib
         unix:LIBS  += ../libnco/debug/liblibnco.a
 } else {
-    # release
         win32:LIBS += ../libnco/release/libnco.lib
         unix:LIBS  += ../libnco/release/liblibnco.a
 }
 
-# common NCO settings
 include (../nco.pri)
-
-# SOURCES
-# HEADERS
 HEADERS   = 
 SOURCES   = ../../src/nco/ncra.c
\ No newline at end of file
diff --git a/qt/ncrcat/ncrcat.vcxproj b/qt/ncrcat/ncrcat.vcxproj
index 32d3f28..d158271 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{2A149B3A-F723-323D-BAB2-F7E0E30A8F4F}</ProjectGuid>
+    <ProjectGuid>{D9A7EC37-F172-3427-AD47-6B0A1B89B67F}</ProjectGuid>
     <RootNamespace>ncrcat</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncrcat</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncrcat</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncrcat</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncrename/ncrename.pro b/qt/ncrename/ncrename.pro
index ae626e7..b75de45 100644
--- a/qt/ncrename/ncrename.pro
+++ b/qt/ncrename/ncrename.pro
@@ -1,26 +1,17 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = ncrename
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-# NCO library
-CONFIG( debug, debug|release ) {
-    # debug
-        win32:LIBS += ../libnco/debug/libnco.lib
-        unix:LIBS  += ../libnco/debug/liblibnco.a
-} else {
-    # release
-        win32:LIBS += ../libnco/release/libnco.lib
-        unix:LIBS  += ../libnco/release/liblibnco.a
-}
-# common NCO settings
-include (../nco.pri)
-
-# SOURCES
-# HEADERS
-HEADERS   = 
-SOURCES   = ../../src/nco/ncrename.c
-
+TARGET = ncrename
+TEMPLATE = app
+CONFIG -= qt
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+        win32:LIBS += ../libnco/debug/libnco.lib
+        unix:LIBS  += ../libnco/debug/liblibnco.a
+} else {
+        win32:LIBS += ../libnco/release/libnco.lib
+        unix:LIBS  += ../libnco/release/liblibnco.a
+}
+
+include (../nco.pri)
+HEADERS   = 
+SOURCES   = ../../src/nco/ncrename.c
+
diff --git a/qt/ncrename/ncrename.vcxproj b/qt/ncrename/ncrename.vcxproj
index 2efaf31..c5557d3 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{A8A8384E-4BCF-3EBA-9D3E-F05807C392D9}</ProjectGuid>
+    <ProjectGuid>{B5D4FE11-143A-3C0A-8540-C2B86CF3898A}</ProjectGuid>
     <RootNamespace>ncrename</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncrename</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncrename</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncrename</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/ncwa/ncwa.pro b/qt/ncwa/ncwa.pro
index bf24432..dddeb85 100644
--- a/qt/ncwa/ncwa.pro
+++ b/qt/ncwa/ncwa.pro
@@ -1,28 +1,18 @@
-# template type is application
-TEMPLATE = app
-# name
 TARGET = ncwa
-
+TEMPLATE = app
 CONFIG -= qt
 CONFIG += debug_and_release
 
-# NCO library
 CONFIG( debug, debug|release ) {
-    # debug
         win32:LIBS += ../libnco/debug/libnco.lib
         unix:LIBS  += ../libnco/debug/liblibnco.a
 } else {
-    # release
         win32:LIBS += ../libnco/release/libnco.lib
         unix:LIBS  += ../libnco/release/liblibnco.a
 }
 
-# common NCO settings
 include (../nco.pri)
 
-# SOURCES
-# HEADERS
-
 unix {
 HEADERS = ../../src/nco/ncap_yacc.h
 SOURCES   = ../../src/nco/ncwa.c \
diff --git a/qt/ncwa/ncwa.vcxproj b/qt/ncwa/ncwa.vcxproj
index 3e1a826..8353e46 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">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{7AF43FFB-B706-3443-ADDF-9C87DCFC0C57}</ProjectGuid>
+    <ProjectGuid>{24FE043D-0522-3D7C-A57A-FE178EF42806}</ProjectGuid>
     <RootNamespace>ncwa</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>release\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>debug\</IntermediateDirectory>
+    <IntermediateDirectory>release\</IntermediateDirectory>
     <PrimaryOutput>ncwa</PrimaryOutput>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</PlatformToolSet>
+    <OutputDirectory>debug\</OutputDirectory>
     <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
     <CharacterSet>NotSet</CharacterSet>
     <ConfigurationType>Application</ConfigurationType>
-    <IntermediateDirectory>release\</IntermediateDirectory>
+    <IntermediateDirectory>debug\</IntermediateDirectory>
     <PrimaryOutput>ncwa</PrimaryOutput>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ncwa</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(HEADER_GSL);$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/debug/libnco.lib;$(LIB_NETCDF);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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>
@@ -93,37 +93,36 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"$(HEADER_GSL)";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
       <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;ENABLE_GSL;ENABLE_DAP;ENABLE_NETCDF4;HAVE_NETCDF4_H;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco/release/libnco.lib;$(LIB_NETCDF);$(LIB_DISPATCH);$(LIB_NETCDF4);$(LIB_HDF5);$(LIB_HDF5_HL);$(LIB_ZLIB);$(LIB_SZIP);$(LIB_GSL);$(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)</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>
@@ -135,7 +134,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NEED_STRCASECMP;NEED_STRCASESTR;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>
   <ItemGroup>
@@ -145,7 +144,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/qt/tst_nco_c++/tst_nco_c++.pro b/qt/tst_nco_c++/tst_nco_c++.pro
index dbc4762..02dfeac 100644
--- a/qt/tst_nco_c++/tst_nco_c++.pro
+++ b/qt/tst_nco_c++/tst_nco_c++.pro
@@ -1,55 +1,45 @@
-# template type is application
-TEMPLATE = app
-# name
-TARGET = tst_nco_c++
-
-CONFIG -= qt
-CONFIG += debug_and_release
-
-#nco++ library
-CONFIG( debug, debug|release ) {
-	# debug
-	win32:LIBS += ../libnco_c++/debug/libnco_c++.lib
-	unix:LIBS  += ../libnco_c++/debug/liblibnco_c++.a
-} else {
-	# release
-	win32:LIBS += ../libnco_c++/release/libnco_c++.lib
-	unix:LIBS  += ../libnco_c++/release/liblibnco_c++.a
-}
-
-INCLUDEPATH += ../../src/nco_c++
-HEADERS   = 
-SOURCES   = ../../src/nco_c++/tst.cc
-
-#netCDF library
-unix {
- INCLUDEPATH += /usr/local/include
- INCLUDEPATH += /usr/local
- LIBS += -L/usr/lib/ -lnetcdf -lhdf5_hl -lhdf5
- LIBS += -L/usr/lib/x86_64-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -lz -ludunits2 -lexpat 
- #RHEL
- INCLUDEPATH += /SNS/users/pvicente/libs/install/netcdf-4.3.1-rc2/include
- INCLUDEPATH += /SNS/users/pvicente/libs/install/udunits-2.1.24/include
- LIBS += -L/SNS/users/pvicente/libs/install/netcdf-4.3.1-rc2/lib
- LIBS += -L/SNS/users/pvicente/libs/install/udunits-2.1.24/lib
-}
-win32 {
- INCLUDEPATH += $(HEADER_NETCDF)
- LIBS += $(LIB_NETCDF)
- LIBS += $(LIB_DISPATCH)
- LIBS += $(LIB_NETCDF4)
- LIBS += $(LIB_HDF5)
- LIBS += $(LIB_HDF5_HL)
- LIBS += $(LIB_ZLIB)
- LIBS += $(LIB_SZIP)
- LIBS += $(LIB_CURL)
- DEFINES += _CRT_SECURE_NO_WARNINGS
- DEFINES += _CRT_NONSTDC_NO_DEPRECATE
- CONFIG  += console
- 
- # netCDF assumed in Windows build
- DEFINES += ENABLE_NETCDF4
- DEFINES += HAVE_NETCDF4_H
- DEFINES += NEED_STRCASECMP
- DEFINES += NEED_STRCASESTR
-}
+TEMPLATE = app
+TARGET = tst_nco_c++
+CONFIG -= qt
+CONFIG += console
+CONFIG += debug_and_release
+
+CONFIG( debug, debug|release ) {
+	win32:LIBS += ../libnco_c++/debug/libnco_c++.lib
+	unix:LIBS  += ../libnco_c++/debug/liblibnco_c++.a
+} else {
+	win32:LIBS += ../libnco_c++/release/libnco_c++.lib
+	unix:LIBS  += ../libnco_c++/release/liblibnco_c++.a
+}
+
+INCLUDEPATH += ../../src/nco_c++
+HEADERS   = 
+SOURCES   = ../../src/nco_c++/tst.cc
+
+unix {
+ INCLUDEPATH += /usr/local/include
+ INCLUDEPATH += /usr/local
+ LIBS += -L/usr/lib/ -lnetcdf -lhdf5_hl -lhdf5
+ LIBS += -L/usr/lib/x86_64-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -lz -ludunits2 -lexpat 
+}
+win32 {
+ QMAKE_CFLAGS_RELEASE += /MT
+ QMAKE_CXXFLAGS_RELEASE += /MT
+ QMAKE_CFLAGS_DEBUG += /MTd
+ QMAKE_CXXFLAGS_DEBUG += /MTd
+ INCLUDEPATH += $(HEADER_NETCDF)
+ LIBS += $(LIB_NETCDF)
+ LIBS += $(LIB_DISPATCH)
+ LIBS += $(LIB_NETCDF4)
+ LIBS += $(LIB_HDF5)
+ LIBS += $(LIB_HDF5_HL)
+ LIBS += $(LIB_ZLIB)
+ LIBS += $(LIB_SZIP)
+ LIBS += $(LIB_CURL)
+ DEFINES += _CRT_SECURE_NO_WARNINGS
+ DEFINES += _CRT_NONSTDC_NO_DEPRECATE
+ DEFINES += ENABLE_NETCDF4
+ DEFINES += HAVE_NETCDF4_H
+ DEFINES += NEED_STRCASECMP
+ DEFINES += NEED_STRCASESTR
+}
diff --git a/qt/tst_nco_c++/tst_nco_c++.vcxproj b/qt/tst_nco_c++/tst_nco_c++.vcxproj
index ef54d5c..34e9b26 100644
--- a/qt/tst_nco_c++/tst_nco_c++.vcxproj
+++ b/qt/tst_nco_c++/tst_nco_c++.vcxproj
@@ -1,87 +1,86 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{43F93DE1-97C5-31A5-8DC1-5B291B295868}</ProjectGuid>
+    <ProjectGuid>{0F656B77-3E08-343A-96F8-2875D7A0B3D0}</ProjectGuid>
     <RootNamespace>tst_nco_c++</RootNamespace>
     <Keyword>Qt4VSv1.0</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <OutputDirectory>debug\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</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>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <OutputDirectory>release\</OutputDirectory>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <PlatformToolSet>v120</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>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings" />
-  <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>
-  <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>
   <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>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.exe</TargetExt>
-    <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>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">tst_nco_c++</TargetName>
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
     <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)'=='Debug|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>..\..\src\nco_c++;$(HEADER_NETCDF);$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>debug\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <CompileAs>CompileAsCpp</CompileAs>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DebugInformationFormat>None</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;QT_DLL;%(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>
       <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>../libnco_c++/debug/libnco_c++.lib;$(LIB_NETCDF);$(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>
@@ -93,37 +92,35 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_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>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>"..\..\src\nco_c++";"$(HEADER_NETCDF)";$(QTDIR)\mkspecs\default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>-Zm200 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
-      <AssemblerListingLocation>release\</AssemblerListingLocation>
+      <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>
       <BrowseInformation>false</BrowseInformation>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <CompileAs>CompileAsCpp</CompileAs>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <ExceptionHandling>Sync</ExceptionHandling>
       <ObjectFileName>$(IntDir)</ObjectFileName>
-      <Optimization>MaxSpeed</Optimization>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;ENABLE_NETCDF4;HAVE_NETCDF4_H;NEED_STRCASECMP;NEED_STRCASESTR;NDEBUG;QT_DLL;%(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>false</TreatWChar_tAsBuiltInType>
+      <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)</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>
@@ -135,7 +132,7 @@
       <WarningLevel>0</WarningLevel>
     </Midl>
     <ResourceCompile>
-      <PreprocessorDefinitions>_CONSOLE;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;_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>
   <ItemGroup>
@@ -145,7 +142,7 @@
   <ImportGroup Label="ExtensionTargets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties QtVersion_x0020_Win32="$(DefaultQtVersion)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" />
+      <UserProperties UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" Qt5Version_x0020_Win32="msvc2013" />
     </VisualStudio>
   </ProjectExtensions>
 </Project>
\ No newline at end of file
diff --git a/src/nco++/Makefile.old b/src/nco++/Makefile.old
index 8d77945..09290e1 100644
--- a/src/nco++/Makefile.old
+++ b/src/nco++/Makefile.old
@@ -3,7 +3,7 @@
 # Purpose: Makefile for NCO C++ directory nco++
 # Requires GNU Make---AT&T Make chokes on GNU syntax
 
-# Copyright (C) 1994--2015 Charlie Zender
+# Copyright (C) 1994--2016 Charlie Zender
 # License: GNU General Public License (GPL) Version 3
 # See http://www.gnu.org/copyleft/gpl.html for full license text
 
@@ -35,10 +35,10 @@
 # Cygwin on Windows Vista systems:
 # cd ~/nco/src/nco++;ANTLR='antlr' make -f Makefile.old GSL=Y OPTS=D NETCDF4=Y UDUNITS=Y all;cd -
 
-# NB: ncap2 requires ANTLR headers and library
+# NB: ncap2 requires ANTLR 2.7.7 headers and library
 # http://www.antlr.org
 # sudo apt-get install antlr libantlr-dev
-# sudo yum install antlr-2.7.5-1.i586.rpm      
+# sudo dnf install antlr-2.7.5-1.i586.rpm      
 
 # In rule 
 # foobar.o : foo.c bar.c
diff --git a/src/nco++/fmc_all_cls.cc b/src/nco++/fmc_all_cls.cc
index 0c57568..64d926c 100644
--- a/src/nco++/fmc_all_cls.cc
+++ b/src/nco++/fmc_all_cls.cc
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF arithmetic processor class methods: families of functions/methods */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -75,6 +75,7 @@
       fmc_vtr.push_back( fmc_cls("sqravg",this,(int)PSQRAVG));
       fmc_vtr.push_back( fmc_cls("total",this,(int)PTTL));
       fmc_vtr.push_back( fmc_cls("ttl",this,(int)PTTL));
+      fmc_vtr.push_back( fmc_cls("sum",this,(int)PTTL));
     }
   }		      
 		      
@@ -171,7 +172,7 @@
                 var=ncap_var_udf("~dot_methods");  
                 // deal with average over all dims or scalar var
                 else if( nbr_dim==0 || dmn_vtr.size()== 0 || dmn_vtr.size()==nbr_dim)  
-                var=ncap_sclr_var_mk(static_cast<std::string>("~dot_methods"),var1->type,false);    
+                var=ncap_sclr_var_mk(SCS("~dot_methods"),var1->type,false);    
                 else {
                     // cast a variable with the correct dims in the correct order
                     dim=var1->dim;
@@ -412,7 +413,7 @@
       // Initial scan
       if(prs_arg->ntl_scn) 
         if(var_tmp)  
-	  var_ret= ncap_sclr_var_mk(static_cast<std::string>
+	  var_ret= ncap_sclr_var_mk(SCS
 ("~utility_function"),var_tmp->type,false);
         else
 	  var_ret=ncap_var_udf("~utility_function");
@@ -423,7 +424,7 @@
            // nb ncap_sclr_var_mk() calls nco_mss_val_mk() and fills var_ret with the default fill value
            // for that type.  So if the var has no missing value then this is the value returned 
            // Default fill  values are defined in  netcdf.h . 
-           var_ret=ncap_sclr_var_mk(static_cast<std::string>("~utility_function"),var_tmp->type,true);
+           var_ret=ncap_sclr_var_mk(SCS("~utility_function"),var_tmp->type,true);
            if(var_tmp->has_mss_val)
              (void)memcpy(var_ret->val.vp, var_tmp->mss_val.vp,nco_typ_lng(var_tmp->type)); 
         }else{          
@@ -441,7 +442,7 @@
 
     if(prs_arg->ntl_scn) {
       if(var) var=nco_var_free(var);
-      return ncap_sclr_var_mk(static_cast<std::string>("~utility_function"),(nc_type)NC_INT,false);  
+      return ncap_sclr_var_mk(SCS("~utility_function"),(nc_type)NC_INT,false);  
     }
 
 
@@ -449,7 +450,7 @@
     if(!Nvar ){
        wrn_prn(fnc_nm,sfnm+" unable to find variable: "+va_nm); 
        if(var) var=nco_var_free(var);
-       return ncap_sclr_var_mk(static_cast<std::string>("~utility_function"),(nco_int)rval);        
+       return ncap_sclr_var_mk(SCS("~utility_function"),(nco_int)rval);        
     }
 
 
@@ -556,7 +557,7 @@
 
     }// end switch
 
-    return ncap_sclr_var_mk(static_cast<std::string>("~utility_function"),(nco_int)rval);        
+    return ncap_sclr_var_mk(SCS("~utility_function"),(nco_int)rval);        
 
   }// end function
 
@@ -592,7 +593,7 @@ var_sct * utl_cls::is_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls &
 
     if(prs_arg->ntl_scn){
        nco_var_free(var);     
-       return ncap_sclr_var_mk(static_cast<std::string>("~utility_function"),styp,false);         
+       return ncap_sclr_var_mk(SCS("~utility_function"),styp,false);         
     }  
 
     // from now on dealing with a final scan !!
@@ -616,9 +617,9 @@ var_sct * utl_cls::is_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls &
     nco_var_free(var); 
 
     if(styp==NC_UINT64) 
-       return ncap_sclr_var_mk(static_cast<std::string>("~utility_function"),(nco_uint64)icnt);
+       return ncap_sclr_var_mk(SCS("~utility_function"),(nco_uint64)icnt);
     else 
-      return ncap_sclr_var_mk(static_cast<std::string>("~utility_function"),(nco_int)icnt);
+      return ncap_sclr_var_mk(SCS("~utility_function"),(nco_int)icnt);
 }  
     
 
@@ -709,7 +710,7 @@ var_sct * utl_cls::is_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls &
       var1=walker.out(tr) ;
       var1=nco_var_free(var1);
       }
-      return ncap_sclr_var_mk(static_cast<std::string>("~basic_function"),(nc_type)NC_INT,false);        
+      return ncap_sclr_var_mk(SCS("~basic_function"),(nc_type)NC_INT,false);        
     }
        
     // from here on dealing with final scan
@@ -738,7 +739,7 @@ var_sct * utl_cls::is_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls &
       }   
       
       if(var1) nco_var_free(var1);    
-      return ncap_sclr_var_mk(static_cast<std::string>("~basic_function"),(nco_int)iret);
+      return ncap_sclr_var_mk(SCS("~basic_function"),(nco_int)iret);
     }
 
      
@@ -751,15 +752,15 @@ var_sct * utl_cls::is_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls &
       switch(fdx){ 
            case PSIZE:
              if(mp_typ==NC_UINT64) 
-               var=ncap_sclr_var_mk(static_cast<std::string>("~basic_function"),(nco_uint64)var1->sz);
+               var=ncap_sclr_var_mk(SCS("~basic_function"),(nco_uint64)var1->sz);
              else 
-               var=ncap_sclr_var_mk(static_cast<std::string>("~basic_function"),(nco_int)var1->sz);
+               var=ncap_sclr_var_mk(SCS("~basic_function"),(nco_int)var1->sz);
              break;
            case PTYPE:
-             var=ncap_sclr_var_mk(static_cast<std::string>("~basic_function"),(nco_int)var1->type);
+             var=ncap_sclr_var_mk(SCS("~basic_function"),(nco_int)var1->type);
              break;
            case PNDIMS:
-             var=ncap_sclr_var_mk(static_cast<std::string>("~basic_function"),(nco_int)var1->nbr_dim);            
+             var=ncap_sclr_var_mk(SCS("~basic_function"),(nco_int)var1->nbr_dim);            
 
       } // end switch        
       
@@ -1105,7 +1106,7 @@ var_sct * utl_cls::is_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls &
 		std::vector<std::string> cst_vtr;
 
                 for(idx=0 ; idx<nbr_dim ; idx++)
-                  cst_vtr.push_back( static_cast<std::string>((dmn_vtr[idx]->nm)));
+                  cst_vtr.push_back( SCS((dmn_vtr[idx]->nm)));
 
                 var_out=ncap_cst_mk(cst_vtr,prs_arg);
                 var_out=nco_var_cnf_typ(var_in->type,var_out);
@@ -1920,6 +1921,16 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
 
 		var=walker.out(vtr_args[0]);
 		
+        #ifdef ENABLE_NETCDF4
+        { /* scope for fl_fmt temporary */
+            int fl_fmt; 
+            (void)nco_inq_format(walker.prs_arg->out_id,&fl_fmt);
+            if(fl_fmt==NC_FORMAT_NETCDF4 || fl_fmt==NC_FORMAT_NETCDF4_CLASSIC)
+                mp_typ=NC_UINT64;
+            else    
+                mp_typ=NC_INT;   
+        } /* end scope */
+        #endif 
 
 
 
@@ -1934,7 +1945,7 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
 		else
 		{	
        // create empty var to return
-       var_out=ncap_sclr_var_mk("~agg_idx_cls at methods",mp_typ,false);          
+       var_out=ncap_sclr_var_mk(SCS("~zz at value_list"),mp_typ,false);          
 	    var_out->sz=var->nbr_dim;
 		}
        nco_var_free(var);
@@ -1943,7 +1954,9 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
 		
     nbr_dim=var->nbr_dim;       
 	// create return attribute/var	
-	var_out=ncap_sclr_var_mk("~zz at value_list",NC_UINT64,true);          
+	var_out=ncap_sclr_var_mk(SCS("~zz at value_list"),NC_UINT64,true);          
+    var_out->has_dpl_dmn=-1;
+ 
 	ncap_att_stretch(var_out, nbr_dim); 
     cast_void_nctype(NC_UINT64,&var_out->val); 
 
@@ -2044,7 +2057,7 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
     
     
    sz_dim=1L;  
-   // convert idx_min into multiple indices  
+   // convert my_index into multiple indices  
    for(idx=0;idx<nbr_dim;idx++)
       sz_dim*= var->cnt[idx]; 
 
@@ -2055,21 +2068,8 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
     }
 
     cast_nctype_void(NC_UINT64,&var_out->val);
-    
-    mp_typ=NC_INT;
-    #ifdef ENABLE_NETCDF4
-    { /* scope for fl_fmt temporary */
-        int fl_fmt; 
-        (void)nco_inq_format(walker.prs_arg->out_id,&fl_fmt);
-        if(fl_fmt==NC_FORMAT_NETCDF4 || fl_fmt==NC_FORMAT_NETCDF4_CLASSIC)
-            mp_typ=NC_UINT64;
-        else    
-            mp_typ=NC_INT;   
-     } /* end scope */
-
-     #endif 
-
-     if(var_out->type != mp_typ) 
+
+    if(var_out->type != mp_typ) 
          nco_var_cnf_typ(mp_typ,var_out); 
 
      nco_var_free(var);
@@ -2882,7 +2882,7 @@ double bil_cls::clc_lin_ipl(double x1,double x2, double x, double Q0,double Q1){
   if(prs_arg->ntl_scn  ){
     nco_var_free(var1);
     nco_var_free(var2);
-    return ncap_sclr_var_mk(static_cast<std::string>("~coord_function"),(nc_type)NC_INT,false);  ;
+    return ncap_sclr_var_mk(SCS("~coord_function"),(nc_type)NC_INT,false);  ;
   }
 
 
@@ -2938,7 +2938,7 @@ double bil_cls::clc_lin_ipl(double x1,double x2, double x, double Q0,double Q1){
   nco_var_free(var1);   
   nco_var_free(var2);
 
-  return ncap_sclr_var_mk(static_cast<std::string>("~coord_function"),(nco_int)lret);        
+  return ncap_sclr_var_mk(SCS("~coord_function"),(nco_int)lret);        
   }
 
 
@@ -3324,6 +3324,246 @@ double bil_cls::clc_lin_ipl(double x1,double x2, double x, double Q0,double Q1){
     return var_out;
   } // end  
 
+
+
+  vlist_cls::vlist_cls(bool flg_dbg){
+    //Populate only on first constructor call
+    if(fmc_vtr.empty()){
+      fmc_vtr.push_back( fmc_cls("join",this,(int)PJOIN));
+    }
+  }
+
+
+  var_sct *vlist_cls::fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker){
+  const std::string fnc_nm("vlist_cls::fnd");
+  int idx;
+  int fdx;
+  int nbr_args;
+  int nbr_dim;         
+  char *cstr;
+  std::string susg;
+  std::string sfnm=fmc_obj.fnm();
+  var_sct *var;
+  var_sct *var_att;
+
+
+  RefAST aRef;
+  RefAST tr;
+  std::vector<RefAST> vtr_args; 
+  prs_cls *prs_arg=walker.prs_arg;
+  std::vector<std::string> str_vtr;
+          
+  fdx=fmc_obj.fdx();
+
+
+  // Put args into vector 
+  if(expr)
+    vtr_args.push_back(expr);
+
+  if(tr=fargs->getFirstChild())
+  {
+    do  
+      vtr_args.push_back(tr);
+    while(tr=tr->getNextSibling());    
+  } 
+            
+  nbr_args=vtr_args.size();  
+
+  susg="usage: att_out="+sfnm+"(att_id, att_nm|var_nm|string)";
+
+  if(nbr_args!=2)
+    err_prn(sfnm, " Function has been called with wrong number of arguments arguments\n"+susg); 
+
+
+  // inital scan just return udf
+  if(prs_arg->ntl_scn)
+  {
+   var=ncap_var_udf("~zz at join_methods");  
+   return var;
+  }
+
+  var_att=walker.out(vtr_args[0]);
+
+  if(!var_att )
+     err_prn(sfnm, " first argument has evaluated to null\n"+susg); 
+
+  if( var_att->type != NC_STRING && var_att->type != NC_CHAR )
+    err_prn(sfnm, " first argument must be of character string type and NOT("+nbr2sng(var_att->type)+")\n"+susg); 
+
+
+  ncap_att_str(var_att, str_vtr); 
+  
+  // deal with second argument    
+  aRef=vtr_args[1];
+  switch(aRef->getType())
+  {
+    case VAR_ID:
+      str_vtr.push_back(aRef->getText());
+      break;
+
+    case ATT_ID: 
+      {
+	var_sct *var_arg;
+        var_arg=walker.out(aRef); 
+        ncap_att_str(var_arg, str_vtr); 
+        nco_var_free(var_arg);    
+      }
+      break;
+
+    case NSTRING:
+    case N4STRING:
+      str_vtr.push_back(aRef->getText());
+      break;  
+   
+    default:
+       err_prn(sfnm, " problem with second argument, must be a var_nm or a string or a string in an attribute  "+susg);      
+    
+  }
+
+  // create output attribute
+  var=ncap_sclr_var_mk("~zz at join_methods",(nc_type)NC_STRING,true);
+
+  // stretch att if necessary
+  if(str_vtr.size() >1 )
+     ncap_att_stretch(var, str_vtr.size()); 
+  
+  (void)cast_void_nctype((nc_type)NC_STRING,&var->val);
+
+  for(idx=0;idx<str_vtr.size();idx++)
+  { 
+    cstr=strdup(str_vtr[idx].c_str());
+    var->val.sngp[idx]=cstr;  
+  }
+
+  (void)cast_nctype_void((nc_type)NC_STRING,&var->val);
+
+  
+  nco_var_free(var_att);
+
+  return var;
+
+}
+
+
+//Derived Aggregate Functions /************************************************/
+
+  aggd_cls::aggd_cls(bool flg_dbg){
+    //Populate only on first constructor call
+    if(fmc_vtr.empty()){
+      fmc_vtr.push_back( fmc_cls("ncap_stats_wvariance",this,(int)PWVARIANCE));
+    }
+  }		      
+
+  var_sct *aggd_cls::fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker){
+  const std::string fnc_nm("aggd_cls::fnd");
+  int fdx;
+  int nbr_args;
+  int idx;
+  int nbr_dim;
+  int avg_nbr_dim; 
+           
+  std::string susg;
+  std::string sfnm=fmc_obj.fnm();
+  std::vector<RefAST> vtr_args;             
+  RefAST aRef;
+  RefAST tr;
+
+  // de-reference 
+  ddra_info_sct ddra_info;        
+  prs_cls *prs_arg=walker.prs_arg;
+  var_sct *var_weight;
+  var_sct *var_weight_sum;
+  var_sct *var_weight_avg;
+  var_sct *var_in;
+  var_sct *var_out;
+
+  fdx=fmc_obj.fdx();
+ 
+ 
+  // Put args into vector 
+  if(expr)
+    vtr_args.push_back(expr);
+
+  if(tr=fargs->getFirstChild()) {
+    do  
+      vtr_args.push_back(tr);
+    while(tr=tr->getNextSibling());    
+  } 
+      
+  nbr_args=vtr_args.size();  
+
+  susg="usage var_out="+sfnm+"(var, weight)";
+
+  if(nbr_args!=2)
+    err_prn(sfnm, " Function has been called with no arguments\n"+susg); 
+
+          
+  var_in=walker.out(vtr_args[0]);   
+  var_weight=walker.out(vtr_args[1]);   
+
+  // deal with initial scan
+  if(prs_arg->ntl_scn)
+  {
+    if(var_in->undefined)
+       var_out=ncap_var_udf("~aggd_methods");   
+    else
+       var_out=ncap_sclr_var_mk(SCS("~aggd_methods"),var_in->type,false);       
+  
+    nco_var_free(var_in);
+    nco_var_free(var_weight);  
+    return var_out; 
+     
+  }
+  
+  /* nco stript we are implementing 
+  
+     (S1)  sum_weights = weights2.ttl();
+     (S2)  weighted_avg = (weights2*var).ttl()/sum_weights;
+     (S3)  anomaly = var - weighted_avg;
+     (S3)  numerator = (weights2*anomaly*anomaly).ttl();
+     (s4)  variance = numerator/sum_weights;
+     std = variance.sqrt();
+  */
+
+
+  // make weight same type as var_in
+  var_weight=nco_var_cnf_typ(var_in->type,var_weight);         
+  
+  // make vars conform or die 
+  if( !ncap_var_stretch(&var_in,&var_weight) )
+    err_prn(sfnm ,"unable to make weight var conform to input var");
+
+  // [S1] single value - duplicate is destroyed
+  var_weight_sum=nco_var_avg(nco_var_dpl(var_weight),var_weight->dim,var_weight->nbr_dim ,nco_op_ttl,False,&ddra_info);
+
+  // [S2] single value - duplicate is destroyed
+  var_weight_avg = nco_var_avg(  ncap_var_var_stc( nco_var_dpl(var_weight), var_in, TIMES), var_weight->dim, var_weight->nbr_dim, nco_op_ttl,False,&ddra_info);
+
+  // [S2] single value
+  var_weight_avg = ncap_var_var_stc ( var_weight_avg, var_weight_sum, DIVIDE);  
+
+
+  // [S2a] stretch var_weight_avg so it CONFORMS to var_in
+  (void)ncap_att_stretch(var_weight_avg, var_in->sz);
+  
+  // [S3] var_weight destroyed in this operation
+  var_out = nco_var_avg( ncap_var_var_stc( var_weight, ncap_var_var_stc( ncap_var_var_stc(var_in,var_weight_avg,MINUS), NULL_CEWI, VSQR2 ), TIMES ), var_weight->dim, var_weight->nbr_dim, nco_op_ttl,False,&ddra_info);
+
+  // [S4]
+  var_out= ncap_var_var_stc( var_out, var_weight_sum, DIVIDE);       
+                                 
+  nco_var_free(var_weight_avg);
+  nco_var_free(var_weight_sum);
+  nco_var_free(var_in);
+
+  return var_out;
+
+ }
+
+
+
+
+
 /* ncap2 functions and methods */
 
 /* To avoid confusion when I say FUNC (uppercase) I mean a custom ncap2 function.
@@ -3413,3 +3653,6 @@ double bil_cls::clc_lin_ipl(double x1,double x2, double x, double Q0,double Q1){
  It takes two fragments of the the parse tree ( expr, fargs) and returns a var_sct. 
  
  If expr is null then it is A FUNC else its a METHOD */
+
+
+
diff --git a/src/nco++/fmc_all_cls.hh b/src/nco++/fmc_all_cls.hh
index a41208c..2c5712c 100644
--- a/src/nco++/fmc_all_cls.hh
+++ b/src/nco++/fmc_all_cls.hh
@@ -1,6 +1,6 @@
 /* Purpose: netCDF arithmetic processor class methods */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -239,4 +239,29 @@ public:
   var_sct *fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker);
 };
 
+
+// var list class /*********************************************************/
+class vlist_cls: public vtl_cls {
+private:
+   enum {PJOIN };
+   bool _flg_dbg;
+public:
+  vlist_cls(bool flg_dbg);
+  var_sct *fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker);
+};
+
+
+// derived aggregate Functions /***************************************/
+class aggd_cls: public vtl_cls {
+private:
+  enum{ PWVARIANCE};
+  bool _flg_dbg;
+public:
+  aggd_cls(bool flg_dbg);
+  var_sct *fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker);
+};
+
+
+
+
 #endif // FMC_ALL_CLS_HH
diff --git a/src/nco++/fmc_cls.hh b/src/nco++/fmc_cls.hh
index 45d480e..942a69c 100644
--- a/src/nco++/fmc_cls.hh
+++ b/src/nco++/fmc_cls.hh
@@ -1,6 +1,6 @@
 /* Purpose: netCDF arithmetic processor class methods */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco++/fmc_gsl_cls.cc b/src/nco++/fmc_gsl_cls.cc
index 0f9cf4e..0604e27 100644
--- a/src/nco++/fmc_gsl_cls.cc
+++ b/src/nco++/fmc_gsl_cls.cc
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF arithmetic processor class methods for GSL */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -117,10 +117,10 @@ void gsl_cls::gsl_ini_sf(void) {
     gpr_vtr.push_back(gpr_cls("gsl_sf_debye_3",f_unn(gsl_sf_debye_3_e),hnd_fnc_x,NC_DOUBLE));
     gpr_vtr.push_back(gpr_cls("gsl_sf_debye_4",f_unn(gsl_sf_debye_4_e),hnd_fnc_x,NC_DOUBLE));
 
-# if NCO_GSL_MINOR_VERSION >= 8
+# if NCO_GSL_VERSION >= 108
       gpr_vtr.push_back(gpr_cls("gsl_sf_debye_5",f_unn(gsl_sf_debye_5_e),hnd_fnc_x,NC_DOUBLE));
       gpr_vtr.push_back(gpr_cls("gsl_sf_debye_6",f_unn(gsl_sf_debye_6_e),hnd_fnc_x,NC_DOUBLE));
-# endif // NCO_GSL_MINOR_VERSION < 8
+# endif // NCO_GSL_VERSION < 8
     
     // Dilogarithm
     // not implemented as all involve complex numbers
@@ -131,10 +131,10 @@ void gsl_cls::gsl_ini_sf(void) {
     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Kcomp",f_unn(gsl_sf_ellint_Kcomp_e),hnd_fnc_nd,P1DBLMD));
     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Ecomp",f_unn(gsl_sf_ellint_Ecomp_e),hnd_fnc_nd,P1DBLMD));
 
-# if NCO_GSL_MINOR_VERSION >= 9 
+# if NCO_GSL_VERSION >= 109 
       gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Pcomp",f_unn(gsl_sf_ellint_Pcomp_e),hnd_fnc_nd,P2DBLMD));
       gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Dcomp",f_unn(gsl_sf_ellint_Dcomp_e),hnd_fnc_nd,P1DBLMD));
-# endif // NCO_GSL_MINOR_VERSION < 9
+# endif // NCO_GSL_VERSION < 9
  
     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_F",f_unn(gsl_sf_ellint_F_e),hnd_fnc_nd,P2DBLMD));
     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_E",f_unn(gsl_sf_ellint_E_e),hnd_fnc_nd,P2DBLMD));
@@ -178,10 +178,10 @@ void gsl_cls::gsl_ini_sf(void) {
     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_E1_scaled",f_unn(gsl_sf_expint_E1_scaled_e),hnd_fnc_x,NC_DOUBLE));
     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_E2_scaled",f_unn(gsl_sf_expint_E2_scaled_e),hnd_fnc_x,NC_DOUBLE));
 
-# if NCO_GSL_MINOR_VERSION >= 10 
+# if NCO_GSL_VERSION >= 110 
       gpr_vtr.push_back(gpr_cls("gsl_sf_expint_En",f_unn(gsl_sf_expint_En_e),hnd_fnc_xd,NC_INT));
       gpr_vtr.push_back(gpr_cls("gsl_sf_expint_En_scaled",f_unn(gsl_sf_expint_En_scaled_e),hnd_fnc_xd,NC_INT));
-# endif // NCO_GSL_MINOR_VERSION < 10
+# endif // NCO_GSL_VERSION < 10
 
     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_Ei",f_unn(gsl_sf_expint_Ei_e),hnd_fnc_x,NC_DOUBLE));
     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_Ei_scaled",f_unn(gsl_sf_expint_Ei_scaled_e),hnd_fnc_x,NC_DOUBLE));
@@ -271,10 +271,17 @@ void gsl_cls::gsl_ini_sf(void) {
     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Q1",f_unn(gsl_sf_legendre_Q1_e),hnd_fnc_x,NC_DOUBLE));
     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Ql",f_unn(gsl_sf_legendre_Ql_e),hnd_fnc_xd,NC_INT));
     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Plm",f_unn(gsl_sf_legendre_Plm_e),hnd_fnc_iid));
+
+    #if NCO_GSL_VERSION < 200    
     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Plm_array",f_unn(gsl_sf_legendre_Plm_array),hnd_fnc_iidpd,PLEGEND));
+    #endif
     // gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Plm_deriv_array",f_unn(gsl_sf_legendre_Plm_deriv_array),));
     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_sphPlm",f_unn(gsl_sf_legendre_sphPlm_e),hnd_fnc_iid));
+
+    #if NCO_GSL_VERSION < 200    
     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_sphPlm_array",f_unn(gsl_sf_legendre_sphPlm_array),hnd_fnc_iidpd,PLEGEND));
+    #endif
+
     // gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_sphPlm_deriv_array",f_unn(gsl_sf_legendre_sphPlm_deriv_array),));
     // gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_array_size",f_unn(gsl_sf_legendre_array_size),));
     gpr_vtr.push_back(gpr_cls("gsl_sf_conicalP_half",f_unn(gsl_sf_conicalP_half_e),hnd_fnc_nd,P2DBL));
@@ -309,9 +316,9 @@ void gsl_cls::gsl_ini_sf(void) {
     // gpr_vtr.push_back(gpr_cls("gsl_sf_complex_psi",f_unn(gsl_sf_complex_psi_e),hnd_fnc_x,NC_DOUBLE));
     gpr_vtr.push_back(gpr_cls("gsl_sf_psi_1_int",f_unn(gsl_sf_psi_1_int_e),hnd_fnc_x,NC_INT));
    
-# if NCO_GSL_MINOR_VERSION >= 5 
+# if NCO_GSL_VERSION >= 105 
       gpr_vtr.push_back(gpr_cls("gsl_sf_psi_1",f_unn(gsl_sf_psi_1_e),hnd_fnc_x,NC_DOUBLE));
-# endif // NCO_GSL_MINOR_VERSION < 5
+# endif // NCO_GSL_VERSION < 105
 
     gpr_vtr.push_back(gpr_cls("gsl_sf_psi_n",f_unn(gsl_sf_psi_n_e),hnd_fnc_xd,NC_INT));
     
@@ -332,10 +339,10 @@ void gsl_cls::gsl_ini_sf(void) {
     gpr_vtr.push_back(gpr_cls("gsl_sf_zeta_int",f_unn(gsl_sf_zeta_int_e),hnd_fnc_x,NC_INT));
     gpr_vtr.push_back(gpr_cls("gsl_sf_zeta",f_unn(gsl_sf_zeta_e),hnd_fnc_x,NC_DOUBLE));
 
-# if NCO_GSL_MINOR_VERSION >= 5 
+# if NCO_GSL_VERSION >= 105 
       gpr_vtr.push_back(gpr_cls("gsl_sf_zetam1",f_unn(gsl_sf_zetam1_e),hnd_fnc_x,NC_DOUBLE));
       gpr_vtr.push_back(gpr_cls("gsl_sf_zetam1_int",f_unn(gsl_sf_zetam1_int_e),hnd_fnc_x,NC_INT));
-# endif // NCO_GSL_MINOR_VERSION < 5
+# endif // NCO_GSL_VERSION < 105
     
     gpr_vtr.push_back(gpr_cls("gsl_sf_hzeta",f_unn(gsl_sf_hzeta_e),hnd_fnc_nd,P2DBL));
     gpr_vtr.push_back(gpr_cls("gsl_sf_eta_int",f_unn(gsl_sf_eta_int_e),hnd_fnc_x,NC_INT));
@@ -386,7 +393,7 @@ void gsl_cls::gsl_ini_cdf(void){
     gpr_vtr.push_back(gpr_cls("gsl_cdf_exponential_Q",f_unn(gsl_cdf_exponential_Q),hnd_fnc_nd,P2DBLX));
     gpr_vtr.push_back(gpr_cls("gsl_cdf_exponential_Pinv",f_unn(gsl_cdf_exponential_Pinv),hnd_fnc_nd,P2DBLX));
     gpr_vtr.push_back(gpr_cls("gsl_cdf_exponential_Qinv",f_unn(gsl_cdf_exponential_Qinv),hnd_fnc_nd,P2DBLX));
-# if NCO_GSL_MINOR_VERSION >= 6
+# if NCO_GSL_VERSION >= 106
     gpr_vtr.push_back(gpr_cls("gsl_cdf_exppow_P",f_unn(gsl_cdf_exppow_P),hnd_fnc_nd,P3DBLX));
     gpr_vtr.push_back(gpr_cls("gsl_cdf_exppow_Q",f_unn(gsl_cdf_exppow_Q),hnd_fnc_nd,P3DBLX));
 # endif
@@ -397,10 +404,10 @@ void gsl_cls::gsl_ini_cdf(void){
 
     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_P",f_unn(gsl_cdf_fdist_P),hnd_fnc_nd,P3DBLX));
     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_Q",f_unn(gsl_cdf_fdist_Q),hnd_fnc_nd,P3DBLX));
-# if NCO_GSL_MINOR_VERSION >= 8 
+# if NCO_GSL_VERSION >= 108 
     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_Pinv",f_unn(gsl_cdf_fdist_Pinv),hnd_fnc_nd,P3DBLX));
     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_Qinv",f_unn(gsl_cdf_fdist_Qinv),hnd_fnc_nd,P3DBLX));
-# endif // NCO_GSL_MINOR_VERSION < 8
+# endif // NCO_GSL_VERSION < 8
 
     gpr_vtr.push_back(gpr_cls("gsl_cdf_beta_P",f_unn(gsl_cdf_beta_P),hnd_fnc_nd,P3DBLX));
     gpr_vtr.push_back(gpr_cls("gsl_cdf_beta_Q",f_unn(gsl_cdf_beta_Q),hnd_fnc_nd,P3DBLX));
@@ -474,7 +481,7 @@ void gsl_cls::gsl_ini_ran(void){
   gpr_vtr.push_back(gpr_cls("gsl_ran_beta_pdf",f_unn(gsl_ran_beta_pdf),hnd_fnc_nd,P3DBLX));
 
   gpr_vtr.push_back(gpr_cls("gsl_ran_binomial",f_unn(gsl_ran_binomial),hnd_fnc_udrdu));
-# if NCO_GSL_MINOR_VERSION >= 7 
+# if NCO_GSL_VERSION >= 107 
   gpr_vtr.push_back(gpr_cls("gsl_ran_binomial_knuth",f_unn(gsl_ran_binomial_knuth),hnd_fnc_udrdu));
 # endif
   gpr_vtr.push_back(gpr_cls("gsl_ran_binomial_tpe",f_unn(gsl_ran_binomial_tpe),hnd_fnc_udrdu));
@@ -508,16 +515,18 @@ void gsl_cls::gsl_ini_ran(void){
   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma",f_unn(gsl_ran_gamma),hnd_fnc_rnd,P2DBLX));
   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_int",f_unn(gsl_ran_gamma_int),hnd_fnc_ru));
   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_pdf",f_unn(gsl_ran_gamma_pdf),hnd_fnc_nd,P3DBLX));
-# if NCO_GSL_MINOR_VERSION >= 8 
+# if NCO_GSL_VERSION >= 108 
   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_mt",f_unn(gsl_ran_gamma_mt),hnd_fnc_rnd,P2DBLX));
   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_knuth",f_unn(gsl_ran_gamma_knuth),hnd_fnc_rnd,P2DBLX));
-# endif // NCO_GSL_MINOR_VERSION < 8
+# endif // NCO_GSL_VERSION < 108
 
   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian",f_unn(gsl_ran_gaussian),hnd_fnc_rnd,P1DBLX));
   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian_ratio_method",f_unn(gsl_ran_gaussian_ratio_method),hnd_fnc_rnd,P1DBLX));
-# if NCO_GSL_MINOR_VERSION >= 8 
+
+# if NCO_GSL_VERSION >= 108 
   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian_ziggurat",f_unn(gsl_ran_gaussian_ziggurat),hnd_fnc_rnd,P1DBLX));
 # endif // NCO_GSL_MINOR_VERSION < 8
+
   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian_pdf",f_unn(gsl_ran_gaussian_pdf),hnd_fnc_nd,P2DBLX));
 
   gpr_vtr.push_back(gpr_cls("gsl_ran_ugaussian",f_unn(gsl_ran_ugaussian),hnd_fnc_rnd,P0DBLX));
@@ -747,9 +756,11 @@ void gsl_cls::gsl_ini_stats(void){
   }
 
   gpr_vtr.push_back(gpr_cls("gsl_stats_covariance",f_unn(ncap_void),hnd_fnc_stat4,PS_COV));
-# if NCO_GSL_MINOR_VERSION >= 10
+
+# if NCO_GSLVERSION >= 110
   gpr_vtr.push_back(gpr_cls("gsl_stats_correlation",f_unn(ncap_void),hnd_fnc_stat4,PS_COR));
-# endif // NCO_GSL_MINOR_VERSION < 10
+# endif // NCO_GSL_VERSION < 110
+
   gpr_vtr.push_back(gpr_cls("gsl_stats_pvariance",f_unn(ncap_void),hnd_fnc_stat4,PS_PVAR));
   gpr_vtr.push_back(gpr_cls("gsl_stats_ttest",f_unn(ncap_void),hnd_fnc_stat4,PS_TTST));
 
@@ -1154,7 +1165,7 @@ var_sct *gsl_cls::hnd_fnc_iidpd(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
     else     
       (void)prs_arg->ncap_var_write(var_out,false); 
     
-    return ncap_sclr_var_mk(static_cast<std::string>("~gsl_function"),(nc_type)NC_INT,false); 
+    return ncap_sclr_var_mk(SCS("~gsl_function"),(nc_type)NC_INT,false); 
   }
   
   // Do the real thing 
@@ -1222,7 +1233,7 @@ var_sct *gsl_cls::hnd_fnc_iidpd(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
     // Free args                
     for(idx=0;idx<3;idx++) (void)nco_var_free(var_arr[idx]);
     
-    var_tmp=ncap_sclr_var_mk(static_cast<std::string>("~gsl_function"),(nco_int)status);
+    var_tmp=ncap_sclr_var_mk(SCS("~gsl_function"),(nco_int)status);
   }  
   // return status
   return var_tmp;
@@ -1280,7 +1291,7 @@ var_sct *gsl_cls::hnd_fnc_idpd(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cls
     else     
       (void)prs_arg->ncap_var_write(var_out,false); 
     
-    return ncap_sclr_var_mk(static_cast<std::string>("~gsl_function"),(nc_type)NC_INT,false);   
+    return ncap_sclr_var_mk(SCS("~gsl_function"),(nc_type)NC_INT,false);   
   } 
   
   // Do the real thing 
@@ -1337,7 +1348,7 @@ var_sct *gsl_cls::hnd_fnc_idpd(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cls
     (void)nco_var_free(var_arr[0]);
     (void)nco_var_free(var_arr[1]);
     
-    var_tmp=ncap_sclr_var_mk(static_cast<std::string>("~gsl_function"),(nco_int)status);
+    var_tmp=ncap_sclr_var_mk(SCS("~gsl_function"),(nco_int)status);
   }  
   return var_tmp;
 } // end function hnd_fnc_idpd
@@ -3049,7 +3060,7 @@ var_sct *gsl_cls::hnd_fnc_stat1(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
  var[0]=nco_var_free(var[0]);
 
 
- return ncap_sclr_var_mk(static_cast<std::string>("~gsl_stt2_function"),r_val);  
+ return ncap_sclr_var_mk(SCS("~gsl_stt2_function"),r_val);  
 }
 
 
@@ -3183,7 +3194,7 @@ var_sct *gsl_cls::hnd_fnc_stat2(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
     var_arr[idx]=nco_var_free(var_arr[idx]);
    
 
- return ncap_sclr_var_mk(static_cast<std::string>("~gsl_stt2_function"),r_val);  
+ return ncap_sclr_var_mk(SCS("~gsl_stt2_function"),r_val);  
 
 }
 
@@ -3329,7 +3340,7 @@ var_sct *gsl_cls::hnd_fnc_stat3(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
 #endif /* !ENABLE_NETCDF4 */
      default: nco_dfl_case_nc_type_err(); break;    
     } 
-    var_ret=ncap_sclr_var_mk(static_cast<std::string>("~gsl_stt3_function"),r_val);    
+    var_ret=ncap_sclr_var_mk(SCS("~gsl_stt3_function"),r_val);    
    } break;  
    
     
@@ -3361,7 +3372,7 @@ var_sct *gsl_cls::hnd_fnc_stat3(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
 #endif /* !ENABLE_NETCDF4 */
      default: nco_dfl_case_nc_type_err(); break;    
      } 
-    var_ret=ncap_sclr_var_mk(static_cast<std::string>("~gsl_stt3_function"),r_val);    
+    var_ret=ncap_sclr_var_mk(SCS("~gsl_stt3_function"),r_val);    
    } break;  
    
     
@@ -3620,7 +3631,7 @@ var_sct *gsl_cls::hnd_fnc_stat4(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
      default: nco_dfl_case_nc_type_err(); break;    
      }  break;  
   
-# if NCO_GSL_MINOR_VERSION >= 10
+# if NCO_GSL_VERSION >= 110
    case PS_COR:
      switch(var_arr[0]->type){
        case NC_FLOAT:  r_val=gsl_stats_float_correlation( var_arr[0]->val.fp,d1_srd,var_arr[3]->val.fp,d2_srd,sz1 );break;
@@ -3730,7 +3741,7 @@ var_sct *gsl_cls::hnd_fnc_stat4(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
     var_arr[idx]=nco_var_free(var_arr[idx]);
 
 
-  return ncap_sclr_var_mk(static_cast<std::string>("~gsl_stt2_function"),r_val);  
+  return ncap_sclr_var_mk(SCS("~gsl_stt2_function"),r_val);  
 
 
 }
@@ -3793,7 +3804,7 @@ var_sct *gsl_cls::hnd_fnc_stat4(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
       switch(fdx) {
        case  PGSL_RNG_MIN:
        case  PGSL_RNG_MAX:
-        return ncap_sclr_var_mk(static_cast<std::string>("~gsl2_functions"),(nc_type)NC_DOUBLE,false);        
+        return ncap_sclr_var_mk(SCS("~gsl2_functions"),(nc_type)NC_DOUBLE,false);        
         break;
       
        case PGSL_RNG_NAME:
@@ -3810,14 +3821,14 @@ var_sct *gsl_cls::hnd_fnc_stat4(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
     switch(fdx){ 
            case PGSL_RNG_MIN:
              vlng= gsl_rng_min(ncap_rng);
-             var=ncap_sclr_var_mk(static_cast<std::string>("~gsl2_function"),(double)(vlng));
+             var=ncap_sclr_var_mk(SCS("~gsl2_function"),(double)(vlng));
              break;
            case PGSL_RNG_MAX:
              vlng= gsl_rng_max(ncap_rng);
-             var=ncap_sclr_var_mk(static_cast<std::string>("~gsl2_function"),(double)(vlng));
+             var=ncap_sclr_var_mk(SCS("~gsl2_function"),(double)(vlng));
              break;
            case PGSL_RNG_NAME:
-	    //var=ncap_sclr_var_mk(static_cast<std::string>("~gsl2_functions"),(nco_int)var1->nbr_dim);            
+	    //var=ncap_sclr_var_mk(SCS("~gsl2_functions"),(nco_int)var1->nbr_dim);            
 	    break;
 
     }// end switch        
@@ -4167,7 +4178,7 @@ var_sct *gsl_cls::hnd_fnc_stat4(bool& is_mtd,std::vector<RefAST>&args_vtr,gpr_cl
 
 
 
-    return ncap_sclr_var_mk(static_cast<std::string>("~gsl_stt2_function"),r_val);  
+    return ncap_sclr_var_mk(SCS("~gsl_stt2_function"),r_val);  
 
 }
 
diff --git a/src/nco++/fmc_gsl_cls.hh b/src/nco++/fmc_gsl_cls.hh
index 11cff2d..b77c9d5 100644
--- a/src/nco++/fmc_gsl_cls.hh
+++ b/src/nco++/fmc_gsl_cls.hh
@@ -1,6 +1,6 @@
 /* Purpose: netCDF arithmetic processor class methods */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -40,11 +40,11 @@
 #include "ncap2_utl.hh"
 #include "vtl_cls.hh"
 
-#ifndef NCO_GSL_MINOR_VERSION
+#ifndef NCO_GSL_VERSION
 #ifdef _MSC_VER
-# define NCO_GSL_MINOR_VERSION 7
+# define NCO_GSL_VERSION 107
 #else
-# define NCO_GSL_MINOR_VERSION 12
+# define NCO_GSL_VERSION 112
 #endif // _MSC_VER
 #endif // NCO_GSL_MINOR_VERSION
 
diff --git a/src/nco++/libnco++.hh b/src/nco++/libnco++.hh
index 4c5981e..55e6fb0 100644
--- a/src/nco++/libnco++.hh
+++ b/src/nco++/libnco++.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Prototypes, typedefs, and global variables for libnco++
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco++/ncap2.cc b/src/nco++/ncap2.cc
index 8e5bdda..6d69edc 100644
--- a/src/nco++/ncap2.cc
+++ b/src/nco++/ncap2.cc
@@ -4,7 +4,7 @@
 
 /* Purpose: Compute user-defined derived fields using forward algebraic notation applied to netCDF files */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
@@ -516,7 +516,9 @@ main(int argc,char **argv)
   cnv_cls cnv_obj(true);
   // Aggregate functions
   agg_cls agg_obj(true);
-    // Aggregate  index functions
+  // derived  aggregate functions
+  aggd_cls aggd_obj(true);
+  // Aggregate  index functions
   agg_idx_cls agg_idx_obj(true);
   // Utility Functions 
   utl_cls utl_obj(true);
@@ -544,10 +546,13 @@ main(int argc,char **argv)
   cod_cls cod_obj(true); 
   // misc functions
   misc_cls misc_obj(true); 
+  // string list functions
+  vlist_cls vlist_obj(true);
 
   // Populate vector
   (void)pop_fmc_vtr(fmc_vtr,&cnv_obj);
   (void)pop_fmc_vtr(fmc_vtr,&agg_obj);
+  (void)pop_fmc_vtr(fmc_vtr,&aggd_obj);
   (void)pop_fmc_vtr(fmc_vtr,&agg_idx_obj);
   (void)pop_fmc_vtr(fmc_vtr,&utl_obj);
   (void)pop_fmc_vtr(fmc_vtr,&mth_obj);
@@ -562,6 +567,7 @@ main(int argc,char **argv)
   (void)pop_fmc_vtr(fmc_vtr,&bil_obj);
   (void)pop_fmc_vtr(fmc_vtr,&cod_obj);
   (void)pop_fmc_vtr(fmc_vtr,&misc_obj);
+  (void)pop_fmc_vtr(fmc_vtr,&vlist_obj);
 
 #ifdef ENABLE_GSL
 # ifdef ENABLE_NCO_GSL
diff --git a/src/nco++/ncap2_utl.cc b/src/nco++/ncap2_utl.cc
index f32e5c7..fcc14c0 100644
--- a/src/nco++/ncap2_utl.cc
+++ b/src/nco++/ncap2_utl.cc
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF arithmetic processor */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -143,9 +143,9 @@ ncap_att_stretch /* stretch a single valued attribute from 1 to sz */
     (void)cast_void_nctype((nc_type)NC_STRING,&var->val);
     
     for(idx=0;idx<nw_sz;idx++)
-      sng_cp[idx]=strdup(var->val.sngp[0]);    
+      sng_cp[idx]=(char*)NC_FILL_STRING;    
     
-    nco_free(var->val.sngp[0]);  
+    //nco_free(var->val.sngp[0]);  
     (void)cast_nctype_void((nc_type)NC_STRING,&var->val);
     vp=(void*)sng_cp;
     
@@ -364,6 +364,44 @@ ncap_att_prn     /* [fnc] Print a single attribute*/
   
 } /* end ncap_att_prn() */
 
+
+int          /* number appended */ 
+ncap_att_str /* extract string(s) from a NC_CHAR or NC_STRING type attribute */
+(var_sct *var_att, 
+ std::vector<std::string> &str_vtr)
+{
+  int idx;
+  int srt_size=str_vtr.size();  
+  char *cstr;
+  
+  (void)cast_void_nctype((nc_type)var_att->type,&var_att->val);
+
+  if(var_att->type==NC_STRING)
+  {
+
+    for(idx=0;idx<var_att->sz;idx++)
+    {  
+      cstr=var_att->val.sngp[idx];
+      str_vtr.push_back(cstr);
+    }     
+
+  }
+
+  if(var_att->type==NC_CHAR)
+  { 
+    char buffer[NC_MAX_NAME+1];
+    strncpy(buffer, var_att->val.cp, var_att->sz);        
+    buffer[var_att->sz+1]='\0'; 
+    str_vtr.push_back(buffer);
+  } 
+  (void)cast_nctype_void((nc_type)var_att->type,&var_att->val);
+  
+  return (str_vtr.size() - srt_size);  
+
+
+
+}
+
 var_sct * /* O [sct] Remainder of modulo operation of input variables (var1%var2) */
 ncap_var_var_mod /* [fnc] Remainder (modulo) operation of two variables */
 (var_sct *var1, /* I [sc,t] Variable structure containing field */
@@ -964,7 +1002,6 @@ ncap_var_stretch /* [fnc] Stretch variables */
 	  //(void)fprintf(stdout,"%s: ERROR %s and template %s share no dimensions\n",nco_prg_nm_get(),var_lsr->nm,var_gtr->nm);
 	  //nco_exit(EXIT_FAILURE);
 	}else{
-	  if(nco_dbg_lvl_get() >= 1) 
 	    wrn_prn(fnc_nm,std::string(var_lsr->nm)+ " and " +std::string(var_gtr->nm) +" share no dimensions. Attempting to convolve..."); 
 	  //(void)fprintf(stdout,"\n%s: DEBUG %s and %s share no dimensions: Attempting to convolve...\n",nco_prg_nm_get(),var_lsr->nm,var_gtr->nm);
 	  CONVOLVE=True;
@@ -1021,8 +1058,7 @@ ncap_var_stretch /* [fnc] Stretch variables */
   if(var_lsr_out == NULL_CEWI && CONVOLVE){
     /* Convolve variables by returned stretched variables with minimum possible number of dimensions */
     int dmn_nbr; /* Number of dimensions in convolution */
-    if(nco_dbg_lvl_get() >= 1) 
-      dbg_prn(fnc_nm,"Convolution not yet implemented, results of operation between " +std::string(var_lsr->nm) 
+    dbg_prn(fnc_nm,"Convolution not yet implemented, results of operation between " +std::string(var_lsr->nm) 
               + " and "+std::string(var_gtr->nm) + "are unpredictable");
     //(void)fprintf(stdout,"\n%s: WARNING Convolution not yet implemented, results of operation between %s and %s are unpredictable\n",nco_prg_nm_get(),var_lsr->nm,var_gtr->nm);
     /* Dimensions in convolution are union of dimensions in variables */
diff --git a/src/nco++/ncap2_utl.hh b/src/nco++/ncap2_utl.hh
index 70e68bd..38a1d02 100644
--- a/src/nco++/ncap2_utl.hh
+++ b/src/nco++/ncap2_utl.hh
@@ -24,7 +24,7 @@
 #include <string.h> /* strcmp. . . */
 #include <time.h> /* machine time */
 #ifndef _MSC_VER
-# include <unistd.h> /* POSIX stuff */
+#include <unistd.h> /* POSIX stuff */
 #endif
 #if !(defined __xlC__) && !(defined SGIMP64) // C++ compilers that do not allow stdint.h
 #include <stdint.h> // Required by g++ for LLONG_MAX, ULLONG_MAX, by icpc for int64_t
@@ -63,6 +63,9 @@
 /* Temporary fix for now !!*/
 #define nco_bool int
 
+// Compress  code a little
+#define SCS(x)  static_cast<std::string>(x)     
+
 /* Used to do an pre-mpi sort */
  typedef struct exp_sct_tag { 
   ANTLR_USE_NAMESPACE(antlr)RefAST etr;
@@ -124,6 +127,11 @@ ncap_att_prn
 (var_sct *var, 
  char *const att_in_sng);
 
+int                 /* number appended */ 
+ncap_att_str        /* extract string(s) from a NC_CHAR or NC_STRING type attribute */
+(var_sct *var_att,  /* I [sct] input attribute */
+ std::vector<std::string> &str_vtr);
+
 var_sct *   /* O [sct] Remainder of modulo operation of input variables (var_1%var_2) */
 ncap_var_var_mod /* [fnc] Remainder (modulo) operation of two variables */
 (var_sct *var_1, /* I [sc,t] Variable structure containing field */
diff --git a/src/nco++/ncoEnumTokenTypes.hpp b/src/nco++/ncoEnumTokenTypes.hpp
index 505c397..8ecbbba 100644
--- a/src/nco++/ncoEnumTokenTypes.hpp
+++ b/src/nco++/ncoEnumTokenTypes.hpp
@@ -13,114 +13,115 @@
 		BLOCK = 5,
 		ARG_LIST = 6,
 		DMN_LIST = 7,
-		DMN_ARG_LIST = 8,
-		LMT_LIST = 9,
-		VALUE_LIST = 10,
-		FUNC_ARG = 11,
-		LMT = 12,
-		EXPR = 13,
-		FEXPR = 14,
-		POST_INC = 15,
-		POST_DEC = 16,
-		UTIMES = 17,
-		PROP = 18,
-		FOR2 = 19,
-		NORET = 20,
-		ATAN2 = 21,
-		WHERE_ASSIGN = 22,
-		MISS2ZERO = 23,
-		VSORT = 24,
-		VRSORT = 25,
-		VABS = 26,
-		VSQR2 = 27,
-		DEFDIM = 28,
-		SEMI = 29,
-		DEFDIMA = 30,
-		DEFDIMU = 31,
-		LPAREN = 32,
-		NSTRING = 33,
-		COMMA = 34,
-		RPAREN = 35,
-		WHILE = 36,
-		BREAK = 37,
-		CONTINUE = 38,
-		IF = 39,
-		ELSE = 40,
-		WHERE = 41,
-		ELSEWHERE = 42,
-		PRINT = 43,
-		VAR_ID = 44,
-		ATT_ID = 45,
-		LCURL = 46,
-		RCURL = 47,
-		FOR = 48,
-		COLON = 49,
-		LSQUARE = 50,
-		DIM_ID = 51,
-		RSQUARE = 52,
-		DIVIDE = 53,
-		DIM_MTD_ID = 54,
-		CALL_REF = 55,
-		DOT = 56,
-		FUNC = 57,
-		INC = 58,
-		DEC = 59,
-		LNOT = 60,
-		PLUS = 61,
-		MINUS = 62,
-		TIMES = 63,
-		CARET = 64,
-		MOD = 65,
-		FLTHAN = 66,
-		FGTHAN = 67,
-		LTHAN = 68,
-		GTHAN = 69,
-		GEQ = 70,
-		LEQ = 71,
-		EQ = 72,
-		NEQ = 73,
-		LAND = 74,
-		LOR = 75,
-		QUESTION = 76,
-		ASSIGN = 77,
-		PLUS_ASSIGN = 78,
-		MINUS_ASSIGN = 79,
-		TIMES_ASSIGN = 80,
-		DIVIDE_ASSIGN = 81,
-		FLOAT = 82,
-		DOUBLE = 83,
-		INT = 84,
-		BYTE = 85,
-		UBYTE = 86,
-		SHORT = 87,
-		USHORT = 88,
-		UINT = 89,
-		INT64 = 90,
-		UINT64 = 91,
-		N4STRING = 92,
-		DIM_ID_SIZE = 93,
-		NRootAST = 94,
-		SHIFTL = 95,
-		SHIFTR = 96,
-		QUOTE = 97,
-		DGT = 98,
-		LPH = 99,
-		LPHDGT = 100,
-		XPN = 101,
-		VAR_NM_QT = 102,
-		BLASTOUT = 103,
-		UNUSED_OPS = 104,
-		WS = 105,
-		CXX_COMMENT = 106,
-		C_COMMENT = 107,
-		NUMBER_DOT = 108,
-		NUMBER = 109,
-		VAR_ATT = 110,
-		VAR_ATT_QT = 111,
-		DIM_QT = 112,
-		DIM_VAL = 113,
-		INCLUDE = 114,
-		LMT_DMN = 115,
+		DMN_LIST_P = 8,
+		DMN_ARG_LIST = 9,
+		LMT_LIST = 10,
+		VALUE_LIST = 11,
+		FUNC_ARG = 12,
+		LMT = 13,
+		EXPR = 14,
+		FEXPR = 15,
+		POST_INC = 16,
+		POST_DEC = 17,
+		UTIMES = 18,
+		PROP = 19,
+		FOR2 = 20,
+		NORET = 21,
+		ATAN2 = 22,
+		WHERE_ASSIGN = 23,
+		MISS2ZERO = 24,
+		VSORT = 25,
+		VRSORT = 26,
+		VABS = 27,
+		VSQR2 = 28,
+		DEFDIM = 29,
+		SEMI = 30,
+		DEFDIMA = 31,
+		DEFDIMU = 32,
+		LPAREN = 33,
+		NSTRING = 34,
+		COMMA = 35,
+		RPAREN = 36,
+		WHILE = 37,
+		BREAK = 38,
+		CONTINUE = 39,
+		IF = 40,
+		ELSE = 41,
+		WHERE = 42,
+		ELSEWHERE = 43,
+		PRINT = 44,
+		VAR_ID = 45,
+		ATT_ID = 46,
+		LCURL = 47,
+		RCURL = 48,
+		FOR = 49,
+		COLON = 50,
+		LSQUARE = 51,
+		DIM_ID = 52,
+		RSQUARE = 53,
+		DIVIDE = 54,
+		DIM_MTD_ID = 55,
+		CALL_REF = 56,
+		DOT = 57,
+		FUNC = 58,
+		INC = 59,
+		DEC = 60,
+		LNOT = 61,
+		PLUS = 62,
+		MINUS = 63,
+		TIMES = 64,
+		CARET = 65,
+		MOD = 66,
+		FLTHAN = 67,
+		FGTHAN = 68,
+		LTHAN = 69,
+		GTHAN = 70,
+		GEQ = 71,
+		LEQ = 72,
+		EQ = 73,
+		NEQ = 74,
+		LAND = 75,
+		LOR = 76,
+		QUESTION = 77,
+		ASSIGN = 78,
+		PLUS_ASSIGN = 79,
+		MINUS_ASSIGN = 80,
+		TIMES_ASSIGN = 81,
+		DIVIDE_ASSIGN = 82,
+		NCAP_FLOAT = 83,
+		NCAP_DOUBLE = 84,
+		NCAP_INT = 85,
+		NCAP_BYTE = 86,
+		NCAP_UBYTE = 87,
+		NCAP_SHORT = 88,
+		NCAP_USHORT = 89,
+		NCAP_UINT = 90,
+		NCAP_INT64 = 91,
+		NCAP_UINT64 = 92,
+		N4STRING = 93,
+		DIM_ID_SIZE = 94,
+		NRootAST = 95,
+		SHIFTL = 96,
+		SHIFTR = 97,
+		QUOTE = 98,
+		DGT = 99,
+		LPH = 100,
+		LPHDGT = 101,
+		XPN = 102,
+		VAR_NM_QT = 103,
+		BLASTOUT = 104,
+		UNUSED_OPS = 105,
+		WS = 106,
+		CXX_COMMENT = 107,
+		C_COMMENT = 108,
+		NUMBER_DOT = 109,
+		NUMBER = 110,
+		VAR_ATT = 111,
+		VAR_ATT_QT = 112,
+		DIM_QT = 113,
+		DIM_VAL = 114,
+		INCLUDE = 115,
+		LMT_DMN = 116,
 		NULL_TREE_LOOKAHEAD = 3
 	};
 #endif /*INC_ncoEnumTokenTypes_hpp_*/
diff --git a/src/nco++/ncoGrammer.g b/src/nco++/ncoGrammer.g
index a3cfc12..a6bff1e 100644
--- a/src/nco++/ncoGrammer.g
+++ b/src/nco++/ncoGrammer.g
@@ -3,7 +3,7 @@ header {
 
 /* Purpose: ANTLR Grammar and support files for ncap2 */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -58,6 +58,7 @@ tokens {
     BLOCK;
     ARG_LIST;
     DMN_LIST;
+    DMN_LIST_P;
     DMN_ARG_LIST;
     LMT_LIST;
     VALUE_LIST;
@@ -159,8 +160,13 @@ lmt_list: LPAREN! lmt (COMMA! lmt)*  RPAREN!
 // Use vars in dimension list so dims in [] can
 // be used with or with out $ prefix. ie "$lon" or "lon" 
 // So parser is compatible with ncap1
-dmn_list:
+dmn_list_p:
    LSQUARE! (VAR_ID|DIM_ID) (COMMA! (VAR_ID|DIM_ID))* RSQUARE!
+      { #dmn_list_p = #( [DMN_LIST_P, "dmn_list_p"], #dmn_list_p ); }
+    ;
+
+dmn_list:
+   LPAREN! DIM_ID (COMMA! DIM_ID)* RPAREN!
       { #dmn_list = #( [DMN_LIST, "dmn_list"], #dmn_list ); }
     ;
 
@@ -182,7 +188,7 @@ func_arg:  LPAREN! (arg_list)? (COMMA! arg_list)*   RPAREN!
       { #func_arg = #( [FUNC_ARG, "func_arg"], #func_arg ); }
      ;   
 
-hyper_slb: (VAR_ID^ |ATT_ID ^) (lmt_list|dmn_list)?
+hyper_slb: (VAR_ID^ |ATT_ID ^) (lmt_list|dmn_list|dmn_list_p)?
      ;
 
 // call by reference - prefix &
@@ -264,18 +270,18 @@ ass_expr: cond_expr ( ( ASSIGN^
 expr:   ass_expr
     ;    
         
-    
+// 20151021 csz Prefixed some tokens with NCO_ to prevent namespace conflicts with MSVC definitions in windef.h    
 primary_exp
-    : FLOAT
-    | DOUBLE
-    | INT
-    | BYTE
-    | UBYTE    
-    | SHORT
-    | USHORT
-    | UINT
-    | INT64
-    | UINT64
+    : NCAP_FLOAT
+    | NCAP_DOUBLE
+    | NCAP_INT
+    | NCAP_BYTE
+    | NCAP_UBYTE    
+    | NCAP_SHORT
+    | NCAP_USHORT
+    | NCAP_UINT
+    | NCAP_INT64
+    | NCAP_UINT64
     | NSTRING
     | N4STRING    
     | DIM_ID_SIZE
@@ -499,28 +505,28 @@ C_COMMENT options {paraphrase="a C-style comment"; }
 // csz: Treat "l" or "L" following decimal point as "long double" as per C++
 NUMBER_DOT options {paraphrase="a floating point number"; } 
     :
-      '.' (DGT)+ (XPN)? { $setType(DOUBLE); }  
-      ( ('D'|'d')!     {  $setType(DOUBLE);}
-       |('F'|'f')!     {  $setType(FLOAT);}
-       |('L'|'l')!     {  $setType(DOUBLE);}
+      '.' (DGT)+ (XPN)? { $setType(NCAP_DOUBLE); }  
+      ( ('D'|'d')!     {  $setType(NCAP_DOUBLE);}
+       |('F'|'f')!     {  $setType(NCAP_FLOAT);}
+       |('L'|'l')!     {  $setType(NCAP_DOUBLE);}
       )?        
     ;
 
 NUMBER:
-	(DGT)+	{ $setType(INT); }
-	( ( '.'  (DGT)* ((XPN)? | ('L'|'l')! )) { $setType(DOUBLE); } // 3.14e0, 3.14L, 3.14l
-       | (XPN)         { $setType(DOUBLE);} // 3e0
-       | ('L'|'l')!    { $setType(INT);   } // 3l, 3L
-       | ('S'|'s')!    { $setType(SHORT); } // 3s, 3S
-       | ('B'|'b')!    { $setType(BYTE);  } // 3b, 3B
-       | ("UB"|"ub")!  { $setType(UBYTE); } // 3ub, 3UB
-       | ("US"|"us")!  { $setType(USHORT); } // 3us, 3US
-       | ('U'|'u'|"UL"|"ul")!    { $setType(UINT); } // 3u, 3U, 3ul, 3UL
-       | ("LL"|"ll")!  { $setType(INT64); } // 3ll, 3LL
-       | ("ULL"|"ull")!  { $setType(UINT64); } // 3ull, 3ULL
+	(DGT)+	{ $setType(NCAP_INT); }
+	( ( '.'  (DGT)* ((XPN)? | ('L'|'l')! )) { $setType(NCAP_DOUBLE); } // 3.14e0, 3.14L, 3.14l
+       | (XPN)         { $setType(NCAP_DOUBLE);} // 3e0
+       | ('L'|'l')!    { $setType(NCAP_INT);   } // 3l, 3L
+       | ('S'|'s')!    { $setType(NCAP_SHORT); } // 3s, 3S
+       | ('B'|'b')!    { $setType(NCAP_BYTE);  } // 3b, 3B
+       | ("UB"|"ub")!  { $setType(NCAP_UBYTE); } // 3ub, 3UB
+       | ("US"|"us")!  { $setType(NCAP_USHORT); } // 3us, 3US
+       | ('U'|'u'|"UL"|"ul")!    { $setType(NCAP_UINT); } // 3u, 3U, 3ul, 3UL
+       | ("LL"|"ll")!  { $setType(NCAP_INT64); } // 3ll, 3LL
+       | ("ULL"|"ull")!  { $setType(NCAP_UINT64); } // 3ull, 3ULL
     )?
-    (    ('F'|'f')!    { $setType(FLOAT); } // 3F, 3f
-       | ('D'|'d')!    { $setType(DOUBLE);} // 3D, 3d
+    (    ('F'|'f')!    { $setType(NCAP_FLOAT); } // 3F, 3f
+       | ('D'|'d')!    { $setType(NCAP_DOUBLE);} // 3D, 3d
     )?        
 ;
 
@@ -542,6 +548,10 @@ VAR_ATT options {testLiterals=true; paraphrase="variable or function or attribut
                  bDoSearch=false;
                  $setType(ATT_ID);
                  break;    
+               case '[':
+                 bDoSearch=false;
+                 $setType(VAR_ID); 
+                 break;   
                default: 
                  bDoSearch=false;
                  $setType(VAR_ID);
@@ -571,6 +581,17 @@ VAR_ATT_QT :( '\''!)
              ('\''!)
    ;     
 
+// return a STR_ATT_ID
+STR_ATT_ID:  '@'(LPH)(LPH|DGT)* {$setType(STR_ATT_ID);}
+;
+
+// Return a quoted STR_ATT_ID
+STR_ATT_QT :( '\''!)
+              '@' VAR_NM_QT {$setType(STR_ATT_ID);}
+             ('\''!)
+;     
+
+
 //Return a quoted dim
 DIM_QT: ( '\''!)
            ('$'! VAR_NM_QT {$setType(DIM_ID);})
@@ -763,7 +784,6 @@ NcapVector<lmt_sct*> &lmt_vtr )
 	(void)cast_void_nctype((nc_type)NC_UINT64,&var->val);
 	sz=var->sz;
 	dmn_sz=var->sz / nbr_dmn;
-	
     
 
     // shape of var must be (nbr_dmn) or (nbr_dmn,2) or (nbr_dmn,3) 
@@ -921,17 +941,7 @@ if( nbr_dmn!=lmt_init(lmt,ast_lmt_vtr) )
    return true;;
 } /* end lmt_mk */
 
-/* Legacy run -- will remove soon
-public:
-    void run(RefAST tr){
-        while(tr) {
-          (void)statements(tr);   
-          tr=tr->getNextSibling();   
-        }
-    }
-*/
 
-public:
     void run_dbl(RefAST tr,int icnt){
      int idx=0;
      RefAST ntr=tr;
@@ -946,8 +956,17 @@ public:
         err_prn("run_dbl"," REPORTS given a null AST Refrence\n");
             
      //small list dont bother with double parsing     
-     if(icnt <4) goto small;
-
+     // just do a final parse
+     if(icnt <4){
+       //Final scan
+       prs_arg->ntl_scn=False;
+       while(idx++ < icnt){
+          (void)statements(ntr);   
+          ntr=ntr->getNextSibling();   
+       }
+       return; 
+     }
+     
      //Initial scan
      prs_arg->ntl_scn=True;
      while(idx++ < icnt){
@@ -963,42 +982,40 @@ public:
     // see if below does anything ? 
     (void)nco_sync(prs_arg->out_id); 
 
-
+    //Final scan
+    if(!prs_arg->NCAP_MPI_SORT)
+    { 
+      idx=0;
+      ntr=tr;
+      prs_arg->ntl_scn=False;
+      while(idx++ < icnt){
+        (void)statements(ntr);   
+        ntr=ntr->getNextSibling();   
+      }
+    }
+    else
+    {  
     // Sort expressions - MPI preparation
-    if(prs_arg->NCAP_MPI_SORT){  
        prs_arg->ntl_scn=False;
       // nb A vector of vectors
       std::vector< std::vector<RefAST> > all_ast_vtr;
       ncoTree **wlk_vtr=(ncoTree**)NULL; 
 
       // Populate and sort  vector 
-      (void)ncap_mpi_srt(tr,icnt,all_ast_vtr,prs_arg);
-       
+      (void)ncap_mpi_srt(tr,icnt,all_ast_vtr,prs_arg);   
       // Evaluate expressions (execute)
       (void)ncap_omp_exe(all_ast_vtr,wlk_vtr,0);  
-      
+
       /*  
       for(unsigned vtr_idx=0 ; vtr_idx<all_ast_vtr.size(); vtr_idx++)
         for(unsigned jdx=0 ; jdx<all_ast_vtr[vtr_idx].size(); jdx++)
 	     (void)statements(all_ast_vtr[vtr_idx][jdx]);
       */
-      
-    goto end;
-    } //end if
-
-small: 
-     idx=0;
-     ntr=tr;
-     //Final scan
-     prs_arg->ntl_scn=False;
-     while(idx++ < icnt){
-       (void)statements(ntr);   
-       ntr=ntr->getNextSibling();   
-     }
-end: ;
-   }
+    }
+    return; 
 
-public:
+    }
+ 
     int run_exe(RefAST tr, int nbr_dpt){
     // number of statements in block
     int nbr_stmt=0;
@@ -1057,7 +1074,6 @@ exit: return iret;
 
     } // end run_exe
 
-public:
 RefAST nco_dupList(RefAST tr){
       RefAST otr;  
       // nb astFactory is protected- must call from within class
@@ -1484,7 +1500,7 @@ var=NULL_CEWI;
                }
         }                    
  
-        | (#(VAR_ID DMN_LIST ))=> #(vid1:VAR_ID dmn:DMN_LIST){   
+        | (#(VAR_ID (DMN_LIST|DMN_LIST_P) ))=> #(vid1:VAR_ID dmn:.){   
                                
               int idx;
               std::string var_nm;
@@ -1554,33 +1570,48 @@ var=NULL_CEWI;
             }
 
           | vid2:VAR_ID {   
-              
+
+              var_sct *var_lhs=(var_sct*)NULL;              
+              var_sct *var_rhs=(var_sct*)NULL;              
               std::string var_nm;
               
               var_nm=vid2->getText();
 
               if(nco_dbg_lvl_get() >= nco_dbg_var) dbg_prn(fnc_nm,var_nm);
+      
+              // Set class wide variables           
+              bcst=false;
+              var_cst=NULL_CEWI; 
+              
+              // get shape from RHS
+              var_rhs=out(vid2->getNextSibling());
+           
+              // use init_chk() to avoid warning from ncap_var_init() if var not present  
+              if(prs_arg->ncap_var_init_chk(var_nm)) 
+                var_lhs=prs_arg->ncap_var_init(var_nm,false); 
 
-               var_sct *var1;
-               
-               // Set class wide variables           
-               bcst=false;
-               var_cst=NULL_CEWI; 
-             
-               // get shape from RHS
-               var1=out(vid2->getNextSibling());
-               (void)nco_free(var1->nm);                
-               var1->nm =strdup(var_nm.c_str());
-
-               //Copy return variable
-               var=nco_var_dpl(var1);
-                
-               // Write var to int_vtr
-               // if var already in int_vtr or var_vtr then write call does nothing
-               (void)prs_arg->ncap_var_write(var1,bram);
-               //(void)ncap_var_write_omp(var1,bram,prs_arg);
-        
-           } // end action
+              if(var_lhs)
+              {
+                 var=nco_var_dpl(var_lhs);
+                 (void)prs_arg->ncap_var_write(var_lhs,bram);
+                 nco_var_free(var_rhs); 
+              }
+              else if(var_rhs)
+              {
+                 //Copy return variable
+                 (void)nco_free(var_rhs->nm);                
+                 var_rhs->nm =strdup(var_nm.c_str());
+                 //Copy return variable
+                var=nco_var_dpl(var_rhs);
+                // Write var to int_vtr
+                // if var already in int_vtr or var_vtr then write call does nothing
+                (void)prs_arg->ncap_var_write(var_rhs,bram);
+              }   
+              else 
+              {               
+                var=ncap_var_udf(var_nm.c_str());   
+              }  
+        } // end action
        
    |   (#(ATT_ID LMT_LIST))=> #(att:ATT_ID LMT_LIST){
         ;
@@ -1811,7 +1842,7 @@ end0:         if(lmt->getNextSibling() && lmt->getNextSibling()->getType()==NORE
         } // end action
 
         // Deal with LHS casting 
-        | (#(VAR_ID DMN_LIST ))=> #(vid1:VAR_ID dmn:DMN_LIST){   
+        | (#(VAR_ID (DMN_LIST|DMN_LIST_P) ))=> #(vid1:VAR_ID dmn:.){   
 
               var_sct *var1;
               std::vector<std::string> str_vtr;
@@ -1892,49 +1923,64 @@ end0:         if(lmt->getNextSibling() && lmt->getNextSibling()->getType()==NORE
            
           | vid2:VAR_ID {   
                // Set class wide variables
-               var_sct *var1;
+               var_sct *var_lhs=(var_sct*)NULL;
+               var_sct *var_rhs=(var_sct*)NULL;
                NcapVar *Nvar;
                std::string var_nm;
  
                var_nm=vid2->getText();       
 
-              if(nco_dbg_lvl_get() >= nco_dbg_var) dbg_prn(fnc_nm,var_nm);
+               if(nco_dbg_lvl_get() >= nco_dbg_var) dbg_prn(fnc_nm,var_nm);
                
                bcst=false;
                var_cst=NULL_CEWI; 
               
-               var1=out(vid2->getNextSibling());
+               var_rhs=out(vid2->getNextSibling());
                
                // Save name 
-               std::string s_var_rhs(var1->nm);
-               (void)nco_free(var1->nm);                
-               var1->nm =strdup(var_nm.c_str());
+               std::string s_var_rhs(var_rhs->nm);
 
-               // Do attribute propagation only if
-               // var doesn't already exist or is defined but NOT
-               // populated
-               Nvar=prs_arg->var_vtr.find(vid2->getText());
-               //rcd=nco_inq_varid_flg(prs_arg->out_id,var1->nm ,&var_id);
+               Nvar=prs_arg->var_vtr.find(var_nm);
 
                if(!Nvar || (Nvar && Nvar->flg_stt==1))
-                 (void)ncap_att_cpy(var_nm,s_var_rhs,prs_arg);
-               
-                // var is defined and populated &  RHS is scalar -then stretch var to match
-               if(Nvar && Nvar->flg_stt==2) 
-                  if(var1->sz ==1 && Nvar->var->sz >1){
-                    var1=nco_var_cnf_typ(Nvar->var->type,var1);  
-                    (void)ncap_att_stretch(var1,Nvar->var->sz);
-                    
-                    // this is a special case -- if the RHS scalar has
-                    // no missing value then retain LHS missing value
-                    // else LHS missing value gets over written by RHS
-                    if(!var1->has_mss_val)
-                      (void)nco_mss_val_cp(Nvar->var,var1);   
-                  }
+                   (void)ncap_att_cpy(var_nm,s_var_rhs,prs_arg);
+
+               if(Nvar)
+                 var_lhs=nco_var_dpl(Nvar->var);
+               // use init_chk() to avoid warning from ncap_var_init() if var not present  
+               else if(prs_arg->ncap_var_init_chk(var_nm))
+                  var_lhs=prs_arg->ncap_var_init(var_nm,false); 
  
-               // Write var to disk
-               (void)prs_arg->ncap_var_write(var1,bram);
-               //(void)ncap_var_write_omp(var1,bram,prs_arg);
+               if(var_lhs)
+               {
+                   // var is defined and populated &  RHS is scalar -then stretch var to match
+                   var_rhs=nco_var_cnf_typ(var_lhs->type,var_rhs);   
+                   if(var_rhs->sz ==1 && var_lhs->sz >1)
+                   {
+                       (void)ncap_att_stretch(var_rhs,var_lhs->sz);
+                        // this is a special case -- if the RHS scalar has
+                        // no missing value then retain LHS missing value
+                        // else LHS missing value gets over written by RHS
+                        if(!var_rhs->has_mss_val)
+                         (void)nco_mss_val_cp(var_lhs,var_rhs);   
+                    }   
+
+                   if( var_rhs->sz != var_lhs->sz) 
+                       err_prn(fnc_nm,"regular assign - var size missmatch between \""+var_nm+"\" and RHS of expression");                        
+
+                   var_lhs->val.vp=var_rhs->val.vp;
+               
+                   var_rhs->val.vp=(void*)NULL;                
+                   nco_var_free(var_rhs);  
+                   // Write var to disk
+                   (void)prs_arg->ncap_var_write(var_lhs,bram);
+               }
+               else
+               {
+                   nco_free(var_rhs->nm);
+                   var_rhs->nm=strdup(var_nm.c_str());  
+                   (void)prs_arg->ncap_var_write(var_rhs,bram);  
+               }  
 
                 // See If we have to return something
                if(vid2->getFirstChild() && vid2->getFirstChild()->getType()==NORET)
@@ -1947,7 +1993,7 @@ end0:         if(lmt->getNextSibling() && lmt->getNextSibling()->getType()==NORE
    |   (#(ATT_ID LMT_LIST)) => #(att:ATT_ID LMT_LIST){
         ;
         } 
-   |   (#(ATT_ID LMT_DMN))=> #(att1:ATT_ID DMN_LIST){
+   |   (#(ATT_ID DMN_LIST))=> #(att1:ATT_ID DMN_LIST){
         ;
         } 
    |  att2:ATT_ID {
@@ -2338,35 +2384,35 @@ out returns [var_sct *var]
         }
 
         // Naked numbers: Cast is not applied to these numbers
-    |   val_float:FLOAT        
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~float"),(nc_type)NC_FLOAT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~float"),static_cast<float>(std::strtod(val_float->getText().c_str(),(char **)NULL)));} // end FLOAT
-    |   val_double:DOUBLE        
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~double"),(nc_type)NC_DOUBLE,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~double"),strtod(val_double->getText().c_str(),(char **)NULL));} // end DOUBLE
-	|	val_int:INT			
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~int"),(nc_type)NC_INT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~int"),static_cast<nco_int>(std::strtol(val_int->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end INT
-	|	val_short:SHORT			
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~short"),(nc_type)NC_SHORT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~short"),static_cast<nco_short>(std::strtol(val_short->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end SHORT
-    |	val_byte:BYTE			
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~byte"),(nc_type)NC_BYTE,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~byte"),static_cast<nco_byte>(std::strtol(val_byte->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end BYTE
+    |   val_float:NCAP_FLOAT  
+        {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)));} // end FLOAT
+    |   val_double:NCAP_DOUBLE        
+        {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));} // end DOUBLE
+	|	val_int:NCAP_INT
+        {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)));} // end INT
+	|	val_short:NCAP_SHORT
+        {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)));} // end SHORT
+    |	val_byte:NCAP_BYTE		
+        {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)));} // end BYTE
 // fxm TODO nco851: How to add ENABLE_NETCDF4 #ifdefs to ncoGrammer.g?
 // Workaround (permanent?) is to add stub netCDF4 forward compatibility prototypes to netCDF3 libnco
 // #ifdef ENABLE_NETCDF4
-	|	val_ubyte:UBYTE			
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~ubyte"),(nc_type)NC_UBYTE,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~ubyte"),static_cast<nco_ubyte>(std::strtoul(val_ubyte->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end UBYTE
+	|	val_ubyte:NCAP_UBYTE
+        {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)));} // end UBYTE
         // NB: sng2nbr converts "255" into nco_ubtye=2. This is not good.
-        //        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~ubyte"),(nc_type)NC_UBYTE,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~ubyte"),sng2nbr(val_ubyte->getText(),nco_ubyte_CEWI));} // end UBYTE
-	|	val_ushort:USHORT			
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~ushort"),(nc_type)NC_USHORT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~ushort"),static_cast<nco_ushort>(std::strtoul(val_ushort->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end USHORT
-	|	val_uint:UINT			
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~uint"),(nc_type)NC_UINT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~uint"),static_cast<nco_uint>(std::strtoul(val_uint->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end UINT
-	|	val_int64:INT64			
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~int64"),(nc_type)NC_INT64,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~int64"),sng2nbr(val_int64->getText(),nco_int64_CEWI));} // end INT64
+        //        {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"),sng2nbr(val_ubyte->getText(),nco_ubyte_CEWI));} // end UBYTE
+	|	val_ushort:NCAP_USHORT
+        {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)));} // end USHORT
+	|	val_uint:NCAP_UINT	
+        {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)));} // end UINT
+	|	val_int64:NCAP_INT64
+        {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));} // end INT64
         // std::strtoll() and std::strtoull() are not (yet) ISO C++ standard
-        //{if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~int64"),(nc_type)NC_INT64,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~int64"),static_cast<nco_int64>(std::strtoll(val_int64->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end INT64
-	|	val_uint64:UINT64
-        {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~uint64"),(nc_type)NC_UINT64,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~uint64"),sng2nbr(val_uint64->getText(),nco_uint64_CEWI));} // end UINT64
+        //{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"),static_cast<nco_int64>(std::strtoll(val_int64->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end INT64
+	|	val_uint64:NCAP_UINT64
+        {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));} // end UINT64
         // std::strtoll() and std::strtoull() are not (yet) ISO C++ standard
-        // {if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~uint64"),(nc_type)NC_UINT64,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~uint64"),static_cast<nco_uint64>(std::strtoull(val_uint64->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end UINT64
+        // {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"),static_cast<nco_uint64>(std::strtoull(val_uint64->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));} // end UINT64
 // #endif /* !ENABLE_NETCDF4 */
 
 ;
@@ -2673,8 +2719,6 @@ var_sct *var_rhs;
     long jdx;
     long sz;
     size_t slb_sz;
-    bool b_vp=false;
-    char *mss_cp;
 
     sz=var_lhs->sz;
     slb_sz=nco_typ_lng(var_lhs->type);
@@ -2686,50 +2730,22 @@ var_sct *var_rhs;
     cp_out=( char*)(var_lhs->val.vp);
     cp_in=( char*)(var_rhs->val.vp);
 
-    if(var_lhs->has_mss_val) {
-       mss_cp=( char*)var_lhs->mss_val.vp;
-       b_vp=true;
-    } else if(var_rhs->has_mss_val){
-       mss_cp=( char*)var_rhs->mss_val.vp;
-       b_vp=true;                 
-    }        
-    // missing values    
-    if(b_vp) {
-      if(var_rhs->sz==1L){ 
-
-        for(idx=0; idx<sz; idx++) {
-         if(sp[idx] && memcmp(cp_out,mss_cp,slb_sz))
-          (void)memcpy(cp_out,cp_in,slb_sz);       
-         cp_out+=slb_sz;
-        } 
-      } else {  
-        for(idx=0; idx<sz; idx++) {
-          if(sp[idx]&& memcmp(cp_out,mss_cp,slb_sz) 
-                    && memcmp(cp_in,mss_cp,slb_sz))
-            (void)memcpy(cp_out,cp_in,slb_sz);      
-          cp_out+=slb_sz;
-         cp_in+=slb_sz;
-        }
-      } 
-     // no missing values                
-     } else { 
-
-      if(var_rhs->sz==1L){ 
 
-        for(idx=0; idx<sz; idx++) {
-         if(sp[ idx])
+    if(var_rhs->sz==1L){ 
+      for(idx=0; idx<sz; idx++) {
+        if(sp[ idx])
           (void)memcpy(cp_out,cp_in,slb_sz);       
         cp_out+=slb_sz;
         } 
-      } else {  
+    }else{  
         for(idx=0; idx<sz; idx++) {
           if(sp[idx])
             (void)memcpy(cp_out,cp_in,slb_sz);      
           cp_out+=slb_sz;
          cp_in+=slb_sz;
         }
-      } 
-    }             
+    } 
+                    
 
    (void)cast_nctype_void(NC_SHORT,&var_msk->val); 
 
@@ -3221,10 +3237,12 @@ var=NULL_CEWI;
               // free var  
               (void)nco_var_free(var);    
                 
-              /* Casting a hyperslab --this makes my brain  hurt!!! */
-              if(bcst)
-                var1=ncap_cst_do(var1,var_cst,prs_arg->ntl_scn);
-
+              /* Casting a hyperslab --this makes my brain  hurt!!! 
+              if the var is already the correct size then do nothing 
+               what not even dimension reordering ?  */  
+              if(bcst && var1->sz != var_cst->sz)
+                 var1=ncap_cst_do(var1,var_cst,prs_arg->ntl_scn);
+              
               var=var1;
                 
            }else{
diff --git a/src/nco++/ncoLexer.cpp b/src/nco++/ncoLexer.cpp
index 315aec6..3be9457 100644
--- a/src/nco++/ncoLexer.cpp
+++ b/src/nco++/ncoLexer.cpp
@@ -30,19 +30,19 @@ ncoLexer::ncoLexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state)
 
 void ncoLexer::initLiterals()
 {
-	literals["<<"] = 95;
-	literals["for"] = 48;
-	literals["print"] = 43;
-	literals["defdimunlim"] = 31;
-	literals["where"] = 41;
-	literals["elsewhere"] = 42;
-	literals["continue"] = 38;
-	literals["while"] = 36;
-	literals[">>"] = 96;
-	literals["break"] = 37;
-	literals["if"] = 39;
-	literals["else"] = 40;
-	literals["defdim"] = 30;
+	literals["<<"] = 96;
+	literals["for"] = 49;
+	literals["print"] = 44;
+	literals["defdimunlim"] = 32;
+	literals["where"] = 42;
+	literals["elsewhere"] = 43;
+	literals["continue"] = 39;
+	literals["while"] = 37;
+	literals[">>"] = 97;
+	literals["break"] = 38;
+	literals["if"] = 40;
+	literals["else"] = 41;
+	literals["defdim"] = 31;
 }
 
 ANTLR_USE_NAMESPACE(antlr)RefToken ncoLexer::nextToken()
@@ -199,6 +199,12 @@ ANTLR_USE_NAMESPACE(antlr)RefToken ncoLexer::nextToken()
 				theRetToken=_returnToken;
 				break;
 			}
+			case 0x40 /* '@' */ :
+			{
+				mSTR_ATT_ID(true);
+				theRetToken=_returnToken;
+				break;
+			}
 			case 0x23 /* '#' */ :
 			{
 				mINCLUDE(true);
@@ -282,6 +288,10 @@ ANTLR_USE_NAMESPACE(antlr)RefToken ncoLexer::nextToken()
 					mVAR_ATT_QT(true);
 					theRetToken=_returnToken;
 				}
+				else if ((LA(1) == 0x27 /* '\'' */ ) && (LA(2) == 0x40 /* '@' */ )) {
+					mSTR_ATT_QT(true);
+					theRetToken=_returnToken;
+				}
 				else if ((LA(1) == 0x27 /* '\'' */ ) && (LA(2) == 0x24 /* '$' */ )) {
 					mDIM_QT(true);
 					theRetToken=_returnToken;
@@ -1175,18 +1185,18 @@ void ncoLexer::mXPN(bool _createToken) {
 	}
 	}
 	{ // ( ... )+
-	int _cnt140=0;
+	int _cnt143=0;
 	for (;;) {
 		if (((LA(1) >= 0x30 /* '0' */  && LA(1) <= 0x39 /* '9' */ ))) {
 			matchRange('0','9');
 		}
 		else {
-			if ( _cnt140>=1 ) { goto _loop140; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
+			if ( _cnt143>=1 ) { goto _loop143; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
 		}
 		
-		_cnt140++;
+		_cnt143++;
 	}
-	_loop140:;
+	_loop143:;
 	}  // ( ... )+
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
 	   _token = makeToken(_ttype);
@@ -1202,7 +1212,7 @@ void ncoLexer::mVAR_NM_QT(bool _createToken) {
 	ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
 	
 	{ // ( ... )+
-	int _cnt143=0;
+	int _cnt146=0;
 	for (;;) {
 		switch ( LA(1)) {
 		case 0x30 /* '0' */ :
@@ -1304,12 +1314,12 @@ void ncoLexer::mVAR_NM_QT(bool _createToken) {
 		}
 		default:
 		{
-			if ( _cnt143>=1 ) { goto _loop143; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
+			if ( _cnt146>=1 ) { goto _loop146; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
 		}
 		}
-		_cnt143++;
+		_cnt146++;
 	}
-	_loop143:;
+	_loop146:;
 	}  // ( ... )+
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
 	   _token = makeToken(_ttype);
@@ -1325,7 +1335,7 @@ void ncoLexer::mBLASTOUT(bool _createToken) {
 	ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
 	
 	matchNot(EOF/*_CHAR*/);
-#line 449 "ncoGrammer.g"
+#line 455 "ncoGrammer.g"
 	
 	// blast out of lexer & parser
 	// Can't use RecognitionException() as 
@@ -1340,7 +1350,7 @@ void ncoLexer::mBLASTOUT(bool _createToken) {
 	ANTLR_USE_NAMESPACE(antlr)RecognitionException re(os.str());
 	throw  ANTLR_USE_NAMESPACE(antlr)TokenStreamRecognitionException(re);
 	
-#line 1344 "ncoLexer.cpp"
+#line 1354 "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));
@@ -1382,7 +1392,7 @@ void ncoLexer::mUNUSED_OPS(bool _createToken) {
 	}
 	}
 	}
-#line 465 "ncoGrammer.g"
+#line 471 "ncoGrammer.g"
 	
 	
 	ostringstream os;
@@ -1392,7 +1402,7 @@ void ncoLexer::mUNUSED_OPS(bool _createToken) {
 	ANTLR_USE_NAMESPACE(antlr)RecognitionException re(os.str());
 	throw  ANTLR_USE_NAMESPACE(antlr)TokenStreamRecognitionException(re);
 	
-#line 1396 "ncoLexer.cpp"
+#line 1406 "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));
@@ -1416,9 +1426,9 @@ void ncoLexer::mWS(bool _createToken) {
 	case 0x9 /* '\t' */ :
 	{
 		match('\t' /* charlit */ );
-#line 478 "ncoGrammer.g"
+#line 484 "ncoGrammer.g"
 		tab();
-#line 1422 "ncoLexer.cpp"
+#line 1432 "ncoLexer.cpp"
 		break;
 	}
 	case 0xc /* '\14' */ :
@@ -1429,9 +1439,9 @@ void ncoLexer::mWS(bool _createToken) {
 	case 0xa /* '\n' */ :
 	{
 		match('\n' /* charlit */ );
-#line 478 "ncoGrammer.g"
+#line 484 "ncoGrammer.g"
 		newline();
-#line 1435 "ncoLexer.cpp"
+#line 1445 "ncoLexer.cpp"
 		break;
 	}
 	default:
@@ -1440,9 +1450,9 @@ void ncoLexer::mWS(bool _createToken) {
 	}
 	}
 	}
-#line 479 "ncoGrammer.g"
+#line 485 "ncoGrammer.g"
 	_ttype = antlr::Token::SKIP;
-#line 1446 "ncoLexer.cpp"
+#line 1456 "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));
@@ -1463,16 +1473,16 @@ void ncoLexer::mCXX_COMMENT(bool _createToken) {
 			matchNot('\n' /* charlit */ );
 		}
 		else {
-			goto _loop151;
+			goto _loop154;
 		}
 		
 	}
-	_loop151:;
+	_loop154:;
 	} // ( ... )*
 	match('\n' /* charlit */ );
-#line 484 "ncoGrammer.g"
+#line 490 "ncoGrammer.g"
 	_ttype = antlr::Token::SKIP; newline();
-#line 1476 "ncoLexer.cpp"
+#line 1486 "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));
@@ -1511,9 +1521,9 @@ void ncoLexer::mC_COMMENT(bool _createToken) {
 			}
 			}
 			}
-#line 491 "ncoGrammer.g"
+#line 497 "ncoGrammer.g"
 			newline();
-#line 1517 "ncoLexer.cpp"
+#line 1527 "ncoLexer.cpp"
 		}
 		else if ((_tokenSet_4.member(LA(1)))) {
 			{
@@ -1521,16 +1531,16 @@ void ncoLexer::mC_COMMENT(bool _createToken) {
 			}
 		}
 		else {
-			goto _loop156;
+			goto _loop159;
 		}
 		
 	}
-	_loop156:;
+	_loop159:;
 	} // ( ... )*
 	match("*/");
-#line 495 "ncoGrammer.g"
+#line 501 "ncoGrammer.g"
 	_ttype = antlr::Token::SKIP;
-#line 1534 "ncoLexer.cpp"
+#line 1544 "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));
@@ -1546,18 +1556,18 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 	
 	match('.' /* charlit */ );
 	{ // ( ... )+
-	int _cnt159=0;
+	int _cnt162=0;
 	for (;;) {
 		if (((LA(1) >= 0x30 /* '0' */  && LA(1) <= 0x39 /* '9' */ ))) {
 			mDGT(false);
 		}
 		else {
-			if ( _cnt159>=1 ) { goto _loop159; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
+			if ( _cnt162>=1 ) { goto _loop162; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
 		}
 		
-		_cnt159++;
+		_cnt162++;
 	}
-	_loop159:;
+	_loop162:;
 	}  // ( ... )+
 	{
 	if ((LA(1) == 0x45 /* 'E' */  || LA(1) == 0x65 /* 'e' */ )) {
@@ -1567,9 +1577,9 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 	}
 	
 	}
-#line 502 "ncoGrammer.g"
-	_ttype = DOUBLE;
-#line 1573 "ncoLexer.cpp"
+#line 508 "ncoGrammer.g"
+	_ttype = NCAP_DOUBLE;
+#line 1583 "ncoLexer.cpp"
 	{
 	switch ( LA(1)) {
 	case 0x44 /* 'D' */ :
@@ -1593,9 +1603,9 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 		}
 		}
 		}
-#line 503 "ncoGrammer.g"
-		_ttype = DOUBLE;
-#line 1599 "ncoLexer.cpp"
+#line 509 "ncoGrammer.g"
+		_ttype = NCAP_DOUBLE;
+#line 1609 "ncoLexer.cpp"
 		break;
 	}
 	case 0x46 /* 'F' */ :
@@ -1619,9 +1629,9 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 		}
 		}
 		}
-#line 504 "ncoGrammer.g"
-		_ttype = FLOAT;
-#line 1625 "ncoLexer.cpp"
+#line 510 "ncoGrammer.g"
+		_ttype = NCAP_FLOAT;
+#line 1635 "ncoLexer.cpp"
 		break;
 	}
 	case 0x4c /* 'L' */ :
@@ -1645,9 +1655,9 @@ void ncoLexer::mNUMBER_DOT(bool _createToken) {
 		}
 		}
 		}
-#line 505 "ncoGrammer.g"
-		_ttype = DOUBLE;
-#line 1651 "ncoLexer.cpp"
+#line 511 "ncoGrammer.g"
+		_ttype = NCAP_DOUBLE;
+#line 1661 "ncoLexer.cpp"
 		break;
 	}
 	default:
@@ -1669,22 +1679,22 @@ void ncoLexer::mNUMBER(bool _createToken) {
 	ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
 	
 	{ // ( ... )+
-	int _cnt167=0;
+	int _cnt170=0;
 	for (;;) {
 		if (((LA(1) >= 0x30 /* '0' */  && LA(1) <= 0x39 /* '9' */ ))) {
 			mDGT(false);
 		}
 		else {
-			if ( _cnt167>=1 ) { goto _loop167; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
+			if ( _cnt170>=1 ) { goto _loop170; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
 		}
 		
-		_cnt167++;
+		_cnt170++;
 	}
-	_loop167:;
+	_loop170:;
 	}  // ( ... )+
-#line 510 "ncoGrammer.g"
-	_ttype = INT;
-#line 1688 "ncoLexer.cpp"
+#line 516 "ncoGrammer.g"
+	_ttype = NCAP_INT;
+#line 1698 "ncoLexer.cpp"
 	{
 	switch ( LA(1)) {
 	case 0x2e /* '.' */ :
@@ -1697,11 +1707,11 @@ void ncoLexer::mNUMBER(bool _createToken) {
 				mDGT(false);
 			}
 			else {
-				goto _loop171;
+				goto _loop174;
 			}
 			
 		}
-		_loop171:;
+		_loop174:;
 		} // ( ... )*
 		{
 		if ((LA(1) == 0x4c /* 'L' */  || LA(1) == 0x6c /* 'l' */ )) {
@@ -1737,9 +1747,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		
 		}
 		}
-#line 511 "ncoGrammer.g"
-		_ttype = DOUBLE;
-#line 1743 "ncoLexer.cpp"
+#line 517 "ncoGrammer.g"
+		_ttype = NCAP_DOUBLE;
+#line 1753 "ncoLexer.cpp"
 		break;
 	}
 	case 0x45 /* 'E' */ :
@@ -1748,9 +1758,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		{
 		mXPN(false);
 		}
-#line 512 "ncoGrammer.g"
-		_ttype = DOUBLE;
-#line 1754 "ncoLexer.cpp"
+#line 518 "ncoGrammer.g"
+		_ttype = NCAP_DOUBLE;
+#line 1764 "ncoLexer.cpp"
 		break;
 	}
 	case 0x53 /* 'S' */ :
@@ -1774,9 +1784,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 514 "ncoGrammer.g"
-		_ttype = SHORT;
-#line 1780 "ncoLexer.cpp"
+#line 520 "ncoGrammer.g"
+		_ttype = NCAP_SHORT;
+#line 1790 "ncoLexer.cpp"
 		break;
 	}
 	case 0x42 /* 'B' */ :
@@ -1800,9 +1810,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 515 "ncoGrammer.g"
-		_ttype = BYTE;
-#line 1806 "ncoLexer.cpp"
+#line 521 "ncoGrammer.g"
+		_ttype = NCAP_BYTE;
+#line 1816 "ncoLexer.cpp"
 		break;
 	}
 	default:
@@ -1825,9 +1835,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 520 "ncoGrammer.g"
-			_ttype = UINT64;
-#line 1831 "ncoLexer.cpp"
+#line 526 "ncoGrammer.g"
+			_ttype = NCAP_UINT64;
+#line 1841 "ncoLexer.cpp"
 		}
 		else if ((LA(1) == 0x55 /* 'U' */  || LA(1) == 0x75 /* 'u' */ ) && (LA(2) == 0x42 /* 'B' */  || LA(2) == 0x62 /* 'b' */ )) {
 			{
@@ -1848,9 +1858,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 516 "ncoGrammer.g"
-			_ttype = UBYTE;
-#line 1854 "ncoLexer.cpp"
+#line 522 "ncoGrammer.g"
+			_ttype = NCAP_UBYTE;
+#line 1864 "ncoLexer.cpp"
 		}
 		else if ((LA(1) == 0x55 /* 'U' */  || LA(1) == 0x75 /* 'u' */ ) && (LA(2) == 0x53 /* 'S' */  || LA(2) == 0x73 /* 's' */ )) {
 			{
@@ -1871,9 +1881,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 517 "ncoGrammer.g"
-			_ttype = USHORT;
-#line 1877 "ncoLexer.cpp"
+#line 523 "ncoGrammer.g"
+			_ttype = NCAP_USHORT;
+#line 1887 "ncoLexer.cpp"
 		}
 		else if ((LA(1) == 0x4c /* 'L' */  || LA(1) == 0x6c /* 'l' */ ) && (LA(2) == 0x4c /* 'L' */  || LA(2) == 0x6c /* 'l' */ )) {
 			{
@@ -1894,9 +1904,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 519 "ncoGrammer.g"
-			_ttype = INT64;
-#line 1900 "ncoLexer.cpp"
+#line 525 "ncoGrammer.g"
+			_ttype = NCAP_INT64;
+#line 1910 "ncoLexer.cpp"
 		}
 		else if ((LA(1) == 0x4c /* 'L' */  || LA(1) == 0x6c /* 'l' */ ) && (true)) {
 			{
@@ -1917,9 +1927,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			}
 			}
-#line 513 "ncoGrammer.g"
-			_ttype = INT;
-#line 1923 "ncoLexer.cpp"
+#line 519 "ncoGrammer.g"
+			_ttype = NCAP_INT;
+#line 1933 "ncoLexer.cpp"
 		}
 		else if ((LA(1) == 0x55 /* 'U' */  || LA(1) == 0x75 /* 'u' */ ) && (true) && (true)) {
 			{
@@ -1940,9 +1950,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 			}
 			
 			}
-#line 518 "ncoGrammer.g"
-			_ttype = UINT;
-#line 1946 "ncoLexer.cpp"
+#line 524 "ncoGrammer.g"
+			_ttype = NCAP_UINT;
+#line 1956 "ncoLexer.cpp"
 		}
 		else {
 		}
@@ -1971,9 +1981,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 522 "ncoGrammer.g"
-		_ttype = FLOAT;
-#line 1977 "ncoLexer.cpp"
+#line 528 "ncoGrammer.g"
+		_ttype = NCAP_FLOAT;
+#line 1987 "ncoLexer.cpp"
 		break;
 	}
 	case 0x44 /* 'D' */ :
@@ -1997,9 +2007,9 @@ void ncoLexer::mNUMBER(bool _createToken) {
 		}
 		}
 		}
-#line 523 "ncoGrammer.g"
-		_ttype = DOUBLE;
-#line 2003 "ncoLexer.cpp"
+#line 529 "ncoGrammer.g"
+		_ttype = NCAP_DOUBLE;
+#line 2013 "ncoLexer.cpp"
 		break;
 	}
 	default:
@@ -2099,13 +2109,13 @@ void ncoLexer::mVAR_ATT(bool _createToken) {
 		}
 		default:
 		{
-			goto _loop190;
+			goto _loop193;
 		}
 		}
 	}
-	_loop190:;
+	_loop193:;
 	} // ( ... )*
-#line 531 "ncoGrammer.g"
+#line 537 "ncoGrammer.g"
 	
 	// try to intelligently guess the type to avoid un-necessary function search  
 	bool bDoSearch;
@@ -2120,6 +2130,10 @@ void ncoLexer::mVAR_ATT(bool _createToken) {
 	bDoSearch=false;
 	_ttype = ATT_ID;
 	break;    
+	case '[':
+	bDoSearch=false;
+	_ttype = VAR_ID; 
+	break;   
 	default: 
 	bDoSearch=false;
 	_ttype = VAR_ID;
@@ -2138,7 +2152,7 @@ void ncoLexer::mVAR_ATT(bool _createToken) {
 	}             
 	} 
 	
-#line 2142 "ncoLexer.cpp"
+#line 2156 "ncoLexer.cpp"
 	{
 	if ((LA(1) == 0x40 /* '@' */ )) {
 		match('@' /* charlit */ );
@@ -2221,15 +2235,15 @@ void ncoLexer::mVAR_ATT(bool _createToken) {
 			}
 			default:
 			{
-				goto _loop194;
+				goto _loop197;
 			}
 			}
 		}
-		_loop194:;
+		_loop197:;
 		} // ( ... )*
-#line 563 "ncoGrammer.g"
+#line 573 "ncoGrammer.g"
 		_ttype = ATT_ID;
-#line 2233 "ncoLexer.cpp"
+#line 2247 "ncoLexer.cpp"
 	}
 	else {
 	}
@@ -2255,18 +2269,18 @@ void ncoLexer::mVAR_ATT_QT(bool _createToken) {
 	text.erase(_saveIndex);
 	}
 	mVAR_NM_QT(false);
-#line 569 "ncoGrammer.g"
+#line 579 "ncoGrammer.g"
 	_ttype = VAR_ID;
-#line 2261 "ncoLexer.cpp"
+#line 2275 "ncoLexer.cpp"
 	{
 	switch ( LA(1)) {
 	case 0x40 /* '@' */ :
 	{
 		match('@' /* charlit */ );
 		mVAR_NM_QT(false);
-#line 570 "ncoGrammer.g"
+#line 580 "ncoGrammer.g"
 		_ttype = ATT_ID;
-#line 2270 "ncoLexer.cpp"
+#line 2284 "ncoLexer.cpp"
 		break;
 	}
 	case 0x27 /* '\'' */ :
@@ -2292,6 +2306,136 @@ void ncoLexer::mVAR_ATT_QT(bool _createToken) {
 	_saveIndex=0;
 }
 
+void ncoLexer::mSTR_ATT_ID(bool _createToken) {
+	int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
+	_ttype = STR_ATT_ID;
+	ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
+	
+	match('@' /* charlit */ );
+	{
+	mLPH(false);
+	}
+	{ // ( ... )*
+	for (;;) {
+		switch ( LA(1)) {
+		case 0x41 /* 'A' */ :
+		case 0x42 /* 'B' */ :
+		case 0x43 /* 'C' */ :
+		case 0x44 /* 'D' */ :
+		case 0x45 /* 'E' */ :
+		case 0x46 /* 'F' */ :
+		case 0x47 /* 'G' */ :
+		case 0x48 /* 'H' */ :
+		case 0x49 /* 'I' */ :
+		case 0x4a /* 'J' */ :
+		case 0x4b /* 'K' */ :
+		case 0x4c /* 'L' */ :
+		case 0x4d /* 'M' */ :
+		case 0x4e /* 'N' */ :
+		case 0x4f /* 'O' */ :
+		case 0x50 /* 'P' */ :
+		case 0x51 /* 'Q' */ :
+		case 0x52 /* 'R' */ :
+		case 0x53 /* 'S' */ :
+		case 0x54 /* 'T' */ :
+		case 0x55 /* 'U' */ :
+		case 0x56 /* 'V' */ :
+		case 0x57 /* 'W' */ :
+		case 0x58 /* 'X' */ :
+		case 0x59 /* 'Y' */ :
+		case 0x5a /* 'Z' */ :
+		case 0x5f /* '_' */ :
+		case 0x61 /* 'a' */ :
+		case 0x62 /* 'b' */ :
+		case 0x63 /* 'c' */ :
+		case 0x64 /* 'd' */ :
+		case 0x65 /* 'e' */ :
+		case 0x66 /* 'f' */ :
+		case 0x67 /* 'g' */ :
+		case 0x68 /* 'h' */ :
+		case 0x69 /* 'i' */ :
+		case 0x6a /* 'j' */ :
+		case 0x6b /* 'k' */ :
+		case 0x6c /* 'l' */ :
+		case 0x6d /* 'm' */ :
+		case 0x6e /* 'n' */ :
+		case 0x6f /* 'o' */ :
+		case 0x70 /* 'p' */ :
+		case 0x71 /* 'q' */ :
+		case 0x72 /* 'r' */ :
+		case 0x73 /* 's' */ :
+		case 0x74 /* 't' */ :
+		case 0x75 /* 'u' */ :
+		case 0x76 /* 'v' */ :
+		case 0x77 /* 'w' */ :
+		case 0x78 /* 'x' */ :
+		case 0x79 /* 'y' */ :
+		case 0x7a /* 'z' */ :
+		{
+			mLPH(false);
+			break;
+		}
+		case 0x30 /* '0' */ :
+		case 0x31 /* '1' */ :
+		case 0x32 /* '2' */ :
+		case 0x33 /* '3' */ :
+		case 0x34 /* '4' */ :
+		case 0x35 /* '5' */ :
+		case 0x36 /* '6' */ :
+		case 0x37 /* '7' */ :
+		case 0x38 /* '8' */ :
+		case 0x39 /* '9' */ :
+		{
+			mDGT(false);
+			break;
+		}
+		default:
+		{
+			goto _loop205;
+		}
+		}
+	}
+	_loop205:;
+	} // ( ... )*
+#line 585 "ncoGrammer.g"
+	_ttype = STR_ATT_ID;
+#line 2403 "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));
+	}
+	_returnToken = _token;
+	_saveIndex=0;
+}
+
+void ncoLexer::mSTR_ATT_QT(bool _createToken) {
+	int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
+	_ttype = STR_ATT_QT;
+	ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
+	
+	{
+	_saveIndex = text.length();
+	match('\'' /* charlit */ );
+	text.erase(_saveIndex);
+	}
+	match('@' /* charlit */ );
+	mVAR_NM_QT(false);
+#line 590 "ncoGrammer.g"
+	_ttype = STR_ATT_ID;
+#line 2426 "ncoLexer.cpp"
+	{
+	_saveIndex = text.length();
+	match('\'' /* charlit */ );
+	text.erase(_saveIndex);
+	}
+	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));
+	}
+	_returnToken = _token;
+	_saveIndex=0;
+}
+
 void ncoLexer::mDIM_QT(bool _createToken) {
 	int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
 	_ttype = DIM_QT;
@@ -2307,9 +2451,9 @@ void ncoLexer::mDIM_QT(bool _createToken) {
 	match('$' /* charlit */ );
 	text.erase(_saveIndex);
 	mVAR_NM_QT(false);
-#line 576 "ncoGrammer.g"
+#line 597 "ncoGrammer.g"
 	_ttype = DIM_ID;
-#line 2313 "ncoLexer.cpp"
+#line 2457 "ncoLexer.cpp"
 	}
 	{
 	_saveIndex = text.length();
@@ -2321,9 +2465,9 @@ void ncoLexer::mDIM_QT(bool _createToken) {
 		_saveIndex = text.length();
 		match(".size");
 		text.erase(_saveIndex);
-#line 578 "ncoGrammer.g"
+#line 599 "ncoGrammer.g"
 		_ttype = DIM_ID_SIZE;
-#line 2327 "ncoLexer.cpp"
+#line 2471 "ncoLexer.cpp"
 	}
 	else {
 	}
@@ -2424,23 +2568,23 @@ void ncoLexer::mDIM_VAL(bool _createToken) {
 		}
 		default:
 		{
-			goto _loop207;
+			goto _loop217;
 		}
 		}
 	}
-	_loop207:;
+	_loop217:;
 	} // ( ... )*
-#line 583 "ncoGrammer.g"
+#line 604 "ncoGrammer.g"
 	_ttype = DIM_ID;
-#line 2436 "ncoLexer.cpp"
+#line 2580 "ncoLexer.cpp"
 	{
 	if ((LA(1) == 0x2e /* '.' */ )) {
 		_saveIndex = text.length();
 		match(".size");
 		text.erase(_saveIndex);
-#line 585 "ncoGrammer.g"
+#line 606 "ncoGrammer.g"
 		_ttype = DIM_ID_SIZE;
-#line 2444 "ncoLexer.cpp"
+#line 2588 "ncoLexer.cpp"
 	}
 	else {
 	}
@@ -2463,18 +2607,18 @@ void ncoLexer::mDIM_MTD_ID(bool _createToken) {
 	match('$' /* charlit */ );
 	text.erase(_saveIndex);
 	{ // ( ... )+
-	int _cnt211=0;
+	int _cnt221=0;
 	for (;;) {
 		if (((LA(1) >= 0x30 /* '0' */  && LA(1) <= 0x39 /* '9' */ ))) {
 			mDGT(false);
 		}
 		else {
-			if ( _cnt211>=1 ) { goto _loop211; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
+			if ( _cnt221>=1 ) { goto _loop221; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
 		}
 		
-		_cnt211++;
+		_cnt221++;
 	}
-	_loop211:;
+	_loop221:;
 	}  // ( ... )+
 	if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
 	   _token = makeToken(_ttype);
@@ -2500,26 +2644,26 @@ void ncoLexer::mNSTRING(bool _createToken) {
 			}
 		}
 		else {
-			goto _loop215;
+			goto _loop225;
 		}
 		
 	}
-	_loop215:;
+	_loop225:;
 	} // ( ... )*
 	_saveIndex = text.length();
 	match('\"' /* charlit */ );
 	text.erase(_saveIndex);
-#line 598 "ncoGrammer.g"
+#line 619 "ncoGrammer.g"
 	_ttype = NSTRING;
-#line 2515 "ncoLexer.cpp"
+#line 2659 "ncoLexer.cpp"
 	{
 	if ((LA(1) == 0x73 /* 's' */ )) {
 		_saveIndex = text.length();
 		match('s' /* charlit */ );
 		text.erase(_saveIndex);
-#line 599 "ncoGrammer.g"
+#line 620 "ncoGrammer.g"
 		_ttype = N4STRING;
-#line 2523 "ncoLexer.cpp"
+#line 2667 "ncoLexer.cpp"
 	}
 	else {
 	}
@@ -2562,7 +2706,7 @@ void ncoLexer::mINCLUDE(bool _createToken) {
 	}
 	mNSTRING(true);
 	f=_returnToken;
-#line 604 "ncoGrammer.g"
+#line 625 "ncoGrammer.g"
 	
 			// ANTLR_USING_NAMESPACE(std)
 			// create lexer to handle include
@@ -2592,7 +2736,7 @@ void ncoLexer::mINCLUDE(bool _createToken) {
 			// of the new instance of this lexer.
 			selector.retry(); // throws TokenStreamRetryException
 			
-#line 2596 "ncoLexer.cpp"
+#line 2740 "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));
@@ -2607,31 +2751,31 @@ const unsigned long ncoLexer::_tokenSet_0_data_[] = { 0UL, 96UL, 1073741824UL, 2
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoLexer::_tokenSet_0(_tokenSet_0_data_,10);
 const unsigned long ncoLexer::_tokenSet_1_data_[] = { 0UL, 134179584UL, 2281701374UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // ( ) + - . 0 1 2 3 4 5 6 7 8 9 : A B C D E F G H I J K L M N O P Q R 
-// S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s 
+// S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoLexer::_tokenSet_1(_tokenSet_1_data_,10);
 const unsigned long ncoLexer::_tokenSet_2_data_[] = { 0UL, 0UL, 2281701374UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ a b c d e f g 
-// h i j k l m n o p q r s 
+// h i j k l m n o p q r s t u v 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoLexer::_tokenSet_2(_tokenSet_2_data_,10);
 const unsigned long ncoLexer::_tokenSet_3_data_[] = { 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xd 0xe 0xf 0x10 0x11 
 // 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 
 //   ! \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ 
 // A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a 
-// b c d e f g h i j k l m n o p q r s 
+// b c d e f g h i j k l m n o p q r s t u v 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoLexer::_tokenSet_3(_tokenSet_3_data_,16);
 const unsigned long ncoLexer::_tokenSet_4_data_[] = { 4294958079UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12 
 // 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f   ! 
 // \" # $ % & \' ( ) + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C 
 // D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a b c d 
-// e f g h i j k l m n o p q r s 
+// e f g h i j k l m n o p q r s t u v 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoLexer::_tokenSet_4(_tokenSet_4_data_,16);
 const unsigned long ncoLexer::_tokenSet_5_data_[] = { 4294966271UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xd 0xe 0xf 0x10 0x11 
 // 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 
 //   ! # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B 
 // C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a b c 
-// d e f g h i j k l m n o p q r s 
+// d e f g h i j k l m n o p q r s t u v 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoLexer::_tokenSet_5(_tokenSet_5_data_,16);
 
diff --git a/src/nco++/ncoLexer.hpp b/src/nco++/ncoLexer.hpp
index 17e3efb..7415676 100644
--- a/src/nco++/ncoLexer.hpp
+++ b/src/nco++/ncoLexer.hpp
@@ -53,7 +53,7 @@
 #line 54 "ncoLexer.hpp"
 class CUSTOM_API ncoLexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public ncoParserTokenTypes
 {
-#line 336 "ncoGrammer.g"
+#line 342 "ncoGrammer.g"
 
 private:
     prs_cls *prs_arg;
@@ -146,6 +146,8 @@ public:
 	public: void mNUMBER(bool _createToken);
 	public: void mVAR_ATT(bool _createToken);
 	public: void mVAR_ATT_QT(bool _createToken);
+	public: void mSTR_ATT_ID(bool _createToken);
+	public: void mSTR_ATT_QT(bool _createToken);
 	public: void mDIM_QT(bool _createToken);
 	public: void mDIM_VAL(bool _createToken);
 	public: void mDIM_MTD_ID(bool _createToken);
diff --git a/src/nco++/ncoParser.cpp b/src/nco++/ncoParser.cpp
index 0fc0473..e083bb1 100644
--- a/src/nco++/ncoParser.cpp
+++ b/src/nco++/ncoParser.cpp
@@ -74,16 +74,16 @@ void ncoParser::statement() {
 	case PLUS:
 	case MINUS:
 	case TIMES:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -92,7 +92,7 @@ void ncoParser::statement() {
 		astFactory->addASTChild( currentAST, returnAST );
 		match(SEMI);
 		statement_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 95 "ncoGrammer.g"
+#line 96 "ncoGrammer.g"
 		
 		if( ncap_fnc_srh(e1_AST))  
 		statement_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(FEXPR,"FEXPR"))->add(statement_AST))); 
@@ -166,7 +166,7 @@ void ncoParser::statement() {
 		}
 		match(RPAREN);
 		match(SEMI);
-#line 105 "ncoGrammer.g"
+#line 106 "ncoGrammer.g"
 		
 		if( def1_AST ){  def1_AST->setType(DEFDIM);def1_AST->setText("1");}
 		if( def2_AST ){  def2_AST->setType(DEFDIM);def2_AST->setText("0");}
@@ -222,7 +222,7 @@ void ncoParser::statement() {
 	{
 		match(SEMI);
 		statement_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 118 "ncoGrammer.g"
+#line 119 "ncoGrammer.g"
 		statement_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(1))->add(astFactory->create(NULL_NODE,"null_stmt"))));
 #line 228 "ncoParser.cpp"
 		currentAST.root = statement_AST;
@@ -409,16 +409,16 @@ void ncoParser::for_stmt() {
 	case PLUS:
 	case MINUS:
 	case TIMES:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -451,16 +451,16 @@ void ncoParser::for_stmt() {
 	case PLUS:
 	case MINUS:
 	case TIMES:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -493,16 +493,16 @@ void ncoParser::for_stmt() {
 	case PLUS:
 	case MINUS:
 	case TIMES:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -550,7 +550,7 @@ void ncoParser::block() {
 	} // ( ... )*
 	match(RCURL);
 	block_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 139 "ncoGrammer.g"
+#line 140 "ncoGrammer.g"
 	block_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(BLOCK,"block"))->add(block_AST)));
 #line 556 "ncoParser.cpp"
 	currentAST.root = block_AST;
@@ -582,16 +582,16 @@ void ncoParser::lmt() {
 	case PLUS:
 	case MINUS:
 	case TIMES:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -631,16 +631,16 @@ void ncoParser::lmt() {
 			case PLUS:
 			case MINUS:
 			case TIMES:
-			case FLOAT:
-			case DOUBLE:
-			case INT:
-			case BYTE:
-			case UBYTE:
-			case SHORT:
-			case USHORT:
-			case UINT:
-			case INT64:
-			case UINT64:
+			case NCAP_FLOAT:
+			case NCAP_DOUBLE:
+			case NCAP_INT:
+			case NCAP_BYTE:
+			case NCAP_UBYTE:
+			case NCAP_SHORT:
+			case NCAP_USHORT:
+			case NCAP_UINT:
+			case NCAP_INT64:
+			case NCAP_UINT64:
 			case N4STRING:
 			case DIM_ID_SIZE:
 			{
@@ -669,7 +669,7 @@ void ncoParser::lmt() {
 	_loop22:;
 	} // ( ... )*
 	lmt_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 152 "ncoGrammer.g"
+#line 153 "ncoGrammer.g"
 	lmt_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(LMT,"lmt"))->add(lmt_AST)));
 #line 675 "ncoParser.cpp"
 	currentAST.root = lmt_AST;
@@ -707,7 +707,7 @@ void ncoParser::lmt_list() {
 	} // ( ... )*
 	match(RPAREN);
 	lmt_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 156 "ncoGrammer.g"
+#line 157 "ncoGrammer.g"
 	lmt_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(LMT_LIST,"lmt_list"))->add(lmt_list_AST)));
 #line 713 "ncoParser.cpp"
 	currentAST.root = lmt_list_AST;
@@ -721,10 +721,10 @@ void ncoParser::lmt_list() {
 	returnAST = lmt_list_AST;
 }
 
-void ncoParser::dmn_list() {
+void ncoParser::dmn_list_p() {
 	returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
-	ANTLR_USE_NAMESPACE(antlr)RefAST dmn_list_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+	ANTLR_USE_NAMESPACE(antlr)RefAST dmn_list_p_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	
 	match(LSQUARE);
 	{
@@ -788,10 +788,52 @@ void ncoParser::dmn_list() {
 	_loop30:;
 	} // ( ... )*
 	match(RSQUARE);
+	dmn_list_p_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
+#line 165 "ncoGrammer.g"
+	dmn_list_p_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(DMN_LIST_P,"dmn_list_p"))->add(dmn_list_p_AST)));
+#line 795 "ncoParser.cpp"
+	currentAST.root = dmn_list_p_AST;
+	if ( dmn_list_p_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST &&
+		dmn_list_p_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST )
+		  currentAST.child = dmn_list_p_AST->getFirstChild();
+	else
+		currentAST.child = dmn_list_p_AST;
+	currentAST.advanceChildToEnd();
+	dmn_list_p_AST = currentAST.root;
+	returnAST = dmn_list_p_AST;
+}
+
+void ncoParser::dmn_list() {
+	returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+	ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
+	ANTLR_USE_NAMESPACE(antlr)RefAST dmn_list_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+	
+	match(LPAREN);
+	ANTLR_USE_NAMESPACE(antlr)RefAST tmp52_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+	tmp52_AST = astFactory->create(LT(1));
+	astFactory->addASTChild(currentAST, tmp52_AST);
+	match(DIM_ID);
+	{ // ( ... )*
+	for (;;) {
+		if ((LA(1) == COMMA)) {
+			match(COMMA);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp54_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp54_AST = astFactory->create(LT(1));
+			astFactory->addASTChild(currentAST, tmp54_AST);
+			match(DIM_ID);
+		}
+		else {
+			goto _loop33;
+		}
+		
+	}
+	_loop33:;
+	} // ( ... )*
+	match(RPAREN);
 	dmn_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 164 "ncoGrammer.g"
+#line 170 "ncoGrammer.g"
 	dmn_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(DMN_LIST,"dmn_list"))->add(dmn_list_AST)));
-#line 795 "ncoParser.cpp"
+#line 837 "ncoParser.cpp"
 	currentAST.root = dmn_list_AST;
 	if ( dmn_list_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST &&
 		dmn_list_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST )
@@ -813,17 +855,17 @@ void ncoParser::dmn_arg_list() {
 	switch ( LA(1)) {
 	case DIM_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp52_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp52_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp52_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp57_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp57_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp57_AST);
 		match(DIM_ID);
 		break;
 	}
 	case DIM_MTD_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp53_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp53_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp53_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp58_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp58_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp58_AST);
 		match(DIM_MTD_ID);
 		break;
 	}
@@ -841,17 +883,17 @@ void ncoParser::dmn_arg_list() {
 			switch ( LA(1)) {
 			case DIM_ID:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp55_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp55_AST = astFactory->create(LT(1));
-				astFactory->addASTChild(currentAST, tmp55_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp60_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp60_AST = astFactory->create(LT(1));
+				astFactory->addASTChild(currentAST, tmp60_AST);
 				match(DIM_ID);
 				break;
 			}
 			case DIM_MTD_ID:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp56_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp56_AST = astFactory->create(LT(1));
-				astFactory->addASTChild(currentAST, tmp56_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp61_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp61_AST = astFactory->create(LT(1));
+				astFactory->addASTChild(currentAST, tmp61_AST);
 				match(DIM_MTD_ID);
 				break;
 			}
@@ -863,17 +905,17 @@ void ncoParser::dmn_arg_list() {
 			}
 		}
 		else {
-			goto _loop35;
+			goto _loop38;
 		}
 		
 	}
-	_loop35:;
+	_loop38:;
 	} // ( ... )*
 	match(DIVIDE);
 	dmn_arg_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 170 "ncoGrammer.g"
+#line 176 "ncoGrammer.g"
 	dmn_arg_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(DMN_ARG_LIST,"dmn_arg_list"))->add(dmn_arg_list_AST)));
-#line 877 "ncoParser.cpp"
+#line 919 "ncoParser.cpp"
 	currentAST.root = dmn_arg_list_AST;
 	if ( dmn_arg_list_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST &&
 		dmn_arg_list_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST )
@@ -901,17 +943,17 @@ void ncoParser::value_list() {
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop38;
+			goto _loop41;
 		}
 		
 	}
-	_loop38:;
+	_loop41:;
 	} // ( ... )*
 	match(RCURL);
 	value_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 175 "ncoGrammer.g"
+#line 181 "ncoGrammer.g"
 	value_list_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(VALUE_LIST,"value_list"))->add(value_list_AST)));
-#line 915 "ncoParser.cpp"
+#line 957 "ncoParser.cpp"
 	currentAST.root = value_list_AST;
 	if ( value_list_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST &&
 		value_list_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST )
@@ -940,16 +982,16 @@ void ncoParser::arg_list() {
 	case PLUS:
 	case MINUS:
 	case TIMES:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -967,18 +1009,18 @@ void ncoParser::arg_list() {
 	}
 	case DIM_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp61_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp61_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp61_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp66_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp66_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp66_AST);
 		match(DIM_ID);
 		arg_list_AST = currentAST.root;
 		break;
 	}
 	case DIM_MTD_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp62_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp62_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp62_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp67_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp67_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp67_AST);
 		match(DIM_MTD_ID);
 		arg_list_AST = currentAST.root;
 		break;
@@ -1003,25 +1045,25 @@ void ncoParser::call_ref() {
 	ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST call_ref_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	
-	ANTLR_USE_NAMESPACE(antlr)RefAST tmp63_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-	tmp63_AST = astFactory->create(LT(1));
-	astFactory->makeASTRoot(currentAST, tmp63_AST);
+	ANTLR_USE_NAMESPACE(antlr)RefAST tmp68_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+	tmp68_AST = astFactory->create(LT(1));
+	astFactory->makeASTRoot(currentAST, tmp68_AST);
 	match(CALL_REF);
 	{
 	switch ( LA(1)) {
 	case VAR_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp64_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp64_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp64_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp69_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp69_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp69_AST);
 		match(VAR_ID);
 		break;
 	}
 	case ATT_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp65_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp65_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp65_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp70_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp70_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp70_AST);
 		match(ATT_ID);
 		break;
 	}
@@ -1058,16 +1100,16 @@ void ncoParser::func_arg() {
 	case PLUS:
 	case MINUS:
 	case TIMES:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -1094,17 +1136,17 @@ void ncoParser::func_arg() {
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop43;
+			goto _loop46;
 		}
 		
 	}
-	_loop43:;
+	_loop46:;
 	} // ( ... )*
 	match(RPAREN);
 	func_arg_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root);
-#line 182 "ncoGrammer.g"
+#line 188 "ncoGrammer.g"
 	func_arg_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(FUNC_ARG,"func_arg"))->add(func_arg_AST)));
-#line 1108 "ncoParser.cpp"
+#line 1150 "ncoParser.cpp"
 	currentAST.root = func_arg_AST;
 	if ( func_arg_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST &&
 		func_arg_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST )
@@ -1125,17 +1167,17 @@ void ncoParser::hyper_slb() {
 	switch ( LA(1)) {
 	case VAR_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp69_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp69_AST = astFactory->create(LT(1));
-		astFactory->makeASTRoot(currentAST, tmp69_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp74_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp74_AST = astFactory->create(LT(1));
+		astFactory->makeASTRoot(currentAST, tmp74_AST);
 		match(VAR_ID);
 		break;
 	}
 	case ATT_ID:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp70_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp70_AST = astFactory->create(LT(1));
-		astFactory->makeASTRoot(currentAST, tmp70_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp75_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp75_AST = astFactory->create(LT(1));
+		astFactory->makeASTRoot(currentAST, tmp75_AST);
 		match(ATT_ID);
 		break;
 	}
@@ -1147,15 +1189,9 @@ void ncoParser::hyper_slb() {
 	}
 	{
 	switch ( LA(1)) {
-	case LPAREN:
-	{
-		lmt_list();
-		astFactory->addASTChild( currentAST, returnAST );
-		break;
-	}
 	case LSQUARE:
 	{
-		dmn_list();
+		dmn_list_p();
 		astFactory->addASTChild( currentAST, returnAST );
 		break;
 	}
@@ -1193,7 +1229,15 @@ void ncoParser::hyper_slb() {
 		break;
 	}
 	default:
-	{
+		if ((LA(1) == LPAREN) && (_tokenSet_4.member(LA(2)))) {
+			lmt_list();
+			astFactory->addASTChild( currentAST, returnAST );
+		}
+		else if ((LA(1) == LPAREN) && (LA(2) == DIM_ID)) {
+			dmn_list();
+			astFactory->addASTChild( currentAST, returnAST );
+		}
+	else {
 		throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
 	}
 	}
@@ -1213,23 +1257,23 @@ void ncoParser::meth_exp() {
 	{ // ( ... )*
 	for (;;) {
 		if ((LA(1) == DOT)) {
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp71_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp71_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp71_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp76_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp76_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp76_AST);
 			match(DOT);
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp72_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp72_AST = astFactory->create(LT(1));
-			astFactory->addASTChild(currentAST, tmp72_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp77_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp77_AST = astFactory->create(LT(1));
+			astFactory->addASTChild(currentAST, tmp77_AST);
 			match(FUNC);
 			func_arg();
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop51;
+			goto _loop54;
 		}
 		
 	}
-	_loop51:;
+	_loop54:;
 	} // ( ... )*
 	meth_exp_AST = currentAST.root;
 	returnAST = meth_exp_AST;
@@ -1241,119 +1285,119 @@ void ncoParser::primary_exp() {
 	ANTLR_USE_NAMESPACE(antlr)RefAST primary_exp_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	
 	switch ( LA(1)) {
-	case FLOAT:
+	case NCAP_FLOAT:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp73_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp73_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp73_AST);
-		match(FLOAT);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp78_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp78_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp78_AST);
+		match(NCAP_FLOAT);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case DOUBLE:
+	case NCAP_DOUBLE:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp74_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp74_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp74_AST);
-		match(DOUBLE);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp79_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp79_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp79_AST);
+		match(NCAP_DOUBLE);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case INT:
+	case NCAP_INT:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp75_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp75_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp75_AST);
-		match(INT);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp80_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp80_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp80_AST);
+		match(NCAP_INT);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case BYTE:
+	case NCAP_BYTE:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp76_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp76_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp76_AST);
-		match(BYTE);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp81_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp81_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp81_AST);
+		match(NCAP_BYTE);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case UBYTE:
+	case NCAP_UBYTE:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp77_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp77_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp77_AST);
-		match(UBYTE);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp82_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp82_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp82_AST);
+		match(NCAP_UBYTE);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case SHORT:
+	case NCAP_SHORT:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp78_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp78_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp78_AST);
-		match(SHORT);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp83_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp83_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp83_AST);
+		match(NCAP_SHORT);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case USHORT:
+	case NCAP_USHORT:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp79_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp79_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp79_AST);
-		match(USHORT);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp84_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp84_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp84_AST);
+		match(NCAP_USHORT);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case UINT:
+	case NCAP_UINT:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp80_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp80_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp80_AST);
-		match(UINT);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp85_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp85_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp85_AST);
+		match(NCAP_UINT);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case INT64:
+	case NCAP_INT64:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp81_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp81_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp81_AST);
-		match(INT64);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp86_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp86_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp86_AST);
+		match(NCAP_INT64);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
-	case UINT64:
+	case NCAP_UINT64:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp82_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp82_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp82_AST);
-		match(UINT64);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp87_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp87_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp87_AST);
+		match(NCAP_UINT64);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
 	case NSTRING:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp83_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp83_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp83_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp88_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp88_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp88_AST);
 		match(NSTRING);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
 	case N4STRING:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp84_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp84_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp84_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp89_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp89_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp89_AST);
 		match(N4STRING);
 		primary_exp_AST = currentAST.root;
 		break;
 	}
 	case DIM_ID_SIZE:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp85_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp85_AST = astFactory->create(LT(1));
-		astFactory->addASTChild(currentAST, tmp85_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp90_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp90_AST = astFactory->create(LT(1));
+		astFactory->addASTChild(currentAST, tmp90_AST);
 		match(DIM_ID_SIZE);
 		primary_exp_AST = currentAST.root;
 		break;
@@ -1369,9 +1413,9 @@ void ncoParser::primary_exp() {
 	}
 	case FUNC:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp88_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp88_AST = astFactory->create(LT(1));
-		astFactory->makeASTRoot(currentAST, tmp88_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp93_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp93_AST = astFactory->create(LT(1));
+		astFactory->makeASTRoot(currentAST, tmp93_AST);
 		match(FUNC);
 		func_arg();
 		astFactory->addASTChild( currentAST, returnAST );
@@ -1413,10 +1457,10 @@ void ncoParser::unaryleft_exp() {
 		in_AST = astFactory->create(in);
 		astFactory->makeASTRoot(currentAST, in_AST);
 		match(INC);
-#line 199 "ncoGrammer.g"
+#line 205 "ncoGrammer.g"
 		in_AST->setType(POST_INC);
 		in_AST->setText("POST_INC");
-#line 1420 "ncoParser.cpp"
+#line 1464 "ncoParser.cpp"
 		break;
 	}
 	case DEC:
@@ -1425,10 +1469,10 @@ void ncoParser::unaryleft_exp() {
 		de_AST = astFactory->create(de);
 		astFactory->makeASTRoot(currentAST, de_AST);
 		match(DEC);
-#line 201 "ncoGrammer.g"
+#line 207 "ncoGrammer.g"
 		de_AST->setType(POST_DEC);
 		de_AST->setText("POST_DEC");
-#line 1432 "ncoParser.cpp"
+#line 1476 "ncoParser.cpp"
 		break;
 	}
 	case SEMI:
@@ -1490,41 +1534,41 @@ void ncoParser::unary_exp() {
 		switch ( LA(1)) {
 		case LNOT:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp89_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp89_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp89_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp94_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp94_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp94_AST);
 			match(LNOT);
 			break;
 		}
 		case PLUS:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp90_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp90_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp90_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp95_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp95_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp95_AST);
 			match(PLUS);
 			break;
 		}
 		case MINUS:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp91_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp91_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp91_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp96_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp96_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp96_AST);
 			match(MINUS);
 			break;
 		}
 		case INC:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp92_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp92_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp92_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp97_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp97_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp97_AST);
 			match(INC);
 			break;
 		}
 		case DEC:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp93_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp93_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp93_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp98_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp98_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp98_AST);
 			match(DEC);
 			break;
 		}
@@ -1534,9 +1578,9 @@ void ncoParser::unary_exp() {
 			ur_AST = astFactory->create(ur);
 			astFactory->makeASTRoot(currentAST, ur_AST);
 			match(TIMES);
-#line 214 "ncoGrammer.g"
+#line 220 "ncoGrammer.g"
 			ur_AST->setType(UTIMES);ur_AST->setText("UTIMES");
-#line 1540 "ncoParser.cpp"
+#line 1584 "ncoParser.cpp"
 			break;
 		}
 		default:
@@ -1555,16 +1599,16 @@ void ncoParser::unary_exp() {
 	case VAR_ID:
 	case ATT_ID:
 	case FUNC:
-	case FLOAT:
-	case DOUBLE:
-	case INT:
-	case BYTE:
-	case UBYTE:
-	case SHORT:
-	case USHORT:
-	case UINT:
-	case INT64:
-	case UINT64:
+	case NCAP_FLOAT:
+	case NCAP_DOUBLE:
+	case NCAP_INT:
+	case NCAP_BYTE:
+	case NCAP_UBYTE:
+	case NCAP_SHORT:
+	case NCAP_USHORT:
+	case NCAP_UINT:
+	case NCAP_INT64:
+	case NCAP_UINT64:
 	case N4STRING:
 	case DIM_ID_SIZE:
 	{
@@ -1592,9 +1636,9 @@ void ncoParser::pow_exp() {
 	switch ( LA(1)) {
 	case CARET:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp94_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp94_AST = astFactory->create(LT(1));
-		astFactory->makeASTRoot(currentAST, tmp94_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp99_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp99_AST = astFactory->create(LT(1));
+		astFactory->makeASTRoot(currentAST, tmp99_AST);
 		match(CARET);
 		pow_exp();
 		astFactory->addASTChild( currentAST, returnAST );
@@ -1653,25 +1697,25 @@ void ncoParser::mexpr() {
 			switch ( LA(1)) {
 			case TIMES:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp95_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp95_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp95_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp100_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp100_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp100_AST);
 				match(TIMES);
 				break;
 			}
 			case DIVIDE:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp96_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp96_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp96_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp101_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp101_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp101_AST);
 				match(DIVIDE);
 				break;
 			}
 			case MOD:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp97_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp97_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp97_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp102_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp102_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp102_AST);
 				match(MOD);
 				break;
 			}
@@ -1685,11 +1729,11 @@ void ncoParser::mexpr() {
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop61;
+			goto _loop64;
 		}
 		
 	}
-	_loop61:;
+	_loop64:;
 	} // ( ... )*
 	mexpr_AST = currentAST.root;
 	returnAST = mexpr_AST;
@@ -1709,17 +1753,17 @@ void ncoParser::add_expr() {
 			switch ( LA(1)) {
 			case PLUS:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp98_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp98_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp98_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp103_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp103_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp103_AST);
 				match(PLUS);
 				break;
 			}
 			case MINUS:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp99_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp99_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp99_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp104_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp104_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp104_AST);
 				match(MINUS);
 				break;
 			}
@@ -1733,11 +1777,11 @@ void ncoParser::add_expr() {
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop65;
+			goto _loop68;
 		}
 		
 	}
-	_loop65:;
+	_loop68:;
 	} // ( ... )*
 	add_expr_AST = currentAST.root;
 	returnAST = add_expr_AST;
@@ -1757,17 +1801,17 @@ void ncoParser::frel_expr() {
 			switch ( LA(1)) {
 			case FLTHAN:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp100_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp100_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp100_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp105_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp105_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp105_AST);
 				match(FLTHAN);
 				break;
 			}
 			case FGTHAN:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp101_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp101_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp101_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp106_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp106_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp106_AST);
 				match(FGTHAN);
 				break;
 			}
@@ -1781,11 +1825,11 @@ void ncoParser::frel_expr() {
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop69;
+			goto _loop72;
 		}
 		
 	}
-	_loop69:;
+	_loop72:;
 	} // ( ... )*
 	frel_expr_AST = currentAST.root;
 	returnAST = frel_expr_AST;
@@ -1805,33 +1849,33 @@ void ncoParser::rel_expr() {
 			switch ( LA(1)) {
 			case LTHAN:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp102_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp102_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp102_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp107_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp107_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp107_AST);
 				match(LTHAN);
 				break;
 			}
 			case GTHAN:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp103_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp103_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp103_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp108_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp108_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp108_AST);
 				match(GTHAN);
 				break;
 			}
 			case GEQ:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp104_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp104_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp104_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp109_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp109_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp109_AST);
 				match(GEQ);
 				break;
 			}
 			case LEQ:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp105_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp105_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp105_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp110_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp110_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp110_AST);
 				match(LEQ);
 				break;
 			}
@@ -1845,11 +1889,11 @@ void ncoParser::rel_expr() {
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop73;
+			goto _loop76;
 		}
 		
 	}
-	_loop73:;
+	_loop76:;
 	} // ( ... )*
 	rel_expr_AST = currentAST.root;
 	returnAST = rel_expr_AST;
@@ -1869,17 +1913,17 @@ void ncoParser::eq_expr() {
 			switch ( LA(1)) {
 			case EQ:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp106_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp106_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp106_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp111_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp111_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp111_AST);
 				match(EQ);
 				break;
 			}
 			case NEQ:
 			{
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp107_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-				tmp107_AST = astFactory->create(LT(1));
-				astFactory->makeASTRoot(currentAST, tmp107_AST);
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp112_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+				tmp112_AST = astFactory->create(LT(1));
+				astFactory->makeASTRoot(currentAST, tmp112_AST);
 				match(NEQ);
 				break;
 			}
@@ -1893,11 +1937,11 @@ void ncoParser::eq_expr() {
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop77;
+			goto _loop80;
 		}
 		
 	}
-	_loop77:;
+	_loop80:;
 	} // ( ... )*
 	eq_expr_AST = currentAST.root;
 	returnAST = eq_expr_AST;
@@ -1913,19 +1957,19 @@ void ncoParser::lmul_expr() {
 	{ // ( ... )*
 	for (;;) {
 		if ((LA(1) == LAND)) {
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp108_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp108_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp108_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp113_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp113_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp113_AST);
 			match(LAND);
 			eq_expr();
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop80;
+			goto _loop83;
 		}
 		
 	}
-	_loop80:;
+	_loop83:;
 	} // ( ... )*
 	lmul_expr_AST = currentAST.root;
 	returnAST = lmul_expr_AST;
@@ -1941,19 +1985,19 @@ void ncoParser::lor_expr() {
 	{ // ( ... )*
 	for (;;) {
 		if ((LA(1) == LOR)) {
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp109_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp109_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp109_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp114_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp114_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp114_AST);
 			match(LOR);
 			lmul_expr();
 			astFactory->addASTChild( currentAST, returnAST );
 		}
 		else {
-			goto _loop83;
+			goto _loop86;
 		}
 		
 	}
-	_loop83:;
+	_loop86:;
 	} // ( ... )*
 	lor_expr_AST = currentAST.root;
 	returnAST = lor_expr_AST;
@@ -1970,9 +2014,9 @@ void ncoParser::cond_expr() {
 	switch ( LA(1)) {
 	case QUESTION:
 	{
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp110_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-		tmp110_AST = astFactory->create(LT(1));
-		astFactory->makeASTRoot(currentAST, tmp110_AST);
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp115_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+		tmp115_AST = astFactory->create(LT(1));
+		astFactory->makeASTRoot(currentAST, tmp115_AST);
 		match(QUESTION);
 		ass_expr();
 		astFactory->addASTChild( currentAST, returnAST );
@@ -2023,41 +2067,41 @@ void ncoParser::ass_expr() {
 		switch ( LA(1)) {
 		case ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp112_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp112_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp112_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp117_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp117_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp117_AST);
 			match(ASSIGN);
 			break;
 		}
 		case PLUS_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp113_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp113_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp113_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp118_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp118_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp118_AST);
 			match(PLUS_ASSIGN);
 			break;
 		}
 		case MINUS_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp114_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp114_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp114_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp119_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp119_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp119_AST);
 			match(MINUS_ASSIGN);
 			break;
 		}
 		case TIMES_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp115_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp115_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp115_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp120_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp120_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp120_AST);
 			match(TIMES_ASSIGN);
 			break;
 		}
 		case DIVIDE_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp116_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-			tmp116_AST = astFactory->create(LT(1));
-			astFactory->makeASTRoot(currentAST, tmp116_AST);
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp121_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+			tmp121_AST = astFactory->create(LT(1));
+			astFactory->makeASTRoot(currentAST, tmp121_AST);
 			match(DIVIDE_ASSIGN);
 			break;
 		}
@@ -2080,16 +2124,16 @@ void ncoParser::ass_expr() {
 		case PLUS:
 		case MINUS:
 		case TIMES:
-		case FLOAT:
-		case DOUBLE:
-		case INT:
-		case BYTE:
-		case UBYTE:
-		case SHORT:
-		case USHORT:
-		case UINT:
-		case INT64:
-		case UINT64:
+		case NCAP_FLOAT:
+		case NCAP_DOUBLE:
+		case NCAP_INT:
+		case NCAP_BYTE:
+		case NCAP_UBYTE:
+		case NCAP_SHORT:
+		case NCAP_USHORT:
+		case NCAP_UINT:
+		case NCAP_INT64:
+		case NCAP_UINT64:
 		case N4STRING:
 		case DIM_ID_SIZE:
 		{
@@ -2135,9 +2179,9 @@ void ncoParser::imaginary_token() {
 	ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST imaginary_token_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	
-	ANTLR_USE_NAMESPACE(antlr)RefAST tmp117_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
-	tmp117_AST = astFactory->create(LT(1));
-	astFactory->addASTChild(currentAST, tmp117_AST);
+	ANTLR_USE_NAMESPACE(antlr)RefAST tmp122_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
+	tmp122_AST = astFactory->create(LT(1));
+	astFactory->addASTChild(currentAST, tmp122_AST);
 	match(NRootAST);
 	imaginary_token_AST = currentAST.root;
 	returnAST = imaginary_token_AST;
@@ -2145,7 +2189,7 @@ void ncoParser::imaginary_token() {
 
 void ncoParser::initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory )
 {
-	factory.setMaxNodeType(115);
+	factory.setMaxNodeType(118);
 }
 const char* ncoParser::tokenNames[] = {
 	"<0>",
@@ -2156,6 +2200,7 @@ const char* ncoParser::tokenNames[] = {
 	"BLOCK",
 	"ARG_LIST",
 	"DMN_LIST",
+	"DMN_LIST_P",
 	"DMN_ARG_LIST",
 	"LMT_LIST",
 	"VALUE_LIST",
@@ -2230,16 +2275,16 @@ const char* ncoParser::tokenNames[] = {
 	"-=",
 	"*=",
 	"/=",
-	"FLOAT",
-	"DOUBLE",
-	"INT",
-	"BYTE",
-	"UBYTE",
-	"SHORT",
-	"USHORT",
-	"UINT",
-	"INT64",
-	"UINT64",
+	"NCAP_FLOAT",
+	"NCAP_DOUBLE",
+	"NCAP_INT",
+	"NCAP_BYTE",
+	"NCAP_UBYTE",
+	"NCAP_SHORT",
+	"NCAP_USHORT",
+	"NCAP_UINT",
+	"NCAP_INT64",
+	"NCAP_UINT64",
 	"N4STRING",
 	"DIM_ID_SIZE",
 	"NRootAST",
@@ -2260,6 +2305,8 @@ const char* ncoParser::tokenNames[] = {
 	"NUMBER",
 	"variable or function or attribute identifier",
 	"VAR_ATT_QT",
+	"STR_ATT_ID",
+	"STR_ATT_QT",
 	"DIM_QT",
 	"dimension identifier",
 	"INCLUDE",
@@ -2267,34 +2314,41 @@ const char* ncoParser::tokenNames[] = {
 	0
 };
 
-const unsigned long ncoParser::_tokenSet_0_data_[] = { 3758096384UL, 4261509875UL, 1073479680UL, 0UL, 0UL, 0UL, 0UL, 0UL };
+const unsigned long ncoParser::_tokenSet_0_data_[] = { 3221225472UL, 4228052455UL, 2146959361UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // SEMI "defdim" "defdimunlim" LPAREN NSTRING "while" "break" "continue" 
 // "if" "where" "print" VAR_ID ATT_ID LCURL "for" FUNC INC DEC LNOT PLUS 
-// MINUS TIMES FLOAT DOUBLE INT BYTE UBYTE SHORT USHORT UINT INT64 UINT64 
-// N4STRING DIM_ID_SIZE 
+// MINUS TIMES NCAP_FLOAT NCAP_DOUBLE NCAP_INT NCAP_BYTE NCAP_UBYTE NCAP_SHORT 
+// NCAP_USHORT NCAP_UINT NCAP_INT64 NCAP_UINT64 N4STRING DIM_ID_SIZE 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoParser::_tokenSet_0(_tokenSet_0_data_,8);
-const unsigned long ncoParser::_tokenSet_1_data_[] = { 3758096386UL, 4280680435UL, 1073741823UL, 0UL, 0UL, 0UL, 0UL, 0UL };
+const unsigned long ncoParser::_tokenSet_1_data_[] = { 3221225474UL, 4266393575UL, 2147483647UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // EOF SEMI "defdim" "defdimunlim" LPAREN NSTRING "while" "break" "continue" 
 // "if" "else" "where" "elsewhere" "print" VAR_ID ATT_ID LCURL RCURL "for" 
 // LSQUARE DIVIDE DOT FUNC INC DEC LNOT PLUS MINUS TIMES CARET MOD FLTHAN 
 // FGTHAN LTHAN GTHAN GEQ LEQ EQ NEQ LAND LOR QUESTION ASSIGN PLUS_ASSIGN 
-// MINUS_ASSIGN TIMES_ASSIGN DIVIDE_ASSIGN FLOAT DOUBLE INT BYTE UBYTE 
-// SHORT USHORT UINT INT64 UINT64 N4STRING DIM_ID_SIZE 
+// MINUS_ASSIGN TIMES_ASSIGN DIVIDE_ASSIGN NCAP_FLOAT NCAP_DOUBLE NCAP_INT 
+// NCAP_BYTE NCAP_UBYTE NCAP_SHORT NCAP_USHORT NCAP_UINT NCAP_INT64 NCAP_UINT64 
+// N4STRING DIM_ID_SIZE 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoParser::_tokenSet_1(_tokenSet_1_data_,8);
-const unsigned long ncoParser::_tokenSet_2_data_[] = { 3758096386UL, 4261543923UL, 1073479680UL, 0UL, 0UL, 0UL, 0UL, 0UL };
+const unsigned long ncoParser::_tokenSet_2_data_[] = { 3221225474UL, 4228120551UL, 2146959361UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // EOF SEMI "defdim" "defdimunlim" LPAREN NSTRING "while" "break" "continue" 
 // "if" "else" "where" "elsewhere" "print" VAR_ID ATT_ID LCURL RCURL "for" 
-// FUNC INC DEC LNOT PLUS MINUS TIMES FLOAT DOUBLE INT BYTE UBYTE SHORT 
-// USHORT UINT INT64 UINT64 N4STRING DIM_ID_SIZE 
+// FUNC INC DEC LNOT PLUS MINUS TIMES NCAP_FLOAT NCAP_DOUBLE NCAP_INT NCAP_BYTE 
+// NCAP_UBYTE NCAP_SHORT NCAP_USHORT NCAP_UINT NCAP_INT64 NCAP_UINT64 N4STRING 
+// DIM_ID_SIZE 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoParser::_tokenSet_2(_tokenSet_2_data_,8);
-const unsigned long ncoParser::_tokenSet_3_data_[] = { 3758096386UL, 4293918719UL, 1073741823UL, 0UL, 0UL, 0UL, 0UL, 0UL };
+const unsigned long ncoParser::_tokenSet_3_data_[] = { 3221225474UL, 4292870143UL, 2147483647UL, 0UL, 0UL, 0UL, 0UL, 0UL };
 // EOF SEMI "defdim" "defdimunlim" LPAREN NSTRING COMMA RPAREN "while" 
 // "break" "continue" "if" "else" "where" "elsewhere" "print" VAR_ID ATT_ID 
 // LCURL RCURL "for" COLON LSQUARE DIM_ID DIVIDE DIM_MTD_ID CALL_REF DOT 
 // FUNC INC DEC LNOT PLUS MINUS TIMES CARET MOD FLTHAN FGTHAN LTHAN GTHAN 
 // GEQ LEQ EQ NEQ LAND LOR QUESTION ASSIGN PLUS_ASSIGN MINUS_ASSIGN TIMES_ASSIGN 
-// DIVIDE_ASSIGN FLOAT DOUBLE INT BYTE UBYTE SHORT USHORT UINT INT64 UINT64 
-// N4STRING DIM_ID_SIZE 
+// DIVIDE_ASSIGN NCAP_FLOAT NCAP_DOUBLE NCAP_INT NCAP_BYTE NCAP_UBYTE NCAP_SHORT 
+// NCAP_USHORT NCAP_UINT NCAP_INT64 NCAP_UINT64 N4STRING DIM_ID_SIZE 
 const ANTLR_USE_NAMESPACE(antlr)BitSet ncoParser::_tokenSet_3(_tokenSet_3_data_,8);
+const unsigned long ncoParser::_tokenSet_4_data_[] = { 0UL, 4228145182UL, 2146959361UL, 0UL, 0UL, 0UL, 0UL, 0UL };
+// LPAREN NSTRING COMMA RPAREN VAR_ID ATT_ID COLON FUNC INC DEC LNOT PLUS 
+// MINUS TIMES NCAP_FLOAT NCAP_DOUBLE NCAP_INT NCAP_BYTE NCAP_UBYTE NCAP_SHORT 
+// NCAP_USHORT NCAP_UINT NCAP_INT64 NCAP_UINT64 N4STRING DIM_ID_SIZE 
+const ANTLR_USE_NAMESPACE(antlr)BitSet ncoParser::_tokenSet_4(_tokenSet_4_data_,8);
 
 
diff --git a/src/nco++/ncoParser.hpp b/src/nco++/ncoParser.hpp
index 548ebc4..7068e46 100644
--- a/src/nco++/ncoParser.hpp
+++ b/src/nco++/ncoParser.hpp
@@ -53,7 +53,7 @@
 #line 54 "ncoParser.hpp"
 class CUSTOM_API ncoParser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public ncoParserTokenTypes
 {
-#line 83 "ncoGrammer.g"
+#line 84 "ncoGrammer.g"
 
 
 public:
@@ -90,6 +90,7 @@ public:
 	public: void block();
 	public: void lmt();
 	public: void lmt_list();
+	public: void dmn_list_p();
 	public: void dmn_list();
 	public: void dmn_arg_list();
 	public: void value_list();
@@ -123,10 +124,10 @@ protected:
 private:
 	static const char* tokenNames[];
 #ifndef NO_STATIC_CONSTS
-	static const int NUM_TOKENS = 116;
+	static const int NUM_TOKENS = 119;
 #else
 	enum {
-		NUM_TOKENS = 116
+		NUM_TOKENS = 119
 	};
 #endif
 	
@@ -138,6 +139,8 @@ private:
 	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2;
 	static const unsigned long _tokenSet_3_data_[];
 	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3;
+	static const unsigned long _tokenSet_4_data_[];
+	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4;
 };
 
 #endif /*INC_ncoParser_hpp_*/
diff --git a/src/nco++/ncoParserTokenTypes.hpp b/src/nco++/ncoParserTokenTypes.hpp
index de89282..2ca52da 100644
--- a/src/nco++/ncoParserTokenTypes.hpp
+++ b/src/nco++/ncoParserTokenTypes.hpp
@@ -16,114 +16,117 @@ struct CUSTOM_API ncoParserTokenTypes {
 		BLOCK = 5,
 		ARG_LIST = 6,
 		DMN_LIST = 7,
-		DMN_ARG_LIST = 8,
-		LMT_LIST = 9,
-		VALUE_LIST = 10,
-		FUNC_ARG = 11,
-		LMT = 12,
-		EXPR = 13,
-		FEXPR = 14,
-		POST_INC = 15,
-		POST_DEC = 16,
-		UTIMES = 17,
-		PROP = 18,
-		FOR2 = 19,
-		NORET = 20,
-		ATAN2 = 21,
-		WHERE_ASSIGN = 22,
-		MISS2ZERO = 23,
-		VSORT = 24,
-		VRSORT = 25,
-		VABS = 26,
-		VSQR2 = 27,
-		DEFDIM = 28,
-		SEMI = 29,
-		DEFDIMA = 30,
-		DEFDIMU = 31,
-		LPAREN = 32,
-		NSTRING = 33,
-		COMMA = 34,
-		RPAREN = 35,
-		WHILE = 36,
-		BREAK = 37,
-		CONTINUE = 38,
-		IF = 39,
-		ELSE = 40,
-		WHERE = 41,
-		ELSEWHERE = 42,
-		PRINT = 43,
-		VAR_ID = 44,
-		ATT_ID = 45,
-		LCURL = 46,
-		RCURL = 47,
-		FOR = 48,
-		COLON = 49,
-		LSQUARE = 50,
-		DIM_ID = 51,
-		RSQUARE = 52,
-		DIVIDE = 53,
-		DIM_MTD_ID = 54,
-		CALL_REF = 55,
-		DOT = 56,
-		FUNC = 57,
-		INC = 58,
-		DEC = 59,
-		LNOT = 60,
-		PLUS = 61,
-		MINUS = 62,
-		TIMES = 63,
-		CARET = 64,
-		MOD = 65,
-		FLTHAN = 66,
-		FGTHAN = 67,
-		LTHAN = 68,
-		GTHAN = 69,
-		GEQ = 70,
-		LEQ = 71,
-		EQ = 72,
-		NEQ = 73,
-		LAND = 74,
-		LOR = 75,
-		QUESTION = 76,
-		ASSIGN = 77,
-		PLUS_ASSIGN = 78,
-		MINUS_ASSIGN = 79,
-		TIMES_ASSIGN = 80,
-		DIVIDE_ASSIGN = 81,
-		FLOAT = 82,
-		DOUBLE = 83,
-		INT = 84,
-		BYTE = 85,
-		UBYTE = 86,
-		SHORT = 87,
-		USHORT = 88,
-		UINT = 89,
-		INT64 = 90,
-		UINT64 = 91,
-		N4STRING = 92,
-		DIM_ID_SIZE = 93,
-		NRootAST = 94,
-		SHIFTL = 95,
-		SHIFTR = 96,
-		QUOTE = 97,
-		DGT = 98,
-		LPH = 99,
-		LPHDGT = 100,
-		XPN = 101,
-		VAR_NM_QT = 102,
-		BLASTOUT = 103,
-		UNUSED_OPS = 104,
-		WS = 105,
-		CXX_COMMENT = 106,
-		C_COMMENT = 107,
-		NUMBER_DOT = 108,
-		NUMBER = 109,
-		VAR_ATT = 110,
-		VAR_ATT_QT = 111,
-		DIM_QT = 112,
-		DIM_VAL = 113,
-		INCLUDE = 114,
-		LMT_DMN = 115,
+		DMN_LIST_P = 8,
+		DMN_ARG_LIST = 9,
+		LMT_LIST = 10,
+		VALUE_LIST = 11,
+		FUNC_ARG = 12,
+		LMT = 13,
+		EXPR = 14,
+		FEXPR = 15,
+		POST_INC = 16,
+		POST_DEC = 17,
+		UTIMES = 18,
+		PROP = 19,
+		FOR2 = 20,
+		NORET = 21,
+		ATAN2 = 22,
+		WHERE_ASSIGN = 23,
+		MISS2ZERO = 24,
+		VSORT = 25,
+		VRSORT = 26,
+		VABS = 27,
+		VSQR2 = 28,
+		DEFDIM = 29,
+		SEMI = 30,
+		DEFDIMA = 31,
+		DEFDIMU = 32,
+		LPAREN = 33,
+		NSTRING = 34,
+		COMMA = 35,
+		RPAREN = 36,
+		WHILE = 37,
+		BREAK = 38,
+		CONTINUE = 39,
+		IF = 40,
+		ELSE = 41,
+		WHERE = 42,
+		ELSEWHERE = 43,
+		PRINT = 44,
+		VAR_ID = 45,
+		ATT_ID = 46,
+		LCURL = 47,
+		RCURL = 48,
+		FOR = 49,
+		COLON = 50,
+		LSQUARE = 51,
+		DIM_ID = 52,
+		RSQUARE = 53,
+		DIVIDE = 54,
+		DIM_MTD_ID = 55,
+		CALL_REF = 56,
+		DOT = 57,
+		FUNC = 58,
+		INC = 59,
+		DEC = 60,
+		LNOT = 61,
+		PLUS = 62,
+		MINUS = 63,
+		TIMES = 64,
+		CARET = 65,
+		MOD = 66,
+		FLTHAN = 67,
+		FGTHAN = 68,
+		LTHAN = 69,
+		GTHAN = 70,
+		GEQ = 71,
+		LEQ = 72,
+		EQ = 73,
+		NEQ = 74,
+		LAND = 75,
+		LOR = 76,
+		QUESTION = 77,
+		ASSIGN = 78,
+		PLUS_ASSIGN = 79,
+		MINUS_ASSIGN = 80,
+		TIMES_ASSIGN = 81,
+		DIVIDE_ASSIGN = 82,
+		NCAP_FLOAT = 83,
+		NCAP_DOUBLE = 84,
+		NCAP_INT = 85,
+		NCAP_BYTE = 86,
+		NCAP_UBYTE = 87,
+		NCAP_SHORT = 88,
+		NCAP_USHORT = 89,
+		NCAP_UINT = 90,
+		NCAP_INT64 = 91,
+		NCAP_UINT64 = 92,
+		N4STRING = 93,
+		DIM_ID_SIZE = 94,
+		NRootAST = 95,
+		SHIFTL = 96,
+		SHIFTR = 97,
+		QUOTE = 98,
+		DGT = 99,
+		LPH = 100,
+		LPHDGT = 101,
+		XPN = 102,
+		VAR_NM_QT = 103,
+		BLASTOUT = 104,
+		UNUSED_OPS = 105,
+		WS = 106,
+		CXX_COMMENT = 107,
+		C_COMMENT = 108,
+		NUMBER_DOT = 109,
+		NUMBER = 110,
+		VAR_ATT = 111,
+		VAR_ATT_QT = 112,
+		STR_ATT_ID = 113,
+		STR_ATT_QT = 114,
+		DIM_QT = 115,
+		DIM_VAL = 116,
+		INCLUDE = 117,
+		LMT_DMN = 118,
 		NULL_TREE_LOOKAHEAD = 3
 	};
 #ifdef __cplusplus
diff --git a/src/nco++/ncoTree.cpp b/src/nco++/ncoTree.cpp
index 03352ab..a8861dc 100644
--- a/src/nco++/ncoTree.cpp
+++ b/src/nco++/ncoTree.cpp
@@ -13,7 +13,7 @@ ncoTree::ncoTree()
 }
 
 int  ncoTree::lmt_peek(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 1079 "ncoGrammer.g"
+#line 1091 "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 1081 "ncoGrammer.g"
+#line 1093 "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 1092 "ncoGrammer.g"
+#line 1104 "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;
@@ -72,7 +72,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	ANTLR_USE_NAMESPACE(antlr)RefAST pvid = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST patt = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST pstr = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 1092 "ncoGrammer.g"
+#line 1104 "ncoGrammer.g"
 	
 	var_sct *var=NULL;
 	var_sct *var2=NULL;
@@ -94,7 +94,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,BLOCK);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1102 "ncoGrammer.g"
+#line 1114 "ncoGrammer.g"
 				
 				//std::cout <<"Num of Children in block="<<blk->getNumberOfChildren()<<endl;
 				iret=run_exe(blk->getFirstChild(),lpp_vtr.size() );
@@ -106,17 +106,17 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case EXPR:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t221 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t231 = _t;
 			exp = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 			match(_t,EXPR);
 			_t = _t->getFirstChild();
 			ass = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t221;
+			_t = __t231;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1108 "ncoGrammer.g"
+#line 1120 "ncoGrammer.g"
 				
 				RefAST tr;
 				RefAST ntr;  
@@ -143,17 +143,17 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case FEXPR:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t222 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp118_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t232 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp123_AST_in = _t;
 			match(_t,FEXPR);
 			_t = _t->getFirstChild();
 			fss = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t222;
+			_t = __t232;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1132 "ncoGrammer.g"
+#line 1144 "ncoGrammer.g"
 				
 				
 				var=out(fss);
@@ -167,8 +167,8 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case IF:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t223 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp119_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t233 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp124_AST_in = _t;
 			match(_t,IF);
 			_t = _t->getFirstChild();
 			var=out(_t);
@@ -176,10 +176,10 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			stmt = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t223;
+			_t = __t233;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1140 "ncoGrammer.g"
+#line 1152 "ncoGrammer.g"
 				
 				//if can have only 3 or 4 parts  , 1 node and 2 or 3 siblings
 				// IF LOGICAL_EXP STATEMENT1 STATEMENT2
@@ -215,8 +215,8 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case WHERE:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t224 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp120_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t234 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp125_AST_in = _t;
 			match(_t,WHERE);
 			_t = _t->getFirstChild();
 			var=out(_t);
@@ -224,10 +224,10 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			stmt3 = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t224;
+			_t = __t234;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1170 "ncoGrammer.g"
+#line 1182 "ncoGrammer.g"
 				
 				// convert mask to short 
 				RefAST tr; 
@@ -277,8 +277,8 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case WHILE:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t225 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp121_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t235 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp126_AST_in = _t;
 			match(_t,WHILE);
 			_t = _t->getFirstChild();
 			lgcl = _t;
@@ -287,10 +287,10 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			stmt1 = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t225;
+			_t = __t235;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1214 "ncoGrammer.g"
+#line 1226 "ncoGrammer.g"
 				
 				
 				bool br;
@@ -325,8 +325,8 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case FOR:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t226 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp122_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t236 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp127_AST_in = _t;
 			match(_t,FOR);
 			_t = _t->getFirstChild();
 			e1 = _t;
@@ -341,10 +341,10 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			stmt2 = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t226;
+			_t = __t236;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1243 "ncoGrammer.g"
+#line 1255 "ncoGrammer.g"
 				
 				bool b1,b2,b3,br;
 				var_sct *var_f1;
@@ -401,11 +401,11 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case ELSE:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp123_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp128_AST_in = _t;
 			match(_t,ELSE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1294 "ncoGrammer.g"
+#line 1306 "ncoGrammer.g"
 				iret=ELSE;
 #line 411 "ncoTree.cpp"
 			}
@@ -413,11 +413,11 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case BREAK:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp124_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp129_AST_in = _t;
 			match(_t,BREAK);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1295 "ncoGrammer.g"
+#line 1307 "ncoGrammer.g"
 				iret=BREAK;
 #line 423 "ncoTree.cpp"
 			}
@@ -425,11 +425,11 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case CONTINUE:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp125_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp130_AST_in = _t;
 			match(_t,CONTINUE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1296 "ncoGrammer.g"
+#line 1308 "ncoGrammer.g"
 				iret=CONTINUE;
 #line 435 "ncoTree.cpp"
 			}
@@ -437,11 +437,11 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case NULL_NODE:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp126_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp131_AST_in = _t;
 			match(_t,NULL_NODE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1297 "ncoGrammer.g"
+#line 1309 "ncoGrammer.g"
 				iret=NULL_NODE;
 #line 447 "ncoTree.cpp"
 			}
@@ -449,7 +449,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case DEFDIM:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t227 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t237 = _t;
 			dtyp = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 			match(_t,DEFDIM);
 			_t = _t->getFirstChild();
@@ -497,16 +497,16 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			case MINUS_ASSIGN:
 			case TIMES_ASSIGN:
 			case DIVIDE_ASSIGN:
-			case FLOAT:
-			case DOUBLE:
-			case INT:
-			case BYTE:
-			case UBYTE:
-			case SHORT:
-			case USHORT:
-			case UINT:
-			case INT64:
-			case UINT64:
+			case NCAP_FLOAT:
+			case NCAP_DOUBLE:
+			case NCAP_INT:
+			case NCAP_BYTE:
+			case NCAP_UBYTE:
+			case NCAP_SHORT:
+			case NCAP_USHORT:
+			case NCAP_UINT:
+			case NCAP_INT64:
+			case NCAP_UINT64:
 			case N4STRING:
 			case DIM_ID_SIZE:
 			{
@@ -524,10 +524,10 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			}
 			}
 			}
-			_t = __t227;
+			_t = __t237;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1299 "ncoGrammer.g"
+#line 1311 "ncoGrammer.g"
 				
 				
 				bool bunlimited=false;      
@@ -573,44 +573,44 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			break;
 		}
 		default:
-			bool synPredMatched231 = false;
+			bool synPredMatched241 = false;
 			if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 				_t = ASTNULL;
 			if (((_t->getType() == PRINT))) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t231 = _t;
-				synPredMatched231 = true;
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t241 = _t;
+				synPredMatched241 = true;
 				inputState->guessing++;
 				try {
 					{
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t230 = _t;
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp127_AST_in = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t240 = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp132_AST_in = _t;
 					match(_t,PRINT);
 					_t = _t->getFirstChild();
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp128_AST_in = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp133_AST_in = _t;
 					match(_t,VAR_ID);
 					_t = _t->getNextSibling();
-					_t = __t230;
+					_t = __t240;
 					_t = _t->getNextSibling();
 					}
 				}
 				catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-					synPredMatched231 = false;
+					synPredMatched241 = false;
 				}
-				_t = __t231;
+				_t = __t241;
 				inputState->guessing--;
 			}
-			if ( synPredMatched231 ) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t232 = _t;
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp129_AST_in = _t;
+			if ( synPredMatched241 ) {
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t242 = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp134_AST_in = _t;
 				match(_t,PRINT);
 				_t = _t->getFirstChild();
 				pvid = _t;
 				match(_t,VAR_ID);
 				_t = _t->getNextSibling();
-				_t = __t232;
+				_t = __t242;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1341 "ncoGrammer.g"
+#line 1353 "ncoGrammer.g"
 					
 					
 					int var_id;
@@ -662,44 +662,44 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				}
 			}
 			else {
-				bool synPredMatched235 = false;
+				bool synPredMatched245 = false;
 				if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 					_t = ASTNULL;
 				if (((_t->getType() == PRINT))) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t235 = _t;
-					synPredMatched235 = true;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t245 = _t;
+					synPredMatched245 = true;
 					inputState->guessing++;
 					try {
 						{
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t234 = _t;
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp130_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t244 = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp135_AST_in = _t;
 						match(_t,PRINT);
 						_t = _t->getFirstChild();
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp131_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp136_AST_in = _t;
 						match(_t,ATT_ID);
 						_t = _t->getNextSibling();
-						_t = __t234;
+						_t = __t244;
 						_t = _t->getNextSibling();
 						}
 					}
 					catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-						synPredMatched235 = false;
+						synPredMatched245 = false;
 					}
-					_t = __t235;
+					_t = __t245;
 					inputState->guessing--;
 				}
-				if ( synPredMatched235 ) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t236 = _t;
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp132_AST_in = _t;
+				if ( synPredMatched245 ) {
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t246 = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp137_AST_in = _t;
 					match(_t,PRINT);
 					_t = _t->getFirstChild();
 					patt = _t;
 					match(_t,ATT_ID);
 					_t = _t->getNextSibling();
-					_t = __t236;
+					_t = __t246;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 1388 "ncoGrammer.g"
+#line 1400 "ncoGrammer.g"
 						
 						
 						int apsn;
@@ -758,44 +758,44 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 					}
 				}
 				else {
-					bool synPredMatched239 = false;
+					bool synPredMatched249 = false;
 					if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 						_t = ASTNULL;
 					if (((_t->getType() == PRINT))) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t239 = _t;
-						synPredMatched239 = true;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t249 = _t;
+						synPredMatched249 = true;
 						inputState->guessing++;
 						try {
 							{
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t238 = _t;
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp133_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t248 = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp138_AST_in = _t;
 							match(_t,PRINT);
 							_t = _t->getFirstChild();
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp134_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp139_AST_in = _t;
 							match(_t,NSTRING);
 							_t = _t->getNextSibling();
-							_t = __t238;
+							_t = __t248;
 							_t = _t->getNextSibling();
 							}
 						}
 						catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-							synPredMatched239 = false;
+							synPredMatched249 = false;
 						}
-						_t = __t239;
+						_t = __t249;
 						inputState->guessing--;
 					}
-					if ( synPredMatched239 ) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t240 = _t;
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp135_AST_in = _t;
+					if ( synPredMatched249 ) {
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t250 = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp140_AST_in = _t;
 						match(_t,PRINT);
 						_t = _t->getFirstChild();
 						pstr = _t;
 						match(_t,NSTRING);
 						_t = _t->getNextSibling();
-						_t = __t240;
+						_t = __t250;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1443 "ncoGrammer.g"
+#line 1455 "ncoGrammer.g"
 							
 							char *prn_sng;
 							
@@ -829,7 +829,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 1997 "ncoGrammer.g"
+#line 2039 "ncoGrammer.g"
 	var_sct *var;
 #line 835 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST out_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -863,7 +863,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 1997 "ncoGrammer.g"
+#line 2039 "ncoGrammer.g"
 	
 	const std::string fnc_nm("out"); 
 		var_sct *var1;
@@ -878,18 +878,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		switch ( _t->getType()) {
 		case TIMES:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t308 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp136_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t320 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp141_AST_in = _t;
 			match(_t,TIMES);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t308;
+			_t = __t320;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2024 "ncoGrammer.g"
+#line 2066 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, TIMES );
 #line 895 "ncoTree.cpp"
 			}
@@ -897,18 +897,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case DIVIDE:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t309 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp137_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t321 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp142_AST_in = _t;
 			match(_t,DIVIDE);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t309;
+			_t = __t321;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2027 "ncoGrammer.g"
+#line 2069 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, DIVIDE );
 #line 914 "ncoTree.cpp"
 			}
@@ -916,18 +916,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case MOD:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t310 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp138_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t322 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp143_AST_in = _t;
 			match(_t,MOD);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t310;
+			_t = __t322;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2029 "ncoGrammer.g"
+#line 2071 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, MOD);
 #line 933 "ncoTree.cpp"
 			}
@@ -935,18 +935,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case CARET:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t311 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp139_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t323 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp144_AST_in = _t;
 			match(_t,CARET);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t311;
+			_t = __t323;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2031 "ncoGrammer.g"
+#line 2073 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, CARET);
 #line 952 "ncoTree.cpp"
 			}
@@ -954,16 +954,16 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case LNOT:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t312 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp140_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t324 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp145_AST_in = _t;
 			match(_t,LNOT);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
-			_t = __t312;
+			_t = __t324;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2034 "ncoGrammer.g"
+#line 2076 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,NULL_CEWI, LNOT );
 #line 969 "ncoTree.cpp"
 			}
@@ -971,16 +971,16 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case INC:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t315 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp141_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t327 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp146_AST_in = _t;
 			match(_t,INC);
 			_t = _t->getFirstChild();
 			var1=out_asn(_t);
 			_t = _retTree;
-			_t = __t315;
+			_t = __t327;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2040 "ncoGrammer.g"
+#line 2082 "ncoGrammer.g"
 				var=ncap_var_var_inc(var1,NULL_CEWI,INC,false,prs_arg);
 #line 986 "ncoTree.cpp"
 			}
@@ -988,16 +988,16 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case DEC:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t316 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp142_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t328 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp147_AST_in = _t;
 			match(_t,DEC);
 			_t = _t->getFirstChild();
 			var1=out_asn(_t);
 			_t = _retTree;
-			_t = __t316;
+			_t = __t328;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2042 "ncoGrammer.g"
+#line 2084 "ncoGrammer.g"
 				var=ncap_var_var_inc(var1,NULL_CEWI, DEC,false,prs_arg );
 #line 1003 "ncoTree.cpp"
 			}
@@ -1005,16 +1005,16 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case POST_INC:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t317 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp143_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t329 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp148_AST_in = _t;
 			match(_t,POST_INC);
 			_t = _t->getFirstChild();
 			var1=out_asn(_t);
 			_t = _retTree;
-			_t = __t317;
+			_t = __t329;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2044 "ncoGrammer.g"
+#line 2086 "ncoGrammer.g"
 				
 				var=ncap_var_var_inc(var1,NULL_CEWI,POST_INC,false,prs_arg);
 				
@@ -1024,16 +1024,16 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case POST_DEC:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t318 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp144_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t330 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp149_AST_in = _t;
 			match(_t,POST_DEC);
 			_t = _t->getFirstChild();
 			var1=out_asn(_t);
 			_t = _retTree;
-			_t = __t318;
+			_t = __t330;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2047 "ncoGrammer.g"
+#line 2089 "ncoGrammer.g"
 				
 				var=ncap_var_var_inc(var1,NULL_CEWI,POST_DEC,false,prs_arg);
 				
@@ -1043,18 +1043,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case LAND:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t319 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp145_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t331 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp150_AST_in = _t;
 			match(_t,LAND);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t319;
+			_t = __t331;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2052 "ncoGrammer.g"
+#line 2094 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LAND );
 #line 1060 "ncoTree.cpp"
 			}
@@ -1062,18 +1062,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case LOR:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t320 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp146_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t332 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp151_AST_in = _t;
 			match(_t,LOR);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t320;
+			_t = __t332;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2054 "ncoGrammer.g"
+#line 2096 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LOR );
 #line 1079 "ncoTree.cpp"
 			}
@@ -1081,18 +1081,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case LTHAN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t321 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp147_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t333 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp152_AST_in = _t;
 			match(_t,LTHAN);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t321;
+			_t = __t333;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2057 "ncoGrammer.g"
+#line 2099 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LTHAN );
 #line 1098 "ncoTree.cpp"
 			}
@@ -1100,18 +1100,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case GTHAN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t322 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp148_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t334 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp153_AST_in = _t;
 			match(_t,GTHAN);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t322;
+			_t = __t334;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2059 "ncoGrammer.g"
+#line 2101 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, GTHAN );
 #line 1117 "ncoTree.cpp"
 			}
@@ -1119,18 +1119,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case GEQ:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t323 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp149_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t335 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp154_AST_in = _t;
 			match(_t,GEQ);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t323;
+			_t = __t335;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2061 "ncoGrammer.g"
+#line 2103 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, GEQ );
 #line 1136 "ncoTree.cpp"
 			}
@@ -1138,18 +1138,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case LEQ:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t324 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp150_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t336 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp155_AST_in = _t;
 			match(_t,LEQ);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t324;
+			_t = __t336;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2063 "ncoGrammer.g"
+#line 2105 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LEQ );
 #line 1155 "ncoTree.cpp"
 			}
@@ -1157,18 +1157,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case EQ:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t325 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp151_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t337 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp156_AST_in = _t;
 			match(_t,EQ);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t325;
+			_t = __t337;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2065 "ncoGrammer.g"
+#line 2107 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, EQ );
 #line 1174 "ncoTree.cpp"
 			}
@@ -1176,18 +1176,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case NEQ:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t326 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp152_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t338 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp157_AST_in = _t;
 			match(_t,NEQ);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t326;
+			_t = __t338;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2067 "ncoGrammer.g"
+#line 2109 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, NEQ );
 #line 1193 "ncoTree.cpp"
 			}
@@ -1195,18 +1195,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case FLTHAN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t327 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp153_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t339 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp158_AST_in = _t;
 			match(_t,FLTHAN);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t327;
+			_t = __t339;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2070 "ncoGrammer.g"
+#line 2112 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, FLTHAN );
 #line 1212 "ncoTree.cpp"
 			}
@@ -1214,18 +1214,18 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case FGTHAN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t328 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp154_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t340 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp159_AST_in = _t;
 			match(_t,FGTHAN);
 			_t = _t->getFirstChild();
 			var1=out(_t);
 			_t = _retTree;
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t328;
+			_t = __t340;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2072 "ncoGrammer.g"
+#line 2114 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, FGTHAN );
 #line 1231 "ncoTree.cpp"
 			}
@@ -1233,8 +1233,8 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case PLUS_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t329 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp155_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t341 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp160_AST_in = _t;
 			match(_t,PLUS_ASSIGN);
 			_t = _t->getFirstChild();
 			pls_asn = _t;
@@ -1242,10 +1242,10 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = _t->getNextSibling();
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t329;
+			_t = __t341;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2074 "ncoGrammer.g"
+#line 2116 "ncoGrammer.g"
 				
 				var1=out_asn(pls_asn);
 				var=ncap_var_var_inc(var1,var2, PLUS_ASSIGN ,(pls_asn->getType()==UTIMES), prs_arg);
@@ -1256,8 +1256,8 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case MINUS_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t330 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp156_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t342 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp161_AST_in = _t;
 			match(_t,MINUS_ASSIGN);
 			_t = _t->getFirstChild();
 			min_asn = _t;
@@ -1265,10 +1265,10 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = _t->getNextSibling();
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t330;
+			_t = __t342;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2078 "ncoGrammer.g"
+#line 2120 "ncoGrammer.g"
 				
 				var1=out_asn(min_asn);
 				var=ncap_var_var_inc(var1,var2, MINUS_ASSIGN ,(min_asn->getType()==UTIMES), prs_arg);
@@ -1279,8 +1279,8 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case TIMES_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t331 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp157_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t343 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp162_AST_in = _t;
 			match(_t,TIMES_ASSIGN);
 			_t = _t->getFirstChild();
 			tim_asn = _t;
@@ -1288,10 +1288,10 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = _t->getNextSibling();
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t331;
+			_t = __t343;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2082 "ncoGrammer.g"
+#line 2124 "ncoGrammer.g"
 				
 				var1=out_asn(tim_asn);
 				var=ncap_var_var_inc(var1,var2, TIMES_ASSIGN ,(tim_asn->getType()==UTIMES), prs_arg);
@@ -1302,8 +1302,8 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case DIVIDE_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t332 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp158_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t344 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp163_AST_in = _t;
 			match(_t,DIVIDE_ASSIGN);
 			_t = _t->getFirstChild();
 			div_asn = _t;
@@ -1311,10 +1311,10 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = _t->getNextSibling();
 			var2=out(_t);
 			_t = _retTree;
-			_t = __t332;
+			_t = __t344;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2086 "ncoGrammer.g"
+#line 2128 "ncoGrammer.g"
 					
 				var1=out_asn(div_asn);
 				var=ncap_var_var_inc(var1,var2, DIVIDE_ASSIGN ,(div_asn->getType()==UTIMES), prs_arg);
@@ -1325,17 +1325,17 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t333 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp159_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t345 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp164_AST_in = _t;
 			match(_t,ASSIGN);
 			_t = _t->getFirstChild();
 			asn = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t333;
+			_t = __t345;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2092 "ncoGrammer.g"
+#line 2134 "ncoGrammer.g"
 				
 				// Check for RAM variable - if present 
 				// change tree - for example from:
@@ -1376,17 +1376,17 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case WHERE_ASSIGN:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t334 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp160_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t346 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp165_AST_in = _t;
 			match(_t,WHERE_ASSIGN);
 			_t = _t->getFirstChild();
 			wasn = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t334;
+			_t = __t346;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2126 "ncoGrammer.g"
+#line 2168 "ncoGrammer.g"
 				
 				
 				
@@ -1396,8 +1396,8 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case QUESTION:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t335 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp161_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t347 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp166_AST_in = _t;
 			match(_t,QUESTION);
 			_t = _t->getFirstChild();
 			var1=out(_t);
@@ -1405,10 +1405,10 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			qus = _t;
 			if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 			_t = _t->getNextSibling();
-			_t = __t335;
+			_t = __t347;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2131 "ncoGrammer.g"
+#line 2173 "ncoGrammer.g"
 				
 				bool br;
 				
@@ -1431,17 +1431,17 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case FUNC:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t336 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t348 = _t;
 			m = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 			match(_t,FUNC);
 			_t = _t->getFirstChild();
 			args = _t;
 			match(_t,FUNC_ARG);
 			_t = _t->getNextSibling();
-			_t = __t336;
+			_t = __t348;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2149 "ncoGrammer.g"
+#line 2191 "ncoGrammer.g"
 				
 				// The lexer has appended the index of the function to the function name m - (name#index)
 				//  the index is into fmc_vtr  
@@ -1457,8 +1457,8 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		}
 		case DOT:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t337 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp162_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t349 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp167_AST_in = _t;
 			match(_t,DOT);
 			_t = _t->getFirstChild();
 			mtd = _t;
@@ -1470,10 +1470,10 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			margs = _t;
 			match(_t,FUNC_ARG);
 			_t = _t->getNextSibling();
-			_t = __t337;
+			_t = __t349;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2160 "ncoGrammer.g"
+#line 2202 "ncoGrammer.g"
 				
 				// The lexer has appended the index of the function to the function name m - (name#index)
 				//  the index is into fmc_vtr  
@@ -1492,7 +1492,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,DIM_ID_SIZE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2170 "ncoGrammer.g"
+#line 2212 "ncoGrammer.g"
 				
 				string sDim=dval->getText();
 				dmn_sct *dmn_fd;
@@ -1542,7 +1542,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,ATT_ID);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2257 "ncoGrammer.g"
+#line 2299 "ncoGrammer.g"
 				
 				
 				NcapVar *Nvar=NULL;
@@ -1582,7 +1582,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,VALUE_LIST);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2288 "ncoGrammer.g"
+#line 2330 "ncoGrammer.g"
 				
 				var=value_list(vlst);
 				
@@ -1596,7 +1596,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NSTRING);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2293 "ncoGrammer.g"
+#line 2335 "ncoGrammer.g"
 				
 				char *tsng;
 				
@@ -1628,7 +1628,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,N4STRING);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2316 "ncoGrammer.g"
+#line 2358 "ncoGrammer.g"
 				
 				char *tsng;
 				
@@ -1660,265 +1660,265 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			}
 			break;
 		}
-		case FLOAT:
+		case NCAP_FLOAT:
 		{
 			val_float = _t;
-			match(_t,FLOAT);
+			match(_t,NCAP_FLOAT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2346 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~float"),(nc_type)NC_FLOAT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~float"),static_cast<float>(std::strtod(val_float->getText().c_str(),(char **)NULL)));
+#line 2388 "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 1672 "ncoTree.cpp"
 			}
 			break;
 		}
-		case DOUBLE:
+		case NCAP_DOUBLE:
 		{
 			val_double = _t;
-			match(_t,DOUBLE);
+			match(_t,NCAP_DOUBLE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2348 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~double"),(nc_type)NC_DOUBLE,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~double"),strtod(val_double->getText().c_str(),(char **)NULL));
+#line 2390 "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 1684 "ncoTree.cpp"
 			}
 			break;
 		}
-		case INT:
+		case NCAP_INT:
 		{
 			val_int = _t;
-			match(_t,INT);
+			match(_t,NCAP_INT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2350 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~int"),(nc_type)NC_INT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~int"),static_cast<nco_int>(std::strtol(val_int->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
+#line 2392 "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 1696 "ncoTree.cpp"
 			}
 			break;
 		}
-		case SHORT:
+		case NCAP_SHORT:
 		{
 			val_short = _t;
-			match(_t,SHORT);
+			match(_t,NCAP_SHORT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2352 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~short"),(nc_type)NC_SHORT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~short"),static_cast<nco_short>(std::strtol(val_short->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
+#line 2394 "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 1708 "ncoTree.cpp"
 			}
 			break;
 		}
-		case BYTE:
+		case NCAP_BYTE:
 		{
 			val_byte = _t;
-			match(_t,BYTE);
+			match(_t,NCAP_BYTE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2354 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~byte"),(nc_type)NC_BYTE,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~byte"),static_cast<nco_byte>(std::strtol(val_byte->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
+#line 2396 "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 1720 "ncoTree.cpp"
 			}
 			break;
 		}
-		case UBYTE:
+		case NCAP_UBYTE:
 		{
 			val_ubyte = _t;
-			match(_t,UBYTE);
+			match(_t,NCAP_UBYTE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2359 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~ubyte"),(nc_type)NC_UBYTE,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~ubyte"),static_cast<nco_ubyte>(std::strtoul(val_ubyte->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
+#line 2401 "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 1732 "ncoTree.cpp"
 			}
 			break;
 		}
-		case USHORT:
+		case NCAP_USHORT:
 		{
 			val_ushort = _t;
-			match(_t,USHORT);
+			match(_t,NCAP_USHORT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2363 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~ushort"),(nc_type)NC_USHORT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~ushort"),static_cast<nco_ushort>(std::strtoul(val_ushort->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
+#line 2405 "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 1744 "ncoTree.cpp"
 			}
 			break;
 		}
-		case UINT:
+		case NCAP_UINT:
 		{
 			val_uint = _t;
-			match(_t,UINT);
+			match(_t,NCAP_UINT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2365 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~uint"),(nc_type)NC_UINT,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~uint"),static_cast<nco_uint>(std::strtoul(val_uint->getText().c_str(),(char **)NULL,NCO_SNG_CNV_BASE10)));
+#line 2407 "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 1756 "ncoTree.cpp"
 			}
 			break;
 		}
-		case INT64:
+		case NCAP_INT64:
 		{
 			val_int64 = _t;
-			match(_t,INT64);
+			match(_t,NCAP_INT64);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2367 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~int64"),(nc_type)NC_INT64,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~int64"),sng2nbr(val_int64->getText(),nco_int64_CEWI));
+#line 2409 "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 1768 "ncoTree.cpp"
 			}
 			break;
 		}
-		case UINT64:
+		case NCAP_UINT64:
 		{
 			val_uint64 = _t;
-			match(_t,UINT64);
+			match(_t,NCAP_UINT64);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2371 "ncoGrammer.g"
-				if(prs_arg->ntl_scn) var=ncap_sclr_var_mk(static_cast<std::string>("~uint64"),(nc_type)NC_UINT64,false); else var=ncap_sclr_var_mk(static_cast<std::string>("~uint64"),sng2nbr(val_uint64->getText(),nco_uint64_CEWI));
+#line 2413 "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 1780 "ncoTree.cpp"
 			}
 			break;
 		}
 		default:
-			bool synPredMatched278 = false;
+			bool synPredMatched290 = false;
 			if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 				_t = ASTNULL;
 			if (((_t->getType() == PLUS))) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t278 = _t;
-				synPredMatched278 = true;
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t290 = _t;
+				synPredMatched290 = true;
 				inputState->guessing++;
 				try {
 					{
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t277 = _t;
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp163_AST_in = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t289 = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp168_AST_in = _t;
 					match(_t,PLUS);
 					_t = _t->getFirstChild();
 					out(_t);
 					_t = _retTree;
 					out(_t);
 					_t = _retTree;
-					_t = __t277;
+					_t = __t289;
 					_t = _t->getNextSibling();
 					}
 				}
 				catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-					synPredMatched278 = false;
+					synPredMatched290 = false;
 				}
-				_t = __t278;
+				_t = __t290;
 				inputState->guessing--;
 			}
-			if ( synPredMatched278 ) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t279 = _t;
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp164_AST_in = _t;
+			if ( synPredMatched290 ) {
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t291 = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp169_AST_in = _t;
 				match(_t,PLUS);
 				_t = _t->getFirstChild();
 				var1=out(_t);
 				_t = _retTree;
 				var2=out(_t);
 				_t = _retTree;
-				_t = __t279;
+				_t = __t291;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 2007 "ncoGrammer.g"
+#line 2049 "ncoGrammer.g"
 					var=ncap_var_var_op(var1,var2, PLUS );
 #line 1826 "ncoTree.cpp"
 				}
 			}
 			else {
-				bool synPredMatched282 = false;
+				bool synPredMatched294 = false;
 				if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 					_t = ASTNULL;
 				if (((_t->getType() == MINUS))) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t282 = _t;
-					synPredMatched282 = true;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t294 = _t;
+					synPredMatched294 = true;
 					inputState->guessing++;
 					try {
 						{
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t281 = _t;
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp165_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t293 = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp170_AST_in = _t;
 						match(_t,MINUS);
 						_t = _t->getFirstChild();
 						out(_t);
 						_t = _retTree;
 						out(_t);
 						_t = _retTree;
-						_t = __t281;
+						_t = __t293;
 						_t = _t->getNextSibling();
 						}
 					}
 					catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-						synPredMatched282 = false;
+						synPredMatched294 = false;
 					}
-					_t = __t282;
+					_t = __t294;
 					inputState->guessing--;
 				}
-				if ( synPredMatched282 ) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t283 = _t;
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp166_AST_in = _t;
+				if ( synPredMatched294 ) {
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t295 = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp171_AST_in = _t;
 					match(_t,MINUS);
 					_t = _t->getFirstChild();
 					var1=out(_t);
 					_t = _retTree;
 					var2=out(_t);
 					_t = _retTree;
-					_t = __t283;
+					_t = __t295;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 2009 "ncoGrammer.g"
+#line 2051 "ncoGrammer.g"
 						var=ncap_var_var_op(var1,var2, MINUS );
 #line 1871 "ncoTree.cpp"
 					}
 				}
 				else {
-					bool synPredMatched287 = false;
+					bool synPredMatched299 = false;
 					if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 						_t = ASTNULL;
 					if (((_t->getType() == UTIMES))) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t287 = _t;
-						synPredMatched287 = true;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t299 = _t;
+						synPredMatched299 = true;
 						inputState->guessing++;
 						try {
 							{
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t285 = _t;
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp167_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t297 = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp172_AST_in = _t;
 							match(_t,UTIMES);
 							_t = _t->getFirstChild();
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t286 = _t;
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp168_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t298 = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp173_AST_in = _t;
 							match(_t,POST_INC);
 							_t = _t->getFirstChild();
 							out(_t);
 							_t = _retTree;
-							_t = __t286;
+							_t = __t298;
 							_t = _t->getNextSibling();
-							_t = __t285;
+							_t = __t297;
 							_t = _t->getNextSibling();
 							}
 						}
 						catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-							synPredMatched287 = false;
+							synPredMatched299 = false;
 						}
-						_t = __t287;
+						_t = __t299;
 						inputState->guessing--;
 					}
-					if ( synPredMatched287 ) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t288 = _t;
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp169_AST_in = _t;
+					if ( synPredMatched299 ) {
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t300 = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp174_AST_in = _t;
 						match(_t,UTIMES);
 						_t = _t->getFirstChild();
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t289 = _t;
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp170_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t301 = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp175_AST_in = _t;
 						match(_t,POST_INC);
 						_t = _t->getFirstChild();
 						var1=out_asn(_t);
 						_t = _retTree;
-						_t = __t289;
+						_t = __t301;
 						_t = _t->getNextSibling();
-						_t = __t288;
+						_t = __t300;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 2010 "ncoGrammer.g"
+#line 2052 "ncoGrammer.g"
 							
 							var=ncap_var_var_inc(var1,NULL_CEWI,POST_INC,true,prs_arg);      
 							
@@ -1926,54 +1926,54 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 						}
 					}
 					else {
-						bool synPredMatched293 = false;
+						bool synPredMatched305 = false;
 						if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 							_t = ASTNULL;
 						if (((_t->getType() == UTIMES))) {
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t293 = _t;
-							synPredMatched293 = true;
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t305 = _t;
+							synPredMatched305 = true;
 							inputState->guessing++;
 							try {
 								{
-								ANTLR_USE_NAMESPACE(antlr)RefAST __t291 = _t;
-								ANTLR_USE_NAMESPACE(antlr)RefAST tmp171_AST_in = _t;
+								ANTLR_USE_NAMESPACE(antlr)RefAST __t303 = _t;
+								ANTLR_USE_NAMESPACE(antlr)RefAST tmp176_AST_in = _t;
 								match(_t,UTIMES);
 								_t = _t->getFirstChild();
-								ANTLR_USE_NAMESPACE(antlr)RefAST __t292 = _t;
-								ANTLR_USE_NAMESPACE(antlr)RefAST tmp172_AST_in = _t;
+								ANTLR_USE_NAMESPACE(antlr)RefAST __t304 = _t;
+								ANTLR_USE_NAMESPACE(antlr)RefAST tmp177_AST_in = _t;
 								match(_t,POST_DEC);
 								_t = _t->getFirstChild();
 								out(_t);
 								_t = _retTree;
-								_t = __t292;
+								_t = __t304;
 								_t = _t->getNextSibling();
-								_t = __t291;
+								_t = __t303;
 								_t = _t->getNextSibling();
 								}
 							}
 							catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-								synPredMatched293 = false;
+								synPredMatched305 = false;
 							}
-							_t = __t293;
+							_t = __t305;
 							inputState->guessing--;
 						}
-						if ( synPredMatched293 ) {
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t294 = _t;
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp173_AST_in = _t;
+						if ( synPredMatched305 ) {
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t306 = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp178_AST_in = _t;
 							match(_t,UTIMES);
 							_t = _t->getFirstChild();
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t295 = _t;
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp174_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t307 = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp179_AST_in = _t;
 							match(_t,POST_DEC);
 							_t = _t->getFirstChild();
 							var1=out_asn(_t);
 							_t = _retTree;
-							_t = __t295;
+							_t = __t307;
 							_t = _t->getNextSibling();
-							_t = __t294;
+							_t = __t306;
 							_t = _t->getNextSibling();
 							if ( inputState->guessing==0 ) {
-#line 2013 "ncoGrammer.g"
+#line 2055 "ncoGrammer.g"
 								
 								var=ncap_var_var_inc(var1,NULL_CEWI,POST_DEC,true,prs_arg);      
 								
@@ -1981,54 +1981,54 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 							}
 						}
 						else {
-							bool synPredMatched299 = false;
+							bool synPredMatched311 = false;
 							if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 								_t = ASTNULL;
 							if (((_t->getType() == UTIMES))) {
-								ANTLR_USE_NAMESPACE(antlr)RefAST __t299 = _t;
-								synPredMatched299 = true;
+								ANTLR_USE_NAMESPACE(antlr)RefAST __t311 = _t;
+								synPredMatched311 = true;
 								inputState->guessing++;
 								try {
 									{
-									ANTLR_USE_NAMESPACE(antlr)RefAST __t297 = _t;
-									ANTLR_USE_NAMESPACE(antlr)RefAST tmp175_AST_in = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST __t309 = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST tmp180_AST_in = _t;
 									match(_t,UTIMES);
 									_t = _t->getFirstChild();
-									ANTLR_USE_NAMESPACE(antlr)RefAST __t298 = _t;
-									ANTLR_USE_NAMESPACE(antlr)RefAST tmp176_AST_in = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST __t310 = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST tmp181_AST_in = _t;
 									match(_t,INC);
 									_t = _t->getFirstChild();
 									out(_t);
 									_t = _retTree;
-									_t = __t298;
+									_t = __t310;
 									_t = _t->getNextSibling();
-									_t = __t297;
+									_t = __t309;
 									_t = _t->getNextSibling();
 									}
 								}
 								catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-									synPredMatched299 = false;
+									synPredMatched311 = false;
 								}
-								_t = __t299;
+								_t = __t311;
 								inputState->guessing--;
 							}
-							if ( synPredMatched299 ) {
-								ANTLR_USE_NAMESPACE(antlr)RefAST __t300 = _t;
-								ANTLR_USE_NAMESPACE(antlr)RefAST tmp177_AST_in = _t;
+							if ( synPredMatched311 ) {
+								ANTLR_USE_NAMESPACE(antlr)RefAST __t312 = _t;
+								ANTLR_USE_NAMESPACE(antlr)RefAST tmp182_AST_in = _t;
 								match(_t,UTIMES);
 								_t = _t->getFirstChild();
-								ANTLR_USE_NAMESPACE(antlr)RefAST __t301 = _t;
-								ANTLR_USE_NAMESPACE(antlr)RefAST tmp178_AST_in = _t;
+								ANTLR_USE_NAMESPACE(antlr)RefAST __t313 = _t;
+								ANTLR_USE_NAMESPACE(antlr)RefAST tmp183_AST_in = _t;
 								match(_t,INC);
 								_t = _t->getFirstChild();
 								var1=out_asn(_t);
 								_t = _retTree;
-								_t = __t301;
+								_t = __t313;
 								_t = _t->getNextSibling();
-								_t = __t300;
+								_t = __t312;
 								_t = _t->getNextSibling();
 								if ( inputState->guessing==0 ) {
-#line 2016 "ncoGrammer.g"
+#line 2058 "ncoGrammer.g"
 									
 									var=ncap_var_var_inc(var1,NULL_CEWI,INC,true,prs_arg);      
 									
@@ -2036,54 +2036,54 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 								}
 							}
 							else {
-								bool synPredMatched305 = false;
+								bool synPredMatched317 = false;
 								if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 									_t = ASTNULL;
 								if (((_t->getType() == UTIMES))) {
-									ANTLR_USE_NAMESPACE(antlr)RefAST __t305 = _t;
-									synPredMatched305 = true;
+									ANTLR_USE_NAMESPACE(antlr)RefAST __t317 = _t;
+									synPredMatched317 = true;
 									inputState->guessing++;
 									try {
 										{
-										ANTLR_USE_NAMESPACE(antlr)RefAST __t303 = _t;
-										ANTLR_USE_NAMESPACE(antlr)RefAST tmp179_AST_in = _t;
+										ANTLR_USE_NAMESPACE(antlr)RefAST __t315 = _t;
+										ANTLR_USE_NAMESPACE(antlr)RefAST tmp184_AST_in = _t;
 										match(_t,UTIMES);
 										_t = _t->getFirstChild();
-										ANTLR_USE_NAMESPACE(antlr)RefAST __t304 = _t;
-										ANTLR_USE_NAMESPACE(antlr)RefAST tmp180_AST_in = _t;
+										ANTLR_USE_NAMESPACE(antlr)RefAST __t316 = _t;
+										ANTLR_USE_NAMESPACE(antlr)RefAST tmp185_AST_in = _t;
 										match(_t,DEC);
 										_t = _t->getFirstChild();
 										out(_t);
 										_t = _retTree;
-										_t = __t304;
+										_t = __t316;
 										_t = _t->getNextSibling();
-										_t = __t303;
+										_t = __t315;
 										_t = _t->getNextSibling();
 										}
 									}
 									catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-										synPredMatched305 = false;
+										synPredMatched317 = false;
 									}
-									_t = __t305;
+									_t = __t317;
 									inputState->guessing--;
 								}
-								if ( synPredMatched305 ) {
-									ANTLR_USE_NAMESPACE(antlr)RefAST __t306 = _t;
-									ANTLR_USE_NAMESPACE(antlr)RefAST tmp181_AST_in = _t;
+								if ( synPredMatched317 ) {
+									ANTLR_USE_NAMESPACE(antlr)RefAST __t318 = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST tmp186_AST_in = _t;
 									match(_t,UTIMES);
 									_t = _t->getFirstChild();
-									ANTLR_USE_NAMESPACE(antlr)RefAST __t307 = _t;
-									ANTLR_USE_NAMESPACE(antlr)RefAST tmp182_AST_in = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST __t319 = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST tmp187_AST_in = _t;
 									match(_t,DEC);
 									_t = _t->getFirstChild();
 									var1=out_asn(_t);
 									_t = _retTree;
-									_t = __t307;
+									_t = __t319;
 									_t = _t->getNextSibling();
-									_t = __t306;
+									_t = __t318;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2019 "ncoGrammer.g"
+#line 2061 "ncoGrammer.g"
 										
 										var=ncap_var_var_inc(var1,NULL_CEWI,DEC,true,prs_arg);      
 										
@@ -2091,69 +2091,69 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									}
 								}
 								else if ((_t->getType() == MINUS)) {
-									ANTLR_USE_NAMESPACE(antlr)RefAST __t313 = _t;
-									ANTLR_USE_NAMESPACE(antlr)RefAST tmp183_AST_in = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST __t325 = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST tmp188_AST_in = _t;
 									match(_t,MINUS);
 									_t = _t->getFirstChild();
 									var1=out(_t);
 									_t = _retTree;
-									_t = __t313;
+									_t = __t325;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2036 "ncoGrammer.g"
+#line 2078 "ncoGrammer.g"
 										var=ncap_var_var_op(var1,NULL_CEWI, MINUS );
 #line 2106 "ncoTree.cpp"
 									}
 								}
 								else if ((_t->getType() == PLUS)) {
-									ANTLR_USE_NAMESPACE(antlr)RefAST __t314 = _t;
-									ANTLR_USE_NAMESPACE(antlr)RefAST tmp184_AST_in = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST __t326 = _t;
+									ANTLR_USE_NAMESPACE(antlr)RefAST tmp189_AST_in = _t;
 									match(_t,PLUS);
 									_t = _t->getFirstChild();
 									var1=out(_t);
 									_t = _retTree;
-									_t = __t314;
+									_t = __t326;
 									_t = _t->getNextSibling();
 								}
 								else {
-									bool synPredMatched340 = false;
+									bool synPredMatched352 = false;
 									if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 										_t = ASTNULL;
 									if (((_t->getType() == VAR_ID))) {
-										ANTLR_USE_NAMESPACE(antlr)RefAST __t340 = _t;
-										synPredMatched340 = true;
+										ANTLR_USE_NAMESPACE(antlr)RefAST __t352 = _t;
+										synPredMatched352 = true;
 										inputState->guessing++;
 										try {
 											{
-											ANTLR_USE_NAMESPACE(antlr)RefAST __t339 = _t;
-											ANTLR_USE_NAMESPACE(antlr)RefAST tmp185_AST_in = _t;
+											ANTLR_USE_NAMESPACE(antlr)RefAST __t351 = _t;
+											ANTLR_USE_NAMESPACE(antlr)RefAST tmp190_AST_in = _t;
 											match(_t,VAR_ID);
 											_t = _t->getFirstChild();
-											ANTLR_USE_NAMESPACE(antlr)RefAST tmp186_AST_in = _t;
+											ANTLR_USE_NAMESPACE(antlr)RefAST tmp191_AST_in = _t;
 											match(_t,LMT_LIST);
 											_t = _t->getNextSibling();
-											_t = __t339;
+											_t = __t351;
 											_t = _t->getNextSibling();
 											}
 										}
 										catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-											synPredMatched340 = false;
+											synPredMatched352 = false;
 										}
-										_t = __t340;
+										_t = __t352;
 										inputState->guessing--;
 									}
-									if ( synPredMatched340 ) {
-										ANTLR_USE_NAMESPACE(antlr)RefAST __t341 = _t;
+									if ( synPredMatched352 ) {
+										ANTLR_USE_NAMESPACE(antlr)RefAST __t353 = _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 = __t341;
+										_t = __t353;
 										_t = _t->getNextSibling();
 										if ( inputState->guessing==0 ) {
-#line 2211 "ncoGrammer.g"
+#line 2253 "ncoGrammer.g"
 											
 													
 													    // fxm: 4 Oct 2015
@@ -2188,7 +2188,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 										match(_t,VAR_ID);
 										_t = _t->getNextSibling();
 										if ( inputState->guessing==0 ) {
-#line 2240 "ncoGrammer.g"
+#line 2282 "ncoGrammer.g"
 											
 											
 											var=prs_arg->ncap_var_init(v->getText(),true);
@@ -2228,7 +2228,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	bool bram
 ) {
-#line 1457 "ncoGrammer.g"
+#line 1469 "ncoGrammer.g"
 	var_sct *var;
 #line 2234 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST assign_ntl_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -2240,7 +2240,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 1457 "ncoGrammer.g"
+#line 1469 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign_ntl"); 
 	var=NULL_CEWI;
@@ -2248,44 +2248,44 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 #line 2249 "ncoTree.cpp"
 	
 	try {      // for error handling
-		bool synPredMatched244 = false;
+		bool synPredMatched254 = false;
 		if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 			_t = ASTNULL;
 		if (((_t->getType() == VAR_ID))) {
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t244 = _t;
-			synPredMatched244 = true;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t254 = _t;
+			synPredMatched254 = true;
 			inputState->guessing++;
 			try {
 				{
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t243 = _t;
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp187_AST_in = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t253 = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp192_AST_in = _t;
 				match(_t,VAR_ID);
 				_t = _t->getFirstChild();
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp188_AST_in = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp193_AST_in = _t;
 				match(_t,LMT_LIST);
 				_t = _t->getNextSibling();
-				_t = __t243;
+				_t = __t253;
 				_t = _t->getNextSibling();
 				}
 			}
 			catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-				synPredMatched244 = false;
+				synPredMatched254 = false;
 			}
-			_t = __t244;
+			_t = __t254;
 			inputState->guessing--;
 		}
-		if ( synPredMatched244 ) {
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t245 = _t;
+		if ( synPredMatched254 ) {
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t255 = _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 = __t245;
+			_t = __t255;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1462 "ncoGrammer.g"
+#line 1474 "ncoGrammer.g"
 				
 				
 				std::string var_nm; 
@@ -2318,44 +2318,65 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			}
 		}
 		else {
-			bool synPredMatched248 = false;
+			bool synPredMatched259 = false;
 			if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 				_t = ASTNULL;
 			if (((_t->getType() == VAR_ID))) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t248 = _t;
-				synPredMatched248 = true;
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t259 = _t;
+				synPredMatched259 = true;
 				inputState->guessing++;
 				try {
 					{
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t247 = _t;
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp189_AST_in = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t257 = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp194_AST_in = _t;
 					match(_t,VAR_ID);
 					_t = _t->getFirstChild();
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp190_AST_in = _t;
-					match(_t,DMN_LIST);
-					_t = _t->getNextSibling();
-					_t = __t247;
+					{
+					if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
+						_t = ASTNULL;
+					switch ( _t->getType()) {
+					case DMN_LIST:
+					{
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp195_AST_in = _t;
+						match(_t,DMN_LIST);
+						_t = _t->getNextSibling();
+						break;
+					}
+					case DMN_LIST_P:
+					{
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp196_AST_in = _t;
+						match(_t,DMN_LIST_P);
+						_t = _t->getNextSibling();
+						break;
+					}
+					default:
+					{
+						throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
+					}
+					}
+					}
+					_t = __t257;
 					_t = _t->getNextSibling();
 					}
 				}
 				catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-					synPredMatched248 = false;
+					synPredMatched259 = false;
 				}
-				_t = __t248;
+				_t = __t259;
 				inputState->guessing--;
 			}
-			if ( synPredMatched248 ) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t249 = _t;
+			if ( synPredMatched259 ) {
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t260 = _t;
 				vid1 = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 				match(_t,VAR_ID);
 				_t = _t->getFirstChild();
 				dmn = _t;
-				match(_t,DMN_LIST);
+				if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 				_t = _t->getNextSibling();
-				_t = __t249;
+				_t = __t260;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1491 "ncoGrammer.g"
+#line 1503 "ncoGrammer.g"
 					
 					
 					int idx;
@@ -2424,7 +2445,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					
 					bcst=false;   
 					
-#line 2428 "ncoTree.cpp"
+#line 2449 "ncoTree.cpp"
 				}
 			}
 			else if ((_t->getType() == VAR_ID)) {
@@ -2432,126 +2453,141 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				match(_t,VAR_ID);
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1560 "ncoGrammer.g"
+#line 1572 "ncoGrammer.g"
 					
 					
+					var_sct *var_lhs=(var_sct*)NULL;              
+					var_sct *var_rhs=(var_sct*)NULL;              
 					std::string var_nm;
 					
 					var_nm=vid2->getText();
 					
 					if(nco_dbg_lvl_get() >= nco_dbg_var) dbg_prn(fnc_nm,var_nm);
 					
-					var_sct *var1;
-					
 					// Set class wide variables           
 					bcst=false;
 					var_cst=NULL_CEWI; 
 					
 					// get shape from RHS
-					var1=out(vid2->getNextSibling());
-					(void)nco_free(var1->nm);                
-					var1->nm =strdup(var_nm.c_str());
+					var_rhs=out(vid2->getNextSibling());
 					
-					//Copy return variable
-					var=nco_var_dpl(var1);
+					// use init_chk() to avoid warning from ncap_var_init() if var not present  
+					if(prs_arg->ncap_var_init_chk(var_nm)) 
+					var_lhs=prs_arg->ncap_var_init(var_nm,false); 
 					
+					if(var_lhs)
+					{
+					var=nco_var_dpl(var_lhs);
+					(void)prs_arg->ncap_var_write(var_lhs,bram);
+					nco_var_free(var_rhs); 
+					}
+					else if(var_rhs)
+					{
+					//Copy return variable
+					(void)nco_free(var_rhs->nm);                
+					var_rhs->nm =strdup(var_nm.c_str());
+					//Copy return variable
+					var=nco_var_dpl(var_rhs);
 					// Write var to int_vtr
 					// if var already in int_vtr or var_vtr then write call does nothing
-					(void)prs_arg->ncap_var_write(var1,bram);
-					//(void)ncap_var_write_omp(var1,bram,prs_arg);
-					
+					(void)prs_arg->ncap_var_write(var_rhs,bram);
+					}   
+					else 
+					{               
+					var=ncap_var_udf(var_nm.c_str());   
+					}  
 					
-#line 2465 "ncoTree.cpp"
+#line 2501 "ncoTree.cpp"
 				}
 			}
 			else {
-				bool synPredMatched252 = false;
+				bool synPredMatched263 = false;
 				if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 					_t = ASTNULL;
 				if (((_t->getType() == ATT_ID))) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t252 = _t;
-					synPredMatched252 = true;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t263 = _t;
+					synPredMatched263 = true;
 					inputState->guessing++;
 					try {
 						{
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t251 = _t;
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp191_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t262 = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp197_AST_in = _t;
 						match(_t,ATT_ID);
 						_t = _t->getFirstChild();
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp192_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp198_AST_in = _t;
 						match(_t,LMT_LIST);
 						_t = _t->getNextSibling();
-						_t = __t251;
+						_t = __t262;
 						_t = _t->getNextSibling();
 						}
 					}
 					catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-						synPredMatched252 = false;
+						synPredMatched263 = false;
 					}
-					_t = __t252;
+					_t = __t263;
 					inputState->guessing--;
 				}
-				if ( synPredMatched252 ) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t253 = _t;
+				if ( synPredMatched263 ) {
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t264 = _t;
 					att = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 					match(_t,ATT_ID);
 					_t = _t->getFirstChild();
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp193_AST_in = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp199_AST_in = _t;
 					match(_t,LMT_LIST);
 					_t = _t->getNextSibling();
-					_t = __t253;
+					_t = __t264;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 1589 "ncoGrammer.g"
+#line 1616 "ncoGrammer.g"
 						
 						;
 						
-#line 2510 "ncoTree.cpp"
+#line 2546 "ncoTree.cpp"
 					}
 				}
 				else {
-					bool synPredMatched256 = false;
+					bool synPredMatched267 = false;
 					if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 						_t = ASTNULL;
 					if (((_t->getType() == ATT_ID))) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t256 = _t;
-						synPredMatched256 = true;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t267 = _t;
+						synPredMatched267 = true;
 						inputState->guessing++;
 						try {
 							{
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t255 = _t;
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp194_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t266 = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp200_AST_in = _t;
 							match(_t,ATT_ID);
 							_t = _t->getFirstChild();
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp195_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp201_AST_in = _t;
 							match(_t,LMT_DMN);
 							_t = _t->getNextSibling();
-							_t = __t255;
+							_t = __t266;
 							_t = _t->getNextSibling();
 							}
 						}
 						catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-							synPredMatched256 = false;
+							synPredMatched267 = false;
 						}
-						_t = __t256;
+						_t = __t267;
 						inputState->guessing--;
 					}
-					if ( synPredMatched256 ) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t257 = _t;
+					if ( synPredMatched267 ) {
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t268 = _t;
 						att1 = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 						match(_t,ATT_ID);
 						_t = _t->getFirstChild();
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp196_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp202_AST_in = _t;
 						match(_t,DMN_LIST);
 						_t = _t->getNextSibling();
-						_t = __t257;
+						_t = __t268;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1592 "ncoGrammer.g"
+#line 1619 "ncoGrammer.g"
 							
 							;
 							
-#line 2555 "ncoTree.cpp"
+#line 2591 "ncoTree.cpp"
 						}
 					}
 					else if ((_t->getType() == ATT_ID)) {
@@ -2559,7 +2595,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						match(_t,ATT_ID);
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1595 "ncoGrammer.g"
+#line 1622 "ncoGrammer.g"
 							
 							
 							//In Initial scan all newly defined atts are flagged as Undefined
@@ -2577,7 +2613,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 							var=nco_var_dpl(var1);    
 							
 							
-#line 2581 "ncoTree.cpp"
+#line 2617 "ncoTree.cpp"
 						}
 					}
 		else {
@@ -2601,9 +2637,9 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	bool bram
 ) {
-#line 1615 "ncoGrammer.g"
+#line 1642 "ncoGrammer.g"
 	var_sct *var;
-#line 2607 "ncoTree.cpp"
+#line 2643 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST 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;
 	ANTLR_USE_NAMESPACE(antlr)RefAST lmt = ANTLR_USE_NAMESPACE(antlr)nullAST;
@@ -2613,52 +2649,52 @@ var_sct * ncoTree::assign(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 1615 "ncoGrammer.g"
+#line 1642 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign"); 
 	var=NULL_CEWI;
 	
-#line 2622 "ncoTree.cpp"
+#line 2658 "ncoTree.cpp"
 	
 	try {      // for error handling
-		bool synPredMatched261 = false;
+		bool synPredMatched272 = false;
 		if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 			_t = ASTNULL;
 		if (((_t->getType() == VAR_ID))) {
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t261 = _t;
-			synPredMatched261 = true;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t272 = _t;
+			synPredMatched272 = true;
 			inputState->guessing++;
 			try {
 				{
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t260 = _t;
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp197_AST_in = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t271 = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp203_AST_in = _t;
 				match(_t,VAR_ID);
 				_t = _t->getFirstChild();
-				ANTLR_USE_NAMESPACE(antlr)RefAST tmp198_AST_in = _t;
+				ANTLR_USE_NAMESPACE(antlr)RefAST tmp204_AST_in = _t;
 				match(_t,LMT_LIST);
 				_t = _t->getNextSibling();
-				_t = __t260;
+				_t = __t271;
 				_t = _t->getNextSibling();
 				}
 			}
 			catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-				synPredMatched261 = false;
+				synPredMatched272 = false;
 			}
-			_t = __t261;
+			_t = __t272;
 			inputState->guessing--;
 		}
-		if ( synPredMatched261 ) {
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t262 = _t;
+		if ( synPredMatched272 ) {
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t273 = _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 = __t262;
+			_t = __t273;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1621 "ncoGrammer.g"
+#line 1648 "ncoGrammer.g"
 				
 				
 				int idx;
@@ -2854,48 +2890,69 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				var=prs_arg->ncap_var_init(var_nm,true);
 				
 				
-#line 2858 "ncoTree.cpp"
+#line 2894 "ncoTree.cpp"
 			}
 		}
 		else {
-			bool synPredMatched265 = false;
+			bool synPredMatched277 = false;
 			if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 				_t = ASTNULL;
 			if (((_t->getType() == VAR_ID))) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t265 = _t;
-				synPredMatched265 = true;
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t277 = _t;
+				synPredMatched277 = true;
 				inputState->guessing++;
 				try {
 					{
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t264 = _t;
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp199_AST_in = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t275 = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp205_AST_in = _t;
 					match(_t,VAR_ID);
 					_t = _t->getFirstChild();
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp200_AST_in = _t;
-					match(_t,DMN_LIST);
-					_t = _t->getNextSibling();
-					_t = __t264;
+					{
+					if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
+						_t = ASTNULL;
+					switch ( _t->getType()) {
+					case DMN_LIST:
+					{
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp206_AST_in = _t;
+						match(_t,DMN_LIST);
+						_t = _t->getNextSibling();
+						break;
+					}
+					case DMN_LIST_P:
+					{
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp207_AST_in = _t;
+						match(_t,DMN_LIST_P);
+						_t = _t->getNextSibling();
+						break;
+					}
+					default:
+					{
+						throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
+					}
+					}
+					}
+					_t = __t275;
 					_t = _t->getNextSibling();
 					}
 				}
 				catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-					synPredMatched265 = false;
+					synPredMatched277 = false;
 				}
-				_t = __t265;
+				_t = __t277;
 				inputState->guessing--;
 			}
-			if ( synPredMatched265 ) {
-				ANTLR_USE_NAMESPACE(antlr)RefAST __t266 = _t;
+			if ( synPredMatched277 ) {
+				ANTLR_USE_NAMESPACE(antlr)RefAST __t278 = _t;
 				vid1 = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 				match(_t,VAR_ID);
 				_t = _t->getFirstChild();
 				dmn = _t;
-				match(_t,DMN_LIST);
+				if ( _t == ANTLR_USE_NAMESPACE(antlr)nullAST ) throw ANTLR_USE_NAMESPACE(antlr)MismatchedTokenException();
 				_t = _t->getNextSibling();
-				_t = __t266;
+				_t = __t278;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1818 "ncoGrammer.g"
+#line 1845 "ncoGrammer.g"
 					
 					
 					var_sct *var1;
@@ -2974,7 +3031,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					var_cst=nco_var_free(var_cst); 
 					
 					
-#line 2978 "ncoTree.cpp"
+#line 3035 "ncoTree.cpp"
 				}
 			}
 			else if ((_t->getType() == VAR_ID)) {
@@ -2982,10 +3039,11 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				match(_t,VAR_ID);
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1897 "ncoGrammer.g"
+#line 1924 "ncoGrammer.g"
 					
 					// Set class wide variables
-					var_sct *var1;
+					var_sct *var_lhs=(var_sct*)NULL;
+					var_sct *var_rhs=(var_sct*)NULL;
 					NcapVar *Nvar;
 					std::string var_nm;
 					
@@ -2996,38 +3054,52 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					bcst=false;
 					var_cst=NULL_CEWI; 
 					
-					var1=out(vid2->getNextSibling());
+					var_rhs=out(vid2->getNextSibling());
 					
 					// Save name 
-					std::string s_var_rhs(var1->nm);
-					(void)nco_free(var1->nm);                
-					var1->nm =strdup(var_nm.c_str());
+					std::string s_var_rhs(var_rhs->nm);
 					
-					// Do attribute propagation only if
-					// var doesn't already exist or is defined but NOT
-					// populated
-					Nvar=prs_arg->var_vtr.find(vid2->getText());
-					//rcd=nco_inq_varid_flg(prs_arg->out_id,var1->nm ,&var_id);
+					Nvar=prs_arg->var_vtr.find(var_nm);
 					
 					if(!Nvar || (Nvar && Nvar->flg_stt==1))
 					(void)ncap_att_cpy(var_nm,s_var_rhs,prs_arg);
 					
-					// var is defined and populated &  RHS is scalar -then stretch var to match
-					if(Nvar && Nvar->flg_stt==2) 
-					if(var1->sz ==1 && Nvar->var->sz >1){
-					var1=nco_var_cnf_typ(Nvar->var->type,var1);  
-					(void)ncap_att_stretch(var1,Nvar->var->sz);
+					if(Nvar)
+					var_lhs=nco_var_dpl(Nvar->var);
+					// use init_chk() to avoid warning from ncap_var_init() if var not present  
+					else if(prs_arg->ncap_var_init_chk(var_nm))
+					var_lhs=prs_arg->ncap_var_init(var_nm,false); 
 					
+					if(var_lhs)
+					{
+					// var is defined and populated &  RHS is scalar -then stretch var to match
+					var_rhs=nco_var_cnf_typ(var_lhs->type,var_rhs);   
+					if(var_rhs->sz ==1 && var_lhs->sz >1)
+					{
+					(void)ncap_att_stretch(var_rhs,var_lhs->sz);
 					// this is a special case -- if the RHS scalar has
 					// no missing value then retain LHS missing value
 					// else LHS missing value gets over written by RHS
-					if(!var1->has_mss_val)
-					(void)nco_mss_val_cp(Nvar->var,var1);   
-					}
+					if(!var_rhs->has_mss_val)
+					(void)nco_mss_val_cp(var_lhs,var_rhs);   
+					}   
+					
+					if( var_rhs->sz != var_lhs->sz) 
+					err_prn(fnc_nm,"regular assign - var size missmatch between \""+var_nm+"\" and RHS of expression");                        
 					
+					var_lhs->val.vp=var_rhs->val.vp;
+					
+					var_rhs->val.vp=(void*)NULL;                
+					nco_var_free(var_rhs);  
 					// Write var to disk
-					(void)prs_arg->ncap_var_write(var1,bram);
-					//(void)ncap_var_write_omp(var1,bram,prs_arg);
+					(void)prs_arg->ncap_var_write(var_lhs,bram);
+					}
+					else
+					{
+					nco_free(var_rhs->nm);
+					var_rhs->nm=strdup(var_nm.c_str());  
+					(void)prs_arg->ncap_var_write(var_rhs,bram);  
+					}  
 					
 					// See If we have to return something
 					if(vid2->getFirstChild() && vid2->getFirstChild()->getType()==NORET)
@@ -3036,97 +3108,97 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					var=prs_arg->ncap_var_init(var_nm,true);               ;
 					
 					
-#line 3040 "ncoTree.cpp"
+#line 3112 "ncoTree.cpp"
 				}
 			}
 			else {
-				bool synPredMatched269 = false;
+				bool synPredMatched281 = false;
 				if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 					_t = ASTNULL;
 				if (((_t->getType() == ATT_ID))) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t269 = _t;
-					synPredMatched269 = true;
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t281 = _t;
+					synPredMatched281 = true;
 					inputState->guessing++;
 					try {
 						{
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t268 = _t;
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp201_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t280 = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp208_AST_in = _t;
 						match(_t,ATT_ID);
 						_t = _t->getFirstChild();
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp202_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp209_AST_in = _t;
 						match(_t,LMT_LIST);
 						_t = _t->getNextSibling();
-						_t = __t268;
+						_t = __t280;
 						_t = _t->getNextSibling();
 						}
 					}
 					catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-						synPredMatched269 = false;
+						synPredMatched281 = false;
 					}
-					_t = __t269;
+					_t = __t281;
 					inputState->guessing--;
 				}
-				if ( synPredMatched269 ) {
-					ANTLR_USE_NAMESPACE(antlr)RefAST __t270 = _t;
+				if ( synPredMatched281 ) {
+					ANTLR_USE_NAMESPACE(antlr)RefAST __t282 = _t;
 					att = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 					match(_t,ATT_ID);
 					_t = _t->getFirstChild();
-					ANTLR_USE_NAMESPACE(antlr)RefAST tmp203_AST_in = _t;
+					ANTLR_USE_NAMESPACE(antlr)RefAST tmp210_AST_in = _t;
 					match(_t,LMT_LIST);
 					_t = _t->getNextSibling();
-					_t = __t270;
+					_t = __t282;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 1951 "ncoGrammer.g"
+#line 1993 "ncoGrammer.g"
 						
 						;
 						
-#line 3085 "ncoTree.cpp"
+#line 3157 "ncoTree.cpp"
 					}
 				}
 				else {
-					bool synPredMatched273 = false;
+					bool synPredMatched285 = false;
 					if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
 						_t = ASTNULL;
 					if (((_t->getType() == ATT_ID))) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t273 = _t;
-						synPredMatched273 = true;
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t285 = _t;
+						synPredMatched285 = true;
 						inputState->guessing++;
 						try {
 							{
-							ANTLR_USE_NAMESPACE(antlr)RefAST __t272 = _t;
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp204_AST_in = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST __t284 = _t;
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp211_AST_in = _t;
 							match(_t,ATT_ID);
 							_t = _t->getFirstChild();
-							ANTLR_USE_NAMESPACE(antlr)RefAST tmp205_AST_in = _t;
-							match(_t,LMT_DMN);
+							ANTLR_USE_NAMESPACE(antlr)RefAST tmp212_AST_in = _t;
+							match(_t,DMN_LIST);
 							_t = _t->getNextSibling();
-							_t = __t272;
+							_t = __t284;
 							_t = _t->getNextSibling();
 							}
 						}
 						catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
-							synPredMatched273 = false;
+							synPredMatched285 = false;
 						}
-						_t = __t273;
+						_t = __t285;
 						inputState->guessing--;
 					}
-					if ( synPredMatched273 ) {
-						ANTLR_USE_NAMESPACE(antlr)RefAST __t274 = _t;
+					if ( synPredMatched285 ) {
+						ANTLR_USE_NAMESPACE(antlr)RefAST __t286 = _t;
 						att1 = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 						match(_t,ATT_ID);
 						_t = _t->getFirstChild();
-						ANTLR_USE_NAMESPACE(antlr)RefAST tmp206_AST_in = _t;
+						ANTLR_USE_NAMESPACE(antlr)RefAST tmp213_AST_in = _t;
 						match(_t,DMN_LIST);
 						_t = _t->getNextSibling();
-						_t = __t274;
+						_t = __t286;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1954 "ncoGrammer.g"
+#line 1996 "ncoGrammer.g"
 							
 							;
 							
-#line 3130 "ncoTree.cpp"
+#line 3202 "ncoTree.cpp"
 						}
 					}
 					else if ((_t->getType() == ATT_ID)) {
@@ -3134,7 +3206,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						match(_t,ATT_ID);
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1957 "ncoGrammer.g"
+#line 1999 "ncoGrammer.g"
 							
 							
 							var_sct *var1;
@@ -3173,7 +3245,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 							var=nco_var_dpl(var1);               ;
 							
 							
-#line 3177 "ncoTree.cpp"
+#line 3249 "ncoTree.cpp"
 						}
 					}
 		else {
@@ -3195,14 +3267,14 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 }
 
 var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2381 "ncoGrammer.g"
+#line 2423 "ncoGrammer.g"
 	var_sct *var;
-#line 3201 "ncoTree.cpp"
+#line 3273 "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 2381 "ncoGrammer.g"
+#line 2423 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign_asn");
 	var=NULL_CEWI; 
@@ -3210,7 +3282,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	NcapVar *Nvar;
 	
 	
-#line 3214 "ncoTree.cpp"
+#line 3286 "ncoTree.cpp"
 	
 	try {      // for error handling
 		if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
@@ -3218,17 +3290,17 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		switch ( _t->getType()) {
 		case UTIMES:
 		{
-			ANTLR_USE_NAMESPACE(antlr)RefAST __t343 = _t;
-			ANTLR_USE_NAMESPACE(antlr)RefAST tmp207_AST_in = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST __t355 = _t;
+			ANTLR_USE_NAMESPACE(antlr)RefAST tmp214_AST_in = _t;
 			match(_t,UTIMES);
 			_t = _t->getFirstChild();
 			vid1 = _t;
 			match(_t,VAR_ID);
 			_t = _t->getNextSibling();
-			_t = __t343;
+			_t = __t355;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2391 "ncoGrammer.g"
+#line 2433 "ncoGrammer.g"
 				
 				if(vid1->getFirstChild())
 				err_prn(fnc_nm,"Invalid Lvalue " +vid1->getText() );
@@ -3246,7 +3318,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				}
 				
 				
-#line 3250 "ncoTree.cpp"
+#line 3322 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -3256,7 +3328,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,VAR_ID);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2409 "ncoGrammer.g"
+#line 2451 "ncoGrammer.g"
 				
 				var_nm_s=vid->getText();  
 				if(vid->getFirstChild())
@@ -3277,7 +3349,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				}
 				
 				
-#line 3281 "ncoTree.cpp"
+#line 3353 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -3287,7 +3359,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,ATT_ID);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2430 "ncoGrammer.g"
+#line 2472 "ncoGrammer.g"
 				
 				// check "output"
 				NcapVar *Nvar=NULL;
@@ -3320,7 +3392,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				var->val.vp=(void*)nco_free(var->val.vp);
 				
 				
-#line 3324 "ncoTree.cpp"
+#line 3396 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -3344,17 +3416,17 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2464 "ncoGrammer.g"
+#line 2506 "ncoGrammer.g"
 	var_sct *var;
-#line 3350 "ncoTree.cpp"
+#line 3422 "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 2464 "ncoGrammer.g"
+#line 2506 "ncoGrammer.g"
 	
 	const std::string fnc_nm("value_list");
 	var=NULL_CEWI; 
 	
-#line 3358 "ncoTree.cpp"
+#line 3430 "ncoTree.cpp"
 	
 	try {      // for error handling
 		{
@@ -3363,7 +3435,7 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		_t = _t->getNextSibling();
 		}
 		if ( inputState->guessing==0 ) {
-#line 2469 "ncoGrammer.g"
+#line 2511 "ncoGrammer.g"
 			
 			
 			char *cp;
@@ -3451,7 +3523,7 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			var=var_ret;
 			
 			
-#line 3455 "ncoTree.cpp"
+#line 3527 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -3470,20 +3542,20 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 var_sct * ncoTree::value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	 std::vector<var_sct*> &exp_vtr
 ) {
-#line 2560 "ncoGrammer.g"
+#line 2602 "ncoGrammer.g"
 	var_sct *var;
-#line 3476 "ncoTree.cpp"
+#line 3548 "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 2560 "ncoGrammer.g"
+#line 2602 "ncoGrammer.g"
 	
 	const std::string fnc_nm("value_list_string");
 	var=NULL_CEWI; 
 	
-#line 3483 "ncoTree.cpp"
+#line 3555 "ncoTree.cpp"
 	
 	try {      // for error handling
 		if ( inputState->guessing==0 ) {
-#line 2566 "ncoGrammer.g"
+#line 2608 "ncoGrammer.g"
 			
 			int idx;
 			int nbr_lst;
@@ -3532,7 +3604,7 @@ var_sct * ncoTree::value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			end_val: var=var_ret;
 			
 			
-#line 3536 "ncoTree.cpp"
+#line 3608 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -3551,26 +3623,26 @@ 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 2617 "ncoGrammer.g"
+#line 2659 "ncoGrammer.g"
 	bool bret=false;
-#line 3557 "ncoTree.cpp"
+#line 3629 "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 2617 "ncoGrammer.g"
+#line 2659 "ncoGrammer.g"
 	
 	const std::string fnc_nm("where_assign");
 	var_sct *var_rhs;
 	
 	
-#line 3566 "ncoTree.cpp"
+#line 3638 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t348 = _t;
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp208_AST_in = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t360 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp215_AST_in = _t;
 		match(_t,EXPR);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t349 = _t;
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp209_AST_in = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t361 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp216_AST_in = _t;
 		match(_t,ASSIGN);
 		_t = _t->getFirstChild();
 		vid = _t;
@@ -3578,12 +3650,12 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 		_t = _t->getNextSibling();
 		var_rhs=out(_t);
 		_t = _retTree;
-		_t = __t349;
+		_t = __t361;
 		_t = _t->getNextSibling();
-		_t = __t348;
+		_t = __t360;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 2623 "ncoGrammer.g"
+#line 2665 "ncoGrammer.g"
 			
 			
 			bool bfr=false;
@@ -3641,8 +3713,6 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			long jdx;
 			long sz;
 			size_t slb_sz;
-			bool b_vp=false;
-			char *mss_cp;
 			
 			sz=var_lhs->sz;
 			slb_sz=nco_typ_lng(var_lhs->type);
@@ -3654,42 +3724,14 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			cp_out=( char*)(var_lhs->val.vp);
 			cp_in=( char*)(var_rhs->val.vp);
 			
-			if(var_lhs->has_mss_val) {
-			mss_cp=( char*)var_lhs->mss_val.vp;
-			b_vp=true;
-			} else if(var_rhs->has_mss_val){
-			mss_cp=( char*)var_rhs->mss_val.vp;
-			b_vp=true;                 
-			}        
-			// missing values    
-			if(b_vp) {
-			if(var_rhs->sz==1L){ 
-			
-			for(idx=0; idx<sz; idx++) {
-			if(sp[idx] && memcmp(cp_out,mss_cp,slb_sz))
-			(void)memcpy(cp_out,cp_in,slb_sz);       
-			cp_out+=slb_sz;
-			} 
-			} else {  
-			for(idx=0; idx<sz; idx++) {
-			if(sp[idx]&& memcmp(cp_out,mss_cp,slb_sz) 
-			&& memcmp(cp_in,mss_cp,slb_sz))
-			(void)memcpy(cp_out,cp_in,slb_sz);      
-			cp_out+=slb_sz;
-			cp_in+=slb_sz;
-			}
-			} 
-			// no missing values                
-			} else { 
 			
 			if(var_rhs->sz==1L){ 
-			
 			for(idx=0; idx<sz; idx++) {
 			if(sp[ idx])
 			(void)memcpy(cp_out,cp_in,slb_sz);       
 			cp_out+=slb_sz;
 			} 
-			} else {  
+			}else{  
 			for(idx=0; idx<sz; idx++) {
 			if(sp[idx])
 			(void)memcpy(cp_out,cp_in,slb_sz);      
@@ -3697,7 +3739,7 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			cp_in+=slb_sz;
 			}
 			} 
-			}             
+			
 			
 			(void)cast_nctype_void(NC_SHORT,&var_msk->val); 
 			
@@ -3715,7 +3757,7 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			prs_arg->ncap_var_write(var_lhs,false);
 			bret=true;
 			
-#line 3719 "ncoTree.cpp"
+#line 3761 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -3732,42 +3774,42 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 }
 
 var_sct * ncoTree::var_lmt_one(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2758 "ncoGrammer.g"
+#line 2770 "ncoGrammer.g"
 	var_sct *var;
-#line 3738 "ncoTree.cpp"
+#line 3780 "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 2758 "ncoGrammer.g"
+#line 2770 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt_one");
 	var=NULL_CEWI; 
 	var_sct *var_nbr;
 	
-#line 3747 "ncoTree.cpp"
+#line 3789 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t351 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t363 = _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 __t352 = _t;
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp210_AST_in = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t364 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp217_AST_in = _t;
 		match(_t,LMT_LIST);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t353 = _t;
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp211_AST_in = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t365 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp218_AST_in = _t;
 		match(_t,LMT);
 		_t = _t->getFirstChild();
 		var_nbr=out(_t);
 		_t = _retTree;
-		_t = __t353;
+		_t = __t365;
 		_t = _t->getNextSibling();
-		_t = __t352;
+		_t = __t364;
 		_t = _t->getNextSibling();
-		_t = __t351;
+		_t = __t363;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 2764 "ncoGrammer.g"
+#line 2776 "ncoGrammer.g"
 			
 			
 			int idx;
@@ -3868,7 +3910,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 3872 "ncoTree.cpp"
+#line 3914 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -3887,42 +3929,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 2869 "ncoGrammer.g"
+#line 2881 "ncoGrammer.g"
 	var_sct *var;
-#line 3893 "ncoTree.cpp"
+#line 3935 "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 2869 "ncoGrammer.g"
+#line 2881 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt_one_lhs");
 	var=NULL_CEWI; 
 	var_sct *var_nbr;
 	
-#line 3902 "ncoTree.cpp"
+#line 3944 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t355 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t367 = _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 __t356 = _t;
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp212_AST_in = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t368 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp219_AST_in = _t;
 		match(_t,LMT_LIST);
 		_t = _t->getFirstChild();
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t357 = _t;
-		ANTLR_USE_NAMESPACE(antlr)RefAST tmp213_AST_in = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t369 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST tmp220_AST_in = _t;
 		match(_t,LMT);
 		_t = _t->getFirstChild();
 		var_nbr=out(_t);
 		_t = _retTree;
-		_t = __t357;
+		_t = __t369;
 		_t = _t->getNextSibling();
-		_t = __t356;
+		_t = __t368;
 		_t = _t->getNextSibling();
-		_t = __t355;
+		_t = __t367;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 2875 "ncoGrammer.g"
+#line 2887 "ncoGrammer.g"
 			
 			int idx; 
 			int var_id; 
@@ -4067,7 +4109,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 4071 "ncoTree.cpp"
+#line 4113 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4084,31 +4126,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 3023 "ncoGrammer.g"
+#line 3035 "ncoGrammer.g"
 	var_sct *var;
-#line 4090 "ncoTree.cpp"
+#line 4132 "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 3023 "ncoGrammer.g"
+#line 3035 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt");
 	var=NULL_CEWI; 
 	
-#line 4099 "ncoTree.cpp"
+#line 4141 "ncoTree.cpp"
 	
 	try {      // for error handling
-		ANTLR_USE_NAMESPACE(antlr)RefAST __t359 = _t;
+		ANTLR_USE_NAMESPACE(antlr)RefAST __t371 = _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 = __t359;
+		_t = __t371;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3028 "ncoGrammer.g"
+#line 3040 "ncoGrammer.g"
 			
 			bool bram;   // Check for a RAM variable
 			bool bnrm;
@@ -4309,8 +4351,10 @@ var_sct * ncoTree::var_lmt(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			// free var  
 			(void)nco_var_free(var);    
 			
-			/* Casting a hyperslab --this makes my brain  hurt!!! */
-			if(bcst)
+			/* Casting a hyperslab --this makes my brain  hurt!!! 
+			if the var is already the correct size then do nothing 
+			what not even dimension reordering ?  */  
+			if(bcst && var1->sz != var_cst->sz)
 			var1=ncap_cst_do(var1,var_cst,prs_arg->ntl_scn);
 			
 			var=var1;
@@ -4347,7 +4391,7 @@ var_sct * ncoTree::var_lmt(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			
 			end2: var_rhs=nco_var_free(var_rhs); 
 			
-#line 4351 "ncoTree.cpp"
+#line 4395 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4375,6 +4419,7 @@ const char* ncoTree::tokenNames[] = {
 	"BLOCK",
 	"ARG_LIST",
 	"DMN_LIST",
+	"DMN_LIST_P",
 	"DMN_ARG_LIST",
 	"LMT_LIST",
 	"VALUE_LIST",
@@ -4449,16 +4494,16 @@ const char* ncoTree::tokenNames[] = {
 	"-=",
 	"*=",
 	"/=",
-	"FLOAT",
-	"DOUBLE",
-	"INT",
-	"BYTE",
-	"UBYTE",
-	"SHORT",
-	"USHORT",
-	"UINT",
-	"INT64",
-	"UINT64",
+	"NCAP_FLOAT",
+	"NCAP_DOUBLE",
+	"NCAP_INT",
+	"NCAP_BYTE",
+	"NCAP_UBYTE",
+	"NCAP_SHORT",
+	"NCAP_USHORT",
+	"NCAP_UINT",
+	"NCAP_INT64",
+	"NCAP_UINT64",
 	"N4STRING",
 	"DIM_ID_SIZE",
 	"NRootAST",
@@ -4479,6 +4524,8 @@ const char* ncoTree::tokenNames[] = {
 	"NUMBER",
 	"variable or function or attribute identifier",
 	"VAR_ATT_QT",
+	"STR_ATT_ID",
+	"STR_ATT_QT",
 	"DIM_QT",
 	"dimension identifier",
 	"INCLUDE",
diff --git a/src/nco++/ncoTree.hpp b/src/nco++/ncoTree.hpp
index bf4194b..be2123e 100644
--- a/src/nco++/ncoTree.hpp
+++ b/src/nco++/ncoTree.hpp
@@ -51,7 +51,7 @@
 #line 52 "ncoTree.hpp"
 class CUSTOM_API ncoTree : public ANTLR_USE_NAMESPACE(antlr)TreeParser, public ncoParserTokenTypes
 {
-#line 636 "ncoGrammer.g"
+#line 657 "ncoGrammer.g"
 
 
 private:
@@ -174,7 +174,6 @@ NcapVector<lmt_sct*> &lmt_vtr )
 	var_sct *var;
 	std::string fnc_nm="lmt_var_mk"; 
 	
-	dbg_prn(fnc_nm,"start\n"); 
 	
 	// calculate variables
 	var=out(lmt->getFirstChild()->getFirstChild());
@@ -183,8 +182,7 @@ NcapVector<lmt_sct*> &lmt_vtr )
 	(void)cast_void_nctype((nc_type)NC_UINT64,&var->val);
 	sz=var->sz;
 	dmn_sz=var->sz / nbr_dmn;
-	
-    dbg_prn(fnc_nm,"step 1\n");   
+    
 
     // shape of var must be (nbr_dmn) or (nbr_dmn,2) or (nbr_dmn,3) 
     if( dmn_sz * nbr_dmn != sz )
@@ -193,7 +191,7 @@ NcapVector<lmt_sct*> &lmt_vtr )
       return false;  
     }
 
-    dbg_prn(fnc_nm,"step 2\n");   
+    
 	
     for(idx=0; idx<sz;idx+=dmn_sz)
 	 {
@@ -212,11 +210,9 @@ NcapVector<lmt_sct*> &lmt_vtr )
 		/* rec_skp_ntl_spf is used for record dimension in multi-file operators */
 		lmt_ptr->rec_skp_ntl_spf=0L; /* Number of records skipped in initial superfluous files */
 
-       dbg_prn(fnc_nm,"step loop idx="+ nbr2sng(idx)+"\n");   
 	   
        for(jdx=0;jdx<dmn_sz;jdx++)
 		{     
-		  dbg_prn(fnc_nm,"step loop jdx="+ nbr2sng(jdx)+"\n");   	
 		  
          nco_uint64 uival= var->val.ui64p[idx+jdx];
          switch(jdx){
@@ -247,7 +243,6 @@ NcapVector<lmt_sct*> &lmt_vtr )
 	 
 	cast_nctype_void((nc_type)NC_UINT64,&var->val);
 	var=nco_var_free(var);  
-	dbg_prn(fnc_nm,"end\n"); 
 	
    return true;
 
@@ -344,17 +339,7 @@ if( nbr_dmn!=lmt_init(lmt,ast_lmt_vtr) )
    return true;;
 } /* end lmt_mk */
 
-/* Legacy run -- will remove soon
-public:
-    void run(RefAST tr){
-        while(tr) {
-          (void)statements(tr);   
-          tr=tr->getNextSibling();   
-        }
-    }
-*/
 
-public:
     void run_dbl(RefAST tr,int icnt){
      int idx=0;
      RefAST ntr=tr;
@@ -369,8 +354,17 @@ public:
         err_prn("run_dbl"," REPORTS given a null AST Refrence\n");
             
      //small list dont bother with double parsing     
-     if(icnt <4) goto small;
-
+     // just do a final parse
+     if(icnt <4){
+       //Final scan
+       prs_arg->ntl_scn=False;
+       while(idx++ < icnt){
+          (void)statements(ntr);   
+          ntr=ntr->getNextSibling();   
+       }
+       return; 
+     }
+     
      //Initial scan
      prs_arg->ntl_scn=True;
      while(idx++ < icnt){
@@ -386,42 +380,40 @@ public:
     // see if below does anything ? 
     (void)nco_sync(prs_arg->out_id); 
 
-
+    //Final scan
+    if(!prs_arg->NCAP_MPI_SORT)
+    { 
+      idx=0;
+      ntr=tr;
+      prs_arg->ntl_scn=False;
+      while(idx++ < icnt){
+        (void)statements(ntr);   
+        ntr=ntr->getNextSibling();   
+      }
+    }
+    else
+    {  
     // Sort expressions - MPI preparation
-    if(prs_arg->NCAP_MPI_SORT){  
        prs_arg->ntl_scn=False;
       // nb A vector of vectors
       std::vector< std::vector<RefAST> > all_ast_vtr;
       ncoTree **wlk_vtr=(ncoTree**)NULL; 
 
       // Populate and sort  vector 
-      (void)ncap_mpi_srt(tr,icnt,all_ast_vtr,prs_arg);
-       
+      (void)ncap_mpi_srt(tr,icnt,all_ast_vtr,prs_arg);   
       // Evaluate expressions (execute)
       (void)ncap_omp_exe(all_ast_vtr,wlk_vtr,0);  
-      
+
       /*  
       for(unsigned vtr_idx=0 ; vtr_idx<all_ast_vtr.size(); vtr_idx++)
         for(unsigned jdx=0 ; jdx<all_ast_vtr[vtr_idx].size(); jdx++)
 	     (void)statements(all_ast_vtr[vtr_idx][jdx]);
       */
-      
-    goto end;
-    } //end if
-
-small: 
-     idx=0;
-     ntr=tr;
-     //Final scan
-     prs_arg->ntl_scn=False;
-     while(idx++ < icnt){
-       (void)statements(ntr);   
-       ntr=ntr->getNextSibling();   
-     }
-end: ;
-   }
+    }
+    return; 
 
-public:
+    }
+ 
     int run_exe(RefAST tr, int nbr_dpt){
     // number of statements in block
     int nbr_stmt=0;
@@ -480,7 +472,6 @@ exit: return iret;
 
     } // end run_exe
 
-public:
 RefAST nco_dupList(RefAST tr){
       RefAST otr;  
       // nb astFactory is protected- must call from within class
@@ -543,10 +534,10 @@ protected:
 private:
 	static const char* tokenNames[];
 #ifndef NO_STATIC_CONSTS
-	static const int NUM_TOKENS = 116;
+	static const int NUM_TOKENS = 119;
 #else
 	enum {
-		NUM_TOKENS = 116
+		NUM_TOKENS = 119
 	};
 #endif
 	
diff --git a/src/nco++/nco_gsl.c b/src/nco++/nco_gsl.c
index 330bd8e..c98b6a9 100644
--- a/src/nco++/nco_gsl.c
+++ b/src/nco++/nco_gsl.c
@@ -9,7 +9,7 @@
    GSL and NCO are both distributed under the GPL3 license.
    The GSL code is copyright by its respective authors.
    The NCO modifications that provide missing value support are, in addition, 
-   Copyright (C) 2013--2015 Charlie Zender
+   Copyright (C) 2013--2016 Charlie Zender
    License: GNU General Public License (GPL) Version 3
    See http://www.gnu.org/copyleft/gpl.html for full license text
 
diff --git a/src/nco++/nco_gsl.h b/src/nco++/nco_gsl.h
index 7e6c799..a869a10 100644
--- a/src/nco++/nco_gsl.h
+++ b/src/nco++/nco_gsl.h
@@ -9,7 +9,7 @@
    GSL and NCO are both distributed under the GPL3 license.
    The GSL code is copyright by its respective authors.
    The NCO modifications that provide missing value support are, in addition, 
-   Copyright (C) 2013--2015 Charlie Zender
+   Copyright (C) 2013--2016 Charlie Zender
    License: GNU General Public License (GPL) Version 3
    See http://www.gnu.org/copyleft/gpl.html for full license text
 
diff --git a/src/nco++/prs_cls.cc b/src/nco++/prs_cls.cc
index a1e483e..58a193d 100644
--- a/src/nco++/prs_cls.cc
+++ b/src/nco++/prs_cls.cc
@@ -3,7 +3,7 @@
 /* Purpose: netCDF arithmetic processor */
 /* prs_cls -- symbol table - class methods */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco++/prs_cls.hh b/src/nco++/prs_cls.hh
index 34e1cb6..51ce1c2 100644
--- a/src/nco++/prs_cls.hh
+++ b/src/nco++/prs_cls.hh
@@ -1,7 +1,7 @@
 /* Purpose: netCDF arithmetic processor -  */
 /* prs_cls -- symbol table - data members & class methods */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco++/sdo_utl.cc b/src/nco++/sdo_utl.cc
index 3ff2eb4..67563fd 100644
--- a/src/nco++/sdo_utl.cc
+++ b/src/nco++/sdo_utl.cc
@@ -2,7 +2,7 @@
 
 // Purpose: Implementation (declaration) of SDO stand-alone utilities 
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco++/sdo_utl.hh b/src/nco++/sdo_utl.hh
index 566244b..6cc7765 100644
--- a/src/nco++/sdo_utl.hh
+++ b/src/nco++/sdo_utl.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Description (definition) of SDO stand-alone utilities
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/libnco.h b/src/nco/libnco.h
index 0e1b889..7b99bee 100644
--- a/src/nco/libnco.h
+++ b/src/nco/libnco.h
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF Operator (NCO) library */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/mpncbo.c b/src/nco/mpncbo.c
index cd24984..9cab523 100644
--- a/src/nco/mpncbo.c
+++ b/src/nco/mpncbo.c
@@ -5,7 +5,7 @@
 /* Purpose: Compute sum, difference, product, or ratio of specified hyperslabs of specfied variables
    from two input netCDF files and output them to a single file. */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/mpncecat.c b/src/nco/mpncecat.c
index e498112..6f3ac03 100644
--- a/src/nco/mpncecat.c
+++ b/src/nco/mpncecat.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Join variables across files into a new record variable */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/mpncflint.c b/src/nco/mpncflint.c
index 13f45bb..c1f2705 100644
--- a/src/nco/mpncflint.c
+++ b/src/nco/mpncflint.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Linearly interpolate a third netCDF file from two input files */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/mpncpdq.c b/src/nco/mpncpdq.c
index 0925b0f..f0dd485 100644
--- a/src/nco/mpncpdq.c
+++ b/src/nco/mpncpdq.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Pack, re-dimension, query single netCDF file and output to a single file */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/mpncra.c b/src/nco/mpncra.c
index ed32324..4c06952 100644
--- a/src/nco/mpncra.c
+++ b/src/nco/mpncra.c
@@ -9,7 +9,7 @@
    specfied variables of multiple input netCDF files and output them 
    to a single file. */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/mpncwa.c b/src/nco/mpncwa.c
index 97ef1b2..522c703 100644
--- a/src/nco/mpncwa.c
+++ b/src/nco/mpncwa.c
@@ -5,7 +5,7 @@
 /* Purpose: Compute averages of specified hyperslabs of specfied variables
    in a single input netCDF file and output them to a single file. */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncap.c b/src/nco/ncap.c
index e0ee12c..06ddcf9 100644
--- a/src/nco/ncap.c
+++ b/src/nco/ncap.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Compute user-defined derived fields using forward algebraic notation applied to netCDF files */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncap.h b/src/nco/ncap.h
index b78dd3c..a02c8c5 100644
--- a/src/nco/ncap.h
+++ b/src/nco/ncap.h
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF arithmetic processor definitions and function prototypes for ncap.c, ncap_utl.c, ncap_lex.l, and ncap_yacc.y */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/ncap_utl.c b/src/nco/ncap_utl.c
index c38e60a..9c8e0b1 100644
--- a/src/nco/ncap_utl.c
+++ b/src/nco/ncap_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF arithmetic processor */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/ncap_yacc.y b/src/nco/ncap_yacc.y
index d47ff5c..a9ee62c 100644
--- a/src/nco/ncap_yacc.y
+++ b/src/nco/ncap_yacc.y
@@ -4,7 +4,7 @@
   
 /* Purpose: Grammar parser for ncap */
   
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncatted.c b/src/nco/ncatted.c
index 3e761c2..5e1fbc7 100644
--- a/src/nco/ncatted.c
+++ b/src/nco/ncatted.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Add, create, delete, or overwrite attributes in a netCDF file */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncbo.c b/src/nco/ncbo.c
index 9d13258..2e3a9b1 100644
--- a/src/nco/ncbo.c
+++ b/src/nco/ncbo.c
@@ -5,7 +5,7 @@
 /* Purpose: Compute sum, difference, product, or ratio of specified hyperslabs of specfied variables
    from two input netCDF files and output them to a single file. */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncecat.c b/src/nco/ncecat.c
index 92de913..9f1e4aa 100644
--- a/src/nco/ncecat.c
+++ b/src/nco/ncecat.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Join variables across files with new record variable or aggregate files as groups */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncflint.c b/src/nco/ncflint.c
index ae74978..5bd3a6c 100644
--- a/src/nco/ncflint.c
+++ b/src/nco/ncflint.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Linearly interpolate a third netCDF file from two input files */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncks.c b/src/nco/ncks.c
index 339955b..a06d47f 100644
--- a/src/nco/ncks.c
+++ b/src/nco/ncks.c
@@ -5,7 +5,7 @@
 /* Purpose: Extract (subsets of) variables from a netCDF file 
    Print them to screen, copy them to another file, or regrid them */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/nco.h b/src/nco/nco.h
index 0019119..52d0f7a 100644
--- a/src/nco/nco.h
+++ b/src/nco/nco.h
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF Operator (NCO) definitions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -296,7 +296,7 @@ extern "C" {
 # define NCO_VERSION_MINOR 5
 #endif /* !NCO_VERSION_MINOR */
 #ifndef NCO_VERSION_PATCH
-# define NCO_VERSION_PATCH 3
+# define NCO_VERSION_PATCH 4
 #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 */
@@ -306,7 +306,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.5.3"
+# define NCO_VERSION "4.5.4"
 #endif /* !NCO_VERSION */
 
 /* Compatibility tokens new to netCDF4 netcdf.h: */
@@ -317,10 +317,13 @@ extern "C" {
 # define NC_MPIIO    0x2000 /* Turn on MPI I/O. Mode flag for both nc_create() and nc_open(). */
 #endif
 #ifndef NC_MPIPOSIX
-# define NC_MPIPOSIX 0x4000 /* Turn on MPI POSIX I/O. Mode flag for both nc_create() and nc_open(). */
+# define NC_MPIPOSIX 0x4000 /* Turn on MPI POSIX I/O. Mode flag for both nc_create() and nc_open(). Deprecated as of libhdf5 1.8.13. */
+#endif
+#ifndef NC_INMEMORY
+# define NC_INMEMORY  0x8000 /* Read from memory. Mode flag for nc_open() or nc_create() */
 #endif
 #ifndef NC_PNETCDF
-# define NC_PNETCDF  0x8000 /* Use parallel-netcdf library. Mode flag for nc_open(). */
+# define NC_PNETCDF  (NC_MPIIO) /* Use parallel-netcdf library. Alias for NC_MPIIO */
 #endif
 /* Use these with nc_var_par_access(). */
 #ifndef NC_INDEPENDENT
@@ -358,7 +361,10 @@ extern "C" {
 #endif
 
 /* Six compatibility tokens not all available until netCDF 3.6.1 netcdf.h
-   NC_64BIT_OFFSET is used (so far) only in nco_fl_utl.c */
+   NC_64BIT_OFFSET is used (so far) only in nco_fl_utl.c
+   20151222: Introduction of CDF5 in netCDF 4.4.0-RC4 netcdf.h makes original NC_FORMAT_64BIT token ambiguous
+   Type introduced as NC_FORMAT_64BIT in netCDF 3.X is now properly called NC_FORMAT_64BIT_OFFSET (64-bit offsets/pointers NOT data)
+   Type introduced as CDF5 (from pnetCDF) in netCDF 4.4.0 is properly called NC_FORMAT_64BIT_DATA (64-bit offsets/pointers AND data) */
 #ifndef NC_CLASSIC_MODEL
 # define NC_CLASSIC_MODEL 0x0100 /**< Enforce classic model. Mode flag for nc_create(). */
 #endif
@@ -371,8 +377,11 @@ extern "C" {
 #ifndef NC_FORMAT_CLASSIC
 # define NC_FORMAT_CLASSIC (1)
 #endif
+#ifndef NC_FORMAT_64BIT_OFFSET
+# define NC_FORMAT_64BIT_OFFSET   (2)
+#endif
 #ifndef NC_FORMAT_64BIT
-# define NC_FORMAT_64BIT   (2)
+# define NC_FORMAT_64BIT (NC_FORMAT_64BIT_OFFSET)
 #endif
 #ifndef NC_FORMAT_NETCDF4
 # define NC_FORMAT_NETCDF4 (3)
@@ -380,8 +389,14 @@ extern "C" {
 #ifndef NC_FORMAT_NETCDF4_CLASSIC
 # define NC_FORMAT_NETCDF4_CLASSIC  (4) /* create netcdf-4 files, with NC_CLASSIC_MODEL. */
 #endif
+#ifndef NC_FORMAT_64BIT_DATA
+# define NC_FORMAT_64BIT_DATA   (5)
+#endif
 
-  /* Seven compatibility tokens introduced 20131222 in netCDF 4.3.1-rc7 netcdf.h */
+  /* 20131222: Seven compatibility tokens introduced in netCDF 4.3.1-rc7 netcdf.h
+     20151222: Tokens are superseded in netCDF 4.4.0-RC4 netcdf.h by same tokens with "FORMATX" instead of "FORMAT"
+     This disambiguates extended format (FORMATX) flags returned by nc_inq_format_extended() from format flags (e.g., NC_FORMAT_CLASSIC) returned by nco_inq_format()
+     Also added NC_FORMAT_NC4 as alias to NC_FORMAT_NC_HDF5 */
 #ifndef NC_FORMAT_UNDEFINED
 # define NC_FORMAT_UNDEFINED (0)
 #else
@@ -391,10 +406,13 @@ extern "C" {
 # define NC_FORMAT_NC3     (1)
 #endif
 #ifndef NC_FORMAT_NC_HDF5
-# define NC_FORMAT_NC_HDF5 (2) /*cdf 4 subset of HDF5 */
+# define NC_FORMAT_NC_HDF5 (2) /* netCDF-4 subset of HDF5 */
+#endif
+#ifndef NC_FORMAT_NC4
+# define NC_FORMAT_NC4 NC_FORMAT_NC_HDF5 /* alias */
 #endif
 #ifndef NC_FORMAT_NC_HDF4
-# define NC_FORMAT_NC_HDF4 (3) /* netcdf 4 subset of HDF4 */
+# define NC_FORMAT_NC_HDF4 (3) /* netCDF-4 subset of HDF4 */
 #endif
 #ifndef NC_FORMAT_PNETCDF
 # define NC_FORMAT_PNETCDF (4)
@@ -405,6 +423,32 @@ extern "C" {
 #ifndef NC_FORMAT_DAP4
 # define NC_FORMAT_DAP4    (6)
 #endif
+#ifndef NC_FORMATX_UNDEFINED
+# define NC_FORMATX_UNDEFINED (0)
+#else
+# define NC_HAVE_INQ_FORMATX_EXTENDED
+#endif
+#ifndef NC_FORMATX_NC3
+# define NC_FORMATX_NC3     (1)
+#endif
+#ifndef NC_FORMATX_NC_HDF5
+# define NC_FORMATX_NC_HDF5 (2) /* netCDF4 subset of HDF5 */
+#endif
+#ifndef NC_FORMATX_NC4
+# define NC_FORMATX_NC4 NC_FORMATX_NC_HDF5 /* alias */
+#endif
+#ifndef NC_FORMATX_NC_HDF4
+# define NC_FORMATX_NC_HDF4 (3) /* netcdf4 subset of HDF4 */
+#endif
+#ifndef NC_FORMATX_PNETCDF
+# define NC_FORMATX_PNETCDF (4)
+#endif
+#ifndef NC_FORMATX_DAP2
+# define NC_FORMATX_DAP2    (5)
+#endif
+#ifndef NC_FORMATX_DAP4
+# define NC_FORMATX_DAP4    (6)
+#endif
 
   /* Three compatibility tokens from pnetcdf.h introduced to NCO 20140604 
      None are used yet */
diff --git a/src/nco/nco_att_utl.c b/src/nco/nco_att_utl.c
index fb6bf19..1944f0c 100644
--- a/src/nco/nco_att_utl.c
+++ b/src/nco/nco_att_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Attribute utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_att_utl.h b/src/nco/nco_att_utl.h
index b6481cf..ee70ade 100644
--- a/src/nco/nco_att_utl.h
+++ b/src/nco/nco_att_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Attribute utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_aux.c b/src/nco/nco_aux.c
index 8c92ed5..7cb0d81 100644
--- a/src/nco/nco_aux.c
+++ b/src/nco/nco_aux.c
@@ -1,6 +1,6 @@
 /* $Header$ */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_aux.h b/src/nco/nco_aux.h
index 57155aa..5791e0e 100644
--- a/src/nco/nco_aux.h
+++ b/src/nco/nco_aux.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Sub-set cell-based grids using auxiliary coordinate variable */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -30,12 +30,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
-/* WIN32 math.h does not define M_PI, needed for dgr2rdn and rdn2dgr */
-#ifndef M_PI
-# define M_PI		3.14159265358979323846
-#endif /* M_PI */
-
-  lmt_sct **
+lmt_sct **
 nco_aux_evl
 (int in_id, 
  int aux_nbr, 
diff --git a/src/nco/nco_bnr.c b/src/nco/nco_bnr.c
index 1844668..75e34d8 100644
--- a/src/nco/nco_bnr.c
+++ b/src/nco/nco_bnr.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Binary write utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_bnr.h b/src/nco/nco_bnr.h
index a792c94..fcfb072 100644
--- a/src/nco/nco_bnr.h
+++ b/src/nco/nco_bnr.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Binary write utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cln_utl.c b/src/nco/nco_cln_utl.c
index 1a237db..0abc111 100644
--- a/src/nco/nco_cln_utl.c
+++ b/src/nco/nco_cln_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Calendar utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cln_utl.h b/src/nco/nco_cln_utl.h
index 92e0c21..e19ef3d 100644
--- a/src/nco/nco_cln_utl.h
+++ b/src/nco/nco_cln_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Calendar utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -35,6 +35,12 @@
 # endif /* !HAVE_UDUNITS2_H */
 #endif /* !ENABLE_UDUNITS */
 
+#ifdef _MSC_VER
+#undef snprintf
+/* udunits2 defines snprintf as c99_snprintf, so the above is required  */
+#define snprintf _snprintf
+#endif
+
 /* Personal headers */
 #include "nco.h" /* netCDF Operator (NCO) definitions */
 #include "nco_ctl.h" /* Program flow control functions */
diff --git a/src/nco/nco_cnf_dmn.c b/src/nco/nco_cnf_dmn.c
index fd4bc00..9c11e3f 100644
--- a/src/nco/nco_cnf_dmn.c
+++ b/src/nco/nco_cnf_dmn.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Conform dimensions between variables */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnf_dmn.h b/src/nco/nco_cnf_dmn.h
index 23d639a..ac68c90 100644
--- a/src/nco/nco_cnf_dmn.h
+++ b/src/nco/nco_cnf_dmn.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Conform dimensions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnf_typ.c b/src/nco/nco_cnf_typ.c
index ec13b98..8e508f6 100644
--- a/src/nco/nco_cnf_typ.c
+++ b/src/nco/nco_cnf_typ.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Conform variable types */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnf_typ.h b/src/nco/nco_cnf_typ.h
index 7fafaba..9f09a17 100644
--- a/src/nco/nco_cnf_typ.h
+++ b/src/nco/nco_cnf_typ.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Conform variable types */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnk.c b/src/nco/nco_cnk.c
index 5c6bb7a..417f9a8 100644
--- a/src/nco/nco_cnk.c
+++ b/src/nco/nco_cnk.c
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO utilities for chunking */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnk.h b/src/nco/nco_cnk.h
index e7b21ff..9e889bf 100644
--- a/src/nco/nco_cnk.h
+++ b/src/nco/nco_cnk.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Description (definition) of chunking functions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnv_arm.c b/src/nco/nco_cnv_arm.c
index b5ce202..4b6157e 100644
--- a/src/nco/nco_cnv_arm.c
+++ b/src/nco/nco_cnv_arm.c
@@ -2,7 +2,7 @@
 
 /* Purpose: ARM conventions, e.g., http://www.arm.gov/data/time.stm */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnv_arm.h b/src/nco/nco_cnv_arm.h
index bb4c1a5..1f23738 100644
--- a/src/nco/nco_cnv_arm.h
+++ b/src/nco/nco_cnv_arm.h
@@ -2,7 +2,7 @@
 
 /* Purpose: ARM conventions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_cnv_csm.c b/src/nco/nco_cnv_csm.c
index c6296a7..408026b 100644
--- a/src/nco/nco_cnv_csm.c
+++ b/src/nco/nco_cnv_csm.c
@@ -2,7 +2,7 @@
 
 /* Purpose: CCM/CCSM/CF conventions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -334,7 +334,7 @@ nco_cnv_cf_cll_mth_add               /* [fnc] Add cell_methods attributes */
     dmn_nbr_mch=0;
     flg_dpl=False;
 
-    /* cell_methods format: blank-separated phrases of form "dmn1[, dmn2[...]]: op_typ" */ 
+    /* cell_methods format: blank-separated phrases of form "dmn1[, dmn2[...]]: op_typ", e.g., "lat, lon: mean" */ 
     for(dmn_idx_var=0;dmn_idx_var<var_trv->nbr_dmn;dmn_idx_var++){
       for(dmn_idx_rdc=0;dmn_idx_rdc<dmn_nbr_rdc;dmn_idx_rdc++){
         assert(dmn_rdc[dmn_idx_rdc]->nm_fll);
@@ -449,8 +449,8 @@ nco_cnv_cf_cll_mth_add               /* [fnc] Add cell_methods attributes */
     strcpy(aed.att_nm,"coordinates");
     rcd=nco_inq_att_flg(grp_out_id,var_out_id,aed.att_nm,&att_typ,&att_lng);
     if(rcd == NC_NOERR && att_typ == NC_CHAR){
-      /* Remove reduced dimensions from coordinates string */
-      /* coordinates format: blank-separated names of form "dmn1 [dmn2 [...]] dmnN" */ 
+      /* Remove reduced dimensions from coordinates string
+	 coordinates format: blank-separated names of form "dmn1 [dmn2 [...]] dmnN", e.g., "time lat lon" */ 
       /* Add room for NUL-terminator */
       att_val=(char *)nco_malloc((att_lng+1L)*sizeof(char));
       rcd=nco_get_att(grp_out_id,var_out_id,aed.att_nm,att_val,att_typ);
@@ -481,12 +481,15 @@ nco_cnv_cf_cll_mth_add               /* [fnc] Add cell_methods attributes */
 		dmn_sng_lng=strlen(dmn_rdc[dmn_idx_rdc]->nm);
 		sbs_sng_lng=(size_t)(sbs_ptr-att_val);
 		aed.mode=aed_overwrite;
+		/* If dimension to excise is trailed by a space, also remove the space, i.e., count it as part of dimension string
+		   True for all dimensions except final dimension (trailed by a NUL, not a space) */
+		if(sbs_ptr[dmn_sng_lng] == ' ') dmn_sng_lng++;
 		aed.sz=att_lng-dmn_sng_lng;
+		/* Add one for NUL-terminator */
 		aed.val.cp=(char *)nco_realloc(aed.val.cp,(aed.sz+1L)*sizeof(char));
 		strncpy(aed.val.cp,att_val,sbs_sng_lng);
 		aed.val.cp[sbs_sng_lng]='\0';
-		/* Allow for one space-separator */
-		if((sbs_ptr+dmn_sng_lng)[0] == ' ') strcat(aed.val.cp,sbs_ptr+dmn_sng_lng+1L); else strcat(aed.val.cp,sbs_ptr+dmn_sng_lng);
+		strcat(aed.val.cp,sbs_ptr+dmn_sng_lng);
 	      } /* endelse scalar */
 	      /* Edit attribute */
 	      (void)nco_aed_prc(grp_out_id,var_out_id,aed);
diff --git a/src/nco/nco_cnv_csm.h b/src/nco/nco_cnv_csm.h
index 639e109..8d6636f 100644
--- a/src/nco/nco_cnv_csm.h
+++ b/src/nco/nco_cnv_csm.h
@@ -2,7 +2,7 @@
 
 /* Purpose: CCM/CCSM/CF conventions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_ctl.c b/src/nco/nco_ctl.c
index 3850610..d50d0f4 100644
--- a/src/nco/nco_ctl.c
+++ b/src/nco/nco_ctl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Program flow control functions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -842,8 +842,8 @@ const char * /* O [sng] Mnemonic that describes current NCO version */
 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 "Mad Men\n";
+     Always include terminal \n so mnemonic does not dangle */
+  return "Capital Grille\n";
 } /* end nco_nmn_get() */
 
 char * /* O [sng] nm_in stripped of any path (i.e., program name stub) */ 
diff --git a/src/nco/nco_ctl.h b/src/nco/nco_ctl.h
index 9cd6319..4fc2aeb 100644
--- a/src/nco/nco_ctl.h
+++ b/src/nco/nco_ctl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Program flow control functions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_dbg.c b/src/nco/nco_dbg.c
index 2a05613..fe2e5fa 100644
--- a/src/nco/nco_dbg.c
+++ b/src/nco/nco_dbg.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Debugging */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_dbg.h b/src/nco/nco_dbg.h
index 1e5419f..c72759c 100644
--- a/src/nco/nco_dbg.h
+++ b/src/nco/nco_dbg.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Debugging */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_dmn_utl.c b/src/nco/nco_dmn_utl.c
index a7fd82b..f620fa7 100644
--- a/src/nco/nco_dmn_utl.c
+++ b/src/nco/nco_dmn_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Dimension utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_dmn_utl.h b/src/nco/nco_dmn_utl.h
index e559cfe..c27bf74 100644
--- a/src/nco/nco_dmn_utl.h
+++ b/src/nco/nco_dmn_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Dimension utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_fl_utl.c b/src/nco/nco_fl_utl.c
index fe7bbe9..d1ab409 100644
--- a/src/nco/nco_fl_utl.c
+++ b/src/nco/nco_fl_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: File manipulation */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_fl_utl.h b/src/nco/nco_fl_utl.h
index 10cb3d7..c3dca10 100644
--- a/src/nco/nco_fl_utl.h
+++ b/src/nco/nco_fl_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: File manipulation */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_grp_trv.c b/src/nco/nco_grp_trv.c
index e7f4d29..be6a42f 100644
--- a/src/nco/nco_grp_trv.c
+++ b/src/nco/nco_grp_trv.c
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF4 traversal storage */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_grp_trv.h b/src/nco/nco_grp_trv.h
index 062eeed..ab75ffb 100644
--- a/src/nco/nco_grp_trv.h
+++ b/src/nco/nco_grp_trv.h
@@ -2,7 +2,7 @@
 
 /* Purpose: netCDF4 traversal storage */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_grp_utl.c b/src/nco/nco_grp_utl.c
index 15432cf..6239bd2 100644
--- a/src/nco/nco_grp_utl.c
+++ b/src/nco/nco_grp_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Group utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -4481,7 +4481,7 @@ nco_cpy_var_dfn_trv                 /* [fnc] Define specified variable in output
               /* ... output file adheres to netCDF3 API so there can be only one record dimension.
 		 In other words, define all other dimensions as fixed, non-record dimensions, even
 		 if they are a record dimension in the input file ... */
-              if(CRR_DMN_IS_REC_IN_INPUT) (void)fprintf(stderr,"%s: INFO %s is defining dimension %s as fixed (non-record) in output file even though it is a record dimension in the input file. This is necessary to satisfy user request that %s be the record dimension in the output file which adheres to the netCDF3 API which permits only one record dimension.\n",nco_prg_nm_get(),fnc_nm,dmn_nm,rec_dmn_nm);
+              if(CRR_DMN_IS_REC_IN_INPUT) (void)fprintf(stderr,"%s: INFO %s is defining dimension %s as fixed (non-record) in output file even though it is a record dimension in the input file. This is necessary to satisfy user request that %s be the record dimension in the output file which adheres to the netCDF3 API where the record dimension, if any, must be a variable's first dimension.\n",nco_prg_nm_get(),fnc_nm,dmn_nm,rec_dmn_nm);
               DFN_CRR_DMN_AS_REC_IN_OUTPUT=False;
             } /* !netCDF4 */
 
@@ -4930,17 +4930,18 @@ nco_var_dmn_rdr_mtd_trv /* [fnc] Set new dimensionality in metadata of each re-o
  const nco_bool *dmn_rvr_rdr)         /* I [flg] Reverse dimension */
 {
   /* Purpose: Determine and set new dimensionality in metadata of each re-ordered variable
-     Based in nco_var_dmn_rdr_mtd(). LIMITATION: the first record dimension for the object variable is used
-     Test case : ncpdq -O -a lev,time -v two_dmn_rec_var in.nc out.nc
-     Mark lev as record and un-mark time as record (by setting the record name as lev) */
+     Based in nco_var_dmn_rdr_mtd(). 
+     NB: first record dimension for object variable is used
+     Test case: ncpdq -O -a lev,time -v two_dmn_rec_var in.nc out.nc
+     Mark lev as record and un-mark time as record (by setting record name to lev) */
 
   char *rec_dmn_nm_out_crr; /* [sng] Name of record dimension, if any, required by re-order */
   char *rec_dmn_nm_in; /* [sng] Record dimension name, original */
   char *rec_dmn_nm_out; /* [sng] Record dimension name, re-ordered */
-  int dmn_idx_out_in[NC_MAX_DIMS]; /* [idx] Dimension correspondence, output->input  (Stored in GTT ) */
+  int dmn_idx_out_in[NC_MAX_DIMS]; /* [idx] Dimension correspondence, output->input (Stored in GTT) */
   int nco_prg_id; /* [enm] Program ID */
   nco_bool REDEFINED_RECORD_DIMENSION; /* [flg] Re-defined record dimension */
-  nco_bool dmn_rvr_in[NC_MAX_DIMS]; /* [flg] Reverse dimension  (Stored in GTT ) */
+  nco_bool dmn_rvr_in[NC_MAX_DIMS]; /* [flg] Reverse dimension (Stored in GTT) */
   nm_lst_sct *rec_dmn_nm; /* [sct] Record dimension names array */
 
   /* Get Program ID */
@@ -4991,7 +4992,7 @@ nco_var_dmn_rdr_mtd_trv /* [fnc] Set new dimensionality in metadata of each re-o
     } /* end loop over dimensions */
 
     /* If record dimension required by current variable re-order...
-    ...and variable is multi-dimensional (one dimensional arrays cannot request record dimension changes)... */
+       ...and variable is multi-dimensional (one dimensional arrays cannot request record dimension changes)... */
     if(rec_dmn_nm_in && rec_dmn_nm_out_crr && var_prc_out[idx_var_prc]->nbr_dim > 1){
       /* ...differs from input and current output record dimension(s)... */
       if(strcmp(rec_dmn_nm_out_crr,rec_dmn_nm_in) && strcmp(rec_dmn_nm_out_crr,rec_dmn_nm_out)){
@@ -5732,7 +5733,7 @@ nco_dmn_msa_tbl                       /* [fnc] Update all GTT dimensions with hy
               /* ... output file adheres to netCDF3 API so there can be only one record dimension.
 		 In other words, define all other dimensions as fixed, non-record dimensions, even
 		 if they are a record dimension in the input file ... */
-              if(CRR_DMN_IS_REC_IN_INPUT) (void)fprintf(stderr,"%s: INFO %s is defining dimension %s as fixed (non-record) in output file even though it is a record dimension in the input file. This is necessary to satisfy user request that %s be the record dimension in the output file which adheres to the netCDF3 API which permits only one record dimension.\n",nco_prg_nm_get(),fnc_nm,dmn_nm,rec_dmn_nm);
+              if(CRR_DMN_IS_REC_IN_INPUT) (void)fprintf(stderr,"%s: INFO %s is defining dimension %s as fixed (non-record) in output file even though it is a record dimension in the input file. This is necessary to satisfy user request that %s be the record dimension in the output file which adheres to the netCDF3 API where the record dimension, if any, must be a variable's first dimension.\n",nco_prg_nm_get(),fnc_nm,dmn_nm,rec_dmn_nm);
               DFN_CRR_DMN_AS_REC_IN_OUTPUT=False;
             } /* !netCDF4 */
           } /* !FIX_REC_DMN */
@@ -5910,7 +5911,7 @@ nco_dmn_avg_mk                         /* [fnc] Build dimensions to average(ncwa
  dmn_sct ***dmn_avg,                   /* O [sct] Array of dimensions to average */
  int *nbr_dmn_avg)                     /* O [nbr] Number of dimensions to average (size of above array) */
 {
-  /* Purpose: Create list of dimensions from list of dimension name strings (function based in nco_xtr_mk() ) */
+  /* Purpose: Create list of dimensions from list of dimension name strings. Function based on nco_xtr_mk(). */
 
   /* Dimensions to average/not average are built using these 3 functions:
      
@@ -6054,7 +6055,7 @@ nco_dmn_avg_mk                         /* [fnc] Build dimensions to average(ncwa
     } /* Loop table */
   } /* Loop input dimension name list */
   
-    /* Export */
+  /* Export */
   *nbr_dmn_avg=nbr_avg_dmn;
   
   if(nco_dbg_lvl_get() >= nco_dbg_var){ 
diff --git a/src/nco/nco_grp_utl.h b/src/nco/nco_grp_utl.h
index e3ceaaf..2266933 100644
--- a/src/nco/nco_grp_utl.h
+++ b/src/nco/nco_grp_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Group utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_lmt.c b/src/nco/nco_lmt.c
index 32604af..1df8179 100644
--- a/src/nco/nco_lmt.c
+++ b/src/nco/nco_lmt.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Hyperslab limits */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -371,7 +371,7 @@ nco_lmt_prs /* [fnc] Create limit structures with name, min_sng, max_sng element
 
     /* Check syntax */
     if(arg_nbr < 2){ /* Need more than just dimension name */
-      msg_sng=strdup("Need more than just dimension name");
+      msg_sng=strdup("Hyperslab options must specify at least two arguments (the first argument is the dimension name, the second is the minimum index, etc.)");
       NCO_SYNTAX_ERROR=True;
     }else if(arg_nbr > 6){ /* Too much information */
       msg_sng=strdup("Too many (more than 6) arguments");
diff --git a/src/nco/nco_lmt.h b/src/nco/nco_lmt.h
index 8c8cde0..9a89ee4 100644
--- a/src/nco/nco_lmt.h
+++ b/src/nco/nco_lmt.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Hyperslab limits */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_lst_utl.c b/src/nco/nco_lst_utl.c
index f5602b5..a680259 100644
--- a/src/nco/nco_lst_utl.c
+++ b/src/nco/nco_lst_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: List utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_lst_utl.h b/src/nco/nco_lst_utl.h
index 46d043b..9dbd4d9 100644
--- a/src/nco/nco_lst_utl.h
+++ b/src/nco/nco_lst_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: List utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_md5.c b/src/nco/nco_md5.c
index 2ab4d49..7e30b51 100644
--- a/src/nco/nco_md5.c
+++ b/src/nco/nco_md5.c
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO utilities for MD5 digests */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_md5.h b/src/nco/nco_md5.h
index 3dc01cf..a73913c 100644
--- a/src/nco/nco_md5.h
+++ b/src/nco/nco_md5.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Description (definition) of MD5 digest functions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_mmr.c b/src/nco/nco_mmr.c
index cb8427c..8d26a43 100644
--- a/src/nco/nco_mmr.c
+++ b/src/nco/nco_mmr.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Memory management */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_mmr.h b/src/nco/nco_mmr.h
index b663a15..b1fee3f 100644
--- a/src/nco/nco_mmr.h
+++ b/src/nco/nco_mmr.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Memory management */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_mpi.h b/src/nco/nco_mpi.h
index 7743f39..833d557 100644
--- a/src/nco/nco_mpi.h
+++ b/src/nco/nco_mpi.h
@@ -13,7 +13,7 @@
    Should _any_ MPI dependencies be in libnco.a?
    Cross-platform link weirdness (e.g., AIX) makes MPI dependencies in libnco.a fragile */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_msa.c b/src/nco/nco_msa.c
index 33fdd38..1942c46 100644
--- a/src/nco/nco_msa.c
+++ b/src/nco/nco_msa.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Multi-slabbing algorithm */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_msa.h b/src/nco/nco_msa.h
index 8e68c25..0638ecb 100644
--- a/src/nco/nco_msa.h
+++ b/src/nco/nco_msa.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Multi-slabbing algorithm */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_mss_val.c b/src/nco/nco_mss_val.c
index 8ed37ee..726cb2f 100644
--- a/src/nco/nco_mss_val.c
+++ b/src/nco/nco_mss_val.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Missing value utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_mss_val.h b/src/nco/nco_mss_val.h
index 7f53d0e..8cb933c 100644
--- a/src/nco/nco_mss_val.h
+++ b/src/nco/nco_mss_val.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Missing value utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_netcdf.c b/src/nco/nco_netcdf.c
index f3ccd67..a892f5d 100644
--- a/src/nco/nco_netcdf.c
+++ b/src/nco/nco_netcdf.c
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO wrappers for netCDF C library */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_netcdf.h b/src/nco/nco_netcdf.h
index 9423e9e..f42331f 100644
--- a/src/nco/nco_netcdf.h
+++ b/src/nco/nco_netcdf.h
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO wrappers for netCDF C library */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_omp.c b/src/nco/nco_omp.c
index 2d065a6..34f5eff 100644
--- a/src/nco/nco_omp.c
+++ b/src/nco/nco_omp.c
@@ -2,7 +2,7 @@
 
 /* Purpose: OpenMP utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_omp.h b/src/nco/nco_omp.h
index d82a992..55050d2 100644
--- a/src/nco/nco_omp.h
+++ b/src/nco/nco_omp.h
@@ -2,7 +2,7 @@
 
 /* Purpose: OpenMP utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_pck.c b/src/nco/nco_pck.c
index 5773ae0..07bc494 100644
--- a/src/nco/nco_pck.c
+++ b/src/nco/nco_pck.c
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO utilities for packing and unpacking variables */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_pck.h b/src/nco/nco_pck.h
index ec66b8e..0b4bb7f 100644
--- a/src/nco/nco_pck.h
+++ b/src/nco/nco_pck.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Description (definition) of packing/unpacking functions */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_ppc.c b/src/nco/nco_ppc.c
index aa2e516..0078a64 100644
--- a/src/nco/nco_ppc.c
+++ b/src/nco/nco_ppc.c
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO utilities for Precision-Preserving Compression (PPC) */
 
-/* Copyright (C) 2015--2015 Charlie Zender
+/* Copyright (C) 2015--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 */
diff --git a/src/nco/nco_ppc.h b/src/nco/nco_ppc.h
index 3e5f0ac..b7c16d6 100644
--- a/src/nco/nco_ppc.h
+++ b/src/nco/nco_ppc.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Description (definition) of Precision-Preserving Compression (PPC) functions */
 
-/* Copyright (C) 2015--2015 Charlie Zender
+/* Copyright (C) 2015--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 */
@@ -15,6 +15,7 @@
 
 /* Standard header files */
 #include <ctype.h> /* isalnum(), isdigit(), tolower() */
+#include <math.h> /* sin cos cos sin 3.14159 */
 #include <stdio.h> /* stderr, FILE, NULL, printf */
 #include <stdlib.h> /* atof, atoi, malloc, getopt */
 #include <string.h> /* strcmp() */
@@ -28,6 +29,14 @@
 #include "nco_mmr.h" /* Memory management */
 #include "nco_sng_utl.h" /* String utilities */
 
+/* 20151207: Reports that Cygwin math.h does not define M_LN10 or M_LN2 */
+#ifndef M_LN10
+# define M_LN10      2.30258509299404568401799145468436421   /* loge(10)       */
+#endif /* M_LN10 */
+#ifndef M_LN2
+# define M_LN2       0.693147180559945309417232121458176568  /* loge(2)        */
+#endif /* M_LN2 */
+
 /* Minimum number of explicit significand bits to preserve when zeroing/bit-masking floating point values
    Codes will preserve at least two explicit bits, IEEE significand representation contains one implicit bit
    Thus preserve a least three bits which is approximately one sigificant decimal digit
diff --git a/src/nco/nco_prn.c b/src/nco/nco_prn.c
index 40eb551..cb7752b 100644
--- a/src/nco/nco_prn.c
+++ b/src/nco/nco_prn.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Print variables, attributes, metadata */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -274,7 +274,8 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
     spr_sng=cma_sng; /* [sng] Output separator string */
     if(XML){
       /* Official NcML XML Schema is here:
-	 http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/v2.2/AnnotatedSchema4.html
+	 http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/AnnotatedSchema4.html // 2015
+	 http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/v2.2/AnnotatedSchema4.html // older
 	 http://www.unidata.ucar.edu/schemas/netcdf/ncml-2.2.xsd */
 
       (void)fprintf(stdout,"%*s<attribute name=\"%s\"",prn_ndn,spc_sng,att[idx].nm);
@@ -284,15 +285,18 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
 
       /* Print type of non-string variables
 	 NB: Take or lose this opportunity to distinguish char from string?
-	 NcML does not preserve unsigned types, so why not turn char attributes into strings? 
+	 Until ~2014 NcML did not preserve unsigned types, so why not turn char attributes into strings? 
 	 Can turn char into string here just by omitting "type=char" attribute
 	 toolsui NcML does not print "type=char" for for char attributes
 	 Hence neither does ncks */
-      if(att[idx].type != NC_STRING && att[idx].type != NC_CHAR) (void)fprintf(stdout," type=\"%s\"",xml_typ_nm(att[idx].type));
+      if(att[idx].type != NC_STRING && att[idx].type != NC_CHAR){
+	(void)fprintf(stdout," type=\"%s\"",xml_typ_nm(att[idx].type));
+	/* Print hidden attributes */
+	/* Until ~2014 toolsui showed no way to indicate unsigned types for attributes
+	   20151207 Aleksander Jelenak and Ed Armstrong request "_Unsigned" attributes to denote unsigned attribute types */
+	if(nco_xml_typ_rqr_nsg_att(att[idx].type)) (void)fprintf(stdout," isUnsigned=\"true\"");
+      } /* endif */
       
-      /* Print hidden attributes */
-      // if(nco_xml_typ_rqr_nsg_att(att[idx].type)) (void)fprintf(stdout,""); /* toolsui shows no way to indicate unsigned types for attributes? */
-
       /* Print separator element for non-whitespace separators */
       if((att[idx].sz == 1L && att[idx].type == NC_STRING) || att[idx].sz > 1L){ 
 	/* Ensure string attribute value does not contain separator string */
@@ -1777,6 +1781,8 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
 
     /* Allocate space for dimension information */
     dim=(dmn_sct *)nco_malloc(var.nbr_dim*sizeof(dmn_sct));
+    /* Ensure val.vp is NULL-initialized (and thus not inadvertently free'd) when PRN_DMN_IDX_CRD_VAL is False */
+    for(int idx=0;idx<var.nbr_dim;idx++) dim[idx].val.vp=NULL; 
     dmn_sbs_ram=(long *)nco_malloc(var.nbr_dim*sizeof(long));
     dmn_sbs_dsk=(long *)nco_malloc(var.nbr_dim*sizeof(long));
     mod_map_cnt=(long *)nco_malloc(var.nbr_dim*sizeof(long));
@@ -2076,6 +2082,9 @@ lbl_chr_prn:
   } /* end if variable has more than one dimension */
 
   /* Free value buffer */
+  if(var.type == NC_STRING)
+      for(lmn=0;lmn<var.sz;lmn++)
+	if(var.val.sngp[lmn]) var.val.sngp[lmn]=(nco_string)nco_free(var.val.sngp[lmn]);
   var.val.vp=nco_free(var.val.vp);
   var.mss_val.vp=nco_free(var.mss_val.vp);
   var.nm=(char *)nco_free(var.nm);
diff --git a/src/nco/nco_prn.h b/src/nco/nco_prn.h
index b2e490f..fa36ad2 100644
--- a/src/nco/nco_prn.h
+++ b/src/nco/nco_prn.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Print variables, attributes, metadata */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_rec_var.c b/src/nco/nco_rec_var.c
index db2e36c..7358a92 100644
--- a/src/nco/nco_rec_var.c
+++ b/src/nco/nco_rec_var.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Record variable utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_rec_var.h b/src/nco/nco_rec_var.h
index f0ef785..50c8b61 100644
--- a/src/nco/nco_rec_var.h
+++ b/src/nco/nco_rec_var.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Record variable utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_rgr.c b/src/nco/nco_rgr.c
index 5491484..e589e0b 100644
--- a/src/nco/nco_rgr.c
+++ b/src/nco/nco_rgr.c
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO regridding utilities */
 
-/* Copyright (C) 2015--2015 Charlie Zender
+/* Copyright (C) 2015--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 */
@@ -27,6 +27,7 @@ nco_rgr_ctl /* [fnc] Control regridding logic */
   /* Main control branching occurs here
      Branching complexity and utility will increase as regridding features are added */
   if(rgr->flg_grd) flg_grd=True;
+
   if(rgr->flg_nfr) flg_nfr=True;
   if(rgr->flg_map) flg_map=True;
   if(rgr->flg_grd_src && rgr->flg_grd_dst) flg_smf=True;
@@ -112,7 +113,7 @@ nco_rgr_free /* [fnc] Deallocate regridding structure */
   if(rgr) rgr=(rgr_sct *)nco_free(rgr);
 
   return rgr;
-} /* end nco_rfr_free() */
+} /* end nco_rgr_free() */
   
 rgr_sct * /* O [sct] Regridding structure */
 nco_rgr_ini /* [fnc] Initialize regridding structure */
@@ -475,8 +476,8 @@ nco_rgr_ini /* [fnc] Initialize regridding structure */
   /* Revert to defaults for any names not specified on command-line */
   if(!rgr->area_nm) rgr->area_nm=(char *)strdup("area"); /* [sng] Name of variable containing gridcell area */
   if(!rgr->bnd_nm) rgr->bnd_nm=(char *)strdup("nbnd"); /* [sng] Name of dimension to employ for spatial bounds */
-  /* NB: CESM uses nbnd for temporal bounds. NCO defaults to nbnd for all bounds with two endpoints */
-  if(!rgr->bnd_tm_nm) rgr->bnd_tm_nm=(char *)strdup("nbnd"); /* [sng] Name of dimension to employ for spatial bounds */
+  /* NB: CESM uses nbnd and ilev for temporal and vertical bounds, respectively (CESM outputs no horizontal spatial bounds). NCO defaults to nbnd for all bounds with two endpoints */
+  if(!rgr->bnd_tm_nm) rgr->bnd_tm_nm=(char *)strdup("nbnd"); /* [sng] Name of dimension to employ for temporal bounds */
   if(!rgr->col_nm_in) rgr->col_nm_in=(char *)strdup("ncol"); /* [sng] Name to recognize as input horizontal spatial dimension on unstructured grid */
   if(!rgr->frc_nm) rgr->frc_nm=(char *)strdup("frac_b"); /* [sng] Name of variable containing gridcell fraction */
   if(!rgr->lat_bnd_nm) rgr->lat_bnd_nm=(char *)strdup("lat_bnds"); /* [sng] Name of rectangular boundary variable for latitude */
@@ -490,6 +491,9 @@ nco_rgr_ini /* [fnc] Initialize regridding structure */
 
   /* Derived from defaults and command-line arguments */
   // On second thought, do no strdup() these here. This way, NULL means user never specified lon/lat-out names
+  //  if(!rgr->col_nm_out) rgr->col_nm_out=(char *)strdup("ncol"); /* [sng] Name of dimension to output as horizontal spatial dimension on unstructured grid */
+  //  if(!rgr->lat_nm_out) rgr->lat_nm_out=(char *)strdup("lat"); /* [sng] Name of dimension to output as latitude */
+  //  if(!rgr->lon_nm_out) rgr->lon_nm_out=(char *)strdup("lon"); /* [sng] Name of dimension to output as longitude */
   //  if(!rgr->lat_nm_out) rgr->lat_nm_out=(char *)strdup(rgr_lat_nm_in); /* [sng] Name of output dimension for latitude */
   //  if(!rgr->lon_nm_out) rgr->lon_nm_out=(char *)strdup(rgr_lon_nm_in); /* [sng] Name of output dimension for longitude */
 
@@ -1223,7 +1227,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 
     /* Global or regional grid? */
     nco_grd_xtn_enm nco_grd_xtn; /* [enm] Extent of grid */
-    if(lon_spn == 360.0 && lat_spn == 180.0) nco_grd_xtn=nco_grd_xtn_glb; else nco_grd_xtn=nco_grd_xtn_rgn;
+    if((float)lon_spn == 360.0f && (float)lat_spn == 180.0f) nco_grd_xtn=nco_grd_xtn_glb; else nco_grd_xtn=nco_grd_xtn_rgn;
     /* Diagnose type of latitude output grid by testing second latitude center against formulae */
     const double lat_ctr_tst_eqa=lat_ntf_out[0]+lat_spn*1.5/lat_nbr_out;
     const double lat_ctr_tst_fv=lat_ntf_out[0]+lat_spn/(lat_nbr_out-1);
@@ -1266,10 +1270,10 @@ nco_rgr_map /* [fnc] Regrid with external weights */
       /* NB: Longitude grid diagnosis is susceptible to mistakes when input mapfile embeds common faulty grids, e.g., ACME *150418* FV maps
 	 map_ne30np4_to_fv129x256_aave.150418.nc is diagnosed as regional grid of unknown type because of input grid flaws
 	 map_ne30np4_to_fv129x256_aave.20150901.nc is (correctly) diagnosed as global grid of with lon_Grn_ctr */
-      if(     (float)lon_ctr_out[0] ==   0.0 && (float)lon_ctr_out[1] == (float)(lon_ctr_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_Grn_ctr;
-      else if((float)lon_ctr_out[0] == 180.0 && (float)lon_ctr_out[1] == (float)(lon_ctr_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_180_ctr;
-      else if((float)lon_ntf_out[0] ==   0.0 && (float)lon_ntf_out[1] == (float)(lon_ntf_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_Grn_wst;
-      else if((float)lon_ntf_out[0] == 180.0 && (float)lon_ntf_out[1] == (float)(lon_ntf_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_180_wst;
+      if(     (float)lon_ctr_out[0] ==    0.0f && (float)lon_ctr_out[1] == (float)(lon_ctr_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_Grn_ctr;
+      else if((float)lon_ctr_out[0] == -180.0f && (float)lon_ctr_out[1] == (float)(lon_ctr_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_180_ctr;
+      else if((float)lon_ntf_out[0] ==    0.0f && (float)lon_ntf_out[1] == (float)(lon_ntf_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_Grn_wst;
+      else if((float)lon_ntf_out[0] == -180.0f && (float)lon_ntf_out[1] == (float)(lon_ntf_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_180_wst;
       else if((float)lon_ctr_out[1] == (float)(lon_ctr_out[0]+lon_spn/lon_nbr_out)) nco_grd_lon_typ=nco_grd_lon_bb;
       else nco_grd_lon_typ=nco_grd_lon_unk;
     } /* !nco_grd_lon_typ */
@@ -1506,14 +1510,18 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     rcd=nco_inq_dimid_flg(in_id,lat_nm_in,&dmn_id_lat);
     if(rcd != NC_NOERR){
       if((rcd=nco_inq_dimid_flg(in_id,"latitude",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("latitude");
-      else if((rcd=nco_inq_dimid_flg(in_id,"lat",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("lat"); /* CAM */
+      else if((rcd=nco_inq_dimid_flg(in_id,"lat",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("lat");
       else if((rcd=nco_inq_dimid_flg(in_id,"Latitude",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("Latitude");
       else if((rcd=nco_inq_dimid_flg(in_id,"Lat",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("Lat");
       else if((rcd=nco_inq_dimid_flg(in_id,"south_north",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("south_north");
       else if((rcd=nco_inq_dimid_flg(in_id,"south_north_stag",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("south_north_stag");
       else if((rcd=nco_inq_dimid_flg(in_id,"YDim:location",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("YDim:location");
+      else if((rcd=nco_inq_dimid_flg(in_id,"nj",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("nj");
+      else if((rcd=nco_inq_dimid_flg(in_id,"nlat",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("nlat");
+      else if((rcd=nco_inq_dimid_flg(in_id,"nTimes",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("nTimes");
       else if((rcd=nco_inq_dimid_flg(in_id,"GeoTrack",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("GeoTrack");
       else if((rcd=nco_inq_dimid_flg(in_id,"GeoTrack:L2_Standard_atmospheric&surface_product",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("GeoTrack:L2_Standard_atmospheric&surface_product");
+      else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Along_Swath:mod04",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("Cell_Along_Swath:mod04");
       else{
 	(void)fprintf(stdout,"%s: ERROR %s reports unable to find latitude dimension in input file. Tried the usual suspects. HINT: Inform regridder of latitude dimension name with --rgr lat_nm=name\n",nco_prg_nm_get(),fnc_nm);
 	nco_exit(EXIT_FAILURE);
@@ -1534,8 +1542,12 @@ nco_rgr_map /* [fnc] Regrid with external weights */
       else if((rcd=nco_inq_dimid_flg(in_id,"west_east",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("west_east");
       else if((rcd=nco_inq_dimid_flg(in_id,"west_east_stag",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("west_east_stag");
       else if((rcd=nco_inq_dimid_flg(in_id,"XDim:location",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("XDim:location");
+      else if((rcd=nco_inq_dimid_flg(in_id,"ni",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("ni");
+      else if((rcd=nco_inq_dimid_flg(in_id,"nlon",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("nlon");
+      else if((rcd=nco_inq_dimid_flg(in_id,"nXtrack",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("nXtrack");
       else if((rcd=nco_inq_dimid_flg(in_id,"GeoXTrack",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("GeoXTrack");
       else if((rcd=nco_inq_dimid_flg(in_id,"GeoXTrack:L2_Standard_atmospheric&surface_product",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("GeoXTrack:L2_Standard_atmospheric&surface_product");
+      else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Across_Swath:mod04",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("Cell_Across_Swath:mod04");
       else{
 	(void)fprintf(stdout,"%s: ERROR %s reports unable to find longitude dimension in input file. Tried the usual suspects. HINT: Inform regridder of longitude dimension name with --rgr lon_nm=name\n",nco_prg_nm_get(),fnc_nm);
 	nco_exit(EXIT_FAILURE);
@@ -1551,18 +1563,21 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   /* Do not extract grid variables (that are also extensive variables) like lon, lat, and area
      If necessary, use remap data to diagnose them from scratch
      Other extensive variables (like counts, population) will be extracted and summed not averaged */
-  const int var_xcl_lst_nbr=17; /* [nbr] Number of objects on exclusion list */
+  const int var_xcl_lst_nbr=32; /* [nbr] Number of objects on exclusion list */
   /* Exception list source:
      CAM, CERES, CMIP5: lat, lon
      CAM, CMIP5: gw, lat_bnds, lon_bnds
      CAM-SE: area
+     CICE: latt_bounds, lont_bounds, latu_bounds, lonu_bounds, TLAT, TLON, ULAT, ULON (NB: CICE uses ?LON and POP uses ?LONG)
      ESMF: gridcell_area
      MAR: LAT, LON
-     MPAS-O: areaCell, latCell, lonCell
+     MPAS-O/I: areaCell, latCell, lonCell
      NCO: lat_vertices, lon_vertices
+     POP: TLAT, TLONG, ULAT, ULONG  (NB: CICE uses ?LON and POP uses ?LONG) (POP does not archive spatial bounds)
      UV-CDAT regridder: bounds_lat, bounds_lon
+     Unknown: XLAT_M, XLONG_M
      WRF: XLAT, XLONG */
-  const char *var_xcl_lst[]={"/area","/gridcell_area","/gw","/LAT","/lat","/latitude","/XLAT","/lat_bnds","/lat_vertices","/bounds_lat","/LON","/lon","/longitude","/XLONG","/lon_bnds","/lon_vertices","/bounds_lon"};
+    const char *var_xcl_lst[]={"/area","/areaCell","/gridcell_area","/gw","/LAT","/lat","/latCell","/latitude","/TLAT","/ULAT","/XLAT","/XLAT_M","/lat_bnds","/lat_vertices","/latt_bounds","/latu_bounds","/bounds_lat","/LON","/lon","/lonCell","/longitude","/TLON","/TLONG","/ULON","/ULONG","/XLONG","/XLONG_M","/lon_bnds","/lon_vertices","/lont_bounds","/lonu_bounds","/bounds_lon"};
   int var_cpy_nbr=0; /* [nbr] Number of copied variables */
   int var_rgr_nbr=0; /* [nbr] Number of regridded variables */
   int var_xcl_nbr=0; /* [nbr] Number of deleted variables */
@@ -1813,6 +1828,8 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   /* Pre-allocate dimension ID and cnt/srt space */
   int dmn_nbr_max; /* [nbr] Maximum number of dimensions variable can have in input or output */
   int dmn_in_fst; /* [idx] Offset of input- relative to output-dimension due to non-MRV dimension insertion */
+  int dmn_nbr_rec; /* [nbr] Number of unlimited dimensions */
+  int *dmn_ids_rec=NULL; /* [id] Unlimited dimension IDs */
   //int dmn_idx_in_out_pre_rgr[dmn_nbr_max];
   rcd+=nco_inq_ndims(in_id,&dmn_nbr_max);
   dmn_nbr_max++; /* Safety in case regridding adds dimension */
@@ -1821,6 +1838,13 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   dmn_srt=(long *)nco_malloc(dmn_nbr_max*sizeof(long));
   dmn_cnt=(long *)nco_malloc(dmn_nbr_max*sizeof(long));
 
+  /* Identify all record-dimensions in input file */
+  rcd+=nco_inq_unlimdims(in_id,&dmn_nbr_rec,dmn_ids_rec);
+  if(dmn_nbr_rec > 0){
+    dmn_ids_rec=(int *)nco_malloc(dmn_nbr_rec*sizeof(int));
+    rcd+=nco_inq_unlimdims(in_id,&dmn_nbr_rec,dmn_ids_rec);
+  } /* !dmn_nbr_rec */
+  
   /* Define regridded and copied variables in output file */
   for(idx_tbl=0;idx_tbl<trv_nbr;idx_tbl++){
     trv_tbl->lst[idx_tbl].flg_mrv=True;
@@ -1879,6 +1903,10 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 		else rcd=nco_inq_dimid_flg(out_id,dmn_nm,dmn_id_out+dmn_idx+dmn_in_fst);
 		if(rcd != NC_NOERR){
 		  rcd=nco_inq_dimlen(in_id,dmn_id_in[dmn_idx],dmn_cnt+dmn_idx+dmn_in_fst);
+		  /* Check-for and, if found, retain record dimension property */
+		  for(int dmn_rec_idx=0;dmn_rec_idx < dmn_nbr_rec;dmn_rec_idx++)
+		    if(dmn_id_in[dmn_idx] == dmn_ids_rec[dmn_rec_idx])
+		      dmn_cnt[dmn_idx+dmn_in_fst]=NC_UNLIMITED;
 		  rcd=nco_def_dim(out_id,dmn_nm,dmn_cnt[dmn_idx+dmn_in_fst],dmn_id_out+dmn_idx+dmn_in_fst);
 		} /* !rcd */
 	      } /* !lat && !lon */
@@ -1900,6 +1928,10 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 		else rcd=nco_inq_dimid_flg(out_id,dmn_nm,dmn_id_out+dmn_idx+dmn_in_fst);
 		if(rcd != NC_NOERR){
 		  rcd=nco_inq_dimlen(in_id,dmn_id_in[dmn_idx],dmn_cnt+dmn_idx+dmn_in_fst);
+		  /* Check-for and, if found, retain record dimension property */
+		  for(int dmn_rec_idx=0;dmn_rec_idx < dmn_nbr_rec;dmn_rec_idx++)
+		    if(dmn_id_in[dmn_idx] == dmn_ids_rec[dmn_rec_idx])
+		      dmn_cnt[dmn_idx+dmn_in_fst]=NC_UNLIMITED;
 		  rcd=nco_def_dim(out_id,dmn_nm,dmn_cnt[dmn_idx+dmn_in_fst],dmn_id_out+dmn_idx+dmn_in_fst);
 		} /* !rcd */
 	      } /* !col */
@@ -1913,6 +1945,10 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 	    rcd=nco_inq_dimid_flg(out_id,dmn_nm,dmn_id_out+dmn_idx);
 	    if(rcd != NC_NOERR){
 	      rcd=nco_inq_dimlen(in_id,dmn_id_in[dmn_idx],dmn_cnt+dmn_idx);
+	      /* Check-for and, if found, retain record dimension property */
+	      for(int dmn_rec_idx=0;dmn_rec_idx < dmn_nbr_rec;dmn_rec_idx++)
+		if(dmn_id_in[dmn_idx] == dmn_ids_rec[dmn_rec_idx])
+		  dmn_cnt[dmn_idx]=NC_UNLIMITED;
 	      rcd=nco_def_dim(out_id,dmn_nm,dmn_cnt[dmn_idx],dmn_id_out+dmn_idx);
 	    } /* !rcd */
 	  } /* !dmn_idx */
@@ -1933,6 +1969,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(dmn_id_out) dmn_id_out=(int *)nco_free(dmn_id_out);
   if(dmn_srt) dmn_srt=(long *)nco_free(dmn_srt);
   if(dmn_cnt) dmn_cnt=(long *)nco_free(dmn_cnt);
+  if(dmn_ids_rec) dmn_ids_rec=(int *)nco_free(dmn_ids_rec);
 
   /* Define new metadata in regridded file */
   att_nm=strdup("long_name");
@@ -2424,6 +2461,14 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 
 	for(dmn_idx=0;dmn_idx<dmn_nbr_out;dmn_idx++){
 	  rcd=nco_inq_dimlen(out_id,dmn_id_out[dmn_idx],dmn_cnt_out+dmn_idx);
+	  if(dmn_cnt_out[dmn_idx] == 0L){
+	    /* No records have been written, so overwrite zero output record size with input record size */
+	    char dmn_rec_nm[NC_MAX_NAME]; /* [sng] Record dimension name */
+	    int dmn_rec_id_in;
+	    rcd=nco_inq_dimname(out_id,dmn_id_out[dmn_idx],dmn_rec_nm);
+	    rcd=nco_inq_dimid(in_id,dmn_rec_nm,&dmn_rec_id_in);
+	    rcd=nco_inq_dimlen(in_id,dmn_rec_id_in,dmn_cnt_out+dmn_idx);
+	  } /* !dmn_cnt_out */
 	  var_sz_out*=dmn_cnt_out[dmn_idx];
 	  dmn_srt[dmn_idx]=0L;
 	} /* end loop over dimensions */
@@ -3085,7 +3130,7 @@ nco_sph_plg_area /* [fnc] Compute area of spherical polygon */
 	   3.653857995289623e-05 old NCO (acos) */
 	/* Computing great circle arcs over small arcs requires care since the central angle is near 0 degrees
 	   Cosine small angles changes slowly for such angles, and leads to precision loss
-	   Use haversine formula instead of sphereical law of cosines formula
+	   Use haversine formula instead of spherical law of cosines formula
 	   https://en.wikipedia.org/wiki/Great-circle_distance */
 	/* Interior angle/great circle arc a, spherical law of cosines formula (loses precision):
 	   cos_a=lat_bnd_cos[idx_a]*lon_bnd_cos[idx_a]*lat_bnd_cos[idx_b]*lon_bnd_cos[idx_b]+
@@ -3198,7 +3243,7 @@ nco_grd_2D_sng /* [fnc] Convert two-dimensional grid-type enum to string */
 {
   /* Purpose: Convert two-dimensional grid-type enum to string */
   switch(nco_grd_2D_typ){
-  case nco_grd_2D_unk: return "Unknown or unclassified 2D grid type (e.g., curvilinear, POP displaced-pole)";
+  case nco_grd_2D_unk: return "Unknown, unclassified, or unrepresentable 2D grid type (e.g., unstructured, curvilinear, POP displaced-pole)";
   case nco_grd_2D_gss: return "Gaussian latitude grid. Used by spectral transform models, e.g., CCM 1-3, CAM 1-3, LSM, MATCH, UCICTM.";
   case nco_grd_2D_fv: return "Cap grid. Uniform/Equi-angle (except at poles) latitude grid with poles are considered at (and labeled as) centers of first and last gridcells (i.e., lat_ctr[0]=-90), and those polar gridcells span half the equi-angular latitude increment. AKA FV-scalar grid (in Lin-Rood representation). Used by CAM FV, GEOS-CHEM, UCICTM, UKMO.";
   case nco_grd_2D_eqa: return "Uniform/Equi-Angular latitude grid. Uniform/Equi-angle (everywhere) latitude grid. When global (not regional) in extent, poles are at edges of first and last gridcells (i.e., lat_ctr[0]=-89.xxx). When global forms valid FV-staggered AKA FV velocity grid (for Lin-Rood representation). Used by CIESIN/SEDAC, IGBP-DIS, TOMS AAI.";
@@ -3215,7 +3260,7 @@ nco_grd_lat_sng /* [fnc] Convert latitude grid-type enum to string */
 {
   /* Purpose: Convert latitude grid-type enum to string */
   switch(nco_grd_lat_typ){
-  case nco_grd_lat_unk: return "Unknown or unclassified latitude grid type (e.g., curvilinear, POP3)";
+  case nco_grd_lat_unk: return "Unknown, unclassified, or unrepresentable latitude grid type (e.g., unstructured, curvilinear, POP3)";
   case nco_grd_lat_gss: return "Gaussian latitude grid used by global spectral models: CCM 1-3, CAM 1-3, LSM, MATCH, UCICTM";
   case nco_grd_lat_fv: return "Cap-latitude grid. Uniform/Equi-angle (except at poles) latitude grid with poles are considered at (and labeled as) centers of first and last gridcells (i.e., lat_ctr[0]=-90), and those polar gridcells span half the equi-angular latitude increment. AKA FV-scalar grid (in Lin-Rood representation). Used by: CAM FV, GEOS-CHEM, UCICTM, UKMO";
   case nco_grd_lat_eqa: return "Uniform/Equi-Angular latitude grid. Uniform/Equi-angle (everywhere) latitude grid. When global (not regional) in extent, poles are at edges of first and last gridcells (e.g., lat_ctr[0]=-89.xxx). When global can be latitude-component of a valid FV-staggered grid AKA FV velocity grid (for Lin-Rood representation). Used by: CIESIN/SEDAC, IGBP-DIS, TOMS AAI";
@@ -3232,7 +3277,7 @@ nco_grd_lon_sng /* [fnc] Convert longitude grid-type enum to string */
 {
   /* Purpose: Convert longitude grid-type enum to string */
   switch(nco_grd_lon_typ){
-  case nco_grd_lon_unk: return "Unknown or unclassified longitude grid type (e.g., curvilinear)";
+  case nco_grd_lon_unk: return "Unknown, unclassified, or unrepresentable longitude grid type (e.g., unstructured, curvilinear)";
   case nco_grd_lon_180_wst: return "Date line at west edge of first longitude cell";
   case nco_grd_lon_180_ctr: return "Date line at center of first longitude cell";
   case nco_grd_lon_Grn_wst: return "Greenwich at west edge of first longitude cell";
@@ -3404,6 +3449,18 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
      spherical sector = volume subtended by lat1
      spherical wedge = ungula = volume subtended by lon2-lon1
      spherical zone = area of spherical segment excluding bases
+     spherical quadrangle = area of intersection of spherical zone and lune (i.e., area of 
+
+     bearing = angle from true north
+     geodesic = shortest path between points on a surface
+     great circle = orthodrome = "straight path" = geodesic of the sphere
+     convergency = difference (in azimuth?) between great circle tracks at two different positions
+     conversion angle = angle between geodesic and rhumb line 
+     rhumb line = loxodrome = "oblique (or slanted) path" = line of constant azimuth
+     
+     Formulae:
+     http://www.movable-type.co.uk/scripts/latlong.html # On-line Javascript implementation
+     http://williams.best.vwh.net/avform.htm
 
      ACME:
      https://acme-svn2.ornl.gov/acme-repo/acme/mapping/grids
@@ -3413,17 +3470,17 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
      /glade/p/cesm/cseg/mapping/grids
 
      Generate global RLL grids:
-     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr grid=${DATA}/grids/180x360_SCRIP.20150901.nc --rgr lat_nbr=180 --rgr lon_nbr=360 --rgr lat_typ=eqa --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
-     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 90x180' --rgr grid=${DATA}/grids/90x180_SCRIP.20150901.nc --rgr lat_nbr=90 --rgr lon_nbr=180 --rgr lat_typ=eqa --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr grid=${DATA}/grids/180x360_SCRIP.20150901.nc --rgr latlon=180,360 --rgr lat_typ=eqa --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 90x180' --rgr grid=${DATA}/grids/90x180_SCRIP.20150901.nc --rgr latlon=90,180 --rgr lat_typ=eqa --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
 
      Generate maps for global RLL grids:
      ESMF_RegridWeightGen -s ${DATA}/grids/180x360_SCRIP.20150901.nc -d ${DATA}/grids/90x180_SCRIP.20150901.nc -w ${DATA}/maps/map_180x360_to_90x180.20150901.nc --method conserve
      ESMF_RegridWeightGen -s ${DATA}/grids/90x180_SCRIP.20150901.nc -d ${DATA}/grids/180x360_SCRIP.20150901.nc -w ${DATA}/maps/map_90x180_to_180x360.20150901.nc --method conserve
 
      Generate ACME grids:
-     ncks -O -D 1 --rgr grd_ttl='FV-scalar grid 129x256' --rgr grid=${DATA}/grids/129x256_SCRIP.20150910.nc --rgr lat_nbr=129 --rgr lon_nbr=256 --rgr lat_typ=cap --rgr lon_typ=Grn_ctr  ~/nco/data/in.nc ~/foo.nc
-     ncks -O -D 1 --rgr grd_ttl='FV-scalar grid 257x512' --rgr grid=${DATA}/grids/257x512_SCRIP.20150910.nc --rgr lat_nbr=257 --rgr lon_nbr=512 --rgr lat_typ=cap --rgr lon_typ=Grn_ctr  ~/nco/data/in.nc ~/foo.nc
-     ncks -O -D 1 --rgr grd_ttl='FV-scalar grid 801x1600' --rgr grid=${DATA}/grids/801x1600_SCRIP.20150910.nc --rgr lat_nbr=801 --rgr lon_nbr=1600 --rgr lat_typ=cap --rgr lon_typ=Grn_ctr  ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='FV-scalar grid 129x256' --rgr grid=${DATA}/grids/129x256_SCRIP.20150910.nc --rgr latlon=129,256 --rgr lat_typ=cap --rgr lon_typ=Grn_ctr  ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='FV-scalar grid 257x512' --rgr grid=${DATA}/grids/257x512_SCRIP.20150910.nc --rgr latlon=257,512 --rgr lat_typ=cap --rgr lon_typ=Grn_ctr  ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='FV-scalar grid 801x1600' --rgr grid=${DATA}/grids/801x1600_SCRIP.20150910.nc --rgr latlon=801,1600 --rgr lat_typ=cap --rgr lon_typ=Grn_ctr  ~/nco/data/in.nc ~/foo.nc
 
      Generate ACME maps:
      ESMF_RegridWeightGen -s ${DATA}/grids/ne30np4_pentagons.091226.nc -d ${DATA}/grids/129x256_SCRIP.20150910.nc -w ${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150910.nc --method conserve
@@ -3432,13 +3489,13 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
      ESMF_RegridWeightGen -s ${DATA}/grids/ne120np4_pentagons.100310.nc -d ${DATA}/grids/801x1600_SCRIP.20150910.nc -w ${DATA}/maps/map_ne120np4_to_fv801x1600_bilin.20150910.nc --method bilinear
 
      Generate regional RLL grids:
-     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr grid=${DATA}/sld/rgr/grd_dst.nc --rgr lat_nbr=100 --rgr lon_nbr=100 --rgr snwe=30.0,70.0,-120.0,-90.0 ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr grid=${DATA}/sld/rgr/grd_dst.nc --rgr latlon=100,100 --rgr snwe=30.0,70.0,-120.0,-90.0 ~/nco/data/in.nc ~/foo.nc
 
      Generate global RLL skeleton:
-     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr skl=${DATA}/sld/rgr/skl_180x360.nc --rgr grid=${DATA}/grids/180x360_SCRIP.20150901.nc --rgr lat_nbr=180 --rgr lon_nbr=360 --rgr lat_typ=eqa --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr skl=${DATA}/sld/rgr/skl_180x360.nc --rgr grid=${DATA}/grids/180x360_SCRIP.20150901.nc --rgr latlon=180,360 --rgr lat_typ=eqa --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
 
      Generate curvilinear grids:
-     ncks -O -D 1 --rgr grd_ttl='Curvilinear grid 10x20' --rgr lon_crv=1.0 --rgr grid=${DATA}/sld/rgr/grd_crv.nc --rgr lat_nbr=10 --rgr lon_nbr=20 --rgr snwe=-5.0,5.0,-10.0,10.0 ~/nco/data/in.nc ~/foo.nc */
+     ncks -O -D 1 --rgr grd_ttl='Curvilinear grid 10x20' --rgr lon_crv=1.0 --rgr grid=${DATA}/sld/rgr/grd_crv.nc --rgr latlon=10,20 --rgr snwe=-5.0,5.0,-10.0,10.0 ~/nco/data/in.nc ~/foo.nc */
 
   const char fnc_nm[]="nco_grd_mk()"; /* [sng] Function name */
 
@@ -4107,13 +4164,15 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
     int lon_bnd_id; /* [id] Variable ID for lon_bnds/lon_vertices */
     int lon_id; /* [id] Variable ID for longitude */
     
-    /* Name output dimensions */
+    /* Use explicitly specified output names, if any, otherwise use input names (either explicitly specified or discovered by fuzzing) */
+    if(rgr->lat_nm_out) lat_nm_out=rgr->lat_nm_out; else lat_nm_out=(char *)strdup("lat");
+    if(rgr->lon_nm_out) lon_nm_out=rgr->lon_nm_out; else lon_nm_out=(char *)strdup("lon");
+    if(rgr->col_nm_out) col_nm_out=rgr->col_nm_out; else col_nm_out=(char *)strdup("ncol");
+
+  /* Name output dimensions */
     area_nm=rgr->area_nm;
     bnd_nm=rgr->bnd_nm;
     //bnd_tm_nm=rgr->bnd_tm_nm;
-    col_nm_out=rgr->col_nm_out;
-    lat_nm_out=rgr->lat_nm_out;
-    lon_nm_out=rgr->lon_nm_out;
     lat_bnd_nm=rgr->lat_bnd_nm;
     lat_wgt_nm=rgr->lat_wgt_nm;
     lon_bnd_nm=rgr->lon_bnd_nm;
@@ -4444,7 +4503,9 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   double lat_ncr; /* [dgr] Latitude increment */
   double lon_spn; /* [dgr] Longitude span */
   double lat_spn; /* [dgr] Latitude span */
-
+  double mss_val_ctr_dbl;
+  double mss_val_msk_dbl;
+  
   int *msk=NULL; /* [flg] Mask of grid */
   int *dmn_sz_int; /* [nbr] Array of dimension sizes of grid */
 
@@ -4481,17 +4542,19 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 
   long bnd_idx;
   long bnd_nbr; /* [nbr] Number of bounds in gridcell */
+  long col_nbr; /* [nbr] Number of columns in grid */
+  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_sz_nbr; /* [nbr] Number of gridcells in grid */
-  long idx; /* [idx] Counting index for unrolled grids */
   long idx2; /* [idx] Counting index for unrolled grids */
+  long idx; /* [idx] Counting index for unrolled grids */
+  long idx_ctr;
   long lat_idx2; /* [idx] Counting index for unrolled latitude */
-  long lon_idx2; /* [idx] Counting index for unrolled longitude */
-  long crn_idx; /* [idx] Counting index for corners */
   long lat_idx;
   long lat_nbr; /* [nbr] Number of latitudes in grid */
+  long lon_idx2; /* [idx] Counting index for unrolled longitude */
   long lon_idx;
   long lon_nbr; /* [nbr] Number of longitudes in grid */
   
@@ -4502,13 +4565,21 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   nco_bool RAM_OPEN=False; /* [flg] Open (netCDF3-only) file(s) in RAM */
   nco_bool RM_RMT_FL_PST_PRC=True; /* Option R */
   nco_bool WRT_TMP_FL=False; /* [flg] Write output to temporary file */
+  nco_bool flg_grd_1D=False;
   nco_bool flg_grd_2D=False;
   nco_bool flg_grd_crv=False;
+  nco_bool flg_wrt_crn=True;
+  nco_bool has_mss_val_ctr;
+  nco_bool has_mss_val_msk;
 
   nco_grd_2D_typ_enm grd_typ; /* [enm] Grid-type enum */
   nco_grd_lat_typ_enm lat_typ; /* [enm] Latitude grid-type enum */
   nco_grd_lon_typ_enm lon_typ; /* [enm] Longitude grid-type enum */
 
+  nc_type msk_typ;
+
+  ptr_unn msk_unn;
+
   size_t bfr_sz_hnt=NC_SIZEHINT_DEFAULT; /* [B] Buffer size hint */
 
   /* Algorithm:
@@ -4528,17 +4599,25 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 
   /* Identify grid-related variables, usually latitude and longitude */
   char *bnd_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as bounds */
+  char *col_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as column */
   char *lat_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as latitude */
   char *lon_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as longitude */
   char *lat_nm_in=NULL_CEWI; /* [sng] Name of variable to recognize as latitude */
   char *lon_nm_in=NULL_CEWI; /* [sng] Name of variable to recognize as longitude */
   char *lat_bnd_nm=NULL_CEWI; /* [sng] Name of latitude  boundary variable */
   char *lon_bnd_nm=NULL_CEWI; /* [sng] Name of longitude boundary variable */
-  int dmn_id_bnd=NC_MIN_INT; /* [id] Dimension ID */
+  int dmn_id_bnd=NC_MIN_INT; /* [id] Dimension ID for spatial bounds */
+  int dmn_id_col=NC_MIN_INT; /* [id] Dimension ID for unstructured grids */
   int dmn_id_lat; /* [id] Dimension ID */
   int dmn_id_lon; /* [id] Dimension ID */
 
-  /* Locate dimensions that must be present */
+  /* Locate dimensions that must be present in unstructured files */
+  if((rcd=nco_inq_dimid_flg(in_id,"ncol",&dmn_id_col)) == NC_NOERR) col_dmn_nm=strdup("ncol"); 
+  else if((rcd=nco_inq_dimid_flg(in_id,"lndgrid",&dmn_id_col)) == NC_NOERR) col_dmn_nm=strdup("lndgrid");
+  else if((rcd=nco_inq_dimid_flg(in_id,"nCells",&dmn_id_col)) == NC_NOERR) col_dmn_nm=strdup("nCells");
+  if(col_dmn_nm) flg_grd_1D=True;
+
+  /* Locate dimensions that must be present in rectangular files */
   if((rcd=nco_inq_dimid_flg(in_id,"latitude",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("latitude");
   else if((rcd=nco_inq_dimid_flg(in_id,"lat",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("lat");
   else if((rcd=nco_inq_dimid_flg(in_id,"Latitude",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("Latitude");
@@ -4548,39 +4627,52 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   else if((rcd=nco_inq_dimid_flg(in_id,"lon",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("lon");
   else if((rcd=nco_inq_dimid_flg(in_id,"Longitude",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("Longitude");
   else if((rcd=nco_inq_dimid_flg(in_id,"Lon",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("Lon");
+  if(lat_dmn_nm && lon_dmn_nm) flg_grd_2D=True;
 
-  /* Try known curvilinear dimension names */
+  /* Try known curvilinear dimension names for latitude and longitude */
   if(!lat_dmn_nm || !lon_dmn_nm){
     if(!lat_dmn_nm){
       if((rcd=nco_inq_dimid_flg(in_id,"south_north",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("south_north"); /* WRF */
       else if((rcd=nco_inq_dimid_flg(in_id,"YDim:location",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("YDim:location"); /* AIRS L3 */
+      else if((rcd=nco_inq_dimid_flg(in_id,"nTimes",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("nTimes"); /* OMI L2 */
       else if((rcd=nco_inq_dimid_flg(in_id,"GeoTrack",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("GeoTrack"); /* AIRS L2 DAP NC */
-      else if((rcd=nco_inq_dimid_flg(in_id,"GeoTrack :L2_Standard_atmospheric&surface_product",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("GeoTrack:L2_Standard_atmospheric&surface_product"); /* AIRS L2 HDF */
+      else if((rcd=nco_inq_dimid_flg(in_id,"GeoTrack:L2_Standard_atmospheric&surface_product",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("GeoTrack:L2_Standard_atmospheric&surface_product"); /* AIRS L2 HDF */
+      else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Along_Swath:mod04",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("Cell_Along_Swath:mod04"); /* MODIS L2 */
       else if((rcd=nco_inq_dimid_flg(in_id,"phony_dim_0",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("phony_dim_0"); /* OMI */
       else if((rcd=nco_inq_dimid_flg(in_id,"y",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("phony_dim_0"); /* MAR */
       else if((rcd=nco_inq_dimid_flg(in_id,"lat2d",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("phony_dim_0"); /* RACMO */
+      else if((rcd=nco_inq_dimid_flg(in_id,"nj",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("nj"); /* CICE */
+      else if((rcd=nco_inq_dimid_flg(in_id,"nlat",&dmn_id_lat)) == NC_NOERR) lat_dmn_nm=strdup("nlat"); /* POP */
     } /* !lat_dmn_nm */
     if(!lon_dmn_nm){
       if((rcd=nco_inq_dimid_flg(in_id,"west_east",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("west_east"); /* WRF */
       else if((rcd=nco_inq_dimid_flg(in_id,"XDim:location",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("XDim:location"); /* AIRS L3 */
+      else if((rcd=nco_inq_dimid_flg(in_id,"nXtrack",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("nXtrack"); /* OMI L2 */
       else if((rcd=nco_inq_dimid_flg(in_id,"GeoXTrack",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("GeoXTrack"); /* AIRS L2 DAP NC */
-      else if((rcd=nco_inq_dimid_flg(in_id,"GeoXTrack:L2_Standard_atmospheric&surface_product",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("GeoXTrack:L2_Standard_atmospheric&surface_product"); /* AIRS L2 */
+      else if((rcd=nco_inq_dimid_flg(in_id,"GeoXTrack:L2_Standard_atmospheric&surface_product",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("GeoXTrack:L2_Standard_atmospheric&surface_product"); /* AIRS L2 HDF */
+      else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Across_Swath:mod04",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("Cell_Across_Swath:mod04"); /* MODIS L2 */
       else if((rcd=nco_inq_dimid_flg(in_id,"phony_dim_1",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("phony_dim_1"); /* OMI */
       else if((rcd=nco_inq_dimid_flg(in_id,"x",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("phony_dim_1"); /* MAR */
       else if((rcd=nco_inq_dimid_flg(in_id,"lon2d",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("phony_dim_1"); /* RACMO */
+      else if((rcd=nco_inq_dimid_flg(in_id,"ni",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("ni"); /* CICE */
+      else if((rcd=nco_inq_dimid_flg(in_id,"nlon",&dmn_id_lon)) == NC_NOERR) lon_dmn_nm=strdup("nlon"); /* POP */
     } /* !lon_dmn_nm */
     if(lat_dmn_nm && lon_dmn_nm) flg_grd_crv=True;
   } /* !lat_dmn_nm */
 
-  if(!lat_dmn_nm || !lon_dmn_nm){
-    (void)fprintf(stdout,"%s: ERROR %s unable to identify latitude and/or longitude dimension.\n",nco_prg_nm_get(),fnc_nm);
+  if(!(lat_dmn_nm && lon_dmn_nm) && !col_dmn_nm){
+    (void)fprintf(stdout,"%s: ERROR %s unable to identify latitude and/or longitude dimension and/or column dimension.\n",nco_prg_nm_get(),fnc_nm);
     nco_exit(EXIT_FAILURE);
-  } /* !lat_dmn_nm */
+  } /* !col_dmn_nm !lat_dmn_nm !lon_dmn_nm */
     
-  /* Locate dimensions that may be present */
+  /* Locate spatial dimensions that may be present
+     NB: bounds dimensions may present a special problem
+     CAM-FV and CAM-SE use nbnd for temporal bounds and have no spatial bounds dimension
+     CAM3 uses tbnd for temporal bounds and has no spatial bounds dimension
+     CICE and POP use d2 for temporal bounds, and CICE uses nvertices for spatial bounds while POP uses nothing
+     Hence search for nvertices before nbnd to ensure spatial bound is found first */
   if((rcd=nco_inq_dimid_flg(in_id,"nv",&dmn_id_bnd)) == NC_NOERR) bnd_dmn_nm=strdup("nv"); /* fxm */
-  else if((rcd=nco_inq_dimid_flg(in_id,"nbnd",&dmn_id_bnd)) == NC_NOERR) bnd_dmn_nm=strdup("nbnd"); /* CAM-FV, CAM-SE */
-  else if((rcd=nco_inq_dimid_flg(in_id,"tbnd",&dmn_id_bnd)) == NC_NOERR) bnd_dmn_nm=strdup("tbnd"); /* CAM3 */
+  else if((rcd=nco_inq_dimid_flg(in_id,"nvertices",&dmn_id_bnd)) == NC_NOERR) bnd_dmn_nm=strdup("nvertices"); /* CICE */
   
   /* Locate fields that must be present in input file */
   if((rcd=nco_inq_varid_flg(in_id,"latitude",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("latitude");
@@ -4588,51 +4680,75 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   else if((rcd=nco_inq_varid_flg(in_id,"lat",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("lat"); /* CAM */
   else if((rcd=nco_inq_varid_flg(in_id,"Lat",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("Lat");
   else if((rcd=nco_inq_varid_flg(in_id,"XLAT",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("XLAT"); /* WRF */
+  else if((rcd=nco_inq_varid_flg(in_id,"XLAT_M",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("XLAT_M"); /* Unknown */
   else if((rcd=nco_inq_varid_flg(in_id,"LAT",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("LAT"); /* MAR */
+  else if((rcd=nco_inq_varid_flg(in_id,"TLAT",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("TLAT"); /* CICE, POP */
+  else if((rcd=nco_inq_varid_flg(in_id,"ULAT",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("ULAT"); /* CICE, POP */
+  else if((rcd=nco_inq_varid_flg(in_id,"latCell",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("latCell"); /* MPAS-O/I */
 
   if((rcd=nco_inq_varid_flg(in_id,"longitude",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("longitude");
   else if((rcd=nco_inq_varid_flg(in_id,"Longitude",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("Longitude");
   else if((rcd=nco_inq_varid_flg(in_id,"lon",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("lon"); /* CAM */
   else if((rcd=nco_inq_varid_flg(in_id,"Lon",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("Lon");
   else if((rcd=nco_inq_varid_flg(in_id,"XLONG",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("XLONG"); /* WRF */
+  else if((rcd=nco_inq_varid_flg(in_id,"XLONG_M",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("XLONG_M"); /* Unknown */
   else if((rcd=nco_inq_varid_flg(in_id,"LON",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("LON"); /* MAR */
+  else if((rcd=nco_inq_varid_flg(in_id,"TLON",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("TLON"); /* CICE */
+  else if((rcd=nco_inq_varid_flg(in_id,"TLONG",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("TLONG"); /* POP */
+  else if((rcd=nco_inq_varid_flg(in_id,"ULON",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("ULON"); /* CICE */
+  else if((rcd=nco_inq_varid_flg(in_id,"ULONG",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("ULONG"); /* POP */
+  else if((rcd=nco_inq_varid_flg(in_id,"lonCell",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("lonCell"); /* MPAS-O/I */
 
   if(!lat_nm_in || !lon_nm_in){
     (void)fprintf(stdout,"%s: ERROR %s unable to identify latitude and/or longitude variable.\n",nco_prg_nm_get(),fnc_nm);
     nco_exit(EXIT_FAILURE);
   } /* !lat_nm_in */
     
-  /* Use dimension IDs to get dimension sizes and grid size*/
-  rcd+=nco_inq_dimlen(in_id,dmn_id_lat,&lat_nbr);
-  rcd+=nco_inq_dimlen(in_id,dmn_id_lon,&lon_nbr);
+  /* Use dimension IDs to get dimension sizes and grid size */
+  if(flg_grd_1D){
+    rcd+=nco_inq_dimlen(in_id,dmn_id_col,&col_nbr);
+    lat_nbr=lon_nbr=col_nbr;
+  }else{
+    rcd+=nco_inq_dimlen(in_id,dmn_id_lat,&lat_nbr);
+    rcd+=nco_inq_dimlen(in_id,dmn_id_lon,&lon_nbr);
+    col_nbr=NC_MIN_INT;
+  } /* !flg_grd_1D */
   if(dmn_id_bnd != NC_MIN_INT) rcd+=nco_inq_dimlen(in_id,dmn_id_bnd,&grd_crn_nbr);
   if(dmn_id_bnd != NC_MIN_INT) rcd+=nco_inq_dimlen(in_id,dmn_id_bnd,&bnd_nbr);
-    
+  
   /* Rank of coordinates determines whether grid is curvilinear */
   rcd+=nco_inq_varndims(in_id,lat_ctr_id,&lat_rnk);
   rcd+=nco_inq_varndims(in_id,lon_ctr_id,&lon_rnk);
-  if(lat_rnk == dmn_nbr_2D || lon_rnk == dmn_nbr_2D) flg_grd_crv=True;
+  if(lat_rnk == dmn_nbr_2D || lon_rnk == dmn_nbr_2D){
+    flg_grd_crv=True;
+    flg_grd_2D=False;
+  } /* !lat_rnk */
   if(lat_rnk > dmn_nbr_2D || lon_rnk > dmn_nbr_2D){
-    (void)fprintf(stdout,"%s: ERROR %s reports an identified grid variable (%s and/or %s) has rank %d---grid variables current must have rank 1 or 2. HINT: If grid variables do not vary in time, then temporally average them (with, e.g., ncwa -a time in.nc out.nc) prior to inferring grid\n",nco_prg_nm_get(),fnc_nm,lat_nm_in,lon_nm_in,lat_rnk);
+    (void)fprintf(stdout,"%s: ERROR %s reports an identified grid variable (%s and/or %s) has rank %d---grid variables currently must have rank 1 or 2. HINT: If grid variables do not vary in time, then temporally average them (with, e.g., ncwa -a time in.nc out.nc) prior to inferring grid\n",nco_prg_nm_get(),fnc_nm,lat_nm_in,lon_nm_in,lat_rnk);
     nco_exit(EXIT_FAILURE);
   } /* !3D */
   if(lat_rnk*lon_rnk != 1 && lat_rnk*lon_rnk != 4) assert(False);
   
-  if(flg_grd_crv){
-    /* Assume curvilinear grid (e.g., WRF) */
-    flg_grd_2D=False;
-    grd_rnk_nbr=dmn_nbr_2D;
+  if(flg_grd_1D){
+    /* Unstructured grid (e.g., CAM-SE) */
+    grd_rnk_nbr=dmn_nbr_1D;
     grd_typ=nco_grd_2D_unk;
     lat_typ=nco_grd_lat_unk;
     lon_typ=nco_grd_lon_unk;
-    /* Assume curvilinear grids that do not specify otherwise use quadrilaterals */
-    if(dmn_id_bnd == NC_MIN_INT) grd_crn_nbr=4;
-    /* Assume quadrilaterals are, well, quadrilaterals (e.g., rhomboids) not necessarily rectangles
-       Non-quadrilateral curvilinear grids are untested */
-    if(grd_crn_nbr == 4) bnd_nbr=4; else assert(False);
-  }else{
+    /* 1D grids without their own boundaries are at the mercy of the weight generator */
+    if(dmn_id_bnd == NC_MIN_INT){
+      (void)fprintf(stdout,"%s: WARNING %s reports an unstructured grid without spatial boundary information. NCO can copy but not infer spatial boundaries from unstructured grids. Thus NCO will not write spatial bounds to the gridfile inferred from this input file. Instead, the weight generator that ingests this gridfile must generate weights for gridcells with unknown spatial extent. This is feasible for grids and mappings where weights masquerade as areas and are determined by underly [...]
+      flg_wrt_crn=False;
+      /* Input could actually be from grid with no polygonal definition, e.g., CAM-SE 
+	 Corner number is non-deterministic since, e.g., CAM-SE dual grid can be fit to quadrilaterals, pentagons, chevrons, etc.
+	 Bounds will not be diagnosed so safe to set grd_crn_nbr to harmless (though weird) value like 4
+	 However, ERWG requires presence of valid corner dimension "grid_corners" and arrays in input SCRIP file 
+	 So ERWG will break when reading this SCRIP file regardless of whether it contains arrays (with bogus values) 
+	 By default do not write grid corner values */
+      grd_crn_nbr=4;
+    } /* !dmn_id_bnd */
+  }else if(flg_grd_2D){ /* !flg_grd_1D */
     /* Assume 2D grid of uninitialized type */
-    flg_grd_2D=True;
     grd_rnk_nbr=dmn_nbr_2D;
     grd_typ=nco_grd_2D_nil;
     lat_typ=nco_grd_lat_nil;
@@ -4641,26 +4757,38 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     if(dmn_id_bnd == NC_MIN_INT) grd_crn_nbr=4;
     /* Convention is to archive only two bounds for rectangular grids (since sides are identical)
        Non-quadrilateral rectangular grids are untested */
-    if(grd_crn_nbr == 4) bnd_nbr=2; else assert(False);
-    } /* !flg_grd_2D */
-    
+    if(grd_crn_nbr == 4) bnd_nbr=2;
+  }else if(flg_grd_crv){ /* !flg_grd_2D */
+    /* Assume curvilinear grid (e.g., WRF) */
+    flg_grd_2D=False;
+    grd_rnk_nbr=dmn_nbr_2D;
+    grd_typ=nco_grd_2D_unk;
+    lat_typ=nco_grd_lat_unk;
+    lon_typ=nco_grd_lon_unk;
+    /* Assume curvilinear grids that do not specify otherwise use quadrilaterals */
+    if(dmn_id_bnd == NC_MIN_INT) grd_crn_nbr=4;
+    /* Assume quadrilaterals are, well, quadrilaterals (e.g., rhomboids) not necessarily rectangles
+       Non-quadrilateral curvilinear grids are untested */
+    if(grd_crn_nbr == 4) bnd_nbr=4; else assert(False);
+  } /* !flg_grd_crv */
+
   /* Allocate space for output data */
-  grd_sz_nbr=lat_nbr*lon_nbr;
+  if(flg_grd_1D) grd_sz_nbr=col_nbr; else grd_sz_nbr=lat_nbr*lon_nbr;
   dmn_sz_int=(int *)nco_malloc(grd_rnk_nbr*nco_typ_lng((nc_type)NC_INT));
   area=(double *)nco_malloc(grd_sz_nbr*nco_typ_lng(crd_typ));
   msk=(int *)nco_malloc(grd_sz_nbr*nco_typ_lng((nc_type)NC_INT));
   
-  if(flg_grd_crv){
-    lat_bnd=(double *)nco_malloc(lat_nbr*bnd_nbr*nco_typ_lng(crd_typ));
+  if(flg_grd_1D){
+    lat_bnd=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
     lat_crn=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
     lat_ctr=(double *)nco_malloc(grd_sz_nbr*nco_typ_lng(crd_typ));
     lat_ntf=(double *)nco_malloc((lat_nbr+1L)*nco_typ_lng(crd_typ));
     lat_wgt=(double *)nco_malloc(lat_nbr*nco_typ_lng(crd_typ));
-    lon_bnd=(double *)nco_malloc(lon_nbr*bnd_nbr*nco_typ_lng(crd_typ));
+    lon_bnd=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
     lon_crn=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
     lon_ctr=(double *)nco_malloc(grd_sz_nbr*nco_typ_lng(crd_typ));
     lon_ntf=(double *)nco_malloc((lon_nbr+1L)*nco_typ_lng(crd_typ));
-  }else{ /* !flg_grd_crv */
+  }else if(flg_grd_2D){ /* !flg_grd_1D */
     lat_bnd=(double *)nco_malloc(lat_nbr*bnd_nbr*nco_typ_lng(crd_typ));
     lat_crn=(double *)nco_malloc(lat_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
     lat_ctr=(double *)nco_malloc(lat_nbr*nco_typ_lng(crd_typ));
@@ -4670,6 +4798,16 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     lon_crn=(double *)nco_malloc(lon_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
     lon_ctr=(double *)nco_malloc(lon_nbr*nco_typ_lng(crd_typ));
     lon_ntf=(double *)nco_malloc((lon_nbr+1L)*nco_typ_lng(crd_typ));
+  }else if(flg_grd_crv){ /* !flg_grd_2D */
+    lat_bnd=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
+    lat_crn=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
+    lat_ctr=(double *)nco_malloc(grd_sz_nbr*nco_typ_lng(crd_typ));
+    lat_ntf=(double *)nco_malloc((lat_nbr+1L)*nco_typ_lng(crd_typ));
+    lat_wgt=(double *)nco_malloc(lat_nbr*nco_typ_lng(crd_typ));
+    lon_bnd=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
+    lon_crn=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
+    lon_ctr=(double *)nco_malloc(grd_sz_nbr*nco_typ_lng(crd_typ));
+    lon_ntf=(double *)nco_malloc((lon_nbr+1L)*nco_typ_lng(crd_typ));
   } /* !flg_grd_crv */
   
   grd_ctr_lat=(double *)nco_malloc(grd_sz_nbr*nco_typ_lng(crd_typ));
@@ -4679,28 +4817,77 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   
   /* Locate fields that may be present in input file */
   if((rcd=nco_inq_varid_flg(in_id,"lat_bnds",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("lat_bnds");
+  else if((rcd=nco_inq_varid_flg(in_id,"latt_bounds",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("latt_bounds");
+  else if((rcd=nco_inq_varid_flg(in_id,"latu_bounds",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("latu_bounds");
   else if((rcd=nco_inq_varid_flg(in_id,"lat_ntf",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("lat_ntf");
+  else if((rcd=nco_inq_varid_flg(in_id,"lat_vertices",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("lat_vertices");
   if((rcd=nco_inq_varid_flg(in_id,"lon_bnds",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lon_bnds");
+  else if((rcd=nco_inq_varid_flg(in_id,"lont_bounds",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lont_bounds");
+  else if((rcd=nco_inq_varid_flg(in_id,"lonu_bounds",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lonu_bounds");
   else if((rcd=nco_inq_varid_flg(in_id,"lon_ntf",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lon_ntf");
+  else if((rcd=nco_inq_varid_flg(in_id,"lon_vertices",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lon_vertices");
 
   if((rcd=nco_inq_varid_flg(in_id,"area",&area_id)) == NC_NOERR) area_nm_in=strdup("area");
   else if((rcd=nco_inq_varid_flg(in_id,"Area",&area_id)) == NC_NOERR) area_nm_in=strdup("Area");
+  else if((rcd=nco_inq_varid_flg(in_id,"areaCell",&area_id)) == NC_NOERR) area_nm_in=strdup("areaCell"); /* MPAS-O/I */
   else if((rcd=nco_inq_varid_flg(in_id,"grid_area",&area_id)) == NC_NOERR) area_nm_in=strdup("grid_area");
+  else if((rcd=nco_inq_varid_flg(in_id,"tarea",&area_id)) == NC_NOERR) area_nm_in=strdup("tarea"); /* CICE */
+  else if((rcd=nco_inq_varid_flg(in_id,"uarea",&area_id)) == NC_NOERR) area_nm_in=strdup("uarea"); /* CICE */
   if((rcd=nco_inq_varid_flg(in_id,"mask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("mask");
   else if((rcd=nco_inq_varid_flg(in_id,"Mask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("Mask");
   else if((rcd=nco_inq_varid_flg(in_id,"grid_imask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("grid_imask");
+  else if((rcd=nco_inq_varid_flg(in_id,"tmask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("tmask"); /* CICE */
+
+  /* Mask field requires special handling for non-conformant models */
+  if(msk_id != NC_MIN_INT){
+    /* 20151201: All models tested define mask as NC_INT except CICE which uses NC_FLOAT */
+    rcd=nco_inq_vartype(in_id,msk_id,&msk_typ);
+    msk_unn.vp=(void *)nco_malloc(grd_sz_nbr*nco_typ_lng(msk_typ));
+  } /* !msk */
+
+  if(flg_grd_1D){
+    /* Obtain fields that must be present in unstructured input file */
+    dmn_srt[0]=0L;
+    dmn_cnt[0]=col_nbr;
+    rcd=nco_get_vara(in_id,lat_ctr_id,dmn_srt,dmn_cnt,lat_ctr,crd_typ);
+    rcd=nco_get_vara(in_id,lon_ctr_id,dmn_srt,dmn_cnt,lon_ctr,crd_typ);
+
+    /* Obtain fields that may be present in unstructured input file */
+    if(area_id != NC_MIN_INT) rcd=nco_get_vara(in_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
+    if(msk_id != NC_MIN_INT)  rcd=nco_get_vara(in_id,msk_id,dmn_srt,dmn_cnt,msk_unn.vp,msk_typ);
+    dmn_srt[0]=dmn_srt[1]=0L;
+    dmn_cnt[0]=col_nbr;
+    dmn_cnt[1]=grd_crn_nbr;
+    if(lat_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lat_bnd_id,dmn_srt,dmn_cnt,lat_crn,crd_typ);
+    if(lon_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lon_bnd_id,dmn_srt,dmn_cnt,lon_crn,crd_typ);
+  } /* !flg_grd_1D */
 
   if(flg_grd_crv){
-    /* Obtain fields that must be present in input file */
+    /* Obtain fields that must be present in curvilinear input file */
     dmn_srt[0]=dmn_srt[1]=0L;
     dmn_cnt[0]=lat_nbr;
     dmn_cnt[1]=lon_nbr;
     rcd=nco_get_vara(in_id,lat_ctr_id,dmn_srt,dmn_cnt,lat_ctr,crd_typ);
     rcd=nco_get_vara(in_id,lon_ctr_id,dmn_srt,dmn_cnt,lon_ctr,crd_typ);
+    /* CICE lists missing value for lat/lon_ctr arrays (TLAT, TLONG) and re-uses that for bounds arrays */
+    has_mss_val_ctr=nco_mss_val_get_dbl(in_id,lat_ctr_id,&mss_val_ctr_dbl);
 
-    /* 20150923: fxm also input corners, area, mask, if present in curvilinear file */
+    /* 20150923: Also input, if present in curvilinear file, corners, area, and mask
+       area and mask are same size as lat and lon */
     if(area_id != NC_MIN_INT) rcd=nco_get_vara(in_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
-    
+    if(msk_id != NC_MIN_INT){
+      rcd=nco_get_vara(in_id,msk_id,dmn_srt,dmn_cnt,msk_unn.vp,msk_typ);
+      has_mss_val_msk=nco_mss_val_get_dbl(in_id,msk_id,&mss_val_msk_dbl);
+    } /* !msk */
+    /* Corners are on curvilinear corner grid
+       Rectangular boundaries (i.e., lat_bnd=[lat_nbr,2]) DNE for curvilinear grids 
+       Read-in *_crn arrays in curvilinear grids, and *_bnd arrays for rectilinear grids */
+    dmn_srt[0]=dmn_srt[1]=dmn_srt[2]=0L;
+    dmn_cnt[0]=lat_nbr;
+    dmn_cnt[1]=lon_nbr;
+    dmn_cnt[2]=grd_crn_nbr;
+    if(lat_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lat_bnd_id,dmn_srt,dmn_cnt,lat_crn,crd_typ);
+    if(lon_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lon_bnd_id,dmn_srt,dmn_cnt,lon_crn,crd_typ);
   } /* !flg_grd_crv */
 
   if(flg_grd_2D){
@@ -4730,7 +4917,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	} /* !lat */
 	if(!strcmp(dmn_nm,lon_dmn_nm)){
 	  assert(dmn_sz == lon_nbr);
-	  assert(dmn_idx == 0);
+	  assert(dmn_idx == 1);
 	  lon_psn_in=dmn_idx;
 	} /* !lon */
       } /* !dmn_idx */
@@ -4748,11 +4935,21 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       dmn_cnt[lat_psn_in]=lat_nbr;
       dmn_srt[lon_psn_in]=0L;
       dmn_cnt[lon_psn_in]=lon_nbr;
-      rcd=nco_get_vara(in_id,msk_id,dmn_srt,dmn_cnt,msk,NC_INT);
+      rcd=nco_get_vara(in_id,msk_id,dmn_srt,dmn_cnt,msk_unn.vp,msk_typ);
     } /* !msk */
 
+    /* Rectangular boundaries are on "abbreviated" bounds grid (two bounds per center)
+       Read-in *_crn arrays for 1D and curvilinear grids, and *_bnd arrays for rectilinear grids */
+    dmn_srt[0]=dmn_srt[1]=0L;
+    dmn_cnt[0]=lat_nbr;
+    dmn_cnt[1]=bnd_nbr;
+    if(lat_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lat_bnd_id,dmn_srt,dmn_cnt,lat_bnd,crd_typ);
+    dmn_srt[0]=dmn_srt[1]=0L;
+    dmn_cnt[0]=lon_nbr;
+    dmn_cnt[1]=bnd_nbr;
+    if(lon_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lon_bnd_id,dmn_srt,dmn_cnt,lon_bnd,crd_typ);
   } /* !flg_grd_2D */
-    
+
   /* Close input netCDF file */
   nco_close(in_id);
 
@@ -4766,182 +4963,234 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   /* Define output 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 */
-  if(grd_rnk_nbr == dmn_nbr_2D){
-    lon_psn=0; /* SCRIP introduced [lon,lat] convention because more natural for Fortran */
+  if(grd_rnk_nbr == dmn_nbr_1D){
+    dmn_sz_int[0]=col_nbr;
+  }else if(grd_rnk_nbr == dmn_nbr_2D){ /* !dmn_nbr_1D */
+    /* SCRIP introduced [lon,lat] convention because more natural for Fortran 
+       NB: I think this [lon,lat] convention applies only to grid_dims variable 
+       All other SCRIP variables seem to be written as [lat,lon] (fxm: verify) */
+    lon_psn=0;
     lat_psn=1;
-  } /* !flg_grd_in_2D */
-  dmn_sz_int[lon_psn]=lon_nbr;
-  dmn_sz_int[lat_psn]=lat_nbr;
+    dmn_sz_int[lon_psn]=lon_nbr;
+    dmn_sz_int[lat_psn]=lat_nbr;
+  } /* !dmn_nbr_2D */
 
   if(flg_grd_crv){
-    /* Interfaces (ntf) and boundaries (bnd) for curvilinear grids are ill-defined since sides need not follow latitudes nor meridians 
-       Simplest representation that contains equivalent information to interfaces/boundaries is grid corners array
-       Diagnose grid corners from midpoints
-       Most curvilinear data (e.g., WRF) is dimensioned lat x lon unlike SCRIP which uses lon x lat 
-       Hence we keep lat_ctr, lon_ctr, lat_crn, lon_crn with same order (likely lat x lon) as data file from which we infer grid
-       Always use input order to write skeleton file
-       Change that order, if necessary, to write SCRIP grid file
-       In the interior of a curvilinear grid, nine points contribute to the four corners of a quadrilater surrounding each center point
-       These are the three points above the point, the three points at the same latitude, and the three points beneath the point
-       In other words, a nine-point stencil is required to define the four corners inferred from about each gridcell center
-       It is cleanest to use this stencil only once for all cells, including those on the edges, not the interior
-       For this to work we must define an enlarged grid where we pre-copy the values that to the desired extrapolation at the edges
-       Inspired by array-based solutions to integration of PDEs on meshes in Juri Toomre's class */
-    for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
-      for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
-	idx=lat_idx*lon_nbr+lon_idx;
-	grd_ctr_lat[idx]=lat_ctr[idx];
-	grd_ctr_lon[idx]=lon_ctr[idx];
-      } /* !lon */
-    } /* !lat */
-    double *lat_ctr_fk; /* [dgr] Latitude  grid with extrapolated boundaries necessary for 9-point template to find four grid corners for each real center */
-    double *lon_ctr_fk; /* [dgr] Longitude grid with extrapolated boundaries necessary for 9-point template to find four grid corners for each real center */
-    lat_ctr_fk=(double *)nco_malloc((lat_nbr+2)*(lon_nbr+2)*sizeof(double));
-    lon_ctr_fk=(double *)nco_malloc((lat_nbr+2)*(lon_nbr+2)*sizeof(double));
-    long int idx_rl; /* [idx] Index into real unrolled array */
-    long int idx_fk; /* [idx] Index into fake unrolled array */
-    for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){ /* lat idx on real grid */
-      for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){ /* lon idx on real grid */
-	idx_rl=lat_idx*lon_nbr+lon_idx;
-	idx_fk=(lat_idx+1)*(lon_nbr+2)+lon_idx+1;
-	/* Copy real grid to interior of fake grid */
-	lat_ctr_fk[idx_fk]=lat_ctr[idx_rl];
-	lon_ctr_fk[idx_fk]=lon_ctr[idx_rl];
-      } /* !lon */
-    } /* !lat */
-    /* Bottom row */
-    lat_idx=0; /* lat idx of extrapolated point on fake grid */
-    for(lon_idx=1;lon_idx<lon_nbr+1;lon_idx++){ /* lon idx of extrapolated point on fake grid */
-      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]-(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 */
-    for(lon_idx=1;lon_idx<lon_nbr+1;lon_idx++){ /* lon idx of extrapolated point on fake grid */
-      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]+(lon_ctr[idx_rl]-lon_ctr[idx_rl-lon_nbr]);
-    } /* !lon */
-    /* Left side */
-    lon_idx=0; /* lon idx of extrapolated point on fake grid */
-    for(lat_idx=1;lat_idx<lat_nbr+1;lat_idx++){ /* lat idx of extrapolated point on fake grid */
-      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]-(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 */
-    for(lat_idx=1;lat_idx<lat_nbr+1;lat_idx++){ /* lat idx of extrapolated point on fake grid */
-      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]+(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]-(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]+(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]+(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]-(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;
-      idx_dbg=rgr->idx_dbg;
-      (void)fprintf(stderr,"%s: INFO %s idx_dbg = %li, Fake Center [lat,lon]=[%g,%g]\n",nco_prg_nm_get(),fnc_nm,idx_dbg,lat_ctr_fk[idx_dbg],lon_ctr_fk[idx_dbg]);
-    } /* !dbg */
-
-    long int lat_idx_fk; /* [idx] Index into fake (extrapolated) latitude  array */
-    long int lon_idx_fk; /* [idx] Index into fake (extrapolated) longitude array */
-    long int idx_fk_crn_ll_ctr_ll;
-    long int idx_fk_crn_ll_ctr_lr;
-    long int idx_fk_crn_ll_ctr_ur;
-    long int idx_fk_crn_ll_ctr_ul;
-    long int idx_fk_crn_lr_ctr_ll;
-    long int idx_fk_crn_lr_ctr_lr;
-    long int idx_fk_crn_lr_ctr_ur;
-    long int idx_fk_crn_lr_ctr_ul;
-    long int idx_fk_crn_ur_ctr_ll;
-    long int idx_fk_crn_ur_ctr_lr;
-    long int idx_fk_crn_ur_ctr_ur;
-    long int idx_fk_crn_ur_ctr_ul;
-    long int idx_fk_crn_ul_ctr_ll;
-    long int idx_fk_crn_ul_ctr_lr;
-    long int idx_fk_crn_ul_ctr_ur;
-    long int idx_fk_crn_ul_ctr_ul;
+    /* For curvilinear grids first, if necessary, infer corner boundaries
+       Then perform sanity check using same code on inferred and copied grids */
     long int idx_crn_ll;
     long int idx_crn_lr;
     long int idx_crn_ur;
     long int idx_crn_ul;
-    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
-	   Read variables idx_crn_ll_ctr_ul as "index of upper left gridcell center that contributes to lower-left gridcell corner"
-	   Algorithms execute in counter-clockwise (CCW) direction: lower-left, lower-right, upper-right, upper-left
-	   lat_idx and lon_idx are true indices and are used to write into grd_crn_lat/lon arrays
-	   lat_idx_fk and lon_idx_fk are indices into fake arrays with extrapolated boundaries and are used to read data from fake arrays */
-	lon_idx_fk=lon_idx+1;
-	lat_idx_fk=lat_idx+1;
-	
-	idx_rl=lat_idx*lon_nbr+lon_idx;
-	idx_fk=lat_idx_fk*(lon_nbr+2)+lon_idx_fk;
-
-	/* Determine index into fake array (valid everywhere it is applied) 
-	   Comments after each equation are formula for real index (valid only at grid interiors) */
-	idx_fk_crn_ll_ctr_ll=idx_fk-(lon_nbr+2)-1; // (lat_idx-1)*lon_nbr+lon_idx-1
-	idx_fk_crn_ll_ctr_lr=idx_fk-(lon_nbr+2); // (lat_idx-1)*lon_nbr+lon_idx
-	idx_fk_crn_ll_ctr_ur=idx_fk; // lat_idx*lon_nbr+lon_idx
-	idx_fk_crn_ll_ctr_ul=idx_fk-1; // lat_idx*lon_nbr+lon_idx-1;
-
-	idx_fk_crn_lr_ctr_ll=idx_fk-(lon_nbr+2); // (lat_idx-1)*lon_nbr+lon_idx
-	idx_fk_crn_lr_ctr_lr=idx_fk-(lon_nbr+2)+1; // (lat_idx-1)*lon_nbr+lon_idx+1
-	idx_fk_crn_lr_ctr_ur=idx_fk+1; // lat_idx*lon_nbr+lon_idx+1
-	idx_fk_crn_lr_ctr_ul=idx_fk; // lat_idx*lon_nbr+lon_idx;
-
-	idx_fk_crn_ur_ctr_ll=idx_fk; // lat_idx*lon_nbr+lon_idx
-	idx_fk_crn_ur_ctr_lr=idx_fk+1; // lat_idx*lon_nbr+lon_idx+1
-	idx_fk_crn_ur_ctr_ur=idx_fk+(lon_nbr+2)+1; // (lat_idx+1)*lon_nbr+lon_idx+1
-	idx_fk_crn_ur_ctr_ul=idx_fk+(lon_nbr+2); // (lat_idx+1)*lon_nbr+lon_idx;
-	
-	idx_fk_crn_ul_ctr_ll=idx_fk-1; // lat_idx*lon_nbr+lon_idx-1
-	idx_fk_crn_ul_ctr_lr=idx_fk; // lat_idx*lon_nbr+lon_idx
-	idx_fk_crn_ul_ctr_ur=idx_fk+(lon_nbr+2); // (lat_idx+1)*lon_nbr+lon_idx
-	idx_fk_crn_ul_ctr_ul=idx_fk+(lon_nbr+2)-1; // (lat_idx+1)*lon_nbr+lon_idx-1;
-	
-	idx_crn_ll=grd_crn_nbr*idx_rl+0;
-	lat_crn[idx_crn_ll]=0.25*(lat_ctr_fk[idx_fk_crn_ll_ctr_ll]+lat_ctr_fk[idx_fk_crn_ll_ctr_lr]+lat_ctr_fk[idx_fk_crn_ll_ctr_ur]+lat_ctr_fk[idx_fk_crn_ll_ctr_ul]);
-	lon_crn[idx_crn_ll]=0.25*(lon_ctr_fk[idx_fk_crn_ll_ctr_ll]+lon_ctr_fk[idx_fk_crn_ll_ctr_lr]+lon_ctr_fk[idx_fk_crn_ll_ctr_ur]+lon_ctr_fk[idx_fk_crn_ll_ctr_ul]);
-	idx_crn_lr=grd_crn_nbr*idx_rl+1;
-	lat_crn[idx_crn_lr]=0.25*(lat_ctr_fk[idx_fk_crn_lr_ctr_ll]+lat_ctr_fk[idx_fk_crn_lr_ctr_lr]+lat_ctr_fk[idx_fk_crn_lr_ctr_ur]+lat_ctr_fk[idx_fk_crn_lr_ctr_ul]);
-	lon_crn[idx_crn_lr]=0.25*(lon_ctr_fk[idx_fk_crn_lr_ctr_ll]+lon_ctr_fk[idx_fk_crn_lr_ctr_lr]+lon_ctr_fk[idx_fk_crn_lr_ctr_ur]+lon_ctr_fk[idx_fk_crn_lr_ctr_ul]);
-	idx_crn_ur=grd_crn_nbr*idx_rl+2;
-	lat_crn[idx_crn_ur]=0.25*(lat_ctr_fk[idx_fk_crn_ur_ctr_ll]+lat_ctr_fk[idx_fk_crn_ur_ctr_lr]+lat_ctr_fk[idx_fk_crn_ur_ctr_ur]+lat_ctr_fk[idx_fk_crn_ur_ctr_ul]);
-	lon_crn[idx_crn_ur]=0.25*(lon_ctr_fk[idx_fk_crn_ur_ctr_ll]+lon_ctr_fk[idx_fk_crn_ur_ctr_lr]+lon_ctr_fk[idx_fk_crn_ur_ctr_ur]+lon_ctr_fk[idx_fk_crn_ur_ctr_ul]);
-	idx_crn_ul=grd_crn_nbr*idx_rl+3;
-	lat_crn[idx_crn_ul]=0.25*(lat_ctr_fk[idx_fk_crn_ul_ctr_ll]+lat_ctr_fk[idx_fk_crn_ul_ctr_lr]+lat_ctr_fk[idx_fk_crn_ul_ctr_ur]+lat_ctr_fk[idx_fk_crn_ul_ctr_ul]);
-	lon_crn[idx_crn_ul]=0.25*(lon_ctr_fk[idx_fk_crn_ul_ctr_ll]+lon_ctr_fk[idx_fk_crn_ul_ctr_lr]+lon_ctr_fk[idx_fk_crn_ul_ctr_ur]+lon_ctr_fk[idx_fk_crn_ul_ctr_ul]);
-      } /* !lon */
-    } /* !lat */
-    if(lat_ctr_fk) lat_ctr_fk=(double *)nco_free(lat_ctr_fk);
-    if(lon_ctr_fk) lon_ctr_fk=(double *)nco_free(lon_ctr_fk);
-
-    /* Copy inferred corners into empty output array */
+    
     if(lat_bnd_id == NC_MIN_INT && lon_bnd_id == NC_MIN_INT){
-      for(idx=0;idx<grd_sz_nbr*grd_crn_nbr;idx++){
-	grd_crn_lat[idx]=lat_crn[idx];
-	grd_crn_lon[idx]=lon_crn[idx];
-      } /* !idx */
-    } /* end else */
+      /* Interfaces (ntf) and boundaries (bnd) for curvilinear grids are ill-defined since sides need not follow latitudes nor meridians 
+	 Simplest representation that contains equivalent information to interfaces/boundaries is grid corners array
+	 Diagnose grid corners from midpoints
+	 Most curvilinear data (e.g., WRF) is dimensioned lat x lon unlike SCRIP which uses lon x lat 
+	 Hence we keep lat_ctr, lon_ctr, lat_crn, lon_crn with same order (likely lat x lon) as data file from which we infer grid
+	 Always use input order to write skeleton file
+	 Change that order, if necessary, to write SCRIP grid file
+	 In the interior of a curvilinear grid, nine points contribute to the four corners of a quadrilateral surrounding each center point
+	 These are the three points above the point, the three points at the same latitude, and the three points beneath the point
+	 In other words, a nine-point stencil is required to define the four corners inferred around each gridcell center
+	 It is cleanest to use this stencil only once for all cells in the "real"-grid, including those on the edges, not the interior
+	 For this to work cleanly we define an enlarged "fake"-grid where we pre-copy the values that lead to the desired extrapolation on "real"-grid edges
+	 Inspired by array-based solutions to integration of PDEs on meshes in Juri Toomre's class
+	 NB: implementation is not robust to missing value points in interior of grid. Hopefully grids have no missing values in coordinate variables, although they may have missing values in non-grid fields (e.g., mask, temperature) */
+      double *lat_ctr_fk; /* [dgr] Latitude  grid with extrapolated boundaries necessary for 9-point template to find four grid corners for each real center */
+      double *lon_ctr_fk; /* [dgr] Longitude grid with extrapolated boundaries necessary for 9-point template to find four grid corners for each real center */
+      lat_ctr_fk=(double *)nco_malloc((lat_nbr+2)*(lon_nbr+2)*sizeof(double));
+      lon_ctr_fk=(double *)nco_malloc((lat_nbr+2)*(lon_nbr+2)*sizeof(double));
+      long int idx_rl; /* [idx] Index into real unrolled array */
+      long int idx_fk; /* [idx] Index into fake unrolled array */
+      for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){ /* lat idx on real grid */
+	for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){ /* lon idx on real grid */
+	  idx_rl=lat_idx*lon_nbr+lon_idx;
+	  idx_fk=(lat_idx+1)*(lon_nbr+2)+lon_idx+1;
+	  /* Copy real grid to interior of fake grid */
+	  lat_ctr_fk[idx_fk]=lat_ctr[idx_rl];
+	  lon_ctr_fk[idx_fk]=lon_ctr[idx_rl];
+	} /* !lon */
+      } /* !lat */
+      /* Bottom row */
+      lat_idx=0; /* lat idx of extrapolated point on fake grid */
+      for(lon_idx=1;lon_idx<lon_nbr+1;lon_idx++){ /* lon idx of extrapolated point on fake grid */
+	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]-(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 */
+      for(lon_idx=1;lon_idx<lon_nbr+1;lon_idx++){ /* lon idx of extrapolated point on fake grid */
+	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]+(lon_ctr[idx_rl]-lon_ctr[idx_rl-lon_nbr]);
+      } /* !lon */
+      /* Left side */
+      lon_idx=0; /* lon idx of extrapolated point on fake grid */
+      for(lat_idx=1;lat_idx<lat_nbr+1;lat_idx++){ /* lat idx of extrapolated point on fake grid */
+	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]-(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 */
+      for(lat_idx=1;lat_idx<lat_nbr+1;lat_idx++){ /* lat idx of extrapolated point on fake grid */
+	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]+(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]-(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]+(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]+(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]-(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;
+	idx_dbg=rgr->idx_dbg;
+	(void)fprintf(stderr,"%s: INFO %s idx_dbg = %li, Fake Center [lat,lon]=[%g,%g]\n",nco_prg_nm_get(),fnc_nm,idx_dbg,lat_ctr_fk[idx_dbg],lon_ctr_fk[idx_dbg]);
+      } /* !dbg */
       
+      long int lat_idx_fk; /* [idx] Index into fake (extrapolated) latitude  array */
+      long int lon_idx_fk; /* [idx] Index into fake (extrapolated) longitude array */
+      long int idx_fk_crn_ll_ctr_ll;
+      long int idx_fk_crn_ll_ctr_lr;
+      long int idx_fk_crn_ll_ctr_ur;
+      long int idx_fk_crn_ll_ctr_ul;
+      long int idx_fk_crn_lr_ctr_ll;
+      long int idx_fk_crn_lr_ctr_lr;
+      long int idx_fk_crn_lr_ctr_ur;
+      long int idx_fk_crn_lr_ctr_ul;
+      long int idx_fk_crn_ur_ctr_ll;
+      long int idx_fk_crn_ur_ctr_lr;
+      long int idx_fk_crn_ur_ctr_ur;
+      long int idx_fk_crn_ur_ctr_ul;
+      long int idx_fk_crn_ul_ctr_ll;
+      long int idx_fk_crn_ul_ctr_lr;
+      long int idx_fk_crn_ul_ctr_ur;
+      long int idx_fk_crn_ul_ctr_ul;
+      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
+	     Read variables idx_crn_ll_ctr_ul as "index of upper left gridcell center that contributes to lower-left gridcell corner"
+	     Algorithms execute in counter-clockwise (CCW) direction: lower-left, lower-right, upper-right, upper-left
+	     lat_idx and lon_idx are true indices and are used to write into grd_crn_lat/lon arrays
+	     lat_idx_fk and lon_idx_fk are indices into fake arrays with extrapolated boundaries and are used to read data from fake arrays */
+	  lon_idx_fk=lon_idx+1;
+	  lat_idx_fk=lat_idx+1;
+	  
+	  idx_rl=lat_idx*lon_nbr+lon_idx;
+	  idx_fk=lat_idx_fk*(lon_nbr+2)+lon_idx_fk;
+	  
+	  /* Determine index into fake array (valid everywhere it is applied) 
+	     Comments after each equation are formula for real index (valid only at interior gridcells) */
+	  idx_fk_crn_ll_ctr_ll=idx_fk-(lon_nbr+2)-1; // (lat_idx-1)*lon_nbr+lon_idx-1
+	  idx_fk_crn_ll_ctr_lr=idx_fk-(lon_nbr+2); // (lat_idx-1)*lon_nbr+lon_idx
+	  idx_fk_crn_ll_ctr_ur=idx_fk; // lat_idx*lon_nbr+lon_idx
+	  idx_fk_crn_ll_ctr_ul=idx_fk-1; // lat_idx*lon_nbr+lon_idx-1;
+	  
+	  idx_fk_crn_lr_ctr_ll=idx_fk-(lon_nbr+2); // (lat_idx-1)*lon_nbr+lon_idx
+	  idx_fk_crn_lr_ctr_lr=idx_fk-(lon_nbr+2)+1; // (lat_idx-1)*lon_nbr+lon_idx+1
+	  idx_fk_crn_lr_ctr_ur=idx_fk+1; // lat_idx*lon_nbr+lon_idx+1
+	  idx_fk_crn_lr_ctr_ul=idx_fk; // lat_idx*lon_nbr+lon_idx;
+	  
+	  idx_fk_crn_ur_ctr_ll=idx_fk; // lat_idx*lon_nbr+lon_idx
+	  idx_fk_crn_ur_ctr_lr=idx_fk+1; // lat_idx*lon_nbr+lon_idx+1
+	  idx_fk_crn_ur_ctr_ur=idx_fk+(lon_nbr+2)+1; // (lat_idx+1)*lon_nbr+lon_idx+1
+	  idx_fk_crn_ur_ctr_ul=idx_fk+(lon_nbr+2); // (lat_idx+1)*lon_nbr+lon_idx;
+	  
+	  idx_fk_crn_ul_ctr_ll=idx_fk-1; // lat_idx*lon_nbr+lon_idx-1
+	  idx_fk_crn_ul_ctr_lr=idx_fk; // lat_idx*lon_nbr+lon_idx
+	  idx_fk_crn_ul_ctr_ur=idx_fk+(lon_nbr+2); // (lat_idx+1)*lon_nbr+lon_idx
+	  idx_fk_crn_ul_ctr_ul=idx_fk+(lon_nbr+2)-1; // (lat_idx+1)*lon_nbr+lon_idx-1;
+	  
+	  idx_crn_ll=grd_crn_nbr*idx_rl+0;
+	  lat_crn[idx_crn_ll]=0.25*(lat_ctr_fk[idx_fk_crn_ll_ctr_ll]+lat_ctr_fk[idx_fk_crn_ll_ctr_lr]+lat_ctr_fk[idx_fk_crn_ll_ctr_ur]+lat_ctr_fk[idx_fk_crn_ll_ctr_ul]);
+	  lon_crn[idx_crn_ll]=0.25*(lon_ctr_fk[idx_fk_crn_ll_ctr_ll]+lon_ctr_fk[idx_fk_crn_ll_ctr_lr]+lon_ctr_fk[idx_fk_crn_ll_ctr_ur]+lon_ctr_fk[idx_fk_crn_ll_ctr_ul]);
+	  idx_crn_lr=grd_crn_nbr*idx_rl+1;
+	  lat_crn[idx_crn_lr]=0.25*(lat_ctr_fk[idx_fk_crn_lr_ctr_ll]+lat_ctr_fk[idx_fk_crn_lr_ctr_lr]+lat_ctr_fk[idx_fk_crn_lr_ctr_ur]+lat_ctr_fk[idx_fk_crn_lr_ctr_ul]);
+	  lon_crn[idx_crn_lr]=0.25*(lon_ctr_fk[idx_fk_crn_lr_ctr_ll]+lon_ctr_fk[idx_fk_crn_lr_ctr_lr]+lon_ctr_fk[idx_fk_crn_lr_ctr_ur]+lon_ctr_fk[idx_fk_crn_lr_ctr_ul]);
+	  idx_crn_ur=grd_crn_nbr*idx_rl+2;
+	  lat_crn[idx_crn_ur]=0.25*(lat_ctr_fk[idx_fk_crn_ur_ctr_ll]+lat_ctr_fk[idx_fk_crn_ur_ctr_lr]+lat_ctr_fk[idx_fk_crn_ur_ctr_ur]+lat_ctr_fk[idx_fk_crn_ur_ctr_ul]);
+	  lon_crn[idx_crn_ur]=0.25*(lon_ctr_fk[idx_fk_crn_ur_ctr_ll]+lon_ctr_fk[idx_fk_crn_ur_ctr_lr]+lon_ctr_fk[idx_fk_crn_ur_ctr_ur]+lon_ctr_fk[idx_fk_crn_ur_ctr_ul]);
+	  idx_crn_ul=grd_crn_nbr*idx_rl+3;
+	  lat_crn[idx_crn_ul]=0.25*(lat_ctr_fk[idx_fk_crn_ul_ctr_ll]+lat_ctr_fk[idx_fk_crn_ul_ctr_lr]+lat_ctr_fk[idx_fk_crn_ul_ctr_ur]+lat_ctr_fk[idx_fk_crn_ul_ctr_ul]);
+	  lon_crn[idx_crn_ul]=0.25*(lon_ctr_fk[idx_fk_crn_ul_ctr_ll]+lon_ctr_fk[idx_fk_crn_ul_ctr_lr]+lon_ctr_fk[idx_fk_crn_ul_ctr_ur]+lon_ctr_fk[idx_fk_crn_ul_ctr_ul]);
+	} /* !lon */
+      } /* !lat */
+      if(lat_ctr_fk) lat_ctr_fk=(double *)nco_free(lat_ctr_fk);
+      if(lon_ctr_fk) lon_ctr_fk=(double *)nco_free(lon_ctr_fk);
+    } /* !(lat_bnd_id && lon_bnd_id) */
+    
+    /* As of 20151205, use same sanity check for both inferred and copied curvilinear grids
+       20151129: Above extrapolation technique yields corners outside [-90.0,90.0], [-180.0,360.0]
+       Also, it may assume input is ascending swath and fail for descending swaths
+       Complications not fully addressed:
+       Swaths may (verify this) turn from ascending to descending, or visa-versa, when satellite crosses latitude extrema
+       Swaths may cross the date-line (and back!) */
+
+    /* Determine numeric bounds of input coordinate system */
+    double lon_min_min;
+    double lon_max_max;
+    nco_bool NCO_LON_0_TO_360=True;
+    if(has_mss_val_ctr){
+      for(idx=0;idx<grd_sz_nbr;idx++)
+	if(lon_ctr[idx] != mss_val_ctr_dbl && lon_ctr[idx] < 0.0) break;
+    }else{
+      for(idx=0;idx<grd_sz_nbr;idx++)
+	if(lon_ctr[idx] < 0.0) break;
+    } /* !has_mss_val_ctr */
+    if(idx != grd_sz_nbr) NCO_LON_0_TO_360=False;
+    if(NCO_LON_0_TO_360){
+      lon_min_min=0.0;
+      lon_max_max=360.0;
+    }else{
+      lon_min_min=-180.0;
+      lon_max_max=180.0;
+    } /* !NCO_LON_0_TO_360 */
+    for(idx=0;idx<grd_sz_nbr*grd_crn_nbr;idx++){
+      idx_ctr=idx/grd_crn_nbr;
+      if(has_mss_val_ctr)
+	if(lat_ctr[idx_ctr] == mss_val_ctr_dbl)
+	  continue;
+      if(lat_crn[idx] < -90.0 || lat_crn[idx] > 90.0 || lon_crn[idx] < lon_min_min || lon_crn[idx] > lon_max_max){
+	  idx_crn_ll=grd_crn_nbr*idx_ctr+0;
+	  idx_crn_lr=grd_crn_nbr*idx_ctr+1;
+	  idx_crn_ur=grd_crn_nbr*idx_ctr+2;
+	  idx_crn_ul=grd_crn_nbr*idx_ctr+3;
+	  if(nco_dbg_lvl_get() >= nco_dbg_crr) (void)fprintf(stderr,"%s: INFO %s Curvilinear corner issue (from %s corners) at idx = %li, Center [lat,lon]=[%g,%g]; Corners LL [%g,%g] LR [%g,%g] UR [%g,%g] UL [%g,%g]\n",nco_prg_nm_get(),fnc_nm,(lat_bnd_id == NC_MIN_INT) ? "inferred" : "copied",idx_ctr,lat_ctr[idx_ctr],lon_ctr[idx_ctr],lat_crn[idx_crn_ll],lon_crn[idx_crn_ll],lat_crn[idx_crn_lr],lon_crn[idx_crn_lr],lat_crn[idx_crn_ur],lon_crn[idx_crn_ur],lat_crn[idx_crn_ul],lon_crn[idx_crn_ul]);
+	  /* Restrict grid to real latitudes and to the 360-degree range detected from input cell-centers */
+	  if(lat_crn[idx] < -90.0) lat_crn[idx]=-90.0;
+	  if(lat_crn[idx] >  90.0) lat_crn[idx]=90.0;
+	  if(lon_crn[idx] < lon_min_min) lon_crn[idx]+=360.0;
+	  if(lon_crn[idx] > lon_max_max) lon_crn[idx]-=360.0;
+      } /* !sanity */
+    } /* !idx */
+
+    /* Copy centers into empty output array */
+    for(idx=0;idx<grd_sz_nbr;idx++){
+      grd_ctr_lat[idx]=lat_ctr[idx];
+      grd_ctr_lon[idx]=lon_ctr[idx];
+    } /* !idx */
+    /* Copy inferred or copied (from input) sanity-checked corners into empty output array */
+    for(idx=0;idx<grd_sz_nbr*grd_crn_nbr;idx++){
+      grd_crn_lat[idx]=lat_crn[idx];
+      grd_crn_lon[idx]=lon_crn[idx];
+    } /* !idx */
+  
     if(nco_dbg_lvl_get() >= nco_dbg_std){
       long idx_dbg;
       idx_dbg=rgr->idx_dbg;
@@ -4951,50 +5200,48 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       idx_crn_ul=grd_crn_nbr*idx_dbg+3;
       (void)fprintf(stderr,"%s: INFO %s idx_dbg = %li, Center [lat,lon]=[%g,%g]; Corners LL [%g,%g] LR [%g,%g] UR [%g,%g] UL [%g,%g]\n",nco_prg_nm_get(),fnc_nm,idx_dbg,lat_ctr[idx_dbg],lon_ctr[idx_dbg],lat_crn[idx_crn_ll],lon_crn[idx_crn_ll],lat_crn[idx_crn_lr],lon_crn[idx_crn_lr],lat_crn[idx_crn_ur],lon_crn[idx_crn_ur],lat_crn[idx_crn_ul],lon_crn[idx_crn_ul]);
     } /* !dbg */
-
-    /* Find span of curvilinear grid */
-    double lat_max; /* [dgr] Maximum latitude */
-    double lat_min; /* [dgr] Minimum latitude */
-    double lon_max; /* [dgr] Maximum longitude */
-    double lon_min; /* [dgr] Minimum longitude */
-    lon_max=lon_crn[0];
-    lat_max=lat_crn[0];
-    lon_min=lon_crn[0];
-    lat_min=lat_crn[0];
-    for(idx=1;idx<grd_sz_nbr*grd_crn_nbr;idx++){
-      lat_max=(lat_crn[idx] > lat_max) ? lat_crn[idx] : lat_max;
-      lon_max=(lon_crn[idx] > lon_max) ? lon_crn[idx] : lon_max;
-      lat_min=(lat_crn[idx] < lat_min) ? lat_crn[idx] : lat_min;
-      lon_min=(lon_crn[idx] < lon_min) ? lon_crn[idx] : lon_min;
-    } /* !idx */
-    lat_spn=lat_max-lat_min;
-    lon_spn=lon_max-lon_min;
-    if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stderr,"%s: INFO %s reports curvilinear grid is %li x %li spanning %g x %g degrees: [%g <= lat <= %g], [%g <= lon <= %g]\n",nco_prg_nm_get(),fnc_nm,lat_nbr,lon_nbr,lat_spn,lon_spn,lat_min,lat_max,lon_min,lon_max);
   } /* !flg_grd_crv */
 
   if(flg_grd_2D){
-    /* Interfaces (ntf) assume rectangular grids */
-    lat_ntf[0]=lat_ctr[0]-0.5*(lat_ctr[1]-lat_ctr[0]);
-    for(lat_idx=0;lat_idx<lat_nbr-1;lat_idx++)
-      lat_ntf[lat_idx+1]=0.5*(lat_ctr[lat_idx]+lat_ctr[lat_idx+1]);
-    lat_ntf[lat_nbr]=lat_ctr[lat_nbr-1]+0.5*(lat_ctr[lat_nbr-1]-lat_ctr[lat_nbr-2]);
-    lat_spn=lat_ntf[lat_nbr]-lat_ntf[0];
-    
-    lon_ntf[0]=lon_ctr[0]-0.5*(lon_ctr[1]-lon_ctr[0]);
-    for(lon_idx=0;lon_idx<lon_nbr-1;lon_idx++)
-      lon_ntf[lon_idx+1]=0.5*(lon_ctr[lon_idx]+lon_ctr[lon_idx+1]);
-    lon_ntf[lon_nbr]=lon_ctr[lon_nbr-1]+0.5*(lon_ctr[lon_nbr-1]-lon_ctr[lon_nbr-2]);
-    lon_spn=lon_ntf[lon_nbr]-lon_ntf[0];
-    
-    /* fxm: do not overwrite bounds (bnd), if any, from input file */
-    for(idx=0;idx<lon_nbr;idx++){
-      lon_bnd[2*idx]=lon_ntf[idx];
-      lon_bnd[2*idx+1]=lon_ntf[idx+1];
-    } /* end loop over longitude */
-    for(idx=0;idx<lat_nbr;idx++){
-      lat_bnd[2*idx]=lat_ntf[idx];
-      lat_bnd[2*idx+1]=lat_ntf[idx+1];
-    } /* end loop over latitude */
+    if(lat_bnd_id == NC_MIN_INT && lon_bnd_id == NC_MIN_INT){
+      /* Derive interfaces (ntf) and bounds (bnd) from midpoints approximation applied to center data
+	 NB: Simplistically derived interfaces (ntf) only valid on some rectangular grids (not on Gaussian grids)
+	 These inferred-from-midpoint interfaces/bounds are overwritten in next block once lat grid is known */
+      lat_ntf[0]=lat_ctr[0]-0.5*(lat_ctr[1]-lat_ctr[0]);
+      if(lat_ntf[0] < -90.0) lat_ntf[0]=-90.0; /* NB: lat_ntf[0] can be same as lat_ctr[0] for cap grid */
+      for(lat_idx=0;lat_idx<lat_nbr-1;lat_idx++)
+	lat_ntf[lat_idx+1]=0.5*(lat_ctr[lat_idx]+lat_ctr[lat_idx+1]);
+      lat_ntf[lat_nbr]=lat_ctr[lat_nbr-1]+0.5*(lat_ctr[lat_nbr-1]-lat_ctr[lat_nbr-2]);
+      if(lat_ntf[lat_nbr] > 90.0) lat_ntf[lat_nbr]=90.0; /* NB: lat_ntf[lat_nbr] can be same as lat_ctr[lat_nbr-1] for cap grid */
+      lat_spn=lat_ntf[lat_nbr]-lat_ntf[0];
+      
+      lon_ntf[0]=lon_ctr[0]-0.5*(lon_ctr[1]-lon_ctr[0]);
+      for(lon_idx=0;lon_idx<lon_nbr-1;lon_idx++)
+	lon_ntf[lon_idx+1]=0.5*(lon_ctr[lon_idx]+lon_ctr[lon_idx+1]);
+      lon_ntf[lon_nbr]=lon_ctr[lon_nbr-1]+0.5*(lon_ctr[lon_nbr-1]-lon_ctr[lon_nbr-2]);
+      lon_spn=lon_ntf[lon_nbr]-lon_ntf[0];
+      
+      for(idx=0;idx<lon_nbr;idx++){
+	lon_bnd[2*idx]=lon_ntf[idx];
+	lon_bnd[2*idx+1]=lon_ntf[idx+1];
+      } /* !idx */
+      for(idx=0;idx<lat_nbr;idx++){
+	lat_bnd[2*idx]=lat_ntf[idx];
+	lat_bnd[2*idx+1]=lat_ntf[idx+1];
+      } /* !idx */
+    }else{ /* !(lat_bnd_id && lon_bnd_id) */
+      /* Derive interfaces (ntf) and bounds (bnd) from corner data on disk */
+      for(idx=0;idx<lon_nbr;idx++){
+	lon_ntf[idx]=lon_bnd[2*idx];
+	lon_ntf[idx+1]=lon_bnd[2*idx+1];
+      } /* !idx */
+      for(idx=0;idx<lat_nbr;idx++){
+	lat_ntf[idx]=lat_bnd[2*idx];
+	lat_ntf[idx+1]=lat_bnd[2*idx+1];
+      } /* !idx */
+      lat_spn=lat_ntf[lat_nbr]-lat_ntf[0];
+      lon_spn=lon_ntf[lon_nbr]-lon_ntf[0];
+    } /* !(lat_bnd_id && lon_bnd_id) */
   } /* !flg_grd_2D */
   
   if(flg_grd_2D){
@@ -5036,62 +5283,63 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     else if(lat_typ == nco_grd_lat_eqa) grd_typ=nco_grd_2D_eqa;
     else assert(False);
 
-    /* Diagnose latitude interfaces as necessary */
-    //    lat_sth=lat_ntf[0];
-    lat_nrt=lat_ntf[lat_nbr];
-    lat_spn=lat_ntf[lat_nbr]-lat_ntf[0];
-    switch(lat_typ){
-    case nco_grd_lat_fv:
-      lat_ncr=lat_spn/(lat_nbr-1);
-      lat_ntf[1]=lat_ntf[0]+0.5*lat_ncr;
-      for(lat_idx=2;lat_idx<lat_nbr;lat_idx++)
-	lat_ntf[lat_idx]=lat_ntf[1]+(lat_idx-1)*lat_ncr;
-      break;
-    case nco_grd_lat_eqa:
-      lat_ncr=lat_spn/lat_nbr;
-      for(lat_idx=1;lat_idx<lat_nbr;lat_idx++)
-	lat_ntf[lat_idx]=lat_ntf[0]+lat_idx*lat_ncr;
-      break;
-    case nco_grd_lat_gss:
-      for(lat_idx=0;lat_idx<lat_nbr;lat_idx++)
-	lat_ctr[lat_idx]=rdn2dgr*asin(lat_sin[lat_idx]);
-      /* First guess for lat_ntf is midway between Gaussian abscissae */
-      for(lat_idx=1;lat_idx<lat_nbr;lat_idx++)
-	lat_ntf[lat_idx]=0.5*(lat_ctr[lat_idx-1]+lat_ctr[lat_idx]);
-      /* Iterate guess until area between interfaces matches Gaussian weight */
-      for(lat_idx=1;lat_idx<lat_nbr;lat_idx++){
-	double fofx_at_x0; /* [frc] Function to iterate evaluated at current guess */
-	double dfdx_at_x0; /* [frc] Derivation of equation evaluated at current guess */
-	const double eps_rlt_cnv=1.0e-15; // Convergence criterion (1.0e-16 pushes double precision to the brink)
-	itr_cnt=0;
-	lat_wgt_gss=sin(dgr2rdn*lat_ntf[lat_idx])-sin(dgr2rdn*lat_ntf[lat_idx-1]);
-	fofx_at_x0=wgt_Gss[lat_idx-1]-lat_wgt_gss;
-	while(fabs(fofx_at_x0) > eps_rlt_cnv){
-	  /* Newton-Raphson iteration:
-	     Let x=lat_ntf[lat_idx], y0=lat_ntf[lat_idx-1], gw = Gaussian weight (exact solution)
-	     f(x)=sin(dgr2rdn*x)-sin(dgr2rdn*y0)-gw=0 
-	     dfdx(x)=dgr2rdn*(dgr2rdn*x)
-	     x_better=x0-f(x0)/f'(x0) */
-	  dfdx_at_x0=dgr2rdn*cos(dgr2rdn*lat_ntf[lat_idx]);
-	  lat_ntf[lat_idx]+=fofx_at_x0/dfdx_at_x0; /* NB: not sure why this is minus not plus but it works :) */
+    /* Diagnose latitude interfaces from gridcell centers (if boundaries not provided) */
+    if(lat_bnd_id == NC_MIN_INT && lon_bnd_id == NC_MIN_INT){
+      lat_nrt=lat_ntf[lat_nbr];
+      lat_spn=lat_ntf[lat_nbr]-lat_ntf[0];
+      switch(lat_typ){
+      case nco_grd_lat_fv:
+	lat_ncr=lat_spn/(lat_nbr-1);
+	lat_ntf[1]=lat_ntf[0]+0.5*lat_ncr;
+	for(lat_idx=2;lat_idx<lat_nbr;lat_idx++)
+	  lat_ntf[lat_idx]=lat_ntf[1]+(lat_idx-1)*lat_ncr;
+	break;
+      case nco_grd_lat_eqa:
+	lat_ncr=lat_spn/lat_nbr;
+	for(lat_idx=1;lat_idx<lat_nbr;lat_idx++)
+	  lat_ntf[lat_idx]=lat_ntf[0]+lat_idx*lat_ncr;
+	break;
+      case nco_grd_lat_gss:
+	for(lat_idx=0;lat_idx<lat_nbr;lat_idx++)
+	  lat_ctr[lat_idx]=rdn2dgr*asin(lat_sin[lat_idx]);
+	/* First guess for lat_ntf is midway between Gaussian abscissae */
+	for(lat_idx=1;lat_idx<lat_nbr;lat_idx++)
+	  lat_ntf[lat_idx]=0.5*(lat_ctr[lat_idx-1]+lat_ctr[lat_idx]);
+	/* Iterate guess until area between interfaces matches Gaussian weight */
+	for(lat_idx=1;lat_idx<lat_nbr;lat_idx++){
+	  double fofx_at_x0; /* [frc] Function to iterate evaluated at current guess */
+	  double dfdx_at_x0; /* [frc] Derivation of equation evaluated at current guess */
+	  const double eps_rlt_cnv=1.0e-15; // Convergence criterion (1.0e-16 pushes double precision to the brink)
+	  itr_cnt=0;
 	  lat_wgt_gss=sin(dgr2rdn*lat_ntf[lat_idx])-sin(dgr2rdn*lat_ntf[lat_idx-1]);
 	  fofx_at_x0=wgt_Gss[lat_idx-1]-lat_wgt_gss;
-	  if(++itr_cnt > itr_nbr_max){
-	    (void)fprintf(stdout,"%s: ERROR %s reports no convergence in %d iterations for lat_idx = %ld\n",nco_prg_nm_get(),fnc_nm,itr_nbr_max,lat_idx);
-	    nco_exit(EXIT_FAILURE);
-	  } /* endif */
-	} /* !while */
-      } /* !lat */
-      if(lat_sin) lat_sin=(double *)nco_free(lat_sin);
-      break;
-    case nco_grd_lat_unk:
-      /* No generic formula exists so use interfaces already read or diagnosed as midpoints between centers */
-      break;
-    default:
-      nco_dfl_case_generic_err(); break;
-    } /* !lat_typ */
-    /* Ensure rounding errors do not produce unphysical grid */
-    lat_ntf[lat_nbr]=lat_nrt;
+	  while(fabs(fofx_at_x0) > eps_rlt_cnv){
+	    /* Newton-Raphson iteration:
+	       Let x=lat_ntf[lat_idx], y0=lat_ntf[lat_idx-1], gw = Gaussian weight (exact solution)
+	       f(x)=sin(dgr2rdn*x)-sin(dgr2rdn*y0)-gw=0 
+	       dfdx(x)=dgr2rdn*(dgr2rdn*x)
+	       x_better=x0-f(x0)/f'(x0) */
+	    dfdx_at_x0=dgr2rdn*cos(dgr2rdn*lat_ntf[lat_idx]);
+	    lat_ntf[lat_idx]+=fofx_at_x0/dfdx_at_x0; /* NB: not sure why this is minus not plus but it works :) */
+	    lat_wgt_gss=sin(dgr2rdn*lat_ntf[lat_idx])-sin(dgr2rdn*lat_ntf[lat_idx-1]);
+	    fofx_at_x0=wgt_Gss[lat_idx-1]-lat_wgt_gss;
+	    if(++itr_cnt > itr_nbr_max){
+	      (void)fprintf(stdout,"%s: ERROR %s reports no convergence in %d iterations for lat_idx = %ld\n",nco_prg_nm_get(),fnc_nm,itr_nbr_max,lat_idx);
+	      nco_exit(EXIT_FAILURE);
+	    } /* endif */
+	  } /* !while */
+	} /* !lat */
+	if(lat_sin) lat_sin=(double *)nco_free(lat_sin);
+	break;
+      case nco_grd_lat_unk:
+	/* No generic formula exists so use interfaces already read or diagnosed as midpoints between centers */
+	break;
+      default:
+	nco_dfl_case_generic_err(); break;
+      } /* !lat_typ */
+      /* Ensure rounding errors do not produce unphysical grid */
+      lat_ntf[lat_nbr]=lat_nrt;
+    } /* !(lat_bnd_id && lon_bnd_id) */
     
     /* Use centers and boundaries to diagnose latitude weights */
     switch(lat_typ){
@@ -5113,12 +5361,12 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     /* Diagnose type of longitude grid by testing second longitude center against formulae */
     lon_spn=lon_ntf[lon_nbr]-lon_ntf[0];
     lat_spn=lat_ntf[lat_nbr]-lat_ntf[0];
-    if(lon_spn != 360.0 || lat_spn != 180.0) nco_grd_xtn=nco_grd_xtn_rgn;
+    if((float)lon_spn != 360.0f || (float)lat_spn != 180.0f) nco_grd_xtn=nco_grd_xtn_rgn;
     if(lon_typ == nco_grd_lon_nil){
-      if(     (float)lon_ctr[0] ==   0.0 && (float)lon_ctr[1] == (float)(lon_ctr[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_Grn_ctr;
-      else if((float)lon_ctr[0] == 180.0 && (float)lon_ctr[1] == (float)(lon_ctr[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_180_ctr;
-      else if((float)lon_ntf[0] ==   0.0 && (float)lon_ntf[1] == (float)(lon_ntf[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_Grn_wst;
-      else if((float)lon_ntf[0] == 180.0 && (float)lon_ntf[1] == (float)(lon_ntf[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_180_wst;
+      if(     (float)lon_ctr[0] ==    0.0f && (float)lon_ctr[1] == (float)(lon_ctr[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_Grn_ctr;
+      else if((float)lon_ctr[0] == -180.0f && (float)lon_ctr[1] == (float)(lon_ctr[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_180_ctr;
+      else if((float)lon_ntf[0] ==    0.0f && (float)lon_ntf[1] == (float)(lon_ntf[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_Grn_wst;
+      else if((float)lon_ntf[0] == -180.0f && (float)lon_ntf[1] == (float)(lon_ntf[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_180_wst;
       else if((float)lon_ctr[1] == (float)(lon_ctr[0]+lon_spn/lon_nbr)) lon_typ=nco_grd_lon_bb;
       else lon_typ=nco_grd_lon_unk;
     } /* !lon_typ */
@@ -5158,32 +5406,115 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 
   if(flg_grd_2D){
     assert(grd_crn_nbr == 4);
-    for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
-      idx=grd_crn_nbr*lon_idx;
-      lon_crn[idx]=lon_ntf[lon_idx]; /* LL */
-      lon_crn[idx+1]=lon_ntf[lon_idx+1]; /* LR */
-      lon_crn[idx+2]=lon_ntf[lon_idx+1]; /* UR */
-      lon_crn[idx+3]=lon_ntf[lon_idx]; /* UL */
-    } /* !lon_idx */
-    
-    for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
-      idx=grd_crn_nbr*lat_idx;
-      lat_crn[idx]=lat_ntf[lat_idx]; /* LL */
-      lat_crn[idx+1]=lat_ntf[lat_idx]; /* LR */
-      lat_crn[idx+2]=lat_ntf[lat_idx+1]; /* UR */
-      lat_crn[idx+3]=lat_ntf[lat_idx+1]; /* UL */
-    } /* !lat_idx */
+    if(lat_bnd_id == NC_MIN_INT && lon_bnd_id == NC_MIN_INT){
+      /* If interfaces were diagnosed from centers, copy corners from interfaces */
+      for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
+	idx=grd_crn_nbr*lon_idx;
+	lon_crn[idx]=lon_ntf[lon_idx]; /* LL */
+	lon_crn[idx+1]=lon_ntf[lon_idx+1]; /* LR */
+	lon_crn[idx+2]=lon_ntf[lon_idx+1]; /* UR */
+	lon_crn[idx+3]=lon_ntf[lon_idx]; /* UL */
+      } /* !lon_idx */
+      for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
+	idx=grd_crn_nbr*lat_idx;
+	lat_crn[idx]=lat_ntf[lat_idx]; /* LL */
+	lat_crn[idx+1]=lat_ntf[lat_idx]; /* LR */
+	lat_crn[idx+2]=lat_ntf[lat_idx+1]; /* UR */
+	lat_crn[idx+3]=lat_ntf[lat_idx+1]; /* UL */
+      } /* !lat_idx */
+    }else{ /* !lat_bnd_id */
+      /* If boundaries were provided in input dataset, copy corners from boundaries */
+      for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
+	idx=grd_crn_nbr*lon_idx;
+	lon_crn[idx]=lon_bnd[2*lon_idx]; /* LL */
+	lon_crn[idx+1]=lon_bnd[2*lon_idx+1]; /* LR */
+	lon_crn[idx+2]=lon_bnd[2*lon_idx+1]; /* UR */
+	lon_crn[idx+3]=lon_bnd[2*lon_idx]; /* UL */
+      } /* !lon_idx */
+      for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
+	idx=grd_crn_nbr*lat_idx;
+	lat_crn[idx]=lat_bnd[2*lat_idx]; /* LL */
+	lat_crn[idx+1]=lat_bnd[2*lat_idx]; /* LR */
+	lat_crn[idx+2]=lat_bnd[2*lat_idx+1]; /* UR */
+	lat_crn[idx+3]=lat_bnd[2*lat_idx+1]; /* UL */
+      } /* !lat_idx */
+    } /* !lat_bnd_id */
   } /* !flg_grd_2D */
 
-  /* Default mask if necessary */
-  if(msk_id == NC_MIN_INT)
-    for(idx=0;idx<grd_sz_nbr;idx++) msk[idx]=1;
+  /* lat/lon_crn will not change anymore so stuff rectangular arrays into unrolled arrays */
+  if(flg_grd_1D){
+    for(idx=0;idx<grd_sz_nbr;idx++){
+      grd_ctr_lat[idx]=lat_ctr[idx];
+      grd_ctr_lon[idx]=lon_ctr[idx];
+      if(flg_wrt_crn){
+	for(crn_idx=0;crn_idx<grd_crn_nbr;crn_idx++){
+	  idx2=grd_crn_nbr*idx+crn_idx;
+	  grd_crn_lat[idx2]=lat_crn[idx2];
+	  grd_crn_lon[idx2]=lon_crn[idx2];
+	} /* !crn */
+      }else{ /* !flg_wrt_crn */
+	/* Defaults for ERWG when corners are unknown */
+	for(crn_idx=0;crn_idx<grd_crn_nbr;crn_idx++){
+	  idx2=grd_crn_nbr*idx+crn_idx;
+	  grd_crn_lat[idx2]=0.0;
+	  grd_crn_lon[idx2]=0.0;
+	} /* !crn */
+      } /* !flg_wrt_crn */
+    } /* !col */
+  } /* !flg_grd_1D */
+  if(flg_grd_2D){
+    for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
+      for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
+	idx=lat_idx*lon_nbr+lon_idx;
+	grd_ctr_lat[idx]=lat_ctr[lat_idx];
+	grd_ctr_lon[idx]=lon_ctr[lon_idx];
+	for(crn_idx=0;crn_idx<grd_crn_nbr;crn_idx++){
+	  idx2=grd_crn_nbr*idx+crn_idx;
+	  lat_idx2=lat_idx*grd_crn_nbr+crn_idx;
+	  lon_idx2=lon_idx*grd_crn_nbr+crn_idx;
+	  grd_crn_lat[idx2]=lat_crn[lat_idx2];
+	  grd_crn_lon[idx2]=lon_crn[lon_idx2];
+	} /* !crn */
+      } /* !lon */
+    } /* !lat */
+  } /* !flg_grd_2D */
+  
+  /* Find span of any grid that has boundaries */
+  if(flg_wrt_crn){
+    double lat_max; /* [dgr] Maximum latitude */
+    double lat_min; /* [dgr] Minimum latitude */
+    double lon_max; /* [dgr] Maximum longitude */
+    double lon_min; /* [dgr] Minimum longitude */
+    idx_ctr=0;
+    if(has_mss_val_ctr){
+      /* Find first non-missing value center and thus corners */
+      for(idx_ctr=0;idx_ctr<grd_sz_nbr;idx_ctr++){
+	if(grd_ctr_lat[idx_ctr] != mss_val_ctr_dbl) break;
+      } /* !grd_sz_nbr */
+      assert(idx_ctr != grd_sz_nbr);
+    } /* !has_mss_val_ctr */
+    lon_max=grd_crn_lon[idx_ctr*grd_crn_nbr];
+    lat_max=grd_crn_lat[idx_ctr*grd_crn_nbr];
+    lon_min=grd_crn_lon[idx_ctr*grd_crn_nbr];
+    lat_min=grd_crn_lat[idx_ctr*grd_crn_nbr];
+    for(idx=1;idx<grd_sz_nbr*grd_crn_nbr;idx++){
+      idx_ctr=idx/grd_crn_nbr;
+      if(grd_ctr_lat[idx_ctr] == mss_val_ctr_dbl) continue;
+      lat_max=(grd_crn_lat[idx] > lat_max) ? grd_crn_lat[idx] : lat_max;
+      lon_max=(grd_crn_lon[idx] > lon_max) ? grd_crn_lon[idx] : lon_max;
+      lat_min=(grd_crn_lat[idx] < lat_min) ? grd_crn_lat[idx] : lat_min;
+      lon_min=(grd_crn_lon[idx] < lon_min) ? grd_crn_lon[idx] : lon_min;
+    } /* !idx */
+    lat_spn=lat_max-lat_min;
+    lon_spn=lon_max-lon_min;
+    if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stderr,"%s: INFO %s reports grid resolution %li x %li, spans %g x %g degrees: [%g <= lat <= %g], [%g <= lon <= %g]\n",nco_prg_nm_get(),fnc_nm,lat_nbr,lon_nbr,lat_spn,lon_spn,lat_min,lat_max,lon_min,lon_max);
+  } /* !flg_wrt_crn */
 
   /* Diagnose area if necessary */
-  if(area_id == NC_MIN_INT){
+  if(area_id == NC_MIN_INT && flg_wrt_crn){
     /* Not absolutely necessary to diagnose area because ERWG will diagnose and output area itself */
-    if(flg_grd_crv){
-      /* Area of arbitrary curvilinear grids requires spherical trigonometry */
+    if(flg_grd_crv || flg_grd_1D){
+      /* Area of arbitrary unstructured or curvilinear grids requires spherical trigonometry */
       nco_sph_plg_area(grd_crn_lat,grd_crn_lon,grd_sz_nbr,grd_crn_nbr,area);
     }else if(flg_grd_2D){
       for(lat_idx=0;lat_idx<lat_nbr;lat_idx++)
@@ -5192,6 +5523,50 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     } /* !flg_grd_2D */
   } /* !area_id */
 
+  /* Input mask can be any type and output mask will always be NC_INT */
+  if(msk_id == NC_MIN_INT){
+    /* Default mask if necessary */
+    for(idx=0;idx<grd_sz_nbr;idx++) msk[idx]=1;
+  }else{
+    /* Change missing value mask points to 0 integer mask for SCRIP grids, which have no missing value convention
+       Application: CICE mask is NC_FLOAT and uses NC_FLOAT missing value */
+    switch(msk_typ){
+    case NC_FLOAT:
+      if(has_mss_val_msk){
+	const float mss_val_flt=mss_val_msk_dbl;
+	for(idx=0;idx<grd_sz_nbr;idx++)
+	  if(msk_unn.fp[idx] == mss_val_flt) msk[idx]=0; else msk[idx]=msk_unn.fp[idx];
+      }else{
+	for(idx=0;idx<grd_sz_nbr;idx++) msk[idx]=msk_unn.fp[idx];
+      } /* !mss_val */
+      break;
+    case NC_DOUBLE:
+      if(has_mss_val_msk){
+	const float mss_val_dbl=mss_val_msk_dbl;
+	for(idx=0;idx<grd_sz_nbr;idx++)
+	  if(msk_unn.dp[idx] == mss_val_dbl) msk[idx]=0; else msk[idx]=msk_unn.dp[idx];
+      }else{
+	for(idx=0;idx<grd_sz_nbr;idx++) msk[idx]=msk_unn.dp[idx];
+      } /* !mss_val */
+      break;
+    case NC_INT:
+      if(has_mss_val_msk){
+	const float mss_val_int=mss_val_msk_dbl;
+	for(idx=0;idx<grd_sz_nbr;idx++)
+	  if(msk_unn.ip[idx] == mss_val_int) msk[idx]=0; else msk[idx]=msk_unn.ip[idx];
+      }else{
+	for(idx=0;idx<grd_sz_nbr;idx++) msk[idx]=msk_unn.ip[idx];
+      } /* !mss_val */
+      break;
+    default:
+      (void)fprintf(stderr,"%s: ERROR %s unknown mask type\n",nco_prg_nm_get(),fnc_nm);
+      nco_dfl_case_generic_err();
+      return NCO_ERR;
+      break;
+    } /* !msk_typ */
+    if(msk_unn.vp) msk_unn.vp=(void *)nco_free(msk_unn.vp);
+  } /* !msk_id */
+
   if(nco_dbg_lvl_get() >= nco_dbg_sbr){
     lat_wgt_ttl=0.0;
     area_ttl=0.0;
@@ -5208,29 +5583,14 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     assert(area_ttl <= 4.0*M_PI);
   } /* endif dbg */
 
-  /* Stuff rectangular arrays into unrolled arrays */
-  if(flg_grd_2D){
-    for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
-      for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
-	idx=lat_idx*lon_nbr+lon_idx;
-	grd_ctr_lat[idx]=lat_ctr[lat_idx];
-	grd_ctr_lon[idx]=lon_ctr[lon_idx];
-	for(crn_idx=0;crn_idx<grd_crn_nbr;crn_idx++){
-	  idx2=grd_crn_nbr*idx+crn_idx;
-	  lat_idx2=lat_idx*grd_crn_nbr+crn_idx;
-	  lon_idx2=lon_idx*grd_crn_nbr+crn_idx;
-	  grd_crn_lat[idx2]=lat_crn[lat_idx2];
-	  grd_crn_lon[idx2]=lon_crn[lon_idx2];
-	} /* !crn */
-      } /* !lon */
-    } /* !lat */
-  } /* !flg_grd_2D */
-  
   /* Open grid file */
   fl_out_tmp=nco_fl_out_open(fl_out,FORCE_APPEND,FORCE_OVERWRITE,fl_out_fmt,&bfr_sz_hnt,RAM_CREATE,RAM_OPEN,WRT_TMP_FL,&out_id);
 
   /* Define dimensions */
-  rcd=nco_def_dim(out_id,grd_crn_nm,grd_crn_nbr,&dmn_id_grd_crn);
+  /* 20151230 ERWG appears to require presence of corner arrays in grid file even when they are not used (e.g., bilinear)
+     But ERWG will break when corner values are bad. Default is do not write bad corner values. Uncomment next line to write bad corner values. */
+  /* flg_wrt_crn=True; */
+  if(flg_wrt_crn) rcd=nco_def_dim(out_id,grd_crn_nm,grd_crn_nbr,&dmn_id_grd_crn);
   rcd=nco_def_dim(out_id,grd_sz_nm,grd_sz_nbr,&dmn_id_grd_sz);
   rcd=nco_def_dim(out_id,grd_rnk_nm,grd_rnk_nbr,&dmn_id_grd_rnk);
   
@@ -5240,10 +5600,12 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   (void)nco_def_var(out_id,msk_nm,(nc_type)NC_INT,dmn_nbr_1D,&dmn_id_grd_sz,&msk_id);
   (void)nco_def_var(out_id,grd_ctr_lat_nm,crd_typ,dmn_nbr_1D,&dmn_id_grd_sz,&grd_ctr_lat_id);
   (void)nco_def_var(out_id,grd_ctr_lon_nm,crd_typ,dmn_nbr_1D,&dmn_id_grd_sz,&grd_ctr_lon_id);
-  dmn_ids[0]=dmn_id_grd_sz;
-  dmn_ids[1]=dmn_id_grd_crn;
-  (void)nco_def_var(out_id,grd_crn_lat_nm,crd_typ,dmn_nbr_2D,dmn_ids,&grd_crn_lat_id);
-  (void)nco_def_var(out_id,grd_crn_lon_nm,crd_typ,dmn_nbr_2D,dmn_ids,&grd_crn_lon_id);
+  if(flg_wrt_crn){
+    dmn_ids[0]=dmn_id_grd_sz;
+    dmn_ids[1]=dmn_id_grd_crn;
+    (void)nco_def_var(out_id,grd_crn_lat_nm,crd_typ,dmn_nbr_2D,dmn_ids,&grd_crn_lat_id);
+    (void)nco_def_var(out_id,grd_crn_lon_nm,crd_typ,dmn_nbr_2D,dmn_ids,&grd_crn_lon_id);
+  } /* !flg_wrt_crn */
   
   /* Define "units" attributes */
   aed_sct aed_mtd;
@@ -5352,12 +5714,14 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   aed_mtd.var_nm=grd_ctr_lon_nm;
   aed_mtd.id=grd_ctr_lon_id;
   (void)nco_aed_prc(out_id,grd_ctr_lon_id,aed_mtd);
-  aed_mtd.var_nm=grd_crn_lat_nm;
-  aed_mtd.id=grd_crn_lat_id;
-  (void)nco_aed_prc(out_id,grd_crn_lat_id,aed_mtd);
-  aed_mtd.var_nm=grd_crn_lon_nm;
-  aed_mtd.id=grd_crn_lon_id;
-  (void)nco_aed_prc(out_id,grd_crn_lon_id,aed_mtd);
+  if(flg_wrt_crn){
+    aed_mtd.var_nm=grd_crn_lat_nm;
+    aed_mtd.id=grd_crn_lat_id;
+    (void)nco_aed_prc(out_id,grd_crn_lat_id,aed_mtd);
+    aed_mtd.var_nm=grd_crn_lon_nm;
+    aed_mtd.id=grd_crn_lon_id;
+    (void)nco_aed_prc(out_id,grd_crn_lon_id,aed_mtd);
+  } /* !flg_wrt_crn */
   if(att_nm) att_nm=(char *)nco_free(att_nm);
   if(att_val) att_val=(char *)nco_free(att_val);
   
@@ -5382,14 +5746,16 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   dmn_srt[0]=0L;
   dmn_cnt[0]=grd_sz_nbr;
   rcd=nco_put_vara(out_id,grd_ctr_lon_id,dmn_srt,dmn_cnt,grd_ctr_lon,crd_typ);
-  dmn_srt[0]=dmn_srt[1]=0L;
-  dmn_cnt[0]=grd_sz_nbr;
-  dmn_cnt[1]=grd_crn_nbr;
-  rcd=nco_put_vara(out_id,grd_crn_lat_id,dmn_srt,dmn_cnt,grd_crn_lat,crd_typ);
-  dmn_srt[0]=dmn_srt[1]=0L;
-  dmn_cnt[0]=grd_sz_nbr;
-  dmn_cnt[1]=grd_crn_nbr;
-  rcd=nco_put_vara(out_id,grd_crn_lon_id,dmn_srt,dmn_cnt,grd_crn_lon,crd_typ);
+  if(flg_wrt_crn){
+    dmn_srt[0]=dmn_srt[1]=0L;
+    dmn_cnt[0]=grd_sz_nbr;
+    dmn_cnt[1]=grd_crn_nbr;
+    rcd=nco_put_vara(out_id,grd_crn_lat_id,dmn_srt,dmn_cnt,grd_crn_lat,crd_typ);
+    dmn_srt[0]=dmn_srt[1]=0L;
+    dmn_cnt[0]=grd_sz_nbr;
+    dmn_cnt[1]=grd_crn_nbr;
+    rcd=nco_put_vara(out_id,grd_crn_lon_id,dmn_srt,dmn_cnt,grd_crn_lon,crd_typ);
+  } /* !flg_wrt_crn */
   
   /* Close output file and move it from temporary to permanent location */
   (void)nco_fl_out_cls(fl_out,fl_out_tmp,out_id);
@@ -5413,6 +5779,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   if(lon_ntf) lon_ntf=(double *)nco_free(lon_ntf);
 
   /* Free strings */
+  if(col_dmn_nm) col_dmn_nm=(char *)nco_free(col_dmn_nm);
   if(lat_dmn_nm) lat_dmn_nm=(char *)nco_free(lat_dmn_nm);
   if(lon_dmn_nm) lon_dmn_nm=(char *)nco_free(lon_dmn_nm);
   if(bnd_dmn_nm) bnd_dmn_nm=(char *)nco_free(bnd_dmn_nm);
diff --git a/src/nco/nco_rgr.h b/src/nco/nco_rgr.h
index 2fb61d4..25b337e 100644
--- a/src/nco/nco_rgr.h
+++ b/src/nco/nco_rgr.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Description (definition) of regridding functions */
 
-/* Copyright (C) 2015--2015 Charlie Zender
+/* Copyright (C) 2015--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 */
@@ -34,11 +34,6 @@
 extern "C" {
 #endif /* __cplusplus */
 
-/* WIN32 math.h does not define M_PI, needed for dgr2rdn and rdn2dgr */
-#ifndef M_PI
-# define M_PI		3.14159265358979323846
-#endif /* M_PI */
-
   typedef enum nco_rgr_cmd_typ_enm{ /* [enm] Tempest remap type enum */
     nco_rgr_AAA_nil=0,
     nco_rgr_ApplyOfflineMap,
diff --git a/src/nco/nco_rth_flt.c b/src/nco/nco_rth_flt.c
index ead1eb7..80c5ef8 100644
--- a/src/nco/nco_rth_flt.c
+++ b/src/nco/nco_rth_flt.c
@@ -2,26 +2,12 @@
 
 /* Purpose: Float-precision arithmetic, MSVC macros */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
 
-#include "nco_rth_flt.h" /* Float-precision arithmetic, MSVC macros */
-
-/* MSVC does not define lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl(): Round to nearest integer, halfway cases round away from 0
-   MSVC does not define lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl(): Round to nearest even integer, raise exceptions
-   Summary of POSIX, ISO, and MSVC math intrinsics at http://www.johndcook.com/math_h.html */
-#ifdef _MSC_VER
-long long int llrint(double x){return (x >= 0.0) ? (long long int)floor(x+0.5) : (long long int)ceil(x-0.5);}; /* casts are CEWI for MSVC */
-long long int llrintf(float x){return (x >= 0.0f) ? (long long int)floorf(x+0.5f) : (long long int)ceilf(x-0.5f);};
-long int lrint(double x){return (x >= 0.0) ? (long int)floor(x+0.5) : (long int)ceil(x-0.5);};
-long int lrintf(float x){return (x >= 0.0f) ? (long int)floorf(x+0.5f) : (long int)ceilf(x-0.5f);};
-long long int llround(double x){return (long long int)floor(x+0.5);}
-long long int llroundf(float x){return (long long int)floorf(x+0.5f);}
-long int lround(double x){return (long int)floor(x+0.5);}
-long int lroundf(float x){return (long int)floorf(x+0.5f);}
-#endif /* !_MSC_VER */ 
+#include "nco_rth_flt.h" 
 
 /* In ANSI C, <math.h> provides standard math intrinsics in double precision 
    On most architectures, single precision ("float") versions are also supplied 
diff --git a/src/nco/nco_rth_flt.h b/src/nco/nco_rth_flt.h
index 9be7c85..b8e9d1d 100644
--- a/src/nco/nco_rth_flt.h
+++ b/src/nco/nco_rth_flt.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Float-precision arithmetic, MSVC macros */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -20,9 +20,6 @@
 /* Standard header files */
 #include <math.h> /* sin cos cos sin 3.14159 */
 
-#ifdef _MSC_VER
-# include <float.h> /* isfinite(), isinf(), isnan() */
-#endif /* !_MSC_VER */
 /* fxm stdio only needed for TODO ncap57 on UNIX */
 #include <stdio.h> /* stderr, FILE, NULL, etc. */
 #include <stdlib.h> /* atof, atoi, malloc, getopt */
@@ -50,46 +47,6 @@ rnd_nbrf /* [fnc] Generate random fraction in [0,1] */
 
 /* Remaining definitions are system-dependent */
 
-/* MSVC does not define isnormal(), isnan(), isinf(), isfinite()
-   http://stackoverflow.com/questions/2249110/how-do-i-make-a-portable-isnan-isinf-function */
-#ifdef _MSC_VER
-  /* isnormal() may be in MSVC 2012 with header amp_math.h. fxm: verify and utilize if true. */
-# define isnormal
-  /* Following functions are in MSVC 2008+ and require float.h */
-# define isnan(x) _isnan(x)
-# define isfinite(x) _finite(x)
-# define isinf(x) (!_finite(x))
-#endif /* !_MSC_VER */
-
-#ifdef _MSC_VER
-  /* _snprintf() is in MSVC 2005+ and requires stdio.h */
-# define snprintf _snprintf
-#endif /* !_MSC_VER */
-
-/* MSVC does not define lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl(): Round to nearest integer, halfway cases round away from 0
-   MSVC does not define lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl(): Round to nearest even integer, raise exceptions
-   Summary of POSIX, ISO, and MSVC math intrinsics at http://www.johndcook.com/math_h.html */
-#ifdef _MSC_VER
-  long long int llrint(double x);
-  long long int llrintf(float x);
-  long int lrint(double x);
-  long int lrintf(float x);
-  long long int llround(double x);
-  long long int llroundf(float x);
-  long int lround(double x);
-  long int lroundf(float x);
-#endif /* !_MSC_VER */ 
-
-#ifdef _MSC_VER
-  /* 20130227: Hard-code these because MSVC does not have access to config.h
-     Lack of double-precision version implies lack of single-precision version
-     Hence single-precision ("float") tokens are set in double-precision prototypes below */
-# define NEED_RINT
-# define NEED_NEARBYINT
-# define NEED_ROUND
-# define NEED_TRUNC
-#endif /* !_MSC_VER */
-
 #ifdef NEED_RINT
 # define NEED_RINTF
 double /* O [frc] Rounded value of x */
@@ -118,7 +75,7 @@ trunc /* [fnc] Truncate x to nearest integer not larger in absolute value */
 (double x); /* I [frc] Value to truncate */
 #endif /* !NEED_TRUNC */
 
-#if !defined(HPUX) && !defined(__INTEL_COMPILER) && !defined(LINUXAMD64)
+#if !defined(HPUX) && !defined(__INTEL_COMPILER) && !defined(LINUXAMD64) && !defined(_MSC_VER)
   /* Math float prototypes required by AIX, Solaris, but not by Linux, IRIX
      20040708: HP-UX does not like these 
      20090223: Intel compilers version 11.x complains about these
diff --git a/src/nco/nco_rth_utl.c b/src/nco/nco_rth_utl.c
index c7408e8..effb877 100644
--- a/src/nco/nco_rth_utl.c
+++ b/src/nco/nco_rth_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Arithmetic controls and utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_rth_utl.h b/src/nco/nco_rth_utl.h
index bfb4714..d38745e 100644
--- a/src/nco/nco_rth_utl.h
+++ b/src/nco/nco_rth_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Arithmetic controls and utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_scl_utl.c b/src/nco/nco_scl_utl.c
index e5cf062..5aa2d94 100644
--- a/src/nco/nco_scl_utl.c
+++ b/src/nco/nco_scl_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Scalar utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_scl_utl.h b/src/nco/nco_scl_utl.h
index 48d26f4..4cd44c9 100644
--- a/src/nco/nco_scl_utl.h
+++ b/src/nco/nco_scl_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Scalar utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_scm.c b/src/nco/nco_scm.c
index d277db4..1a515ad 100644
--- a/src/nco/nco_scm.c
+++ b/src/nco/nco_scm.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Software configuration management */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -148,7 +148,7 @@ void
 nco_cpy_prn(void) /* [fnc] Print copyright notice */
 {
   /* Purpose: Print copyright notice */
-  (void)fprintf(stderr,"Copyright (C) 1995--2015 Charlie Zender\n");
+  (void)fprintf(stderr,"Copyright (C) 1995--2016 Charlie Zender\n");
   (void)fprintf(stdout,"This program is part of NCO, the netCDF Operators.\nNCO is free software and comes with a BIG FAT KISS and ABOLUTELY NO WARRANTY\nYou may redistribute and/or modify NCO under the terms of the\nGNU General Public License (GPL) Version 3 with exceptions described in the LICENSE file\nGPL: http://www.gnu.org/copyleft/gpl.html\nLICENSE: https://github.com/nco/nco/tree/master/LICENSE\n");
 } /* end copyright_prn() */
 
diff --git a/src/nco/nco_scm.h b/src/nco/nco_scm.h
index 8decff9..5498296 100644
--- a/src/nco/nco_scm.h
+++ b/src/nco/nco_scm.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Software configuration management */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_sld.c b/src/nco/nco_sld.c
index dc82ead..c6588cb 100644
--- a/src/nco/nco_sld.c
+++ b/src/nco/nco_sld.c
@@ -2,7 +2,7 @@
 
 /* Purpose: NCO utilities for Swath-Like Data (SLD) */
 
-/* Copyright (C) 2015--2015 Charlie Zender
+/* Copyright (C) 2015--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 */
diff --git a/src/nco/nco_sld.h b/src/nco/nco_sld.h
index 350c296..47c4429 100644
--- a/src/nco/nco_sld.h
+++ b/src/nco/nco_sld.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Description (definition) of Swath-Like Data (SLD) functions */
 
-/* Copyright (C) 2015--2015 Charlie Zender
+/* Copyright (C) 2015--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 */
diff --git a/src/nco/nco_sng_utl.c b/src/nco/nco_sng_utl.c
index 0abbdc2..11a2b13 100644
--- a/src/nco/nco_sng_utl.c
+++ b/src/nco/nco_sng_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: String utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_sng_utl.h b/src/nco/nco_sng_utl.h
index fa5fd79..74995f3 100644
--- a/src/nco/nco_sng_utl.h
+++ b/src/nco/nco_sng_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: String utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -25,10 +25,7 @@
 #endif /* !HAVE_STRINGS_H */
 
 #ifdef _MSC_VER
-/* 20150203 C99 supplies isblank() and isspace() in ctype.h
-   MSVC 2010 has ctype.h and supplies isspace() but lacks isblank() 
-   MSVC 2012+ (apparently) supplies everything expected in ctype.h? */
-# define NEED_ISBLANK
+# define NEED_STRCASECMP
 # define NEED_STRCASESTR
 #endif /* !_MSC_VER */
 
@@ -45,6 +42,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
+
 #ifdef NEED_ISBLANK
   int /* O [flg] Character is a space or horizontal tab */
   isblank /* [fnc] Is character a space or horizontal tab? */
diff --git a/src/nco/nco_srm.c b/src/nco/nco_srm.c
index 791e2a7..d4a709b 100644
--- a/src/nco/nco_srm.c
+++ b/src/nco/nco_srm.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Streams */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_srm.h b/src/nco/nco_srm.h
index ac79b0b..0233fc9 100644
--- a/src/nco/nco_srm.h
+++ b/src/nco/nco_srm.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Streams */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_typ.h b/src/nco/nco_typ.h
index 6b236da..67a8f4d 100644
--- a/src/nco/nco_typ.h
+++ b/src/nco/nco_typ.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Type definitions, opaque types */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_avg.c b/src/nco/nco_var_avg.c
index c54b6a6..064f289 100644
--- a/src/nco/nco_var_avg.c
+++ b/src/nco/nco_var_avg.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Average variables */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_avg.h b/src/nco/nco_var_avg.h
index ee324cd..378fce6 100644
--- a/src/nco/nco_var_avg.h
+++ b/src/nco/nco_var_avg.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Average variables */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_lst.c b/src/nco/nco_var_lst.c
index 1e32852..52ef4d7 100644
--- a/src/nco/nco_var_lst.c
+++ b/src/nco/nco_var_lst.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Variable list utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
@@ -1269,8 +1269,8 @@ nco_var_is_fix                               /* [fnc] Variable should be treated
   var_is_fix=False;
 
   if(!strcmp(var_nm,"ntrm") || !strcmp(var_nm,"ntrn") || !strcmp(var_nm,"ntrk") || !strcmp(var_nm,"ndbase") || !strcmp(var_nm,"nsbase") || !strcmp(var_nm,"nbdate") || !strcmp(var_nm,"nbsec") || !strcmp(var_nm,"mdt") || !strcmp(var_nm,"mhisf")) var_is_fix=True;
-  /* NB: all !strcmp()'s except "msk_" which uses strstr() */
-  if(is_sz_rnk_prv_rth_opr && (!strcmp(var_nm,"hyam") || !strcmp(var_nm,"hybm") || !strcmp(var_nm,"hyai") || !strcmp(var_nm,"hybi") || !strcmp(var_nm,"gw") || !strcmp(var_nm,"lon_bnds") || !strcmp(var_nm,"lat_bnds") || !strcmp(var_nm,"area") || !strcmp(var_nm,"ORO") || !strcmp(var_nm,"date") || !strcmp(var_nm,"datesec") || (strstr(var_nm,"msk_") == var_nm))) var_is_fix=True;
+  /* NB: all !strcmp()'s except "msk_" and "wgt_" which use strstr() */
+  if(is_sz_rnk_prv_rth_opr && (!strcmp(var_nm,"hyam") || !strcmp(var_nm,"hybm") || !strcmp(var_nm,"hyai") || !strcmp(var_nm,"hybi") || !strcmp(var_nm,"gw") || !strcmp(var_nm,"lon_bnds") || !strcmp(var_nm,"lat_bnds") || !strcmp(var_nm,"area") || !strcmp(var_nm,"ORO") || !strcmp(var_nm,"date") || !strcmp(var_nm,"datesec") || (strstr(var_nm,"msk_") == var_nm) || (strstr(var_nm,"wgt_") == var_nm))) var_is_fix=True;
   /* Known "multi-dimensional coordinates" in CCSM-like model output:
      lat, lon, lev are normally 1-D coordinates
      Known exceptions:
diff --git a/src/nco/nco_var_lst.h b/src/nco/nco_var_lst.h
index 49cec7e..aec7540 100644
--- a/src/nco/nco_var_lst.h
+++ b/src/nco/nco_var_lst.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Variable list utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_rth.c b/src/nco/nco_var_rth.c
index ae3ecf1..1ef8626 100644
--- a/src/nco/nco_var_rth.c
+++ b/src/nco/nco_var_rth.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Variable arithmetic */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_rth.h b/src/nco/nco_var_rth.h
index 4041534..0e83228 100644
--- a/src/nco/nco_var_rth.h
+++ b/src/nco/nco_var_rth.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Variable arithmetic */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_scv.c b/src/nco/nco_var_scv.c
index a53e4dc..7ff8f6c 100644
--- a/src/nco/nco_var_scv.c
+++ b/src/nco/nco_var_scv.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Arithmetic between variables and scalar values */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_scv.h b/src/nco/nco_var_scv.h
index f1d4114..fef5238 100644
--- a/src/nco/nco_var_scv.h
+++ b/src/nco/nco_var_scv.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Arithmetic between variables and scalar values */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_utl.c b/src/nco/nco_var_utl.c
index 2f52a38..b8c915b 100644
--- a/src/nco/nco_var_utl.c
+++ b/src/nco/nco_var_utl.c
@@ -2,7 +2,7 @@
 
 /* Purpose: Variable utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/nco_var_utl.h b/src/nco/nco_var_utl.h
index 251d851..2adb3d3 100644
--- a/src/nco/nco_var_utl.h
+++ b/src/nco/nco_var_utl.h
@@ -2,7 +2,7 @@
 
 /* Purpose: Variable utilities */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco/ncpdq.c b/src/nco/ncpdq.c
index 126824a..a381ee5 100644
--- a/src/nco/ncpdq.c
+++ b/src/nco/ncpdq.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Pack, re-dimension, query single netCDF file and output to a single file */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
@@ -91,7 +91,6 @@ main(int argc,char **argv)
   aed_sct *aed_lst_scl_fct=NULL_CEWI;
 
   char **dmn_rdr_lst_in=NULL_CEWI; /* Option a */
-  char **dmn_rdr_lst_in_rvr=NULL_CEWI; /* Option a (same list, keep the '-' )*/
   char **fl_lst_abb=NULL; /* Option n */
   char **fl_lst_in=NULL_CEWI;
   char **gaa_arg=NULL; /* [sng] Global attribute arguments */
@@ -185,7 +184,7 @@ main(int argc,char **argv)
 
   md5_sct *md5=NULL; /* [sct] MD5 configuration */
 
-  nco_bool dmn_rvr_rdr[NC_MAX_DIMS]; /* [flg] Reverse dimensions */
+  nco_bool *dmn_rvr_rdr=NULL; /* [flg] Reverse dimensions */
   nco_bool CNV_CCM_CCSM_CF;
   nco_bool EXCLUDE_INPUT_LIST=False; /* Option c */
   nco_bool EXTRACT_ALL_COORDINATES=False; /* Option c */
@@ -452,7 +451,6 @@ main(int argc,char **argv)
     case 'a': /* Re-order dimensions */
       flg_dmn_prc_usr_spc=True;
       dmn_rdr_lst_in=nco_lst_prs_2D(optarg,",",&dmn_rdr_nbr_in);
-      dmn_rdr_lst_in_rvr=nco_lst_prs_2D(optarg,",",&dmn_rdr_nbr_in);
       dmn_rdr_nbr=dmn_rdr_nbr_in;
       break;
     case 'C': /* Extract all coordinates associated with extracted variables? */
@@ -603,45 +601,17 @@ main(int argc,char **argv)
 
   /* Create reversed dimension list */
   if(dmn_rdr_nbr_in > 0){
-
-    int dmn_rdr_nbr_trv=0;     /* [nbr] Number of dimensions in all variables to extract that match -a names  */
-    int idx_dmn_rdr_nbr_trv=0; /* [nbr] Index to number of dimensions in all variables to extract that match -a names  */
-
-    for(int idx_dmn=0;idx_dmn<NC_MAX_DIMS;idx_dmn++) dmn_rvr_rdr[idx_dmn]=-1; 
-
-    for(unsigned int idx_tbl=0;idx_tbl<trv_tbl->nbr;idx_tbl++){
-      trv_sct var_trv=trv_tbl->lst[idx_tbl];
-
-      if(var_trv.nco_typ == nco_obj_typ_var && var_trv.flg_xtr){
-
-        for(int idx_dmn=0;idx_dmn<var_trv.nbr_dmn;idx_dmn++){
-
-          /* Loop input -a names */
-          for(idx_rdr=0;idx_rdr<dmn_rdr_nbr_in;idx_rdr++){
-
-            /* Is dimension to be reversed? i.e., does it have a '-'? */
-            if(dmn_rdr_lst_in[idx_rdr][0] == '-'){
-              optarg_lcl=(char *)strdup(dmn_rdr_lst_in[idx_rdr]+1L);
-	      if(!strcmp(optarg_lcl,var_trv.var_dmn[idx_dmn].dmn_nm)) dmn_rdr_nbr_trv++;
-              optarg_lcl=(char *)nco_free(optarg_lcl); 
-              dmn_rvr_rdr[idx_dmn_rdr_nbr_trv]=True;
-	    }else{
-              dmn_rvr_rdr[idx_dmn_rdr_nbr_trv]=False;
-            } /* !flg_is_rvr */  
-            idx_dmn_rdr_nbr_trv++;
-
-          } /* !idx_rdr */
-        } /* !idx_dmn */
-      } /* !flg_xtr */
-    } /* !idx_tbl */
-
-    /* Strip all '-' */
+    dmn_rvr_rdr=(nco_bool *)nco_malloc(dmn_rdr_nbr_in*sizeof(nco_bool));
+    /* Is dimension to be reversed? i.e., does string begin with minus-sign '-'? */
     for(idx_rdr=0;idx_rdr<dmn_rdr_nbr_in;idx_rdr++){
       if(dmn_rdr_lst_in[idx_rdr][0] == '-'){
-        /* Copy string to new memory one past negative sign to avoid losing byte */
+	dmn_rvr_rdr[idx_rdr]=True;
+        /* Strip-out '-': Copy string to new memory one past negative sign to avoid losing byte */
         optarg_lcl=dmn_rdr_lst_in[idx_rdr];
         dmn_rdr_lst_in[idx_rdr]=(char *)strdup(optarg_lcl+1L);
         optarg_lcl=(char *)nco_free(optarg_lcl);
+      }else{
+	dmn_rvr_rdr[idx_rdr]=False;
       } /* !'-' */
     } /* !idx_rdr */
   } /* !dmn_rdr_nbr_in */
@@ -822,9 +792,8 @@ main(int argc,char **argv)
         /* Change dimensionionality of values */
         (void)nco_var_dmn_rdr_val_trv(var_prc[idx],var_prc_out[idx],trv_tbl);
 
-        /* Re-ordering required two value buffers, time to free input buffer */
+        /* Re-ordering required two value buffers, time to free() input buffer */
         var_prc[idx]->val.vp=nco_free(var_prc[idx]->val.vp);
-
       } /* IS_REORDER */
 
       /* Edit group name for output */
@@ -946,10 +915,8 @@ main(int argc,char **argv)
   if(flg_cln){
     /* ncpdq-specific memory cleanup */
     if(dmn_rdr_nbr > 0){
-      if(dmn_rdr_nbr_in > 0){
-        dmn_rdr_lst_in=nco_sng_lst_free(dmn_rdr_lst_in,dmn_rdr_nbr_in);
-        dmn_rdr_lst_in_rvr=nco_sng_lst_free(dmn_rdr_lst_in_rvr,dmn_rdr_nbr_in);
-      } /* endif */
+      if(dmn_rdr_nbr_in > 0) dmn_rdr_lst_in=nco_sng_lst_free(dmn_rdr_lst_in,dmn_rdr_nbr_in);
+      dmn_rvr_rdr=(nco_bool *)nco_free(dmn_rvr_rdr);
       /* Free dimension list pointers */
       dmn_rdr=(dmn_sct **)nco_free(dmn_rdr);
       /* Dimension structures in dmn_rdr are owned by dmn and dmn_out, free'd later */
diff --git a/src/nco/ncra.c b/src/nco/ncra.c
index 07460c5..71e8139 100644
--- a/src/nco/ncra.c
+++ b/src/nco/ncra.c
@@ -9,7 +9,7 @@
    specfied variables of multiple input netCDF files and output them 
    to a single file. */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
@@ -826,7 +826,7 @@ main(int argc,char **argv)
   if(nco_prg_id == ncra){
     dmn_sct **dmn=NULL_CEWI;
     int nbr_dmn=nbr_rec;
-    /* Allocate  */
+    /* Allocate */
     dmn=(dmn_sct **)nco_malloc(nbr_dmn*sizeof(dmn_sct *));
     /* Make dimension array from limit records array */
     (void)nco_dmn_lmt(lmt_rec,nbr_dmn,&dmn);
diff --git a/src/nco/ncrename.c b/src/nco/ncrename.c
index 9198036..77839b9 100644
--- a/src/nco/ncrename.c
+++ b/src/nco/ncrename.c
@@ -4,7 +4,7 @@
 
 /* Purpose: Rename dimensions, variables, and attributes of a netCDF file */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco/ncwa.c b/src/nco/ncwa.c
index 7cb9ad3..558d849 100644
--- a/src/nco/ncwa.c
+++ b/src/nco/ncwa.c
@@ -5,7 +5,7 @@
 /* Purpose: Compute averages of specified hyperslabs of specfied variables
    in a single input netCDF file and output them to a single file. */
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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.
diff --git a/src/nco_c++/Makefile.old b/src/nco_c++/Makefile.old
index dad8c31..c122b11 100644
--- a/src/nco_c++/Makefile.old
+++ b/src/nco_c++/Makefile.old
@@ -3,7 +3,7 @@
 # Purpose: Makefile for libnco_c++ module nco_c++
 # Requires GNU Make---AT&T Make chokes on GNU syntax
 
-# Copyright (C) 1994--2015 Charlie Zender
+# Copyright (C) 1994--2016 Charlie Zender
 # License: GNU General Public License (GPL) Version 3
 # See http://www.gnu.org/copyleft/gpl.html for full license text
 
diff --git a/src/nco_c++/libnco_c++.hh b/src/nco_c++/libnco_c++.hh
index 420258e..c48d7fe 100644
--- a/src/nco_c++/libnco_c++.hh
+++ b/src/nco_c++/libnco_c++.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Prototypes, typedefs, and global variables for libnco_c++
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_att.cc b/src/nco_c++/nco_att.cc
index 3000a52..14303ff 100644
--- a/src/nco_c++/nco_att.cc
+++ b/src/nco_c++/nco_att.cc
@@ -2,7 +2,7 @@
 
 // Implementation (declaration) of C++ interface to netCDF attribute routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_att.hh b/src/nco_c++/nco_att.hh
index e1ff780..5369d69 100644
--- a/src/nco_c++/nco_att.hh
+++ b/src/nco_c++/nco_att.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Description (definition) of C++ interface to netCDF attribute routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_dmn.cc b/src/nco_c++/nco_dmn.cc
index ed00458..c022116 100644
--- a/src/nco_c++/nco_dmn.cc
+++ b/src/nco_c++/nco_dmn.cc
@@ -2,7 +2,7 @@
 
 // Implementation (declaration) of C++ interface to netCDF dimension routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_dmn.hh b/src/nco_c++/nco_dmn.hh
index 46cea85..216bd2d 100644
--- a/src/nco_c++/nco_dmn.hh
+++ b/src/nco_c++/nco_dmn.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Description (definition) of C++ interface to netCDF dimension routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_fl.cc b/src/nco_c++/nco_fl.cc
index ec102ce..f391c7a 100644
--- a/src/nco_c++/nco_fl.cc
+++ b/src/nco_c++/nco_fl.cc
@@ -2,7 +2,7 @@
 
 // Purpose: Implementation (declaration) of C++ interface to netCDF file-level routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_fl.hh b/src/nco_c++/nco_fl.hh
index 40ddd9b..e5a3bfa 100644
--- a/src/nco_c++/nco_fl.hh
+++ b/src/nco_c++/nco_fl.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Description (definition) of C++ interface to netCDF file-level routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_hgh.cc b/src/nco_c++/nco_hgh.cc
index 27ab254..5f69fef 100644
--- a/src/nco_c++/nco_hgh.cc
+++ b/src/nco_c++/nco_hgh.cc
@@ -2,7 +2,7 @@
 
 // Implementation (declaration) of C++ interface to high-level NCO utilities
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_hgh.hh b/src/nco_c++/nco_hgh.hh
index f7de8ee..5a9ed5c 100644
--- a/src/nco_c++/nco_hgh.hh
+++ b/src/nco_c++/nco_hgh.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Description (definition) of high-level NCO routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_utl.cc b/src/nco_c++/nco_utl.cc
index 762d4f3..6a64c7a 100644
--- a/src/nco_c++/nco_utl.cc
+++ b/src/nco_c++/nco_utl.cc
@@ -2,7 +2,7 @@
 
 // Implementation (declaration) of C++ interface utilities for netCDF routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_utl.hh b/src/nco_c++/nco_utl.hh
index 91460e9..a05c1b1 100644
--- a/src/nco_c++/nco_utl.hh
+++ b/src/nco_c++/nco_utl.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Description (definition) of C++ interface utilities for netCDF routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_var.cc b/src/nco_c++/nco_var.cc
index 3530cd8..515a274 100644
--- a/src/nco_c++/nco_var.cc
+++ b/src/nco_c++/nco_var.cc
@@ -2,7 +2,7 @@
 
 // Purpose: Implementation (declaration) of C++ interface to netCDF variable routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */
diff --git a/src/nco_c++/nco_var.hh b/src/nco_c++/nco_var.hh
index c2a0612..aab41d0 100644
--- a/src/nco_c++/nco_var.hh
+++ b/src/nco_c++/nco_var.hh
@@ -2,7 +2,7 @@
 
 // Purpose: Description (definition) of C++ interface to netCDF variable routines
 
-/* Copyright (C) 1995--2015 Charlie Zender
+/* 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 */

-- 
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