[nco] 01/05: Imported Upstream version 4.6.1

Bas Couwenberg sebastic at debian.org
Sun Aug 7 11:00:50 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 6a314b120d7aa8190f43d088d914dd1f961e7098
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Aug 7 12:36:55 2016 +0200

    Imported Upstream version 4.6.1
---
 Makefile.in                       |   1 +
 bld/nco.spec                      |  11 +-
 bld/nco_dst.pl                    |  30 +-
 bm/NCO_bm.pm                      |   7 +-
 bm/NCO_rgr.pm                     |  45 ++-
 configure                         |  27 +-
 configure.ac                      |   8 +-
 configure.eg                      |   2 +-
 data/Makefile.in                  |   1 +
 data/bsc_tst.nco                  | 178 ++++++++++-
 data/hdf.cdl                      |   6 +-
 data/ncclimo                      | 341 ++++++++++++++++++---
 data/ncremap                      | 100 ++++--
 data/vpointer-ex0.nco             | 141 +++++++++
 data/vpointer-ex3.nco             |  61 ++++
 data/vpointer-tst.nco             |  29 +-
 debian/changelog                  |   6 +
 doc/ANNOUNCE                      | 159 +++-------
 doc/ChangeLog                     | 158 ++++++++++
 doc/MANIFEST                      |  25 +-
 doc/Makefile.in                   |   1 +
 doc/TODO                          |   7 +-
 doc/VERSION                       |   2 +-
 doc/debian.txt                    | 162 +++++-----
 doc/highlights_old.shtml          |  92 +++++-
 doc/index.shtml                   | 365 +++++++---------------
 doc/milestones_old.shtml          |   2 +-
 doc/nco.texi                      | 626 +++++++++++++++++++++++++++++++-------
 doc/prs_pbl_old.shtml             | 133 ++++++++
 man/Makefile.in                   |   1 +
 man/ncap.1                        |   2 +-
 man/ncap2.1                       |   4 +-
 man/ncatted.1                     |   4 +-
 man/ncbo.1                        |  12 +-
 man/ncecat.1                      |  12 +-
 man/nces.1                        |  12 +-
 man/ncflint.1                     |  12 +-
 man/ncks.1                        |  12 +-
 man/ncpdq.1                       |  12 +-
 man/ncra.1                        |  12 +-
 man/ncrcat.1                      |  12 +-
 man/ncrename.1                    |   2 +-
 man/ncwa.1                        |  12 +-
 src/Makefile.in                   |   1 +
 src/nco++/Makefile.in             |   1 +
 src/nco++/VarOpNew.hh             |  52 +++-
 src/nco++/fmc_all_cls.cc          | 149 +++++++--
 src/nco++/fmc_all_cls.hh          |   3 +-
 src/nco++/map_srt_tmp.hh          |  42 ++-
 src/nco++/ncap2_utl.cc            |  68 ++++-
 src/nco++/ncoEnumTokenTypes.hpp   |   2 +-
 src/nco++/ncoGrammer.g            | 194 +++++++-----
 src/nco++/ncoLexer.cpp            |   2 +-
 src/nco++/ncoLexer.hpp            |   2 +-
 src/nco++/ncoParser.cpp           |   2 +-
 src/nco++/ncoParser.hpp           |   2 +-
 src/nco++/ncoParserTokenTypes.hpp |   2 +-
 src/nco++/ncoTree.cpp             | 444 +++++++++++++--------------
 src/nco++/ncoTree.hpp             | 173 ++++++-----
 src/nco/Makefile.am               |   1 +
 src/nco/Makefile.in               |   2 +
 src/nco/ncflint.c                 |  16 +-
 src/nco/ncks.c                    |   9 +-
 src/nco/nco.h                     |   6 +-
 src/nco/nco_att_utl.c             |  17 +-
 src/nco/nco_cnk.c                 |  15 +-
 src/nco/nco_ctl.c                 |  36 +--
 src/nco/nco_fl_utl.c              |   6 +-
 src/nco/nco_grp_utl.c             |  10 +-
 src/nco/nco_netcdf.c              |   2 +-
 src/nco/nco_ppc.c                 |   8 +-
 src/nco/nco_prn.c                 |  47 +++
 src/nco/nco_rgr.c                 |  42 ++-
 src/nco/nco_var_lst.c             |  13 +-
 src/nco/nco_var_utl.c             |  87 +++++-
 src/nco/nco_var_utl.h             |   6 +
 src/nco/ncra.c                    |   2 +-
 src/nco_c++/Makefile.am           |   5 +-
 src/nco_c++/Makefile.in           |   7 +-
 79 files changed, 3026 insertions(+), 1297 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index fa2dc10..9a090de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -276,6 +276,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
diff --git a/bld/nco.spec b/bld/nco.spec
index 45dfcca..ef21d26 100644
--- a/bld/nco.spec
+++ b/bld/nco.spec
@@ -2,17 +2,17 @@
 # http://cvs.fedoraproject.org/viewvc/devel/nco/nco.spec?view=co
 
 Name:           nco
-Version:        4.6.0
+Version:        4.6.1
 Release:        1%{?dist}
 Summary:        Programs that manipulate netCDF files
 Group:          Applications/Engineering
 License:        GPL3
 URL:            http://nco.sf.net/
 
-# Obtain NCO version 4.6.0-1 tar.gz from Sourceforge using CVS:
+# Obtain NCO version 4.6.1-1 tar.gz from Sourceforge using CVS:
 # cvs -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco login
-# cvs -z3 -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco co -r nco-4.6.0-1 -d nco-%{version} nco
-# tar czf nco-%{version}.tar.gz --exclude='nco-4.6.0/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude='ncap_yacc.[ch]' ./nco-%{version}
+# cvs -z3 -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco co -r nco-4.6.1-1 -d nco-%{version} nco
+# tar czf nco-%{version}.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude='ncap_yacc.[ch]' ./nco-%{version}
 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
+* Sat Aug 06 2016 Charlie Zender <zender at uci.edu> - 4.6.1-1
+- new upstream 4.6.1
+
 * Thu May 12 2016 Charlie Zender <zender at uci.edu> - 4.6.0-1
 - new upstream 4.6.0
 
diff --git a/bld/nco_dst.pl b/bld/nco_dst.pl
index 8344ee7..1de8b70 100755
--- a/bld/nco_dst.pl
+++ b/bld/nco_dst.pl
@@ -5,20 +5,20 @@
 
 # Usage:
 # Export tagged, public versions
-# /usr/bin/scp ${DATA}/nco-4.6.0.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
-
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.0 # Build, do not release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.6.0 # Build, release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.6.0 # Install, do not build
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.6.0 # Build and install
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.6.0
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.6.0
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.6.0
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.6.0
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.6.0
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.6.0
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.6.0
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.6.0
+# /usr/bin/scp ${DATA}/nco-4.6.1.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.1 # Build, do not release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.6.1 # Build, release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.6.1 # Install, do not build
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.6.1 # Build and install
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.6.1
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.6.1
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.6.1
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.6.1
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.6.1
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.6.1
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.6.1
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.6.1
 
 # Export daily snapshot
 # ${HOME}/nco/bld/nco_dst.pl --dbg=2 
@@ -256,7 +256,7 @@ if($bld){
 # Set up FTP server
     chdir $dst_pth_pfx or die "$prg_nm: ERROR unable to chdir to $dst_pth_pfx: $!\n"; # $! is system error string
     cmd_prc("$cp_cmd $doc_fl ./$dst_vrs/doc"); # Copy derived documentation to source directory
-    cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-4.6.0/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude=ncap_yacc.[ch] ./$dst_vrs"); # Create gzipped tarfile
+    cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-4.6.1/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 f3946cc..cc501a6 100644
--- a/bm/NCO_bm.pm
+++ b/bm/NCO_bm.pm
@@ -419,7 +419,6 @@ sub drc_dat_set{
 # tst_run() consumes @tst_cmd array and executes them in order
 #################################################################################
 sub tst_run {
-    
     my %fl_nm_lcl = ( # fl_nm_lcl = local_file_name
 		'%stdouterr%'   => "", # stdouterr has to be left to generate stderr
 		'%tmp_fl_00%'    => "$drc_dat/tmp_fl_00.nc", # Default replacement for $fl_out
@@ -573,7 +572,6 @@ sub tst_run {
 	delete $cmd_lst[$#cmd_lst]; # and now the $cmd_lst is the same as it ever was..
 	
 #print "\nDEBUG:in tst_run:613, \$mpi_prc=[$mpi_prc] \$pfx_mpi=[$pfx_mpi] \$mpi_fk=[$mpi_fk]\n";
-	
 	foreach (@cmd_lst){
 #			print "\nforeach cmd_lst = $_\n";
 	    my $md5_chk = 1;
@@ -717,9 +715,8 @@ sub tst_run {
     else{ #print "DEBUG: \$nsr_xpc is not numeric: $nsr_xpc \n";
 	$xpc_is_nbr = 0;
     }
-    
     # Compare numeric results
-    if($cmd_rsl_is_nbr && $xpc_is_nbr){ # && it equals the expected value
+    if($cmd_rsl_is_nbr && $xpc_is_nbr && length($cmd_rsl)>0){ # && it equals the expected value
 #print "\n \$nsr_xpc [$nsr_xpc] considered a number\n";
 	$dbg_sng.="DEBUG: \$nsr_xpc assumed to be numeric: $nsr_xpc & actual  \$cmd_rsl = [$cmd_rsl]\n";
 	if($nsr_xpc == $cmd_rsl){
@@ -736,7 +733,7 @@ sub tst_run {
 	    my $diff = abs($nsr_xpc - $cmd_rsl);
 	    $dbg_sng .= "DEBUG: !!FAILED (Numeric output) [expected: $nsr_xpc vs result: $cmd_rsl].  Difference = $diff.\n";
 	}
-    }elsif(!$cmd_rsl_is_nbr && !$xpc_is_nbr){# Compare non-numeric tests
+    }elsif(!$cmd_rsl_is_nbr && !$xpc_is_nbr && length($cmd_rsl)>0){# Compare non-numeric tests
 	 dbg_msg(2,"DEBUG: expected value assumed to be alphabetic: $nsr_xpc\n\$cmd_rsl = $cmd_rsl\n");
 #print "\n \$nsr_xpc [$nsr_xpc] considered a string\n";
 	 
diff --git a/bm/NCO_rgr.pm b/bm/NCO_rgr.pm
index df898f9..c17f0ad 100644
--- a/bm/NCO_rgr.pm
+++ b/bm/NCO_rgr.pm
@@ -125,14 +125,15 @@ print "\n";
     $DATA=$ENV{'DATA'};
     $HOME=$ENV{'HOME'};
 if($USER eq 'zender'){
+# NB: area variable is not in ACME cube-sphere native output so this answer is not area-weighted
 # ncclimo -v FSNT,AODVIS -c famipc5_ne30_v0.3_00003 -s 1980 -e 1983 -i ${DATA}/ne30/raw -o ${DATA}/ne30/clm
-# ncwa -O -w area ${DATA}/ne30/clm/famipc5_ne30_v0.3_00003_ANN_197912_198311_climo.nc ~/foo.nc
+# ncwa -O ${DATA}/ne30/clm/famipc5_ne30_v0.3_00003_ANN_197912_198311_climo.nc ~/foo.nc
 # ncks -O -H -u -C -v FSNT ~/foo.nc
 	$dsc_sng="ncclimo (depends on input files in ${DATA}/ne30/raw)";
-	$tst_cmd[0]="ncclimo -v FSNT,AODVIS,area -c famipc5_ne30_v0.3_00003 -s 1980 -e 1983 -i ${DATA}/ne30/raw -o ${DATA}/ne30/clm > ${HOME}/foo.ncclimo";
-	$tst_cmd[1]="ncwa -O $fl_fmt $nco_D_flg -w area ${DATA}/ne30/clm/famipc5_ne30_v0.3_00003_ANN_197912_198311_climo.nc %tmp_fl_00%";
+	$tst_cmd[0]="ncclimo -v FSNT,AODVIS -c famipc5_ne30_v0.3_00003 -s 1980 -e 1983 -i ${DATA}/ne30/raw -o ${DATA}/ne30/clm > ${HOME}/foo.ncclimo";
+	$tst_cmd[1]="ncwa -O $fl_fmt $nco_D_flg ${DATA}/ne30/clm/famipc5_ne30_v0.3_00003_ANN_197912_198311_climo.nc %tmp_fl_00%";
 	$tst_cmd[2]="ncks -O $fl_fmt $nco_D_flg -H -u -C -v FSNT %tmp_fl_00%";
-	$tst_cmd[3]="FSNT = 235.503 W/m2";
+	$tst_cmd[3]="FSNT = 235.965 W/m2";
 	$tst_cmd[4]="SS_OK";
 	NCO_bm::tst_run(\@tst_cmd);
 	$#tst_cmd=0; # Reset array
@@ -274,6 +275,29 @@ if($USER eq 'zender'){
 	$tst_cmd[6]="SS_OK";
 	NCO_bm::tst_run(\@tst_cmd);
 	$#tst_cmd=0; # Reset array
+
+# ncremap generate T42 dataset, populate with test field, conservatively regrid to 2x2, verify conservation
+# ncks -O --rgr skl=~/skl_t42.nc --rgr grid=~/grd_t42.nc --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+# ncks -O --rgr grid=~/grd_2x2.nc --rgr latlon=90,180 --rgr lat_typ=eqa --rgr lon_typ=Grn_wst ~/nco/data/in.nc ~/foo.nc
+# ncap2 -O -s 'tst[lat,lon]=1.0f' ~/skl_t42.nc ~/dat_t42.nc
+# /bin/rm -f ~/foo_map_t42_to_2x2.nc
+# ncremap -a conserve -s ~/grd_t42.nc -g ~/grd_2x2.nc -m ~/map_t42_to_2x2.nc
+# ncremap -i ~/dat_t42.nc -m ~/map_t42_to_2x2.nc -o ~/dat_2x2.nc
+# ncwa -O ~/dat_2x2.nc ~/dat_avg.nc
+# ncks -C -H -v tst ~/dat_avg.nc
+	$dsc_sng="ncremap generate fake T42 dataset, conservatively regrid to 2x2";
+	$tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg --rgr skl=foo_skl_t42.nc --rgr grid=foo_grd_t42.nc --rgr latlon=64,128 --rgr lat_typ=gss --rgr lon_typ=Grn_ctr $in_pth_arg in.nc %tmp_fl_00%";
+	$tst_cmd[1]="ncks -O $fl_fmt $nco_D_flg --rgr grid=foo_grd_2x2.nc --rgr latlon=90,180 --rgr lat_typ=eqa --rgr lon_typ=Grn_wst $in_pth_arg in.nc %tmp_fl_00%";
+	$tst_cmd[2]="ncap2 -O $fl_fmt $nco_D_flg -s 'tst[lat,lon]=1.0f' foo_skl_t42.nc foo_dat_t42.nc";
+        $tst_cmd[3]="/bin/rm -f foo_map_t42_to_2x2.nc";
+	$tst_cmd[4]="ncremap -a conserve -s foo_grd_t42.nc -g foo_grd_2x2.nc -m foo_map_t42_to_2x2.nc";
+	$tst_cmd[5]="ncremap -i foo_dat_t42.nc -m foo_map_t42_to_2x2.nc -o foo_dat_2x2.nc";
+	$tst_cmd[6]="ncwa -O $fl_fmt $nco_D_flg foo_dat_2x2.nc foo_dat_avg.nc";
+	$tst_cmd[7]="ncks -C -H -v tst foo_dat_avg.nc";
+	$tst_cmd[8]="tst = 1";
+	$tst_cmd[9]="SS_OK";
+	NCO_bm::tst_run(\@tst_cmd);
+	$#tst_cmd=0; # Reset array
 } # !zender
 
 ####################
@@ -409,8 +433,9 @@ if($USER eq 'zender'){
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
 
-    $dsc_sng="Run script to test conversion of input vars to type NC_DOUBLE using var-pointers";
-    $tst_cmd[0]="ncap2 -h -O $fl_fmt $nco_D_flg -v -S '../data/vpointer_tst.nco' $in_pth_arg in.nc %tmp_fl_00%";
+# ncap2 -O -v -S ~/nco/data/vpointer-tst.nco ~/nco/data/in.nc ~/foo.nc
+   $dsc_sng="Run script to test conversion of input vars to type NC_DOUBLE using var-pointers";
+    $tst_cmd[0]="ncap2 -h -O $fl_fmt $nco_D_flg -v -S '../data/vpointer-tst.nco' $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -C -H -v nbr_err -s '%d' %tmp_fl_00%";
     $tst_cmd[2]="0";
     $tst_cmd[3]="SS_OK";
@@ -1994,6 +2019,7 @@ if($USER eq 'zender'){
     $#tst_cmd=0; # Reset array 							
 	
 #ncks #42 Extract associated coordinates test 1 (netCDF3 file) 
+#This tests that coordinate rlev is extracted with rz
     $dsc_sng="Extract associated coordinates test 1 (netCDF3 file) ";
     $tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg -v rz $in_pth_arg in.nc %tmp_fl_00%";
     $tst_cmd[1]="ncks -v rlev %tmp_fl_00% | grep -o -w rlev";
@@ -2003,10 +2029,13 @@ if($USER eq 'zender'){
     $#tst_cmd=0; # Reset array 
 	
 #ncks #43 Extract associated coordinates test 2 (netCDF3 file) 
+#This tests that coordinate rlev is not extracted with rz when -C switch is used
+#ncks -O -C -v rz ~/nco/data/in.nc ~/foo.nc
+#ncks -v rz ~/foo.nc | wc | cut -d ' ' -f 6
     $dsc_sng="Extract associated coordinates test 2 (netCDF3 file) ";
     $tst_cmd[0]="ncks -O $fl_fmt $nco_D_flg -C -v rz $in_pth_arg in.nc %tmp_fl_00%";
-    $tst_cmd[1]="ncks -v rlev %tmp_fl_00% | grep -w /rlev";
-    $tst_cmd[2]="";
+    $tst_cmd[1]="ncks -v rz %tmp_fl_00% | wc | cut -d ' ' -f 6";
+    $tst_cmd[2]="11";
     $tst_cmd[3]="SS_OK";
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array 	
diff --git a/configure b/configure
index c55f0a7..8e2a4f8 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for NCO netCDF Operators 4.6.0.
+# Generated by GNU Autoconf 2.69 for NCO netCDF Operators 4.6.1-beta01.
 #
 # Report bugs to <nco-bugs at lists.sourceforge.net>.
 #
@@ -592,8 +592,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='NCO netCDF Operators'
 PACKAGE_TARNAME='nco'
-PACKAGE_VERSION='4.6.0'
-PACKAGE_STRING='NCO netCDF Operators 4.6.0'
+PACKAGE_VERSION='4.6.1-beta01'
+PACKAGE_STRING='NCO netCDF Operators 4.6.1-beta01'
 PACKAGE_BUGREPORT='nco-bugs at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -746,6 +746,7 @@ INSTALL_SCRIPT
 INSTALL_PROGRAM
 EGREP
 GREP
+NCO_VERSION
 target_os
 target_vendor
 target_cpu
@@ -1393,7 +1394,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures NCO netCDF Operators 4.6.0 to adapt to many kinds of systems.
+\`configure' configures NCO netCDF Operators 4.6.1-beta01 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1464,7 +1465,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of NCO netCDF Operators 4.6.0:";;
+     short | recursive ) echo "Configuration of NCO netCDF Operators 4.6.1-beta01:";;
    esac
   cat <<\_ACEOF
 
@@ -1632,7 +1633,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-NCO netCDF Operators configure 4.6.0
+NCO netCDF Operators configure 4.6.1-beta01
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2498,7 +2499,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by NCO netCDF Operators $as_me 4.6.0, which was
+It was created by NCO netCDF Operators $as_me 4.6.1-beta01, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3002,8 +3003,10 @@ test -n "$target_alias" &&
 
 # Get NCO version
 if test -r doc/VERSION; then
-    nco_version=`cat doc/VERSION`
-#  AC_DEFINE_UNQUOTED(NCO_VERSION,${nco_version},NCO Version)
+#    nco_version=`cat doc/VERSION`
+##  AC_DEFINE_UNQUOTED(NCO_VERSION,${nco_version},NCO Version)
+    NCO_VERSION=`cat doc/VERSION`
+
 fi
 
 # Set egrep
@@ -3747,7 +3750,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='nco'
- VERSION='4.6.0'
+ VERSION='4.6.1-beta01'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -21474,7 +21477,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by NCO netCDF Operators $as_me 4.6.0, which was
+This file was extended by NCO netCDF Operators $as_me 4.6.1-beta01, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21540,7 +21543,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-NCO netCDF Operators config.status 4.6.0
+NCO netCDF Operators config.status 4.6.1-beta01
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index d14e8d5..5237ea8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@
 
 # Process configure input with autoconf to produce configure script
 # (package name,version,bug-report-address,tarball name)
-AC_INIT([NCO netCDF Operators],[4.6.0],[nco-bugs at lists.sourceforge.net],[nco])
+AC_INIT([NCO netCDF Operators],[4.6.1],[nco-bugs at lists.sourceforge.net],[nco])
 
 # Print GNU copyright in configure script
 AC_COPYRIGHT
@@ -73,8 +73,10 @@ AC_CANONICAL_TARGET
 
 # Get NCO version
 if test -r doc/VERSION; then
-    nco_version=`cat doc/VERSION`
-#  AC_DEFINE_UNQUOTED(NCO_VERSION,${nco_version},NCO Version)
+#    nco_version=`cat doc/VERSION`
+##  AC_DEFINE_UNQUOTED(NCO_VERSION,${nco_version},NCO Version)
+    NCO_VERSION=`cat doc/VERSION`
+    AC_SUBST(NCO_VERSION)
 fi
 
 # Set egrep
diff --git a/configure.eg b/configure.eg
index 3e92289..b94cf03 100644
--- a/configure.eg
+++ b/configure.eg
@@ -300,7 +300,7 @@ 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_cori --datadir=${HOME}/nco/data --libdir=${HOME}/lib_cori --mandir=${HOME}/man > nco.configure.${GNU_TRP}.foo 2>&1
+ANTLR_ROOT=${HOME} ANTLR_LIB=${HOME}/lib_cori CC='icc' CXX='icpc' GSL_ROOT='/usr/common/software/gsl/2.1/intel' NETCDF_INC='/opt/cray/pe/netcdf/4.4.0/INTEL/15.0/include' NETCDF_LIB='/opt/cray/pe/netcdf/4.4.0/INTEL/15.0/lib' NETCDF_ROOT='/opt/cray/pe/netcdf/4.4.0' UDUNITS2_PATH='/usr/common/software/udunits/2.2.19/hsw/intel' ./configure --prefix=${HOME} --bindir=${HOME}/bin_cori --datadir=${HOME}/nco/data --libdir=${HOME}/lib_cori --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
diff --git a/data/Makefile.in b/data/Makefile.in
index 0ea676c..133f5f2 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -217,6 +217,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
diff --git a/data/bsc_tst.nco b/data/bsc_tst.nco
index fd7a8d0..d472f31 100644
--- a/data/bsc_tst.nco
+++ b/data/bsc_tst.nco
@@ -189,8 +189,115 @@ nbr_err_ttl=0;
 
   }
 
+  // more hyperslabbing
+  b10=1.0;  
+  b10 at a1=time(8:);  
+  
+  if( b10 at a1.size() != 2 || b10 at a1(0)+b10 at a1(1) !=19 )
+  {
+     print("ERROR: b10 at a1 hhyperslabbing\n");
+     nbr_err++;	
+  }
+
+  b10 at a2=time(::3);  
+  if( b10 at a2.size() != 4  ||  fabs(b10 at a2.gsl_stats_mean()-5.5) > 0.01    )
+  {
+     print("ERROR: b10 at a2 hhyperslabbing\n");
+     nbr_err++;	
+  }
+
+  b10 at a3=time(:4);  
+  if( b10 at a3.size() != 5  ||  fabs(b10 at a3.gsl_stats_mean()-3.0) > 0.01    )
+  {
+     print("ERROR: b10 at a3 hhyperslabbing\n");
+     nbr_err++;	
+  }
+
+  b10 at a4=time(3:9:2);  
+  if( b10 at a4.size() != 4  ||  fabs(b10 at a4.gsl_stats_mean()-7.0) > 0.01    )
+  {
+     print("ERROR: b10 at a4 hhyperslabbing\n");
+     nbr_err++;	
+  }
+
+  b10 at a5=time(:9:9);  
+  if( b10 at a5.size() != 2  ||  fabs(b10 at a5.gsl_stats_mean()-5.5) > 0.01    )
+  {
+     print("ERROR: b10 at a5 hhyperslabbing\n");
+     nbr_err++;	
+  }
+
+       
+  b10 at a6=time(:9:10);  // a lttle tricky one 
+  if( b10 at a6.size() != 1  ||  fabs(b10 at a6.gsl_stats_mean()-1.0) > 0.01    )
+  {
+     print("ERROR: b10 at a6 hhyperslabbing\n");
+     nbr_err++;	
+  }
+
+  // check some negative indices
+  if( time(8:9) != time(-2:-1) )
+  {
+     print("ERROR: b10  a) negative indices\n");
+     nbr_err++;	
+  }
+
+  // check some more negative indices
+  if( time(0:4) != time(-10:-6) )
+  {
+     print("ERROR: b10  b) negative indices\n");
+     nbr_err++;	
+  }
+
+  // check some more negative indices
+  if( time(0::3) != time(-10::3) )
+  {
+     print("ERROR: b10  c) negative indices\n");
+     nbr_err++;	
+  }
+
+  // check indices defined in a var or att
+  b11=2.0;
+  b11 at indices={3,9,2};
+  if( time(b11 at indices) != time(3:9:2)  )
+  {
+     print("ERROR: b11  a) var/att indices\n");
+     nbr_err++;	
+  }
+
+  b11 at indices2={8,1,0};
+  if( th(b11 at indices2) != th(8,1,0 )) 
+  {
+     print("ERROR: b11  b) var/att indices\n");
+     nbr_err++;	
+  }
+
+
+  b11 at indices3={2,4,0,1,0,0};
+  if( th(b11 at indices3) != th(2:4,0:1,0:0))
+  {
+     print("ERROR: b11  c) var/att indices\n");
+     nbr_err++;	
+  }
+
+  b11 at indices4={1,4,1,0,1,1,0,2,1,0,1,1};
+  if( four_dmn_rec_var(b11 at indices4) != four_dmn_rec_var(1:4:1,0:1:1,0:2:1,0:1:1))
+  {
+     print("ERROR: b11  d) var/att indices\n");
+     nbr_err++;	
+  }
 
 
+ b12 at indices5={8,1,0};
+ b12=th(b12 at indices5);
+ if( b12.size() !=1 || b12.type()!=NC_INT || b12.ndims() !=0|| b12 != 69.0   ) 
+  {
+     print("ERROR: b12  a) var/att indices\n");
+     nbr_err++;	
+  }
+
+ 
+
   print("RESULTS block b: Num errors="); print(nbr_err,"%d");
   nbr_err_ttl+=nbr_err;
   nbr_err=0;
@@ -342,8 +449,51 @@ nbr_err_ttl=0;
      nbr_err++;	
   }
 
+  // check a LHS var defined by a RHS att 
+  d4 at one=2.0d;       
+  d5=d4 at one;
+  
+  if(d5.type()!=NC_DOUBLE || d5.size() !=1)
+  {
+     print("ERROR: d5: var defined from an att\n");
+     nbr_err++;	
+  }
+ 
+  // check a LHS cast with a RHS att
+  d6[time]=d4 at one;
+
+  if(d6.type()!=NC_DOUBLE || d6.size() != time.size())
+  {
+     print("ERROR: d6: var cast from an att\n");
+     nbr_err++;	
+  }
 
 
+  if(d6.type()!=NC_DOUBLE || d6.size() != time.size())
+  {
+     print("ERROR: d6: var cast from an att\n");
+     nbr_err++;	
+  }
+
+  // check a LHS cast with a RHS att list
+  d7[time]={1s,4us,9b,16L,25ull,36,49,64,81,100.0f};
+
+  if(d7.type()!=NC_FLOAT || d7.size() != time.size())
+  {
+     print("ERROR: d7: var cast from an att list\n");
+     nbr_err++;	
+  }
+
+  // try hyperslabbing an NV_STRING att
+  d7 at greek={"alpha"s,"beta"s,"gamma"s,"delta"s,"epsilon"s};
+  d7 at hyper_greek=d7 at greek(0::2); 
+   
+  if(d7 at hyper_greek.size() !=3 || d7 at hyper_greek.type()!=NC_STRING) 
+  {
+     print("ERROR: d7a: hyperslabbing an NC_STRING att\n");
+     nbr_err++;	
+  }
+
 
   print("RESULTS block d: Num errors="); print(nbr_err,"%d");
   nbr_err_ttl+=nbr_err;
@@ -423,12 +573,34 @@ nbr_err_ttl=0;
   nbr_err=0;
 }
 
-// Check gsl_stats and gsl_ran functions
+// variable / att/dim quoting
 {
-  nbr_err=0;
+  defdim("a:list(A++)",10);
+  defdim("b:list(B-- )",20);
+  'f.. m1(+:)'['$a:list(A++)','$b:list(B-- )']=1l;
+  'f.. m1(+:)'(0,10)=101;
+
+  if( 'f.. m1(+:)'.total() != 300l || 'f.. m1(+:)'.type() != NC_INT) 
+  {
+      print("ERROR: f1 quotes vars & dims not working");
+      nbr_err++;	
+  }
+
+  'f.. m1(+:)@a(1)'=5.0f;
+  'f.. m1(+:)@b(1)'=4.0f;
+
+  'f.. m1(+:)@c'= 'f.. m1(+:)@a(1)' * 'f.. m1(+:)@b(1)';
+
+  if( 'f.. m1(+:)@c' != 20.0f || 'f.. m1(+:)@c'.type() != NC_FLOAT) 
+  {
+      print("ERROR: f2 quoted atts");
+      nbr_err++;	
+  }
+
+ 
 
   print("RESULTS block f: Num errors="); print(nbr_err,"%d");
-  //nbr_err_ttl+=nbr_err;
+  nbr_err_ttl+=nbr_err;
   nbr_err=0;
 
 }
diff --git a/data/hdf.cdl b/data/hdf.cdl
index 00c656a..c0852f7 100644
--- a/data/hdf.cdl
+++ b/data/hdf.cdl
@@ -3,8 +3,10 @@
 // Purpose: CDL file to generate HDF4 test file for NCO
 
 // Usage:
-// /usr/bin/hncgen -b -o hdf.hdf hdf.cdl
-// /usr/bin/hncgen -b -o ~/nco/data/hdf.hdf ~/nco/data/hdf.cdl
+// /usr/bin/hncgen -b -o hdf.hdf hdf.cdl # 
+// /usr/bin/hncgen -b -o ~/nco/data/hdf.hdf ~/nco/data/hdf.cdl # 
+// /usr/bin/ncgen_hdf4 -b -o hdf.hdf hdf.cdl # Anaconda
+// /usr/bin/ncgen_hdf4 -b -o ~/nco/data/hdf.hdf ~/nco/data/hdf.cdl # Anaconda
 
 // URL: 
 // http://dust.ess.uci.edu/nco/hdf.nc
diff --git a/data/ncclimo b/data/ncclimo
index c352460..27fbe47 100755
--- a/data/ncclimo
+++ b/data/ncclimo
@@ -41,7 +41,7 @@
 # scp ~/nco/data/ncclimo cooley.alcf.anl.gov:bin
 # scp ~/nco/data/ncclimo cori.nersc.gov:bin_cori
 # scp ~/nco/data/ncclimo edison.nersc.gov:bin_edison
-# scp ~/nco/data/ncclimo rhea.ccs.ornl.gov:bin
+# scp ~/nco/data/ncclimo rhea.ccs.ornl.gov:bin_rhea
 # scp ~/nco/data/ncclimo yellowstone.ucar.edu:bin
 # scp dust.ess.uci.edu:nco/data/ncclimo ~/bin
 
@@ -56,6 +56,7 @@ fi # HOSTNAME
 # Default input and output directory is ${DATA}
 if [ -z "${DATA}" ]; then
     case "${HOSTNAME}" in 
+	constance* | node* ) DATA='/scratch' ; ;; # PNNL
 	cooley* | cc* | mira* ) DATA="/projects/HiRes_EarthSys/${USER}" ; ;; # ALCF cooley compute nodes named ccNNN, 384 GB/node 
 	cori* | edison* ) DATA="${SCRATCH}" ; ;; # NERSC cori/edison compute nodes all named nidNNNNN, edison 24|64 cores|GB/node; cori 32|128 cores|GB/node (cori login nodes 512 GB)
 	pileus* ) DATA="/lustre/atlas/world-shared/cli115/${USER}" ; ;; # OLCF CADES
@@ -64,7 +65,7 @@ if [ -z "${DATA}" ]; then
 	* ) DATA='/tmp' ; ;; # Other
     esac # !HOSTNAME
 fi # DATA
-# Ensure batch jobs access correct 'mpirun' (or, on cori/edison, 'srun') command, netCDF library, and NCO executables and library:
+# Ensure batch jobs access correct 'mpirun' (or, with SLURM, 'srun') command, netCDF library, and NCO executables and library:
 case "${HOSTNAME}" in 
     aims* )
 	export PATH='/export/zender1/bin'\:${PATH}
@@ -138,10 +139,14 @@ case "${HOSTNAME}" in
 esac # !HOSTNAME
 
 # Production usage:
-# ncclimo -c famipc5_ne120_v0.3_00003 -s 1980 -e 1983 -i /lustre/atlas1/cli115/world-shared/mbranst/famipc5_ne30_v0.3_00003-wget-test -o ${DATA}/ne30/clm
+# ncclimo -c famipc5_ne30_v0.3_00003 -s 1980 -e 1983 -i /lustre/atlas1/cli115/world-shared/mbranst/famipc5_ne30_v0.3_00003-wget-test -o ${DATA}/ne30/clm
 # ncclimo -c famipc5_ne120_v0.3_00003 -s 1980 -e 1983 -i /lustre/atlas1/cli115/world-shared/mbranst/famipc5_ne120_v0.3_00003-wget-test -o ${DATA}/ne120/clm
 # ncclimo -c B1850C5e1_ne30 -s 2 -e 199 -i /lustre/atlas1/cli115/world-shared/mbranst/B1850C5e1_ne30/atm/hist -o ${DATA}/ne30/clm
 
+# Incremental climo testing:
+# ncclimo -v FSNT,AODVIS -c famipc5_ne30_v0.3_00003 -s 1980 -e 1981 -i ${DATA}/ne30/raw -o ${DATA}/ne30/prv -r ${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc
+# ncclimo -v FSNT,AODVIS -c famipc5_ne30_v0.3_00003 -s 1982 -e 1983 -i ${DATA}/ne30/raw -o ${DATA}/ne30/clm -r ${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc -x ${DATA}/ne30/prv -X ${DATA}/ne30/xtn -S 1980
+
 # Debugging and Benchmarking:
 # ncclimo -v FSNT,AODVIS -c famipc5_ne30_v0.3_00003 -s 1980 -e 1983 -i ${DATA}/ne30/raw -o ${DATA}/ne30/clm -r ${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc
 # ncclimo -v TOTEXTTAU -c merra2_198001.nc4 -s 1980 -e 2015 -a sdd -i ${DATA}/merra2/raw -o ${DATA}/merra2/clm
@@ -208,7 +213,7 @@ esac # !HOSTNAME
 #          SCD mode ignores Jan-Nov of yr_srt
 #          Dec of yr_end is excluded from the seasonal and monthly analysis in SCD mode
 #          yr_end should, and for SDD mode must, contain complete year of output
-# drc_out: Output directory for processed, climatological data ("climo files")
+# drc_out: Output directory for processed native grid climatology ("climo files")
 #          User needs write permission for ${drc_out}
 # rgr_map: Regridding map, if non-NULL, invoke regridder with specified map on output datasets
 #          Pass options intended exclusively for the NCO regridder as arguments to the -R switch
@@ -263,13 +268,34 @@ esac # !HOSTNAME
 #          ncclimo -m clm2 ... -R col_nm=lndgrid -r map.nc ...
 # thr_nbr: Thread number to use in NCO regridder, '-t 1' for one thread, '-t 2' for two threads...
 
-# Set script name and run directory
-drc_pwd=`pwd` # [sng] Run directory
-nco_version=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
-spt_nm=`basename ${0}` # [sng] Script name
+# Set script name, directory, PID, run directory, NCO version
+drc_pwd=${PWD}
+# NB: dash supports $0 syntax, not ${BASH_SOURCE[0]} syntax
+# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
+spt_src="${BASH_SOURCE[0]}"
+while [ -h "${spt_src}" ]; do # Recursively resolve ${spt_src} until file is no longer a symlink
+  drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+  spt_src="$(readlink "${spt_src}")"
+  [[ ${spt_src} != /* ]] && spt_src="${drc_spt}/${spt_src}" # If ${spt_src} was relative symlink, resolve it relative to path where symlink file was located
+done
+drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+nco_exe=`which ncks`
+if [ -z "${nco_exe}" ]; then
+    echo "ERROR: Unable to find NCO, nco_exe = ${nco_exe}"
+    exit 1
+fi # !nco_exe
+# Use stackoverflow method to find NCO directory
+while [ -h "${nco_exe}" ]; do
+  drc_nco="$( cd -P "$( dirname "${nco_exe}" )" && pwd )"
+  nco_exe="$(readlink "${nco_exe}")"
+  [[ ${nco_exe} != /* ]] && nco_exe="${drc_nco}/${nco_exe}"
+done
+drc_nco="$( cd -P "$( dirname "${nco_exe}" )" && pwd )"
+nco_vrs=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
+spt_nm=$(basename ${BASH_SOURCE[0]}) # [sng] Script name (Unlike $0, ${BASH_SOURCE[0]} works well with 'source <script>')
 spt_pid=$$ # [nbr] Script PID (process ID)
 
-# When running in a terminal window (not in a non-interactive batch queue)...
+# When running in a terminal window (not in an non-interactive batch queue)...
 if [ -n "${TERM}" ]; then
     # Set fonts for legibility
     fnt_nrm=`tput sgr0` # Normal
@@ -292,10 +318,14 @@ drc_in_mps="${DATA}/mpas/raw" # [sng] Input file directory for MPAS examples
 drc_out='' # [sng] Output file directory
 drc_out_xmp="${DATA}/ne30/clm" # [sng] Output file directory for examples
 drc_out_mps="${DATA}/mpas/clm" # [sng] Output file directory for MPAS examples
+drc_prv='' # [sng] Directory containing previous climatology to extend with current data
 drc_rgr='' # [sng] Regridded file directory
+drc_rgr_prv='' # [sng] Regridded file directory for previous climatology
 drc_rgr_xmp="${DATA}/ne30/rgr" # [sng] Regrid file directory for examples
+drc_rgr_xtn='' # [sng] Regridded file directory for for extended climatology
+drc_xtn='' # [sng] Directory containing extended climatology
 fml_nm='' # [sng] Family name (i.e., nickname, e.g., 'amip', 'control', 'experiment')
-gaa_sng="--gaa climo_script=${spt_nm} --gaa climo_hostname=${HOSTNAME} --gaa climo_version=${nco_version}" # [sng] Global attributes to add
+gaa_sng_std="--gaa climo_script=${spt_nm} --gaa climo_hostname=${HOSTNAME} --gaa climo_version=${nco_vrs}" # [sng] Global attributes to add
 hdr_pad='1000' # [B] Pad at end of header section
 hst_nm='h0' # [sng] History volume (e.g., 'h0', 'h1', 'h')
 mdl_nm='cam' # [sng] Model name (e.g., 'cam', 'cam2', 'cice', 'cism', 'clm', 'clm2', 'ocn')
@@ -314,8 +344,9 @@ rgr_opt='' # [sng] Regridding options (e.g., '--rgr col_nm=lndgrid', '--rgr col_
 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)
-yr_srt='1980' # [yr] Start year
+xtn_flg='No' # [sng] Extend previous climatology with current data
 yr_end='1983' # [yr] End year
+yr_srt='1980' # [yr] Start year
 
 function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_nm{} syntax
     # Print usage
@@ -325,8 +356,8 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     echo "${fnt_rvr}-a${fnt_nrm} ${fnt_bld}clm_md${fnt_nrm}   Annual climatology mode (default ${fnt_bld}${clm_md}${fnt_nrm})"
     echo "${fnt_rvr}-b${fnt_nrm} ${fnt_bld}bnd_nm${fnt_nrm}   Bounds dimension name (default ${fnt_bld}${bnd_nm}${fnt_nrm})"
     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}yr_end${fnt_nrm}   Ending year (default ${fnt_bld}${yr_end}${fnt_nrm})"
+    echo "${fnt_rvr}-d${fnt_nrm} ${fnt_bld}dbg_lvl${fnt_nrm}  Debug level (default ${fnt_bld}${dbg_lvl}${fnt_nrm})"
+    echo "${fnt_rvr}-e${fnt_nrm} ${fnt_bld}yr_end${fnt_nrm}   End year (default ${fnt_bld}${yr_end}${fnt_nrm})"
     echo "${fnt_rvr}-f${fnt_nrm} ${fnt_bld}fml_nm${fnt_nrm}   Family name (nickname) (empty means none) (default ${fnt_bld}${fml_nm}${fnt_nrm})"
     echo "${fnt_rvr}-h${fnt_nrm} ${fnt_bld}hst_nm${fnt_nrm}   History volume name (default ${fnt_bld}${hst_nm}${fnt_nrm})"
     echo "${fnt_rvr}-i${fnt_nrm} ${fnt_bld}drc_in${fnt_nrm}   Input directory (default ${fnt_bld}${drc_in}${fnt_nrm})"
@@ -336,12 +367,16 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     echo "${fnt_rvr}-O${fnt_nrm} ${fnt_bld}drc_rgr${fnt_nrm}  Regridded directory (default ${fnt_bld}${drc_rgr}${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_map${fnt_nrm}  Regridding map (empty means none) (default ${fnt_bld}${rgr_map}${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}-r${fnt_nrm} ${fnt_bld}rgr_map${fnt_nrm}  Regrid map (empty means none) (default ${fnt_bld}${rgr_map}${fnt_nrm})"
+    echo "${fnt_rvr}-R${fnt_nrm} ${fnt_bld}rgr_opt${fnt_nrm}  Regrid options (empty means none) (default ${fnt_bld}${rgr_opt}${fnt_nrm})"
     echo "${fnt_rvr}-t${fnt_nrm} ${fnt_bld}thr_nbr${fnt_nrm}  Thread number for regridder (default ${fnt_bld}${thr_nbr}${fnt_nrm})"
-    echo "${fnt_rvr}-s${fnt_nrm} ${fnt_bld}yr_srt${fnt_nrm}   Starting year (default ${fnt_bld}${yr_srt}${fnt_nrm})"
+    echo "${fnt_rvr}-s${fnt_nrm} ${fnt_bld}yr_srt${fnt_nrm}   Start year (default ${fnt_bld}${yr_srt}${fnt_nrm})"
+    echo "${fnt_rvr}-S${fnt_nrm} ${fnt_bld}yr_prv${fnt_nrm}   Start year previous climo (empty means none) (default ${fnt_bld}${yr_srt_prv}${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}cf_flg${fnt_nrm}   Xperimental switch (for developers) (default ${fnt_bld}${cf_flg}${fnt_nrm})"
+    echo "${fnt_rvr}-X${fnt_nrm} ${fnt_bld}drc_xtn${fnt_nrm}  Extended climo directory (default ${fnt_bld}${drc_xtn}${fnt_nrm})"
+    echo "${fnt_rvr}-x${fnt_nrm} ${fnt_bld}drc_prv${fnt_nrm}  Previous climo directory (default ${fnt_bld}${drc_prv}${fnt_nrm})"
+    echo "${fnt_rvr}-Y${fnt_nrm} ${fnt_bld}rgr_xtn${fnt_nrm}  Regridded extended climo directory (default ${fnt_bld}${drc_rgr_xtn}${fnt_nrm})"
+    echo "${fnt_rvr}-y${fnt_nrm} ${fnt_bld}rgr_prv${fnt_nrm}  Regridded previous climo directory (default ${fnt_bld}${drc_rgr_prv}${fnt_nrm})"
     printf "\n"
     printf "Examples: ${fnt_bld}$spt_nm -c ${caseid_xmp} -s ${yr_srt} -e ${yr_end} -i ${drc_in_xmp} -o ${drc_out_xmp} ${fnt_nrm}\n"
     printf "          ${fnt_bld}$spt_nm -c ${caseid_xmp} -s ${yr_srt} -e ${yr_end} -i ${drc_in_xmp} -o ${drc_out_xmp} -r ~zender/data/maps/map_ne30np4_to_fv129x256_aave.20150901.nc ${fnt_nrm}\n"
@@ -404,7 +439,7 @@ fi # !arg_nbr
 # 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="${spt_nm} ${@}"
-while getopts :a:b:c:d:e:f:h:i:l:m:n:O:o:p:R:r:s:t:v:x: OPT; do
+while getopts :a:b:c:d:e:f:h:i:l:m:n:O:o:p:R:r:S:s:t:v:X:x:Y:y: OPT; do
     case ${OPT} in
 	a) clm_md=${OPTARG} ;; # Climatology mode
 	b) bnd_nm=${OPTARG} ;; # Bounds dimension name
@@ -422,10 +457,14 @@ while getopts :a:b:c:d:e:f:h:i:l:m:n:O:o:p:R:r:s:t:v:x: OPT; do
 	p) par_typ=${OPTARG} ;; # Parallelism type
 	R) rgr_opt=${OPTARG} ;; # Regridding options
 	r) rgr_map=${OPTARG} ;; # Regridding map
+	S) yr_srt_prv=${OPTARG} ;; # Start year previous
 	s) yr_srt=${OPTARG} ;; # Start year
 	t) thr_usr=${OPTARG} ;; # Thread number
 	v) var_lst=${OPTARG} ;; # Variables
-	x) cf_flg=${OPTARG} ;; # CF annotation
+	X) drc_xtn=${OPTARG} ;; # Extended climo directory
+	x) drc_prv=${OPTARG} ;; # Previous climo directory
+	Y) drc_rgr_xtn=${OPTARG} ;; # Regridded extended climo directory
+	y) drc_rgr_prv=${OPTARG} ;; # Regridded previous climo directory
 	\?) # Unrecognized option
 	    printf "\nERROR: Option ${fnt_bld}-$OPTARG${fnt_nrm} not allowed"
 	    fnc_usg_prn ;;
@@ -433,7 +472,7 @@ while getopts :a:b:c:d:e:f:h:i:l:m:n:O:o:p:R:r:s:t:v:x: OPT; do
 done
 shift $((OPTIND-1)) # Advance one argument
 
-# Derived variable
+# Derived variables
 if [ -n "${drc_out_usr}" ]; then
     # Fancy %/ syntax removes trailing slash (e.g., from $TMPDIR)
     drc_out="${drc_out_usr%/}"
@@ -443,6 +482,28 @@ if [ -n "${drc_rgr_usr}" ]; then
 else 
     drc_rgr="${drc_out%/}"
 fi # !drc_rgr_usr
+if [ -n "${drc_prv}" ]; then
+    drc_prv="${drc_prv%/}"
+else
+    drc_prv="${drc_out}"
+fi # !drc_prv
+if [ -n "${drc_xtn}" ]; then
+    drc_xtn="${drc_xtn%/}"
+else
+    drc_xtn="${drc_prv}"
+fi # !drc_xtn
+
+# Doubly-derived variables
+if [ -n "${drc_rgr_prv}" ]; then
+    drc_rgr_prv="${drc_rgr_prv%/}"
+else
+    drc_rgr_prv="${drc_prv%/}"
+fi # !drc_rgr_prv
+if [ -n "${drc_rgr_xtn}" ]; then
+    drc_rgr_xtn="${drc_rgr_xtn%/}"
+else
+    drc_rgr_xtn="${drc_xtn%/}"
+fi # !drc_rgr_xtn
 
 # Determine first full year
 trim_leading_zeros ${yr_srt}
@@ -480,19 +541,14 @@ if [[ "${caseid}" =~ ^(.*)([0-9][0-9][0-9][0-9][01][0-9].nc.?)$ ]]; then
     out_nm=${bs_nm}
     bs_sfx="${caseid#*.}"
 fi # !caseid
-if [ "${mdl_typ}" = 'yyyymm' ]; then
-    printf "Dataset type is generic with YYYYMM. Filenames constructed as ${bs_nm}_YYYYMM.${bs_sfx}\n"
-else # !mdl_typ
-    printf "Dataset type is not generic.\n"
-fi # !mdl_typ
 
-if [ -n "${gaa_sng}" ]; then
+if [ -n "${gaa_sng_std}" ]; then
     if [ "${yr_nbr}" -gt 1 ] ; then
 	yrs_avg_sng="${yr_srt}-${yr_end}"
     else
 	yrs_avg_sng="${yr_srt}"
     fi # !yr_nbr
-    gaa_sng="${gaa_sng} --gaa yrs_averaged=${yrs_avg_sng}"
+    gaa_sng="${gaa_sng_std} --gaa yrs_averaged=${yrs_avg_sng}"
     nco_opt="${nco_opt} ${gaa_sng}"
 fi # !var_lst
 if [ -n "${var_lst}" ]; then
@@ -570,16 +626,17 @@ if [ "${mpi_flg}" = 'Yes' ]; then
 	for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
 	    case "${HOSTNAME}" in 
 		# 20160502: Remove tasks-per-node limits (ntasks, npernode) so round-robin algorithm can schedule multiple jobs on same node
-		cori* | edison* | nid* )
+		constance* | cori* | edison* | nid* | node* )
 		    # 20160502: Non-interactive batch jobs at NERSC return HOSTNAME as nid*, not cori* or edison*
+		    # 20160803: Non-interactive batch jobs at PNNL return HOSTNAME as node*, not constance*
 		    # NB: NERSC staff says srun automatically assigns to unique nodes even without "-L $node" argument?
- 		    cmd_mpi[${clm_idx}]="srun --nodelist ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} --nodes=1" ; ;; # NERSC
-# 		    cmd_mpi[${clm_idx}]="srun --nodelist ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} --nodes=1 --ntasks=1" ; ;; # NERSC
+ 		    cmd_mpi[${clm_idx}]="srun --nodelist ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} --nodes=1" ; ;; # SLURM
+# 		    cmd_mpi[${clm_idx}]="srun --nodelist ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} --nodes=1 --ntasks=1" ; ;; # SLURM
 		hopper* )
 		    # NB: NERSC migrated from aprun to srun in 201601. Hopper commands will soon be deprecated.
 		    cmd_mpi[${clm_idx}]="aprun -L ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} -n 1" ; ;; # NERSC
 		* )
-		    cmd_mpi[${clm_idx}]="mpirun -H ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} -n 1" ; ;; # Other (Cobalt)
+		    cmd_mpi[${clm_idx}]="mpirun -H ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} -n 1" ; ;; # Other (Cobalt, PBS)
 #		    cmd_mpi[${clm_idx}]="mpirun -H ${nd_nm[$(((${clm_idx}-1) % ${nd_nbr}))]} -npernode 1 -n 1" ; ;; # Other
 	    esac # !HOSTNAME
 	done # !clm_idx
@@ -609,9 +666,13 @@ if [ ${dbg_lvl} -ge 1 ]; then
     printf "dbg: clm_md   = ${clm_md}\n"
     printf "dbg: dbg_lvl  = ${dbg_lvl}\n"
     printf "dbg: drc_in   = ${drc_in}\n"
+    printf "dbg: drc_nco  = ${drc_nco}\n"
     printf "dbg: drc_out  = ${drc_out}\n"
+    printf "dbg: drc_prv  = ${drc_prv}\n"
     printf "dbg: drc_pwd  = ${drc_pwd}\n"
     printf "dbg: drc_rgr  = ${drc_rgr}\n"
+    printf "dbg: drc_spt  = ${drc_spt}\n"
+    printf "dbg: drc_xtn  = ${drc_xtn}\n"
     printf "dbg: fml_nm   = ${fml_nm}\n"
     printf "dbg: gaa_sng  = ${gaa_sng}\n"
     printf "dbg: hdr_pad  = ${hdr_pad}\n"
@@ -626,6 +687,7 @@ if [ ${dbg_lvl} -ge 1 ]; then
     printf "dbg: rgr_sfx  = ${rgr_sfx}\n"
     printf "dbg: thr_nbr  = ${thr_nbr}\n"
     printf "dbg: var_lst  = ${var_lst}\n"
+    printf "dbg: xtn_flg  = ${xtn_flg}\n"
     printf "dbg: yyyy_end = ${yyyy_end}\n"
     printf "dbg: yyyy_srt = ${yyyy_srt}\n"
 fi # !dbg
@@ -652,6 +714,16 @@ if [ ${dbg_lvl} -ge 0 ]; then
     echo "${cmd_ln}"
 fi # !dbg
 printf "Started climatology generation for dataset ${caseid} at `date`.\n"
+printf "Running climatology script ${spt_nm} from directory ${drc_spt}\n"
+printf "NCO version ${nco_vrs} from directory ${drc_nco}\n"
+printf "Input files in directory ${drc_in}\n"
+#printf "Intermediate/temporary files written to directory ${drc_tmp}\n"
+printf "Output files to directory ${drc_out}\n"
+if [ "${mdl_typ}" = 'yyyymm' ]; then
+    printf "Filenames will be constructed with generic conventions as ${bs_nm}_YYYYMM.${bs_sfx}\n"
+else # !mdl_typ
+    printf "Filenames will be constructed with CESM'ish or ACME'ish conventions.\n"
+fi # !mdl_typ
 printf "Climatology from ${yr_nbr} years of contiguous data crossing ${yr_cln} calendar years from YYYYMM = ${yyyy_clm_srt_dec}${mm_ann_srt} to ${yyyy_end}${mm_ann_end}.\n"
 if [ ${clm_md} = 'scd' ]; then 
     printf "Winter statistics based on seasonally contiguous December (scd-mode): DJF sequences are consecutive months that cross calendar-year boundaries.\n"
@@ -668,7 +740,6 @@ if [ -n "${rgr_map}" ]; then
 else
     printf "This climatology will not be regridded.\n"
 fi # !rgr
-printf "NCO version is ${nco_version}\n"
 
 # Block 1: Climatological monthly means
 # Block 1 Loop 1: Generate, check, and store (but do not yet execute) monthly commands
@@ -732,12 +803,12 @@ for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
 	    # http://tldp.org/LDP/abs/html/string-manipulation.html
 	    dfl_sfx='rgr'
 	    rgr_sfx=`expr match "${rgr_map}" '.*_to_\(.*\).nc'`
-	    if [ "${#rgr_sfx}" -eq  0 ]; then
+	    if [ "${#rgr_sfx}" -eq 0 ]; then
 		printf "${spt_nm}: WARNING Unable to extract geometric suffix from mapfile, will suffix regridded files with \"${dfl_sfx}\" instead\n"
 		rgr_sfx=${dfl_sfx}
 	    else
 		yyyymmdd_sng=`expr match "${rgr_sfx}" '.*\(\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\)'` # Find YYYYYMMDD
-		if [ "${#yyyymmdd_sng}" -ne  0 ]; then
+		if [ "${#yyyymmdd_sng}" -ne 0 ]; then
 		    rgr_sfx=${rgr_sfx%%${yyyymmdd_sng}} # Delete YYYYYMMDD
 		fi # !strlen
 	    fi # !strlen
@@ -824,13 +895,6 @@ cmd_clm[14]="${cmd_mpi[14]} ncra --cb -O -w 30,31,31 ${nco_opt} ${fl_out[6]} ${f
 cmd_clm[15]="${cmd_mpi[15]} ncra --cb -O -w 30,31,30 ${nco_opt} ${fl_out[9]} ${fl_out[10]} ${fl_out[11]} ${fl_out[15]}"
 cmd_clm[16]="${cmd_mpi[16]} ncra --cb -O -w 31,31,28 ${nco_opt} ${fl_out[12]} ${fl_out[1]} ${fl_out[2]} ${fl_out[16]}"
 
-# PMC: next line hacks code to use AMWG weights instead of NCO weights
-#printf "MAJOR KLUDGE: FORCING USE OF AMWG WTS!!!"
-#cmd_clm[13]="${cmd_mpi[13]} ncra -O --no_nrm -w 0.3369565308094025,0.3260869681835175,0.3369565308094025 ${nco_opt} ${fl_out[3]} ${fl_out[4]} ${fl_out[5]} ${fl_out[13]}"
-#cmd_clm[14]="${cmd_mpi[14]} ncra -O --no_nrm -w 0.3260869681835175,0.3369565308094025,0.3369565308094025 ${nco_opt} ${fl_out[6]} ${fl_out[7]} ${fl_out[8]} ${fl_out[14]}"
-#cmd_clm[15]="${cmd_mpi[15]} ncra -O --no_nrm -w 0.32967033,0.34065934,0.32967033 ${nco_opt} ${fl_out[9]} ${fl_out[10]} ${fl_out[11]} ${fl_out[15]}"
-#cmd_clm[16]="${cmd_mpi[16]} ncra -O --no_nrm -w 0.3444444537162781,0.3444444537162781,0.3111111223697662 ${nco_opt} ${fl_out[12]} ${fl_out[1]} ${fl_out[2]} ${fl_out[16]}"
-
 # Block 2 Loop 2: Execute and/or echo seasonal climatology commands
 for ((clm_idx=13;clm_idx<=16;clm_idx++)); do
     if [ ${dbg_lvl} -ge 1 ]; then
@@ -990,17 +1054,200 @@ if [ ${lnk_flg} = 'Yes' ]; then
     cd ${drc_pwd}
 fi # !lnk_flg
     
+# Incremental climos
+if [ -n "${yr_srt_prv}" ]; then
+    mkdir -p ${drc_prv}
+    mkdir -p ${drc_xtn}
+
+    trim_leading_zeros ${yr_srt_prv}
+    yr_srt_rth_prv=${sng_trm}
+    yyyy_srt_prv=`printf "%04d" ${yr_srt_rth_prv}`
+    let yr_srtm1_prv=${yr_srt_rth_prv}-1
+    let yr_end_prv=${yr_srt_rth}-1
+    trim_leading_zeros ${yr_end_prv}
+    yr_end_rth_prv=${sng_trm}
+    yyyy_end_prv=`printf "%04d" ${yr_end_rth_prv}`
+    let yr_endm1_prv=${yr_end_rth_prv}-1
+    let yr_nbr_prv=${yr_end_rth_prv}-${yr_srt_rth_prv}+1
+    let yr_nbr_xtn=${yr_end_rth}-${yr_srt_rth_prv}+1
+    yyyy_clm_srt_dec_prv=${yyyy_srt_prv}
+    wgt_prv=$(echo "${yr_nbr_prv}/${yr_nbr_xtn}" | bc -l)
+    wgt_crr=$(echo "${yr_nbr}/${yr_nbr_xtn}" | bc -l)
+    printf "Incrementally produce extended climatology as weighted average of previous and current climatologies:\n"
+    printf "Previous climatology is ${yr_nbr_prv} years from ${yyyy_clm_srt_dec_prv}${mm_ann_srt} to ${yyyy_end_prv}${mm_ann_end}, weight = ${wgt_prv}\n"
+    printf "Current  climatology is ${yr_nbr} years from ${yyyy_clm_srt_dec}${mm_ann_srt} to ${yyyy_end}${mm_ann_end}, weight = ${wgt_crr}\n"
+    printf "Extended climatology is ${yr_nbr_xtn} years from ${yyyy_clm_srt_dec_prv}${mm_ann_srt} to ${yyyy_end}${mm_ann_end}\n"
+    
+    # Replace yr_srt by yr_srt_prv in "yrs_averaged" attribute
+    nco_opt="${nco_opt/${yr_srt}-/${yr_srt_prv}-}"
+    
+    clm_idx=0
+    for mth in {01..12}; do
+	let clm_idx=${clm_idx}+1
+	MM=`printf "%02d" ${clm_idx}`
+	fl_prv[${clm_idx}]="${drc_prv}/${out_nm}_${MM}_${yyyy_srt_prv}${MM}_${yyyy_end_prv}${MM}_climo.nc"
+	fl_xtn[${clm_idx}]="${drc_xtn}/${out_nm}_${MM}_${yyyy_srt_prv}${MM}_${yyyy_end}${MM}_climo.nc"
+    done # !mth
+    if [ ${clm_md} = 'scd' ]; then 
+	yyyy_clm_srt_dec_prv=`printf "%04d" ${yr_srtm1_prv}`
+	yyyy_clm_end_dec_prv=`printf "%04d" ${yr_endm1_prv}`
+	clm_idx=12
+	MM=`printf "%02d" ${clm_idx}`
+	fl_prv[${clm_idx}]="${drc_prv}/${out_nm}_${MM}_${yyyy_clm_srt_dec_prv}${MM}_${yyyy_clm_end_dec_prv}${MM}_climo.nc"
+	fl_xtn[${clm_idx}]="${drc_xtn}/${out_nm}_${MM}_${yyyy_clm_srt_dec_prv}${MM}_${yyyy_clm_end_dec}${MM}_climo.nc"
+    fi # !scd
+
+    fl_prv[13]="${drc_prv}/${out_nm}_MAM_${yyyy_srt_prv}03_${yyyy_end_prv}05_climo.nc"
+    fl_prv[14]="${drc_prv}/${out_nm}_JJA_${yyyy_srt_prv}06_${yyyy_end_prv}08_climo.nc"
+    fl_prv[15]="${drc_prv}/${out_nm}_SON_${yyyy_srt_prv}09_${yyyy_end_prv}11_climo.nc"
+    fl_prv[16]="${drc_prv}/${out_nm}_DJF_${yyyy_clm_srt_dec_prv}${mm_djf_srt}_${yyyy_end_prv}${mm_djf_end}_climo.nc"
+    fl_prv[17]="${drc_prv}/${out_nm}_ANN_${yyyy_clm_srt_dec_prv}${mm_ann_srt}_${yyyy_end_prv}${mm_ann_end}_climo.nc"
+
+    fl_xtn[13]="${drc_xtn}/${out_nm}_MAM_${yyyy_srt_prv}03_${yyyy_end}05_climo.nc"
+    fl_xtn[14]="${drc_xtn}/${out_nm}_JJA_${yyyy_srt_prv}06_${yyyy_end}08_climo.nc"
+    fl_xtn[15]="${drc_xtn}/${out_nm}_SON_${yyyy_srt_prv}09_${yyyy_end}11_climo.nc"
+    fl_xtn[16]="${drc_xtn}/${out_nm}_DJF_${yyyy_clm_srt_dec_prv}${mm_djf_srt}_${yyyy_end}${mm_djf_end}_climo.nc"
+    fl_xtn[17]="${drc_xtn}/${out_nm}_ANN_${yyyy_clm_srt_dec_prv}${mm_ann_srt}_${yyyy_end}${mm_ann_end}_climo.nc"
+
+    # Derive all seventeen regridded and AMWG names from output names
+    for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
+	fl_rgr_prv[${clm_idx}]="${fl_rgr[${clm_idx}]/${drc_rgr}/${drc_rgr_prv}}"
+	fl_rgr_prv[${clm_idx}]="${fl_rgr_prv[${clm_idx}]/_${yyyy_srt}/_${yyyy_srt_prv}}"
+	fl_rgr_prv[${clm_idx}]="${fl_rgr_prv[${clm_idx}]/_${yyyy_end}/_${yyyy_end_prv}}"
+
+	fl_rgr_xtn[${clm_idx}]="${fl_rgr[${clm_idx}]/${drc_rgr}/${drc_rgr_xtn}}"
+	fl_rgr_xtn[${clm_idx}]="${fl_rgr_xtn[${clm_idx}]/_${yyyy_srt}/_${yyyy_srt_prv}}"
+
+	fl_amwg_xtn[${clm_idx}]=`expr match "${fl_xtn[${clm_idx}]}" '\(.*\)_.*_.*_climo.nc'` # Prune _YYYYYMM_YYYYMM_climo.nc
+	fl_amwg_xtn[${clm_idx}]="${fl_amwg[${clm_idx}]}_climo.nc" # Replace with _climo.nc
+	fl_amwg_xtn[${clm_idx}]="${fl_amwg[${clm_idx}]/${drc_xtn}\//}" # Delete prepended path to ease symlinking
+	if [ ${clm_md} = 'scd' ] ; then
+	    # Handle Dec, DJF, and ANN
+	    if [ ${clm_idx} -eq 12 ] || [ ${clm_idx} -eq 16 ] || [ ${clm_idx} -eq 17 ] ; then 
+		fl_rgr_prv[${clm_idx}]="${fl_rgr[${clm_idx}]/${drc_rgr}/${drc_rgr_prv}}"
+		fl_rgr_prv[${clm_idx}]="${fl_rgr_prv[${clm_idx}]/_${yyyy_clm_srt_dec}/_${yyyy_clm_srt_dec_prv}}"
+		if [ ${clm_idx} -eq 12 ] ; then 
+		    fl_rgr_prv[${clm_idx}]="${fl_rgr_prv[${clm_idx}]/_${yyyy_clm_end_dec}/_${yyyy_clm_end_dec_prv}}"
+		else
+		    fl_rgr_prv[${clm_idx}]="${fl_rgr_prv[${clm_idx}]/_${yyyy_end}/_${yyyy_end_prv}}"
+		fi # !Dec
+
+		fl_rgr_xtn[${clm_idx}]="${fl_rgr[${clm_idx}]/${drc_rgr}/${drc_rgr_xtn}}"
+		fl_rgr_xtn[${clm_idx}]="${fl_rgr_xtn[${clm_idx}]/_${yyyy_clm_srt_dec}/_${yyyy_clm_srt_dec_prv}}"
+	    fi # !Dec, DJF, ANN
+	fi # !clm_md
+    done # !clm_idx
+
+    printf "Weight previous and new native-grid climos to produce extended climo...\n"
+    for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
+	cmd_xtn[${clm_idx}]="${cmd_mpi[${clm_idx}]} ncflint -O ${nco_opt} -w ${wgt_prv},${wgt_crr} ${fl_prv[${clm_idx}]} ${fl_out[${clm_idx}]} ${fl_xtn[${clm_idx}]}"
+	if [ ${dbg_lvl} -ge 1 ]; then
+	    echo ${cmd_xtn[${clm_idx}]}
+	fi # !dbg
+	if [ ${dbg_lvl} -le 1 ]; then
+	    if [ -z "${par_opt}" ]; then
+		eval ${cmd_xtn[${clm_idx}]}
+		if [ $? -ne 0 ]; then
+		    printf "${spt_nm}: ERROR extended climo cmd_xtn[${clm_idx}] failed. Debug this:\n${cmd_xtn[${clm_idx}]}\n"
+		    exit 1
+		fi # !err
+	    else # !par_opt
+		eval ${cmd_xtn[${clm_idx}]} ${par_opt} # eval always returns 0 on backgrounded processes
+		xtn_pid[${clm_idx}]=$!
+	    fi # !par_opt
+	fi # !dbg
+    done # !clm_idx
+    if [ -n "${par_opt}" ]; then
+	for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
+	    wait ${xtn_pid[${clm_idx}]}
+	    if [ $? -ne 0 ]; then
+		printf "${spt_nm}: ERROR extended climo cmd_xtn[${clm_idx}] failed. Debug this:\n${cmd_xtn[${clm_idx}]}\n"
+		exit 1
+	    fi # !err
+	done # !clm_idx
+    fi # !par_opt
+    wait
+
+    if [ -n "${rgr_map}" ]; then 
+	printf "Weight previous and new regridded climos to produce extended regridded climo...\n"
+	for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
+	    cmd_rgr_xtn[${clm_idx}]="${cmd_mpi[${clm_idx}]} ncflint -O ${nco_opt} -w ${wgt_prv},${wgt_crr} ${fl_rgr_prv[${clm_idx}]} ${fl_rgr[${clm_idx}]} ${fl_rgr_xtn[${clm_idx}]}"
+	    if [ ${dbg_lvl} -ge 1 ]; then
+		echo ${cmd_rgr_xtn[${clm_idx}]}
+	    fi # !dbg
+	    if [ ${dbg_lvl} -le 1 ]; then
+		if [ -z "${par_opt}" ]; then
+		    eval ${cmd_rgr_xtn[${clm_idx}]}
+		    if [ $? -ne 0 ]; then
+			printf "${spt_nm}: ERROR extended climo cmd_rgr_xtn[${clm_idx}] failed. Debug this:\n${cmd_rgr_xtn[${clm_idx}]}\n"
+			exit 1
+		    fi # !err
+		else # !par_opt
+		    eval ${cmd_rgr_xtn[${clm_idx}]} ${par_opt} # eval always returns 0 on backgrounded processes
+		    rgr_xtn_pid[${clm_idx}]=$!
+		fi # !par_opt
+	    fi # !dbg
+	done # !clm_idx
+	if [ -n "${par_opt}" ]; then
+	    for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
+		wait ${rgr_xtn_pid[${clm_idx}]}
+		if [ $? -ne 0 ]; then
+		    printf "${spt_nm}: ERROR extended climo cmd_rgr_xtn[${clm_idx}] failed. Debug this:\n${cmd_rgr_xtn[${clm_idx}]}\n"
+		    exit 1
+		fi # !err
+	    done # !clm_idx
+	fi # !par_opt
+	wait
+    fi # !rgr_map
+    
+    # Link ACME-climo to AMWG-climo filenames
+    # drc_pwd is always fully qualified path but drc_out and drc_rgr may be relative paths
+    # Strategy: Start in drc_pwd, cd to drc_rgr, then link so return code comes from ln not cd
+    if [ ${lnk_flg} = 'Yes' ]; then
+	printf "Link extended ACME-climo to AMWG-climo filenames...\n"
+	for ((clm_idx=1;clm_idx<=17;clm_idx++)); do
+	    if [ -n "${rgr_map}" ]; then 
+		cmd_lnk_xtn[${clm_idx}]="cd ${drc_pwd};cd ${drc_rgr_xtn};ln -s -f ${fl_rgr_xtn[${clm_idx}]/${drc_rgr_xtn}\//} ${fl_amwg[${clm_idx}]/${drc_rgr_xtn}\//}"
+	    else
+		cmd_lnk_xtn[${clm_idx}]="cd ${drc_pwd};cd ${drc_xtn};ln -s -f ${fl_xtn[${clm_idx}]/${drc_xtn}\//} ${fl_amwg[${clm_idx}]/${drc_xtn}\//}"
+	    fi # !rgr_map
+	    if [ ${dbg_lvl} -ge 1 ]; then
+		echo ${cmd_lnk_xtn[${clm_idx}]}
+	    fi # !dbg
+	    if [ ${dbg_lvl} -le 1 ]; then
+		eval ${cmd_lnk_xtn[${clm_idx}]}
+		if [ $? -ne 0 ]; then
+		    printf "${spt_nm}: ERROR linking ACME to AMWG filename cmd_lnk_xtn[${clm_idx}] failed. Debug this:\n${cmd_lnk_xtn[${clm_idx}]}\n"
+		    exit 1
+		fi # !err
+	    fi # !dbg
+	done # !clm_idx
+	cd ${drc_pwd}
+    fi # !lnk_flg
+
+fi # !yr_srt_prv incremental climos
+
 date_end=$(date +"%s")
 printf "Completed climatology generation for dataset ${caseid} at `date`.\n"
 date_dff=$((date_end-date_srt))
 echo "Quick plots of climatological annual mean:"
-if [ -n "${rgr_map}" ]; then 
-    echo "ncview ${fl_rgr[17]} &"
-    echo "panoply ${fl_rgr[17]} &"
+if [ -n "${yr_srt_prv}" ]; then
+    if [ -n "${rgr_map}" ]; then 
+	echo "ncview ${fl_rgr_xtn[17]} &"
+	echo "panoply ${fl_rgr_xtn[17]} &"
+    else
+	echo "ncview ${fl_xtn[17]} &"
+	echo "panoply ${fl_xtn[17]} &"
+    fi # !rgr_map    
 else
-    echo "ncview ${fl_out[17]} &"
-    echo "panoply ${fl_out[17]} &"
-fi # !rgr_map    
+    if [ -n "${rgr_map}" ]; then 
+	echo "ncview ${fl_rgr[17]} &"
+	echo "panoply ${fl_rgr[17]} &"
+    else
+	echo "ncview ${fl_out[17]} &"
+	echo "panoply ${fl_out[17]} &"
+    fi # !rgr_map    
+fi # !yr_srt_prv
 echo "Elapsed time $((date_dff/60))m$((date_dff % 60))s"
 
 # PMC: add SMB's Git (SHA1) hash info to climo files
diff --git a/data/ncremap b/data/ncremap
index 63e1b23..b202f90 100755
--- a/data/ncremap
+++ b/data/ncremap
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Purpose: Regrid (subsets of) netCDF files, possibly on different grids
+# Purpose: Regrid (subsets of) netCDF files between different grids, generate rectangular grids (in SCRIP format), generate mapfiles
 
 # Copyright (C) 2015-2016 Charlie Zender
 # This file is part of NCO, the netCDF Operators. NCO is free software.
@@ -143,7 +143,7 @@ esac # !HOSTNAME
 # 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}/ne30/raw -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 -i ${DATA}/hdf/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
@@ -177,16 +177,40 @@ esac # !HOSTNAME
 #          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
 
-# Set script name and run directory
+# Set script name, directory, PID, run directory, NCO version
 drc_pwd=${PWD}
-nco_version=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
-spt_nm=$(basename ${0}) # [sng] Script name
+# NB: dash supports $0 syntax, not ${BASH_SOURCE[0]} syntax
+# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
+spt_src="${BASH_SOURCE[0]}"
+while [ -h "${spt_src}" ]; do # Recursively resolve ${spt_src} until file is no longer a symlink
+  drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+  spt_src="$(readlink "${spt_src}")"
+  [[ ${spt_src} != /* ]] && spt_src="${drc_spt}/${spt_src}" # If ${spt_src} was relative symlink, resolve it relative to path where symlink file was located
+done
+drc_spt="$( cd -P "$( dirname "${spt_src}" )" && pwd )"
+nco_exe=`which ncks`
+if [ -z "${nco_exe}" ]; then
+    echo "ERROR: Unable to find NCO, nco_exe = ${nco_exe}"
+    exit 1
+fi # !nco_exe
+# Use stackoverflow method to find NCO directory
+while [ -h "${nco_exe}" ]; do
+  drc_nco="$( cd -P "$( dirname "${nco_exe}" )" && pwd )"
+  nco_exe="$(readlink "${nco_exe}")"
+  [[ ${nco_exe} != /* ]] && nco_exe="${drc_nco}/${nco_exe}"
+done
+drc_nco="$( cd -P "$( dirname "${nco_exe}" )" && pwd )"
+nco_vrs=$(ncks --version 2>&1 >/dev/null | grep NCO | awk '{print $5}')
+spt_nm=$(basename ${BASH_SOURCE[0]}) # [sng] Script name (Unlike $0, ${BASH_SOURCE[0]} works well with 'source <script>')
 spt_pid=$$ # [nbr] Script PID (process ID)
 
-# Set fonts for legibility
-fnt_nrm=`tput sgr0` # Normal
-fnt_bld=`tput bold` # Bold
-fnt_rvr=`tput smso` # Reverse
+# When running in a terminal window (not in an non-interactive batch queue)...
+if [ -n "${TERM}" ]; then
+    # Set fonts for legibility
+    fnt_nrm=`tput sgr0` # Normal
+    fnt_bld=`tput bold` # Bold
+    fnt_rvr=`tput smso` # Reverse
+fi # !TERM
 
 # Defaults for command-line options and some derived variables
 # Modify these defaults to save typing later
@@ -205,7 +229,7 @@ dst_xmp='dst.nc' # [sng] Destination file for examples
 #esmf_opt='--ignore_unmapped --netcdf4' # [sng] ESMF_RegridWeightGen options
 esmf_opt='--ignore_unmapped' # [sng] ESMF_RegridWeightGen options
 fl_nbr=0 # [nbr] Number of files to remap
-gaa_sng="--gaa remap_script=${spt_nm} --gaa remap_hostname=${HOSTNAME} --gaa remap_version=${nco_version}" # [sng] Global attributes to add
+gaa_sng="--gaa remap_script=${spt_nm} --gaa remap_hostname=${HOSTNAME} --gaa remap_version=${nco_vrs}" # [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
@@ -287,6 +311,7 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     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 -s ${grd_src_xmp} -g ${grd_dst_xmp} -m ${map_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"
@@ -531,23 +556,30 @@ fi # !map_mk
 if [ -n "${map_fl}" ]; then 
     map_usr_flg='Yes'
     if [ "${map_mk}" = 'Yes' ]; then
+	# Confirm before overwriting maps
         if [ -f "${map_fl}" ]; then
-	    rsp_kbd_nbr=0
-	    while [ ${rsp_kbd_nbr} -lt 10 ]; do
-		echo "WARNING: The file ${map_fl} already exists and will be over-written by the newly generated map-file."
-		read -p "Continue (y/n)? " rsp_kbd
-		let rsp_kbd_nbr+=1
-		case "${rsp_kbd}" in
-		    N*|n*) exit 1 ;;
-		    Y*|y*) break ;;
-		    *) continue ;;
-		esac
-	    done # !rsp_kbd_nbr
-	    if [ ${rsp_kbd_nbr} -ge 10 ]; then
-		echo "ERROR: Too many invalid responses, exiting"
-		exit 1
-	    fi # !rsp_kbd_nbr
-	fi # ! -f
+	    # 20160803: fxm get to work on Interactive shells only (block hangs on read() in non-interactive shells)
+#	    if [[ -t 0 || -p /dev/stdin ]]; then
+#           if [ -n "${TERM}" ]; then
+#           if [ -n "${PS1}" ]; then
+            if [ 1 -eq 0 ]; then
+		rsp_kbd_nbr=0
+		while [ ${rsp_kbd_nbr} -lt 10 ]; do
+		    echo "WARNING: Map-file ${map_fl} already exists and will be over-written."
+		    read -p "Continue (y/n)? " rsp_kbd
+		    let rsp_kbd_nbr+=1
+		    case "${rsp_kbd}" in
+			N*|n*) exit 1 ;;
+			Y*|y*) break ;;
+			*) continue ;;
+		    esac
+		done # !rsp_kbd_nbr
+		if [ ${rsp_kbd_nbr} -ge 10 ]; then
+		    echo "ERROR: Too many invalid responses, exiting"
+		    exit 1
+		fi # !rsp_kbd_nbr
+	    fi # !0
+	fi # !map_fl
     else # !map_mk
         if [ ! -f "${map_fl}" ]; then
 	    echo "ERROR: Unable to find specified regrid map ${map_fl}"
@@ -723,7 +755,11 @@ if [ -f 'PET0.RegridWeightGen.Log' ]; then
     /bin/rm -f PET0.RegridWeightGen.Log
 fi # !PETO
 printf "Started processing at `date`.\n"
-printf "NCO ${spt_nm} version is ${nco_version}\n"
+printf "Running remap script ${spt_nm} from directory ${drc_spt}\n"
+printf "NCO version ${nco_vrs} from directory ${drc_nco}\n"
+printf "Input files in or relative to directory ${drc_in}\n"
+printf "Intermediate/temporary files written to directory ${drc_tmp}\n"
+printf "Output files to directory ${drc_out}\n"
 if [ "${map_mk}" != 'Yes' ] && [ "${map_usr_flg}" = 'Yes' ] && [ -n "${wgt_usr}" ]; then
     printf "${spt_nm}: ERROR Specifying both '-m map_fl' and '-w wgt_gnr' is only allowed when creating a map (weight generator is superfluous when map is supplied)\n"
     exit 1
@@ -805,7 +841,7 @@ else # !map_usr_flg
 	printf "TempestRemap's GenerateOverlapMesh and GenerateOfflineMap will generate mapping weights and map-file\n"
 	wgt_cmd='GenerateOverlapMesh'
     fi # !tempest
-    command -v ${wgt_cmd} 2>&1 /dev/null || { printf "${spt_nm}: ERROR cannot find weight-generation command ${wgt_cmd}. Please install the executable, or change your PATH to find it.\n${spt_nm}: HINT ESMF_RegridWeightGen is often provided in NCL packages. Tempest executables must be installed from source."; exit 1; }
+    command -v ${wgt_cmd} 2>&1 /dev/null || { printf "${spt_nm}: ERROR cannot find weight-generation command ${wgt_cmd}. Please install the executable, or change your PATH to find it.\n${spt_nm}: HINT ESMF_RegridWeightGen is often provided in NCL packages. Tempest executables must be installed from source (https://github.com/ClimateGlobalChange/tempestremap)."; exit 1; }
     if [ ${fl_nbr} -ge 2 ]; then 
 	if [ "${mlt_map_flg}" = 'Yes' ]; then 
 	    printf "Input files assumed to use unique input grids\nOne source grid-file will be inferred and one map-file generated per input file\n"
@@ -902,14 +938,14 @@ for ((fl_idx=0;fl_idx<${fl_nbr};fl_idx++)); do
 	if [ "${pdq_typ}" = 'hirdls' ] || [ "${pdq_typ}" = 'mls' ]; then
 	    # Pre-process zonal input files so grid inferral works
 	    # 20160214: fix record variable to work around ncpdq problem
-	    cmd_znl[${fl_idx}]="ncecat -u lon ${nco_opt} ${nco_var_lst} ${in_fl} ${in_fl} ${in_fl} ${in_fl} ${znl_fl/znl/znl1};ncap2 ${nco_opt} -s 'lon[\$lon]={0.0,90.0,180.0,270.0}' ${znl_fl/znl/znl1} ${znl_fl/znl/znl2};ncks --fix_rec_dmn lon ${nco_opt} ${nco_var_lst} ${znl_fl/znl/znl2} ${znl_fl/znl/znl3};"
-	    in_fl="${znl_fl/znl/znl3}"
+	    cmd_znl[${fl_idx}]="ncecat -u lon ${nco_opt} ${nco_var_lst} ${in_fl} ${in_fl} ${in_fl} ${in_fl} ${znl_fl/znl/znl1};ncap2 ${nco_opt} -s 'lon[\$lon]={0.0,90.0,180.0,270.0}' ${znl_fl/znl/znl1} ${znl_fl/znl/znl2}"
+	    in_fl="${znl_fl/znl/znl2}"
 	    if [ ${dbg_lvl} -ge 1 ]; then
 		echo ${cmd_znl[${fl_idx}]}
 	    fi # !dbg
 	    if [ ${dbg_lvl} -ne 2 ]; then
 		eval ${cmd_znl[${fl_idx}]}
-		if [ $? -ne 0 ] || [ ! -f "${znl_fl/znl/znl3}" ]; then
+		if [ $? -ne 0 ] || [ ! -f "${znl_fl/znl/znl2}" ]; then
 		    printf "${spt_nm}: ERROR Failed to generate lat-lon file from zonal file. Debug this:\n${cmd_znl[${fl_idx}]}\n"
 		    exit 1
 		fi # !err
@@ -1109,7 +1145,7 @@ fi # !par_typ
 
 if [ "${cln_flg}" = 'Yes' ]; then
     printf "Cleaning-up intermediate files...\n"
-    /bin/rm -f ${att_fl} ${grd_dst_dfl} ${grd_src_dfl} ${map_fl_dfl} ${msh_fl_dfl} ${ncwa_fl} ${pdq_fl} ${tmp_out_fl} ${znl_fl/znl/znl1} ${znl_fl/znl/znl2} ${znl_fl/znl/znl3}
+    /bin/rm -f ${att_fl} ${grd_dst_dfl} ${grd_src_dfl} ${map_fl_dfl} ${msh_fl_dfl} ${ncwa_fl} ${pdq_fl} ${tmp_out_fl} ${znl_fl/znl/znl1} ${znl_fl/znl/znl2}
 fi # !cln_flg
 
 date_end=$(date +"%s")
diff --git a/data/vpointer-ex0.nco b/data/vpointer-ex0.nco
new file mode 100644
index 0000000..24a4c12
--- /dev/null
+++ b/data/vpointer-ex0.nco
@@ -0,0 +1,141 @@
+// a brief description of variable pointers
+// variable pointers are nothing more than 
+// attributes with text 
+
+idx=9;
+idy=20;
+t2=time;
+
+
+global at vpointerX="idx";
+
+// lets increment idx by one
+// the '*' says I want to do something to the actual var defined in the text
+*global at vpointerX++;
+print(idx);
+
+
+// lets now multiply idx by 5
+*global at vpointerX=*global at vpointerX*5;
+
+// OK the above is a bit a bit long 
+// we can re-write is as:
+*@vpointerX*=5;  // idx now equals 250
+print(idx);
+
+// OK so if an att is missing the var name prefix then it defaults
+// to "global" - But you are free to use any var-name 
+
+ at vpointerY="idy";
+
+// lets add together idx and idy
+idz=*@vpointerX+*@vpointerY;  // idz == 270
+print(idz);
+
+// we can also reference variables in  the input file
+// can use an existing att pointer as atts are not written
+// to the netcdf file until after script has finished
+ at vpointerX="three_dmn_var";
+
+// we can convert the above var to type NC_DOUBLE and 
+// write  it to ouptut all in one go 
+*@vpointerX=*@vpointerX.double();
+
+// So far the above pointers are of type NC_CHAR 
+// we can also use type NC_STRING -  So whats the difference ?
+// Well an NC_CHAR attribute is a list of N  characters where N is 
+// the length of the attribute
+// AN NC_STRING attribute is a list of N strings where each string is
+// null terminated ( like regular C strings) 
+// Well why do we care ? Well if we want to peform operations on a 
+// bunch  of variables the it is much easier to use a single NC_STRING 
+// att than an array of NC_CHAR's 
+
+
+// the postfix "s" indicates that the string is of type NC_STRING
+ at coordinates="idx"s;
+
+//lets add the Y
+push(&@coordinates,"idy"s);
+//lets ad the Z
+push(&@coordinates,"idz"s);
+
+print(@coordinates,"%s\n"); // "idx","idy", "idz"
+
+// Now things are more interesting - we can can perform a set of operations 
+// on the  list of vars
+*sz=@coordinates.size();
+
+for(*icnt=0; icnt<sz;icnt++)
+{
+ // A very important point here. We can only dereference a plain  att
+ // and NOT an attribute expression we can NOT say *@coordinates(idx).set_miss(-1)
+ // So we have to use an intermediate att
+ @var_nm=@coordinates(icnt); 
+ //lets set the missing value
+ *@var_nm.set_miss(-1);
+
+ //lets add a unit attribute using vpointers
+ @var_nm_units= push( sprint(@var_nm), "@units");
+ // WOW what just happened!! That looks complicated !!
+ // OK lets take it step-by-step 
+ // @var_nm is of type NC_STRING - we convert it to type NC_CHAR using sprint()
+ // and then append to it "@units" using push()
+
+ // so we can now dereference the vpointer (which in this case is an att)
+ // and assign it a value 
+ *@var_nm_units="metres";
+}
+
+
+// Push Revisited 
+// push simply appends values to an att
+// With the numerical types, if the type of the value(s) being pushed is 
+// different from the att type the it is auto-magically converted to the att type 
+// anything can be pushed - an att or var or expression
+
+x[time]=time;
+
+x at coords=1.0d;
+
+// with a regulat att arguments push acts like a normal function call 
+// and returns the results of concatentation
+x at coords=push(x at coords,4l); 
+
+// to speed thing up we can use use a call-by-ref att argument 
+// in which case push just returns the final length  of the att
+push(&x at coords,5*5);
+print(x at coords);
+
+// if the call by ref doesnt exists then it is created e.g
+push(&x at lon, lon/90.0); 
+print(x at lon);
+
+// create an att that contains min/max/avg;
+three_dmn_var_dbl at bounds=min(three_dmn_var_dbl);
+push(&three_dmn_var_dbl at bounds, max(three_dmn_var_dbl)); 
+push(&three_dmn_var_dbl at bounds, avg(three_dmn_var_dbl)); 
+
+// With an NC_CHAR it simply appends
+x at greeting="hello";
+x at greeting=push(x at greeting," world !!\n");
+print(x at greeting);  // hello world !!
+
+// can append to an NC_STRING att
+x at greek={"alpha"s,"beta"s,"gamma"s};
+// append a single string
+push(&x at greek,"delta"s);
+
+ at e="epsilon";
+
+//its OK to to push an NC_CHAR to a NC_STRING att
+// it just gets converted
+push(&x at greek, at e);
+push(&x at greek,"zeta");
+
+ at rest={"eta"s,"theta"s,"iota"s,"kappa"s,"lambda"s};
+
+// push the  @rest
+push(&x at greek, @rest);
+
+print(x at greek);
\ No newline at end of file
diff --git a/data/vpointer-ex3.nco b/data/vpointer-ex3.nco
new file mode 100644
index 0000000..90c933f
--- /dev/null
+++ b/data/vpointer-ex3.nco
@@ -0,0 +1,61 @@
+// example vpointer script
+// reads in all 3D/4D vars and converts them to float 
+// after conversion  
+// for each var processed
+// creates a range attribute that contains min/max
+// creates a total attribtes that contains the sum of the elements
+
+
+// The regular NCO attribute definition is var_nm at all_nm - but if "var_nm" is missing 
+// then it is defaulted  to "global" 
+// This  function reads in all vars in Input and ouptuts them as a ragged array
+// which is in NetCDF lingo is a NC_STRING att
+// to see  the NC_STRING att the ouptut file type must be NetCDF-4
+ at all=get_vars_in();
+
+*sz=@all.size();
+
+
+for(*idx=0;idx<sz;idx++)
+{
+
+  // To use an atrribute as a "pointer" - it must be a text type (NC_CHAR and NC_STRING) -The text it contains is 
+  // a var name or an att name -  by prefixing this att with a '*' we are saying "treat me as a variable" 
+  // the '*' has the highest presedence of the operators in NCAP2 so for example
+  //  *global at var_nm.total() is equivalent to (*global at var_nm).total() 
+  @var_nm=@all(idx);
+  // works similar to  to a printf() 
+  print(@var_nm,"about to test %s\n");
+  if(*@var_nm.ndims()>=3 )
+  {
+    // This is where the magic happens the '*' says make me a variable !!
+    *@var_nm=*@var_nm.float();
+    // The push function also takes a call-by-ref att -if it  doesnt already exist then it is created
+    // the call below is pushing a NC_STRING to an att so the end result is a list of NC_STRINGS   
+    push(&@prc, at var_nm); 
+  }
+
+} 
+
+
+*sz=@prc.size();
+
+
+for(*idx=0;idx<sz;idx++)
+{
+  @var_nm=@prc(idx);
+
+  // we can work with att pointers as well 
+  // sprint - ouptut is of type NC_CHAR
+  @att_total=sprint(@var_nm,"%s at total"); 
+  @att_range=sprint(@var_nm,"%s at range"); 
+ 
+  *@att_total= *@var_nm.total();
+  *@att_range={ min(*@var_nm), max(*@var_nm)}; 
+
+
+} 
+
+
+
+
diff --git a/data/vpointer-tst.nco b/data/vpointer-tst.nco
index 6d41507..bf4b238 100644
--- a/data/vpointer-tst.nco
+++ b/data/vpointer-tst.nco
@@ -3,7 +3,6 @@
 *sz=@all.size();
 
 nbr_err=0;
-*cnt_in=0;
 
 for(*idx=0;idx<sz;idx++)
 {
@@ -12,30 +11,24 @@ for(*idx=0;idx<sz;idx++)
   if(*@var_nm.type() == NC_INT || *@var_nm.type() == NC_FLOAT)
   {
        *@var_nm=*@var_nm.double();
-       cnt_in++; 
+       push(&@tst, at var_nm); 
   }
 
 } 
 
- at out=get_vars_out();
-*sz=@out.size();
-*cnt_out=0;
-
 
+sz=@tst.size();
 /* now check the number of conversions */
 for(*idx=0;idx<sz;idx++)
 {
-  @var_nm=@out(idx);
-
-  if(*@var_nm.type() == NC_DOUBLE)
-     cnt_out++; 
-  else
-     nbr_err++;         
-
-}
-
-if(cnt_in != cnt_out)
-{
+  @var_nm=@tst(idx);
+  
+  if(!exists(*@var_nm)) 
+  {
+   print(@var_nm,"var: %s not present in output\n"); 
    nbr_err++;
-   print("ERROR with vpointer convert script\n");
+  }
 }
+
+print("total number of errors ");
+print(nbr_err);
diff --git a/debian/changelog b/debian/changelog
index 13243f4..8d204a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+nco (4.6.1-1) unstable; urgency=low
+
+  * new upstream version nco_fl_mv(), cnk doc, ncremap crv, ncatted dot, ncclimo ncr md, ncflint -N, provenance
+
+ -- Charlie Zender <zender at uci.edu>  Sat, 06 Aug 2016 12:25:15 -0700
+
 nco (4.6.0-1) unstable; urgency=low
 
   * new upstream version ncclimo, ncap2	vlists, climatology bounds, CF, terraref, ncpdq fixes
diff --git a/doc/ANNOUNCE b/doc/ANNOUNCE
index 58d45c5..a7687b1 100644
--- a/doc/ANNOUNCE
+++ b/doc/ANNOUNCE
@@ -1,29 +1,40 @@
 $Header$ -*-text-*-
 
-The netCDF Operators NCO version 4.6.0 are ready. 
+The netCDF Operators NCO version 4.6.1 are ready. 
 
 http://nco.sf.net (Homepage, Mailing lists)
 http://github.com/nco (Source Code, Releases, Developers)
 
 What's new?
-4.6.0 may be most notable for the debut of ncclimo, a new operator
-that generates climatologies from monthly-mean input. 
-Perhaps it's a tie with ncap2, which has a singularly useful new
-feature: variable lists/pointers. ncap2 also has a reduced memory
-footprint and a function to simplify adding CF-bounds variables
-(Thanks Henry!). As usual, ncremap continues to accrue useful
-features, the most notable of which is learning grid information
-from the CF "coordinates" attribute, if any.
-
-Work on NCO 4.6.1 has commenced and will better support regridding
-variables whose horizontal dimensions are not the
-most-rapidly-varying. 
+
+4.6.1 ...
+
+As usual, ncremap continues to accrue useful features, the most
+notable of which is ...
+
+Work on NCO 4.6.2 has commenced and will better support regridding
+variables whose horizontal dimensions are not most-rapidly-varying.  
 
 Enjoy,
 Charlie
 
 NEW FEATURES (full details always in ChangeLog):
 
+A. ncks supports new provenance features released in netCDF-4.4.1.
+   These provenance (and other) metadata are revealed by the --hdn (or
+   --hidden) switch when dumping global metadata from a netCDF4 file:
+   ncks --cdl --hdn -M ~/nco/data/in_grp.nc
+
+A. Wenshan Wang of UCI contributed a Quick Reference Card suitable
+   for printing. Thanks, Wenshan!
+   http://nco.sf.net/nco_rfr_crd.pdf
+
+A. Add ncflint -N, --nrm, --normalize option so w1:=w1/(w1+w2), w2:=w2/(w1+w2)
+
+A. ncap2's array() function can now take a dimension list as the
+   third argument, e.g., n2=array(1.0,2.0,/$time,$lat,$lon/)
+   http://nco.sf.net/nco.html#ncap2
+
 A. ncclimo produces climatological monthly means, seasonal means, 
    annual mean, and optionally regrids all these files. Like ncremap,
    ncclimo is actually a front-end script to manage the complexity
@@ -41,7 +52,7 @@ A. ncclimo produces climatological monthly means, seasonal means,
    http://nco.sf.net/nco.html#ncclimo
    http://nco.sf.net/nco.html#merra2
 
-B. ncap2 now works with pointers to variables and attributes.
+A. ncap2 now works with pointers to variables and attributes.
    This allows, e.g., loops over arbitrary sets of variables, and
    make creating aggregations of variables much simpler. An ncap2
    script that converts all float variables to double precision:
@@ -55,118 +66,34 @@ B. ncap2 now works with pointers to variables and attributes.
    More documentation will be added in the coming weeks. For now,      
    http://nco.sf.net/nco.html#ncap2
 
-C. ncap2 has reduced memory usage. Scalars are no longer stretched
-   to conform to arrays prior to arithmetic.
-
-D. ncap2 has a new function to create CF-compliant bounds:
-   defdim("bnd_dmn",2);
-   bounds_var=make_bounds(crd_var,$bnd_dmn,"bounds_var_nm");
-   The "bounds_var_nm" is optional. Passing it causes make_bounds() to 
-   add the attribute crd_var at bounds="bounds_var_nm".
-   http://nco.sf.net/nco.html#make_bounds
-
-E. ncap2 now propagates metadata when Left-Hand-Casting variables.
-   Previous versions did not propagate metadata to LHC variables.
-   This fix makes converting the _type_ of a variable easier.
-   For example, to change one_dmn_rec_var to NC_SHORT, use
-   ncap2 -s 'one_dmn_rec_var[time]=short(one_dmn_rec_var)' in.nc out.nc
-   The output file will contain the original metadata.
-   http://nco.sf.net/nco.html#ncap2
-
-F. ncatted new mode "nappend" appends only to existing attributes.
-   If the attribute does not yet exist, it is not created.
-   Same as "append" mode, except "append" will create attributes.
-   ncatted -a long_name,T,n,c,' nappended text' in.nc
-   http://nco.sf.net/nco.html#ncatted
-
-G. ncpdq now has a third unpacking mode.
-   Access non-default modes with --upk=[0,1,2] where
-   Mode 0: Applies netCDF convention. Default mode:
-   upk=scale_factor*pck+add_offset   
-   Mode 1: HDF4 MODIS MOD08 convention: 
-   upk=scale_factor*(pck-add_offset)
-   Mode 2: HDF4 MODIS MOD13 convention: 
-   upk=(pck-add_offset)/scale_factor
-   Yes, be careful unpacking HDF4 data!
-   http://nco.sf.net/nco.html#hdf_upk
-   
-H. ncra can now honor the CF convention for climatology bounds.
-   Currently this is opt-in with the --cb or --c2b switches.
-   --cb causes ncra to:
-   1. Add a "climatology" attribute with value "climatology_bounds" to 
-   the time coordinate, if necessary
-   2. Remove the "bounds" from the time coordinate, if necessary
-   3. Output a variable named "climatology_bounds" with values that
-   are minima/maxima of the input time coordinate bounds 
-   4. Omit any input time coordinate bounds attribute and variable
-   5. Ensure cell_methods attribute for all variables is appropriate 
-   --c2b is like --cb except --c2b converts the input "climatology"
-   bounds to a non-climatology "bounds" in the output. 
-   Use --c2b when averaging sub-sampled climatologies to produce a
-   continuous (non-climatologically sub-sampled) mean.
-   ncra --cb *_01.nc clm_JAN.nc
-   ncra --cb clm_DEC.nc clm_JAN.nc clm_FEB.nc clm_DJF.nc
-   ncra --c2b clm_DJF.nc clm_MAM.nc clm_JJA.nc clm_SON.nc clm_ANN.nc
-   Depending on feedback, we may make --cb the default
-   http://nco.sf.net/nco.html#cb
-
-I. ncremap now defaults to $TMPDIR for storing intermediate files.
-   This is user-configurable with the -U switch.
-   http://nco.sf.net/nco.html#ncremap
-
-J. ncks can now ingest and de-interleave ENVI images in BIL, BSQ, and
-   BIP formats and store them as any netCDF type. ncks is a viable
-   (and faster) replacement for that small subset of tasks normally
-   done by the venerable GDAL toolkit (gdal_translate in particular).
-   Thanks to David LeBauer of the University of Illinois/NCSA and DOE
-   TERRAREF for supporting this feature.
-   ncks --trr_wxy=926,1600,1 --trr typ_in=NC_USHORT --trr ntl_in=bil \
-   --trr_in=in.nc foo.nc out.nc
-   http://nco.sf.net/nco.html#terraref
-
-K. NCO now treats as associated coordinates all variables listed in
-   "grid_mapping" attributes. Variables such as
-   "char albers_conical_equal_area" are automatically extracted along
-   with variables that them. ncecat will not wrap mappings in a record
-   dimension. 
-   http://nco.sf.net/nco.html#grid_mapping
-
-L. ncremap and ncks now follow the CF "coordinates" convention when
-   inferring grids and remapping. One specifies the variable that may
-   have the "coordinates" attribute, and NCO will inspect and apply
-   the "coordinates" convention for that variable for grid generation
-   and remapping.  
-   ncremap -V var_nm -s src.nc -d dst.nc -m map.nc
-   ncremap -V var_nm --map map.nc in.nc out.nc
-   ncks --rgr_var=var_nm --rgr nfr=y --rgr grid=grd.nc in.nc foo.nc
-   ncks --rgr_var=var_nm --map map.nc in.nc out.nc
-   http://nco.sf.net/nco.html#ncremap
-   http://nco.sf.net/nco.html#regrid
-
 BUG FIXES:
 
-A. Correct ncatted documentation for "append" mode.
+A. ncatted now allows special characters in attribute and variable
+   names. Previously, ncatted interpreted most special characters
+   as indicating a regular expression. Now ncatted first tries to
+   interpret most special characters as literals, and if that does
+   not work, then it interprets them as a regular expression.
+   Thanks to emontgomery for reporting the problem.
 
-B. Fix Append mode to follow same code path and defaults when
-   requested with -A and with interactive responses to the
-   exit/append/overwrite question. Thanks to Parker Norton for
-   pointing out this inconsistency. 
+A. ncap2 fixed handling of implicit array bounds for slabs of form
+   var(3:). Previously ncap2 would exit with an error.
+   http://nco.sf.net/nco.html#ncap2
 
-C. ncpdq fix complex reordering in group hierarchies.
-   Previously ncpdq could misorder dimensions when multiple
-   different dimensions shared the same short name (in different
-   groups). Thanks to Pedro Vicente for tracking-down and fixing
-   this bug! And finding and fixing another ncpdq bug that had
-   not yet been reported in the wild.
+A. When inferring grid coordinates from 2D files, ncremap in 4.6.0
+   sometimes would confuse dimension names with coordinate names.
+   This has been fixed. The workaround is to downgrade to 4.5.6 or
+   upgrade to 4.6.1.
 
-D. ncap2 fix bug propagating attributes of variables with whitespace
-   in their names. 
+A. ncremap now automatically chooses distinct output spatial and
+   temporal bounds names when for non-rectangular output datasets.
+   Previously ncremap might use, e.g., "nbnd" for both. This failed
+   for curvilinear datasets.
 
 KNOWN PROBLEMS DUE TO NCO:
 
    This section of ANNOUNCE reports and reminds users of the
    existence and severity of known, not yet fixed, problems. 
-   These problems occur with NCO 4.6.0 built/tested under
+   These problems occur with NCO 4.6.1 built/tested under
    MacOS with netCDF 4.3.3.1 on HDF5 1.8.16 and with
    Linux with netCDF 4.4.1-development (20160212) on HDF5 1.8.13.
 
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 6469871..d7cbec4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,163 @@
+2016-08-06  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.1 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.1 final changes';git push
+	git tag -a 4.6.1 -m 'Version 4.6.1 new features: nco_fl_mv(), cnk doc, ncremap crv, ncatted dot, ncclimo ncr md, ncflint -N, provenance';git push --tags
+
+2016-08-04  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.1-beta01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.1-beta01 final changes';git push
+	git tag -a 4.6.1-beta01 -m 'Version 4.6.1-beta01 new features: ncremap crv, constance, nco_fl_mv(), cnk';git push --tags
+
+	* ncremap: give-up on confirming overwriting existing maps until it works in interactive shells only
+
+	* Use different output dimensions bounds names for mappings to curvilinear axes
+	Default is now to use temporal bounds name for spatial bounds for rectangular grids,
+	and to use "nvertices" for spatial bounds on 1D and curvilinear grids.
+
+2016-08-03  Charlie Zender  <zender at uci.edu>
+
+	* ncclimo: merge Balwinder's changes for Constance at PNNL
+
+	* Only write lat_wgt attributes when flg_grd_out_rct is true
+
+	* Write lat/lon_crn not lat/lon_bnd data when map is curvilinear
+
+	* Improve documentation for chunking with LFP and using ncra subcyles and MRO
+
+2016-08-02  Charlie Zender  <zender at uci.edu>
+
+	* Fix nco_grd_nfr(): use nco_inq_varid() not nco_inq_dimid() to	find coordinates
+
+	* Relax failed return code diagnosis for nco_fl_mv(), fail when rcd != 0
+
+2016-08-01  Charlie Zender  <zender at uci.edu>
+
+	* Clarify which size options are in bytes and which are in elements, especially for chunking
+
+2016-07-31  Charlie Zender  <zender at uci.edu>
+
+	* Deduce script and NCO paths using stackoverflox method borrowed from terraref.sh
+
+2016-07-29  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.1-alpha03 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.1-alpha03 final changes';git push
+	git tag -a 4.6.1-alpha03 -m 'Version 4.6.1-alpha03 new features: fix hyperactive incremental mode, ncatted special characters, chunking docs';git push --tags
+
+	* Prevent ncclimo from attempting to generate incremental climos when yr_srt_prv not supplied
+
+2016-07-26  Charlie Zender  <zender at uci.edu>
+
+	* Allow special characters in ncatted names. Fixes TODO nco1130 reported by emontgomery 20160726.
+
+2016-07-19  Charlie Zender  <zender at uci.edu>
+
+	* Accept, e.g., map_rew as well as rew and cnk_map_rew-style options
+
+2016-07-17  Charlie Zender  <zender at uci.edu>
+
+	* Address some chunking documentation/implementation inconsistencies noted by Antonio Rodriges
+
+2016-07-14  Charlie Zender  <zender at uci.edu>
+
+	* Avoid segfault when --gaa key= does not have RHS argument, so val=NULL
+
+2016-06-21  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.1-alpha02 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.1-alpha02 final changes';git push
+	git tag -a 4.6.1-alpha02 -m 'Version 4.6.1-alpha02 new features: ncclimo incremental mode, ncflint -N';git push --tags
+
+	* Fix yrs_averaged attributes of incremental climos
+
+	* Fix incremental generation on analysis grid
+
+2016-06-20  Charlie Zender  <zender at uci.edu>
+
+	* Correct filenames for fl_rgr_xtn that contain December
+
+2016-06-17  Charlie Zender  <zender at uci.edu>
+
+	* Implement all ncclimo extended/previous directories and command-line options
+
+	* ncclimo extended climatologies work on analysis grid
+
+2016-06-16  Charlie Zender  <zender at uci.edu>
+
+	* Add ncflint -N, --nrm, --normalize option so w1:=w1/(w1+w2), w2:=w2/(w1+w2)
+
+	* Quiet ncpdq INFO messages
+
+	* ncclimo extended climatologies work on native grid
+
+2016-06-15  Charlie Zender  <zender at uci.edu>
+
+	* Add stubs to extend previous climatology in ncclimo
+
+2016-06-13  Charlie Zender  <zender at uci.edu>
+
+	* Add integrated, end-to-end grid-generation, map-generation, conservative regridding regression test
+
+2016-06-09  Charlie Zender  <zender at uci.edu>
+
+	* Coaslesce (and make obsolete) four earlier functions into nco_is_spc_in_cf_att()
+
+	* Add nco_rfr_crd.pdf to homepage. Contributed by Wenshan Wang of UCI.
+
+2016-06-03  Henry Butowsky  <henryb at hush.com>
+
+	* array() function can now take dimension list as third argument, e.g., n2=array(1.0, 2.0, /$time,$lat,$lon/)
+
+2016-06-02  Henry Butowsky  <henryb at hush.com>
+
+	* Fix handling of implicit array bounds for slabs of form var(x:)
+
+2016-05-31  Charlie Zender  <zender at uci.edu>
+
+	* Die with explanation when --mk_rec_dmn receives multiple arguments
+
+2016-05-26  Henry Butowsky  <henryb at hush.com>
+
+	* Fix VarOpNew.cc so array of NC_STRING is correctly sorted in descending order
+
+	* Add getdims() to bsc_cls, returns attribute of type NC_STRING with dim names
+
+2016-05-23  Charlie Zender  <zender at uci.edu>
+
+	* Clean-up new provenance code now that netCDF4 4.4.1-RC3 merged necessary patches
+
+2016-05-20  Charlie Zender  <zender at uci.edu>
+
+	* Add nctypget filter
+
+2016-05-20  Henry Butowsky  <henryb at hush.com>
+
+	* Add NC_STRING sort (att & var) to srt_cls(). More work to do integrating into existing templates...
+
+2016-05-16  Charlie Zender  <zender at uci.edu>
+
+	* Condense homepage, add new presentations
+
+	* NCO 4.6.1-alpha01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.1-alpha01 final changes';git push
+	git tag -a 4.6.1-alpha01 -m 'Version 4.6.1-alpha01 new features: netCDF4 provenance attributes';git push --tags
+
+2016-05-15  Charlie Zender  <zender at uci.edu>
+
+	* Add ncap2 hyperbolic function support to MACOSX
+
+2016-05-14  Charlie Zender  <zender at uci.edu>
+
+	* Support reporting _NCProperties, _IsNetcdf4, _SuperblockVersion in netCDF 4.4.1+
+
 2016-05-12  Charlie Zender  <zender at uci.edu>
 
+	* Remove ncremap step to fix lon dimension in HIRDLS/MLS files since ncpdq now works as expected
+
+	* Fix ncclimo regression test (sought non-existent area variable) and new ncap2 regression test (sought mis-spelled file)
+
 	* NCO 4.6.0 release procedure:
 	cd ~/nco;git commit -a -m 'Version 4.6.0 final changes';git push
 	git tag -a 4.6.0 -m 'Version 4.6.0 new features: ncclimo, ncap2	vlists, climatology bounds, CF, terraref, ncpdq fixes';git push --tags
diff --git a/doc/MANIFEST b/doc/MANIFEST
index 44463d9..cd964b9 100644
--- a/doc/MANIFEST
+++ b/doc/MANIFEST
@@ -143,23 +143,24 @@ nco/doc/doe.jpg		DOE logo (JPG format)
 nco/doc/endorsements.txt Statements of support for NCO
 nco/doc/help.txt	Advertisement for help with NCO (outdated---from 2000)
 nco/doc/highlights_old.shtml Short summaries of old releases
-nco/doc/index.shtml	NCO website homepage
-nco/doc/logo_srl.png	NCO spiral logo PNG raster format
-nco/doc/logo_srl.svg	NCO spiral logo Scalable Vector Graphic format
-nco/doc/logo_srl.xcf	NCO spiral logo GIMP format
+nco/doc/index.shtml	Website homepage
+nco/doc/logo_srl.png	Spiral logo PNG raster format
+nco/doc/logo_srl.svg	Spiral logo Scalable Vector Graphic format
+nco/doc/logo_srl.xcf	Spiral logo GIMP format
 nco/doc/milestones_old.shtml Milestones in old releases
 nco/doc/mpi.txt		MPI Environments for NCO
 nco/doc/my-bib-macros.texi TeXInfo bibliography macros for nco.texi
 nco/doc/nasa.png	NASA logo (PNG format)
 nco/doc/ncap.txt	Description of the ncap operator (not yet used)
-nco/doc/nco.dvi(v)	NCO User's Guide: DVI format
-nco/doc/nco.html(v)	NCO User's Guide: HTML format
-nco/doc/nco.info(v)	NCO User's Guide: Info format
-nco/doc/nco.pdf(v)	NCO User's Guide: Portable Document Format
-nco/doc/nco.png		NCO Webpage icon (PNG format)
-nco/doc/nco.ps(v)	NCO User's Guide: Postscript format
-nco/doc/nco.texi	NCO User's Guide: TeXInfo format
-nco/doc/nco_news.shtml	NCO news archive
+nco/doc/nco.dvi(v)	User's Guide: DVI format
+nco/doc/nco.html(v)	User's Guide: HTML format
+nco/doc/nco.info(v)	User's Guide: Info format
+nco/doc/nco.pdf(v)	User's Guide: Portable Document Format
+nco/doc/nco.png		Webpage icon (PNG format)
+nco/doc/nco.ps(v)	User's Guide: Postscript format
+nco/doc/nco.texi	User's Guide: TeXInfo format
+nco/doc/nco_news.shtml	News archive
+nco/doc/nco_rfr_crd.pdf(v) Quick Reference Card
 nco/doc/netcdf.h.3.6.3	Version 3.6.X of netcdf.h for backward compatibility
 nco/doc/netcdf4.sh	Install latest netcdf4 and HDF libraries for NCO
 nco/doc/nsf.png		NSF logo (PNG format)
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 360ab83..f175960 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -256,6 +256,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
diff --git a/doc/TODO b/doc/TODO
index 437f988..b9f5464 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -678,7 +678,12 @@ nco1127. nco: replicate nco_var_dpl() method of deep-copying NC_STRING in nco_va
 nco1128. nco: ncrename --lowercase --uppercase options? MERRA2 merra
        ncrename -v all,lowercase in.nc out.nc
        ncrename --lowercase --var .ONE,.TWO,... in.nc out.nc
-nco1129. 
+nco1129. ncks allow --mk_rec_dmn to change multiple dimensions at one time
+       ncks -O --mk_rec_dmn lat,lon ~/nco/data/in_grp.nc ~/foo.nc
+nco1130. ncatted support for '.' (dot) in names (reported by emontgomery 20170726)
+       ncatted treats dot.name as rx then fails to find match
+       ncatted -O -a dot.name,global,o,c,value ~/nco/data/in.nc ~/foo.nc
+nco1131. 
 qrk
 ************************************************************************
 End ncoXXX TODOs
diff --git a/doc/VERSION b/doc/VERSION
index 6016e8a..8ac28bf 100644
--- a/doc/VERSION
+++ b/doc/VERSION
@@ -1 +1 @@
-4.6.0
+4.6.1
diff --git a/doc/debian.txt b/doc/debian.txt
index 73ef62e..80714c3 100644
--- a/doc/debian.txt
+++ b/doc/debian.txt
@@ -29,18 +29,18 @@ apt-get install dh-make debhelper devscripts fakeroot gnupg debian-policy develo
 
 2. Debian build procedure recommends placing entire package source in
    subdirectory of main package. 
-   For starters, we wish to create .debs of tagged releases, e.g., nco-4.6.0
-   First we create a clean source distribution of nco and place it in nco-4.6.0
+   For starters, we wish to create .debs of tagged releases, e.g., nco-4.6.1
+   First we create a clean source distribution of nco and place it in nco-4.6.1
    Until we know what is necessary, however, we just copy a snapshot
    
    2.1 Clean all build files from development directory
 
 cd ~/nco;make distclean;cd bld;make clean;cd ~
 tar cvzf ./nco/nco.tar.gz ./nco/*
-cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-4.6.0
-/bin/rm nco.tar.gz;tar cvzf nco-4.6.0.tar.gz ./nco-4.6.0/*
-cd ~/nco/nco-4.6.0
-dh_make -e zender at uci.edu -f ../nco-4.6.0.tar.gz
+cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-4.6.1
+/bin/rm nco.tar.gz;tar cvzf nco-4.6.1.tar.gz ./nco-4.6.1/*
+cd ~/nco/nco-4.6.1
+dh_make -e zender at uci.edu -f ../nco-4.6.1.tar.gz
 
     2.2 The preceding steps created template debian files for a .deb,
     Those files now reside in ~/nco/debian.
@@ -55,7 +55,7 @@ dh_make -e zender at uci.edu -f ../nco-4.6.0.tar.gz
    from previous build
 
    cd ~/nco;/bin/rm *.gz
-   cd ~/nco/nco-4.6.0
+   cd ~/nco/nco-4.6.1
    dpkg-buildpackage -rfakeroot > foo 2>&1
    dpkg-buildpackage -rsudo > foo 2>&1
 
@@ -84,33 +84,33 @@ patch -p0 < nco_X.Y.Z-3.diff   # Patch destination with Debian diff
    make tags
 # Put cute version-specific string in nco_ctl.c:nco_nmn_get()
 # Install correct version numbers before updating Debian
-# tags-query replace 4.6.0 with X.Y.Z+1
+# tags-query replace 4.6.1 with X.Y.Z+1
 # If tags-query replace does not work, be sure to manually change
 # versions in configure.ac, debian/files, doc/ANNOUNCE, doc/debian.txt,
 # doc/index.shtml, doc/nco.texi, bld/nco_dst.pl, doc/VERSION
 # 20141201: Change NCO_VERSION_PATCH in src/nco.h!!!!!!!!!!!!!!!!!!!!!!
-   cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 4.6.0-1 # Update changelog (-b forces this version number)
+   cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 4.6.1-1 # Update changelog (-b forces this version number)
    emacs ~/nco/bld/nco.spec # Update changelog
 # For unknown reason rules file may lose its executable bit
    chmod a+x ~/nco/debian/rules
 # Rebuild autotools so new version # propagates
    cd ~/nco;aclocal;autoheader;automake --foreign;autoconf
 # Save all files in emacs before tagging
-   ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.0
+   ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.1
 # Upload tarball to SF https://sourceforge.net/projects/nco/files 
-   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.6.0.tar.gz .
+   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.6.1.tar.gz .
 
 7. Ubuntu PPA
 https://help.launchpad.net/Packaging/PPA
-dput NCO nco_4.6.0-2~ppa1_source.changes
+dput NCO nco_4.6.1-2~ppa1_source.changes
 sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com
 
 # Location of build diagnostics for mentors to help 
-http://dust.ess.uci.edu/nco/src/nco_4.6.0-1.dpkg-buildpackage.txt
-http://dust.ess.uci.edu/nco/src/nco_4.6.0-1.dsc
-http://dust.ess.uci.edu/nco/src/nco_4.6.0-1_i386.changes
-http://dust.ess.uci.edu/nco/src/nco_4.6.0-1_i386.deb
-http://dust.ess.uci.edu/nco/src/nco_4.6.0.orig.tar.gz
+http://dust.ess.uci.edu/nco/src/nco_4.6.1-1.dpkg-buildpackage.txt
+http://dust.ess.uci.edu/nco/src/nco_4.6.1-1.dsc
+http://dust.ess.uci.edu/nco/src/nco_4.6.1-1_i386.changes
+http://dust.ess.uci.edu/nco/src/nco_4.6.1-1_i386.deb
+http://dust.ess.uci.edu/nco/src/nco_4.6.1.orig.tar.gz
 
 # Becoming a Debian developer
 http://www.debian.org/devel/join/newmaint
@@ -164,31 +164,31 @@ Matej Vela <vela at debian.org>, Daniel Baumann <daniel at debian.org>, Warren Turkal
 # export LD_LIBRARY_PATH=/usr/lib:/lib:/usr/X11R6/lib
 # sudo aptitude install antlr bison flex gsl-bin libgsl0-dev libantlr-dev netcdf-bin libnetcdfc7 libnetcdf-dev texinfo libcurl4-gnutls-dev libexpat1-dev libxml2-dev udunits-bin libudunits2-0 libudunits2-dev
 cd ~/nco;cvc
-sudo /bin/rm -rf ${DATA}/nco-4.6.0 ${DATA}/nco_4.6.0* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.0-1 -d nco-4.6.0 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-4.6.0 nco # Export most recent
-tar cvzf ./nco_4.6.0.orig.tar.gz --exclude='nco-4.6.0/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.0 
-/bin/rm -rf ${DATA}/nco-4.6.0 # Remove cvs-exported directory
-tar xvzf ./nco_4.6.0.orig.tar.gz # Untar to get directory without excluded files
-mkdir -p ${DATA}/nco-4.6.0/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.6.0/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.6.0/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
+sudo /bin/rm -rf ${DATA}/nco-4.6.1 ${DATA}/nco_4.6.1* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.1-1 -d nco-4.6.1 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-4.6.1 nco # Export most recent
+tar cvzf ./nco_4.6.1.orig.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.1 
+/bin/rm -rf ${DATA}/nco-4.6.1 # Remove cvs-exported directory
+tar xvzf ./nco_4.6.1.orig.tar.gz # Untar to get directory without excluded files
+mkdir -p ${DATA}/nco-4.6.1/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.6.1/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.6.1/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
 #export DEB_BUILD_OPTIONS='disable-dap-netcdf disable-netcdf4 disable-udunits2'; # Disable optional packages based on available Debian support
-#cd ${DATA}/nco-4.6.0;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
-#cd ${DATA}/nco-4.6.0;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
-cd ${DATA}/nco-4.6.0;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
+#cd ${DATA}/nco-4.6.1;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
+#cd ${DATA}/nco-4.6.1;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
+cd ${DATA}/nco-4.6.1;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
 sudo dpkg --remove nco
-sudo dpkg --install ${DATA}/nco_4.6.0-1_*.deb
+sudo dpkg --install ${DATA}/nco_4.6.1-1_*.deb
 cd ~/nco/bld;MY_BIN_DIR=/usr/bin ../bm/nco_bm.pl --regress
 # http://lintian.debian.org/full/zender@uci.edu.html
-lintian ${DATA}/nco_4.6.0-1_*.deb
-ls -l ${DATA}/nco_4.6.0*
+lintian ${DATA}/nco_4.6.1-1_*.deb
+ls -l ${DATA}/nco_4.6.1*
 m ~/foo.nco
 # Upload Ubuntu (rather than Debian) packages to websites
-scp ${DATA}/nco_4.6.0* dust.ess.uci.edu:/var/www/html/nco/src
-scp ${DATA}/nco_4.6.0* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+scp ${DATA}/nco_4.6.1* dust.ess.uci.edu:/var/www/html/nco/src
+scp ${DATA}/nco_4.6.1* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 # NB: Make sure RPMs build before uploading to debian, since changing
 # Debian versions is a PITA
 # NB: Only upload pbuilder Debian Sid (not personal Ubuntu) .deb builds to Debian mentors
-# cd ${DATA};dupload -t mentors nco_4.6.0-1_*.changes
+# cd ${DATA};dupload -t mentors nco_4.6.1-1_*.changes
 bsrc # Reset shell environment for regular development
 
 # New build system #2
@@ -202,52 +202,52 @@ DIST=sid sudo pbuilder update # Update chroot before building package in it
 # dget http://ftp.debian.org/debian/pool/main/n/nco/nco_3.9.0-1.dsc
 # dget http://ftp.debian.org/debian/pool/main/n/netcdf/netcdf_3.6.1-1.dsc
 # apt-get source nco # Get package source
-sudo /bin/rm /var/cache/pbuilder/result/nco_4.6.0* # Cleanup prior build
+sudo /bin/rm /var/cache/pbuilder/result/nco_4.6.1* # Cleanup prior build
 # To pass DEB_BUILD_OPTIONS to pbuilder while using sudo, one must first
 # modify sudoers with visudo to prevent sudo from resetting environment
 #export DEB_BUILD_OPTIONS='disable-dap-netcdf disable-netcdf4 disable-udunits2'; # Disable optional packages based on available Debian support
-cd ${DATA};DIST=sid sudo pbuilder build nco_4.6.0-1.dsc > ~/foo.nco.pbuilder 2>&1
-cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.6.0-1_*.changes
-lintian /var/cache/pbuilder/result/nco_4.6.0-1_*.deb
+cd ${DATA};DIST=sid sudo pbuilder build nco_4.6.1-1.dsc > ~/foo.nco.pbuilder 2>&1
+cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.6.1-1_*.changes
+lintian /var/cache/pbuilder/result/nco_4.6.1-1_*.deb
 sudo dpkg --remove nco
-sudo dpkg --install /var/cache/pbuilder/result/nco_4.6.0-1_*.deb
+sudo dpkg --install /var/cache/pbuilder/result/nco_4.6.1-1_*.deb
 cd ~/nco/bld;MY_BIN_DIR=/usr/bin ../bm/nco_bm.pl --regress
 # NB: Upload pbuilder Debian Sid packages to Debian mentors, but not
 # to personal or NCO websites since most people use Ubuntu not Debian
 # NB: Debian versions are a PITA, ensure RPMs build before uploading to Debian
-cd /var/cache/pbuilder/result;dupload -t mentors nco_4.6.0-1_*.changes
+cd /var/cache/pbuilder/result;dupload -t mentors nco_4.6.1-1_*.changes
 
 # RPM builds as root
 export rpm_root='/usr/src/redhat'
 # export sudo_sng='' # sudo not-necessary when builing in user directories
 export sudo_sng='sudo' # sudo necessary when building in system directories
 cd ~/nco;cvc;cvu
-/bin/rm -rf ${DATA}/nco-4.6.0 ${DATA}/nco-4.6.0* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.6.1 ${DATA}/nco-4.6.1* # Cleanup last build
 ${sudo_sng} /bin/rm -r -f \
-${rpm_root}/BUILD/nco-4.6.0 \
-${rpm_root}/RPMS/i386/nco-4.6.0-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.0-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.0-?.i386.rpm \
-${rpm_root}/SOURCES/nco-4.6.0.tar.gz \
-${rpm_root}/SPECS/nco-4.6.0.spec \
-${rpm_root}/SRPMS/nco-4.6.0-?.src.rpm
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.0-1 -d nco-4.6.0 nco # Export based on tag
-${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.6.0.spec
-tar cvzf ./nco-4.6.0.tar.gz --exclude='nco-4.6.0/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.0 
-${sudo_sng} /bin/cp ${DATA}/nco-4.6.0.tar.gz ${rpm_root}/SOURCES
+${rpm_root}/BUILD/nco-4.6.1 \
+${rpm_root}/RPMS/i386/nco-4.6.1-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.1-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.1-?.i386.rpm \
+${rpm_root}/SOURCES/nco-4.6.1.tar.gz \
+${rpm_root}/SPECS/nco-4.6.1.spec \
+${rpm_root}/SRPMS/nco-4.6.1-?.src.rpm
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.1-1 -d nco-4.6.1 nco # Export based on tag
+${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.6.1.spec
+tar cvzf ./nco-4.6.1.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.1 
+${sudo_sng} /bin/cp ${DATA}/nco-4.6.1.tar.gz ${rpm_root}/SOURCES
 cd ${rpm_root}/SPECS
-${sudo_sng} rpmbuild -ba --sign nco-4.6.0.spec > ~/foo.nco 2>&1
+${sudo_sng} rpmbuild -ba --sign nco-4.6.1.spec > ~/foo.nco 2>&1
 scp \
-${rpm_root}/RPMS/i386/nco-4.6.0-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.0-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.0-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.6.0-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.6.1-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.1-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.1-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.6.1-?.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/RPMS/i386/nco-4.6.0-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.0-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.0-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.6.0-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.6.1-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.1-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.1-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.6.1-?.src.rpm \
 zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 
 # RPM builds as user
@@ -256,33 +256,33 @@ zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 export rpm_root="${DATA}/rpm/nco"
 #cd ~/nco;cvc;cvu # This risks committing unwanted *.[ch]pp files
 mkdir -p ${DATA}/rpm/nco/TMP ${DATA}/rpm/nco/BUILD
-/bin/rm -rf ${DATA}/nco-4.6.0 ${DATA}/nco-4.6.0* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.6.1 ${DATA}/nco-4.6.1* # Cleanup last build
 /bin/rm -r -f \
-${rpm_root}/nco-4.6.0-?.src.rpm \
-${rpm_root}/nco-4.6.0.spec \
-${rpm_root}/nco-4.6.0.tar.gz \
-${rpm_root}/*/nco-4.6.0-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.0-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.0-?.*.rpm
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.0-1 -d nco-4.6.0 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-4.6.0 nco # Export most recent and build as 4.6.0-1
-tar cvzf ./nco-4.6.0.tar.gz --exclude='nco-4.6.0/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.0 
-/bin/cp ${DATA}/nco-4.6.0.tar.gz ${rpm_root}
+${rpm_root}/nco-4.6.1-?.src.rpm \
+${rpm_root}/nco-4.6.1.spec \
+${rpm_root}/nco-4.6.1.tar.gz \
+${rpm_root}/*/nco-4.6.1-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.1-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.1-?.*.rpm
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.1-1 -d nco-4.6.1 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-4.6.1 nco # Export most recent and build as 4.6.1-1
+tar cvzf ./nco-4.6.1.tar.gz --exclude='nco-4.6.1/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.1 
+/bin/cp ${DATA}/nco-4.6.1.tar.gz ${rpm_root}
 ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/nco.spec
 cd ${rpm_root}
 rpmbuild -ba --sign nco.spec > ~/foo.nco 2>&1
-rpmlint ${rpm_root}/*/nco-4.6.0-?.*.rpm
+rpmlint ${rpm_root}/*/nco-4.6.1-?.*.rpm
 sudo yum remove nco
-sudo yum install ${rpm_root}/*/nco-4.6.0-?.*.rpm
+sudo yum install ${rpm_root}/*/nco-4.6.1-?.*.rpm
 scp \
-${rpm_root}/*/nco-4.6.0-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.0-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.0-?.*.rpm \
-${rpm_root}/nco-4.6.0-?.*.src.rpm \
+${rpm_root}/*/nco-4.6.1-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.1-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.1-?.*.rpm \
+${rpm_root}/nco-4.6.1-?.*.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/*/nco-4.6.0-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.0-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.0-?.*.rpm \
-${rpm_root}/nco-4.6.0-?.*.src.rpm \
+${rpm_root}/*/nco-4.6.1-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.1-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.1-?.*.rpm \
+${rpm_root}/nco-4.6.1-?.*.src.rpm \
 zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
diff --git a/doc/highlights_old.shtml b/doc/highlights_old.shtml
index eadb9a3..939a692 100644
--- a/doc/highlights_old.shtml
+++ b/doc/highlights_old.shtml
@@ -9,7 +9,7 @@ file:///home/zender/nco/doc/highlights_old.shtml
 
 Usage:
 /usr/bin/scp ~/nco/doc/highlights_old.shtml zender,nco at web.sf.net:/home/project-web/nco/htdocs
-scp -p ~/nco/doc/highlights_old.shtml dust.ess.uci.edu:/var/www/html/nco
+scp -p ~/nco/doc/highlights_old.shtml dust.ess.uci.edu:Sites/nco
 -->
 
 <!doctype html public "-//W3C//DTD HTML 3.2//EN">
@@ -23,8 +23,96 @@ scp -p ~/nco/doc/highlights_old.shtml dust.ess.uci.edu:/var/www/html/nco
 <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#008080" alink="#FF0000">
 
 <dt><a name="News"></a></dt>
-<h2>Release Highlights from 2000–2012 (versions 1.1.47–4.2.3)</h2>
+<h2>Release Highlights from 200001–201406 (versions 1.1.47–4.4.4)</h2>
 
+<li><b>NCO 4.4.4</b>:
+netCDF'ize non-compliant element names;
+<tt>-x var</tt> tolerates non-existence;
+<tt>--rad</tt> <a href="http://nco.sf.net/nco.html#rad">orphan dimensions</a>;
+<tt>ncwa --mask_condition</tt> <a href="#bug_ncwa_mask_condition">bugfix</a></li>
+<li><b>NCO 4.4.3</b>:
+Faster DAP access to strided data;
+<a href="http://nco.sf.net/nco.html#grp_brd">Group broadcasting</a> for ensembles;
+<li><b>NCO 4.4.2</b>:
+CF <tt>cell_methods</tt> support;
+Bugfixes for <tt>nces</tt> memory, LLVM/clang builds, <tt>-X</tt>, RX's with groups, <tt>--cnk_dmn</tt>;</li>
+<li><b>NCO 4.4.1</b>: 
+Group support for <tt>-X</tt> and <tt>--cnk_dmn</tt>;
+Chunk and uncompress simultaneously;
+<tt>ncra/ncea/ncrcat</tt> <a href="#bug_ncra_no_fl_close">bugfix</a></li>
+<li><b>NCO 4.4.0</b>: 
+Optimizations;
+<tt>ncdismember</tt> awesomeness;
+<tt>ncks --hdn</tt>;
+<tt>ncks --fix_rec_dmn=all</tt>;
+<tt>ncks</tt> <a href="http://nco.sf.net/nco.html#autoconv">autoconversion</a>;
+<tt>ncrename</tt> output path;
+<tt>ncra --mro</tt> <a href="#bug_ncra_mro_mss_val">bugfix</a>;
+<tt>ncra/ncrcat</tt> stride bugfix;
+Better <a href="http://nco.sf.net/nco.html#cnk">chunking</a>;
+Group support for <tt>ncwa -w -m</tt>;</li>
+<li><b>NCO 4.3.9</b>:
+New operator <tt>nces</tt>;
+Full XML/NcML compliance;
+<tt>ncatted</tt> NaN bugfix;</li>
+<li><b>NCO 4.3.8</b>:
+<tt>ncatted</tt> group features;</li>
+<li><b>NCO 4.3.7</b>:
+HDF4 <a href="http://nco.sf.net/nco.html#hdf4">support</a>;
+XML/NcML data <a href="http://nco.sf.net/nco.html#xml">support</a>;
+Multiple record dimension <a href="http://nco.sf.net/nco.html#mrd">support</a> with <tt>ncpdq, ncecat --mrd</a></tt>;
+<tt>ncrename</tt> group features;
+<tt>ncap2</tt> file bugfix;
+<tt>ncecat</tt> ID bugfix;
+<tt>ncwa -b</tt> bugfix;</li>
+<li><b>NCO 4.3.6</b>:
+<tt>--flt</tt> default;
+<tt>ncpdq/ncecat</tt> leave only one record dimension;
+<tt>ncwa/nces</tt> bugfixes;
+<tt>ncdismember</tt></li>
+<li><b>NCO 4.3.5</b>: 
+<tt>nces/ncra/ncrcat</tt> groups with <tt>-g -G --unn</tt>;</li>
+<tt>nces/ncra/ncwa</tt> float→double coercion with <tt><a href="http://nco.sf.net/nco.html#dbl">--dbl</a></tt>;</li>
+<tt>ncwa -d</tt> <a href="#bug_ncwa_lmt">bugfix</a>
+<li><b>NCO 4.3.4</b>:
+HDF unpacking <tt>--hdf_upk</tt>;
+<tt>ncpdq</tt> unpacking <a href="#bug_ncpdq_upk">bugfix</a>;
+CDL printing legibility;</li>
+<li><b>NCO 4.3.3</b>:
+CDL printing <tt>ncks --cdl</tt>;
+<tt>ncrename -g</tt>;
+<tt>ncwa</tt> groups with <tt>-g -G --unn</tt>;</li>
+<li><b>NCO 4.3.2</b>:
+<tt>ncflint/ncpdq</tt> groups with </tt>-g -G --unn</tt>;
+<tt>ncks -X</tt> <a href="#bug_ncks_aux">bugfix</a>;</li>
+<li><b>NCO 4.3.1</b>:
+<tt>ncbo</tt> symmetry, group broadcasting;
+<tt>ncbo -G --unn</tt>;
+<tt>ncecat</tt> <a href="http://nco.sf.net/nco.html#rag">RAG</a>;
+<tt>ncbo</tt> CF <a href="#bug_ncbo_ccm_ccsm_cf">bugfix</a>;
+<tt>ncatted</tt> <a href="#bug_ncatted_strcmp">bugfix</a>;
+Windows DAP;</li>
+<li><b>NCO 4.3.0</b>: 
+<tt>ncbo -g</tt> groups;
+<tt>ncatted</tt> NULs;
+<tt>ncap2</tt> rounding;
+<tt>ncks</tt> metadata <a href="#bug_ncks_mtd">bugfix</a></li>
+<li><b>NCO 4.2.6</b>: 
+Record appending with <tt>ncra/ncrcat --rec_apn</tt>;
+<tt>ncflint --fix_rec_crd</tt>;
+RX's in full paths;
+Correct dimension/coordinate scopes;
+<tt>ncks</tt> MM3 workaround;</li>
+<li><b>NCO 4.2.5</b>: 
+<tt>ncks --mk_rec_dmn</tt> <a href="#bug_ncks_mk_rec_dmn">bugfix</a>;
+<tt>ncks</tt> subsetting <a href="#bug_ncks_sbs">bugfix</a></li>
+<li><b>NCO 4.2.4</b>:
+Group <a href="http://nco.sf.net/nco.html#rx">wildcards</a>;
+Group <a href="http://nco.sf.net/nco.html#anchoring">anchoring and recursion</a>;
+Intersection/union <a href="http://nco.sf.net/nco.html#unn">modes</a>;
+<tt>ncrename</tt> global att. handling;
+<tt>nces</tt> <a href="#bug_nces_rec_var">bugfix</a>;
+<tt>ncra</tt> <a href="#bug_ncra_flg_bfr_nrm">bugfix</a></li>
 <li><b>NCO 4.2.3</b>:
 Group Path Editing (GPE);
 <tt>ncecat</tt> <a href="#bug_ncecat_nintap">bugfix</a></li>
diff --git a/doc/index.shtml b/doc/index.shtml
index 41ec6c9..74d2b88 100644
--- a/doc/index.shtml
+++ b/doc/index.shtml
@@ -70,7 +70,7 @@ Try to disable Spammers' machines:
 <p><h1 align="center">Bienvenue sur le netCDF Operator (NCO) site</h1>
 
 <p><h2>
-Current stable NCO version is 4.5.5 released <!--#flastmod file="src/nco-4.5.5.tar.gz"-->
+Current stable NCO version is 4.6.1 released <!--#flastmod file="src/nco-4.6.1.tar.gz"-->
 </h2>
 
 <table border=0 width=100%>
@@ -83,7 +83,7 @@ Current stable NCO version is 4.5.5 released <!--#flastmod file="src/nco-4.5.5.t
 <li><a href="#prp_sei">NCO→SDO Project</a></li>
 <li><a href="#Publications">Publications</a></li>
 <li><a href="#Highlights">Release Highlights</a></li>
-<li><a href="#Binaries">Binaries</a></li>
+<li><a href="#Executables">Executables</a></li>
 <li><a href="#RTFM">Documentation</a></li>
 <li><a href="#FAQ">FAQ</a></li>
 <li><a href="#Support">Help/Support/Contacts</a></li>
@@ -119,7 +119,7 @@ Keep the size <250×250 pixels.<br>
 </td>
 
 The NCO toolkit manipulates and analyzes data stored in
-<a href="http://www.unidata.ucar.edu/packages/netcdf">netCDF</a>-accessible
+<a href="http://www.unidata.ucar.edu/netcdf">netCDF</a>-accessible
 formats, including 
 <a href="http://opendap.org">DAP</a>,
 <a href="http://hdfgroup.org/products/hdf4">HDF4</a>, and 
@@ -149,12 +149,13 @@ and
 <h2>Recent Releases & Milestones</h2>
 
 <ul>
-<!-- <li>2016 Jul ??: 4.6.2 (<i>In progress</i>) -->
-<li>2016 Jun ??: 4.6.1 (<i>In progress</i>) -->
+<li>2016 Sep ??: 4.6.2 (<i>In progress</i>) -->
+<li>2016 Aug 06: 4.6.1 (Stability)
+<li>2016 Jul 06: Submitted Layer-packing <a href="http://www.geosci-model-dev-discuss.net/gmd-2016-177">Manuscript</a> to <i>Geosci. Model Dev. Discuss.</i></li>
 <li>2016 May 12: 4.6.0 (<tt>ncclimo</tt>)
-<li>2016 Apr 20: <a href="http://www.geosci-model-dev-discuss.net/gmd-2016-63">Manuscript</a> on PPC, <i>Geosci. Model Dev. Discuss.</i></li>
 <li>2016 Apr 06: <a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201604.pdf">Poster</a> at NASA ESDSWG, Greenbelt</li>
 <li>2016 Apr 05: <a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201604.pdf">Talk</a> at NASA GES DISC, Greenbelt</li>
+<li>2016 Mar 22: Submitted PPC <a href="http://www.geosci-model-dev-discuss.net/gmd-2016-63">Manuscript</a> to <i>Geosci. Model Dev. Discuss.</i></li>
 <li>2016 Feb 17: 4.5.5 (Stability)
 <li>2016 Jan 07: 4.5.4 (<tt>ncremap</tt>)
 <li>2015 Dec 16: <a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201512.pdf">Poster</a> at Fall AGU, San Francisco</li>
@@ -181,7 +182,7 @@ and
 <h2>What is NCO?</h2>
 <p>The netCDF Operators (NCO) comprise about a dozen standalone,
 command-line programs that take 
-<a href="http://www.unidata.ucar.edu/packages/netcdf">netCDF</a>,
+<a href="http://www.unidata.ucar.edu/netcdf">netCDF</a>,
 <a href="http://hdfgroup.org">HDF</a>, and/or
 <a href="http://opendap.org">DAP</a>
 files as input, then operate (e.g., derive new data, compute
@@ -243,7 +244,7 @@ many non-linear statistics as well, e.g., total, minimum, RMS.
 Moreover, <tt>ncap2</tt> implements a powerful domain language which
 handles arbitrarily complex algebra, calculus, and statistics (using GSL).
 The operators are as general as 
-<a href="http://www.unidata.ucar.edu/packages/netcdf">netCDF</a>
+<a href="http://www.unidata.ucar.edu/netcdf">netCDF</a>
 itself: there are no restrictions on the contents of input file(s).
 NCO's internal routines are completely dynamic and impose no limit on
 the number or sizes of dimensions, variables, and files.
@@ -552,125 +553,51 @@ climate models (see <a href="#pub">publications</a>).</p>
 <dt><a name="Publications"></a><a name="pub"></a><a name="pubs"></a></dt>
 <h2>Publications and Presentations</h2>
 <ul>
+<li><!-- Zen16 --> <a name="Zen16"></a> <!--http://www.ess.uci.edu/~zender#Zen16 -->
+Zender, C. S. (2016): Regrid Curvilinear, Rectangular, and Unstructured Data (CRUD) with ncremap, a new netCDF Operator. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Greenbelt, MD, April 6--8, 2016.
+<a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201604.pdf">PDF</a> (© 2014 by me)</li>
+
+<li><!-- Zen16 --> <a name="Zen16"></a> <!--http://www.ess.uci.edu/~zender#Zen16 -->
+Zender, C. S. (2016): Regridding Swath, Curvilinear, Rectangular, and Unstructured Data (SCRUD). Presented to the NASA Goddard Earth Sciences (GES) Data and Information Services Center (DISC), Goddard Space Flight Center, Greenbelt, MD, April 5, 2016.
+<a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201604.pdf">PDF</a> (© 2014 by me)</li>
+
+<li><!-- Zen15 --> <a name="Zen15"></a> <!--http://www.ess.uci.edu/~zender#Zen15 -->
+Zender, C. S. (2015): Regrid Curvilinear, Rectangular, and Unstructured Data (CRUD) with ncremap, a new netCDF Operator. Presented to the American Geophysical Union Fall Meeting, San Francisco, CA, December 14--18, 2015. <i>Eos Trans. AGU</i>, <b>95</b>(54), Fall Meet. Suppl., Abstract IN31A-1744.
+<a href="http://dust.ess.uci.edu/smn/pst_nco_agu_201512.pdf">PDF</a> (© 2014 by me)</li>
+
+<li><!-- Zen15 --> <a name="Zen15"></a> <!--http://www.ess.uci.edu/~zender#Zen15 -->
+Zender, C. S. (2015): Optimizing Intrinsic Parallelism to generate climatologies with netCDF Operators (NCO). Presented to the DOE Accelerated Climate Modeling for Energy (ACME) PI Meeting, Albuquerque, NM, November 2--4, 2015.
+<a href="http://dust.ess.uci.edu/smn/smn_nco_acme_201511.pdf">PDF</a> (© 2014 by me)</li>
+
+<li><!-- ZVW15 --> <a name="ZVW15"></a> <!--http://www.ess.uci.edu/~zender#ZVW15 -->
+Zender, C. S., P. Vicente, and W. Wang (2015): Use netCDF Operators (NCO) to Improve Data Interoperability and Usability. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Greenbelt, MD, March 24--26, 2015.
+<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201503.pdf">PDF</a> (© 2014 by me)</li>
+
+<li><!-- ZVW14 --> <a name="ZVW14"></a> <!--http://www.ess.uci.edu/~zender#ZVW14 -->
+Zender, C. S., P. Vicente, and W. Wang (2014): Simplifying and accelerating model evaluation by NASA satellite data. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Greenbelt, MD, March 24--26, 2014.
+<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201403.pdf">PDF</a> (© 2014 by me)</li>
+
 <li><!-- Zen14 --> <a name="Zen14"></a> <!--http://www.ess.uci.edu/~zender#Zen14 -->
 Zender, C. S. (2014): <i>Use Hierarchical Storage and Analysis to Exploit Intrinsic Parallelism</i>. Presented to the NASA Goddard Earth Sciences (GES) Data and Information Services Center (DISC), Goddard Space Flight Center, Greenbelt, MD, March 27, 2014.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201403.pdf">PDF</a> (© 2014 by me)</a></li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_gsfc_201403.pdf">PDF</a> (© 2014 by me)</li>
 
 <li><!-- ZVW13 --> <a name="ZVW13"></a> <!--http://www.ess.uci.edu/~zender#ZVW13 -->
 Zender, C. S., P. Vicente and W. Wang (2013): <i>Use Hierarchical Storage and Analysis to Exploit Intrinsic Parallelism</i>. Presented at the Fall Meeting of the American Geophysical Union, San Francisco, CA, December 9–13, 2013. <i>Eos Trans. AGU</i>, <b>93</b>(53), Fall Meet. Suppl., Abstract IN52A-06.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201312.pdf">PDF</a> (© 2013 by me)</a></li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201312.pdf">PDF</a> (© 2013 by me)</li>
 
 <li><!-- ZVW13 --> <a name="ZVW13"></a> <!--http://www.ess.uci.edu/~zender#ZVW13 -->
-Zender, C. S., P. Vicente and W. Wang (2013): <i>The Future of Model Evaluation</i>. Presented to the Chapman University Symposium on Big Data and Analytics: 44th Symposium on the Interface of Computing Science and Statistics, Chapman University, Orange, CA, April 4–6, 2013. <a href="http://dust.ess.uci.edu/smn/smn_nco_chapman_201304.pdf">PDF</a> (© 2013 by me)</a></li>
+Zender, C. S., P. Vicente and W. Wang (2013): <i>The Future of Model Evaluation</i>. Presented to the Chapman University Symposium on Big Data and Analytics: 44th Symposium on the Interface of Computing Science and Statistics, Chapman University, Orange, CA, April 4–6, 2013. <a href="http://dust.ess.uci.edu/smn/smn_nco_chapman_201304.pdf">PDF</a> (© 2013 by me)</li>
 
 <li><!-- ZVW12 --> <a name="ZVW12"></a> <!--http://www.ess.uci.edu/~zender#ZVW12 -->
 Zender, C. S., P. Vicente and W. Wang (2012): <i>NCO: Simpler and faster model evaluation by NASA satellite data via unified file-level netCDF and HDF-EOS data post-processing tools.</i>. Presented at the Fall Meeting of the American Geophysical Union, San Francisco, CA, December 3–7, 2012. <i>Eos Trans. AGU</i>, <b>93</b>(53), Fall Meet. Suppl., Abstract IN34A-07.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201212.pdf">PDF</a> (© 2012 by me)</a></li>
+<a href="http://dust.ess.uci.edu/smn/smn_nco_agu_201212.pdf">PDF</a> (© 2012 by me)</li>
 
 <li><!-- ZVW12 --> <a name="ZVW12"></a> <!--http://www.ess.uci.edu/~zender#ZVW12 -->
 Zender, C. S., P. Vicente and W. Wang (2012): <i>Simplifying and accelerating model evaluation by NASA satellite data.</i>. Presented to the Earth Science Data Systems Working Group (ESDSWG) Meeting, Annapolis MD, November 13–15, 2012.
-<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201211.pdf">PDF</a> (© 2012 by me)</a></li>
-
-<li><!-- WZJ083 --> <a name="WZJ083"></a> <!--http://www.ess.uci.edu/~zender#WZJ083 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks (2008), Compiling the uncompilable: A case for shell script compilation, <i>Submitted to ACM Trans. Softw. Engin. Method.</i>.
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ083.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ083.pdf">PDF</a> (© 2008 by ACM)</a></li>
-
-<li><!-- WZJ091 --> <a name="WZJ091"></a> <!--http://www.ess.uci.edu/~zender#WZJ091 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks (2009), Efficient Clustered Server-side Data Analysis Workflows using SWAMP, <i>Earth Sci. Inform.</i>, <b>2</b>(3), 141–155, doi:10.1007/s12145-009-0021-z.
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ091.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ091.pdf">PDF</a> (© 2009 by ESI)</a></li>
-
-<li><!-- WZJ081 --> <a name="WZJ081"></a> <!--http://www.ess.uci.edu/~zender#WZJ081 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks: Cluster Workflow Execution of Retargeted Data Analysis Scripts, in <i>Cluster Computing and the Grid, 2008. CCGRID '08. 8th IEEE International Symposium on</i>. Lyons, France, 19 22 May, 2008. IEEE Computer Society, 449–458, doi:10.1109/CCGRID.2008.69.
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ081.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ081.pdf">PDF</a> (© 2008 by IEEE)</a></li>
-
-<li><!-- Zen08 --> <a name="Zen08"></a> <!--http://www.ess.uci.edu/~zender#Zen08 -->
-Zender, C. S. (2008), Analysis of Self-describing Gridded Geoscience Data with netCDF Operators (NCO), <i>Environ. Modell. Softw.</i>, <b>23</b>(10), 1338–1342, doi:10.1016/j.envsoft.2008.03.004.
-<a href="http://dust.ess.uci.edu/ppr/ppr_Zen08.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_Zen08_csz.pdf">PDF (CSZ)</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_Zen08.pdf">PDF (EMS)</a> (© 2008 by Elsevier Ltd.)</a></li>
-
-<li> <!-- WZJ074 --> <a name="WZJ074"></a> <!--http://www.ess.uci.edu/~zender#WZJ074 -->
-Wang, D. L., C. S. Zender and S. F. Jenks (2007): <i>A System for Scripted Data Analysis at Remote Data Centers</i>. Presented at the Fall Meeting of the American Geophysical Union, San Francisco, CA, December 10–14, 2007. <i>Eos Trans. AGU</i>, <b>88</b>(52), Fall Meet. Suppl., Abstract IN11B-0469.
-<a href="http://dust.ess.uci.edu/ppr/pst_WZJ074.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/pst_WZJ074.pdf">PDF (DLW)</a>
-</li>
+<a href="http://dust.ess.uci.edu/smn/pst_nco_esds_201211.pdf">PDF</a> (© 2012 by me)</li>
 
-<li> <!-- WZJ073 --> <a name="WZJ073"></a> <!--http://www.ess.uci.edu/~zender#WZJ073 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks (2007), Server-side parallel data reduction and analysis, in <i>Advances in Grid and Pervasive Computing, Second International Conference, GPC 2007</i>, Paris, France, May 2–4, 2007, Proceedings. IEEE Lecture Notes in Computer Science, vol. 4459, edited by C. Cérin and K.-C. Li, pp. 744–750, Springer-Verlag, Berlin/Heidelberg.
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ073.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ073.pdf">PDF (DLW)</a>
-</li>
+<li><a href="./prs_pbl_old.shtml">Presentation and Publications from 2006–2011</a></li>
 
-<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
-<i>Server-side Parallel Data Reduction and Analysis</i>.
-Presented by D. Wang to the International Conference on Grid and
-Pervasive Computing (GPC),
-Paris, France, May 2–4, 2007. 
-<a href="http://dust.ess.uci.edu/smn/smn_WZJ07_gpc_200705.pdf">PDF</a></li>
-
-<li><!-- ZeM07 --> <a name="ZeM07"></a> <!--http://www.ess.uci.edu/~zender#ZeM07 -->
-Zender, C. S., and H. J. Mangalam (2007), Scaling Properties of Common Statistical Operators for Gridded Datasets, <i>Int. J. High Perform. Comput. Appl, <b>21</b>(4), 485–498, doi:10.1177/1094342007083802</i>.
-<a href="http://dust.ess.uci.edu/ppr/ppr_ZeM07.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_ZeM07_csz.pdf">PDF (CSZ)</a>
-<a href="http://dust.ess.uci.edu/ppr/ppr_ZeM07.pdf">PDF (IJHPCA) (© 2007 by SAGE Publications)</a></li>
-
-<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
-<i>Server-side Data Reduction and Analysis with Script Workflow Analysis for Multi-Processing</i>.
-Presented by D. Wang to the OPeNDAP Developer's Workshop,
-Boulder, CO, February 21–23, 2007.
-<a href="http://dust.ess.uci.edu/smn/smn_WZJ07_opendap_200702.pdf">PDF</a></li>
-
-<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
-<i>Server-side Data Reduction and Analysis with Script Workflow Analysis for Multi-Processing</i>.
-Presented by D. Wang to the 23rd AMS Conference on Interactive Information and
-Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology,
-San Antonio, TX, January 14–18, 2007.
-<a href="http://dust.ess.uci.edu/smn/smn_WZJ07_ams_200701.pdf">PDF</a></li>
-
-<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
-Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
-DAP-enabled Server-side Data Reduction and Analysis, 
-<i>Proceedings of the 23rd AMS Conference on Interactive Information and Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology</i>, 
-Paper 3B.2., January 14–18, San Antonio, TX. American Meteorological Society, AMS Press, Boston, MA.
-<a href="http://dust.ess.uci.edu/ppr/abs_xtn_WZJ07.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/abs_xtn_WZJ07.pdf">PDF</a></li>
-
-<li><!-- ZeW07 --> <a name="ZeW07"></a> <!--http://www.ess.uci.edu/~zender#ZeW07 -->
-Zender, C. S., and D. L. Wang (2007), 
-<i>High performance distributed data reduction and analysis with the netCDF Operators (NCO)</i>. 
-Presented to the 23rd AMS Conference on Interactive Information and Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology, January 14–18, 
-San Antonio, TX, January 14–18, 2007.
-<a href="http://dust.ess.uci.edu/smn/smn_nco_ams_200701.pdf">PDF</a></li>
-
-<li><!-- ZeW07 --> <a name="ZeW07"></a> <!--http://www.ess.uci.edu/~zender#ZeW07 -->
-Zender, C. S., and D. L. Wang (2007), 
-High performance distributed data reduction and analysis with the netCDF Operators (NCO), 
-<i>Proceedings of the 23rd AMS Conference on Interactive Information and Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology</i>, 
-Paper 3B.4., January 14–18, San Antonio, TX. American Meteorological Society, AMS Press, Boston, MA.
-<a href="http://dust.ess.uci.edu/ppr/abs_xtn_ZeW07.bib">BibTeX</a>
-<a href="http://dust.ess.uci.edu/ppr/abs_xtn_ZeW07.pdf">PDF</a></li>
-
-<li><!-- WZJ06 --> <a name="WZJ06"></a> <!-- http://dust.ess.uci.edu/ppr/pst_WZJ06.pdf -->
-Wang, D.&nbsp, Zender, C. S., and S. F. Jenks (2006): 
-<i>Server-side netCDF Data Reduction and Analysis</i>.
-Presented by D. Wang to the Fall Meeting of the American Geophysical Union, 
-San Francisco, CA, December 5–9, 2006.
-<i>Eos Trans. AGU</i>, <b>87</b>(52), Fall Meet. Suppl., Abstract IN53B-0826.
-<a href="http://dust.ess.uci.edu/ppr/pst_WZJ06.pdf">PDF</a>
-
-<li><!-- ZMW06 --> <a name="ZMW06"></a> <!-- http://dust.ess.uci.edu/ppr/pst_ZMW06.pdf -->
-Zender, C. S., H. J. Mangalam, and D. L. Wang (2006):
-<i>Improving Scaling Properties of Common Statistical Operators for Gridded Geoscience Datasets</i>.
-Presented to the Fall Meeting of the American Geophysical Union, 
-San Francisco, CA, December 5–9, 2006.
-<i>Eos Trans. AGU</i>, <b>87</b>(52), Fall Meet. Suppl., Abstract IN53B-0827.
-<a href="http://dust.ess.uci.edu/ppr/pst_ZMW06.pdf">PDF</a>
 </ul>
 <hr></p>
 
@@ -684,7 +611,7 @@ Identical copies of those tarballs are also stored
 <a href="http://nco.sf.net/src">here</a> on SourceForge for historical
 continuity.
 You may retrieve the source of tagged versions directly with, e.g.,
-<tt>git clone -b 4.5.5 http://github.com/nco/nco.git nco-4.5.5</tt></a>.
+<tt>git clone -b 4.6.1 http://github.com/nco/nco.git nco-4.6.1</tt></a>.
 <ul>
 <li><b>NCO 4.6.2</b>: (<i>Future</i>) 
 <tt>ncks</tt> prints human-legible ISO8601 dates;
@@ -692,13 +619,13 @@ You may retrieve the source of tagged versions directly with, e.g.,
 <tt>ncks</tt> prints human-legible ISO8601 dates;
 extensive hashing?;
 netCDF4 compound types?;
+<tt>ncks --xtn</tt> better extensive variable treatment;
 <tt>ncremap</tt> use CF to find coordinates;
 <tt>ncks --xtn</tt> better extensive variable treatment;
 Optimize diskless files?;</li>
 <li><b>NCO 4.6.1</b>: (<i>In Progress, features in-progress or completed include</i>)
-<tt>ncremap</tt> use CF to find coordinates;
-<tt>ncks --xtn</tt> better extensive variable treatment;
-<tt>ncpdq</tt> fix permutation with multiple groups;</li>
+<tt>ncclimo</tt> incremental mode;
+<tt>ncflint -N</tt> normalization;</li>
 <li><b>NCO 4.6.0</b>: 
 <tt>ncap2</tt> LHC metadata propagation;
 <tt>ncatted</tt> nappend mode;
@@ -706,7 +633,9 @@ Optimize diskless files?;</li>
 <tt>ncks</tt> reads ENVI bsq/bip/bil images;
 <tt>ncks</tt> Terraref features;
 <tt>ncks -A</tt> append consistency;
-<tt>ncra --cb</tt> climatology bounds</li>
+<tt>ncpdq</tt> fix permutation with multiple groups;
+<tt>ncra --cb</tt> climatology bounds
+<tt>ncremap</tt> uses CF to find coordinates;
 <tt>ncremap</tt> uses $TMPDIR;</li>
 <li><b>NCO 4.5.5</b>: (<i>Current Stable Release</i>)
 All operators support CDF5 format;
@@ -784,95 +713,7 @@ Default chunking policy/map is <tt>xst/xst</tt>;
 Fix <tt>ncpdq</tt> dimension-reversal parsing;
 Chunking while hyperslabbing <a href="#bug_cnk_hyp">bugfix</a>;
 Correctly parse MS Windows volume names like <tt>C:\foo</tt></li>
-<li><b>NCO 4.4.4</b>:
-netCDF'ize non-compliant element names;
-<tt>-x var</tt> tolerates non-existence;
-<tt>--rad</tt> <a href="http://nco.sf.net/nco.html#rad">orphan dimensions</a>;
-<tt>ncwa --mask_condition</tt> <a href="#bug_ncwa_mask_condition">bugfix</a></li>
-<li><b>NCO 4.4.3</b>:
-Faster DAP access to strided data;
-<a href="http://nco.sf.net/nco.html#grp_brd">Group broadcasting</a> for ensembles;
-<li><b>NCO 4.4.2</b>:
-CF <tt>cell_methods</tt> support;
-Bugfixes for <tt>nces</tt> memory, LLVM/clang builds, <tt>-X</tt>, RX's with groups, <tt>--cnk_dmn</tt>;</li>
-<li><b>NCO 4.4.1</b>: 
-Group support for <tt>-X</tt> and <tt>--cnk_dmn</tt>;
-Chunk and uncompress simultaneously;
-<tt>ncra/ncea/ncrcat</tt> <a href="#bug_ncra_no_fl_close">bugfix</a></li>
-<li><b>NCO 4.4.0</b>: 
-Optimizations;
-<tt>ncdismember</tt> awesomeness;
-<tt>ncks --hdn</tt>;
-<tt>ncks --fix_rec_dmn=all</tt>;
-<tt>ncks</tt> <a href="http://nco.sf.net/nco.html#autoconv">autoconversion</a>;
-<tt>ncrename</tt> output path;
-<tt>ncra --mro</tt> <a href="#bug_ncra_mro_mss_val">bugfix</a>;
-<tt>ncra/ncrcat</tt> stride bugfix;
-Better <a href="http://nco.sf.net/nco.html#cnk">chunking</a>;
-Group support for <tt>ncwa -w -m</tt>;</li>
-<li><b>NCO 4.3.9</b>:
-New operator <tt>nces</tt>;
-Full XML/NcML compliance;
-<tt>ncatted</tt> NaN bugfix;</li>
-<li><b>NCO 4.3.8</b>:
-<tt>ncatted</tt> group features;</li>
-<li><b>NCO 4.3.7</b>:
-HDF4 <a href="http://nco.sf.net/nco.html#hdf4">support</a>;
-XML/NcML data <a href="http://nco.sf.net/nco.html#xml">support</a>;
-Multiple record dimension <a href="http://nco.sf.net/nco.html#mrd">support</a> with <tt>ncpdq, ncecat --mrd</a></tt>;
-<tt>ncrename</tt> group features;
-<tt>ncap2</tt> file bugfix;
-<tt>ncecat</tt> ID bugfix;
-<tt>ncwa -b</tt> bugfix;</li>
-<li><b>NCO 4.3.6</b>:
-<tt>--flt</tt> default;
-<tt>ncpdq/ncecat</tt> leave only one record dimension;
-<tt>ncwa/nces</tt> bugfixes;
-<tt>ncdismember</tt></li>
-<li><b>NCO 4.3.5</b>: 
-<tt>nces/ncra/ncrcat</tt> groups with <tt>-g -G --unn</tt>;</li>
-<tt>nces/ncra/ncwa</tt> float→double coercion with <tt><a href="http://nco.sf.net/nco.html#dbl">--dbl</a></tt>;</li>
-<tt>ncwa -d</tt> <a href="#bug_ncwa_lmt">bugfix</a>
-<li><b>NCO 4.3.4</b>:
-HDF unpacking <tt>--hdf_upk</tt>;
-<tt>ncpdq</tt> unpacking <a href="#bug_ncpdq_upk">bugfix</a>;
-CDL printing legibility;</li>
-<li><b>NCO 4.3.3</b>:
-CDL printing <tt>ncks --cdl</tt>;
-<tt>ncrename -g</tt>;
-<tt>ncwa</tt> groups with <tt>-g -G --unn</tt>;</li>
-<li><b>NCO 4.3.2</b>:
-<tt>ncflint/ncpdq</tt> groups with </tt>-g -G --unn</tt>;
-<tt>ncks -X</tt> <a href="#bug_ncks_aux">bugfix</a>;</li>
-<li><b>NCO 4.3.1</b>:
-<tt>ncbo</tt> symmetry, group broadcasting;
-<tt>ncbo -G --unn</tt>;
-<tt>ncecat</tt> <a href="http://nco.sf.net/nco.html#rag">RAG</a>;
-<tt>ncbo</tt> CF <a href="#bug_ncbo_ccm_ccsm_cf">bugfix</a>;
-<tt>ncatted</tt> <a href="#bug_ncatted_strcmp">bugfix</a>;
-Windows DAP;</li>
-<li><b>NCO 4.3.0</b>: 
-<tt>ncbo -g</tt> groups;
-<tt>ncatted</tt> NULs;
-<tt>ncap2</tt> rounding;
-<tt>ncks</tt> metadata <a href="#bug_ncks_mtd">bugfix</a></li>
-<li><b>NCO 4.2.6</b>: 
-Record appending with <tt>ncra/ncrcat --rec_apn</tt>;
-<tt>ncflint --fix_rec_crd</tt>;
-RX's in full paths;
-Correct dimension/coordinate scopes;
-<tt>ncks</tt> MM3 workaround;</li>
-<li><b>NCO 4.2.5</b>: 
-<tt>ncks --mk_rec_dmn</tt> <a href="#bug_ncks_mk_rec_dmn">bugfix</a>;
-<tt>ncks</tt> subsetting <a href="#bug_ncks_sbs">bugfix</a></li>
-<li><b>NCO 4.2.4</b>:
-Group <a href="http://nco.sf.net/nco.html#rx">wildcards</a>;
-Group <a href="http://nco.sf.net/nco.html#anchoring">anchoring and recursion</a>;
-Intersection/union <a href="http://nco.sf.net/nco.html#unn">modes</a>;
-<tt>ncrename</tt> global att. handling;
-<tt>nces</tt> <a href="#bug_nces_rec_var">bugfix</a>;
-<tt>ncra</tt> <a href="#bug_ncra_flg_bfr_nrm">bugfix</a></li>
-<li><a href="./highlights_old.shtml">Release Highlights from 2000–2012 (versions 1.1.47–4.2.3)</a></li>
+<li><a href="./highlights_old.shtml">Release Highlights from 200001–201406 (versions 1.1.47–4.4.4)</a></li>
 </ul>
 <hr></p>
 <!-- End http://nco.sf.net#hgh -->
@@ -880,8 +721,12 @@ Intersection/union <a href="http://nco.sf.net/nco.html#unn">modes</a>;
 <!-- http://nco.sf.net#bnr -->
 <!-- http://nco.sf.net#binaries -->
 <!-- http://nco.sf.net#Binaries -->
+<!-- http://nco.sf.net#exe -->
+<!-- http://nco.sf.net#executables -->
+<!-- http://nco.sf.net#Executables -->
 <dt><a name="Binaries"></a><a name="bnr"><a name="binaries"></a></dt>
-<h2>Get NCO Binary Executables</h2>
+<dt><a name="Executables"></a><a name="exe"><a name="executables"></a></dt>
+<h2>Pre-built Executables</h2>
 
 <p>Pre-built binary executables are available for many platforms.
 Our source tarballs are always up-to-date, and work on our
@@ -892,7 +737,7 @@ Below are one-line installation instructions and links to these and to
 packages for other platforms created by volunteers.
 Anyone willing to perform regular regression testing and porting 
 of NCO to other platforms is welcome.  
-Previous versions of these binaries are still available by searching
+Previous versions of these executables are still available by searching
 the directory index <a href="src">here</a>.
 
 <a name="aix"></a><a name="ibm"></a> <!-- http://nco.sf.net#aix -->
@@ -903,12 +748,29 @@ Newer (beta- or pre-release) packages are sometimes available for AIX users as d
 Thanks to NSF for supporting AIX machines at NCAR over the years. 
 </ul>
 
+<a name="anaconda"></a> <!-- http://nco.sf.net#anaconda -->
+<a name="conda"></a> <!-- http://nco.sf.net#conda -->
+<h3><a href="https://www.continuum.io/why-anaconda">Anaconda</a></h3>
+<ul>
+<a href="https://www.continuum.io/why-anaconda">Anaconda</a> is a coordinated,
+cross-platform Python environment that utilizes the <tt>conda</tt> package manager.
+Up-to-date versions of NCO for Linux and MacOS are maintained at <a href="https://github.com/conda-forge/nco-feedstock">conda-forge</a>.
+Install NCO in your Anaconda framework with one command ‘<tt>conda install -c conda-forge nco</tt>’.
+Or, alternatively, permanently add conda-forge (which has numerous
+goodies besides NCO) to your automatically-searched channels with
+‘<tt>conda config --add channels --conda-forge</tt>’, then
+install NCO with ‘<tt>conda install nco</tt>’.
+The default NCO installed by <tt>conda</tt> is generally within a month of the latest release. 
+<li><a href="https://github.com/conda-forge/nco-feedstock">nco-4.6.1</a> Executables Anaconda-compatible. Maintained by Filipe Fernandes.</li>
+Thanks to Rich Signell, Filipe Fernandes (and others?) for developing and maintaining the NCO package for conda.
+</ul>
+
 <a name="debian"></a><a name="dbn"></a> <!-- http://nco.sf.net#debian -->
 <a name="ubuntu"></a><a name="ubn"></a> <!-- http://nco.sf.net#ubuntu -->
 <h3><a href="http://www.debian.org">Debian</a> and <a href="http://www.ubuntu.com">Ubuntu</a> GNU/Linux</a></h3>
 <ul>
 <!--
-<li><a href="http://www.debian.org">Debian</a> and <a href="http://www.ubuntu.com">Ubuntu</a> GNU/Linux-compatible Intel systems, prebuilt binary executable <a href="http://www.debian.org">deb</a>: <a href="http://packages.debian.org/testing/math/nco.html">nco-4.5.5</a></li>
+<li><a href="http://www.debian.org">Debian</a> and <a href="http://www.ubuntu.com">Ubuntu</a> GNU/Linux-compatible Intel systems, prebuilt binary executable <a href="http://www.debian.org">deb</a>: <a href="http://packages.debian.org/testing/math/nco.html">nco-4.6.1</a></li>
 -->
 <a href="http://packages.debian.org/unstable/science/nco">Debian NCO</a> and 
 <a href="http://packages.ubuntu.com/natty/nco">Ubuntu NCO</a> homepages.
@@ -916,12 +778,12 @@ Thanks to NSF for supporting AIX machines at NCAR over the years.
 NCO packages in the Debian/Ubuntu repositories (i.e., Sid and Raring) generally lag the packages distributed here by 6–12 months.
 <a name="beta"></a><a name="prerelease"> <!-- http://nco.sf.net#beta -->
 Newer (beta- or pre-release) packages are often available for intrepid Debian/Ubuntu users as described <a href="https://github.com/nco/nco/tree/master/doc/beta.txt">here</a>.
-<dt>Debian package for most recent NCO release (install with, e.g., ‘<tt>dpkg --install nco_4.5.5-1_i386.deb</tt>’):</dt>
-<li><a href="src/nco_4.5.5-1_amd64.deb">nco_4.5.5-1_amd64.deb</a> (<!--#fsize file="src/nco_4.5.5-1_amd64.deb"-->): Executables AMD64-compatible (last updated <!--#flastmod file="src/nco_4.5.5-1_amd64.deb"-->)</li>
-<li><a href="src/nco_4.5.5-1.dsc">nco_4.5.5-1.dsc</a> (<!--#fsize file="src/nco_4.5.5-1.dsc"-->): Description (last updated <!--#flastmod file="src/nco_4.5.5-1.dsc"-->)</li>
-<li><a href="src/nco_4.5.5-1_amd64.changes">nco_4.5.5-1_amd64.changes</a> (<!--#fsize file="src/nco_4.5.5-1_amd64.changes"-->): Changes since last deb package (last updated <!--#flastmod file="src/nco_4.5.5-1_amd64.changes"-->)</li>
-<li><a href="src/nco_4.5.5.orig.tar.gz">nco_4.5.5.orig.tar.gz</a> (<!--#fsize file="src/nco_4.5.5.orig.tar.gz"-->): Upstream Source (last updated <!--#flastmod file="src/nco_4.5.5.orig.tar.gz"-->)</li>
-<li><a href="src/nco_4.5.5-1.diff.gz">nco_4.5.5-1.diff.gz</a> (<!--#fsize file="src/nco_4.5.5-1_amd64.changes"-->): Debian patch to upstream source (last updated <!--#flastmod file="src/nco_4.5.5-1_amd64.changes"-->)</li>
+<dt>Debian package for most recent NCO release (install with, e.g., ‘<tt>dpkg --install nco_4.6.1-1_i386.deb</tt>’):</dt>
+<li><a href="src/nco_4.6.1-1_amd64.deb">nco_4.6.1-1_amd64.deb</a> (<!--#fsize file="src/nco_4.6.1-1_amd64.deb"-->): Executables AMD64-compatible (last updated <!--#flastmod file="src/nco_4.6.1-1_amd64.deb"-->)</li>
+<li><a href="src/nco_4.6.1-1.dsc">nco_4.6.1-1.dsc</a> (<!--#fsize file="src/nco_4.6.1-1.dsc"-->): Description (last updated <!--#flastmod file="src/nco_4.6.1-1.dsc"-->)</li>
+<li><a href="src/nco_4.6.1-1_amd64.changes">nco_4.6.1-1_amd64.changes</a> (<!--#fsize file="src/nco_4.6.1-1_amd64.changes"-->): Changes since last deb package (last updated <!--#flastmod file="src/nco_4.6.1-1_amd64.changes"-->)</li>
+<li><a href="src/nco_4.6.1.orig.tar.gz">nco_4.6.1.orig.tar.gz</a> (<!--#fsize file="src/nco_4.6.1.orig.tar.gz"-->): Upstream Source (last updated <!--#flastmod file="src/nco_4.6.1.orig.tar.gz"-->)</li>
+<li><a href="src/nco_4.6.1-1.diff.gz">nco_4.6.1-1.diff.gz</a> (<!--#fsize file="src/nco_4.6.1-1_amd64.changes"-->): Debian patch to upstream source (last updated <!--#flastmod file="src/nco_4.6.1-1_amd64.changes"-->)</li>
 Thanks to Daniel Baumann, Barry deFreese, Francesco Lovergine, 
 Brian Mays, Rorik Peterson, and Matej Vela for their help packaging
 NCO for Debian over the years. 
@@ -968,18 +830,17 @@ Thanks to Gavin Burris and Kyle Wilcox for documenting build procedures for RHEL
 <!-- 
 # 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.5.macosx.10.11.tar.gz nc*;scp ${DATA}/nco-4.5.5.macosx.10.11.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+cd ~/bin;tar cvzf ${DATA}/nco-4.6.1.macosx.10.11.tar.gz nc*;scp ${DATA}/nco-4.6.1.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.5.macosx.10.11.tar.gz">nco-4.5.5.macosx.10.11.tar.gz</a> (<!--#fsize file="src/nco-4.5.5.macosx.10.11.tar.gz"-->): Executables MacOSX 10.11-compatible (last updated <!--#flastmod file="src/nco-4.5.5.macosx.10.11.tar.gz"-->). 
+The most up-to-date executables 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.6.1.macosx.10.11.tar.gz">nco-4.6.1.macosx.10.11.tar.gz</a> (<!--#fsize file="src/nco-4.6.1.macosx.10.11.tar.gz"-->): Executables MacOSX 10.11-compatible (last updated <!--#flastmod file="src/nco-4.6.1.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>
-<li><a href="src/nco-4.0.3_x86_10.6.dmg">nco-4.0.3_x86_10.6.dmg</a> (<!--#fsize file="src/nco-4.0.3_x86_10.6.dmg"-->): For Mac OS 10.6 (last updated <!--#flastmod file="src/nco-4.0.3_x86_10.6.dmg"-->). Maintained by Chad Cantwell.</li>
 <li><a href="src/nco-4.0.7_x86_10.6.dmg">nco-4.0.7_x86_10.6.dmg</a> (<!--#fsize file="src/nco-4.0.7_x86_10.6.dmg"-->): For Mac OS 10.6 (last updated <!--#flastmod file="src/nco-4.0.7_x86_10.6.dmg"-->). Maintained by Chad Cantwell.</li>
 <li><a href="http://fink.sf.net">Fink</a> packages for <a href="http://fink.sf.net/pdb/package.php/nco">NCO</a>: Currently NCO 3.9.5. Maintained by Alexander Hansen.</li> 
 <li><a href="http://brew.sh">Homebrew</a> packages for <a href="https://github.com/Homebrew/homebrew-science/nco.rb">NCO</a>: Currently NCO 4.4.2. Maintained by Ian Lancaster (Alejandro Soto's instructions <a href="http://alejandrosoto.net/blog/2014/01/22/setting-up-my-mac-for-scientific-research">here</a>).</li> 
-<li><a href="http://trac.macosforge.org/projects/macports/wiki">MacPorts</a> infrastructure for <a href="http://svn.macports.org/repository/macports/trunk/dports/science/nco">NCO</a>: <a href="http://svn.macports.org/repository/macports/trunk/dports/science/nco">Portfile</a> for NCO 4.4.4. Maintained by Takeshi Enomoto.</li>
+<li><a href="http://trac.macosforge.org/projects/macports/wiki">MacPorts</a> infrastructure for <a href="http://svn.macports.org/repository/macports/trunk/dports/science/nco">NCO</a>: <a href="http://svn.macports.org/repository/macports/trunk/dports/science/nco">Portfile</a> for NCO 4.6.0. Maintained by Takeshi Enomoto.</li>
 </ul>
 
 <a name="visual"></a> <!-- http://nco.sf.net#visual -->
@@ -994,10 +855,10 @@ To build NCO from source yourself using MSVC or Qt, please see the <a href="nco_
 <ul>
 <!-- Copy files from http://glace.ess.uci.edu
 /usr/bin/scp /home/pvicente/nco/doc/index.shtml pvicente,nco at web.sf.net:/home/project-web/nco/htdocs
-/usr/bin/scp /home/pvicente/windows_setup/nco-4.5.4.windows.mvs.exe pvicente,nco at web.sf.net:/home/project-web/nco/htdocs/src
+/usr/bin/scp /home/pvicente/windows_setup/nco-4.6.1.windows.mvs.exe pvicente,nco at web.sf.net:/home/project-web/nco/htdocs/src
 /usr/bin/scp /home/pvicente/windows_setup/nco-4.4.5.win32.cygwin.tar.gz pvicente,nco at web.sf.net:/home/project-web/nco/htdocs/src
 -->
-<li><a href="src/nco-4.5.4.windows.mvs.exe">nco-4.5.4.windows.mvs.exe</a> (<!--#fsize file="src/nco-4.5.4.windows.mvs.exe"-->) : Windows Self-Extracting Installer (last updated <!--#flastmod file="src/nco-4.5.4.windows.mvs.exe"-->). Maintained by Pedro Vicente.</li>
+<li><a href="src/nco-4.6.0.windows.mvs.exe">nco-4.6.0.windows.mvs.exe</a> (<!--#fsize file="src/nco-4.6.0.windows.mvs.exe"-->) : Windows Self-Extracting Installer (last updated <!--#flastmod file="src/nco-4.6.0.windows.mvs.exe"-->). Maintained by Pedro Vicente.</li>
 </ul>
 
 <a name="cygwin"></a> <!-- http://nco.sf.net#cygwin -->
@@ -1035,13 +896,17 @@ Thanks to Cygnus Solutions and RedHat Inc. for developing and supporting Cygwin
 <li><a href="./nco.xml">XML</a> Extensible Markup Language (<tt>firefox</tt>)</h2></li>
 </ul>
 <tt>nco.texi</tt> is the most up-to-date.
-Files <tt>nco.dvi</tt>, <tt>nco.ps</tt>, and <tt>nco.pdf</tt> are
+Files <tt>nco.dvi</tt>, <tt>nco.ps</tt>, and <tt>nco.pdf</tt> 
 contain all the mathematical formulae (typeset with TeX) missing from
 the screen-oriented formats. 
 The screen-oriented formats—<tt>nco.html</tt>,
 <tt>nco.info</tt>, <tt>nco.txt</tt>, and <tt>nco.xml</tt>—contain 
 all the documentation except the highly mathematical sections.
 
+Wenshan Wang of UCI contributed a <a href="./nco_rfr_crd.pdf">Quick Reference Card</a> 
+(last updated <!--#flastmod file="./nco_rfr_crd.pdf"-->) suitable for
+printing, framing, and/or carrying on your person at all times.
+
 <!--
 <h3>Wiki:</h3>
 <ul>
@@ -1163,11 +1028,11 @@ site.</li>
 The simplest way to acquire the source is to download the compressed tarball:
 <ul>
 <li>
-<!-- scp ${DATA}/nco-4.5.5.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
-<a href="https://github.com/nco/nco/archive/4.5.5.tar.gz">nco-4.5.5.tar.gz</a> 
-(<!--#fsize file="src/nco-4.5.5.tar.gz"--> compressed tar-file)<br>
-<!--#exec cmd="openssl dgst -md5 src/nco-4.5.5.tar.gz"--><br>
-<!--#exec cmd="openssl dgst -sha1 src/nco-4.5.5.tar.gz"--> 
+<!-- scp ${DATA}/nco-4.6.1.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
+<a href="https://github.com/nco/nco/archive/4.6.1.tar.gz">nco-4.6.1.tar.gz</a> 
+(<!--#fsize file="src/nco-4.6.1.tar.gz"--> compressed tar-file)<br>
+<!--#exec cmd="openssl dgst -md5 src/nco-4.6.1.tar.gz"--><br>
+<!--#exec cmd="openssl dgst -sha1 src/nco-4.6.1.tar.gz"--> 
 </li>
 </ul>
 
@@ -1186,8 +1051,8 @@ You may retrieve any NCO distribution you wish from
 <a href="https://help.github.com">GitHub</a>. 
 Usually you wish to retrieve a recent tagged (i.e., released) version.
 This command retrieves the entire NCO repository (< 20 MB) and
-then checks out NCO version <tt>4.5.5</tt>:
-<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 4.5.5</tt></p>
+then checks out NCO version <tt>4.6.1</tt>:
+<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 4.6.1</tt></p>
 These commands retrieve the current (“bleeding edge”)
 development version of NCO into a local directory named <tt>nco</tt>:
 <p><tt>git clone https://github.com/nco/nco.git ~/nco</tt></p> or
@@ -1195,9 +1060,9 @@ development version of NCO into a local directory named <tt>nco</tt>:
 Track changes to the development version using
 <p><tt>cd nco;git pull</tt></p>
 One difference between running a "tagged" release 
-(e.g., <tt>4.5.5</tt>) and the development version is that the
+(e.g., <tt>4.6.1</tt>) and the development version is that the
 tagged release operators will print a valid version number (e.g.,
-<tt>4.5.5</tt>) when asked to do so with the <tt>-r</tt> flag
+<tt>4.6.1</tt>) when asked to do so with the <tt>-r</tt> flag
 (e.g., <tt>ncks -r</tt>).
 The development version simply places today's date in place of the
 version.
@@ -1229,13 +1094,15 @@ Source documentation for NCO and netCDF4(alpha13)</a></li>
 
 <a name="bld_rqr"></a> <!-- http://nco.sf.net#bld_rqr -->
 <li>Although building NCO yourself can be easy, sexy, and lucrative,
-we recommend that you first try the pre-built binaries for your
+we recommend that you first try the pre-built executables for your
 system, e.g.,  
 <tt>
-<dt>sudo aptitude install nco # Debian-based systems like Debian, Mint, Ubuntu</dt>
-<dt>sudo dnf-install nco      # Newer RPM-based systems like CentOS, Fedora, openSUSE, RHEL</dt>
-<dt>sudo yum-install nco      # Older RPM-based systems like CentOS, Fedora, openSUSE, RHEL</dt>
-<dt>sudo port install nco     # MacPorts (after installing MacPorts on Mac OS X)</dt>
+<dt>brew install homebrew/science/nco # Mac (after installing Homebrew)</dt>
+<dt>conda install -c conda-forge nco # Any Linux or Mac (after installing Anaconda)</dt>
+<dt>sudo aptitude install nco # Debian-based Linux systems like Debian, Mint, Ubuntu</dt>
+<dt>sudo dnf-install nco      # Newer RPM-based Linux systems like CentOS, Fedora, openSUSE, RHEL</dt>
+<dt>sudo yum-install nco      # Older RPM-based Linux systems like CentOS, Fedora, openSUSE, RHEL</dt>
+<dt>sudo port install nco     # Mac (after installing MacPorts on Mac OS X)</dt>
 </tt>
 If pre-built executables do not satisfy you (e.g., are out-of-date)
 and you want the latest, greatest features, then the first steps to
@@ -1243,12 +1110,12 @@ build (i.e., compile, for the most part) NCO from source code are to
 install the pre-requisites:
 <a href="http://www.antlr.org">ANTLR</a> version 2.7.7 (like <a href="http://dust.ess.uci.edu/nco/antlr-2.7.7.tar.gz">this one</a> <i>not</i> version 3.x or 4.x!) (required for <tt>ncap2</tt>), 
 <a href="http://www.gnu.org/software/gsl">GSL</a> (desirable for <tt>ncap2</tt>), 
-<a href="http://www.unidata.ucar.edu/packages/netcdf">netCDF</a> (absolutely required), 
+<a href="http://www.unidata.ucar.edu/netcdf">netCDF</a> (absolutely required), 
 <a href="http://opendap.org">OPeNDAP</a> (enables network transparency), and
 <a href="http://www.unidata.ucar.edu/packages/udunits">UDUnits</a> (allows dimensional unit transformations).
-If possible, install this software stack from pre-built binaries 
+If possible, install this software stack from pre-built executables 
 (commands to do so on Debian, Mac, and RPM systems follow below).
-ANTLR binaries from major distributions are pre-built with the source
+ANTLR executables from major distributions are pre-built with the source
 patch necessary to allow NCO to link to ANTLR.
 If you must build the source stack yourself (e.g., due to lack of root
 access, or systems without packages such as AIX), build all libraries
@@ -1285,7 +1152,7 @@ For Debian-based systems (like Ubuntu) (<tt>aptitude</tt> is similar to and inte
 <dt>sudo aptitude install libcurl4-gnutls-dev libexpat1-dev libxml2-dev # DAP-prereqs (curl, expat XML parser) </dt>
 <dt>sudo aptitude install bison flex gcc g++ # GNU toolchain</dt>
 <dt>sudo aptitude install gsl-bin libgsl0-dev # GSL</dt>
-<dt>sudo aptitude install libnetcdf6 libnetcdf-dev netcdf-bin # netCDF and DAP</dt>
+<dt>sudo aptitude install libnetcdf11 libnetcdf-dev netcdf-bin # netCDF and DAP</dt>
 <dt>sudo aptitude install libhdf5-serial-dev # HDF5</dt>
 <dt>sudo aptitude install ncl-ncarg # ESMF_RegridWeightGen (for ncremap)</dt>
 <dt>sudo aptitude install udunits-bin libudunits2-0 libudunits2-dev # UDUnits</dt>
@@ -1295,7 +1162,7 @@ For Debian-based systems (like Ubuntu) (<tt>aptitude</tt> is similar to and inte
 <dt><a name="bld_yum"></a></dt> <!-- http://nco.sf.net#bld_yum -->
 <dt><a name="dnf"></a></dt> <!-- http://nco.sf.net#dnf -->
 <dt><a name="bld_dnf"></a></dt> <!-- http://nco.sf.net#bld_dnf -->
-For RPM-based systems (substitute <tt>yum</tt> for <tt>dnf</tt> on older Fedora systems):
+For RPM-based systems like Fedora and CentOS (substitute <tt>yum</tt> for <tt>dnf</tt> on older systems):
 <tt>
 <dt>sudo dnf install antlr antlr-C++ -y # ANTLR</dt>
 <dt>sudo dnf install curl-devel libxml2-devel -y # DAP-prereqs</dt>
@@ -1319,9 +1186,10 @@ For Mac OS X with MacPorts:
 <dt>sudo port install gsl # GSL</dt>
 <dt>sudo port install netcdf # netCDF</dt>
 <dt>sudo port install udunits2 # UDUnits</dt>
+</tt>
 Without MacPorts, the system TeXInfo may be too old to build the
 documentation.
-If so, use <tt>configure --disable-doc</tt>.
+In this case use <tt>configure --disable-doc</tt>.
 
 <dt><a name="bld_cygwin"></a></dt> <!-- http://nco.sf.net#bld_cygwin -->
 For Windows with Cygwin, select and install the following packages with Cygwin Setup:
@@ -1341,9 +1209,9 @@ Users should instead first download and install the Antlr found <a href="http://
   then build the latest stable NCO and install it in,
   e.g., <tt>/usr/local</tt> with: 
 <tt>
-<dt>wget https://github.com/nco/nco/archive/4.5.5.tar.gz</dt>
-<dt>tar xvzf 4.5.5.tar.gz</dt>
-<dt>cd nco-4.5.5</dt>
+<dt>wget https://github.com/nco/nco/archive/4.6.1.tar.gz</dt>
+<dt>tar xvzf 4.6.1.tar.gz</dt>
+<dt>cd nco-4.6.1</dt>
 <dt>./configure --prefix=/usr/local</dt>
 <dt>make</dt>
 <dt>sudo make install</dt>
@@ -1393,10 +1261,11 @@ is usually untagged.
 <ul>
 <li>ANL ALCF Cooley <tt>cooley.alcf.anl.gov</tt>: <tt>~zender/bin</tt></li>
 <li>ANL ALCF Mira <tt>mira.alcf.anl.gov</tt>: <tt>~zender/bin</tt></li>
+<li>LLNL <tt>aims4.llnl.gov</tt>: <tt>~zender1/bin</tt></li>
 <li>NCAR CISL <tt>yellowstone.ucar.edu</tt>: <tt>~zender/bin</tt></li>
 <li>NCAR CISL <tt>mirage0.ucar.edu</tt>: <tt>~zender/bin</tt></li>
 <li>NERSC Cori <tt>cori.nersc.gov</tt>: <tt>~zender/bin</tt></li>
-<li>NERSC Edison <tt>edison.nersc.gov</tt>: <tt>~zender/bin</tt> or <tt>module load nco/4.5.2</tt></li>
+<li>NERSC Edison <tt>edison.nersc.gov</tt>: <tt>~zender/bin</tt> or <tt>module load nco/4.5.5</tt></li>
 <li>ORNL OLCF Pileus <tt>pileus-login01.ornl.gov</tt>: <tt>~zender/bin</tt></li>
 <li>ORNL OLCF Rhea <tt>rhea.ccs.ornl.gov</tt>: <tt>~zender/bin</tt></li>
 <li>ORNL OLCF Titan <tt>titan.ccs.ornl.gov</tt>: <tt>~zender/bin</tt></li>
@@ -1752,7 +1621,7 @@ community.
 [<a href="http://cfconventions.org/1.6.html">CF</a>] 
 [<a href="https://wiki.earthdata.nasa.gov/display/ESDSWG/Dataset+Interoperability+Working+Group">DIWG</a>] 
 [<a href="http://www.gnu.org/software/gsl">GSL</a>] 
-[<a href="http://www.unidata.ucar.edu/packages/netcdf">netCDF</a>] 
+[<a href="http://www.unidata.ucar.edu/netcdf">netCDF</a>] 
 [<a href="http://opendap.org">OPeNDAP</a>] 
 [<a href="http://github.com/nco/swamp">SWAMP</a>]
 [<a href="http://www.unidata.ucar.edu/packages/udunits">UDUnits</a>] 
diff --git a/doc/milestones_old.shtml b/doc/milestones_old.shtml
index 0d299a6..33aa1c3 100644
--- a/doc/milestones_old.shtml
+++ b/doc/milestones_old.shtml
@@ -9,7 +9,7 @@ file:///home/zender/nco/doc/milestones_old.shtml
 
 Usage:
 /usr/bin/scp ~/nco/doc/milestones_old.shtml zender,nco at web.sf.net:/home/project-web/nco/htdocs
-scp -p ~/nco/doc/milestones_old.shtml dust.ess.uci.edu:/var/www/html/nco
+scp -p ~/nco/doc/milestones_old.shtml dust.ess.uci.edu:Sites/nco
 -->
 
 <!doctype html public "-//W3C//DTD HTML 3.2//EN">
diff --git a/doc/nco.texi b/doc/nco.texi
index 44c2297..117d049 100644
--- a/doc/nco.texi
+++ b/doc/nco.texi
@@ -38,7 +38,7 @@ M-x texinfo-multiple-files-update
 Usage: 
 export TEX='tex --src-specials'
 cd ~/nco/doc;texi2dvi nco.texi;makeinfo --html --ifinfo --no-split --output=nco.html nco.texi;makeinfo nco.texi;dvips -o nco.ps nco.dvi;texi2dvi --pdf nco.texi;makeinfo --xml --ifinfo --no-split --output=nco.xml nco.texi;makeinfo --no-headers --output=nco.txt nco.texi
-cd ~/nco/doc;/usr/bin/scp index.shtml nco_news.shtml ChangeLog TODO README VERSION nco.dvi nco.html nco.info* nco.pdf nco.ps nco.texi nco.txt nco.xml ../data/ncap.in ../data/ncap2.in zender,nco at web.sf.net:/home/project-web/nco/htdocs;cd -
+cd ~/nco/doc;/usr/bin/scp index.shtml nco_news.shtml ChangeLog TODO README VERSION nco.dvi nco.html nco.info* nco.pdf nco.ps nco.texi nco.txt nco.xml nco_rfr_crd.pdf ../data/ncap.in ../data/ncap2.in zender,nco at web.sf.net:/home/project-web/nco/htdocs;cd -
 dvips -o nco.ps nco.dvi 
 dvips -Ppdf -G0 -o nco.ps nco.dvi 
 makeinfo --html --ifinfo --no-split --output=nco.html nco.texi
@@ -118,12 +118,12 @@ Octave TeXInfo manual shows clean TeXInfo structure
 @setfilename nco.info
 
 @c Define edition, date, ...
- at set nco-edition 4.6.0
- at set doc-edition 4.6.0
+ at set nco-edition 4.6.1
+ at set doc-edition 4.6.1
 @set copyright-years 1995--2016
 @set update-year 2016
- at set update-date 9 May 2016
- at set update-month May 2016
+ at set update-date 6 August 2016
+ at set update-month August 2016
 
 @settitle @acronym{NCO} @value{nco-edition} User Guide
 
@@ -4480,7 +4480,7 @@ convention described in @ref{CF Conventions}.
 As of @acronym{NCO} version 3.9.6 (January, 2009) 
 both @samp{-c} and @samp{-C} honor the @acronym{CF} @code{coordinates}
 convention described in @ref{CF Conventions}.
-As of @acronym{NCO} version 4.6.0 (April, 2016) 
+As of @acronym{NCO} version 4.6.0 (May, 2016) 
 both @samp{-c} and @samp{-C} honor the @acronym{CF} @code{grid_mapping}
 convention described in @ref{CF Conventions}. 
 
@@ -6361,7 +6361,7 @@ Long options:
 @end cartouche
 
 @acronym{NCO} includes extensive regridding features in 
- at command{ncclimo} (as of version 4.6.0 in April, 2016),
+ at command{ncclimo} (as of version 4.6.0 in May, 2016),
 @command{ncremap} (as of version 4.5.4 in November, 2015)
 and @command{ncks} (since version 4.5.0 in June, 2015). 
 Regridding can involve many choices, options, inputs, and outputs.
@@ -6505,9 +6505,9 @@ The first example uses the default conservative algorithm.
 The second example specifies that valid values must cover at least 10%
 of the destination gridcell to meet the threshold for a non-missing
 destination value. 
-For a valid destination area of, say 25%, the renormalized algorithm
-produces a destination value four-times greater than the conservative
-algorithm.
+With valid destination areas of, say 25% or 50%, the renormalized
+algorithm would produce destination values greater than the conservative
+algorithm by factors of four or two, respectively.
 
 In practice, it may make sense to use the default ``conservative''
 algorithm when performing conservative regridding, and the
@@ -7409,13 +7409,13 @@ Availability: @command{ncap2}, @command{ncbo}, @command{nces},
 @command{ncra}, @command{ncrcat}, @command{ncwa}@*
 Short options: none@*
 Long options: 
- at samp{--cnk_byt @var{cnk_sz}}, @samp{--chunk_byte @var{cnk_sz}}@*
- at samp{--cnk_dmn @var{dmn_nm}, at var{cnk_sz}},
- at samp{--chunk_dimension @var{dmn_nm}, at var{cnk_sz}}@*,
+ at samp{--cnk_byt @var{sz_byt}}, @samp{--chunk_byte @var{sz_byt}}@*
+ at samp{--cnk_dmn @var{dmn_nm}, at var{sz_lmn}},
+ at samp{--chunk_dimension @var{dmn_nm}, at var{sz_lmn}}@*,
 @samp{--cnk_map @var{cnk_map}}, @samp{--chunk_map @var{cnk_map}},@*
- at samp{--cnk_min @var{var_sz}}, @samp{--chunk_min @var{var_sz}},@*
+ at samp{--cnk_min @var{sz_byt}}, @samp{--chunk_min @var{sz_byt}},@*
 @samp{--cnk_plc @var{cnk_plc}}, @samp{--chunk_policy @var{cnk_plc}},@*
- at samp{--cnk_scl @var{cnk_sz}}, @samp{--chunk_scalar @var{cnk_sz}}@*
+ at samp{--cnk_scl @var{sz_lmn}}, @samp{--chunk_scalar @var{sz_lmn}}@*
 @end cartouche
 
 All netCDF4-enabled @acronym{NCO} operators that define variables 
@@ -7446,13 +7446,27 @@ variables and dimensions.
 The chunksize option allows per-dimension specification of sizes that 
 will override the selected (or default) chunking map.
 
-The @var{var_sz} parameter is the minimum size in bytes (not elements)
-of variables to chunk.  
+The distinction between elements and bytes is subtle yet crucial to
+understand. 
+Elements refers to values of an array, whereas bytes refers to the
+memory size required to hold the elements. 
+Hence these measures differ by a factor of four or eight for 
+ at code{NC_FLOAT} or @code{NC_DOUBLE}, respectively.
+The option @samp{--cnk_scl} takes an argument @var{sz_lmn} measured in
+elements.
+The options @samp{--cnk_byt} and @samp{--cnk_min} take arguments
+ at var{sz_byt} measured in bytes.
+
+Use the @samp{--cnk_min=@var{sz_byt}} option to set the minimum size in
+bytes (not elements) of variables to chunk.  
 This threshold is intended to restrict use of chunking to variables
 for which it is efficient. 
 By default this minimum variable size for chunking is twice the system 
 blocksize (when available) and is @w{8192 bytes} otherwise. 
-Users may set this to any value with the @samp{--cnk_min} switch.
+Users may set this to any value with the @samp{--cnk_min=@var{sz_byt}}
+switch. 
+To guarantee that chunking is performed on all arrays, regardless of
+size, set the minimum size to one byte (not to zero bytes).
 
 @cindex hyperslab
 @findex ncpdq
@@ -7578,7 +7592,7 @@ is called the @dfn{chunking map}.
 The user specifies the desired chunking map with the @samp{-M} switch
 (or its long option equivalents, @samp{--cnk_map} and
 @samp{--chunk_map}) and its @var{cnk_map} argument.
-Eight chunking maps are currently implemented:@*
+Nine chunking maps are currently implemented:@*
 @cindex @samp{dmn}
 @cindex @samp{scl}
 @cindex @samp{prd}
@@ -7587,6 +7601,7 @@ Eight chunking maps are currently implemented:@*
 @cindex @samp{xst}
 @cindex @samp{rew}
 @cindex @samp{nc4}
+ at cindex @samp{nco}
 @cindex @samp{cnk_dmn}
 @cindex @samp{cnk_scl}
 @cindex @samp{cnk_prd}
@@ -7595,6 +7610,7 @@ Eight chunking maps are currently implemented:@*
 @cindex @samp{cnk_xst}
 @cindex @samp{cnk_rew}
 @cindex @samp{cnk_nc4}
+ at cindex @samp{cnk_nco}
 @cindex @samp{map_dmn}
 @cindex @samp{map_scl}
 @cindex @samp{map_prd}
@@ -7603,6 +7619,7 @@ Eight chunking maps are currently implemented:@*
 @cindex @samp{map_xst}
 @cindex @samp{map_rew}
 @cindex @samp{map_nc4}
+ at cindex @samp{map_nco}
 @cindex Chris Barker
 @table @dfn
 @item Chunksize Equals Dimension Size
@@ -7619,30 +7636,43 @@ Explicitly specify chunksizes for particular dimensions with
 Mnemonic: @emph{R}ecord @emph{D}imension size @emph{1}@*
 @item Chunksize Equals Scalar Size Specified
 Definition: Chunksize for all dimensions is set with the
- at samp{--cnk_scl} option.@* 
+ at samp{--cnk_scl=@var{sz_lmn}} option.
+For this map @var{sz_lmn} itself becomes the chunksize of each
+dimension.  
+This is in contrast to the @var{cnk_prd} map, where the @var{r}th root
+of @var{sz_lmn}) becomes the chunksize of each dimension.@* 
+ at var{cnk_map} key values: @samp{scl}, @samp{cnk_scl}, @samp{map_scl}@*
+Mnemonic: @emph{SC}a at emph{L}ar@*
 @var{cnk_map} key values: @samp{xpl}, @samp{cnk_xpl}, @samp{map_xpl}@*
 Mnemonic: E at emph{XPL}icitly specified dimensions@*
 @item Chunksize Product Matches Scalar Size Specified
 Definition: The product of the chunksizes for each variable
 matches (approximately equals) the size specified with the
- at samp{--cnk_scl} option.
+ at samp{--cnk_scl=@var{sz_lmn}} option.
 A dimension of size one is said to be @emph{degenerate}.
 For a variable of rank @var{R} (i.e., with @var{R} non-degenerate
-dimensions), the chunksize in each non-degenerate dimension is the
- at var{R}th root of @var{cnk_scl}.@*
+dimensions), the chunksize in each non-degenerate dimension is
+(approximately) the @var{R}th root of @var{sz_lmn}.
+This is in contrast to the @var{cnk_scl} map, where @var{sz_lmn} itself
+becomes the chunksize of each dimension.@* 
 @var{cnk_map} key values: @samp{prd}, @samp{cnk_prd}, @samp{map_prd}@*
 Mnemonic: @emph{PR}o at emph{D}uct@*
 @item Chunksize Lefter Product Matches Scalar Size Specified
-[@emph{default for netCDF3 input}]
 Definition: The product of the chunksizes for each variable
-(approximately) equals the size specified with the @samp{--cnk_scl} 
-option.
+(approximately) equals the size specified with the
+ at samp{--cnk_byt=@var{sz_byt}} (not @samp{--cnk_dfl}) option.
 This is accomplished by using dimension sizes as chunksizes for the
 rightmost (most rapidly varying) dimensions, and then ``flexing'' the
 chunksize of the leftmost (least rapidly varying) dimensions such that 
 the product of all chunksizes matches the specified size.
-All dimensions to the left of and including the first record dimension
-define the left-hand side.
+All @var{L}-dimensions to the left of and including the first record 
+dimension define the left-hand side.
+To be precise, if the total size (in bytes) of the variable is
+ at var{var_sz}, and if the specified (with @samp{--cnk_byt}) product of
+the @var{R} ``righter'' dimensions (those that vary more rapidly than
+the first record dimension) is @var{sz_byt}, then chunksize (in bytes)
+of each of the @var{L} lefter dimensions is (approximately) the
+ at var{L}th root of @math{@var{var_sz}/@var{sz_byt}}.
 This map was first proposed by Chris Barker.@*
 @var{cnk_map} key values: @samp{lfp}, @samp{cnk_lfp}, @samp{map_lfp}@*
 Mnemonic: @emph{L}e at emph{F}ter @emph{P}roduct@*
@@ -7693,8 +7723,8 @@ override specific chunksizes determined by the maps above.
 The user specifies the per-dimension chunksizes with the (equivalent) 
 long options @samp{--cnk_dmn} or @samp{--chunk_dimension}).
 The option takes two comma-separated arguments,
- at var{dmn_nm}, at var{cnk_sz}, which are the dimension name and its
-chunksize, respectively. 
+ at var{dmn_nm}, at var{sz_lmn}, which are the dimension name and its
+chunksize (in elements, not bytes), respectively. 
 The @samp{--cnk_dmn} option may be used as many times as necessary.
 
 The default behavior of chunking depends on several factors.
@@ -7709,7 +7739,7 @@ netCDF4 library.
 
 When any chunking parameter @emph{except} @samp{cnk_plc} or
 @samp{cnk_map} is specified (such as @samp{cnk_dmn} or
- at samp{cnk_sz_scl}), then the ``existing'' policy and map are
+ at samp{cnk_scl}), then the ``existing'' policy and map are
 retained and the output chunksizes are modified where necessary in
 accord with the user-specified parameter.
 When @samp{cnk_map} is specified and @samp{cnk_plc} is not, then
@@ -7795,6 +7825,8 @@ instructions to activate chunking nevertheless contain chunked
 variables. 
 
 @html
+<a name="bg"></a> <!-- http://nco.sf.net/nco.html#bg -->
+<a name="BG"></a> <!-- http://nco.sf.net/nco.html#BG -->
 <a name="ppc"></a> <!-- http://nco.sf.net/nco.html#ppc -->
 <a name="PPC"></a> <!-- http://nco.sf.net/nco.html#PPC -->
 <a name="compression"></a> <!-- http://nco.sf.net/nco.html#compression -->
@@ -8236,7 +8268,7 @@ in the least significant digit.
 @html
 <p><b>Note for HTML users</b>: 
 <br>The definition of error metrics relies heavily on mathematical
-expressions which cannot easily be represented in HTML.  
+expressions that cannot easily be represented in HTML.  
 <b>See the <a href="./nco.pdf">printed manual</a> for much more detailed
 and complete documentation of this subject.</b>
 @end html
@@ -10829,7 +10861,7 @@ Ancillary variables are subject to the user-specified override switches
 @end html
 @cindex @code{grid_mapping} attribute
 @cindex ancillary variables convention
-As of @acronym{NCO} version 4.6.0 (April, 2016), @acronym{NCO} 
+As of @acronym{NCO} version 4.6.0 (May, 2016), @acronym{NCO} 
 supports the @acronym{CF} @code{grid_mapping} convention for 
 described 
 @uref{http://cfconventions.org/cf-conventions/cf-conventions.html#grid-mappings-and-projections, here}.
@@ -11469,6 +11501,7 @@ arithmetic expression:
 time_avg=time.total() / $time.size;
 @end example
 
+
 Increase the size of a new variable by one and set new member to zero:
 @example
 defdim("cnt_new",$cnt.size+1);
@@ -11476,6 +11509,12 @@ new_var[$cnt_new]=0.0;
 new_var(0:($cnt_new.size-2))=old_var;
 @end example
 
+To define an unlimited dimension simply set the size to zero
+ at example
+defdim("time2",0)
+ at end example
+
+
 @noindent @strong{Dimension Abbreviations @*}
 It is possible to use dimension abbreviations as method arguments:@*
 @code{$0} is the first dimension of a variable@*
@@ -15332,18 +15371,34 @@ value attributes to each numeric type, as in the third example.
 @cindex @acronym{IEEE} NaN
 @cindex Not-a-Number
 @acronym{NCO} arithmetic operators may not work as expected on
- at acronym{IEEE} NaN (short for Not-a-Number) and NaN-like numbers such as
+ at acronym{IEEE} NaN (short for Not-a-Number) and NaN-like numbers such as 
 positive infinity and negative infinity
- at footnote{Arithmetic comparisons to NaN and NaN-like numbers always
+ at footnote{NaN is a special floating point value (not a string).
+Arithmetic comparisons to NaN and NaN-like numbers always
 return False, contrary to the behavior of all other numbers.
-This is difficult to inuit, yet is the behavior defined for NaN by
- at w{@acronym{IEEE} 754}.
-Although using NaN for the missing value in datasets is legal, 
-we strongly discourage it.}. 
+This behavior is difficult to intuit, yet @w{@acronym{IEEE} 754}
+mandates it.  
+To correctly handle NaNs during arithmetic, code must use special 
+math library macros (e.g., @command{isnormal()}) to determine whether
+any operand is special. 
+If so, additional special logic must handle the arithmetic.
+This is in addition to the normal handling incurred to correctly handle
+missing values. 
+Handling field and missing values (either or both of which may be NaN)
+in binary operators thus incurs four-to-eight extra code paths.
+Each code path slows down arithmetic relative to normal numbers.
+This makes supporting NaN arithmetic costly and inefficient.
+Hence @acronym{NCO} supports NaN only to the extent necessary to replace
+it with a normal number.
+Although using NaN for the missing value (or any value) in datasets is
+legal in netCDF, we strongly discourage it.
+We recommend avoiding NaN entirely.}. 
 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.
+NaNs (though none of the arithmetic operators do).
+This limited support enables users to change NaN to a normal number
+before performing arithmetic or propagating a NaN-tainted dataset.
 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.  
@@ -15499,7 +15554,8 @@ omitted in batch scripts.
 SYNTAX
 @example 
 ncbo [-3] [-4] [-6] [-7] [-A] [-C] [-c]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]] [-F] 
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [-h] [--hdr_pad @var{nbr}]
 [-L @var{dfl_lvl}] [-l @var{path}] [--no_tmp_fl]
@@ -15936,34 +15992,37 @@ DESCRIPTION
 
 @command{ncclimo} produces climatological monthly means, seasonal means,
 annual mean, and optionally regrids all these files.
+There are five required options (@samp{-c}, @samp{-s}, @samp{-e},
+ at samp{-i}, and @samp{-o})), and more options are available to customize
+the processing.
+Options are similar but not identical (due to shell limitations) to
+ at command{ncremap} options.
 Standard @command{ncclimo} usage looks like
 @example
-ncclimo           -c caseid -s srt_yr -e end_yr -i drc_in -o drc_out
-ncclimo -m mdl_nm -c caseid -s srt_yr -e end_yr -i drc_in -o drc_out
+ncclimo            -c caseid -s srt_yr -e end_yr -i drc_in -o drc_out
+ncclimo -m mdl_nm  -c caseid -s srt_yr -e end_yr -i drc_in -o drc_out
+ncclimo -v var_lst -c caseid -s srt_yr -e end_yr -i drc_in -o drc_out
 @end example
 A complete description of all available flags is given in comments
-embedded in @command{ncclimo}.
-The standard options are:
+embedded in @command{ncclimo}, and a more succinct description is given 
+below.
+Options in alphabetical order are:
 @table @option
- at item -s srt_yr
-Start year (example: 1980). 
-Unless the option @samp{-a sdd} is specified, the first month used will
-be December of the year before the start year (to allow for contiguous
-DJF climos).   
-If @samp{-a sdd} is specified, the first month used will be January of
-the specified start year. 
- at item -e end_yr
-End year (example: 2000). 
-Unless the option @samp{-a sdd} is specified, the last month used will
-be November of the specified end year. 
-If @samp{-a sdd} is specified, the last month will be December of the
-specified end year.  
- at item -i drc_in
-Directory containing all netCDF files that will be input to produce the
-climo. 
- at item -o drc_out
-Directory to hold computed (output) climo files.
- at item -c caseid
+ at cindex @code{-a @var{clm_md}}
+ at cindex @var{clm_md}
+ at item -a @var{clm_md}
+Climatology mode that determines type of @acronym{DJF} average.
+The two valid options are @code{scd} (default) and @code{sdd}.
+ at acronym{SCD}-mode stands for ``Seasonally Continuous December''. 
+The first month used is December of the year before the start year
+specified with @samp{-s}.
+The last month is November of the end year specified with @samp{-e}.
+ at acronym{SDD}-mode stands for ``Seasonally Discontinuous December''. 
+The first month used is January of the specified start year. 
+The last month is December of the end year specified with @samp{-e}.
+ at cindex @code{-c @var{caseid}}
+ at cindex @var{caseid}
+ at item -c @var{caseid}
 Simulation name, or any input filename for non- at acronym{CESM}'ish files.  
 For @acronym{CESM}'ish input files like
 @file{famipc5_ne30_v0.3_00001.cam.h0.1980-01.nc}, 
@@ -15975,10 +16034,135 @@ These can be modified via the @option{-m @var{mdl_nm}} and
 For input files like @file{merra2_198001.nc},
 specify @samp{-c merra2_198001.nc}. 
 See comments in @command{ncclimo} for further documentation.   
- at item -m mdl_nm
+ 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 item -e @var{end_yr}
+End year (example: 2000). 
+Unless the option @samp{-a sdd} is specified, the last month used 
+is November of the specified end year. 
+If @samp{-a sdd} is specified, the last month is December of the
+specified end year.  
+ at cindex @code{-f @var{fml_nm}}
+ at cindex @var{fml_nm}
+ at item -f @var{fml_nm}
+Family name (nickname) of output files.
+By default output climo file names are constructed from the @var{caseid}
+of the input files.
+The @var{fml_nm}, if supplied, replaces @var{caseid} in output climo
+names, which are of the form
+ at var{fml_nm}_XX_YYYYMM_YYYYMM.nc where @var{XX} is the month or seasonal
+abbreviation.
+Use @samp{-f @var{fml_nm}} to simplify long names, avoid overlap, etc.
+Example values of @var{fml_nm} are @samp{control}, @samp{experiment},
+and (for a single-variable climo) @samp{FSNT}.
+ at cindex @code{-h @var{hst_nm}}
+ at cindex @var{hst_nm}
+ at item -h @var{hst_nm}
+History volume name of file used to generate climatologies.
+This referring to the @var{hst_nm} character sequence used to construct
+input file names: @code{caseid.mdl_nm.}@var{hst_nm}@code{.YYYY-MM.nc}.
+By default input climo file names are constructed from the @var{caseid} 
+of the input files, together with the model name @var{mdl_nm} (specified
+with @samp{-m}) and the date range.
+Use @samp{-h @var{hst_nm}} to specify alternative history volumes.
+Examples include @samp{h0} (default, works for @acronym{CAM},
+ at acronym{ALM/CLM}), @samp{h1}, and @samp{h} (for @acronym{CISM}).
+ at cindex @code{-i @var{drc_in}}
+ at cindex @var{drc_in}
+ at item -i @var{drc_in}
+Directory containing all monthly mean files to read as input to the
+climatology.  
+ at cindex @code{-l}
+ at item -l 
+This switch (which takes no option) turns-off the default linking of
+ at acronym{ACME}-climo to @acronym{AMWG}-climo filenames.  
+ at acronym{AMWG} omits the @acronym{YYYYMM} components of climo filenames,
+resulting in shorter names.
+By default @command{ncclimo} symbolically links the full
+(@acronym{ACME}) filename to the shorter (@acronym{AMWG}) name.
+ at acronym{AMWG} diagnostics scripts can produce plots directly from
+these linked filenames. 
+Use this switch to turn-off that linking and reduce filename
+proliferation if you do not need @acronym{AMWG} filenames.
+ at cindex @code{-m @var{mdl_nm}}
+ at cindex @var{mdl_nm}
+ at item -m @var{mdl_nm}
 Model name (as embedded in monthly input filenames). 
 Default is @samp{cam}. Other options are @samp{clm2}, @samp{ocn},
 @samp{ice}, @samp{cism}, @samp{cice}, @samp{pop}. 
+ at cindex @code{-O @var{drc_rgr}}
+ at cindex @var{drc_rgr}
+ at item -O @var{drc_rgr}
+Directory to hold regridded climo files.
+Regridded climos are placed in @var{drc_out} unless a separate
+directory for them is specified with @samp{-O} (NB: capital ``O''). 
+ at cindex @code{-o @var{drc_out}}
+ at cindex @var{drc_out}
+ at item -o @var{drc_out}
+Directory to hold computed (output) native grid climo files.
+Regridded climos are also placed here unless a separate directory
+for them is specified with @samp{-O} (NB: capital ``O''). 
+ at cindex @code{-p @var{par_typ}}
+ at cindex @var{par_typ}
+ at item -p @var{par_typ}
+Specifies the parallelism mode desired.
+The options are serial mode (@samp{-p nil} or @samp{-p serial}), 
+background mode parallelism (@samp{-p bck}), and @acronym{MPI}
+parallelism @samp{-p mpi}. 
+The default is background-mode parallelism.
+The default @var{par_typ} is @samp{bck}, which means @command{ncclimo} 
+runs spawns up to twelve (one for each month) parallel processes at a time.
+See discussion below under Memory Considerations.
+ at cindex @code{-r @var{rgr_map}}
+ at cindex @var{rgr_map}
+ at item -r @var{rgr_map}
+Regridding map.
+Unless @samp{-r} is specified @command{ncclimo} produces only a 
+climatology on the native grid of the input datasets.
+The @var{rgr_map} specifies how to (quickly) transform the native
+grid into the desired analysis grid.
+ at command{ncclimo} will (call @command{ncremap} to) apply the given map
+to the native grid climatology and produce a second climatology on the
+analysis grid.
+Options intended exclusively for the regridder may be passed as
+arguments to the @samp{-R} switch.
+See below the discussion on regridding.
+ at cindex @code{-s @var{srt_yr}}
+ at cindex @var{srt_yr}
+ at item -s @var{srt_yr}
+Start year (example: 1980). 
+Unless the option @samp{-a sdd} is specified, the first month used will
+be December of the year before the start year (to allow for contiguous
+ at acronym{DJF} climos).   
+If @samp{-a sdd} is specified, the first month used is January of
+the specified start year. 
+ 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 to 8--16 threads.
+However, regridding with the maximum number of threads can interfere
+with climatology generation in parallel climatology mode (i.e., when
+ at math{@var{par_typ}} = @code{mpi} or @code{bck}). 
+Hence @command{ncclimo} defaults to @var{thr_nbr}=2.
+ at cindex @code{-v @var{var_lst}}
+ at cindex @var{var_lsty}
+ at item -v @var{var_lst}
+Variables to subset.
+Same behavior as @ref{Subsetting Files}.
+Regular expressions are allowed so, e.g., @samp{PREC.?} extracts
+the variables @samp{PRECC,PRECL,PRECSC,PRECSL} if present.
 @end table
 @noindent
 
@@ -16048,8 +16232,8 @@ geometry string obtained from the mapfile, e.g.,
 These files also have symbolic links to their @acronym{AMWG} filenames. 
 @example
 ncclimo -c amip_xpt -s 1980 -e 1983 -i drc_in -o drc_out
-ncclimo -c amip_xpt -s 1980 -e 1983 -i drc_in -r map_fl -o drc_out
-ncclimo -c amip_xpt -s 1980 -e 1983 -i drc_in -r map_fl -o drc_out -O drc_rgr
+ncclimo -c amip_xpt -s 1980 -e 1983 -i drc_in -o drc_out -r map_fl
+ncclimo -c amip_xpt -s 1980 -e 1983 -i drc_in -o drc_out -r map_fl -O drc_rgr
 @end example
 @noindent
 The above commands perform a climatology without regridding, then with
@@ -16069,8 +16253,145 @@ ls drc_out/*climo* | ncremap -m map.nc -O drc_rgr
 See @ref{ncremap netCDF Remapper} for more details (including
 @acronym{MPAS}!).  
  
+ at cindex incremental climatologies (climos)
+ at cindex extended climatology (climo)
+ at cindex previous climatology (climo)
+ at cindex current climatology (climo)
+ at unnumberedsubsec Incremental Climatologies
+As of @acronym{NCO} version 4.6.2 (released July, 2016),
+ at command{ncclimo} supports generating climatologies incrementally,
+rather as monolithic products generated from the raw monthly data.
+The so-called ``extended climo'' is computed as a weighted mean of two 
+consecutive shorter climatologies, called the ``previous'' and
+``current'' climos.
+The extended climo is computed from the earlier climos, not the original
+monthly input that generated them.
+This permits ongoing simulations (or lengthy observations) to be
+analyzed in shorter segments that are incrementaly combined, instead of 
+requiring all raw, native-grid data to be simultaneously accessible.
+
+Without incremental climatology capability, generating a one-hundred
+year climatology requires that one-hundred years of monthly data be
+available on disk. 
+Disk-space requirements for large datasets may make this untenable.
+The incremental climo feature permits this one-hundred year climo to be
+generated as the weighted mean of, say, the current ten year climatology
+(weighted at 10%) combined with the climatology of the previous 90-years
+(weighted at 90%). 
+The 90-year climo could itself have been generated incrementally, and so
+on. 
+Climatologies occupy at most 17/(12 at var{N}) the amount of space
+of @var{N} years of monthly data, so incremental climatologies
+vastly reduce disk-space requirements.
+
+ at command{ncclimo} first generates the current climatology from the
+current monthly input files then, if requested (with @samp{-S}), weights 
+that current climo with the previous climo to produce the extended
+climo.   
+The argument to @samp{-S}) is the previous climo start year.
+That, together with the current climo end year, determines the extended
+climo range.
+ at command{ncclimo} assumes that the previous climo ends the month before
+the current climo begins.
+Most users will run incremental clmos the same way they run regular climos
+in terms of parallelism and regridding, although that is not required.  
+Both climos must treat Decembers same way (or else previous climo files
+will not be found), and if subsetting (i.e., @samp{-v var_lst}) is
+performed, then the subset must remain the same, and if nicknames (i.e.,
+ at samp{-f fml_nm}) are employed, then the nickname must remain the same. 
+
+As of 20160621, the @code{climatology_bounds} attributes of the extended
+climo are incorrect. 
+This is a work in progress...
+
+Options:
+ at table @option
+ at cindex @code{-S @var{yr_srt_prv}}
+ at cindex @var{yr_srt_prv}
+ at item -S @var{yr_srt_prv}
+The starting year of the previous climo. 
+This is the only mandatory argument.
+It is required to trigger incremental climatologies.
+ at cindex @code{-x @var{drc_prv}}
+ at cindex @var{drc_prv}
+ at item -x @var{drc_prv}
+Directory in which the previous native grid climo files reside for an
+incremental climatology. 
+Default value is @var{drc_out}. 
+Unless a separate directory is specified (with @samp{-y}) for the
+previous climo on the analysis grid, it is assumed to reside in
+ at var{drc_prv}, too. 
+ at cindex @code{-X @var{drc_xtn}}
+ at cindex @var{drc_xtn}
+ at item -X @var{drc_xtn}
+Directory in which the extended native grid climo files will be stored
+for an incremental climatology.
+Default value is @var{drc_prv}. 
+Unless a separate directory is specified (with @samp{-Y}) for the
+extended climo on the analysis grid, it will be stored in @var{drc_xtn},
+too.  
+ at cindex @code{-y @var{drc_rgr_prv}}
+ at cindex @var{drc_rgr_prv}
+ at item -y @var{drc_rgr_prv}
+Directory in which the previous climo on the analysis grid resides in an
+incremental climatology. 
+Default value is @var{drc_prv}.
+ at cindex @code{-Y @var{drc_rgr_xtn}}
+ at cindex @var{drc_rgr_xtn}
+ at item -Y @var{drc_rgr_xtn}
+Directory in which the extended analysis grid climo files will be
+stored in an incremental climatology. 
+Default value is @var{drc_xtn}.
+ at end table
+ at noindent
+
+Incremental climatologies can be as simple as providing a start year for
+the previous climo, e.g., 
+ at example
+ncclimo -v FSNT,AODVIS -c caseid -s 1980 -e 1981 -i raw -o clm -r map.nc
+ncclimo -v FSNT,AODVIS -c caseid -s 1982 -e 1983 -i raw -o clm -r map.nc -S 1980
+ at end example
+By default @command{ncclimo} stores all native and analysis grid climos
+in one directory so the above ``just works''.
+There are no namespace clashes because all climos are for distinct
+years, and regridded files have a suffix based on their grid resolution.  
+However, there can be only one set of @acronym{AMWG} filename links
+due to @acronym{AMWG} filename convention.
+Thus @acronym{AMWG} filename links, if any, point to the latest extended 
+climo in a given directory. 
+
+Many researchers segregate (with @samp{-O @var{drc_rgr}}) native-grid
+from analysis-grid climos. 
+Incrementally generated climos must be consistent in this regard.
+In other words, all climos contributing to an extended climo must have
+their native-grid and analysis-grid files in the same (per-climo)
+directory, or all climos must segregate their native from their analysis
+grid files.
+Do not segregate the grids in one climo, and combine them in another.
+Such climos cannot be incrementally aggregated.
+Thus incrementing climos can require from zero to four additional
+options that specify all the previous and extended climatologies for
+both native and analysis grids.
+The example below constructs the current climo in @var{crr},
+then combines the weighted average of that with the previous climo in
+ at var{prv}, and places the resulting extended climatology in @var{xtn}.
+Here the native and analysis climos are combined in one directory per 
+climo:
+ at example
+ncclimo -v FSNT,AODVIS -c caseid -s 1980 -e 1981 -i raw -o prv -r map.nc
+ncclimo -v FSNT,AODVIS -c caseid -s 1982 -e 1983 -i raw -o clm -r map.nc \
+        -S 1980 -x prv -X xtn
+ at end example
+If the native and analysis grid climo directories are segregated, 
+then those directories must be specified, too:
+ at example
+ncclimo -v FSNT,AODVIS -c caseid -s 1980 -e 1981 -i raw -o prv -O rgr_prv -r map.nc
+ncclimo -v FSNT,AODVIS -c caseid -s 1982 -e 1983 -i raw -o clm -O rgr -r map.nc \
+        -S 1980 -x prv -X xtn -y rgr_prv -Y rgr_xtn
+ at end example
+
 @unnumberedsubsec Coupled Runs
- at command{ncclimo} works on all @acronym{ACME} models. 
+ at command{ncclimo} works on all @acronym{ACME} and @acronym{CESM} models. 
 It can simultaneously generate climatologies for a coupled run, where
 climatologies mean both native and regridded monthly, seasonal, and
 annual averages as per @acronym{ACME} specifications (which mandate
@@ -16157,18 +16478,16 @@ climos.
 The full memory of each node is available for each individual climo. 
 The optional regridding employs, by default, up to eight cores per node
 in @acronym{MPI}-mode.
- at acronym{MPI}-mode (or Background-mode on a big memory node) must be
-used to process ne30L72 and ne120L30 climos on some, but not all, 
- at acronym{DOE} computers. 
-For example, attempting an ne120L30 climo on in background mode on
- at file{rhea} (i.e., on one @w{128 GB} compute node) will fail due to 
- at acronym{OOM}. 
+ at acronym{MPI}-mode or serial-mode must be used to process ne30L72 and
+ne120L30 climos on all but the fattest @acronym{DOE} nodes. 
+An ne120L30 climo in background mode on @file{rhea} (i.e., on one @w{128
+GB} compute node) fails due to @acronym{OOM}. 
 (Unfortunately @acronym{OOM} errors do not produce useful return codes
 so if your climo processes die without printing useful information, the
 cause may be @acronym{OOM}). 
-However the same climo will succeed if executed on a single big-memory
-(@w{1 TB}) node on @file{rhea} (use @samp{-lpartition=gpu}, as shown
-below). 
+However the same climo in background-mode succeeds when executed on a
+single big-memory (@w{1 TB}) node on @file{rhea} (use
+ at samp{-lpartition=gpu}, as shown below). 
 Or @acronym{MPI}-mode can be used for any climatology. 
 The same ne120L30 climo will also finish blazingly fast in background
 mode on @file{cooley} (i.e., on one @w{384 GB} compute node), so
@@ -16241,7 +16560,7 @@ This command returns a prompt once nodes are assigned (the prompt is
 returned in your home directory so you may then have to @command{cd} to
 the location you meant to run from). 
 Then run your code with the basic @command{ncclimo} invocation.
-It will be faster because it has exclusive access to the node.
+The is faster because the node is exclusively dedicated to @command{ncclimo}.
 Again, ne30L30 climos only require @w{< 2} minutes, so the 
 @w{10 minutes} requested in the example is excessive and conservative.  
 Tune it with experience. 
@@ -16480,7 +16799,7 @@ EXAMPLES
 <a name="merra2"></a> <!-- http://nco.sf.net/nco.html#merra2 -->
 @end html
 How to create a climo from a collection of monthly
-non- at acronym{CESM}'ish files?
+non- at acronym{CESM}'ish files? 
 This is a two-step procedure:
 First be sure the names are arranged with a @acronym{YYYYMM}-format date
 preceding the suffix (usually @samp{.nc}).
@@ -16510,6 +16829,20 @@ Then call @command{ncclimo} with @file{merra2_200903.nc4} as
 ncclimo -c merra2_200903.nc4 -s 1980 -e 2016 -i $drc_in -o $drc_out
 @end example
 
+Often one wishes to create a climatology of a single variable.
+The @samp{-f @var{fml_nm}} option to @command{ncclimo} makes this easy.
+Consider a series of single-variable climos for the fields @code{FSNT}, 
+and @code{FLNT}
+ at example
+ at verbatim
+ncclimo -v FSNT -f FSNT -c amip_xpt -s 1980 -e 1983 -i drc_in -o drc_out
+ncclimo -v FLNT -f FLNT -c amip_xpt -s 1980 -e 1983 -i drc_in -o drc_out
+ at end verbatim
+ at end example
+These climos use the @samp{-f} option and so there output files will
+have no namespace conflicts. 
+Moreover, the climatologies can be generated in parallel.
+
 @page
 @html
 <a name="nces"></a> <!-- http://nco.sf.net/nco.html#nces -->
@@ -16525,7 +16858,8 @@ ncclimo -c merra2_200903.nc4 -s 1980 -e 2016 -i $drc_in -o $drc_out
 SYNTAX
 @example
 nces [-3] [-4] [-6] [-7] [-A] [-C] [-c]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]] [-F]
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [-h] [--hdf] [--hdr_pad @var{nbr}] 
 [-L @var{dfl_lvl}] [-l @var{path}] [-n @var{loop}] [--no_tmp_fl] [--nsm_fl|grp] [--nsm_sfx sfx]
@@ -16537,9 +16871,10 @@ nces [-3] [-4] [-6] [-7] [-A] [-C] [-c]
 @noindent
 DESCRIPTION
 
- at command{nces} performs gridpoint statistics on variables across an
-arbitrary number (an @dfn{ensemble}) of @var{input-files} and/or of
-input groups within each file.
+ at command{nces} performs gridpoint statistics (including, but not limited
+to, averages) on variables across an arbitrary number (an
+ at dfn{ensemble}) of @var{input-files} and/or of input groups within each
+file. 
 Each file (or group) receives an equal weight.
 @command{nces} was formerly (until @acronym{NCO} version 4.3.9,
 released December, 2013) known as @command{ncea} (netCDF Ensemble
@@ -16630,7 +16965,7 @@ Output statistics in group ensemble mode are stored in the parent group
 by default. 
 If the ensemble members are @file{/cesm/cesm_01} and
 @file{/cesm/cesm_02}, then the computed statistic will be in
- at file{/cesm} in the output file.  
+ at file{/cesm} in the output file.   
 The @samp{--nsm_sfx} option instructs nces to instead store output in  
 a new child group of the parent created by attaching the suffix
 to the parent group's name, e.g., @samp{--nsm_sfx='_avg'} would store
@@ -16749,7 +17084,8 @@ member in the first file.
 SYNTAX
 @example
 ncecat [-3] [-4] [-6] [-7] [-A] [-C] [-c]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]] [-F]
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--gag] [--glb ...] [-h] [--hdf] [--hdr_pad @var{nbr}]
 [-L @var{dfl_lvl}] [-l @var{path}] [-M] [--md5_digest] [--mrd] [-n @var{loop}] [--no_tmp_fl] 
@@ -17010,10 +17346,11 @@ of changing variable dimensionality, including the record dimension.
 SYNTAX
 @example
 ncflint [-3] [-4] [-6] [-7] [-A] [-C] [-c]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]]
 [-F] [--fix_rec_crd] [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [-h] [--hdr_pad @var{nbr}]
-[-i @var{var}, at var{val3}] [-L @var{dfl_lvl}] [-l @var{path}] [--no_tmp_fl] 
+[-i @var{var}, at var{val3}] [-L @var{dfl_lvl}] [-l @var{path}] [-N] [--no_tmp_fl] 
 [-O] [-o @var{file_3}] [-p @var{path}] [--ppc ...] [-R] [-r] [--ram_all] 
 [-t @var{thr_nbr}] [--unn] [-v @var{var}[, at dots{}]] [-w @var{wgt1}[, at var{wgt2}]] [-X ...] [-x]
 @var{file_1} @var{file_2} [@var{file_3}]
@@ -17064,6 +17401,37 @@ Thus it is possible to specify @math{@var{wgt1} = 2} and
 One can use this functionality to multiply all the values in a given
 file by a constant.
 
+ at cindex normalization
+ at cindex @code{-N}
+ at cindex @code{--nrm}
+ at cindex @code{--normalize}
+As of @acronym{NCO} version 4.6.1 (July, 2016), the @samp{-N} switch
+(or long-option equivalents @samp{--nrm} or @samp{--normalize})
+implements a variation of this method. 
+This switch instructs @command{ncflint} to internally normalize the two
+supplied (or one supplied and one inferred) weights so that 
+ at set flg
+ at tex
+$wgt1 = wgt1 / (wgt1 + wgt2)$ and $wgt2 = wgt2 / (wgt1 + wgt2)$
+ at clear flg
+ at end tex
+ at ifinfo
+ at math{@var{wgt1} = @var{wgt1}/(@var{wgt1} + @var{wgt2}} and
+ at math{@var{wgt2} = @var{wgt2}/(@var{wgt1} + @var{wgt2}} and
+ at clear flg
+ at end ifinfo
+ at ifset flg
+ at c texi2html does not like @math{}
+ at var{wgt1} = @var{wgt1}/(@var{wgt1} + @var{wgt2} and
+ at var{wgt2} = @var{wgt2}/(@var{wgt1} + @var{wgt2}
+ at clear flg
+ at end ifset
+.
+This allows the user to input integral weights, say, and to delegate 
+the chore of normalizing them to @command{ncflint}.
+Be careful that @samp{-N} means what you think, since the same
+switch means something quite different in @command{ncwa}.
+
 The second method of using @command{ncflint} is to specify the
 interpolation option @w{with @samp{-i}} (or with the @samp{--ntp} or 
 @samp{--interpolate} long options). 
@@ -17271,8 +17639,9 @@ ncatted -a units,prs_sfc,o,c,millibar out.nc
 @noindent
 SYNTAX
 @example
-ncks [-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b @var{binary-file}] [-C] [-c] [--cdl]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+ncks [-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b @var{fl_bnr}] [-C] [-c] [--cdl]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]] [-F] [--fix_rec_dmn @var{dim}] 
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [--grp_xtr_var_xcl]
 [-H] [-h] [--hdn] [--hdr_pad @var{nbr}] [-L @var{dfl_lvl}] [-l @var{path}]
@@ -17294,7 +17663,7 @@ into one versatile utility.
 @command{ncks} extracts (a subset of the) data from @var{input-file},
 regrids it according to @var{map-file} if specified,
 then writes in netCDF format to @var{output-file}, and 
-optionally writes it in flat binary format to @file{binary-file}, and
+optionally writes it in flat binary format to @file{fl_bnr}, and
 optionally prints it to screen.
 
 @command{ncks} prints netCDF input data in @acronym{ASCII},
@@ -18072,6 +18441,7 @@ include an NcML formatting characters (e.g., commas, angles, quotes).
 @cindex @command{ncmin}
 @cindex @command{ncrecsz}
 @cindex @command{ncrng}
+ at cindex @command{nctypget}
 @cindex @command{ncunits}
 @cindex @file{.bashrc}
 @cindex filters
@@ -18154,7 +18524,7 @@ These files are usually named @file{.bashrc}, @file{.cshrc}, and
 # ncattget $att_nm $var_nm $fl_nm : What attributes does variable have?
 function ncattget { ncks -M -m ${3} | grep -E -i "^${2} attribute [0-9]+: ${1}" | cut -f 11- -d ' ' | sort ; }
 # ncunits $att_val $fl_nm : Which variables have given units?
-function ncunits { ncks -M -m ${2} | grep -E -i " attribute [0-9]+: units.+ ${1}" | cut -f 1 -d ' ' | sort ; }
+function ncunits { ncks -m ${2} | grep -E -i " attribute [0-9]+: units.+ ${1}" | cut -f 1 -d ' ' | sort ; }
 # ncavg $var_nm $fl_nm : What is mean of variable?
 function ncavg { ncwa -y avg -O -C -v ${1} ${2} ~/foo.nc ; ncks -H -C -v ${1} ~/foo.nc | cut -f 3- -d ' ' ; }
 # ncavg $var_nm $fl_nm : What is mean of variable?
@@ -18177,8 +18547,10 @@ function ncrng { ncap2 -O -C -v -s "foo_min=${1}.min();foo_max=${1}.max();print(
 function ncmode { ncap2 -O -C -v -s "foo=gsl_stats_median_from_sorted_data(${1}.sort());print(foo)" ${2} ~/foo.nc | cut -f 3- -d ' ' ; }
 # ncrecsz $fl_nm : What is record dimension size?
 function ncrecsz { ncks -M ${1} | grep -E -i "^Record dimension:" | cut -f 8- -d ' ' ; }
+# nctypget $var_nm $fl_nm : What type is variable?
+function nctypget { ncks -m -v ${1} ${2} | grep -E -i "^${1}: type" | cut -f 3 -d ' ' | cut -f 1 -d ',' ; }
 # Csh shell (/bin/csh) users place these in .cshrc
-ncattget() { ncks -M -m ${3} | grep -E -i "^${2} attribute [0-9]+: ${1}" | cut -f 11- -d ' ' | sort ; }
+ncattget() { ncks -M -m -v ${3} | grep -E -i "^${2} attribute [0-9]+: ${1}" | cut -f 11- -d ' ' | sort ; }
 ncdmnsz() { ncks -m -M ${2} | grep -E -i ": ${1}, size =" | cut -f 7 -d ' ' | uniq ; }
 nclist() { ncks -m ${1} | grep -E ': type' | cut -f 1 -d ' ' | sed 's/://' | sort ; }
 ncrecsz() { ncks -M ${1} | grep -E -i "^Record dimension:" | cut -f 8- -d ' ' ; }
@@ -18479,7 +18851,8 @@ For more details @xref{Wrapped Coordinates}.
 SYNTAX
 @example
 ncpdq [-3] [-4] [-6] [-7] [-A] [-a [-]@var{dim}[, at dots{}]] [-C] [-c]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]]
 [-F] [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [-h] [--hdf] [--hdr_pad @var{nbr}]
 [-L @var{dfl_lvl}] [-l @var{path}] [-M @var{pck_map}] [--mrd] [--no_tmp_fl] 
@@ -19076,7 +19449,8 @@ changing variable dimensionality, including the record dimension.
 SYNTAX
 @example
 ncra [-3] [-4] [-6] [-7] [-A] [-C] [-c] [--cb]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}][,[@var{subcycle}]]]] [-F]
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [-h] [--hdf] [--hdr_pad @var{nbr}] 
 [-L @var{dfl_lvl}] [-l @var{path}] [--mro] [-N] [-n @var{loop}] [--no_tmp_fl]
@@ -19088,7 +19462,8 @@ ncra [-3] [-4] [-6] [-7] [-A] [-C] [-c] [--cb]
 @noindent
 DESCRIPTION
 
- at command{ncra} averages record variables across an arbitrary number of 
+ at command{ncra} computes statistics (including, though not limited to,
+averages) of record variables across an arbitrary number of  
 @var{input-files}.
 @cindex degenerate dimension
 @cindex record dimension
@@ -19184,7 +19559,7 @@ variables.
 @cindex @code{--c2b}
 @cindex @code{--clm_bnd}
 @cindex @code{--clm2bnd}
-As of @acronym{NCO} version 4.6.0 (April, 2016) @command{ncra} can honor 
+As of @acronym{NCO} version 4.6.0 (May, 2016) @command{ncra} can honor 
 the @acronym{CF} @code{climatology} and climatological statistics
 conventions described in @ref{CF Conventions}.
 Currently this is opt-in with the @samp{--cb} flag (or long-option
@@ -19275,6 +19650,23 @@ Assuming @samp{??} only expands to the five desired files, the following
 averages June, 1985--June, 1989: 
 @example
 ncra -d time,6.,54. ??.nc 8506_8906.nc
+ncra -y max -d time,6.,54. ??.nc 8506_8906.nc
+ at end example
+The second example identifies the maximum instead of averaging.
+ at xref{Operation Types}, for a description of all available statistical 
+operations. 
+
+ at cindex seasonal average
+ at cindex average
+ at cindex subcycle
+ at cindex time-averaging
+ at command{ncra} includes the powerful subcycle and multi-record output
+features (@pxref{Subcycle}). 
+This example uses these features to compute and output winter
+(@acronym{DJF}) averages for all winter seasons beginning with year 1990 
+and continuing to the end of the input file:
+ at example
+ncra -O --mro -d time,"1990-12-01",,12,3 in.nc out.nc
 @end example
 
 The @samp{-w wgt} option weights input data @emph{per-file} or
@@ -19284,9 +19676,10 @@ ncra -w 31,31,28 dec.nc jan.nc feb.nc out.nc
 ncra -w delta_t in1.nc in2.nc in3.nc out.nc 
 @end example
 The first example weights the input differently per-file to produce
-correctly weighted winter season mean statistics.
+correctly weighted winter seasonal mean statistics.
 The second example weights the input per-timestep to produce correctly 
 weighted mean statistics.
+The last example 
 
 @page
 @html
@@ -19302,7 +19695,8 @@ weighted mean statistics.
 SYNTAX
 @example
 ncrcat [-3] [-4] [-6] [-7] [-A] [-C] [-c]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}][,[@var{subcycle}]]]] [-F]
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [-h] [--hdr_pad @var{nbr}]
 [-L @var{dfl_lvl}] [-l @var{path}] [--md5_digest] [-n @var{loop}] [--no_tmp_fl]
@@ -20144,15 +20538,14 @@ specified output directory.
 Since no output filename is provided, the output file will be named
 @file{regrid/in.nc}.
 
-Supplying a pre-computed mapfile (with @samp{-m @var{map_fl}})
-considerably reduces wallclock time because it eliminates time-consuming
-weight-generation:
+Generate a mapfile with @command{ncremap} and store it for later re-use. 
+A pre-computed mapfile (supplied with @samp{-m @var{map_fl}}) eliminates 
+time-consuming weight-generation, and thus considerably reduces
+wallclock time: 
 @example
 ncremap -i in.nc  -m map.nc -o out.nc
 ncremap -I drc_in -m map.nc -O regrid
 @end example
-The mapfile is often generated by a previous @command{ncremap}
-invocation, and then stored for later re-use.
 
 @command{ncremap} annotates the gridfiles and mapfiles that it creates
 with helpful metadata containing the full provenance of the command.
@@ -20334,8 +20727,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 (January, 2016) the
-netCDF library (versions 4.0.0--4.4.0-rc5) contained bugs or limitations
+Caveat lector: Unforunately from 2007--present (July, 2016) the
+netCDF library (versions 4.0.0--4.4.1) contains 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
@@ -20570,8 +20963,10 @@ ncks -v /g1/lon ~/foo.nc # Shows units and new_units are both gone
 
 Clearly, renaming dimensions in netCDF4 files is non-trivial.
 The latest chapter in this saga is a netCDF4 bug discovered in
-September, 2015, and present in version 4.3.3.1 (and possibly earlier
-versions too).  
+September, 2015, and present in versions 4.3.3.1 (and possibly earlier 
+versions too) and later.
+As of this writing (July, 2016) the bug has not been fixed and is
+still present in netCDF4 version 4.4.1.
 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  
@@ -20656,7 +21051,8 @@ Variables not prefixed with a period (@code{global}) must be present.
 SYNTAX
 @example
 ncwa [-3] [-4] [-6] [-7] [-A] [-a @var{dim}[, at dots{}]] [-B @var{mask_cond}] [-b] [-C] [-c]
-[--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz]
+[--cnk_byt @var{sz_byt}] [--cnk_dmn @var{nm}, at var{sz_lmn}] [--cnk_map @var{map}]
+[--cnk_min @var{sz_byt}] [--cnk_plc @var{plc}] [--cnk_scl @var{sz_lmn}]
 [-D @var{dbg}] [-d @var{dim},[@var{min}][,[@var{max}][,[@var{stride}]]] [-F]
 [-G @var{gpe_dsc}] [-g @var{grp}[, at dots{}]] [--glb ...] [-h] [--hdr_pad @var{nbr}] [-I]
 [-L @var{dfl_lvl}] [-l @var{path}] [-M @var{mask_val}] [-m @var{mask_var}] [-N] [--no_tmp_fl]
@@ -20669,8 +21065,9 @@ ncwa [-3] [-4] [-6] [-7] [-A] [-a @var{dim}[, at dots{}]] [-B @var{mask_cond}] [-b]
 @noindent
 DESCRIPTION
 
- at command{ncwa} averages variables in a single file over arbitrary
-dimensions, with options to specify weights, masks, and normalization.   
+ at command{ncwa} performs statistics (including, but not limited to,
+averages) on variables in a single file over arbitrary dimensions, with
+options to specify weights, masks, and normalization.
 @xref{Statistics vs. Concatenation}, for a description of the
 distinctions between the various statistics tools and concatenators. 
 The default behavior of @command{ncwa} is to arithmetically average
@@ -21311,6 +21708,11 @@ Large work-load testing
 @cindex Remik Ziemlinski
 @item Peter Campbell, Martin Dix, Mark Flanner, Markus Liebig, Keith Lindsay, Mike Page, Martin Schmidt, Michael Schulz, Lori Sentman, Rich Signell, Gary Strand, George White Andrew Wittenberg, Remik Ziemlinski
 Excellent bug reports and feature requests.
+ at cindex Filipe Fernandes
+ at cindex Rich Signell
+ at cindex Kyle Wilcox
+ at item Filipe Fernandes, Rich Signell, Kyle Wilcox
+Anaconda packaging
 @cindex Daniel Baumann
 @cindex Nick Bower
 @cindex Luk Claes
@@ -21355,7 +21757,7 @@ RHEL and CentOS build scripts and bug reports.
 Single bug reports and fixes
 @cindex Wenshan Wang
 @item Wenshan Wang
- at acronym{CMIP5} and @acronym{MODIS} processing documentation.
+ at acronym{CMIP5} and @acronym{MODIS} processing documentation, reference card
 @end table
 Please let me know if your name was omitted!
 
@@ -21515,7 +21917,7 @@ There are detailed instructions on @command{ncra} (@pxref{ncra netCDF Record Ave
 Inside the input file @file{in.nc}, the record dimension @code{time} is from Jan 1990 to Dec 2005.
 
 @noindent
- at strong{Seasonal average (e.g., DJF):}
+ at strong{Seasonal average (e.g., @acronym{DJF}):}
 @cindex seasonal average
 @cindex average
 @cindex time-averaging
diff --git a/doc/prs_pbl_old.shtml b/doc/prs_pbl_old.shtml
new file mode 100644
index 0000000..6772c74
--- /dev/null
+++ b/doc/prs_pbl_old.shtml
@@ -0,0 +1,133 @@
+<!-- $Header$
+
+Purpose: Presentations and Publications archive
+
+URL:
+http://nco.sf.net/prs_pbl_old.shtml
+http://dust.ess.uci.edu/nco/prs_pbl_old.shtml
+file:///home/zender/nco/doc/prs_pbl_old.shtml
+
+Usage:
+/usr/bin/scp ~/nco/doc/prs_pbl_old.shtml zender,nco at web.sf.net:/home/project-web/nco/htdocs
+scp -p ~/nco/doc/prs_pbl_old.shtml dust.ess.uci.edu:Sites/nco
+-->
+
+<!doctype html public "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+   <title>NCO Homepage</title>
+   <meta name="GENERATOR" content="Mozilla/3.04Gold (X11; I; Linux 2.0.0 i686) [Netscape]">
+   <meta name="Author" content="Charles S. Zender">
+   <meta name="Keywords" content="NCO Homepage, netCDF, netCDF operator, GCM, HDF, scientific data">
+</head>
+<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#008080" alink="#FF0000">
+
+<dt><a name="News"></a></dt>
+<h2>Presentations and Publications from 2006–2011</h2>
+<ul>
+
+<li><!-- WZJ083 --> <a name="WZJ083"></a> <!--http://www.ess.uci.edu/~zender#WZJ083 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks (2008), Compiling the uncompilable: A case for shell script compilation, <i>Submitted to ACM Trans. Softw. Engin. Method.</i>.
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ083.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ083.pdf">PDF</a> (© 2008 by ACM)</li>
+
+<li><!-- WZJ091 --> <a name="WZJ091"></a> <!--http://www.ess.uci.edu/~zender#WZJ091 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks (2009), Efficient Clustered Server-side Data Analysis Workflows using SWAMP, <i>Earth Sci. Inform.</i>, <b>2</b>(3), 141–155, doi:10.1007/s12145-009-0021-z.
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ091.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ091.pdf">PDF</a> (© 2009 by ESI)</li>
+
+<li><!-- WZJ081 --> <a name="WZJ081"></a> <!--http://www.ess.uci.edu/~zender#WZJ081 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks: Cluster Workflow Execution of Retargeted Data Analysis Scripts, in <i>Cluster Computing and the Grid, 2008. CCGRID '08. 8th IEEE International Symposium on</i>. Lyons, France, 19 22 May, 2008. IEEE Computer Society, 449–458, doi:10.1109/CCGRID.2008.69.
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ081.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ081.pdf">PDF</a> (© 2008 by IEEE)</li>
+
+<li><!-- Zen08 --> <a name="Zen08"></a> <!--http://www.ess.uci.edu/~zender#Zen08 -->
+Zender, C. S. (2008), Analysis of Self-describing Gridded Geoscience Data with netCDF Operators (NCO), <i>Environ. Modell. Softw.</i>, <b>23</b>(10), 1338–1342, doi:10.1016/j.envsoft.2008.03.004.
+<a href="http://dust.ess.uci.edu/ppr/ppr_Zen08.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_Zen08_csz.pdf">PDF (CSZ)</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_Zen08.pdf">PDF (EMS)</a> (© 2008 by Elsevier Ltd.)</li>
+
+<li> <!-- WZJ074 --> <a name="WZJ074"></a> <!--http://www.ess.uci.edu/~zender#WZJ074 -->
+Wang, D. L., C. S. Zender and S. F. Jenks (2007): <i>A System for Scripted Data Analysis at Remote Data Centers</i>. Presented at the Fall Meeting of the American Geophysical Union, San Francisco, CA, December 10–14, 2007. <i>Eos Trans. AGU</i>, <b>88</b>(52), Fall Meet. Suppl., Abstract IN11B-0469.
+<a href="http://dust.ess.uci.edu/ppr/pst_WZJ074.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/pst_WZJ074.pdf">PDF (DLW)</a>
+</li>
+
+<li> <!-- WZJ073 --> <a name="WZJ073"></a> <!--http://www.ess.uci.edu/~zender#WZJ073 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks (2007), Server-side parallel data reduction and analysis, in <i>Advances in Grid and Pervasive Computing, Second International Conference, GPC 2007</i>, Paris, France, May 2–4, 2007, Proceedings. IEEE Lecture Notes in Computer Science, vol. 4459, edited by C. Cérin and K.-C. Li, pp. 744–750, Springer-Verlag, Berlin/Heidelberg.
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ073.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_WZJ073.pdf">PDF (DLW)</a>
+</li>
+
+<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
+<i>Server-side Parallel Data Reduction and Analysis</i>.
+Presented by D. Wang to the International Conference on Grid and
+Pervasive Computing (GPC),
+Paris, France, May 2–4, 2007. 
+<a href="http://dust.ess.uci.edu/smn/smn_WZJ07_gpc_200705.pdf">PDF</a></li>
+
+<li><!-- ZeM07 --> <a name="ZeM07"></a> <!--http://www.ess.uci.edu/~zender#ZeM07 -->
+Zender, C. S., and H. J. Mangalam (2007), Scaling Properties of Common Statistical Operators for Gridded Datasets, <i>Int. J. High Perform. Comput. Appl, <b>21</b>(4), 485–498, doi:10.1177/1094342007083802</i>.
+<a href="http://dust.ess.uci.edu/ppr/ppr_ZeM07.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_ZeM07_csz.pdf">PDF (CSZ)</a>
+<a href="http://dust.ess.uci.edu/ppr/ppr_ZeM07.pdf">PDF</a> (IJHPCA) (© 2007 by SAGE Publications)</li>
+
+<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
+<i>Server-side Data Reduction and Analysis with Script Workflow Analysis for Multi-Processing</i>.
+Presented by D. Wang to the OPeNDAP Developer's Workshop,
+Boulder, CO, February 21–23, 2007.
+<a href="http://dust.ess.uci.edu/smn/smn_WZJ07_opendap_200702.pdf">PDF</a></li>
+
+<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
+<i>Server-side Data Reduction and Analysis with Script Workflow Analysis for Multi-Processing</i>.
+Presented by D. Wang to the 23rd AMS Conference on Interactive Information and
+Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology,
+San Antonio, TX, January 14–18, 2007.
+<a href="http://dust.ess.uci.edu/smn/smn_WZJ07_ams_200701.pdf">PDF</a></li>
+
+<li><!-- WZJ07 --> <a name="WZJ07"></a> <!--http://www.ess.uci.edu/~zender#WZJ07 -->
+Wang, D. L., C. S. Zender, and S. F. Jenks (2007), 
+DAP-enabled Server-side Data Reduction and Analysis, 
+<i>Proceedings of the 23rd AMS Conference on Interactive Information and Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology</i>, 
+Paper 3B.2., January 14–18, San Antonio, TX. American Meteorological Society, AMS Press, Boston, MA.
+<a href="http://dust.ess.uci.edu/ppr/abs_xtn_WZJ07.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/abs_xtn_WZJ07.pdf">PDF</a></li>
+
+<li><!-- ZeW07 --> <a name="ZeW07"></a> <!--http://www.ess.uci.edu/~zender#ZeW07 -->
+Zender, C. S., and D. L. Wang (2007), 
+<i>High performance distributed data reduction and analysis with the netCDF Operators (NCO)</i>. 
+Presented to the 23rd AMS Conference on Interactive Information and Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology, January 14–18, 
+San Antonio, TX, January 14–18, 2007.
+<a href="http://dust.ess.uci.edu/smn/smn_nco_ams_200701.pdf">PDF</a></li>
+
+<li><!-- ZeW07 --> <a name="ZeW07"></a> <!--http://www.ess.uci.edu/~zender#ZeW07 -->
+Zender, C. S., and D. L. Wang (2007), 
+High performance distributed data reduction and analysis with the netCDF Operators (NCO), 
+<i>Proceedings of the 23rd AMS Conference on Interactive Information and Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology</i>, 
+Paper 3B.4., January 14–18, San Antonio, TX. American Meteorological Society, AMS Press, Boston, MA.
+<a href="http://dust.ess.uci.edu/ppr/abs_xtn_ZeW07.bib">BibTeX</a>
+<a href="http://dust.ess.uci.edu/ppr/abs_xtn_ZeW07.pdf">PDF</a></li>
+
+<li><!-- WZJ06 --> <a name="WZJ06"></a> <!-- http://dust.ess.uci.edu/ppr/pst_WZJ06.pdf -->
+Wang, D.&nbsp, Zender, C. S., and S. F. Jenks (2006): 
+<i>Server-side netCDF Data Reduction and Analysis</i>.
+Presented by D. Wang to the Fall Meeting of the American Geophysical Union, 
+San Francisco, CA, December 5–9, 2006.
+<i>Eos Trans. AGU</i>, <b>87</b>(52), Fall Meet. Suppl., Abstract IN53B-0826.
+<a href="http://dust.ess.uci.edu/ppr/pst_WZJ06.pdf">PDF</a>
+
+<li><!-- ZMW06 --> <a name="ZMW06"></a> <!-- http://dust.ess.uci.edu/ppr/pst_ZMW06.pdf -->
+Zender, C. S., H. J. Mangalam, and D. L. Wang (2006):
+<i>Improving Scaling Properties of Common Statistical Operators for Gridded Geoscience Datasets</i>.
+Presented to the Fall Meeting of the American Geophysical Union, 
+San Francisco, CA, December 5–9, 2006.
+<i>Eos Trans. AGU</i>, <b>87</b>(52), Fall Meet. Suppl., Abstract IN53B-0827.
+<a href="http://dust.ess.uci.edu/ppr/pst_ZMW06.pdf">PDF</a>
+</ul>
+<hr></p>
+
+</body>
+</html>
diff --git a/man/Makefile.in b/man/Makefile.in
index 42c2ec5..d96b7ba 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -217,6 +217,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
diff --git a/man/ncap.1 b/man/ncap.1
index 588f9ef..29fe49a 100644
--- a/man/ncap.1
+++ b/man/ncap.1
@@ -13,7 +13,7 @@ ncap [\-3] [\-4] [\-6] [\-7] [\-A] [\-C] [\-c] [\-D
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/ncap2.1 b/man/ncap2.1
index 566cb84..1d5bcf8 100644
--- a/man/ncap2.1
+++ b/man/ncap2.1
@@ -7,7 +7,7 @@
 ncap2 \- netCDF Arithmetic Processor, Next Generation
 .SH SYNTAX
 ncap2 [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-D 
+.IR sz_byt ] [\-C] [\-c] [\-D 
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -18,7 +18,7 @@ ncap2 [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-l 
 .IR path ]
 [\-\-no_tmp_fl] [\-O] [\-o 
diff --git a/man/ncatted.1 b/man/ncatted.1
index 82e4e74..5353fb7 100644
--- a/man/ncatted.1
+++ b/man/ncatted.1
@@ -9,13 +9,13 @@ ncatted \- netCDF Attribute Editor
 ncatted [\-a 
 .IR att_dsc ]
 [\-a ...] [\-\-bfr
-.IR sz ] [\-D
+.IR sz_byt ] [\-D
 .IR dbg_lvl]
 [\-\-glb
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-l path] [\-O] [\-p path] [\-R] [\-r] [\-\-ram_all] [\-t]
 .I input-file
 [
diff --git a/man/ncbo.1 b/man/ncbo.1
index dd457dd..dc32e40 100644
--- a/man/ncbo.1
+++ b/man/ncbo.1
@@ -7,18 +7,18 @@
 ncbo \- netCDF Binary Operator
 .SH SYNTAX
 ncbo [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] 
+.IR sz_byt ] [\-C] [\-c] 
 [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D 
+.IR sz_lmn ] [\-D 
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -32,7 +32,7 @@ ncbo [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/ncecat.1 b/man/ncecat.1
index 4e1828e..784a7de 100644
--- a/man/ncecat.1
+++ b/man/ncecat.1
@@ -7,17 +7,17 @@
 ncecat \- netCDF Ensemble Concatenator
 .SH SYNTAX
 ncecat [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-C] [\-c] [\-\-cnk_byt
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D 
+.IR sz_lmn ] [\-D 
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -32,7 +32,7 @@ ncecat [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/nces.1 b/man/nces.1
index 9698f23..4ac5360 100644
--- a/man/nces.1
+++ b/man/nces.1
@@ -7,17 +7,17 @@
 nces \- netCDF Ensemble Statistics
 .SH SYNTAX
 nces [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-C] [\-c] [\-\-cnk_byt
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D 
+.IR sz_lmn ] [\-D 
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -28,7 +28,7 @@ nces [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 [\-g  
 .IR grp [,...]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/ncflint.1 b/man/ncflint.1
index 18e14f9..a6dcdaa 100644
--- a/man/ncflint.1
+++ b/man/ncflint.1
@@ -7,17 +7,17 @@
 ncflint \- netCDF File Interpolator
 .SH SYNTAX
 ncflint [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-C] [\-c] [\-\-cnk_byt
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D 
+.IR sz_lmn ] [\-D 
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -31,7 +31,7 @@ ncflint [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-i
 .IR var, val3 ] [\-L 
 .IR dfl_lvl ] [\-l 
diff --git a/man/ncks.1 b/man/ncks.1
index d482902..148eb73 100644
--- a/man/ncks.1
+++ b/man/ncks.1
@@ -9,18 +9,18 @@ ncks \- netCDF Kitchen Sink
 ncks [\-3] [\-4] [\-5] [\-6] [\-7] [\-A] [\-a] [\-b
 .IR bnr_fl] 
 [\-\-bfr
-.IR sz ] [\-C] [\-c] 
+.IR sz_byt ] [\-C] [\-c] 
 [\-\-cdl] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] 
+.IR sz_lmn ] 
 [\-D
 dbg_lvl]
 [\-d 
@@ -40,7 +40,7 @@ dbg_lvl]
 [\-\-grp_xtr_var_xcl]
 [\-H] [\-h] [\-\-hdn] 
 [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/ncpdq.1 b/man/ncpdq.1
index 8be9a25..6e67c0d 100644
--- a/man/ncpdq.1
+++ b/man/ncpdq.1
@@ -9,17 +9,17 @@ ncpdq \- netCDF Permute Dimensions Quickly, Pack Data Quietly...
 ncpdq [\-3] [\-4] [\-6] [\-7] [\-A] [\-a 
 .IR dim [,...]]
 [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-C] [\-c] [\-\-cnk_byt
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D 
+.IR sz_lmn ] [\-D 
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -33,7 +33,7 @@ ncpdq [\-3] [\-4] [\-6] [\-7] [\-A] [\-a
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/ncra.1 b/man/ncra.1
index 57b2b04..19c711b 100644
--- a/man/ncra.1
+++ b/man/ncra.1
@@ -7,17 +7,17 @@
 ncra \- netCDF Record Averager
 .SH SYNTAX
 ncra [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-C] [\-c] [\-\-cnk_byt
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D 
+.IR sz_lmn ] [\-D 
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -33,7 +33,7 @@ ncra [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/ncrcat.1 b/man/ncrcat.1
index f174dce..dae00e4 100644
--- a/man/ncrcat.1
+++ b/man/ncrcat.1
@@ -7,17 +7,17 @@
 ncrcat \- netCDF Record Concatenator
 .SH SYNTAX
 ncrcat [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-C] [\-c] [\-\-cnk_byt
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D
+.IR sz_lmn ] [\-D
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -33,7 +33,7 @@ ncrcat [\-3] [\-4] [\-6] [\-7] [\-A] [\-\-bfr
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-L 
 .IR dfl_lvl ] 
 [\-l 
diff --git a/man/ncrename.1 b/man/ncrename.1
index d025cf2..9feae29 100644
--- a/man/ncrename.1
+++ b/man/ncrename.1
@@ -20,7 +20,7 @@ ncrename [\-a
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-l path] [\-O] [\-p path]
 [\-R] [\-r] [\-\-ram_all] [\-v 
 .IR old_name,new_name ]
diff --git a/man/ncwa.1 b/man/ncwa.1
index c0074ed..8007bad 100644
--- a/man/ncwa.1
+++ b/man/ncwa.1
@@ -11,17 +11,17 @@ ncwa [\-3] [\-4] [\-6] [\-7] [\-A] [\-a
 [\-B 
 .IR mask_cond] 
 [\-b] [\-\-bfr
-.IR sz ] [\-C] [\-c] [\-\-cnk_byt
-.IR sz ] [\-\-cnk_dmn 
-.IR nm,sz ]
+.IR sz_byt ] [\-C] [\-c] [\-\-cnk_byt
+.IR sz_byt ] [\-\-cnk_dmn 
+.IR nm,sz_lmn ]
 [\-\-cnk_map 
 .IR map ]
 [\-\-cnk_min
-.IR sz ]
+.IR sz_byt ]
 [\-\-cnk_plc 
 .IR plc ]
 [\-\-cnk_scl 
-.IR sz ] [\-D
+.IR sz_lmn ] [\-D
 .IR dbg_lvl ]
 [\-d 
 .IR dim ,[
@@ -35,7 +35,7 @@ ncwa [\-3] [\-4] [\-6] [\-7] [\-A] [\-a
 .IR att_name=
 .IR att_val ]]
 [\-h] [\-\-hdf] [\-\-hdr_pad
-.IR sz ]
+.IR sz_byt ]
 [\-I] [\-L 
 .IR dfl_lvl ] [\-l 
 .IR path ]
diff --git a/src/Makefile.in b/src/Makefile.in
index cff8a5a..59529f0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -246,6 +246,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
diff --git a/src/nco++/Makefile.in b/src/nco++/Makefile.in
index 181bbcb..925db47 100644
--- a/src/nco++/Makefile.in
+++ b/src/nco++/Makefile.in
@@ -266,6 +266,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
diff --git a/src/nco++/VarOpNew.hh b/src/nco++/VarOpNew.hh
index cc3f9a0..5050179 100644
--- a/src/nco++/VarOpNew.hh
+++ b/src/nco++/VarOpNew.hh
@@ -778,10 +778,60 @@ var_sct* tmp_var_op(var_sct* var1, int op) {
     } // end switch	
 
     return var1;
-  } // end var_op
+} // end var_op
 
 
 
+struct ltstr
+{
+  bool operator()(const char* s1, const char* s2) const
+  {
+    return strcmp(s1, s2) < 0;
+  }
+};
 
+struct gtstr
+{
+  bool operator()(const char* s1, const char* s2) const
+  {
+    return strcmp(s1, s2) > 0;
+  }
+};
+
+
+/*
+ function template overload for ragged arrays 
+template<> 
+var_sct* tmp_var_op<nco_string>(var_sct* var1, int op) 
+{
+    long idx;
+    long sz;
+    nco_string *tp1;
+
+    sz=var1->sz;
+    
+    tp1=(nco_string*)(var1->val.vp);
+
+
+    switch(op) 
+    {
+    case VSORT: 
+      std::sort(tp1,tp1+sz,ltstr() );  
+         break; 
+
+	 // reverse sort 
+    case VRSORT: 
+      std::sort(tp1,tp1+sz,gtstr() );  
+         break; 
+
+    default:
+      break;     
+
+    }
+
+    return var1;
+}
+
+*/
 
 #endif
diff --git a/src/nco++/fmc_all_cls.cc b/src/nco++/fmc_all_cls.cc
index 12e0153..d0cd16c 100644
--- a/src/nco++/fmc_all_cls.cc
+++ b/src/nco++/fmc_all_cls.cc
@@ -691,6 +691,7 @@ var_sct * utl_cls::get_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
       fmc_vtr.push_back( fmc_cls("size",this,(int)PSIZE));
       fmc_vtr.push_back( fmc_cls("type",this,(int)PTYPE));
       fmc_vtr.push_back( fmc_cls("ndims",this,(int)PNDIMS));
+      fmc_vtr.push_back( fmc_cls("getdims",this,(int)PGETDIMS));
       fmc_vtr.push_back( fmc_cls("exists",this,(int)PEXISTS));
 
     }
@@ -698,7 +699,7 @@ var_sct * utl_cls::get_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
 
   var_sct *bsc_cls::fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker){
   const std::string fnc_nm("bsc_cls::fnd");
-
+  bool is_mtd;
     int fdx=fmc_obj.fdx();   //index
     int nbr_args;
     std::string va_nm;
@@ -742,7 +743,9 @@ var_sct * utl_cls::get_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
     } 
       
      nbr_args=vtr_args.size();  
-
+   
+     is_mtd=(expr ? true: false);
+  
 
     // no arguments - bomb out
     if(nbr_args==0){    
@@ -752,7 +755,10 @@ var_sct * utl_cls::get_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
 	// more than one arg -- only print message once 
     } else if(nbr_args >1 && !prs_arg->ntl_scn)
         wrn_prn(sfnm,"Function has been called with more than one argument");
-           
+     
+    // custom functiom
+    if(fdx==PGETDIMS)
+      return getdims_fnd(is_mtd, vtr_args,fmc_obj, walker); 
 
     tr=vtr_args[0];  
 
@@ -836,6 +842,89 @@ var_sct * utl_cls::get_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
       return var;		 
   }       
 
+
+var_sct * bsc_cls::getdims_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cls &fmc_obj, ncoTree &walker)
+{
+  const std::string fnc_nm("bsc_cls::getndims_fnd");
+    int nbr_args;
+    int fdx=fmc_obj.fdx();
+    var_sct *var=NULL_CEWI;
+    var_sct *var_att=NULL_CEWI;
+    std::string sfnm =fmc_obj.fnm(); //method name
+    vtl_typ lcl_typ;
+    std::string va_nm;
+    std::string susg;
+    std::string serr;
+    prs_cls *prs_arg=walker.prs_arg;    
+
+
+    nbr_args=vtr_args.size(); 
+
+    if(nbr_args ==0) 
+       err_prn(fnc_nm," \""+sfnm+"\" has been called with no arguments"); 
+
+
+      
+    lcl_typ=expr_typ(vtr_args[0]);         
+
+    // If initial scan
+    if(prs_arg->ntl_scn){
+
+      // Evaluate argument on first scan for side-effects eg var1++ or var1+=10 etc 
+      if( lcl_typ!=VVAR && lcl_typ !=VPOINTER)
+      {
+        var=walker.out(vtr_args[0]) ;
+        var=nco_var_free(var);
+      }
+      return ncap_var_udf("~zz at getndims");          
+    }
+       
+    // from here on dealing with final scan
+    if(lcl_typ==VVAR )
+    {       
+       va_nm=vtr_args[0]->getText();
+       var=prs_arg->ncap_var_init(va_nm,false); 
+    }
+    else if(lcl_typ==VPOINTER)
+    { // get contents of att for var-pointer  
+      std::string att_nm=vtr_args[0]->getFirstChild()->getText();
+      va_nm=ncap_att2var(prs_arg,att_nm);
+      var=prs_arg->ncap_var_init(va_nm,false); 
+    }
+    else
+      var=walker.out(vtr_args[0]) ;
+
+    // blow out if scalar var or is att
+    if(var->nbr_dim==0 || ncap_var_is_att(var) )      
+      err_prn(sfnm,"Cannot get dim names from a scalar var or an att\n"); 
+
+    // do heavy lifting
+    { 
+      int ndims;
+      int idx;
+ 
+      ndims=var->nbr_dim;
+     
+      var_att=ncap_sclr_var_mk("~zz at getndims",NC_STRING,false);
+
+      var_att->val.vp=(void*)nco_malloc(ndims* nco_typ_lng(NC_STRING));         
+      var_att->sz=ndims; 
+
+      (void)cast_void_nctype((nc_type)NC_STRING,&var_att->val);                  
+      for(idx=0;idx<ndims;idx++)     
+	var_att->val.sngp[idx]=strdup(var->dim[idx]->nm);
+
+
+      (void)cast_nctype_void((nc_type)NC_STRING,&var_att->val); 
+    }
+
+    nco_free(var);   
+
+    return var_att;
+}
+
+
+
   
 //Math Functions /******************************************/
   mth_cls::mth_cls(bool flg_dbg){
@@ -879,8 +968,9 @@ var_sct * utl_cls::get_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
        /* Hyperbolic trigonometric: acosh, asinh, atanh, cosh, sinh, tanh
 	  20020703: AIX, SGI*, WIN32 do not define acoshf, asinhf, atanhf
 	  20050610: C99 mandates support for acosh(), asinh(), atanh(), cosh(), sinh(), tanh()
+	  20160515: Add hyperbolic function support to MACOSX
 	  Eventually users without C99 will forego ncap */
-#if defined(LINUX) || defined(LINUXAMD64)
+#if defined(LINUX) || defined(LINUXAMD64) || defined(MACOSX)
       sym_vtr.push_back(sym_cls("acosh",acosh,acoshf));
       sym_vtr.push_back(sym_cls("asinh",asinh,asinhf));
       sym_vtr.push_back(sym_cls("atanh",atanh,atanhf));
@@ -1791,8 +1881,10 @@ var_sct * srt_cls::srt_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
           case NC_CHAR: 
 	    (void)ncap_sort_and_map<nco_char>(var1,var2,bdirection);    
             break;  
-           case NC_STRING: break; /* Do nothing */
-             
+           case NC_STRING: 
+	     (void)ncap_sort_and_map<nco_string>(var1,var2,bdirection);    
+            break;
+  
            default: nco_dfl_case_nc_type_err(); break;
             
 	} // end big switch
@@ -2248,6 +2340,7 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
   std::string sfnm=fmc_obj.fnm();
 
   RefAST tr;
+  RefAST aRef;;
   std::vector<RefAST> args_vtr; 
   std::vector<std::string> cst_vtr;              
 
@@ -2269,7 +2362,7 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
       
   nbr_args=args_vtr.size();  
 
-  susg="usage: var_out="+sfnm+"(start_exp,inc_exp,$dim|var)"; 
+  susg="usage: var_out="+sfnm+"(start_exp,inc_exp,$dim|dim_list|var)"; 
 
   
   if(nbr_args<3)
@@ -2308,7 +2401,23 @@ var_sct * srt_cls::mst_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls
    // convert to type of first arg
    var_ret=nco_var_cnf_typ(var1->type,var_ret);  
 
-  }else{
+  }
+  else if( args_vtr[2]->getType()==DMN_ARG_LIST)
+  {
+    aRef=args_vtr[2]->getFirstChild();
+    while(aRef) 
+    {           
+      cst_vtr.push_back(aRef->getText());    
+      aRef=aRef->getNextSibling();  
+    } 
+
+    var_ret=ncap_cst_mk(cst_vtr,prs_arg);   
+    // convert to type of first arg
+    var_ret=nco_var_cnf_typ(var1->type,var_ret);  
+
+  }
+  else
+  {
     // assume third argument is var - interested in only using its shape !!  
     var_ret=walker.out(args_vtr[2]);
     
@@ -3694,27 +3803,7 @@ var_sct *vlist_cls::push_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cl
   if(nbr_args!=2)
     err_prn(sfnm, " Function has been called with wrong number of arguments arguments\n"+susg); 
 
-  // get var to push -maybe a call by ref
-  if(vtr_args[1]->getType() == CALL_REF )     
-  {
-    nco_string val_string;
-    std::string add_nm=vtr_args[1]->getFirstChild()->getText();      
-
-    var_add=ncap_sclr_var_mk(SCS("~zz at string"), NC_STRING,false ); 
-
-    // malloc space directly if final scan
-    if(!prs_arg->ntl_scn)
-    {   
-       var_add->val.vp=(void*)nco_malloc(nco_typ_lng(NC_STRING));
-       cast_void_nctype(NC_STRING, &var_add->val);        
-       var_add->val.sngp[0]=strdup(add_nm.c_str());   
-       cast_nctype_void(NC_STRING, &var_add->val);        
-    }
-           
-
-  }
-  else 
-   var_add=walker.out(vtr_args[1]);
+  var_add=walker.out(vtr_args[1]);
              
 
 
@@ -3932,7 +4021,7 @@ var_sct *vlist_cls::push_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cl
 
     if(vtype==NC_STRING)
     {  
-       xtr_nbr=var_regexp->sz;
+      xtr_nbr=var_regexp->sz;
        xtr_lst=nco_var_lst_mk(fl_id, nbr_var_fl, var_regexp->val.sngp  , False, False, &xtr_nbr);    
     }
 
diff --git a/src/nco++/fmc_all_cls.hh b/src/nco++/fmc_all_cls.hh
index 2910684..2fe2064 100644
--- a/src/nco++/fmc_all_cls.hh
+++ b/src/nco++/fmc_all_cls.hh
@@ -102,11 +102,12 @@ public:
 //Basic Functions /****************************************/
 class bsc_cls: public vtl_cls {
 private:
-  enum {PSIZE,PTYPE,PNDIMS,PEXISTS };
+  enum {PSIZE,PTYPE,PNDIMS,PEXISTS,PGETDIMS };
    bool _flg_dbg;
 public:
   bsc_cls(bool flg_dbg);
   var_sct *fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker);
+  var_sct *getdims_fnd(bool &is_mtd, std::vector<RefAST> &args_vtr, fmc_cls &fmc_obj, ncoTree &walker);  
 };
 
 //Maths Functions /****************************************/
diff --git a/src/nco++/map_srt_tmp.hh b/src/nco++/map_srt_tmp.hh
index 83c1660..beb28d1 100644
--- a/src/nco++/map_srt_tmp.hh
+++ b/src/nco++/map_srt_tmp.hh
@@ -1,8 +1,11 @@
 #ifndef MAP_SRT_TMP_hh_
 #define MAP_SRT_TMP_hh_
 
+#include <string.h>
+#include <iostream>
 #include <algorithm>
 
+
 template<class T>
 class map_srt{
     public:
@@ -12,7 +15,8 @@ class map_srt{
      // Use for sorting ascending
      bool operator<(const map_srt &right)const {
       return ( _V < right._V);
-    } 
+     } 
+
 
     // sort descending -a hack - function shouldn't be static - but  hey it works
     inline static bool greater(const  map_srt &x, const map_srt &y ) {
@@ -21,6 +25,27 @@ class map_srt{
 
 };
 
+// Class template specialization for NC_STRING aka char* aka ragged array
+template<>
+class map_srt<nco_string>{
+    public:
+     long _imp;
+     nco_string _V;
+
+     // Use for sorting ascending
+     bool operator<(const map_srt &right)const {
+       return ( strcmp(_V, right._V)<0);
+     } 
+
+
+    // sort descending -a hack - function shouldn't be static - but  hey it works
+    inline static bool greater(const  map_srt &x, const map_srt &y ) {
+	 return ( strcmp( x._V ,y._V)>0);
+    } 
+
+};
+
+
 
 template<typename T> 
 void ncap_sort_and_map(var_sct *var, var_sct *var_mp, bool bd)
@@ -32,8 +57,9 @@ void ncap_sort_and_map(var_sct *var, var_sct *var_mp, bool bd)
   map_srt<T> *mp;
 
   tp=(T*)var->val.vp;  
-  mp=new map_srt<T>[sz];          
 
+  mp=new map_srt<T>[sz];          
+  
   // initialize array
   for(idx=0 ; idx<sz; idx++){
     mp[idx]._imp=idx;
@@ -47,10 +73,7 @@ void ncap_sort_and_map(var_sct *var, var_sct *var_mp, bool bd)
     std:sort(mp,mp+sz,map_srt<T>::greater);  // decreasing
 
   //The above line may not work with some compilers if so replace with the following
-  // { std::sort(mp,mp+sz); std::reverse(mp,mp+sz);}       
-  
-
-
+  // { std::sort(mp,mp+sz); std::reverse(mp,mp+sz);}           
 
   // Currently only two types for the mapping
   if(var_mp->type==NC_INT){
@@ -83,7 +106,7 @@ void ncap_sort_and_map(var_sct *var, var_sct *var_mp, bool bd)
 
   return ;
 
- } // end function
+} // end function
 
 
 template<typename T> 
@@ -178,9 +201,4 @@ return max_idx;
 
 
 
-
-
-
-
-
 #endif
diff --git a/src/nco++/ncap2_utl.cc b/src/nco++/ncap2_utl.cc
index 9210e75..145b884 100644
--- a/src/nco++/ncap2_utl.cc
+++ b/src/nco++/ncap2_utl.cc
@@ -209,36 +209,42 @@ ncap_att_stretch /* stretch a single valued attribute from 1 to sz */
   long  var_typ_sz;  
   void* vp;
   char *cp;
-  char **sng_cp;
+
   
   if(var->sz > 1L || nw_sz <1) return false; 
   if(nw_sz==1) return true;
   var_typ_sz=nco_typ_lng(var->type);
-  // handle NC_STRING -special case 
-  // nb var->val.sngp is a ragged array of chars    
-  if(var->type == (nc_type)NC_STRING){
-    sng_cp=(char**)nco_malloc(nw_sz*var_typ_sz);    
+
+  // shouldnt really use this function with NC_STRING
+  // All it does is free exising single string
+  // and and calloc space for new ones
+  if(var->type == (nc_type)NC_STRING)
+  {
     
-    (void)cast_void_nctype((nc_type)NC_STRING,&var->val);
+    (void)cast_void_nctype((nc_type)NC_STRING,&var->val);    
     
-    for(idx=0;idx<nw_sz;idx++)
-      sng_cp[idx]=(char*)NC_FILL_STRING;    
+    nco_free(var->val.sngp[0]);  
+    nco_free(var->val.sngp);     
     
-    //nco_free(var->val.sngp[0]);  
+    var->val.sngp=(char**)nco_calloc(nw_sz,var_typ_sz);         
     (void)cast_nctype_void((nc_type)NC_STRING,&var->val);
-    vp=(void*)sng_cp;
+
     
-  }else{
+  }
+  else
+  {
     vp=(void*)nco_malloc(nw_sz*var_typ_sz);    
     for(idx=0;idx<nw_sz;idx++){
       cp=(char*)vp+(ptrdiff_t)(idx*var_typ_sz);
       memcpy(cp,var->val.vp,var_typ_sz);
     }
+
+    var->val.vp=(void*)nco_free(var->val.vp);
+    var->sz=nw_sz;
+    var->val.vp=vp;
+
   }
   
-  var->val.vp=(void*)nco_free(var->val.vp);
-  var->sz=nw_sz;
-  var->val.vp=vp;
   return true;
 } /* end ncap_att_stretch */
 
@@ -1557,6 +1563,38 @@ nco_shp_chk
 /* This file is generated in makefile from ncoParserTokenTypes.hpp */ 
 #include "ncoEnumTokenTypes.hpp"
 
+/* nb this function really belongs as 
+   a function template overload in VarOPNew.hh */
+var_sct* tmp_var_op_nco_string(var_sct* var1, int op) 
+{
+    long idx;
+    long sz;
+    nco_string *tp1;
+
+    sz=var1->sz;
+    
+    tp1=(nco_string*)(var1->val.vp);
+
+
+    switch(op) 
+    {
+    case VSORT: 
+      std::sort(tp1,tp1+sz,ltstr() );  
+         break; 
+
+	 // reverse sort 
+    case VRSORT: 
+      std::sort(tp1,tp1+sz,gtstr() );  
+         break; 
+
+    default:
+      break;     
+
+    }
+
+    return var1;
+}
+
 
 var_sct* var_op(var_sct* var1 , int op)
 {
@@ -1574,7 +1612,7 @@ var_sct* var_op(var_sct* var1 , int op)
     case NC_BYTE: (void)tmp_var_op<nco_byte>(var1,op); break;
     case NC_UBYTE: (void)tmp_var_op<nco_ubyte>(var1,op); break;
     case NC_CHAR:  (void)tmp_var_op<nco_char>(var1,op); break;
-    case NC_STRING:  break; 
+    case NC_STRING: (void)tmp_var_op_nco_string(var1,op); break; 
     default: nco_dfl_case_nc_type_err(); break;
 
   }
diff --git a/src/nco++/ncoEnumTokenTypes.hpp b/src/nco++/ncoEnumTokenTypes.hpp
index 1f1bd3b..6f0a620 100644
--- a/src/nco++/ncoEnumTokenTypes.hpp
+++ b/src/nco++/ncoEnumTokenTypes.hpp
@@ -1,7 +1,7 @@
 #ifndef INC_ncoEnumTokenTypes_hpp_
 #define INC_ncoEnumTokenTypes_hpp_
 
-/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoEnumTokenTypes.hpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoEnumTokenTypes.hpp"$ */
 
 #ifndef CUSTOM_API
 # define CUSTOM_API
diff --git a/src/nco++/ncoGrammer.g b/src/nco++/ncoGrammer.g
index 3b358da..490909f 100644
--- a/src/nco++/ncoGrammer.g
+++ b/src/nco++/ncoGrammer.g
@@ -711,7 +711,8 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
       nbr_dmn=lmt_peek(aRef);      
       //nbr_dmn=lRef->getNumberOfChildren();
 
-      for(idx=0 ; idx < nbr_dmn ; idx++){
+      for(idx=0 ; idx < nbr_dmn ; idx++)
+      {
          hyp.ind[0]=ANTLR_USE_NAMESPACE(antlr)nullAST;
          hyp.ind[1]=ANTLR_USE_NAMESPACE(antlr)nullAST;
          hyp.ind[2]=ANTLR_USE_NAMESPACE(antlr)nullAST;
@@ -719,19 +720,22 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
        if(lRef->getType()!=LMT) 
             return 0;
        
-        eRef=lRef->getFirstChild();
-        nbr_cln=0;
+       eRef=lRef->getFirstChild();
+       nbr_cln=0;
         
-       while(eRef) {
-          if(eRef->getType() == COLON){
+       while(eRef) 
+       {
+          if(eRef->getType() == COLON)
+          {
             cRef=eRef;        
             nbr_cln++;
           }
            eRef=eRef->getNextSibling();
         }
       
-      // Initialise  to default markers
-       switch(nbr_cln) {
+       // Initialise  to default markers
+       switch(nbr_cln) 
+       {
           case 0: 
              break;
                 
@@ -749,9 +753,11 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
         }
 
        eRef=lRef->getFirstChild();
+
        // point inidices to any expressions that exist
-        nbr_cln=0;
-       while(eRef) {
+       nbr_cln=0;
+       while(eRef) 
+       {
           if(eRef->getType() == COLON) 
              nbr_cln++; 
            else   
@@ -761,9 +767,10 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
        }
        // save indices 
        ast_lmt_vtr.push_back(hyp);
-
        lRef=lRef->getNextSibling();
-     }
+
+      }
+
      return nbr_dmn;
 } 
 
@@ -773,10 +780,10 @@ int nbr_dmn,
 RefAST lmt,
 NcapVector<lmt_sct*> &lmt_vtr ) 
 {
-	int idx;
-	int jdx;
-	int sz;   
-    int dmn_sz;     
+	long idx;
+	long jdx;
+	long sz;   
+    long dmn_sz;     
     ptr_unn op1;
 	var_sct *var;
 	std::string fnc_nm="lmt_var_mk"; 
@@ -785,11 +792,13 @@ NcapVector<lmt_sct*> &lmt_vtr )
 	// calculate variables
 	var=out(lmt->getFirstChild()->getFirstChild());
 	// convert result to type int
-	var=nco_var_cnf_typ(NC_UINT64,var);    
-	(void)cast_void_nctype((nc_type)NC_UINT64,&var->val);
+	var=nco_var_cnf_typ(NC_INT64,var);    
+	(void)cast_void_nctype((nc_type)NC_INT64,&var->val);
 	sz=var->sz;
 	dmn_sz=var->sz / nbr_dmn;
     
+    if(nco_dbg_lvl_get() >= nco_dbg_scl)
+       dbg_prn("lmt_var_mk","using hyperslab indices from a single var"); 
 
     // shape of var must be (nbr_dmn) or (nbr_dmn,2) or (nbr_dmn,3) 
     if( dmn_sz * nbr_dmn != sz )
@@ -821,18 +830,18 @@ NcapVector<lmt_sct*> &lmt_vtr )
        for(jdx=0;jdx<dmn_sz;jdx++)
 		{     
 		  
-         nco_uint64 uival= var->val.ui64p[idx+jdx];
+         nco_int64 ival= var->val.i64p[idx+jdx];
          switch(jdx){
            case 0: 
              lmt_ptr->is_usr_spc_min=True;
-             lmt_ptr->srt=uival;
+             lmt_ptr->srt=ival;
              break;
            case 1: //end
              lmt_ptr->is_usr_spc_max=True;
-             lmt_ptr->end=uival;             break;
+             lmt_ptr->end=ival;             break;
            case 2: //srd
              lmt_ptr->srd_sng=strdup("~fill_in");
-             lmt_ptr->srd=uival;
+             lmt_ptr->srd=ival;
              break;			
 	       }
 
@@ -847,7 +856,7 @@ NcapVector<lmt_sct*> &lmt_vtr )
        lmt_vtr.push_back(lmt_ptr);		
 	}
 	 
-	cast_nctype_void((nc_type)NC_UINT64,&var->val);
+	cast_nctype_void((nc_type)NC_INT64,&var->val);
 	var=nco_var_free(var);  
 	
    return true;
@@ -866,6 +875,8 @@ NcapVector<lmt_sct*> &lmt_vtr )
 int idx;
 int jdx;
 int sz;
+long ldx=0L;
+var_sct *var_out;
 lmt_sct *lmt_ptr;
 RefAST aRef;
 vector<ast_lmt_sct> ast_lmt_vtr;
@@ -885,59 +896,81 @@ if( nbr_dmn!=lmt_init(lmt,ast_lmt_vtr) )
 
   for(idx=0 ; idx <nbr_dmn ; idx++){
 
-     // fill out lmt structure
-     // use same logic as nco_lmt_prs 
-     lmt_ptr=(lmt_sct*)nco_calloc((size_t)1,sizeof(lmt_sct));
-     lmt_ptr->nm=NULL;
-     //lmt_ptr->lmt_typ=-1;
-     lmt_ptr->is_usr_spc_lmt=True; /* True if any part of limit is user-specified, else False */
-     lmt_ptr->min_sng=NULL;
-     lmt_ptr->max_sng=NULL;
-     lmt_ptr->srd_sng=NULL;
-     lmt_ptr->is_usr_spc_min=False;
-     lmt_ptr->is_usr_spc_max=False;
-     /* 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 */
-
-    for(jdx=0 ; jdx <3 ; jdx++){
-      long ldx=0L;
-      var_sct *var_out;
+    // fill out lmt structure
+    // use same logic as nco_lmt_prs 
+    lmt_ptr=(lmt_sct*)nco_calloc((size_t)1,sizeof(lmt_sct));
+    lmt_ptr->nm=NULL;
+    //lmt_ptr->lmt_typ=-1;
+    lmt_ptr->is_usr_spc_lmt=True; /* True if any part of limit is user-specified, else False */
+    lmt_ptr->min_sng=NULL;
+    lmt_ptr->max_sng=NULL;
+    lmt_ptr->srd_sng=NULL;
+    lmt_ptr->is_usr_spc_min=False;
+    lmt_ptr->is_usr_spc_max=False;
+    /* 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 */
+
+    // for a var limit  with a single index (or var) -(1D or nD) this case is handled by lmt_var_mk
+    //  we are here when  there is a single index for one of an nD specification
+    // a single limit mean a single index -by the parser this is 
+    // guaranteed to be non null  (that is ast_lmt_vtr[idx].ind[0] not null) 
+    if( ast_lmt_vtr[idx].ind[1]==ANTLR_USE_NAMESPACE(antlr)nullAST)
+    {  
+      var_out=out( ast_lmt_vtr[idx].ind[0] );
+      // convert result to type int
+      var_out=nco_var_cnf_typ(NC_INT64,var_out);    
+      (void)cast_void_nctype((nc_type)NC_INT64,&var_out->val);
+      // only interested in the first value.
+      ldx=var_out->val.i64p[0];
+      var_out=nco_var_free(var_out);
+
+      lmt_ptr->is_usr_spc_min=True;
+      lmt_ptr->srt=ldx;
+            
+      lmt_ptr->is_usr_spc_max=True;
+      lmt_ptr->end=ldx; 
+
+    } 
+    else 
+
+    for(jdx=0 ; jdx <3 ; jdx++)
+    {
 
       aRef=ast_lmt_vtr[idx].ind[jdx];
 
-      if(aRef && aRef->getType() != COLON ){
-        // Calculate number using out()
-        var_out=out(aRef);
-        // convert result to type int
-        var_out=nco_var_cnf_typ(NC_INT,var_out);    
-        (void)cast_void_nctype((nc_type)NC_INT,&var_out->val);
+      if(!aRef || aRef->getType() == COLON)
+        continue;
+
+      // Calculate number using out()
+      var_out=out(aRef);
+      // convert result to type int
+      var_out=nco_var_cnf_typ(NC_INT64,var_out);    
+      (void)cast_void_nctype((nc_type)NC_INT64,&var_out->val);
          // only interested in the first value.
-        ldx=var_out->val.ip[0];
-        var_out=nco_var_free(var_out);
-        
-        // switch jdx 0-srt,1-end,2-srd
-        switch(jdx){
+      ldx=var_out->val.i64p[0];
+      var_out=nco_var_free(var_out);
+
+      // switch jdx 0-srt,1-end,2-srd
+      switch(jdx)
+      {
+          //srt
           case 0: 
-             lmt_ptr->is_usr_spc_min=True;
-             lmt_ptr->srt=ldx;
-             break;
-          case 1: //end
-             lmt_ptr->is_usr_spc_max=True;
-             lmt_ptr->end=ldx;
-             break;
-          case 2: //srd
-             lmt_ptr->srd_sng=strdup("~fill_in");
-             lmt_ptr->srd=ldx;         
-             break;
-        }
+              lmt_ptr->is_usr_spc_min=True;
+              lmt_ptr->srt=ldx;
+              break;
+          // end
+          case 1: 
+              lmt_ptr->is_usr_spc_max=True;
+              lmt_ptr->end=ldx;
+              break;
+          //srd 
+          case 2: 
+              lmt_ptr->srd_sng=strdup("~fill_in");
+              lmt_ptr->srd=ldx;         
+              break;
       }
-    }// end jdx
-         
-    /* need to deal with situation where only start is defined -- ie picking only a single value */
-    if( lmt_ptr->is_usr_spc_min==True && lmt_ptr->is_usr_spc_max==False && lmt_ptr->srd_sng==NULL){
-        lmt_ptr->is_usr_spc_max=True;
-        lmt_ptr->end=lmt_ptr->srt; 
-    }    
+
+    }  
 
     lmt_vtr.push_back(lmt_ptr);
   } // end idx
@@ -1368,7 +1401,7 @@ var=NULL_CEWI;
 
                var_nm=vid->getText();
 
-              if(nco_dbg_lvl_get() >= nco_dbg_scl) dbg_prn(fnc_nm,var_nm+"(limits)");
+               if(nco_dbg_lvl_get() >= nco_dbg_scl) dbg_prn(fnc_nm,var_nm+"(limits)");
 
               // evaluate rhs for side effects eg new dims or lvalues 
                var_rhs=out(vid->getNextSibling());         
@@ -2518,7 +2551,8 @@ out returns [var_sct *var]
                if( var_att->type ==NC_STRING )  
                {
                    var=ncap_sclr_var_mk(att_nm,var_att->type,false);                
-                   var->val.vp=(void*)nco_malloc(slb_sz*cnt);       
+                   var->val.vp=(void*)nco_malloc(slb_sz*cnt);  
+                   var->sz=cnt;       
                    (void)cast_void_nctype((nc_type)NC_STRING,&var->val);                 
                    (void)cast_void_nctype((nc_type)NC_STRING,&var_att->val);                  
                    
@@ -2526,9 +2560,8 @@ out returns [var_sct *var]
                    for(idx=srt;idx<=end;idx+=srd)  
                      var->val.sngp[jdx++]=strdup(var_att->val.sngp[idx]);
 
-                
-                 (void)cast_nctype_void((nc_type)NC_STRING,&var->val); 
-                 (void)cast_nctype_void((nc_type)NC_STRING,&var_att->val); 
+                   (void)cast_nctype_void((nc_type)NC_STRING,&var->val); 
+                   (void)cast_nctype_void((nc_type)NC_STRING,&var_att->val); 
                
                }
                else
@@ -2639,9 +2672,11 @@ out returns [var_sct *var]
 
     |   str:NSTRING
         {
+            /* use malloc here rather than strdup(str->getText().c_str()) as this causes 
+               an invalid-read when using GCC compiler */ 
             char *tsng;
-            
-            tsng=strdup(str->getText().c_str());
+            tsng=(char*)nco_malloc(str->getText().size()+1);    
+            strcpy(tsng, str->getText().c_str());
             (void)sng_ascii_trn(tsng);            
             var=(var_sct *)nco_malloc(sizeof(var_sct));
             /* Set defaults */
@@ -2660,11 +2695,14 @@ out returns [var_sct *var]
             tsng=(char*)nco_free(tsng);      
         }
 
+
+
+
     |   str1:N4STRING
         {
             char *tsng;
-
-            tsng=strdup(str1->getText().c_str());
+            tsng=(char*)nco_malloc(str1->getText().size()+1);    
+            strcpy(tsng, str1->getText().c_str());
             (void)sng_ascii_trn(tsng);            
             var=(var_sct *)nco_malloc(sizeof(var_sct));
             /* Set defaults */
diff --git a/src/nco++/ncoLexer.cpp b/src/nco++/ncoLexer.cpp
index 050a3e2..89a767a 100644
--- a/src/nco++/ncoLexer.cpp
+++ b/src/nco++/ncoLexer.cpp
@@ -1,4 +1,4 @@
-/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoLexer.cpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoLexer.cpp"$ */
 #include "ncoLexer.hpp"
 #include <antlr/CharBuffer.hpp>
 #include <antlr/TokenStreamException.hpp>
diff --git a/src/nco++/ncoLexer.hpp b/src/nco++/ncoLexer.hpp
index f932894..16b57a7 100644
--- a/src/nco++/ncoLexer.hpp
+++ b/src/nco++/ncoLexer.hpp
@@ -2,7 +2,7 @@
 #define INC_ncoLexer_hpp_
 
 #include <antlr/config.hpp>
-/* $ANTLR 2.7.7 (20151030): "ncoGrammer.g" -> "ncoLexer.hpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoLexer.hpp"$ */
 #include <antlr/CommonToken.hpp>
 #include <antlr/InputBuffer.hpp>
 #include <antlr/BitSet.hpp>
diff --git a/src/nco++/ncoParser.cpp b/src/nco++/ncoParser.cpp
index 2dd1ed0..d0ee3e8 100644
--- a/src/nco++/ncoParser.cpp
+++ b/src/nco++/ncoParser.cpp
@@ -1,4 +1,4 @@
-/* $ANTLR 2.7.7 (20151030): "ncoGrammer.g" -> "ncoParser.cpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoParser.cpp"$ */
 #include "ncoParser.hpp"
 #include <antlr/NoViableAltException.hpp>
 #include <antlr/SemanticException.hpp>
diff --git a/src/nco++/ncoParser.hpp b/src/nco++/ncoParser.hpp
index 70a403f..0cd633e 100644
--- a/src/nco++/ncoParser.hpp
+++ b/src/nco++/ncoParser.hpp
@@ -2,7 +2,7 @@
 #define INC_ncoParser_hpp_
 
 #include <antlr/config.hpp>
-/* $ANTLR 2.7.7 (20151030): "ncoGrammer.g" -> "ncoParser.hpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoParser.hpp"$ */
 #include <antlr/TokenStream.hpp>
 #include <antlr/TokenBuffer.hpp>
 #include "ncoParserTokenTypes.hpp"
diff --git a/src/nco++/ncoParserTokenTypes.hpp b/src/nco++/ncoParserTokenTypes.hpp
index 8bd0255..94c587d 100644
--- a/src/nco++/ncoParserTokenTypes.hpp
+++ b/src/nco++/ncoParserTokenTypes.hpp
@@ -1,7 +1,7 @@
 #ifndef INC_ncoParserTokenTypes_hpp_
 #define INC_ncoParserTokenTypes_hpp_
 
-/* $ANTLR 2.7.7 (20151030): "ncoGrammer.g" -> "ncoParserTokenTypes.hpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoParserTokenTypes.hpp"$ */
 
 #ifndef CUSTOM_API
 # define CUSTOM_API
diff --git a/src/nco++/ncoTree.cpp b/src/nco++/ncoTree.cpp
index 9affe67..a34e3a5 100644
--- a/src/nco++/ncoTree.cpp
+++ b/src/nco++/ncoTree.cpp
@@ -1,4 +1,4 @@
-/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoTree.cpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoTree.cpp"$ */
 #include "ncoTree.hpp"
 #include <antlr/Token.hpp>
 #include <antlr/AST.hpp>
@@ -13,7 +13,7 @@ ncoTree::ncoTree()
 }
 
 int  ncoTree::lmt_peek(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 1095 "ncoGrammer.g"
+#line 1128 "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 1097 "ncoGrammer.g"
+#line 1130 "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 1108 "ncoGrammer.g"
+#line 1141 "ncoGrammer.g"
 	int iret=0;
 #line 57 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST statements_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -69,7 +69,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	ANTLR_USE_NAMESPACE(antlr)RefAST stmt2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST dtyp = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST def = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 1108 "ncoGrammer.g"
+#line 1141 "ncoGrammer.g"
 	
 	var_sct *var=NULL;
 	var_sct *var2=NULL;
@@ -91,7 +91,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,BLOCK);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1118 "ncoGrammer.g"
+#line 1151 "ncoGrammer.g"
 				
 				//std::cout <<"Num of Children in block="<<blk->getNumberOfChildren()<<endl;
 				iret=run_exe(blk->getFirstChild(),lpp_vtr.size() );
@@ -113,7 +113,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t231;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1125 "ncoGrammer.g"
+#line 1158 "ncoGrammer.g"
 				
 				int aType; 
 				
@@ -146,7 +146,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t232;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1145 "ncoGrammer.g"
+#line 1178 "ncoGrammer.g"
 				
 				
 				var=out(fss);
@@ -174,7 +174,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t233;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1155 "ncoGrammer.g"
+#line 1188 "ncoGrammer.g"
 				
 				//if can have only 3 or 4 parts  , 1 node and 2 or 3 siblings
 				// IF LOGICAL_EXP STATEMENT1 STATEMENT2
@@ -222,7 +222,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t234;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1185 "ncoGrammer.g"
+#line 1218 "ncoGrammer.g"
 				
 				// convert mask to short 
 				RefAST tr; 
@@ -285,7 +285,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t235;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1229 "ncoGrammer.g"
+#line 1262 "ncoGrammer.g"
 				
 				
 				bool br;
@@ -339,7 +339,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t236;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1258 "ncoGrammer.g"
+#line 1291 "ncoGrammer.g"
 				
 				bool b1,b2,b3,br;
 				var_sct *var_f1;
@@ -400,7 +400,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,ELSE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1309 "ncoGrammer.g"
+#line 1342 "ncoGrammer.g"
 				iret=ELSE;
 #line 406 "ncoTree.cpp"
 			}
@@ -412,7 +412,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,BREAK);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1310 "ncoGrammer.g"
+#line 1343 "ncoGrammer.g"
 				iret=BREAK;
 #line 418 "ncoTree.cpp"
 			}
@@ -424,7 +424,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,CONTINUE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1311 "ncoGrammer.g"
+#line 1344 "ncoGrammer.g"
 				iret=CONTINUE;
 #line 430 "ncoTree.cpp"
 			}
@@ -436,7 +436,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NULL_NODE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1312 "ncoGrammer.g"
+#line 1345 "ncoGrammer.g"
 				iret=NULL_NODE;
 #line 442 "ncoTree.cpp"
 			}
@@ -522,7 +522,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t237;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1314 "ncoGrammer.g"
+#line 1347 "ncoGrammer.g"
 				
 				
 				bool bunlimited=false;      
@@ -587,7 +587,7 @@ int  ncoTree::statements(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2122 "ncoGrammer.g"
+#line 2155 "ncoGrammer.g"
 	var_sct *var;
 #line 593 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST out_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
@@ -631,7 +631,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	ANTLR_USE_NAMESPACE(antlr)RefAST val_uint = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST val_int64 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST val_uint64 = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2122 "ncoGrammer.g"
+#line 2155 "ncoGrammer.g"
 	
 	bool bret=true;   
 	const std::string fnc_nm("out"); 
@@ -668,7 +668,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t308;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2163 "ncoGrammer.g"
+#line 2196 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, TIMES );
 #line 674 "ncoTree.cpp"
 			}
@@ -687,7 +687,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t309;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2166 "ncoGrammer.g"
+#line 2199 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, DIVIDE );
 #line 693 "ncoTree.cpp"
 			}
@@ -706,7 +706,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t310;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2168 "ncoGrammer.g"
+#line 2201 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, MOD);
 #line 712 "ncoTree.cpp"
 			}
@@ -725,7 +725,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t311;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2170 "ncoGrammer.g"
+#line 2203 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, CARET);
 #line 731 "ncoTree.cpp"
 			}
@@ -742,7 +742,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t312;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2173 "ncoGrammer.g"
+#line 2206 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,NULL_CEWI, LNOT );
 #line 748 "ncoTree.cpp"
 			}
@@ -761,7 +761,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t319;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2192 "ncoGrammer.g"
+#line 2225 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LAND );
 #line 767 "ncoTree.cpp"
 			}
@@ -780,7 +780,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t320;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2194 "ncoGrammer.g"
+#line 2227 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LOR );
 #line 786 "ncoTree.cpp"
 			}
@@ -799,7 +799,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t321;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2197 "ncoGrammer.g"
+#line 2230 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LTHAN );
 #line 805 "ncoTree.cpp"
 			}
@@ -818,7 +818,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t322;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2199 "ncoGrammer.g"
+#line 2232 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, GTHAN );
 #line 824 "ncoTree.cpp"
 			}
@@ -837,7 +837,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t323;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2201 "ncoGrammer.g"
+#line 2234 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, GEQ );
 #line 843 "ncoTree.cpp"
 			}
@@ -856,7 +856,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t324;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2203 "ncoGrammer.g"
+#line 2236 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, LEQ );
 #line 862 "ncoTree.cpp"
 			}
@@ -875,7 +875,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t325;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2205 "ncoGrammer.g"
+#line 2238 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, EQ );
 #line 881 "ncoTree.cpp"
 			}
@@ -894,7 +894,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t326;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2207 "ncoGrammer.g"
+#line 2240 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, NEQ );
 #line 900 "ncoTree.cpp"
 			}
@@ -913,7 +913,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t327;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2210 "ncoGrammer.g"
+#line 2243 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, FLTHAN );
 #line 919 "ncoTree.cpp"
 			}
@@ -932,7 +932,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t328;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2212 "ncoGrammer.g"
+#line 2245 "ncoGrammer.g"
 				var=ncap_var_var_op(var1,var2, FGTHAN );
 #line 938 "ncoTree.cpp"
 			}
@@ -950,7 +950,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t412;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2345 "ncoGrammer.g"
+#line 2378 "ncoGrammer.g"
 				
 				var=out(att2var(attz));    
 				
@@ -970,7 +970,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t413;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2351 "ncoGrammer.g"
+#line 2384 "ncoGrammer.g"
 				
 				
 				
@@ -992,7 +992,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t414;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2356 "ncoGrammer.g"
+#line 2389 "ncoGrammer.g"
 				
 				bool br;
 				
@@ -1025,7 +1025,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t415;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2374 "ncoGrammer.g"
+#line 2407 "ncoGrammer.g"
 				
 				// The lexer has appended the index of the function to the function name m - (name#index)
 				//  the index is into fmc_vtr  
@@ -1057,7 +1057,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t416;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2385 "ncoGrammer.g"
+#line 2418 "ncoGrammer.g"
 				
 				// The lexer has appended the index of the function to the function name m - (name#index)
 				//  the index is into fmc_vtr  
@@ -1076,7 +1076,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,DIM_ID_SIZE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2395 "ncoGrammer.g"
+#line 2428 "ncoGrammer.g"
 				
 				string sDim=dval->getText();
 				dmn_sct *dmn_fd;
@@ -1126,7 +1126,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,VALUE_LIST);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2636 "ncoGrammer.g"
+#line 2669 "ncoGrammer.g"
 				
 				var=value_list(vlst);
 				
@@ -1140,11 +1140,13 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NSTRING);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2641 "ncoGrammer.g"
+#line 2674 "ncoGrammer.g"
 				
+				/* use malloc here rather than strdup(str->getText().c_str()) as this causes 
+				an invalid-read when using GCC compiler */ 
 				char *tsng;
-				
-				tsng=strdup(str->getText().c_str());
+				tsng=(char*)nco_malloc(str->getText().size()+1);    
+				strcpy(tsng, str->getText().c_str());
 				(void)sng_ascii_trn(tsng);            
 				var=(var_sct *)nco_malloc(sizeof(var_sct));
 				/* Set defaults */
@@ -1162,7 +1164,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				}
 				tsng=(char*)nco_free(tsng);      
 				
-#line 1166 "ncoTree.cpp"
+#line 1168 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1172,11 +1174,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,N4STRING);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2664 "ncoGrammer.g"
+#line 2702 "ncoGrammer.g"
 				
 				char *tsng;
-				
-				tsng=strdup(str1->getText().c_str());
+				tsng=(char*)nco_malloc(str1->getText().size()+1);    
+				strcpy(tsng, str1->getText().c_str());
 				(void)sng_ascii_trn(tsng);            
 				var=(var_sct *)nco_malloc(sizeof(var_sct));
 				/* Set defaults */
@@ -1200,7 +1202,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				}
 				tsng=(char*)nco_free(tsng);      
 				
-#line 1204 "ncoTree.cpp"
+#line 1206 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1210,9 +1212,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_FLOAT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2694 "ncoGrammer.g"
+#line 2732 "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 1216 "ncoTree.cpp"
+#line 1218 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1222,9 +1224,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_DOUBLE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2696 "ncoGrammer.g"
+#line 2734 "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 1228 "ncoTree.cpp"
+#line 1230 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1234,9 +1236,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_INT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2698 "ncoGrammer.g"
+#line 2736 "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 1240 "ncoTree.cpp"
+#line 1242 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1246,9 +1248,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_SHORT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2700 "ncoGrammer.g"
+#line 2738 "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 1252 "ncoTree.cpp"
+#line 1254 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1258,9 +1260,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_BYTE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2702 "ncoGrammer.g"
+#line 2740 "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 1264 "ncoTree.cpp"
+#line 1266 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1270,9 +1272,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_UBYTE);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2707 "ncoGrammer.g"
+#line 2745 "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 1276 "ncoTree.cpp"
+#line 1278 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1282,9 +1284,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_USHORT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2711 "ncoGrammer.g"
+#line 2749 "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 1288 "ncoTree.cpp"
+#line 1290 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1294,9 +1296,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_UINT);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2713 "ncoGrammer.g"
+#line 2751 "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 1300 "ncoTree.cpp"
+#line 1302 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1306,9 +1308,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_INT64);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2715 "ncoGrammer.g"
+#line 2753 "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 1312 "ncoTree.cpp"
+#line 1314 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1318,9 +1320,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,NCAP_UINT64);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2719 "ncoGrammer.g"
+#line 2757 "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 1324 "ncoTree.cpp"
+#line 1326 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -1364,9 +1366,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				_t = __t279;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 2143 "ncoGrammer.g"
+#line 2176 "ncoGrammer.g"
 					var=ncap_var_var_op(var1,var2, PLUS );
-#line 1370 "ncoTree.cpp"
+#line 1372 "ncoTree.cpp"
 				}
 			}
 			else {
@@ -1409,9 +1411,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 					_t = __t283;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 2145 "ncoGrammer.g"
+#line 2178 "ncoGrammer.g"
 						var=ncap_var_var_op(var1,var2, MINUS );
-#line 1415 "ncoTree.cpp"
+#line 1417 "ncoTree.cpp"
 					}
 				}
 				else {
@@ -1464,12 +1466,12 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 						_t = __t288;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 2146 "ncoGrammer.g"
+#line 2179 "ncoGrammer.g"
 							
 							var1=out(att2var(aposti));     
 							var=ncap_var_var_inc(var1,NULL_CEWI,POST_INC,false,bret,prs_arg);      
 							
-#line 1473 "ncoTree.cpp"
+#line 1475 "ncoTree.cpp"
 						}
 					}
 					else {
@@ -1522,12 +1524,12 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 							_t = __t294;
 							_t = _t->getNextSibling();
 							if ( inputState->guessing==0 ) {
-#line 2150 "ncoGrammer.g"
+#line 2183 "ncoGrammer.g"
 								
 								var1=out(att2var(apostd));     
 								var=ncap_var_var_inc(var1,NULL_CEWI,POST_DEC,false,bret,prs_arg);      
 								
-#line 1531 "ncoTree.cpp"
+#line 1533 "ncoTree.cpp"
 							}
 						}
 						else {
@@ -1580,12 +1582,12 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 								_t = __t300;
 								_t = _t->getNextSibling();
 								if ( inputState->guessing==0 ) {
-#line 2154 "ncoGrammer.g"
+#line 2187 "ncoGrammer.g"
 									
 									var1=out(att2var(aprei));     
 									var=ncap_var_var_inc(var1,NULL_CEWI,INC,false,bret,prs_arg);      
 									
-#line 1589 "ncoTree.cpp"
+#line 1591 "ncoTree.cpp"
 								}
 							}
 							else {
@@ -1638,12 +1640,12 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t306;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2158 "ncoGrammer.g"
+#line 2191 "ncoGrammer.g"
 										
 										var1=out(att2var(apred));     
 										var=ncap_var_var_inc(var1,NULL_CEWI,DEC,false,bret,prs_arg);      
 										
-#line 1647 "ncoTree.cpp"
+#line 1649 "ncoTree.cpp"
 									}
 								}
 								else if ((_t->getType() == MINUS)) {
@@ -1656,9 +1658,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t313;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2175 "ncoGrammer.g"
+#line 2208 "ncoGrammer.g"
 										var=ncap_var_var_op(var1,NULL_CEWI, MINUS );
-#line 1662 "ncoTree.cpp"
+#line 1664 "ncoTree.cpp"
 									}
 								}
 								else if ((_t->getType() == PLUS)) {
@@ -1681,9 +1683,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t315;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2179 "ncoGrammer.g"
+#line 2212 "ncoGrammer.g"
 										var=ncap_var_var_inc(var1,NULL_CEWI,INC,false,bret,prs_arg);
-#line 1687 "ncoTree.cpp"
+#line 1689 "ncoTree.cpp"
 									}
 								}
 								else if ((_t->getType() == DEC)) {
@@ -1696,9 +1698,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t316;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2182 "ncoGrammer.g"
+#line 2215 "ncoGrammer.g"
 										var=ncap_var_var_inc(var1,NULL_CEWI, DEC,false,bret,prs_arg );
-#line 1702 "ncoTree.cpp"
+#line 1704 "ncoTree.cpp"
 									}
 								}
 								else if ((_t->getType() == POST_INC)) {
@@ -1711,11 +1713,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t317;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2184 "ncoGrammer.g"
+#line 2217 "ncoGrammer.g"
 										
 										var=ncap_var_var_inc(var1,NULL_CEWI,POST_INC,false,bret,prs_arg);
 										
-#line 1719 "ncoTree.cpp"
+#line 1721 "ncoTree.cpp"
 									}
 								}
 								else if ((_t->getType() == POST_DEC)) {
@@ -1728,11 +1730,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 									_t = __t318;
 									_t = _t->getNextSibling();
 									if ( inputState->guessing==0 ) {
-#line 2187 "ncoGrammer.g"
+#line 2220 "ncoGrammer.g"
 										
 										var=ncap_var_var_inc(var1,NULL_CEWI,POST_DEC,false,bret,prs_arg);
 										
-#line 1736 "ncoTree.cpp"
+#line 1738 "ncoTree.cpp"
 									}
 								}
 								else {
@@ -1797,11 +1799,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 										_t = __t333;
 										_t = _t->getNextSibling();
 										if ( inputState->guessing==0 ) {
-#line 2220 "ncoGrammer.g"
+#line 2253 "ncoGrammer.g"
 											
 											var=ncap_var_var_inc(var1,var2,PLUS_ASSIGN ,false, bret,prs_arg);
 											
-#line 1805 "ncoTree.cpp"
+#line 1807 "ncoTree.cpp"
 										}
 									}
 									else {
@@ -1857,11 +1859,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 											_t = __t338;
 											_t = _t->getNextSibling();
 											if ( inputState->guessing==0 ) {
-#line 2224 "ncoGrammer.g"
+#line 2257 "ncoGrammer.g"
 												
 												var=ncap_var_var_inc(var1,var2, PLUS_ASSIGN ,true, bret,prs_arg);
 												
-#line 1865 "ncoTree.cpp"
+#line 1867 "ncoTree.cpp"
 											}
 										}
 										else {
@@ -1918,13 +1920,13 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 												_t = __t344;
 												_t = _t->getNextSibling();
 												if ( inputState->guessing==0 ) {
-#line 2228 "ncoGrammer.g"
+#line 2261 "ncoGrammer.g"
 													
 													
 													var1=out(att2var(atp));     
 													var=ncap_var_var_inc(var1,var2, PLUS_ASSIGN ,false,bret, prs_arg);
 													
-#line 1928 "ncoTree.cpp"
+#line 1930 "ncoTree.cpp"
 												}
 											}
 											else {
@@ -1989,11 +1991,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 													_t = __t350;
 													_t = _t->getNextSibling();
 													if ( inputState->guessing==0 ) {
-#line 2235 "ncoGrammer.g"
+#line 2268 "ncoGrammer.g"
 														
 														var=ncap_var_var_inc(var1,var2, MINUS_ASSIGN ,false, bret,prs_arg);
 														
-#line 1997 "ncoTree.cpp"
+#line 1999 "ncoTree.cpp"
 													}
 												}
 												else {
@@ -2049,11 +2051,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 														_t = __t355;
 														_t = _t->getNextSibling();
 														if ( inputState->guessing==0 ) {
-#line 2239 "ncoGrammer.g"
+#line 2272 "ncoGrammer.g"
 															
 															var=ncap_var_var_inc(var1,var2, MINUS_ASSIGN ,true, bret,prs_arg);
 															
-#line 2057 "ncoTree.cpp"
+#line 2059 "ncoTree.cpp"
 														}
 													}
 													else {
@@ -2110,12 +2112,12 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 															_t = __t361;
 															_t = _t->getNextSibling();
 															if ( inputState->guessing==0 ) {
-#line 2243 "ncoGrammer.g"
+#line 2276 "ncoGrammer.g"
 																
 																var1=out(att2var(atm));     
 																var=ncap_var_var_inc(var1,var2, MINUS_ASSIGN ,false, bret,prs_arg);
 																
-#line 2119 "ncoTree.cpp"
+#line 2121 "ncoTree.cpp"
 															}
 														}
 														else {
@@ -2180,11 +2182,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																_t = __t367;
 																_t = _t->getNextSibling();
 																if ( inputState->guessing==0 ) {
-#line 2248 "ncoGrammer.g"
+#line 2281 "ncoGrammer.g"
 																	
 																	var=ncap_var_var_inc(var1,var2, TIMES_ASSIGN ,false, bret,prs_arg);
 																	
-#line 2188 "ncoTree.cpp"
+#line 2190 "ncoTree.cpp"
 																}
 															}
 															else {
@@ -2240,11 +2242,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																	_t = __t372;
 																	_t = _t->getNextSibling();
 																	if ( inputState->guessing==0 ) {
-#line 2252 "ncoGrammer.g"
+#line 2285 "ncoGrammer.g"
 																		
 																		var=ncap_var_var_inc(var1,var2, TIMES_ASSIGN ,true, bret,prs_arg);
 																		
-#line 2248 "ncoTree.cpp"
+#line 2250 "ncoTree.cpp"
 																	}
 																}
 																else {
@@ -2301,12 +2303,12 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																		_t = __t378;
 																		_t = _t->getNextSibling();
 																		if ( inputState->guessing==0 ) {
-#line 2256 "ncoGrammer.g"
+#line 2289 "ncoGrammer.g"
 																			
 																			var1=out(att2var(attm));     
 																			var=ncap_var_var_inc(var1,var2, TIMES_ASSIGN ,false, bret,prs_arg);
 																			
-#line 2310 "ncoTree.cpp"
+#line 2312 "ncoTree.cpp"
 																		}
 																	}
 																	else {
@@ -2371,11 +2373,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																			_t = __t384;
 																			_t = _t->getNextSibling();
 																			if ( inputState->guessing==0 ) {
-#line 2261 "ncoGrammer.g"
+#line 2294 "ncoGrammer.g"
 																				
 																				var=ncap_var_var_inc(var1,var2, DIVIDE_ASSIGN ,false, bret,prs_arg);
 																				
-#line 2379 "ncoTree.cpp"
+#line 2381 "ncoTree.cpp"
 																			}
 																		}
 																		else {
@@ -2431,11 +2433,11 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																				_t = __t389;
 																				_t = _t->getNextSibling();
 																				if ( inputState->guessing==0 ) {
-#line 2265 "ncoGrammer.g"
+#line 2298 "ncoGrammer.g"
 																					
 																					var=ncap_var_var_inc(var1,var2, DIVIDE_ASSIGN ,true, bret,prs_arg);
 																					
-#line 2439 "ncoTree.cpp"
+#line 2441 "ncoTree.cpp"
 																				}
 																			}
 																			else {
@@ -2492,12 +2494,12 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																					_t = __t395;
 																					_t = _t->getNextSibling();
 																					if ( inputState->guessing==0 ) {
-#line 2269 "ncoGrammer.g"
+#line 2302 "ncoGrammer.g"
 																						
 																						var1=out(att2var(atd));        
 																						var=ncap_var_var_inc(var1,var2, DIVIDE_ASSIGN ,false, bret,prs_arg);
 																						
-#line 2501 "ncoTree.cpp"
+#line 2503 "ncoTree.cpp"
 																					}
 																				}
 																				else {
@@ -2559,14 +2561,14 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																						_t = __t401;
 																						_t = _t->getNextSibling();
 																						if ( inputState->guessing==0 ) {
-#line 2275 "ncoGrammer.g"
+#line 2308 "ncoGrammer.g"
 																							
 																							if(prs_arg->ntl_scn)
 																							var=assign_ntl(asn,false,bret); 
 																							else
 																							var=assign(asn,false,bret);
 																							
-#line 2570 "ncoTree.cpp"
+#line 2572 "ncoTree.cpp"
 																						}
 																					}
 																					else {
@@ -2619,7 +2621,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																							_t = __t406;
 																							_t = _t->getNextSibling();
 																							if ( inputState->guessing==0 ) {
-#line 2283 "ncoGrammer.g"
+#line 2316 "ncoGrammer.g"
 																								
 																								
 																								RefAST tr;
@@ -2634,7 +2636,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																								else
 																								var=assign(tr,false,bret);
 																								
-#line 2638 "ncoTree.cpp"
+#line 2640 "ncoTree.cpp"
 																							}
 																						}
 																						else if ((_t->getType() == ASSIGN)) {
@@ -2681,7 +2683,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																							_t = __t408;
 																							_t = _t->getNextSibling();
 																							if ( inputState->guessing==0 ) {
-#line 2299 "ncoGrammer.g"
+#line 2332 "ncoGrammer.g"
 																								
 																								// Check for RAM variable - if present 
 																								// change tree - for example from:
@@ -2725,7 +2727,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																								var=assign(tr, true,bret);
 																								
 																								
-#line 2729 "ncoTree.cpp"
+#line 2731 "ncoTree.cpp"
 																							}
 																						}
 																						else {
@@ -2766,7 +2768,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																								_t = __t420;
 																								_t = _t->getNextSibling();
 																								if ( inputState->guessing==0 ) {
-#line 2436 "ncoGrammer.g"
+#line 2469 "ncoGrammer.g"
 																									
 																											
 																											    // fxm: 4 Oct 2015
@@ -2793,7 +2795,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																									
 																									
 																									
-#line 2797 "ncoTree.cpp"
+#line 2799 "ncoTree.cpp"
 																								}
 																							}
 																							else {
@@ -2834,7 +2836,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																									_t = __t424;
 																									_t = _t->getNextSibling();
 																									if ( inputState->guessing==0 ) {
-#line 2464 "ncoGrammer.g"
+#line 2497 "ncoGrammer.g"
 																										
 																										
 																										std::string att_nm=attl->getText();
@@ -2892,7 +2894,8 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																										if( var_att->type ==NC_STRING )  
 																										{
 																										var=ncap_sclr_var_mk(att_nm,var_att->type,false);                
-																										var->val.vp=(void*)nco_malloc(slb_sz*cnt);       
+																										var->val.vp=(void*)nco_malloc(slb_sz*cnt);  
+																										var->sz=cnt;       
 																										(void)cast_void_nctype((nc_type)NC_STRING,&var->val);                 
 																										(void)cast_void_nctype((nc_type)NC_STRING,&var_att->val);                  
 																										
@@ -2900,7 +2903,6 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																										for(idx=srt;idx<=end;idx+=srd)  
 																										var->val.sngp[jdx++]=strdup(var_att->val.sngp[idx]);
 																										
-																										
 																										(void)cast_nctype_void((nc_type)NC_STRING,&var->val); 
 																										(void)cast_nctype_void((nc_type)NC_STRING,&var_att->val); 
 																										
@@ -2936,7 +2938,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																										
 																										attl_end: ; 
 																										
-#line 2940 "ncoTree.cpp"
+#line 2942 "ncoTree.cpp"
 																									}
 																								}
 																								else if ((_t->getType() == VAR_ID)) {
@@ -2944,7 +2946,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																									match(_t,VAR_ID);
 																									_t = _t->getNextSibling();
 																									if ( inputState->guessing==0 ) {
-#line 2570 "ncoGrammer.g"
+#line 2603 "ncoGrammer.g"
 																										
 																										//dbg_prn(fnc_nm,"getting regular var in out "+v->getText());
 																										
@@ -2975,7 +2977,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																										
 																										
 																										
-#line 2979 "ncoTree.cpp"
+#line 2981 "ncoTree.cpp"
 																									}
 																								}
 																								else if ((_t->getType() == ATT_ID)) {
@@ -2983,7 +2985,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																									match(_t,ATT_ID);
 																									_t = _t->getNextSibling();
 																									if ( inputState->guessing==0 ) {
-#line 2602 "ncoGrammer.g"
+#line 2635 "ncoGrammer.g"
 																										
 																										
 																										var=att_plain(att);  
@@ -3016,7 +3018,7 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 																										*/
 																										
 																										
-#line 3020 "ncoTree.cpp"
+#line 3022 "ncoTree.cpp"
 																									}
 																								}
 		else {
@@ -3040,9 +3042,9 @@ var_sct * ncoTree::out(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	bool bram,bool bret
 ) {
-#line 1357 "ncoGrammer.g"
+#line 1390 "ncoGrammer.g"
 	var_sct *var;
-#line 3046 "ncoTree.cpp"
+#line 3048 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST assign_ntl_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST lmt = ANTLR_USE_NAMESPACE(antlr)nullAST;
@@ -3052,12 +3054,12 @@ 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 1357 "ncoGrammer.g"
+#line 1390 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign_ntl"); 
 	var=NULL_CEWI;
 	
-#line 3061 "ncoTree.cpp"
+#line 3063 "ncoTree.cpp"
 	
 	try {      // for error handling
 		bool synPredMatched242 = false;
@@ -3097,7 +3099,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			_t = __t243;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1362 "ncoGrammer.g"
+#line 1395 "ncoGrammer.g"
 				
 				
 				std::string var_nm; 
@@ -3129,7 +3131,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				(void)prs_arg->int_vtr.push_ow(Nvar);
 				}
 				
-#line 3133 "ncoTree.cpp"
+#line 3135 "ncoTree.cpp"
 			}
 		}
 		else {
@@ -3191,7 +3193,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				_t = __t248;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1394 "ncoGrammer.g"
+#line 1427 "ncoGrammer.g"
 					
 					
 					int idx;
@@ -3267,7 +3269,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					
 					bcst=false;   
 					
-#line 3271 "ncoTree.cpp"
+#line 3273 "ncoTree.cpp"
 				}
 			}
 			else if ((_t->getType() == VAR_ID)) {
@@ -3275,7 +3277,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				match(_t,VAR_ID);
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1470 "ncoGrammer.g"
+#line 1503 "ncoGrammer.g"
 					
 					
 					var_sct *var_rhs;
@@ -3307,7 +3309,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					
 					
 					
-#line 3311 "ncoTree.cpp"
+#line 3313 "ncoTree.cpp"
 				}
 			}
 			else {
@@ -3348,7 +3350,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					_t = __t252;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 1502 "ncoGrammer.g"
+#line 1535 "ncoGrammer.g"
 						
 						
 						//In Initial scan all newly defined atts are flagged as Undefined
@@ -3369,7 +3371,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						var=(var_sct*)NULL; 
 						
 						
-#line 3373 "ncoTree.cpp"
+#line 3375 "ncoTree.cpp"
 					}
 				}
 				else {
@@ -3410,11 +3412,11 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						_t = __t256;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1523 "ncoGrammer.g"
+#line 1556 "ncoGrammer.g"
 							
 							;
 							
-#line 3418 "ncoTree.cpp"
+#line 3420 "ncoTree.cpp"
 						}
 					}
 					else if ((_t->getType() == ATT_ID)) {
@@ -3422,7 +3424,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						match(_t,ATT_ID);
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 1526 "ncoGrammer.g"
+#line 1559 "ncoGrammer.g"
 							
 							
 							//In Initial scan all newly defined atts are flagged as Undefined
@@ -3443,7 +3445,7 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 							var=(var_sct*)NULL;    
 							
 							
-#line 3447 "ncoTree.cpp"
+#line 3449 "ncoTree.cpp"
 						}
 					}
 		else {
@@ -3467,9 +3469,9 @@ var_sct * ncoTree::assign_ntl(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	bool bram,bool bret
 ) {
-#line 1549 "ncoGrammer.g"
+#line 1582 "ncoGrammer.g"
 	var_sct *var;
-#line 3473 "ncoTree.cpp"
+#line 3475 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST assign_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST lmt = ANTLR_USE_NAMESPACE(antlr)nullAST;
@@ -3480,12 +3482,12 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 	ANTLR_USE_NAMESPACE(antlr)RefAST lmta = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 1549 "ncoGrammer.g"
+#line 1582 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign"); 
 	var=NULL_CEWI;
 	
-#line 3489 "ncoTree.cpp"
+#line 3491 "ncoTree.cpp"
 	
 	try {      // for error handling
 		bool synPredMatched260 = false;
@@ -3525,7 +3527,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			_t = __t261;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 1555 "ncoGrammer.g"
+#line 1588 "ncoGrammer.g"
 				
 				
 				int idx;
@@ -3722,7 +3724,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				
 				
 				
-#line 3726 "ncoTree.cpp"
+#line 3728 "ncoTree.cpp"
 			}
 		}
 		else {
@@ -3784,7 +3786,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				_t = __t266;
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1753 "ncoGrammer.g"
+#line 1786 "ncoGrammer.g"
 					
 					
 					var_sct *var1;
@@ -3882,7 +3884,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					var_cst=nco_var_free(var_cst); 
 					
 					
-#line 3886 "ncoTree.cpp"
+#line 3888 "ncoTree.cpp"
 				}
 			}
 			else if ((_t->getType() == VAR_ID)) {
@@ -3890,7 +3892,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 				match(_t,VAR_ID);
 				_t = _t->getNextSibling();
 				if ( inputState->guessing==0 ) {
-#line 1851 "ncoGrammer.g"
+#line 1884 "ncoGrammer.g"
 					
 					
 					// Set class wide variables
@@ -3962,7 +3964,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					
 					
 					
-#line 3966 "ncoTree.cpp"
+#line 3968 "ncoTree.cpp"
 				}
 			}
 			else {
@@ -4003,7 +4005,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 					_t = __t270;
 					_t = _t->getNextSibling();
 					if ( inputState->guessing==0 ) {
-#line 1923 "ncoGrammer.g"
+#line 1956 "ncoGrammer.g"
 						
 						
 						long srt,end,cnt,srd;  
@@ -4158,7 +4160,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						
 						
 						
-#line 4162 "ncoTree.cpp"
+#line 4164 "ncoTree.cpp"
 					}
 				}
 				else {
@@ -4199,11 +4201,11 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						_t = __t274;
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 2078 "ncoGrammer.g"
+#line 2111 "ncoGrammer.g"
 							
 							;
 							
-#line 4207 "ncoTree.cpp"
+#line 4209 "ncoTree.cpp"
 						}
 					}
 					else if ((_t->getType() == ATT_ID)) {
@@ -4211,7 +4213,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 						match(_t,ATT_ID);
 						_t = _t->getNextSibling();
 						if ( inputState->guessing==0 ) {
-#line 2081 "ncoGrammer.g"
+#line 2114 "ncoGrammer.g"
 							
 							
 							var_sct *var1;
@@ -4251,7 +4253,7 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 							
 							
 							
-#line 4255 "ncoTree.cpp"
+#line 4257 "ncoTree.cpp"
 						}
 					}
 		else {
@@ -4273,14 +4275,14 @@ var_sct * ncoTree::assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 }
 
 var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2730 "ncoGrammer.g"
+#line 2768 "ncoGrammer.g"
 	var_sct *var;
-#line 4279 "ncoTree.cpp"
+#line 4281 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST out_asn_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vid = ANTLR_USE_NAMESPACE(antlr)nullAST;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2730 "ncoGrammer.g"
+#line 2768 "ncoGrammer.g"
 	
 	const std::string fnc_nm("assign_asn");
 	var=NULL_CEWI; 
@@ -4288,7 +4290,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	NcapVar *Nvar;
 	
 	
-#line 4292 "ncoTree.cpp"
+#line 4294 "ncoTree.cpp"
 	
 	try {      // for error handling
 		if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
@@ -4306,7 +4308,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			_t = __t426;
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2740 "ncoGrammer.g"
+#line 2778 "ncoGrammer.g"
 				
 				if(vid1->getFirstChild())
 				err_prn(fnc_nm,"Invalid Lvalue " +vid1->getText() );
@@ -4324,7 +4326,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				}
 				
 				
-#line 4328 "ncoTree.cpp"
+#line 4330 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -4334,7 +4336,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,VAR_ID);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2758 "ncoGrammer.g"
+#line 2796 "ncoGrammer.g"
 				
 				var_nm_s=vid->getText();  
 				if(vid->getFirstChild())
@@ -4355,7 +4357,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				}
 				
 				
-#line 4359 "ncoTree.cpp"
+#line 4361 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -4365,7 +4367,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			match(_t,ATT_ID);
 			_t = _t->getNextSibling();
 			if ( inputState->guessing==0 ) {
-#line 2779 "ncoGrammer.g"
+#line 2817 "ncoGrammer.g"
 				
 				// check "output"
 				NcapVar *Nvar=NULL;
@@ -4402,7 +4404,7 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 				
 				
 				
-#line 4406 "ncoTree.cpp"
+#line 4408 "ncoTree.cpp"
 			}
 			break;
 		}
@@ -4426,12 +4428,12 @@ var_sct * ncoTree::out_asn(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2819 "ncoGrammer.g"
+#line 2857 "ncoGrammer.g"
 	var_sct *var;
-#line 4432 "ncoTree.cpp"
+#line 4434 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST att_plain_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2819 "ncoGrammer.g"
+#line 2857 "ncoGrammer.g"
 	
 	const std::string fnc_nm("att_plain");
 	var=NULL_CEWI; 
@@ -4439,14 +4441,14 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	NcapVar *Nvar;
 	
 	
-#line 4443 "ncoTree.cpp"
+#line 4445 "ncoTree.cpp"
 	
 	try {      // for error handling
 		att = _t;
 		match(_t,ATT_ID);
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 2829 "ncoGrammer.g"
+#line 2867 "ncoGrammer.g"
 			
 			// check "output"
 			NcapVar *Nvar=NULL;
@@ -4477,7 +4479,7 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			var->val.vp=(void*)nco_free(var->val.vp);
 			
 			
-#line 4481 "ncoTree.cpp"
+#line 4483 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4494,12 +4496,12 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
  RefAST  ncoTree::att2var(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2866 "ncoGrammer.g"
+#line 2904 "ncoGrammer.g"
 	 RefAST tr ;
-#line 4500 "ncoTree.cpp"
+#line 4502 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST att2var_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST att = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2866 "ncoGrammer.g"
+#line 2904 "ncoGrammer.g"
 	
 	var_sct *var=NULL_CEWI; 
 	NcapVar *Nvar;
@@ -4508,7 +4510,7 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 	std::string fnc_nm("att2var");
 	
 	
-#line 4512 "ncoTree.cpp"
+#line 4514 "ncoTree.cpp"
 	
 	try {      // for error handling
 		{
@@ -4517,7 +4519,7 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		_t = _t->getNextSibling();
 		}
 		if ( inputState->guessing==0 ) {
-#line 2877 "ncoGrammer.g"
+#line 2915 "ncoGrammer.g"
 			
 			/* sn can be empty on 1st Parse but not 2nd */
 			att_nm=att->getText();
@@ -4546,7 +4548,7 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			tr->setText(sn);
 			
 			
-#line 4550 "ncoTree.cpp"
+#line 4552 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4563,17 +4565,17 @@ var_sct * ncoTree::att_plain(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 }
 
 var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 2909 "ncoGrammer.g"
+#line 2947 "ncoGrammer.g"
 	var_sct *var;
-#line 4569 "ncoTree.cpp"
+#line 4571 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST value_list_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
 	ANTLR_USE_NAMESPACE(antlr)RefAST vlst = ANTLR_USE_NAMESPACE(antlr)nullAST;
-#line 2909 "ncoGrammer.g"
+#line 2947 "ncoGrammer.g"
 	
 	const std::string fnc_nm("value_list");
 	var=NULL_CEWI; 
 	
-#line 4577 "ncoTree.cpp"
+#line 4579 "ncoTree.cpp"
 	
 	try {      // for error handling
 		{
@@ -4582,7 +4584,7 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		_t = _t->getNextSibling();
 		}
 		if ( inputState->guessing==0 ) {
-#line 2914 "ncoGrammer.g"
+#line 2952 "ncoGrammer.g"
 			
 			
 			char *cp;
@@ -4670,7 +4672,7 @@ var_sct * ncoTree::value_list(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			var=var_ret;
 			
 			
-#line 4674 "ncoTree.cpp"
+#line 4676 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4689,20 +4691,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 3005 "ncoGrammer.g"
+#line 3043 "ncoGrammer.g"
 	var_sct *var;
-#line 4695 "ncoTree.cpp"
+#line 4697 "ncoTree.cpp"
 	ANTLR_USE_NAMESPACE(antlr)RefAST value_list_string_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
-#line 3005 "ncoGrammer.g"
+#line 3043 "ncoGrammer.g"
 	
 	const std::string fnc_nm("value_list_string");
 	var=NULL_CEWI; 
 	
-#line 4702 "ncoTree.cpp"
+#line 4704 "ncoTree.cpp"
 	
 	try {      // for error handling
 		if ( inputState->guessing==0 ) {
-#line 3011 "ncoGrammer.g"
+#line 3049 "ncoGrammer.g"
 			
 			int idx;
 			int nbr_lst;
@@ -4751,7 +4753,7 @@ var_sct * ncoTree::value_list_string(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			end_val: var=var_ret;
 			
 			
-#line 4755 "ncoTree.cpp"
+#line 4757 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4770,18 +4772,18 @@ 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 3062 "ncoGrammer.g"
+#line 3100 "ncoGrammer.g"
 	bool bret=false;
-#line 4776 "ncoTree.cpp"
+#line 4778 "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 3062 "ncoGrammer.g"
+#line 3100 "ncoGrammer.g"
 	
 	const std::string fnc_nm("where_assign");
 	var_sct *var_rhs;
 	
 	
-#line 4785 "ncoTree.cpp"
+#line 4787 "ncoTree.cpp"
 	
 	try {      // for error handling
 		ANTLR_USE_NAMESPACE(antlr)RefAST __t434 = _t;
@@ -4802,7 +4804,7 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 		_t = __t434;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3068 "ncoGrammer.g"
+#line 3106 "ncoGrammer.g"
 			
 			
 			bool bfr=false;
@@ -4904,7 +4906,7 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 			prs_arg->ncap_var_write(var_lhs,false);
 			bret=true;
 			
-#line 4908 "ncoTree.cpp"
+#line 4910 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -4921,18 +4923,18 @@ bool  ncoTree::where_assign(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 }
 
 var_sct * ncoTree::var_lmt_one(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
-#line 3173 "ncoGrammer.g"
+#line 3211 "ncoGrammer.g"
 	var_sct *var;
-#line 4927 "ncoTree.cpp"
+#line 4929 "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 3173 "ncoGrammer.g"
+#line 3211 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt_one");
 	var=NULL_CEWI; 
 	var_sct *var_nbr;
 	
-#line 4936 "ncoTree.cpp"
+#line 4938 "ncoTree.cpp"
 	
 	try {      // for error handling
 		ANTLR_USE_NAMESPACE(antlr)RefAST __t437 = _t;
@@ -4956,7 +4958,7 @@ var_sct * ncoTree::var_lmt_one(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		_t = __t437;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3179 "ncoGrammer.g"
+#line 3217 "ncoGrammer.g"
 			
 			
 			int idx;
@@ -5057,7 +5059,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 5061 "ncoTree.cpp"
+#line 5063 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -5076,18 +5078,18 @@ 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 3284 "ncoGrammer.g"
+#line 3322 "ncoGrammer.g"
 	var_sct *var;
-#line 5082 "ncoTree.cpp"
+#line 5084 "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 3284 "ncoGrammer.g"
+#line 3322 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt_one_lhs");
 	var=NULL_CEWI; 
 	var_sct *var_nbr;
 	
-#line 5091 "ncoTree.cpp"
+#line 5093 "ncoTree.cpp"
 	
 	try {      // for error handling
 		ANTLR_USE_NAMESPACE(antlr)RefAST __t441 = _t;
@@ -5111,7 +5113,7 @@ var_sct * ncoTree::var_lmt_one_lhs(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
 		_t = __t441;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3290 "ncoGrammer.g"
+#line 3328 "ncoGrammer.g"
 			
 			int idx; 
 			int var_id; 
@@ -5256,7 +5258,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 5260 "ncoTree.cpp"
+#line 5262 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@@ -5273,18 +5275,18 @@ 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 3438 "ncoGrammer.g"
+#line 3476 "ncoGrammer.g"
 	var_sct *var;
-#line 5279 "ncoTree.cpp"
+#line 5281 "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 3438 "ncoGrammer.g"
+#line 3476 "ncoGrammer.g"
 	
 	const std::string fnc_nm("var_lmt");
 	var=NULL_CEWI; 
 	
-#line 5288 "ncoTree.cpp"
+#line 5290 "ncoTree.cpp"
 	
 	try {      // for error handling
 		ANTLR_USE_NAMESPACE(antlr)RefAST __t445 = _t;
@@ -5297,7 +5299,7 @@ var_sct * ncoTree::var_lmt(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 		_t = __t445;
 		_t = _t->getNextSibling();
 		if ( inputState->guessing==0 ) {
-#line 3443 "ncoGrammer.g"
+#line 3481 "ncoGrammer.g"
 			
 			bool bram;   // Check for a RAM variable
 			bool bnrm;
@@ -5538,7 +5540,7 @@ var_sct * ncoTree::var_lmt(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
 			
 			end2: var_rhs=nco_var_free(var_rhs); 
 			
-#line 5542 "ncoTree.cpp"
+#line 5544 "ncoTree.cpp"
 		}
 	}
 	catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
diff --git a/src/nco++/ncoTree.hpp b/src/nco++/ncoTree.hpp
index b114adb..15b3237 100644
--- a/src/nco++/ncoTree.hpp
+++ b/src/nco++/ncoTree.hpp
@@ -3,7 +3,7 @@
 
 #include <antlr/config.hpp>
 #include "ncoParserTokenTypes.hpp"
-/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoTree.hpp"$ */
+/* $ANTLR 2.7.7 (2006-11-01): "ncoGrammer.g" -> "ncoTree.hpp"$ */
 #include <antlr/TreeParser.hpp>
 
 #line 1 "ncoGrammer.g"
@@ -104,7 +104,8 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
       nbr_dmn=lmt_peek(aRef);      
       //nbr_dmn=lRef->getNumberOfChildren();
 
-      for(idx=0 ; idx < nbr_dmn ; idx++){
+      for(idx=0 ; idx < nbr_dmn ; idx++)
+      {
          hyp.ind[0]=ANTLR_USE_NAMESPACE(antlr)nullAST;
          hyp.ind[1]=ANTLR_USE_NAMESPACE(antlr)nullAST;
          hyp.ind[2]=ANTLR_USE_NAMESPACE(antlr)nullAST;
@@ -112,19 +113,22 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
        if(lRef->getType()!=LMT) 
             return 0;
        
-        eRef=lRef->getFirstChild();
-        nbr_cln=0;
+       eRef=lRef->getFirstChild();
+       nbr_cln=0;
         
-       while(eRef) {
-          if(eRef->getType() == COLON){
+       while(eRef) 
+       {
+          if(eRef->getType() == COLON)
+          {
             cRef=eRef;        
             nbr_cln++;
           }
            eRef=eRef->getNextSibling();
         }
       
-      // Initialise  to default markers
-       switch(nbr_cln) {
+       // Initialise  to default markers
+       switch(nbr_cln) 
+       {
           case 0: 
              break;
                 
@@ -142,9 +146,11 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
         }
 
        eRef=lRef->getFirstChild();
+
        // point inidices to any expressions that exist
-        nbr_cln=0;
-       while(eRef) {
+       nbr_cln=0;
+       while(eRef) 
+       {
           if(eRef->getType() == COLON) 
              nbr_cln++; 
            else   
@@ -154,9 +160,10 @@ vector<ast_lmt_sct> &ast_lmt_vtr)
        }
        // save indices 
        ast_lmt_vtr.push_back(hyp);
-
        lRef=lRef->getNextSibling();
-     }
+
+      }
+
      return nbr_dmn;
 } 
 
@@ -166,10 +173,10 @@ int nbr_dmn,
 RefAST lmt,
 NcapVector<lmt_sct*> &lmt_vtr ) 
 {
-	int idx;
-	int jdx;
-	int sz;   
-    int dmn_sz;     
+	long idx;
+	long jdx;
+	long sz;   
+    long dmn_sz;     
     ptr_unn op1;
 	var_sct *var;
 	std::string fnc_nm="lmt_var_mk"; 
@@ -178,11 +185,13 @@ NcapVector<lmt_sct*> &lmt_vtr )
 	// calculate variables
 	var=out(lmt->getFirstChild()->getFirstChild());
 	// convert result to type int
-	var=nco_var_cnf_typ(NC_UINT64,var);    
-	(void)cast_void_nctype((nc_type)NC_UINT64,&var->val);
+	var=nco_var_cnf_typ(NC_INT64,var);    
+	(void)cast_void_nctype((nc_type)NC_INT64,&var->val);
 	sz=var->sz;
 	dmn_sz=var->sz / nbr_dmn;
     
+    if(nco_dbg_lvl_get() >= nco_dbg_scl)
+       dbg_prn("lmt_var_mk","using hyperslab indices from a single var"); 
 
     // shape of var must be (nbr_dmn) or (nbr_dmn,2) or (nbr_dmn,3) 
     if( dmn_sz * nbr_dmn != sz )
@@ -214,18 +223,18 @@ NcapVector<lmt_sct*> &lmt_vtr )
        for(jdx=0;jdx<dmn_sz;jdx++)
 		{     
 		  
-         nco_uint64 uival= var->val.ui64p[idx+jdx];
+         nco_int64 ival= var->val.i64p[idx+jdx];
          switch(jdx){
            case 0: 
              lmt_ptr->is_usr_spc_min=True;
-             lmt_ptr->srt=uival;
+             lmt_ptr->srt=ival;
              break;
            case 1: //end
              lmt_ptr->is_usr_spc_max=True;
-             lmt_ptr->end=uival;             break;
+             lmt_ptr->end=ival;             break;
            case 2: //srd
              lmt_ptr->srd_sng=strdup("~fill_in");
-             lmt_ptr->srd=uival;
+             lmt_ptr->srd=ival;
              break;			
 	       }
 
@@ -240,7 +249,7 @@ NcapVector<lmt_sct*> &lmt_vtr )
        lmt_vtr.push_back(lmt_ptr);		
 	}
 	 
-	cast_nctype_void((nc_type)NC_UINT64,&var->val);
+	cast_nctype_void((nc_type)NC_INT64,&var->val);
 	var=nco_var_free(var);  
 	
    return true;
@@ -259,6 +268,8 @@ NcapVector<lmt_sct*> &lmt_vtr )
 int idx;
 int jdx;
 int sz;
+long ldx=0L;
+var_sct *var_out;
 lmt_sct *lmt_ptr;
 RefAST aRef;
 vector<ast_lmt_sct> ast_lmt_vtr;
@@ -278,59 +289,81 @@ if( nbr_dmn!=lmt_init(lmt,ast_lmt_vtr) )
 
   for(idx=0 ; idx <nbr_dmn ; idx++){
 
-     // fill out lmt structure
-     // use same logic as nco_lmt_prs 
-     lmt_ptr=(lmt_sct*)nco_calloc((size_t)1,sizeof(lmt_sct));
-     lmt_ptr->nm=NULL;
-     //lmt_ptr->lmt_typ=-1;
-     lmt_ptr->is_usr_spc_lmt=True; /* True if any part of limit is user-specified, else False */
-     lmt_ptr->min_sng=NULL;
-     lmt_ptr->max_sng=NULL;
-     lmt_ptr->srd_sng=NULL;
-     lmt_ptr->is_usr_spc_min=False;
-     lmt_ptr->is_usr_spc_max=False;
-     /* 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 */
-
-    for(jdx=0 ; jdx <3 ; jdx++){
-      long ldx=0L;
-      var_sct *var_out;
+    // fill out lmt structure
+    // use same logic as nco_lmt_prs 
+    lmt_ptr=(lmt_sct*)nco_calloc((size_t)1,sizeof(lmt_sct));
+    lmt_ptr->nm=NULL;
+    //lmt_ptr->lmt_typ=-1;
+    lmt_ptr->is_usr_spc_lmt=True; /* True if any part of limit is user-specified, else False */
+    lmt_ptr->min_sng=NULL;
+    lmt_ptr->max_sng=NULL;
+    lmt_ptr->srd_sng=NULL;
+    lmt_ptr->is_usr_spc_min=False;
+    lmt_ptr->is_usr_spc_max=False;
+    /* 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 */
+
+    // for a var limit  with a single index (or var) -(1D or nD) this case is handled by lmt_var_mk
+    //  we are here when  there is a single index for one of an nD specification
+    // a single limit mean a single index -by the parser this is 
+    // guaranteed to be non null  (that is ast_lmt_vtr[idx].ind[0] not null) 
+    if( ast_lmt_vtr[idx].ind[1]==ANTLR_USE_NAMESPACE(antlr)nullAST)
+    {  
+      var_out=out( ast_lmt_vtr[idx].ind[0] );
+      // convert result to type int
+      var_out=nco_var_cnf_typ(NC_INT64,var_out);    
+      (void)cast_void_nctype((nc_type)NC_INT64,&var_out->val);
+      // only interested in the first value.
+      ldx=var_out->val.i64p[0];
+      var_out=nco_var_free(var_out);
+
+      lmt_ptr->is_usr_spc_min=True;
+      lmt_ptr->srt=ldx;
+            
+      lmt_ptr->is_usr_spc_max=True;
+      lmt_ptr->end=ldx; 
+
+    } 
+    else 
+
+    for(jdx=0 ; jdx <3 ; jdx++)
+    {
 
       aRef=ast_lmt_vtr[idx].ind[jdx];
 
-      if(aRef && aRef->getType() != COLON ){
-        // Calculate number using out()
-        var_out=out(aRef);
-        // convert result to type int
-        var_out=nco_var_cnf_typ(NC_INT,var_out);    
-        (void)cast_void_nctype((nc_type)NC_INT,&var_out->val);
+      if(!aRef || aRef->getType() == COLON)
+        continue;
+
+      // Calculate number using out()
+      var_out=out(aRef);
+      // convert result to type int
+      var_out=nco_var_cnf_typ(NC_INT64,var_out);    
+      (void)cast_void_nctype((nc_type)NC_INT64,&var_out->val);
          // only interested in the first value.
-        ldx=var_out->val.ip[0];
-        var_out=nco_var_free(var_out);
-        
-        // switch jdx 0-srt,1-end,2-srd
-        switch(jdx){
+      ldx=var_out->val.i64p[0];
+      var_out=nco_var_free(var_out);
+
+      // switch jdx 0-srt,1-end,2-srd
+      switch(jdx)
+      {
+          //srt
           case 0: 
-             lmt_ptr->is_usr_spc_min=True;
-             lmt_ptr->srt=ldx;
-             break;
-          case 1: //end
-             lmt_ptr->is_usr_spc_max=True;
-             lmt_ptr->end=ldx;
-             break;
-          case 2: //srd
-             lmt_ptr->srd_sng=strdup("~fill_in");
-             lmt_ptr->srd=ldx;         
-             break;
-        }
+              lmt_ptr->is_usr_spc_min=True;
+              lmt_ptr->srt=ldx;
+              break;
+          // end
+          case 1: 
+              lmt_ptr->is_usr_spc_max=True;
+              lmt_ptr->end=ldx;
+              break;
+          //srd 
+          case 2: 
+              lmt_ptr->srd_sng=strdup("~fill_in");
+              lmt_ptr->srd=ldx;         
+              break;
       }
-    }// end jdx
-         
-    /* need to deal with situation where only start is defined -- ie picking only a single value */
-    if( lmt_ptr->is_usr_spc_min==True && lmt_ptr->is_usr_spc_max==False && lmt_ptr->srd_sng==NULL){
-        lmt_ptr->is_usr_spc_max=True;
-        lmt_ptr->end=lmt_ptr->srt; 
-    }    
+
+    }  
 
     lmt_vtr.push_back(lmt_ptr);
   } // end idx
diff --git a/src/nco/Makefile.am b/src/nco/Makefile.am
index 468188e..61f1f08 100644
--- a/src/nco/Makefile.am
+++ b/src/nco/Makefile.am
@@ -130,6 +130,7 @@ nco_var_utl.h
 lib_LTLIBRARIES = libnco.la
 
 # This creates version-stamped shared-library, e.g., libnco-2.9.4.so
+# NB: VERSION here refers to argument to AC_INIT() in configure.ac
 libnco_la_LDFLAGS = -release @VERSION@
 
 # Fedora Core nco.spec in nco-3.1.2 wants to install headers
diff --git a/src/nco/Makefile.in b/src/nco/Makefile.in
index b561d0f..76f30f4 100644
--- a/src/nco/Makefile.in
+++ b/src/nco/Makefile.in
@@ -574,6 +574,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
@@ -756,6 +757,7 @@ nco_var_utl.h
 lib_LTLIBRARIES = libnco.la
 
 # This creates version-stamped shared-library, e.g., libnco-2.9.4.so
+# NB: VERSION here refers to argument to AC_INIT() in configure.ac
 libnco_la_LDFLAGS = -release @VERSION@
 
 # Fedora Core nco.spec in nco-3.1.2 wants to install headers
diff --git a/src/nco/ncflint.c b/src/nco/ncflint.c
index 5b4dd45..c089988 100644
--- a/src/nco/ncflint.c
+++ b/src/nco/ncflint.c
@@ -33,8 +33,7 @@
    ncflint -O -w 0.66666,0.33333 -v lcl_time_hr /data/zender/arese/clm/951030_0800_arese_clm.nc /data/zender/arese/clm/951030_1100_arese_clm.nc ~/foo.nc; ncks -H ~/foo.nc
    ncflint -O -w 0.66666 -v lcl_time_hr /data/zender/arese/clm/951030_0800_arese_clm.nc /data/zender/arese/clm/951030_1100_arese_clm.nc ~/foo.nc; ncks -H ~/foo.nc
 
-   ncdiff -O ~/foo.nc /data/zender/arese/clm/951030_0900_arese_clm.nc foo2.nc;ncks -H foo2.nc | m
- */
+   ncdiff -O ~/foo.nc /data/zender/arese/clm/951030_0900_arese_clm.nc foo2.nc;ncks -H foo2.nc | m */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h> /* Autotools tokens */
@@ -104,6 +103,7 @@ main(int argc,char **argv)
   nco_bool HISTORY_APPEND=True; /* Option h */
   nco_bool MSA_USR_RDR=False; /* [flg] Multi-Slab Algorithm returns hyperslabs in user-specified order*/
   nco_bool MUST_CONFORM=False; /* Must nco_var_cnf_dmn() find truly conforming variables? */
+  nco_bool NRM_WGT=False; /* [flg] Normalize input weights so w1:=w1/(w1+w2), w2:=w2/(w1+w2) */
   nco_bool RAM_CREATE=False; /* [flg] Create file in RAM */
   nco_bool RAM_OPEN=False; /* [flg] Open (netCDF3-only) file(s) in RAM */
   nco_bool RM_RMT_FL_PST_PRC=True; /* Option R */
@@ -137,7 +137,7 @@ main(int argc,char **argv)
 
   const char * const CVS_Id="$Id$"; 
   const char * const CVS_Revision="$Revision$";
-  const char * const opt_sht_lst="3467ACcD:d:Fg:G:hi:L:l:Oo:p:rRt:v:X:xw:-:";
+  const char * const opt_sht_lst="3467ACcD:d:Fg:G:hi:L:l:NOo:p:rRt:v:X:xw:-:";
 
   cnk_sct cnk; /* [sct] Chunking structure */
 
@@ -310,6 +310,8 @@ main(int argc,char **argv)
     {"deflate",required_argument,0,'L'}, /* [enm] Deflate level */
     {"local",required_argument,0,'l'},
     {"lcl",required_argument,0,'l'},
+    {"nrm",no_argument,0,'N'}, /* [flg] Normalize input weights so w1:=w1/(w1+w2), w2:=w2/(w1+w2) */
+    {"normalize",no_argument,0,'N'}, /* [flg] Normalize input weights so w1:=w1/(w1+w2), w2:=w2/(w1+w2) */
     {"overwrite",no_argument,0,'O'},
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
@@ -494,6 +496,9 @@ main(int argc,char **argv)
     case 'l': /* Local path prefix for files retrieved from remote file system */
       fl_pth_lcl=(char *)strdup(optarg);
       break;
+    case 'N': /* Toggle NRM_WGT */
+      NRM_WGT=!NRM_WGT;
+      break;
     case 'O': /* Toggle FORCE_OVERWRITE */
       FORCE_OVERWRITE=!FORCE_OVERWRITE;
       break;
@@ -758,6 +763,11 @@ main(int argc,char **argv)
   } /* end if CMD_LN_NTP_VAR */
 
   if(CMD_LN_NTP_WGT){
+    if(NRM_WGT){
+      /* Normalize input weights so w1:=w1/(w1+w2), w2:=w2/(w1+w2) */
+      wgt_val_1=wgt_val_1/(wgt_val_1+wgt_val_2);
+      wgt_val_2=wgt_val_2/(wgt_val_1+wgt_val_2);
+    } /* !NRM_WGT */
     val_gnr_unn.d=wgt_val_1; /* Generic container for arrival point or weight */
     wgt_1=scl_mk_var(val_gnr_unn,NC_DOUBLE);
     val_gnr_unn.d=wgt_val_2; /* Generic container for arrival point or weight */
diff --git a/src/nco/ncks.c b/src/nco/ncks.c
index 2ec8c03..721102c 100644
--- a/src/nco/ncks.c
+++ b/src/nco/ncks.c
@@ -592,7 +592,14 @@ main(int argc,char **argv)
 	sld_nfo=(kvm_sct *)nco_malloc(BUFSIZ*sizeof(kvm_sct));
         nco_scrip_read(fl_scrip,sld_nfo);
       } /* endif "scrip" */
-      if(!strcmp(opt_crr,"mk_rec_dmn") || !strcmp(opt_crr,"mk_rec_dim")) rec_dmn_nm=strdup(optarg);
+      if(!strcmp(opt_crr,"mk_rec_dmn") || !strcmp(opt_crr,"mk_rec_dim")){
+	if(strchr(optarg,',')){
+	  (void)fprintf(stdout,"%s: ERROR record dimension name %s contains a comma and appears to be a list\n",nco_prg_nm_get(),optarg);
+	  (void)fprintf(stdout,"%s: HINT --mk_rec_dmn currently accepts only one dimension name as an argument (relaxing this limit is TODO nco1129, let us know if this is important to you). To change multiple dimensions into record dimensions, run ncks multiple times and change one dimension each time. Be sure the output file format is netCDF4.\n",nco_prg_nm_get());
+	  nco_exit(EXIT_FAILURE);
+	} /* endif */
+	rec_dmn_nm=strdup(optarg);
+      } /* !mk_rec_dmn */
       if(!strcmp(opt_crr,"mpi_implementation")){
         (void)fprintf(stdout,"%s\n",nco_mpi_get());
         nco_exit(EXIT_SUCCESS);
diff --git a/src/nco/nco.h b/src/nco/nco.h
index 088ad56..8bd5551 100644
--- a/src/nco/nco.h
+++ b/src/nco/nco.h
@@ -319,17 +319,17 @@ extern "C" {
 # define NCO_VERSION_MINOR 6
 #endif /* !NCO_VERSION_MINOR */
 #ifndef NCO_VERSION_PATCH
-# define NCO_VERSION_PATCH 0
+# define NCO_VERSION_PATCH 1
 #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 */
+# define NCO_VERSION_NOTE "" /* Blank for final versions, non-blank (e.g., "beta37") for pre-release versions */
 #endif /* !NCO_VERSION_NOTE */
 #ifndef NCO_LIB_VERSION
   /* Define NC_LIB_VERSION as three-digit number for arithmetic comparisons by CPP */
 # define NCO_LIB_VERSION ( NCO_VERSION_MAJOR * 100 + NCO_VERSION_MINOR * 10 + NCO_VERSION_PATCH )
 #endif /* !NCO_LIB_VERSION */
 #ifndef NCO_VERSION
-# define NCO_VERSION "4.6.0"
+# define NCO_VERSION "4.6.1"
 #endif /* !NCO_VERSION */
 
 /* Compatibility tokens new to netCDF4 netcdf.h: */
diff --git a/src/nco/nco_att_utl.c b/src/nco/nco_att_utl.c
index f019bd8..78b1122 100644
--- a/src/nco/nco_att_utl.c
+++ b/src/nco/nco_att_utl.c
@@ -38,6 +38,15 @@ nco_aed_prc_wrp /* [fnc] Expand regular expressions then pass attribute edits to
     return flg_chg; /* [flg] Attribute was altered */
   } /* !rx */
 
+  if(aed.att_nm && strpbrk(aed.att_nm,".*^$[]()<>+{}") && !strpbrk(aed.att_nm,"?|\\")){
+    /* If attribute name contains special character that could indicate regular expression,
+       and that could also be legal in a CDL name, and contains no characters that are illegal
+       in CDL names, then attempt attribute edit based on verbatim name string 
+       before attempting to expand regular expression. */
+    flg_chg|=nco_aed_prc(nc_id,var_id,aed);
+    if(flg_chg) return flg_chg; /* [flg] Attribute was altered */
+  } /* !rx */
+
   aed_sct aed_swp; /* [sct] Attribute-edit information */
   char **att_nm_lst;
   int att_idx;
@@ -146,7 +155,7 @@ nco_aed_prc_wrp /* [fnc] Expand regular expressions then pass attribute edits to
   if(att_nm_lst) att_nm_lst=nco_sng_lst_free(att_nm_lst,att_nbr);
 
   return flg_chg; /* [flg] Attribute was altered */
-} /* end nco_aed_prc() */
+} /* end nco_aed_prc_wrp() */
 
 nco_bool /* [flg] Attribute was changed */
 nco_aed_prc /* [fnc] Process single attribute edit for single variable */
@@ -1944,14 +1953,14 @@ nco_glb_att_add /* [fnc] Add global attributes */
     /* nco_sng2kvm() converts argument "--gaa one,two=3" into kvm.key="one,two" and kvm.val=3
        Then nco_lst_prs_2D() converts kvm.key into two items, "one" and "two", with the same value, 3 */
     if(kvm.key){
-      int att_idx; /* [idx] Index over qattribute names in current GAA argument */
+      int att_idx; /* [idx] Index over attribute names in current GAA argument */
       int att_nbr; /* [nbr] Number of attribute names in current GAA argument */
       char **att_lst;
       att_lst=nco_lst_prs_2D(kvm.key,",",&att_nbr);
       for(att_idx=0;att_idx<att_nbr;att_idx++){ /* Expand multi-attribute-name specification */
         gaa_lst[gaa_nbr].key=strdup(att_lst[att_idx]);
-	/* 20160324: fxm: can next line break when kvm.val is NULL? */
-	gaa_lst[gaa_nbr].val=strdup(kvm.val);
+	/* 20160714: Allow for empty arguments by only using strdup() on non-NULL pointers */
+	gaa_lst[gaa_nbr].val= kvm.val ? strdup(kvm.val) : NULL;
         gaa_nbr++;
       } /* end for */
       att_lst=nco_sng_lst_free(att_lst,att_nbr);
diff --git a/src/nco/nco_cnk.c b/src/nco/nco_cnk.c
index 417f9a8..76ca347 100644
--- a/src/nco/nco_cnk.c
+++ b/src/nco/nco_cnk.c
@@ -349,24 +349,34 @@ nco_cnk_map_get /* [fnc] Convert user-specified chunking map to key */
 
   if(!strcmp(nco_cnk_map_sng,"nil")) return nco_cnk_map_nil;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_nil")) return nco_cnk_map_nil;
+  if(!strcmp(nco_cnk_map_sng,"map_nil")) return nco_cnk_map_nil;
   if(!strcmp(nco_cnk_map_sng,"dmn")) return nco_cnk_map_dmn;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_dmn")) return nco_cnk_map_dmn;
+  if(!strcmp(nco_cnk_map_sng,"map_dmn")) return nco_cnk_map_dmn;
   if(!strcmp(nco_cnk_map_sng,"rd1")) return nco_cnk_map_rd1;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_rd1")) return nco_cnk_map_rd1;
+  if(!strcmp(nco_cnk_map_sng,"map_rd1")) return nco_cnk_map_rd1;
   if(!strcmp(nco_cnk_map_sng,"scl")) return nco_cnk_map_scl;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_scl")) return nco_cnk_map_scl;
+  if(!strcmp(nco_cnk_map_sng,"map_scl")) return nco_cnk_map_scl;
   if(!strcmp(nco_cnk_map_sng,"prd")) return nco_cnk_map_prd;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_prd")) return nco_cnk_map_prd;
+  if(!strcmp(nco_cnk_map_sng,"map_prd")) return nco_cnk_map_prd;
   if(!strcmp(nco_cnk_map_sng,"lfp")) return nco_cnk_map_lfp;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_lfp")) return nco_cnk_map_lfp;
+  if(!strcmp(nco_cnk_map_sng,"map_lfp")) return nco_cnk_map_lfp;
   if(!strcmp(nco_cnk_map_sng,"xst")) return nco_cnk_map_xst;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_xst")) return nco_cnk_map_xst;
+  if(!strcmp(nco_cnk_map_sng,"map_xst")) return nco_cnk_map_xst;
   if(!strcmp(nco_cnk_map_sng,"rew")) return nco_cnk_map_rew;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_rew")) return nco_cnk_map_rew;
+  if(!strcmp(nco_cnk_map_sng,"map_rew")) return nco_cnk_map_rew;
   if(!strcmp(nco_cnk_map_sng,"nc4")) return nco_cnk_map_nc4;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_nc4")) return nco_cnk_map_nc4;
+  if(!strcmp(nco_cnk_map_sng,"map_nc4")) return nco_cnk_map_nc4;
   if(!strcmp(nco_cnk_map_sng,"nco")) return nco_cnk_map_nco;
   if(!strcmp(nco_cnk_map_sng,"cnk_map_nco")) return nco_cnk_map_nco;
+  if(!strcmp(nco_cnk_map_sng,"map_nco")) return nco_cnk_map_nco;
 
   (void)fprintf(stderr,"%s: ERROR %s reports unknown user-specified chunking map %s\n",nco_prg_nm_get(),fnc_nm,nco_cnk_map_sng);
   nco_exit(EXIT_FAILURE);
@@ -1115,8 +1125,6 @@ nco_cnk_sz_set_trv /* [fnc] Set chunksize parameters (GTT version of nco_cnk_sz_
 
   } /* end loop over dimensions */
 
-  //cnk_map_lfp: /* end goto */
-
   if(cnk_map == nco_cnk_map_lfp ||
      (cnk_plc == nco_cnk_plc_nco && dmn_nbr != 3) ||
      (cnk_map == nco_cnk_map_rew && dmn_nbr != 3)){
@@ -1157,8 +1165,6 @@ nco_cnk_sz_set_trv /* [fnc] Set chunksize parameters (GTT version of nco_cnk_sz_
     goto cnk_xpl_override;
   } /* !nco_cnk_map_lfp */
 
-  //cnk_map_rew: /* end goto */
-
   /* Apply Rew only to 3-D variables */
   if(cnk_map == nco_cnk_map_rew && dmn_nbr != 3) goto cnk_xpl_override;
 
@@ -1295,7 +1301,6 @@ nco_cnk_sz_set_trv /* [fnc] Set chunksize parameters (GTT version of nco_cnk_sz_
   } /* !nco_cnk_map_rew */
 
   /* Uniform override */
-  // cnk_unf_override: /* end goto */
 
   /* Override "reasonable" defaults with explicitly set uniform scalar chunksize, if any */
   if(cnk_sz_dfl > 0UL){
diff --git a/src/nco/nco_ctl.c b/src/nco/nco_ctl.c
index 54a52d6..c914a05 100644
--- a/src/nco/nco_ctl.c
+++ b/src/nco/nco_ctl.c
@@ -843,7 +843,7 @@ nco_nmn_get(void) /* [fnc] Return mnemonic that describes current NCO version */
 { 
   /* Purpose: Return mnemonic describing current NCO version
      Always include terminal \n so mnemonic does not dangle */
-  return "AP Lang\n";
+  return "Rio\n";
 } /* end nco_nmn_get() */
 
 char * /* O [sng] nm_in stripped of any path (i.e., program name stub) */ 
@@ -954,41 +954,41 @@ nco_usg_prn(void)
 
   switch(prg_lcl){
   case ncap:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-F] [-f] [--fl_fmt fmt] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [-R] [-r] [--ram_all] [-s algebra] [-S fl.nco] [-t thr_nbr] [-v] in.nc [out.nc]\n");
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl lmn] [-D nco_dbg_lvl] [-F] [-f] [--fl_fmt fmt] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [-R] [-r] [--ram_all] [-s algebra] [-S fl.nco] [-t thr_nbr] [-v] in.nc [out.nc]\n");
     break;
   case ncatted:
-    opt_sng=(char *)strdup("[-a ...] [--bfr sz] [-D nco_dbg_lvl] [--glb ...] [-h] [--hdr_pad nbr] [-l path] [-O] [-o out.nc] [-p path] [-R] [-r] [-t] in.nc [[out.nc]]\n");
+    opt_sng=(char *)strdup("[-a ...] [--bfr byt] [-D nco_dbg_lvl] [--glb ...] [-h] [--hdr_pad nbr] [-l path] [-O] [-o out.nc] [-p path] [-R] [-r] [-t] in.nc [[out.nc]]\n");
     break;
   case ncbo:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--msa] [-n ...] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [-R] [-r] [--ram_all] [-t thr_nbr] [--unn] [-v ...] [-X box] [-x] [-y op_typ] in_1.nc in_2.nc [out.nc]\n");
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--msa] [-n ...] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [-R] [-r] [--ram_all] [-t thr_nbr] [--unn] [-v ...] [-X box] [-x] [-y op_typ] in_1.nc in_2.nc [out.nc]\n");
     break;
   case ncflint:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_crd] [--fl_fmt fmt] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-i var,val] [-L lvl] [-l path] [--msa] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [-v ...] [-X box] [-x] [-w wgt_1[,wgt_2]] in_1.nc in_2.nc [out.nc]\n");
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_crd] [--fl_fmt fmt] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-i var,val] [-L lvl] [-l path] [--msa] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [-v ...] [-X box] [-x] [-w wgt_1[,wgt_2]] in_1.nc in_2.nc [out.nc]\n");
     break;
   case ncks:
-    opt_sng=(char *)strdup("[-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b fl_bnr] [--bfr sz] [-C] [-c] [--cdl] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_dmn dim] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [--grp_xtr_var_xcl] [-H] [-h] [--hdn] [--hdr_pad nbr] [-L lvl] [-l path] [-M] [-m] [--map map.nc] [--md5_dgs] [--md5_wrt] [--mk_rec_dmn dim] [--msa] [--no_blank] [--no_tmp_fl] [-O] [-o out.nc] [...]
+    opt_sng=(char *)strdup("[-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b fl_bnr] [--bfr byt] [-C] [-c] [--cdl] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_dmn dim] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [--grp_xtr_var_xcl] [-H] [-h] [--hdn] [--hdr_pad nbr] [-L lvl] [-l path] [-M] [-m] [--map map.nc] [--md5_dgs] [--md5_wrt] [--mk_rec_dmn dim] [--msa] [--no_blank] [--no_tmp_fl] [-O] [-o out. [...]
     break;
   case ncpdq:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [-a ...] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [-M pck_map] [--mrd] [--msa] [--no_tmp_fl] [-O] [-o out.nc] [-P pck_plc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [--unn] [-U] [-v ...] [-X box] [-x] in.nc [out.nc]\n");
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [-a ...] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [-M pck_map] [--mrd] [--msa] [--no_tmp_fl] [-O] [-o out.nc] [-P pck_plc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [--unn] [-U] [-v ...] [-X box] [-x] in.nc [out.nc]\n");
     break;
   case ncra:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr sz] [-C] [-c] [--cb] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...]  [--dbl|flt] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-H] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--mro] [--msa] [-N] [-n ...] [--no_cll_mth] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [--rec_apn] [-t thr_nbr] [--unn] [-w wgt] [-v ... [...]
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cb] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...]  [--dbl|flt] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-H] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--mro] [--msa] [-N] [-n ...] [--no_cll_mth] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [--rec_apn] [-t thr_nbr] [--unn] [-w wgt] [-v  [...]
     break;
   case ncfe:
   case ncge:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...]  [--dbl|flt] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-H] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--msa] [-n ...] [--no_tmp_fl] [--nsm_fl] [--nsm_grp] [--nsm_sfx] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [--unn] [-v ...] [-X box] [-x] [-y o [...]
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...]  [--dbl|flt] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-H] [-h] [--hdf] [--hdr_pad nbr] [-L lvl] [-l path] [--msa] [-n ...] [--no_tmp_fl] [--nsm_fl] [--nsm_grp] [--nsm_sfx] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [--unn] [-v ...] [-X box] [-x] [- [...]
     break;
   case ncrcat:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-H] [-h] [--hdr_pad nbr] [-L lvl] [-l path] [--md5_digest] [--msa] [-n ...] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [--rec_apn] [-t thr_nbr] [--unn] [-v ...] [-X box] [-x] in.nc [...] [out.nc]\n");
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-H] [-h] [--hdr_pad nbr] [-L lvl] [-l path] [--md5_digest] [--msa] [-n ...] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [--rec_apn] [-t thr_nbr] [--unn] [-v ...] [-X box] [-x] in.nc [...] [out.nc]\n");
     break;
   case ncecat:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--gag] [--glb ...] [-H] [-h] [--hdr_pad nbr] [-L lvl] [-l path] [-M] [--md5_digest] [--mrd] [--msa] [-n ...] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [-u ulm_nm] [--unn] [-v ...] [-X box] [-x] in.nc [...] [ [...]
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--gag] [--glb ...] [-H] [-h] [--hdr_pad nbr] [-L lvl] [-l path] [-M] [--md5_digest] [--mrd] [--msa] [-n ...] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-t thr_nbr] [-u ulm_nm] [--unn] [-v ...] [-X box] [-x] in.nc [... [...]
     break;
   case ncrename:
-    opt_sng=(char *)strdup("[-a ...] [--bfr sz] [-D nco_dbg_lvl] [-d ...] [-g ...] [--glb ...] [-h] [--hdr_pad nbr] [-l path] [-O] [-o out.nc] [-p path] [-R] [-r] [-v ...] in.nc [[out.nc]]\n");
+    opt_sng=(char *)strdup("[-a ...] [--bfr byt] [-D nco_dbg_lvl] [-d ...] [-g ...] [--glb ...] [-h] [--hdr_pad nbr] [-l path] [-O] [-o out.nc] [-p path] [-R] [-r] [-v ...] in.nc [[out.nc]]\n");
     break;
   case ncwa:
-    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [-a ...] [-B mask_cond] [-b] [--bfr sz] [-C] [-c] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min min] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [--dbl|flt] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-I] [-L lvl] [-l path] [-m mask] [-M mask_val] [-N] [--no_cll_mth] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-T mask_comp] [-t thr_nbr] [ [...]
+    opt_sng=(char *)strdup("[-3] [-4] [-6] [-7] [-A] [-a ...] [-B mask_cond] [-b] [--bfr byt] [-C] [-c] [--cnk_byt byt] [--cnk_dmn nm,lmn] [--cnk_map map] [--cnk_min byt] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [--dbl|flt] [-F] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [--glb ...] [-h] [--hdf] [--hdr_pad nbr] [-I] [-L lvl] [-l path] [-m mask] [-M mask_val] [-N] [--no_cll_mth] [--no_tmp_fl] [-O] [-o out.nc] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [-T mask_comp] [-t thr_nbr [...]
     break;
   default: nco_dfl_case_prg_id_err(); break;
   } /* end switch */
@@ -1027,11 +1027,12 @@ nco_usg_prn(void)
   if(strstr(opt_sng,"[-c]")) (void)fprintf(stdout,"-c, --crd, --coords\tCoordinate variables will all be processed\n");
   if(strstr(opt_sng,"--cb")) (void)fprintf(stdout,"    --cb, --clm_bnd\tCF Climatology bounds will be processed (see also --c2b)\n");
   if(strstr(opt_sng,"--cdl")) (void)fprintf(stdout,"    --cdl\t\tPrint CDL (netCDF lingua franca used by ncdump/ncgen)\n");
-  if(strstr(opt_sng,"--cnk_dmn")) (void)fprintf(stdout,"    --cnk_dmn, --chunk_dimension nm,sz\tChunksize of dimension nm is sz\n");
-  if(strstr(opt_sng,"--cnk_map")) (void)fprintf(stdout,"    --cnk_map, --chunk_map map\t\tChunking map [dmn,lfp,prd,rd1,rew,scl,xpl,xst]\n");
-  if(strstr(opt_sng,"--cnk_min")) (void)fprintf(stdout,"    --cnk_min, --chunk_min min\t\tMinimum size [B] of variable to chunk\n");
+  if(strstr(opt_sng,"--cnk_byt")) (void)fprintf(stdout,"    --cnk_byt, --chunk_byte sz_byt\tChunksize in bytes\n");
+  if(strstr(opt_sng,"--cnk_dmn")) (void)fprintf(stdout,"    --cnk_dmn, --chunk_dimension nm,sz_lmn\tChunksize of dimension nm (in elements not bytes)\n");
+  if(strstr(opt_sng,"--cnk_map")) (void)fprintf(stdout,"    --cnk_map, --chunk_map map\t\tChunking map [dmn,lfp,nc4,nco,prd,rd1,rew,scl,xpl,xst]\n");
+  if(strstr(opt_sng,"--cnk_min")) (void)fprintf(stdout,"    --cnk_min, --chunk_min sz_byt\t\tMinimum size [B] of variable to chunk\n");
   if(strstr(opt_sng,"--cnk_plc")) (void)fprintf(stdout,"    --cnk_plc, --chunk_policy plc\tChunking policy [all,g2d,g3d,xpl,xst,uck]\n");
-  if(strstr(opt_sng,"--cnk_scl")) (void)fprintf(stdout,"    --cnk_scl, --chunk_scalar sz\tChunksize scalar (for all dimensions)\n");
+  if(strstr(opt_sng,"--cnk_scl")) (void)fprintf(stdout,"    --cnk_scl, --chunk_scalar sz_lmn\tChunksize scalar (in elements not bytes) (for all dimensions)\n");
   if(strstr(opt_sng,"[-D")) (void)fprintf(stdout,"-D, --dbg_lvl, --debug-level lvl\tDebug-level is lvl\n");
   if(strstr(opt_sng,"[-d")){
     if(prg_lcl == ncrename) (void)fprintf(stdout,"-d, --dmn, --dimension old_dim,new_dim Dimension's old and new names\n");
@@ -1088,6 +1089,7 @@ nco_usg_prn(void)
   if(strstr(opt_sng,"--mk_rec_dmn")) (void)fprintf(stdout,"    --mk_rec_dmn dim\tDefine dim as record dimension in output file\n");
   if(strstr(opt_sng,"--mro")) (void)fprintf(stdout,"    --mro\t\tMulti-Record Output\n");
   if(strstr(opt_sng,"[-N]")){
+    if(prg_lcl == ncflint) (void)fprintf(stdout,"-N, --nrm, --normalize\tNormalize input weights so w1:=w1/(w1+w2), w2:=w2/(w1+w2)\n");
     if(prg_lcl == ncwa) (void)fprintf(stdout,"-N, --nmr, --numerator\tNo normalization\n");
     if(prg_lcl == ncra || prg_lcl == ncfe || prg_lcl == ncge) (void)fprintf(stdout,"-N, --no_nrm_by_wgt\tNo normalization by weights\n");
   } /* !-N */
diff --git a/src/nco/nco_fl_utl.c b/src/nco/nco_fl_utl.c
index 59b9587..6b832c0 100644
--- a/src/nco/nco_fl_utl.c
+++ b/src/nco/nco_fl_utl.c
@@ -1175,7 +1175,11 @@ nco_fl_mv /* [fnc] Move first file to second */
   if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(stderr,"%s: INFO Moving %s to %s...",nco_prg_nm_get(),fl_src_cdl,fl_dst_cdl);
   (void)sprintf(cmd_mv,cmd_mv_fmt,fl_src_cdl,fl_dst_cdl);
   rcd_sys=system(cmd_mv);
-  if(rcd_sys == -1){
+  /* 20160802: Until today, failure was diagnosed iff rcd == -1
+     Unclear what rcd == -1 actually means to systems, because rcd == 0 always indicates success and
+     Linux rcd     > 0 indicates failure
+     MacOS BSD rcd > 0 indicates failure */
+  if(rcd_sys > 0){
     (void)fprintf(stdout,"%s: ERROR nco_fl_mv() unable to execute mv command \"%s\"\n",nco_prg_nm_get(),cmd_mv);
     nco_exit(EXIT_FAILURE);
   } /* end if */
diff --git a/src/nco/nco_grp_utl.c b/src/nco/nco_grp_utl.c
index 81fcd84..274a2ae 100644
--- a/src/nco/nco_grp_utl.c
+++ b/src/nco/nco_grp_utl.c
@@ -4103,9 +4103,9 @@ nco_var_fll_trv                       /* [fnc] Allocate variable structure and f
   } /* Check variable for duplicate dimensions */
 
   /* Treat variables associated with "bounds", "climatology", and "coordinates" attributes as coordinates */
-  if(nco_is_spc_in_bnd_att(var->nc_id,var->id)) var->is_crd_var=True;
-  if(nco_is_spc_in_clm_att(var->nc_id,var->id)) var->is_crd_var=True;
-  if(nco_is_spc_in_crd_att(var->nc_id,var->id)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id,"bounds",var->id)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id,"climatology",var->id)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id,"coordinates",var->id)) var->is_crd_var=True;
 
   /* Portions of variable structure depend on packing properties, e.g., typ_upk nco_pck_dsk_inq() fills in these portions harmlessly */
   (void)nco_pck_dsk_inq(grp_id,var);
@@ -4479,7 +4479,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 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);
+	      if(CRR_DMN_IS_REC_IN_INPUT && nco_dbg_lvl_get() >= nco_dbg_std) (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 */
 
@@ -5725,7 +5725,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 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);
+              if(CRR_DMN_IS_REC_IN_INPUT && nco_dbg_lvl_get() >= nco_dbg_std) (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 */
diff --git a/src/nco/nco_netcdf.c b/src/nco/nco_netcdf.c
index a9baa3e..0f01610 100644
--- a/src/nco/nco_netcdf.c
+++ b/src/nco/nco_netcdf.c
@@ -91,7 +91,7 @@ nco_err_exit /* [fnc] Print netCDF error message, routine name, then exit */
 #else /* !ENABLE_NETCDF4 */ 
      (void)fprintf(stdout,"Are your input files netCDF4 format?  (http://nco.sf.net/nco.html#fmt_inq shows how to tell.) If so then installing or re-building a netCDF4-compatible version of NCO should solve this problem. First upgrade netCDF to version 4.x, then install NCO using those netCDF 4.x libraries.\n2. NC_ENOTNC can occur when users attempt to utilize diskless (i.e., RAM) files.  In this case remove the diskless switches (e.g., --ram or --diskless) and then re-issue the command. \n"); 
 #endif /* !ENABLE_NETCDF4 */ 
-     (void)fprintf(stdout,"2. NCO attempts to utilize diskless (i.e., RAM) files.  In this case remove the diskless switches (e.g., --ram or --diskless) and then re-issue the command.\n3. NCO attempts to read other filetypes (HDF4, HDF-EOS2, pnetCDF) for which support must be (but was not) enabled at netCDF build-time. In this case it may be possible to access the input files using NCO if NCO is first re-linked to a version of netCDF configured with the --enable-hdf4 option. This is a no [...]
+     (void)fprintf(stdout,"2. NCO attempts to read other filetypes (HDF4, HDF-EOS2, pnetCDF) for which support must be (but was not) enabled at netCDF build-time. NCO can access HDF4 files if NCO is first re-linked to a version of netCDF configured with the --enable-hdf4 option. This is a non-standard netCDF build option described here: http://www.unidata.ucar.edu/software/netcdf/docs/build_hdf4.html. NCO can access pnetCDF files if NCO is first re-linked netCDF version 4.4.0 or later.\n [...]
   case NC_ERANGE: (void)fprintf(stdout,"ERROR NC_ERANGE Result not representable in output file\nHINT: NC_ERANGE errors typically occur after an arithmetic operation results in a value not representible by the output variable type when NCO attempts to write those values to an output file.  Possible workaround: Promote the variable to higher precision before attempting arithmetic.  For example,\nncap2 -O -s \'foo=double(foo);\' in.nc in.nc\nFor more details, see http://nco.sf.net/nco.html [...]
   case NC_EUNLIMIT: (void)fprintf(stdout,"ERROR NC_UNLIMIT NC_UNLIMITED size already in use\nHINT: NC_EUNLIMIT errors can occur when attempting to convert netCDF4 classic files that contain multiple record dimensions into a netCDF3 file that allows only one record dimension. In this case, try first fixing the excess record dimension(s) (with, e.g., ncks --fix_rec_dmn) and then convert to netCDF3. For more details, see http://nco.sf.net/nco.html#fix_rec_dmn\n"); break;
   case NC_EVARSIZE: (void)fprintf(stdout,"ERROR NC_EVARSIZE One or more variable sizes violate format constraints\nHINT: NC_EVARSIZE errors can occur when attempting to aggregate netCDF3 classic files together into outputs that exceed the capacity of the netCDF3 classic file format, e.g., a variable with size in excess of 2^31 bytes. In this case, try altering the output file type to netCDF3 classic with 64-bit offsets (with --64) or to netCDF4 (with -4). For more details, see http://nco [...]
diff --git a/src/nco/nco_ppc.c b/src/nco/nco_ppc.c
index d58aa8d..256a233 100644
--- a/src/nco/nco_ppc.c
+++ b/src/nco/nco_ppc.c
@@ -230,7 +230,7 @@ nco_ppc_set_dflt /* Set PPC value for all non-coordinate variables for --ppc def
 	int var_id;
 	nco_inq_grp_full_ncid(nc_id,trv_tbl->lst[idx_tbl].grp_nm_fll,&grp_id);
 	nco_inq_varid(grp_id,trv_tbl->lst[idx_tbl].nm,&var_id);
-	if(!nco_is_spc_in_bnd_att(grp_id,var_id) && !nco_is_spc_in_clm_att(grp_id,var_id) && !nco_is_spc_in_crd_att(grp_id,var_id)){
+	if(!nco_is_spc_in_cf_att(grp_id,"bounds",var_id) && !nco_is_spc_in_cf_att(grp_id,"climatology",var_id) && !nco_is_spc_in_cf_att(grp_id,"coordinates",var_id)){
 	  trv_tbl->lst[idx_tbl].ppc=ppc_val;
 	  trv_tbl->lst[idx_tbl].flg_nsd=flg_nsd;
 	} /* endif */
@@ -560,7 +560,7 @@ nco_ppc_bitmask /* [fnc] Mask-out insignificant bits of significand */
   
   /* Rounding is currently defined as op1:=bitmask(op1,ppc) */  
   
-  /* Number of Significant Digits (NSD) algorithm
+  /* This routine implements the Bit Grooming Number of Significant Digits (NSD) algorithm
      NSD based on absolute precision, i.e., number of digits in significand and in decimal scientific notation
      DSD based on precision relative to decimal point, i.e., number of digits before/after decimal point
      DSD is more often used colloquially, e.g., "thermometers measure temperature accurate to 1 degree C" 
@@ -629,10 +629,10 @@ nco_ppc_bitmask /* [fnc] Mask-out insignificant bits of significand */
   //prc_bnr_xpl_rqr=prc_bnr_ceil-1;
   //prc_bnr_xpl_rqr=prc_bnr_ceil;
   prc_bnr_xpl_rqr=prc_bnr_ceil+1;
-  if(type == NC_DOUBLE) prc_bnr_xpl_rqr++; /* Seems necessary for double-precision ppc=array(1.234567,1.e-6,$dmn) */
+  if(type == NC_DOUBLE) prc_bnr_xpl_rqr++; /* Seems necessary for double-precision ppc=array(1.234567,1.0e-6,$dmn) */
   /* 20150128: Hand-tuning shows we can sacrifice one or two more bits for almost all cases
      20150205: However, small integers are an exception. In fact they require two more bits, at least for NSD=1.
-     Thus minimum threshold to preserve half of least significant digit (LSD) is prc_bnr_xpl_rqr=prc_bnr_ceil.
+     Thus minimum threshold to preserve half of least significant digit (LSD) is prc_bnr_xpl_rqr=prc_bnr_ceil
      Decrementing prc_bnr_xpl_rqr by one or two more bits produces maximum errors that exceed half the LSD
      ncra -4 -O -C --ppc default=1 --ppc one=1 -p ~/nco/data in.nc in.nc ~/foo.nc 
      ncks -H -v Q.. --cdl ~/foo.nc | m */
diff --git a/src/nco/nco_prn.c b/src/nco/nco_prn.c
index 6cb9999..8f1bb68 100644
--- a/src/nco/nco_prn.c
+++ b/src/nco/nco_prn.c
@@ -22,6 +22,7 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
 
   att_sct *att=NULL_CEWI;
 
+  //  const char fnc_nm[]="nco_prn_att()"; /* [sng] Function name  */
   const char spc_sng[]=""; /* [sng] Space string */
 
   char *nm_cdl;
@@ -39,6 +40,7 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
   char att_sng_dlm[NCO_MAX_LEN_FMT_SNG];
   char att_sng_pln[NCO_MAX_LEN_FMT_SNG];
   char src_sng[NC_MAX_NAME];
+  char att_nm[NC_MAX_NAME];
   char val_sng[NCO_ATM_SNG_LNG];
 
   double val_dbl;
@@ -63,6 +65,7 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
   long sng_lng=long_CEWI; /* [nbr] Length of NC_CHAR string */
   long sng_lngm1=long_CEWI; /* [nbr] Length minus one of NC_CHAR string */
   
+  nc_type att_typ;
   nc_type var_typ;
 
   nco_bool flg_glb=False; /* [flg] Printing attributes for root-level group */
@@ -139,6 +142,50 @@ nco_prn_att /* [fnc] Print all attributes of single variable or group */
 	  att[idx].val.vp=(void *)nco_malloc(att_sz*nco_typ_lng(att[idx].type));
 	  strncpy(att[idx].val.cp,val_hdn_sng,att_sz);
 	  if(val_hdn_sng) val_hdn_sng=(char *)nco_free(val_hdn_sng);
+	  /* _NCProperties, _IsNetcdf4, _SuperblockVersion only printed for root group
+	     _NCProperties is persistent, added at file creation 
+	     _IsNetcdf4 and _SuperblockVersion are computed by traversing file with HDF5 API, looking for clues
+	     All were introduced in 4.4.1-rc2 on 20160513 */
+	  if(nco_fmt_xtn_get() != nco_fmt_xtn_hdf4 && NC_LIB_VERSION >= 441){
+	    /* 20160514: nc_inq_att() for "_NCProperties" returns type==NC_NAT or random integer, and att_sz is random for files without _NCProperties */
+	    /* 20160514: nc_inq_att() for "_IsNetcdf4" returns random type and size too */
+	    /* 20160719: Above issues were fixed in netCDF 4.4.1 final release */
+	    strcpy(att_nm,"_NCProperties");
+	    rcd=nco_inq_att_flg(grp_id,var_id,att_nm,&att_typ,&att_sz);
+	    if(rcd == NC_NOERR){
+	      idx=att_nbr_ttl++;
+	      att=(att_sct *)nco_realloc(att,att_nbr_ttl*sizeof(att_sct));
+	      att[idx].nm=(char *)strdup(att_nm);
+	      att[idx].type=att_typ;
+	      att[idx].sz=att_sz;
+	      att[idx].val.vp=(void *)nco_malloc(att_sz*nco_typ_lng(att[idx].type));
+	      rcd=nco_get_att(grp_id,var_id,att[idx].nm,att[idx].val.vp,att[idx].type);
+	    } /* !rcd */
+	    /* _IsNetcdf4 */
+	    strcpy(att_nm,"_IsNetcdf4");
+	    rcd=nco_inq_att_flg(grp_id,var_id,att_nm,&att_typ,&att_sz);
+	    if(rcd == NC_NOERR){
+	      idx=att_nbr_ttl++;
+	      att=(att_sct *)nco_realloc(att,att_nbr_ttl*sizeof(att_sct));
+	      att[idx].nm=(char *)strdup(att_nm);
+	      att[idx].type=att_typ;
+	      att[idx].sz=att_sz;
+	      att[idx].val.vp=(void *)nco_malloc(att_sz*nco_typ_lng(att[idx].type));
+	      rcd=nco_get_att(grp_id,var_id,att[idx].nm,att[idx].val.vp,att[idx].type);
+	    } /* !rcd */
+	    /* _SuperblockVersion */
+	    strcpy(att_nm,"_SuperblockVersion");
+	    rcd=nco_inq_att_flg(grp_id,var_id,att_nm,&att_typ,&att_sz);
+	    if(rcd == NC_NOERR){
+	      idx=att_nbr_ttl++;
+	      att=(att_sct *)nco_realloc(att,att_nbr_ttl*sizeof(att_sct));
+	      att[idx].nm=(char *)strdup(att_nm);
+	      att[idx].type=att_typ;
+	      att[idx].sz=att_sz;
+	      att[idx].val.vp=(void *)nco_malloc(att_sz*nco_typ_lng(att[idx].type));
+	      rcd=nco_get_att(grp_id,var_id,att[idx].nm,att[idx].val.vp,att[idx].type);
+	    } /* !rcd */
+	  } /* !441 */
 	} /* !rcd */	
       } /* !xml */
     }else{
diff --git a/src/nco/nco_rgr.c b/src/nco/nco_rgr.c
index 4df49b0..274fe67 100644
--- a/src/nco/nco_rgr.c
+++ b/src/nco/nco_rgr.c
@@ -486,8 +486,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 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_nm) rgr->bnd_nm=(char *)strdup("nvertices"); /* [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 */
@@ -1692,7 +1692,6 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   rcd=NC_NOERR;
   /* End CF-coordinates block */
 
-
   if(flg_grd_in_1D){
     long col_nbr_in_dat; /* [nbr] Number of columns in input datafile */
     /* Check default or command-line option first, then search usual suspects */
@@ -1939,7 +1938,6 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 
   /* Name output dimensions/variables */
   area_nm_out=rgr->area_nm;
-  bnd_nm_out=rgr->bnd_nm;
   bnd_tm_nm_out=rgr->bnd_tm_nm;
   frc_nm_out=rgr->frc_nm;
   lat_bnd_nm_out=rgr->lat_bnd_nm;
@@ -1954,8 +1952,13 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     lat_bnd_nm_out=rgr->lat_vrt_nm;
     lon_bnd_nm_out=rgr->lon_vrt_nm;
   } /* !flg_grd_out_1D */
-  if(flg_grd_out_2D){
+  if(flg_grd_out_crv){
     bnd_nm_out=rgr->bnd_nm;
+  } /* !flg_grd_out_crv */
+  if(flg_grd_out_rct){
+    bnd_nm_out=rgr->bnd_tm_nm; /* NB: default to bnd_tm_nm for spatial bounds */
+  } /* !flg_grd_out_rct */
+  if(flg_grd_out_2D){
     lat_bnd_nm_out=rgr->lat_bnd_nm;
     lon_bnd_nm_out=rgr->lon_bnd_nm;
   } /* !flg_grd_out_2D */
@@ -1963,6 +1966,12 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     slat_nm_out=strdup("slat");
     slon_nm_out=strdup("slon");
   } /* !nco_grd_lat_fv */
+  /* Ensure temporal bounds dimension name is distinct from spatial bounds when their sizes differ */
+  if(bnd_nbr_out != bnd_tm_nbr_out){
+    if(!strcmp(bnd_nm_out,bnd_tm_nm_out)){
+      (void)fprintf(stdout,"%s: INFO %s reports spatial and temporal output bounds dimensions are identical (and named \"%s\") by default for rectangular output grids because both can be stored as 2D arrays. That cannot work for this mapping because temporal and spatial bounds dimensions sizes differ (bnd_nbr_out = %d, bnd_tm_nbr_out = %d). Using fall-back spatial bounds name \"%s\" instead. HINT: You may change one or both manually with --rgr bnd_nm=name or --rgr bnd_tm_nm=name.\n",nco_ [...]
+    } /* !strcmp() */
+  } /* !bnd_nbr_out */
 
   /* Persistent metadata */
   aed_sct aed_mtd_crd;
@@ -1989,11 +1998,11 @@ nco_rgr_map /* [fnc] Regrid with external weights */
       rcd+=nco_def_dim(out_id,slon_nm_out,slon_nbr_out,&dmn_id_slon);
     } /* !nco_grd_lat_fv */
   } /* !flg_grd_out_2D */
-  rcd=nco_inq_dimid_flg(out_id,bnd_tm_nm_out,&dmn_id_bnd_tm);
   /* If dimension has not been defined, define it */
+  rcd=nco_inq_dimid_flg(out_id,bnd_tm_nm_out,&dmn_id_bnd_tm);
   if(rcd != NC_NOERR) rcd=nco_def_dim(out_id,bnd_tm_nm_out,bnd_tm_nbr_out,&dmn_id_bnd_tm);
-  rcd=nco_inq_dimid_flg(out_id,bnd_nm_out,&dmn_id_bnd);
   /* If dimension has not been defined, define it */
+  rcd=nco_inq_dimid_flg(out_id,bnd_nm_out,&dmn_id_bnd);
   if(rcd != NC_NOERR) rcd=nco_def_dim(out_id,bnd_nm_out,bnd_nbr_out,&dmn_id_bnd);
 
   char dmn_nm[NC_MAX_NAME]; /* [sng] Dimension name */
@@ -2431,7 +2440,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(att_nm) att_nm=(char *)nco_free(att_nm);
 
   att_nm=strdup("long_name");
-  if(flg_grd_out_2D) att_val=strdup("gridcell latitude interfaces"); else att_val=strdup("gridcell latitude vertices");
+  if(flg_grd_out_rct) att_val=strdup("gridcell latitude interfaces"); else att_val=strdup("gridcell latitude vertices");
   aed_mtd.att_nm=att_nm;
   aed_mtd.var_nm=lat_bnd_nm_out;
   aed_mtd.id=lat_bnd_id;
@@ -2539,7 +2548,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(att_nm) att_nm=(char *)nco_free(att_nm);
 
   att_nm=strdup("long_name");
-  if(flg_grd_out_2D) att_val=strdup("gridcell longitude interfaces"); else att_val=strdup("gridcell longitude vertices");
+  if(flg_grd_out_rct) att_val=strdup("gridcell longitude interfaces"); else att_val=strdup("gridcell longitude vertices");
   aed_mtd.att_nm=att_nm;
   aed_mtd.var_nm=lon_bnd_nm_out;
   aed_mtd.id=lon_bnd_id;
@@ -2605,7 +2614,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     if(att_val) att_val=(char *)nco_free(att_val);
   } /* !nco_grd_lat_fv */
 
-  if(flg_grd_out_2D){
+  if(flg_grd_out_rct){
     att_nm=strdup("long_name");
     att_val=strdup("latitude quadrature weights (normalized to sum to 2.0 on global grids)");
     aed_mtd.att_nm=att_nm;
@@ -2618,7 +2627,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     (void)nco_aed_prc(out_id,lat_wgt_id,aed_mtd);
     if(att_nm) att_nm=(char *)nco_free(att_nm);
     if(att_val) att_val=(char *)nco_free(att_val);
-  } /* !flg_grd_out_2D */
+  } /* !flg_grd_out_rct */
   
   att_nm=strdup("map_file");
   att_val=strdup(fl_in);
@@ -2716,8 +2725,9 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     dmn_cnt_tuo[0]=lat_nbr_out;
     dmn_cnt_tuo[1]=lon_nbr_out;
     dmn_cnt_tuo[2]=bnd_nbr_out;
-    (void)nco_put_vara(out_id,lat_bnd_id,dmn_srt_out,dmn_cnt_tuo,lat_bnd_out,crd_typ_out);
-    (void)nco_put_vara(out_id,lon_bnd_id,dmn_srt_out,dmn_cnt_tuo,lon_bnd_out,crd_typ_out);
+    /* NB: 20160803 Semantically confusing---curvilinear grids must write *_crn_out data into *_bnd_out arrays */
+    (void)nco_put_vara(out_id,lat_bnd_id,dmn_srt_out,dmn_cnt_tuo,lat_crn_out,crd_typ_out);
+    (void)nco_put_vara(out_id,lon_bnd_id,dmn_srt_out,dmn_cnt_tuo,lon_crn_out,crd_typ_out);
   } /* !flg_grd_out_crv */
   if(flg_grd_out_rct){
     dmn_srt_out[0]=0L;
@@ -5324,7 +5334,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
      This fails for, e.g., OMI L2 which has coordinates /GEOLOCATION_DATA/[Latitude,Longitude]
      fxm: Generalize with traversal table so usual suspect coordinates may be in any group */
   if(lat_ctr_id == NC_MIN_INT){
-    if(rgr->lat_nm_in && (rcd=nco_inq_dimid_flg(in_id,rgr->lat_nm_in,&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup(rgr->lat_nm_in);
+    if(rgr->lat_nm_in && (rcd=nco_inq_varid_flg(in_id,rgr->lat_nm_in,&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup(rgr->lat_nm_in);
     else if((rcd=nco_inq_varid_flg(in_id,"latitude",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("latitude");
     else if((rcd=nco_inq_varid_flg(in_id,"Latitude",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("Latitude"); /* AMSR, HIRDLS, TRMM */
     else if((rcd=nco_inq_varid_flg(in_id,"lat",&lat_ctr_id)) == NC_NOERR) lat_nm_in=strdup("lat"); /* CAM */
@@ -5341,7 +5351,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   } /* !lat_ctr_id */
   
   if(lon_ctr_id == NC_MIN_INT){
-    if(rgr->lon_nm_in && (rcd=nco_inq_dimid_flg(in_id,rgr->lon_nm_in,&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup(rgr->lon_nm_in);
+    if(rgr->lon_nm_in && (rcd=nco_inq_varid_flg(in_id,rgr->lon_nm_in,&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup(rgr->lon_nm_in);
     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,"Longitude",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("Longitude"); /* AMSR, TRMM */
     else if((rcd=nco_inq_varid_flg(in_id,"lon",&lon_ctr_id)) == NC_NOERR) lon_nm_in=strdup("lon"); /* CAM */
@@ -5387,7 +5397,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     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 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);
+    (void)fprintf(stdout,"%s: ERROR %s reports an identified grid variable (%s with rank %d and/or %s with rank %d) has rank greater than two---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,lat_rnk,lon_nm_in,lon_rnk);
     nco_exit(EXIT_FAILURE);
   } /* !3D */
   if(lat_rnk*lon_rnk != 1 && lat_rnk*lon_rnk != 4) assert(False);
diff --git a/src/nco/nco_var_lst.c b/src/nco/nco_var_lst.c
index 39dcc54..bad73b9 100644
--- a/src/nco/nco_var_lst.c
+++ b/src/nco/nco_var_lst.c
@@ -749,8 +749,6 @@ nco_var_lst_convert /* [fnc] Make variable structure list from variable name ID
 
 } /* end nco_var_lst_convert() */
 
-
-
 int /* O [enm] Return code */
 nco_var_lst_mrg /* [fnc] Merge two variable lists into same order */
 (var_sct *** var_1_ptr, /* I/O [sct] Variable list 1 */
@@ -912,8 +910,7 @@ nco_var_lst_dvd /* [fnc] Divide input lists into output lists */
     if((var_typ == NC_CHAR) || (var_typ == NC_STRING)) var_typ_fnk=True; else var_typ_fnk=False;
 
     /* Many operators should not process coordinate variables, or auxiliary coordinate variables (lat, lon, time, latixy, longxy, ...) and bounds (lat_bnds, lon_bnds, ...)
-       20130112: As of today set is_crd_var true in nco_var_fll() when either of these conditions is true 
-       so no longer need to specify these conditions separately. 
+       20130112: As of today set is_crd_var true in nco_var_fll() when either of these conditions is true so no longer need to specify these conditions separately. 
        20150519: Add nco_is_spc_in_clm_att() to this list
        Keep this old code here as a reminder that is_crd_var also incorporates these conditions
        is_spc_in_clm_att=nco_is_spc_in_clm_att(var[idx]->nc_id,var[idx]->id);
@@ -1228,13 +1225,9 @@ nco_var_lst_dvd_trv                          /* [fnc] Divide input lists into ou
       var_op_typ=fix_typ;
 
   if(CNV_CCM_CCSM_CF){
-
-    nco_bool var_is_fix;  /* [fnc] Variable should be treated as a fixed variable */
-
+    nco_bool var_is_fix;  /* [fnc] Treat variable as a fixed variable */
     var_is_fix=nco_var_is_fix(var_nm,nco_prg_id,nco_pck_plc);  
-
-    if (var_is_fix) var_op_typ=fix_typ;
-
+    if(var_is_fix) var_op_typ=fix_typ;
   } /* end if CNV_CCM_CCSM_CF */
 
   /* Warn about any expected weird behavior */
diff --git a/src/nco/nco_var_utl.c b/src/nco/nco_var_utl.c
index abfbbb0..9b866f5 100644
--- a/src/nco/nco_var_utl.c
+++ b/src/nco/nco_var_utl.c
@@ -1384,6 +1384,85 @@ nco_var_val_cpy /* [fnc] Copy variables data from input to output file */
     
 } /* end nco_var_val_cpy() */
 
+nco_bool /* [flg] Variable is listed in this CF attribute, thereby associated */
+nco_is_spc_in_cf_att /* [fnc] Variable is listed in this CF attribute, thereby associated */
+(const int nc_id, /* I [id] netCDF file ID */
+ const char * const cf_nm, /* I [sng] CF convention ("ancillary_variables", "bounds", "climatology", "coordinates", and "grid_mapping") */
+ const int var_trg_id) /* I [id] Variable ID */
+{
+  /* Purpose: Is variable specified in an associated attribute?
+     Associated attributes include "ancillary_variables", "bounds", "climatology", "coordinates", "grid_mapping"
+     One of these ("ancillary_variables") can contain "non-grid" variables
+     The others contain variables that should, more or less, be treated as coordinates
+     However this function does not care about such distinctions
+     It simply returns true or false depending on whether the variable appears in the indicated attribute value
+     This function coaslesces (and makes obsolete) four earlier functions with the same purpose
+     Those functions were identical except for the attribute name, so this function takes the attribute name as an argument
+     It is based on nco_is_spc_in_crd_att() */
+  nco_bool IS_SPC_IN_CF_ATT=False; /* [flg] Variable is listed in this CF attribute  */
+
+  const char dlm_sng[]=" "; /* [sng] Delimiter string */
+  const char fnc_nm[]="nco_is_spc_in_cf_att()"; /* [sng] Function name */
+  char **cf_lst; /* [sng] 1D array of list elements */
+  char *att_val;
+  char att_nm[NC_MAX_NAME];
+  char var_nm[NC_MAX_NAME];
+  char var_trg_nm[NC_MAX_NAME];
+  int idx_att;
+  int idx_cf;
+  int idx_var;
+  int nbr_att;
+  int nbr_cf; /* [nbr] Number of variables listed in this CF attribute */
+  int nbr_var; /* [nbr] Number of variables in file */
+  int rcd=NC_NOERR; /* [rcd] Return code */
+  int var_id; /* [id] Variable ID */
+  long att_sz;
+  nc_type att_typ;
+
+  /* May need variable name for later comparison to those listed in this attribute */
+  rcd+=nco_inq_varname(nc_id,var_trg_id,var_trg_nm);
+  rcd+=nco_inq_nvars(nc_id,&nbr_var);
+
+  for(idx_var=0;idx_var<nbr_var;idx_var++){
+    /* This assumption, praise the Lord, is valid in netCDF2, netCDF3, and netCDF4 */
+    var_id=idx_var;
+
+    /* Find number of attributes */
+    rcd+=nco_inq_varnatts(nc_id,var_id,&nbr_att);
+    for(idx_att=0;idx_att<nbr_att;idx_att++){
+      rcd+=nco_inq_attname(nc_id,var_id,idx_att,att_nm);
+      /* Is attribute part of CF convention? */
+      if(!strcmp(att_nm,cf_nm)){
+        /* Yes, get list of specified attributes */
+        rcd+=nco_inq_att(nc_id,var_id,att_nm,&att_typ,&att_sz);
+        if(att_typ != NC_CHAR){
+          rcd=nco_inq_varname(nc_id,var_id,var_nm);
+          (void)fprintf(stderr,"%s: WARNING the \"%s\" attribute for variable %s is type %s, not %s. This violates the CF convention for specifying additional attributes. Therefore %s will skip this attribute.\n",nco_prg_nm_get(),att_nm,var_nm,nco_typ_sng(att_typ),nco_typ_sng(NC_CHAR),fnc_nm);
+          return IS_SPC_IN_CF_ATT;
+        } /* end if */
+        att_val=(char *)nco_malloc((att_sz+1L)*sizeof(char));
+        if(att_sz > 0) rcd=nco_get_att(nc_id,var_id,att_nm,(void *)att_val,NC_CHAR);	  
+        /* NUL-terminate attribute */
+        att_val[att_sz]='\0';
+        /* Split list into separate variable names
+	   Use nco_lst_prs_sgl_2D() not nco_lst_prs_2D() to avert TODO nco944 */
+        cf_lst=nco_lst_prs_sgl_2D(att_val,dlm_sng,&nbr_cf);
+        /* ...for each variable in this CF attribute... */
+        for(idx_cf=0;idx_cf<nbr_cf;idx_cf++){
+          /* Does variable match name specified in CF attribute list? */
+          if(!strcmp(var_trg_nm,cf_lst[idx_cf])) break;
+        } /* end loop over coordinates in list */
+        if(idx_cf!=nbr_cf) IS_SPC_IN_CF_ATT=True;
+        /* Free allocated memory */
+        att_val=(char *)nco_free(att_val);
+        cf_lst=nco_sng_lst_free(cf_lst,nbr_cf);
+      } /* !coordinates */
+    } /* end loop over attributes */
+  } /* end loop over idx_var */
+
+  return IS_SPC_IN_CF_ATT; /* [flg] Variable is listed in this CF attribute */
+} /* end nco_is_spc_in_cf_att() */
+
 nco_bool /* [flg] Variable is listed in a "coordinates" attribute */
 nco_is_spc_in_crd_att /* [fnc] Variable is listed in a "coordinates" attribute */
 (const int nc_id, /* I [id] netCDF file ID */
@@ -1918,10 +1997,10 @@ nco_var_fll /* [fnc] Allocate variable structure and fill with metadata */
   
   /* 20130112: Variables associated with "bounds", "climatology", "coordinates", and "grid_mapping" attributes should,
      in most cases, be treated as coordinates */
-  if(nco_is_spc_in_bnd_att(var->nc_id,var->id)) var->is_crd_var=True;
-  if(nco_is_spc_in_clm_att(var->nc_id,var->id)) var->is_crd_var=True;
-  if(nco_is_spc_in_crd_att(var->nc_id,var->id)) var->is_crd_var=True;
-  if(nco_is_spc_in_grd_att(var->nc_id,var->id)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id,"bounds",var->id)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id,"climatology",var->id)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id,"coordinates",var->id)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id,"grid_mapping",var->id)) var->is_crd_var=True;
   
   /* Portions of variable structure depend on packing properties, e.g., typ_upk
      nco_pck_dsk_inq() fills in these portions harmlessly */
diff --git a/src/nco/nco_var_utl.h b/src/nco/nco_var_utl.h
index ce84d21..659cb91 100644
--- a/src/nco/nco_var_utl.h
+++ b/src/nco/nco_var_utl.h
@@ -119,6 +119,12 @@ extern "C" {
   (var_sct **var_lst, /* I/O [sct] Variable structure list to free */
    const int var_nbr); /* I [nbr] Number of variable structures in list */
   
+  nco_bool /* [flg] Variable is listed in this CF attribute, thereby associated */
+  nco_is_spc_in_cf_att /* [fnc] Variable is listed in this CF attribute, thereby associated */
+  (const int nc_id, /* I [id] netCDF file ID */
+   const char * const cf_nm, /* I [sng] CF convention ("ancillary_variables", "bounds", "climatology", "coordinates", and "grid_mapping") */
+   const int var_trg_id); /* I [id] Variable ID */
+
   nco_bool /* [flg] Variable is listed in a "bounds" attribute */
   nco_is_spc_in_bnd_att /* [fnc] Variable is listed in a "bounds" attribute */
   (const int nc_id, /* I [id] netCDF file ID */
diff --git a/src/nco/ncra.c b/src/nco/ncra.c
index 73eb523..9515f0e 100644
--- a/src/nco/ncra.c
+++ b/src/nco/ncra.c
@@ -1270,7 +1270,7 @@ main(int argc,char **argv)
             if(nco_prg_id == ncra) FLG_BFR_NRM=True; /* [flg] Current output buffers need normalization */
 
             /* Re-base record coordinate and bounds if necessary (e.g., time, time_bnds) */
-            if(lmt_rec[idx_rec]->origin != 0.0 && (var_prc[idx]->is_crd_var || nco_is_spc_in_bnd_att(grp_id,var_prc[idx]->id) || nco_is_spc_in_clm_att(grp_id,var_prc[idx]->id))){
+            if(lmt_rec[idx_rec]->origin != 0.0 && (var_prc[idx]->is_crd_var || nco_is_spc_in_cf_att(grp_id,"bounds",var_prc[idx]->id) || nco_is_spc_in_cf_att(grp_id,"climatology",var_prc[idx]->id))){
               var_sct *var_crd;
               scv_sct scv;
               /* De-reference */
diff --git a/src/nco_c++/Makefile.am b/src/nco_c++/Makefile.am
index 03d0ea0..84f4ffd 100644
--- a/src/nco_c++/Makefile.am
+++ b/src/nco_c++/Makefile.am
@@ -16,7 +16,8 @@ libnco_c___la_SOURCES = nco_att.cc nco_dmn.cc nco_fl.cc nco_hgh.cc nco_utl.cc nc
 
 libnco_c___la_CPPFLAGS = -DABORT_ON_ERROR
 
-libnco_c___la_LDFLAGS = -release @NCO_VERSION@
+# NB: VERSION here refers to ... what? argument to AC_INIT() in configure.ac? No, that's package_version
+libnco_c___la_LDFLAGS = -release @VERSION@
 
 tst_SOURCES = tst.cc
 
@@ -26,7 +27,7 @@ TESTPROGRAMS = tst
 check_PROGRAMS = $(TESTPROGRAMS)
 TESTS = $(TESTPROGRAMS)
 
-# The test programs produce these files:
+# Test programs produce these files:
 CLEANFILES = out.nc
 
 MAINTAINERCLEANFILES = Makefile.in in.nc
diff --git a/src/nco_c++/Makefile.in b/src/nco_c++/Makefile.in
index 0388071..0e5559f 100644
--- a/src/nco_c++/Makefile.in
+++ b/src/nco_c++/Makefile.in
@@ -458,6 +458,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NCOXX = @NCOXX@
 NCO_CXX = @NCO_CXX@
+NCO_VERSION = @NCO_VERSION@
 NETCDF_INC = @NETCDF_INC@
 NETCDF_LIB = @NETCDF_LIB@
 NETCDF_ROOT = @NETCDF_ROOT@
@@ -549,12 +550,14 @@ lib_LTLIBRARIES = libnco_c++.la
 include_HEADERS = libnco_c++.hh nco_dmn.hh nco_hgh.hh nco_var.hh nco_att.hh nco_fl.hh nco_utl.hh
 libnco_c___la_SOURCES = nco_att.cc nco_dmn.cc nco_fl.cc nco_hgh.cc nco_utl.cc nco_var.cc
 libnco_c___la_CPPFLAGS = -DABORT_ON_ERROR
-libnco_c___la_LDFLAGS = -release @NCO_VERSION@
+
+# NB: VERSION here refers to ... what? argument to AC_INIT() in configure.ac? No, that's package_version
+libnco_c___la_LDFLAGS = -release @VERSION@
 tst_SOURCES = tst.cc
 tst_LDADD = -lnco_c++
 TESTPROGRAMS = tst
 
-# The test programs produce these files:
+# Test programs produce these files:
 CLEANFILES = out.nc
 MAINTAINERCLEANFILES = Makefile.in in.nc
 all: all-am

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