[nco] 01/04: Imported Upstream version 4.6.6

Bas Couwenberg sebastic at debian.org
Sat Apr 22 09:58:17 UTC 2017


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

sebastic pushed a commit to branch master
in repository nco.

commit a5f41655de24d1dad0e45c7e66e5f8ab772c3137
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Apr 22 11:35:37 2017 +0200

    Imported Upstream version 4.6.6
---
 bld/nco.spec                      |   11 +-
 bld/nco_dst.pl                    |   30 +-
 bm/NCO_rgr.pm                     |   25 +-
 configure                         |   25 +-
 configure.ac                      |    7 +-
 configure.eg                      |  169 ++---
 data/buggy.cdl                    |    7 +-
 data/in_grp.cdl                   |    4 +
 data/ncclimo                      |   69 +-
 data/ncremap                      |  206 +++--
 debian/changelog                  |    6 +
 doc/ANNOUNCE                      |  222 +++---
 doc/ChangeLog                     |  190 +++++
 doc/TODO                          |    9 +-
 doc/VERSION                       |    2 +-
 doc/debian.txt                    |  162 ++--
 doc/index.shtml                   |   50 +-
 doc/nco.texi                      |  311 ++++++--
 man/ncclimo.1                     |    5 +-
 man/ncremap.1                     |    7 +-
 src/nco++/NcapVar.hh              |   10 +-
 src/nco++/fmc_all_cls.cc          |  105 ++-
 src/nco++/fmc_all_cls.hh          |    6 +-
 src/nco++/ncap2.cc                |   20 +-
 src/nco++/ncap2_att.cc            |   56 +-
 src/nco++/ncap2_att.hh            |    7 +
 src/nco++/ncoEnumTokenTypes.hpp   |    2 +-
 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             |    2 +-
 src/nco++/ncoTree.hpp             |    2 +-
 src/nco++/prs_cls.hh              |    5 +-
 src/nco/ncks.c                    |   30 +-
 src/nco/nco.h                     |   21 +-
 src/nco/nco_att_utl.c             |   16 +-
 src/nco/nco_cnv_csm.c             |    2 +-
 src/nco/nco_ctl.c                 |    2 +-
 src/nco/nco_fl_utl.c              |   62 +-
 src/nco/nco_grp_utl.c             |   81 +-
 src/nco/nco_grp_utl.h             |    4 +
 src/nco/nco_mmr.c                 |    2 +-
 src/nco/nco_msa.c                 |  124 +++-
 src/nco/nco_omp.c                 |   14 +-
 src/nco/nco_ppc.c                 |    4 +-
 src/nco/nco_prn.c                 |  194 ++---
 src/nco/nco_rgr.c                 | 1488 ++++++++++++++++++++++++++++++++-----
 src/nco/nco_scm.c                 |   21 +-
 src/nco/nco_var_lst.c             |    2 +-
 src/nco/nco_var_utl.c             |  115 ++-
 src/nco/nco_var_utl.h             |   15 +-
 src/nco/ncra.c                    |  111 ++-
 54 files changed, 3122 insertions(+), 928 deletions(-)

diff --git a/bld/nco.spec b/bld/nco.spec
index 3b816c2..5516c46 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.5
+Version:        4.6.6
 Release:        1%{?dist}
 Summary:        Programs that manipulate netCDF files
 Group:          Applications/Engineering
 License:        GPL3
 URL:            http://nco.sf.net/
 
-# Obtain NCO version 4.6.5-1 tar.gz from Sourceforge using CVS:
+# Obtain NCO version 4.6.6-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.5-1 -d nco-%{version} nco
-# tar czf nco-%{version}.tar.gz --exclude='nco-4.6.5/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.6-1 -d nco-%{version} nco
+# tar czf nco-%{version}.tar.gz --exclude='nco-4.6.6/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
+* Fri Apr 21 2017 Charlie Zender <zender at uci.edu> - 4.6.6-1
+- new upstream 4.6.6
+
 * Wed Mar 15 2017 Charlie Zender <zender at uci.edu> - 4.6.5-1
 - new upstream 4.6.5
 
diff --git a/bld/nco_dst.pl b/bld/nco_dst.pl
index c7b4943..a43f5cb 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.5.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.5 # Build, do not release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.6.5 # Build, release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.6.5 # Install, do not build
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.6.5 # Build and install
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.6.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.6.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.6.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.6.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.6.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.6.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.6.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.6.5
+# /usr/bin/scp ${DATA}/nco-4.6.6.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.6 # Build, do not release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.6.6 # Build, release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.6.6 # Install, do not build
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.6.6 # Build and install
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.6.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.6.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.6.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.6.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.6.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.6.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.6.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.6.6
 
 # 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.5/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.6/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude=ncap_yacc.[ch] ./$dst_vrs"); # Create gzipped tarfile
     cmd_prc("$rsh_cmd $www_mch $rm_cmd $www_drc/src/$dst_fl"); # Remove any distribution with same name
     if($dly_snp){cmd_prc("$rsh_cmd $www_mch $rm_cmd -r $www_drc/src/nco-????????.tar.gz");} # Remove previous daily snapshots from WWW server
     cmd_prc("$rcp_cmd $dst_fl $www_mch:$www_drc/src"); # Copy local tarfile to WWW server
diff --git a/bm/NCO_rgr.pm b/bm/NCO_rgr.pm
index affcfbf..0cfe881 100644
--- a/bm/NCO_rgr.pm
+++ b/bm/NCO_rgr.pm
@@ -3932,6 +3932,19 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     $#tst_cmd=0; # Reset array
 
 
+#ncrcat #25
+    $tst_cmd[0]="ncatted  -h -O $fl_fmt $nco_D_flg -a units,time,o,c,'days since 1964-03-22 12:09:00 -9:00' $in_pth/in.nc %tmp_fl_00%";
+    $tst_cmd[1]="ncra -Y ncrcat -O $fl_fmt $nco_D_flg  -v time $in_pth/in.nc %tmp_fl_00% %tmp_fl_01% 2> %tmp_fl_05%";
+    $tst_cmd[2]="ncap2 -O -v -C -s 'climo_ttl=climatology_bounds.total();print(climo_ttl);' %tmp_fl_01% %tmp_fl_02%";
+    $tst_cmd[3]="climo_ttl = 420";
+    $dsc_sng="Concatenate 1D variable across two files no limits check climatology_bounds . Requires UDUnits.";
+    $tst_cmd[4]="SS_OK";
+    NCO_bm::tst_run(\@tst_cmd);
+    $#tst_cmd=0; # Reset array
+
+
+
+
 	
     #######################################
     #### Group tests (requires netCDF4) ###
@@ -3939,7 +3952,7 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 
     if($RUN_NETCDF4_TESTS){
 	
-#ncrcat #25	
+#ncrcat #26	
 # same as ncrcat #02 with group
 
     $tst_cmd[0]="ncra -Y ncrcat $omp_flg -h -O $fl_fmt $nco_D_flg -g g4 -v one_dmn_rec_var $in_pth_arg in_grp.nc in_grp.nc -d time,2.,3. %tmp_fl_00% 2> %tmp_fl_02%";
@@ -3950,7 +3963,7 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array	
 	
-#ncrcat #26	
+#ncrcat #27	
 # 2 groups each one with a record (part 1)
 # ncra -Y ncrcat -h -O -g g25g1,g25g2 -v one_dmn_rec_var -p ~/nco/data in_grp_3.nc in_grp_3.nc -d time,2.,3. ~/foo.nc
 
@@ -3962,7 +3975,7 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array
 
-#ncrcat #27
+#ncrcat #28
 # 2 groups each one with a record (part 2)
 # ncra -Y ncrcat -h -O -g g25g1,g25g2 -v one_dmn_rec_var -p ~/nco/data in_grp_3.nc in_grp_3.nc -d time,2.,3. ~/foo.nc
 
@@ -3974,7 +3987,7 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array		
 	
-#ncrcat #28
+#ncrcat #29
 #same as #03 
 
     $tst_cmd[0]="ncra -Y ncrcat $omp_flg -h -O $fl_fmt $nco_D_flg -v three_dmn_var_dbl $in_pth_arg -d time,,2 -d lat,0,0 -d lon,0,0 -d lon,3,3 in_grp_3.nc in_grp_3.nc %tmp_fl_00% 2> %tmp_fl_02%";
@@ -3988,7 +4001,7 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
 	
 	} #### Group tests	
 	
-# ncrcat #29
+# ncrcat #30
 # Detect input_complete when stride skips user-specified idx_end_max
 # ncrcat -O -C -v time -d time,0,10,9,1 -p ~/nco/data in.nc in.nc ~/foo.nc
 # ncks -C -H -s '%g, ' -v time ~/foo.nc
@@ -4000,7 +4013,7 @@ if($RUN_NETCDF4_TESTS_VERSION_GE_431){
     NCO_bm::tst_run(\@tst_cmd);
     $#tst_cmd=0; # Reset array 		
 
-# ncrcat #30
+# ncrcat #31
 # Another detect input_complete when stride skips user-specified idx_end_max
 # ncks -O -C -v time -d time,0,2 ~/nco/data/in.nc ~/foo1.nc
 # ncks -O -C -v time -d time,3,5 ~/nco/data/in.nc ~/foo2.nc
diff --git a/configure b/configure
index 60f9604..2c86414 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.5.
+# Generated by GNU Autoconf 2.69 for NCO netCDF Operators 4.6.6.
 #
 # 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.5'
-PACKAGE_STRING='NCO netCDF Operators 4.6.5'
+PACKAGE_VERSION='4.6.6'
+PACKAGE_STRING='NCO netCDF Operators 4.6.6'
 PACKAGE_BUGREPORT='nco-bugs at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1394,7 +1394,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures NCO netCDF Operators 4.6.5 to adapt to many kinds of systems.
+\`configure' configures NCO netCDF Operators 4.6.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1465,7 +1465,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of NCO netCDF Operators 4.6.5:";;
+     short | recursive ) echo "Configuration of NCO netCDF Operators 4.6.6:";;
    esac
   cat <<\_ACEOF
 
@@ -1633,7 +1633,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-NCO netCDF Operators configure 4.6.5
+NCO netCDF Operators configure 4.6.6
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2499,7 +2499,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by NCO netCDF Operators $as_me 4.6.5, which was
+It was created by NCO netCDF Operators $as_me 4.6.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3003,9 +3003,8 @@ 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`
+#    NCO_VERSION=`cat doc/VERSION`
+    NCO_VERSION=`git describe --abbrev=7 --dirty --always --tags`
 
 fi
 
@@ -3750,7 +3749,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='nco'
- VERSION='4.6.5'
+ VERSION='4.6.6'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -21495,7 +21494,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by NCO netCDF Operators $as_me 4.6.5, which was
+This file was extended by NCO netCDF Operators $as_me 4.6.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21561,7 +21560,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-NCO netCDF Operators config.status 4.6.5
+NCO netCDF Operators config.status 4.6.6
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index e932d60..c078e85 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.5],[nco-bugs at lists.sourceforge.net],[nco])
+AC_INIT([NCO netCDF Operators],[4.6.6],[nco-bugs at lists.sourceforge.net],[nco])
 
 # Print GNU copyright in configure script
 AC_COPYRIGHT
@@ -73,9 +73,8 @@ 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`
+#    NCO_VERSION=`cat doc/VERSION`
+    NCO_VERSION=`git describe --abbrev=7 --dirty --always --tags`
     AC_SUBST(NCO_VERSION)
 fi
 
diff --git a/configure.eg b/configure.eg
index dda6642..cbae6af 100644
--- a/configure.eg
+++ b/configure.eg
@@ -104,7 +104,7 @@ ANTLR_INC='/usr/local/include' C_INC='/usr/include' CC='xlc_r' CFLAGS='-qsmp=omp
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # bluefire 20120718 not tested yet
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -137,7 +137,7 @@ ANTLR_INC='/usr/local/include' C_INC='/usr/include' CC='xlc_r' CXX='xlC_r' LDFLA
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 ************************************************************************
 End AIX
@@ -169,7 +169,7 @@ NETCDF_INC=${HOME}/include NETCDF_LIB=${HOME}/lib/${GNU_TRP} ./configure --enabl
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End ALPHA
 ************************************************************************
@@ -191,7 +191,7 @@ NETCDF_INC=${HOME}/include NETCDF_LIB=${HOME}/lib/${GNU_TRP} ./configure --enabl
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo config.status.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo config.status.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End FREEBSD
 ************************************************************************
@@ -220,7 +220,7 @@ NETCDF_INC=${HOME}/include NETCDF_LIB=${HOME}/lib/${GNU_TRP} ./configure --enabl
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End HPPA
 ************************************************************************
@@ -230,6 +230,17 @@ Start LINUX
 Status: Works
 Commands for LINUX are the only ones "regularly" used after ~2010
 ************************************************************************
+# Post upgrade requests to sysadmins at ALCF, LCRC, NCAR, NCSA, NERSC, OLCF
+# support at anl.gov # ALCF Maintainer = Adam
+# conda update nco # Anaconda Maintainer = Filipe Fernandes (github: ocefpaf)
+# support at lcrc.anl.gov # LCRC
+# cislhelp at ucar.edu # NCAR
+# Yan Liu <yanliu at illinois.edu> # NCSA Maintainer = Yan Liu (github: yanliu-chn)
+# https://nersc.service-now.com/navpage.do # NERSC Maintainer = Yun (Helen) He
+# https://www.olcf.ornl.gov/support/submit-ticket # OLCF
+# Subject: Upgrade NCO module to 4.6.5
+# Request: NCO 4.6.5 was released yesterday and contains many features of interest to your ACME users. Please upgrade the system NCO module to 4.6.5 and make that the default NCO module. Thanks!
+
 zender at dust:~/nco$ pvmgetarch;uname -a;~/nco/autobld/config.guess
 LINUX
 Linux dust.ess.uci.edu 2.4.19-pre8 #1 SMP Wed May 8 10:16:29 PDT 2002 i686 unknown
@@ -244,7 +255,7 @@ CC='gcc' CXX='g++' ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -255,9 +266,12 @@ CC='gcc' CXX='g++' ./configure --disable-shared --enable-optimize-custom --prefi
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # 20150901: gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on cooley:
+# Sysadmin upgrade request: fxm
+# Latest sysadmin-compiled module usage:  # fxm
+# Personal recipe last used successfully: 201703??
 export GNU_TRP=`~/nco/autobld/config.guess`
 cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/soft/libraries/unsupported/netcdf-4.3.2' UDUNITS2_PATH=${HOME} ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.${GNU_TRP}.foo 2>&1
@@ -266,9 +280,12 @@ ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/soft/libraries/unsupported/n
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # 20160421: gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on mira:
+# Sysadmin upgrade request: fxm
+# Latest sysadmin-compiled module usage:  # fxm
+# Personal recipe last used successfully: 2016??
 export GNU_TRP=`~/nco/autobld/config.guess`
 cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/soft/libraries/netcdf/current' UDUNITS2_PATH=${HOME} ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.${GNU_TRP}.foo 2>&1
@@ -277,9 +294,11 @@ ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/soft/libraries/netcdf/curren
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # 20160421: gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on roger:
+# Latest sysadmin-compiled module usage: module load nco/4.6.5 # 20170315
+# Personal recipe last used successfully: 20170315
 module load netcdf/4.4.0
 module load udunits
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -290,9 +309,10 @@ ANTLR_ROOT=${HOME} ANTLR_LIB=${HOME}/lib CC='gcc' CXX='g++' UDUNITS2_PATH='/sw/u
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on cori:
+# Sysadmin upgrade request: https://nersc.service-now.com/navpage.do
 # Latest sysadmin-compiled module usage: module load nco/4.6.4 # 20170210 (without ncap2)
 # Used 20151204-
 module load szip
@@ -307,12 +327,13 @@ ANTLR_ROOT=${HOME} ANTLR_LIB=${HOME}/lib_cori CC='icc' CXX='icpc' GSL_ROOT='/usr
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # acme: http://www.gnu.org/software/automake/manual/automake.html search for "shared by two hosts" use 
 # gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on edison:
-# Latest sysadmin-compiled module usage: module load nco/4.6.4 # 20170210 (with ncap2)
-# Used 20150825-
+# Sysadmin upgrade request: https://nersc.service-now.com/navpage.do
+# Latest sysadmin-compiled module usage: module load nco/4.6.5 # 20170322 (with ncap2)
+# Personal recipe last used successfully: 20170411
 module load szip
 module load gsl
 module load udunits
@@ -325,41 +346,12 @@ ANTLR_ROOT='/usr' CC='icc' CXX='icpc' GSL_ROOT='/usr/common/usg/gsl/1.16/intel'
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
-
-# gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on hopper:
-# Used 20150824-
-module load szip
-module load gsl
-module load udunits
-module load cray-netcdf
-export GNU_TRP=`~/nco/autobld/config.guess`
-cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
-ANTLR_ROOT='/usr' CC='gcc' CXX='g++' GSL_ROOT='/usr/common/usg/gsl/1.16/pgi' NETCDF_INC='/opt/cray/netcdf/4.3.2/PGI/141/include' NETCDF_LIB='/opt/cray/netcdf/4.3.2/PGI/141/lib' NETCDF_ROOT='/opt/cray/netcdf/4.3.2' UDUNITS2_PATH='/usr/common/usg/udunits/2.2.18/pgi' ./configure --prefix=${HOME} --bindir=${HOME}/bin --datadir=${HOME}/nco/data --libdir=${HOME}/lib --mandir=${HOME}/man > nco.configure.${GNU_TRP}.foo 2>&1
-/bin/cp -f config.log nco.config.log.${GNU_TRP}.foo
-/bin/cp -f libtool nco.libtool.${GNU_TRP}.foo
-make clean;make > nco.make.${GNU_TRP}.foo 2>&1
-make check >> nco.make.${GNU_TRP}.foo 2>&1
-make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
-
-# gcc/g++ Zender used this to develop/install/update netCDF4-enabled NCO in personal directories on hopper:
-# Used 20150818-20150824
-module load netcdf
-module load szip
-module load gsl
-module load udunits
-export GNU_TRP=`~/nco/autobld/config.guess`
-cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
-ANTLR_ROOT='/usr' CC='gcc' CXX='g++' GSL_ROOT='/usr/common/usg/gsl/1.16/pgi' NETCDF_ROOT='/opt/cray/netcdf/4.3.2/GNU/49' UDUNITS2_PATH='/usr/common/usg/udunits/2.2.18/pgi' ./configure --prefix=${HOME} --bindir=${HOME}/bin --datadir=${HOME}/nco/data --libdir=${HOME}/lib --mandir=${HOME}/man > nco.configure.${GNU_TRP}.foo 2>&1
-/bin/cp -f config.log nco.config.log.${GNU_TRP}.foo
-/bin/cp -f libtool nco.libtool.${GNU_TRP}.foo
-make clean;make > nco.make.${GNU_TRP}.foo 2>&1
-make check >> nco.make.${GNU_TRP}.foo 2>&1
-make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on aims4:
+# Sysadmin upgrade request: 
+# Latest sysadmin-compiled module usage: 
+# Personal recipe last used successfully: 20170315
 export GNU_TRP=`~/nco/autobld/config.guess`
 cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/usr/local/uvcdat/2016-01-21/Externals' UDUNITS2_PATH='/usr/local/uvcdat/2016-01-21/Externals' ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.${GNU_TRP}.foo 2>&1
@@ -368,9 +360,11 @@ ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/usr/local/uvcdat/2016-01-21/
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
-# gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on blues
+# gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on blues/anvil
+# Sysadmin upgrade request: support at lcrc.anl.gov
+# Latest sysadmin-compiled module usage: soft add +nco-4.6.5 # 20170316
 # fails to link to udunits...why?
 # nm -a /soft/udunits/2.1.21/lib/libudunits2.a | grep ut_read_xml
 # First use: 20161223 Latest use: 20161223
@@ -386,7 +380,7 @@ ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/soft/netcdf_serial/4.3.3.1/g
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on pileus:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -397,18 +391,23 @@ ANTLR_ROOT=${HOME} CC='gcc' CXX='g++' NETCDF_ROOT='/opt/ACME/uvcdat-2.2-build/in
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # icc/icpc 20160217 Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on yellowstone:
+# Sysadmin upgrade request: cislhelp at ucar.edu
+# Latest sysadmin-compiled module usage: module load nco/4.5.5 # 20160228
+# Personal recipe last used successfully: 20170315
 module add intel;module add gsl;module add netcdf/4.3.0;
 export PATH=${PATH}:/glade/apps/opt/netcdf/4.3.0/intel/12.1.5/bin # needed for ncgen
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/glade/apps/opt/netcdf/4.3.0/intel/12.1.5/lib # needed to run NCO
-git reset --hard origin/master
+cd ~/nco;git reset --hard origin/master
 cd ~/nco/bld;make NETCDF_ROOT='/glade/apps/opt/netcdf/4.3.0/intel/default' UDUNITS_INC='/glade/apps/opt/udunits/2.1.24/intel/12.1.4/include' UDUNITS_LIB='/glade/apps/opt/udunits/2.1.24/intel/12.1.4/lib' OPTS=D allinone;cd -
 
 # gcc/g++ 20160107 Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on rhea:
-# Latest sysadmin-compiled module usage: module load nco/4.6.4 # 20170215
-# Recipe last used successfully: 20170308
+# Sysadmin upgrade request: https://www.olcf.ornl.gov/support/submit-ticket
+# Latest ticket: 347675 on 20170316
+# Latest sysadmin-compiled module usage: module load nco/4.6.5 # 20170411
+# Personal recipe last used successfully: 20170315
 export LINUX_CC='gcc -std=c99 -pedantic -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE'
 export LINUX_CXX='g++ -std=c++11'
 export LINUX_FC='gfortran'
@@ -422,6 +421,10 @@ cd ~/nco;git reset --hard origin/master
 cd ~/nco/bld;make ANTLR_ROOT=${HOME} NETCDF_ROOT='/sw/redhat6/netcdf/4.3.3.1/rhel6.6_gcc4.8.2--with-dap+hdf4' SZ=Y SZ_LIB='/sw/redhat6/szip/2.1/rhel6.6_gnu4.8.2/lib' UDUNITS_INC='/sw/redhat6/udunits/2.1.24/rhel6.4_intel13.1.3/include' UDUNITS_LIB='/sw/redhat6/udunits/2.1.24/rhel6.4_intel13.1.3/lib' OPTS=D OMP=Y allinone;cd -
 
 # gcc/g++ 20160420 Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on titan:
+# Sysadmin upgrade request: https://www.olcf.ornl.gov/support/submit-ticket
+# Latest ticket: 347675 on 20170316
+# Latest sysadmin-compiled module usage: module load nco/4.6.5 # 20170411
+# Personal recipe last used successfully: 20170315
 export LINUX_CC='gcc -std=c99 -pedantic -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE'
 module add gcc # change GCC from v 4.3.4 to 4.9.0
 #module add gsl # not used yet
@@ -454,7 +457,7 @@ CC='icc' CXX='icpc' NETCDF_ROOT='/ccs/proj/cli900/sw/redhat/netcdf/4.3.3.1/rhel6
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Sysadmins: use this to install/update NCO in /opt/nco
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -465,7 +468,7 @@ cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 sudo make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Sysadmins: use this to install/update NCO in /usr/local
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -476,7 +479,7 @@ cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 sudo make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # g++/g++ Zender uses this to compile NCO with g++ (not recommended!) instead of gcc
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -487,7 +490,7 @@ CC='g++' CXX='g++' ./configure --disable-shared --disable-udunits --enable-optim
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to compile NCO with GCC and netCDF4
 # --enable-optimize-custom fails with netCDF4 which shadows "access" variable
@@ -499,7 +502,7 @@ CC='gcc' CXX='g++' NETCDF4_ROOT='/usr/local/netcdf4' ./configure --enable-netcdf
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 gcc/g++ Developers use --enable-maintainer-mode to verify auto-tools work correctly, and to mandate rebuilding of "special files" (ncap_yacc.c, ncap_lex.c) correctly:
 (requires complete, up-to-date, GNU development toolchain):
@@ -518,7 +521,7 @@ autoconf # Create ./configure from ./configure.ac
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 como:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -528,7 +531,7 @@ CC='como --c99' CXX='como' ./configure --disable-shared --enable-optimize-custom
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 icc:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -538,7 +541,7 @@ CC='icc' CPPFLAGS="-I${IA32ROOT}/include -I${IA32ROOT}/include/c++" CXX='icpc' L
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 pathcc:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -548,7 +551,7 @@ CC='pathcc' CXX='pathCC' ./configure --disable-shared --enable-optimize-custom -
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 pgcc:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -558,7 +561,7 @@ CC='pgcc' CXX='pgCC' ./configure --disable-shared --enable-optimize-custom --pre
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 pgcc on mpc64.nacs.uci.edu (C-shell environment):
 setenv GNU_TRP `${HOME}/nco/autobld/config.guess`
@@ -573,7 +576,7 @@ env ANTLR_ROOT='/software/antlr' CC='pgcc' CXX='pgCC' PATH=${PATH}\:'/software/n
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End LINUX
 ************************************************************************
@@ -622,7 +625,7 @@ CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' ./configure --prefix=${HOME} --bindir=$
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Sysadmins use/modify this to install/update NCO in /usr/local, based on netCDF4 also in /usr/local (works on givre 20100727):
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -633,7 +636,7 @@ CPPFLAGS='-DHAVE_NETCDF4_H -I/usr/local/include' LDFLAGS='-L/usr/local/lib' ./co
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 sudo make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to debug NCO with pre-built (i.e., yum/dnf install'd or aptitude install'd) netCDF in /usr (frazil, glace)
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -644,7 +647,7 @@ CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' NETCDF_INC='/usr/include' NETCDF_LIB='/
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to debug NCO with custom-install netCDF (and ESMF) binaries in /usr/local (givre, roulee, grele)
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -655,7 +658,7 @@ CC='gcc' CXX='g++' NETCDF_INC='/usr/local/include' NETCDF_LIB='/usr/local/lib' .
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to debug NCO with pre-built netCDF binaries in /usr (frazil, skyglow)
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -666,7 +669,7 @@ CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' NETCDF_INC='/usr/include' NETCDF_LIB='/
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # gcc/g++ Zender uses this to debug NCO with pre-built netCDF (and ESMF) binaries in /opt/local (this works on MACOSX with MacPorts, e.g., aerosol, firn)
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -678,7 +681,7 @@ CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' ESMF_INC='/opt/local/include' ESMF_LIB=
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 # g++/g++ Zender uses this to compile NCO with _g++_ (not recommended for normal use)
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -689,7 +692,7 @@ CC='g++' CFLAGS='' CXX='g++' CXXFLAGS='' ./configure --disable-udunits --enable-
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 pgcc/pgCC:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -700,7 +703,7 @@ CC='pgcc' CFLAGS='-fast -fPIC' CXX='pgCC' CXXFLAGS='-fast -fPIC' ./configure --p
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.libtool.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End LINUXAMD64
 ************************************************************************
@@ -720,7 +723,7 @@ cd ~/nco;/bin/rm -f *.${GNU_TRP}.foo;make distclean
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 zender at usf-cf-alpha-linux-1:~/nco/bld$ ./pvmgetarch;uname -a;~/nco/autobld/config.guess
 LINUXALPHA
@@ -733,7 +736,7 @@ NETCDF_INC=${HOME}/include NETCDF_LIB=${HOME}/lib/${GNU_TRP} ./configure --enabl
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End LINUXALPHA
 ************************************************************************
@@ -754,7 +757,7 @@ NETCDF_INC=${HOME}/include NETCDF_LIB=${HOME}/lib/${GNU_TRP} ./configure --enabl
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End LINUXPPC
 ************************************************************************
@@ -775,7 +778,7 @@ NETCDF_INC=${HOME}/include NETCDF_LIB=${HOME}/lib/${GNU_TRP} ./configure --enabl
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End LINUXSPARC64
 ************************************************************************
@@ -802,7 +805,7 @@ NETCDF_INC=${HOME}/include NETCDF_LIB=${HOME}/lib ./configure --disable-regex --
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End MACOSX
 ************************************************************************
@@ -824,7 +827,7 @@ CC='cc -c99' CFLAGS='-64 -mips4' CXX='CC -64 -LANG:std' CXXFLAGS='-64 -mips4 -LA
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 cc/CC ABI32:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -834,7 +837,7 @@ CC='cc -c99' CXX='CC' CXXFLAGS='-LANG:std' LDFLAGS='-LANG:std' NETCDF_INC='/usr/
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 gcc/g++ ABI32:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -844,7 +847,7 @@ CC='gcc' CXX='g++' NETCDF_INC='/usr/local/include' ./configure --disable-ncoxx -
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End SGIMP64
 ************************************************************************
@@ -868,7 +871,7 @@ CC='/opt/SUNWspro/bin/cc' CPPFLAGS='-DNC_64BIT_OFFSET=0' CXX='/opt/SUNWspro/bin/
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 For ABI=32:
 cc/CC:
@@ -879,7 +882,7 @@ CC='/opt/SUNWspro/bin/cc' CPPFLAGS='-DNC_64BIT_OFFSET=0' CXX='/opt/SUNWspro/bin/
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 
 gcc/g++:
 export GNU_TRP=`~/nco/autobld/config.guess`
@@ -889,7 +892,7 @@ CC='gcc' CPPFLAGS='-DNC_64BIT_OFFSET=0' CXX='g++' ./configure --enable-optimize-
 make clean;make > nco.make.${GNU_TRP}.foo 2>&1
 make check >> nco.make.${GNU_TRP}.foo 2>&1
 make install >> nco.make.${GNU_TRP}.foo 2>&1
-scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:/var/www/html/nco/rgr
+scp nco.configure.${GNU_TRP}.foo nco.config.log.${GNU_TRP}.foo nco.make.${GNU_TRP}.foo dust.ess.uci.edu:Sites/nco/rgr
 ************************************************************************
 End SUNMP
 ************************************************************************
diff --git a/data/buggy.cdl b/data/buggy.cdl
index ffcd71f..e4a25b7 100644
--- a/data/buggy.cdl
+++ b/data/buggy.cdl
@@ -36,9 +36,10 @@ netcdf buggy {
  att_var:ubyte_att = 0ub, 1ub, 2ub, 127ub, 128ub, 254ub, 255ub, 0ub; // 20130712: ncgen 4.3.0 translates this to byte
  att_var:ubyte2_att = '\000','\001','\002','\177','\200','\201','\376','\377'; // 20130712: ncgen 4.3.0 translates this to byte
  att_var:ushort_att = 37us;
- att_var:uint_att = 73u;
- att_var:int64_att = 9223372036854775807l; // 20130712: ncgen 4.3.0 chokes on ll, LL suffix for int64 attributes, and translates -l suffixed numbers to NC_UINT64. Bug reported (netCDF #HEX-795132) and fixed in snapshot 20131117
- att_var:uint64_att = 18446744073709551615ul; // 20130712: ncgen 4.3.0 chokes on ull, ULL suffix for uint64 attributes, 20131120: XML treats unsigned as signed types, so toolsui produces errors when reading maximum uint64 values (though not when reading maxium ubyte, ushort, and uint values)
+ att_var:uint_att = 73u; // 20170322: ncgen 4.4.1 converts u-suffixed numbers to uint64 type instead of uint32. Counter-intuitive. Regular uint=uint32 must be obtained by ul suffix. 
+ att_var:uint_att2 = 73ul;
+ att_var:int64_att = 9223372036854775807ll; // 20130712: ncgen 4.3.0 chokes on ll, LL suffix for int64 attributes, and translates l-suffixed numbers to NC_UINT64. Bug reported (netCDF #HEX-795132) and fixed in snapshot 20131117
+ att_var:uint64_att = 18446744073709551615ull; // 20130712: ncgen 4.3.0 chokes on ull, ULL suffix for uint64 attributes, 20131120: XML treats unsigned as signed types, so toolsui produces errors when reading maximum uint64 values (though not when reading maximum ubyte, ushort, and uint values), 20170322: ncgen 4.4.1 works fine with ull
  att_var:string_att1 = "20130723: ncgen -k netCDF-4 version 4.0.x converts quoted string to NC_STRING not NC_CHAR. Incompatible with classic behavior.";
  att_var:string_att2 = "20130712: ncgen -k netCDF-4 version 4.2.x+ converts quoted string to NC_CHAR not NC_STRING. Backwards compatible with classic behavior.";
   string att_var:string_att3 = "20130723: Prefixing full attribute name with \"string\" causes CDL to produce NC_STRING.";
diff --git a/data/in_grp.cdl b/data/in_grp.cdl
index 860e1c3..7607a94 100644
--- a/data/in_grp.cdl
+++ b/data/in_grp.cdl
@@ -42,6 +42,7 @@ netcdf in_grp {
   lat=2;
   lev=3;
   lon=4;
+  coord=2;
   time=unlimited; 
   vrt_nbr=2;
   gds_crd=8;
@@ -80,6 +81,9 @@ netcdf in_grp {
   float area(lat);
   area:units = "meter2";
 
+  float non_coord(coord);
+ non_coord:purpose = "Test whether netCDF4 supports renaming non-coordinates to coordinates";
+  
   float one;
   
   float val_one_mss(lat);
diff --git a/data/ncclimo b/data/ncclimo
index e8b40fd..060a02f 100755
--- a/data/ncclimo
+++ b/data/ncclimo
@@ -178,7 +178,7 @@ esac # !HOSTNAME
 # ncclimo -C ann -m cism -h h -c b.e10.BG20TRCN.f09_g16.002 -s 1851 -e 1852 -i /lustre/atlas1/cli115/proj-shared/4ue/data/for_charlie -o ${DATA}/ne30/clm > ~/ncclimo.out 2>&1 &
 
 # 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 FSNT,AODVIS,TREFHT -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 --var_lst=FSNT,AODVIS --caseid=famipc5_ne30_v0.3_00003 --yr_srt=1980 --yr_end=1983 --drc_in=${DATA}/ne30/raw --drc_out=${DATA}/ne30/clm --rgr_map=${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
 # ncclimo > ~/ncclimo.out 2>&1 &
@@ -207,6 +207,8 @@ esac # !HOSTNAME
 # ncclimo --dbg=1 -s 1979 -e 1979 --var=FSNT,AODVIS,T --map=${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc --drc_out=${DATA}/ne30/clm ${DATA}/ne30/raw/famipc5_ne30_v0.3_00003.cam.h0.1979-??.nc
 # Split directory:
 # ncclimo --dbg=1 --ypf=50 -s 1979 -e 1983 --var=FSNT,AODVIS --map=${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc --drc_in=${DATA}/ne30/raw --drc_out=${DATA}/ne30/clm
+# Split all
+# cd ${DATA}/ne30/raw;ls *1979-??*.nc *198[01]-??*.nc | ncclimo --dbg=1 -s 1979 -e 1981 --map=${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc --drc_out=${DATA}/ne30/clm
 # Split production:
 # cd /scratch2/scratchdirs/golaz/ACME_simulations/20161117.beta0.A_WCYCL1850S.ne30_oEC_ICG.edison/run;ls *cam.h0.000[1-9]* | ncclimo --dbg=1 --yr_srt=1 --yr_end=9 --var=FSNT,AODVIS,T --map=${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc --drc_out=${DATA}/ne30/clm > ~/ncclimo.out 2>&1 &
 # cd /scratch2/scratchdirs/golaz/ACME_simulations/20161117.beta0.A_WCYCL1850S.ne30_oEC_ICG.edison/run;ls *cam.h0.0[012]??* | ncclimo --dbg=1 --yr_srt=1 --yr_end=250 --var=FSNT,AODVIS,T --map=${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc --drc_out=${DATA}/ne30/clm > ~/ncclimo.out 2>&1 &
@@ -399,11 +401,14 @@ mpi_flg='No' # [sng] Parallelize over nodes
 nco_opt='--no_tmp_fl' # [sng] NCO options (e.g., '-7 -D 1 -L 1')
 ncr_flg='No' # [sng] Incremental method
 nd_nbr=1 # [nbr] Number of nodes
+no_ntv_tms='No' # [flg] Omit native-grid split timeseries
 par_opt='' # [sng] Parallel options to shell
 par_typ='bck' # [sng] Parallelism type
 rgr_map='' # [sng] Regridding map
 #rgr_map="${DATA}/maps/map_ne30np4_to_fv129x256_aave.20150901.nc"
 rgr_opt='' # [sng] Regridding options (e.g., '--rgr col_nm=lndgrid', '--rgr col_nm=nCells')
+spl_opt='' # [sng] Splitter options (non-MPAS only) (e.g., '--no_cll_msr')
+spl_rgr_opt='--rgr no_stagger=Y' # [sng] Splitter regridding options
 sbs_flg='No' # [sng] Split (subset) climatologies
 thr_nbr=2 # [nbr] Thread number for regridder
 tpd_out=1 # [nbr] Timesteps-per-day in ouput
@@ -434,11 +439,15 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     echo "${fnt_rvr}-l${fnt_nrm} ${fnt_bld}lnk_flg${fnt_nrm}  Link ACME-climo to AMWG-climo filenames (default ${fnt_bld}${lnk_flg}${fnt_nrm}) [${fnt_tlc}lnk_flg, link_flag, no_amwg_links${fnt_nrm}]"
     echo "${fnt_rvr}-m${fnt_nrm} ${fnt_bld}mdl_nm${fnt_nrm}   Model name (default ${fnt_bld}${mdl_nm}${fnt_nrm}) [${fnt_tlc}mdl_nm, model_name, model${fnt_nrm}]"
     echo "${fnt_rvr}-n${fnt_nrm} ${fnt_bld}nco_opt${fnt_nrm}  NCO options (empty means none) (default ${fnt_bld}${nco_opt}${fnt_nrm}) [${fnt_tlc}nco_opt, nco, nco_options${fnt_nrm}]"
+    echo " ${fnt_bld}--no_cll_msr${fnt_nrm}  Omit cell_measures variables (e.g., 'area') [${fnt_tlc}no_area, no_cll_msr, no_cell_measures${fnt_nrm}]"
+    echo " ${fnt_bld}--no_frm_trm${fnt_nrm}  Omit formula_terms variables (e.g., 'hyba', 'PS') [${fnt_tlc}no_frm_trm, no_frm, no_formula_terms${fnt_nrm}]"
+    echo " ${fnt_bld}--no_ntv_tms${fnt_nrm}  Omit native-grid timeseries (splitter only) [${fnt_tlc}no_ntv_tms, no_ntv, no_native${fnt_nrm}]"
+    echo " ${fnt_bld}--no_stg_grd${fnt_nrm}  Omit staggered grid variables ('slat, slon, w_stag') [${fnt_tlc}no_stg_grd, no_stg, no_stagger, no_staggered_grid${fnt_nrm}]"
     echo "${fnt_rvr}-O${fnt_nrm} ${fnt_bld}drc_rgr${fnt_nrm}  Regridded directory (default ${fnt_bld}${drc_rgr}${fnt_nrm}) [${fnt_tlc}drc_rgr, rgr_drc, dir_regrid, regrid${fnt_nrm}]"
     echo "${fnt_rvr}-o${fnt_nrm} ${fnt_bld}drc_out${fnt_nrm}  Output directory (default ${fnt_bld}${drc_out}${fnt_nrm}) [${fnt_tlc}drc_out, out_drc, dir_out, out_dir, output${fnt_nrm}]"
     echo "${fnt_rvr}-p${fnt_nrm} ${fnt_bld}par_typ${fnt_nrm}  Parallelism type (default ${fnt_bld}${par_typ}${fnt_nrm}) [${fnt_tlc}par_typ, par_md, parallel_type, parallel_mode, parallel${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}) [${fnt_tlc}rgr_map, regrid_map$, map, map_file, map_fl]"
     echo "${fnt_rvr}-R${fnt_nrm} ${fnt_bld}rgr_opt${fnt_nrm}  Regrid options (empty means none) (default ${fnt_bld}${rgr_opt}${fnt_nrm}) [${fnt_tlc}rgr_opt, regrid_options${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}) [${fnt_tlc}rgr_map, regrid_map$, map, map_file, map_fl${fnt_nrm}]"
     echo "${fnt_rvr}-S${fnt_nrm} ${fnt_bld}yr_srt${fnt_nrm}   Start year previous climo (empty means none) (default ${fnt_bld}${yr_srt_prv}${fnt_nrm}) [${fnt_tlc}yr_srt_prv, prv_yr_srt, previous_start${fnt_nrm}]"
     echo "${fnt_rvr}-s${fnt_nrm} ${fnt_bld}yr_srt${fnt_nrm}   Start year (default ${fnt_bld}${yr_srt}${fnt_nrm}) [${fnt_tlc}yr_srt, start_yr, year_start, start_year, start${fnt_nrm}]"
     echo " ${fnt_bld}--std_flg${fnt_nrm}  Stdin used for input (default ${fnt_bld}${inp_std}${fnt_nrm}) [${fnt_tlc}stdin, std_flg, inp_std, redirect, standard_input${fnt_nrm}]"
@@ -564,6 +573,14 @@ while getopts :a:C:c:d:E:e:f:h:i:j:l:m:n:O:o:p:R:r:S:s:t:v:X:x:Y:y:-: OPT; do
 	       lnk_flg=?* | link_flag=?* | no_amwg_link=?* | no_amwg_links=?* | no_AMWG_link=?* | no_AMWG_links=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # -l # Link ACME to AMWG name
 	       mdl_nm=?* | model_name=?* | model=?* ) mdl_nm="${LONG_OPTARG}" ;; # -m # Model name
 	       nco_opt=?* | nco=?* | nco_options=?* ) nco_opt="${LONG_OPTARG}" ;; # -n # NCO options
+	       no_area | no_cll_msr | no_cell_measures ) no_cll_msr='Yes' ;; # # Omit cell_measures variables
+	       no_area=?* | no_cell_msr=?* | no_cell_measures=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Omit cell_measures variables
+	       no_frm_trm | no_frm | no_formula_terms ) no_frm_trm='Yes' ;; # # Omit formula_terms variables
+	       no_frm_trm=?* | no_frm=?* | no_formula_terms=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Omit formula_terms variables
+	       no_ntv_tms | no_ntv | no_native | no_native_timeseries | delete_native ) no_ntv_tms='Yes' ;; # # Omit native-grid split files
+	       no_ntv_tms=?* | no_ntv=?* | no_native=?* | no_native_timeseries=?* | delete_native=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Omit native-grid split files
+	       no_stg_grd | no_stg | no_stagger | no_staggered_grid ) no_stg_grd='Yes' ;; # # Omit staggered grid variables
+	       no_stg_grd=?* | no_stg=?* | no_stagger=?* | no_staggered_grid ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Omit staggered grid variables
 	       drc_out=?* | out_drc=?* | dir_out=?* | out_dir=?* | output=?* ) drc_out_usr="${LONG_OPTARG}" ;; # -o # Output directory
 	       drc_rgr=?* | rgr_drc=?* | dir_regrid=?* | regrid_dir=?* | regrid=?* ) drc_rgr_usr="${LONG_OPTARG}" ;; # -O # Regridded directory
 	       par_typ=?* | par_md=?* | parallel_type=?* | parallel_mode=?* | parallel=?* ) par_typ="${LONG_OPTARG}" ;; # -p # Parallelism type
@@ -571,9 +588,9 @@ while getopts :a:C:c:d:E:e:f:h:i:j:l:m:n:O:o:p:R:r:S:s:t:v:X:x:Y:y:-: OPT; do
 	       rgr_map=?* | regrid_map=?* | map=?* ) rgr_map="${LONG_OPTARG}" ;; # -r # Regridding map
 	       yr_srt_prv=?* | prv_yr_srt=?* | previous_start=?* ) yr_srt_prv="${LONG_OPTARG}" ;; # -S # Start year previous
 	       yr_srt=?* | start_yr=?* | year_start=?* | start_year=?* | start=?* ) yr_srt="${LONG_OPTARG}" ;; # -s # Start year
-	       thr_nbr=?* | thread_number=?* | thread=?* | threads=?* ) thr_usr="${LONG_OPTARG}" ;; # -t # Thread number
 	       stdin | inp_std | std_flg | redirect | standard_input ) inp_std='Yes' ;; # # Input file list from stdin
 	       stdin=?* | inp_std=?* | std_flg=?* | redirect=?* | standard_input=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Input file list from stdin
+	       thr_nbr=?* | thread_number=?* | thread=?* | threads=?* ) thr_usr="${LONG_OPTARG}" ;; # -t # Thread number
 	       tpd_out=?* | tpd=?* | timesteps_per_day=?* ) tpd_out="${LONG_OPTARG}" ;; # # Timesteps-per-day in output
 	       var_lst=?* | variable_list=?* | var=?* | vars=?* | variable=?* | variables=?* ) var_lst="${LONG_OPTARG}" ;; # -v # Variables
 	       version | vrs | config | configuration | cnf ) vrs_prn='Yes' ;; # # Print version information
@@ -687,7 +704,7 @@ else
 	mdl_nm='nil' # Unset model name for stdin pipe and positional arguments, otherwise default mdl_nm could be used to add model-specific variables to var_lst_xtn
     fi # !stdin || !psn
     if [ -n "${ypf_max_usr}" ]; then 
-	# fxm: Must specify --ypf to turn-on split mode when input files are specified by -i drc_in
+	# fxm: Must specify --ypf to turn-on splitter mode when input files are specified by -i drc_in
 	# Otherwise it is ambiguous whether to generate climatology or to split
 	ypf_max=${ypf_max_usr}
 	sbs_flg='Yes'
@@ -801,12 +818,24 @@ fi # !gaa_sng
 if [ -n "${job_usr}" ]; then 
     job_nbr="${job_usr}"
 fi # !job_usr
+if [ ${dbg_lvl} -ge 2 ]; then
+    nco_opt="-D ${dbg_lvl} ${nco_opt}"
+fi # !dbg_lvl
 if [ -n "${var_lst}" ] && [ "${sbs_flg}" != 'Yes' ]; then
     nco_opt="${nco_opt} -v ${var_lst}"
 fi # !var_lst
 if [ -n "${hdr_pad}" ]; then
     nco_opt="${nco_opt} --hdr_pad=${hdr_pad}"
 fi # !hdr_pad
+if [ "${no_cll_msr}" = 'Yes' ]; then 
+    spl_opt="${spl_opt} --no_cll_msr"
+fi # !no_cll_msr
+if [ "${no_frm_trm}" = 'Yes' ]; then 
+    spl_opt="${spl_opt} --no_frm_trm"
+fi # !no_frm_trm
+if [ "${no_stg_grd}" = 'Yes' ]; then 
+    spl_rgr_opt=''
+fi # !no_stg_grd
 if [ "${par_typ}" = 'bck' ]; then 
     par_opt=' &'
     par_opt_cf=''
@@ -902,9 +931,12 @@ fi # !inp_std
 # Parse grid/map arguments before in_fl arguments so we know whether this could be a map-only invocation
 if [ "${sbs_flg}" = 'Yes' ]; then
     if [ -z "${var_lst}" ]; then
-	echo "${spt_nm}: ERROR Split mode requires variable list"
-	echo "${spt_nm}: HINT Supply the variable list with -v var_lst"
-	exit 1
+	echo "${spt_nm}: WARNING Splitter mode without explicitly specified variable list (i.e., -v var_lst) splits all variables of rank >= 2 into separate files, thus doubling the on-disk data amount"
+#	echo "${spt_nm}: ERROR Splitter mode requires explicitly specified variable list"
+#	echo "${spt_nm}: HINT Supply the variable list with -v var_lst"
+#	exit 1
+	var_lst=`ncks --lst_rnk_ge2 ${fl_in[0]}`
+	echo "${var_lst}"
     fi # !var_lst
     # http://stackoverflow.com/questions/27702452/loop-through-a-comma-separated-shell-variable
     var_nbr=0 # [sng] Split (subset) files
@@ -1082,6 +1114,7 @@ if [ ${dbg_lvl} -ge 2 ]; then
     printf "dbg: par_typ  = ${par_typ}\n"
     printf "dbg: rgr_map  = ${rgr_map}\n"
     printf "dbg: rgr_sfx  = ${rgr_sfx}\n"
+    printf "dbg: no_ntv   = ${no_ntv_tms}\n"
     printf "dbg: sbs_flg  = ${sbs_flg}\n"
     printf "dbg: thr_nbr  = ${thr_nbr}\n"
     printf "dbg: var_lst  = ${var_lst}\n"
@@ -1165,16 +1198,16 @@ if [ "${sbs_flg}" = 'Yes' ]; then
     printf "Input to split comprises ${yr_sbs} years of contiguous raw data touching ${yr_cln} calendar years from YYYYMM = ${yyyy_clm_srt_dec}${mm_ann_srt} to ${yyyy_end}${mm_ann_end}\n"
     if [ ${sgm_nbr} -gt 1 ]; then
 	if [ ${sgm_flg} = 'Yes' ]; then 
-	    printf "Will split data into ${sgm_nbrm1} segment(s) of length ${ypf_max} years and 1 segment of length ${sgm_rmd} year(s)\n"
+	    printf "Will split data into ${sgm_nbrm1} timeseries segment(s) of length ${ypf_max} years and 1 segment of length ${sgm_rmd} year(s)\n"
 	else
-	    printf "Will split data into ${sgm_nbr} segment(s) of length ${ypf_max} years\n"
+	    printf "Will split data into ${sgm_nbr} timeseries segment(s) of length ${ypf_max} years\n"
 	fi # !sgm_flg
     else # !sgm_nbr
-	printf "Will place all output into one segment of length ${yr_sbs} years\n"
+	printf "Will split data into one timeseries of length ${yr_sbs} years\n"
     fi # !sgm_nbr
-    printf "Output files to directory ${drc_out}\n"
+    printf "Native-grid split files to directory ${drc_out}\n"
     if [ -n "${rgr_map}" ]; then 
-	printf "Split files will also be regridded\n"
+	printf "Regridded split files to directory ${drc_rgr}\n"
     else
 	printf "Split files will not be regridded\n"
     fi # !rgr
@@ -1388,7 +1421,7 @@ if [ "${sbs_flg}" = 'Yes' ]; then
 	let idx_end=$((job_nbr-1))
 	for ((var_idx=0;var_idx<var_nbr;var_idx++)); do
 	    fl_out[${var_idx}]="${fl_out_tpl[${sgm_idx}]/var_nm_tpl/${var_sbs[${var_idx}]}}"
-	    cmd_sbs[${var_idx}]="${cmd_mpi[${var_idx}]} ncrcat -O -v ${var_sbs[${var_idx}]}${var_lst_xtn} ${nco_opt} ${gaa_sng} ${fl_sgm[${sgm_idx}]} ${fl_out[${var_idx}]}"
+	    cmd_sbs[${var_idx}]="${cmd_mpi[${var_idx}]} ncrcat -O -v ${var_sbs[${var_idx}]}${var_lst_xtn} ${nco_opt} ${spl_opt} ${gaa_sng} ${fl_sgm[${sgm_idx}]} ${fl_out[${var_idx}]}"
 	    if [ ${dbg_lvl} -ge 1 ]; then
 		echo ${cmd_sbs[${var_idx}]}
 	    fi # !dbg
@@ -1452,7 +1485,7 @@ if [ "${sbs_flg}" = 'Yes' ]; then
 	    let idx_end=$((job_nbr-1))
 	    for ((var_idx=0;var_idx<var_nbr;var_idx++)); do
 		fl_rgr[${var_idx}]="${fl_rgr_tpl[${sgm_idx}]/var_nm_tpl/${var_sbs[${var_idx}]}}"
-		cmd_rgr[${var_idx}]="${cmd_mpi[${var_idx}]} ncks -t ${thr_nbr} -O ${nco_opt} ${rgr_opt} ${fl_out[${var_idx}]} ${fl_rgr[${var_idx}]}"
+		cmd_rgr[${var_idx}]="${cmd_mpi[${var_idx}]} ncks -t ${thr_nbr} -O ${nco_opt} ${rgr_opt} ${spl_opt} ${spl_rgr_opt} ${fl_out[${var_idx}]} ${fl_rgr[${var_idx}]}"
 		if [ "${mdl_typ}" = 'mpas' ]; then
 		    cmd_rgr[${var_idx}]="${cmd_mpi[${var_idx}]} ncremap -C -u .pid${spt_pid}.split.${var_idx}.tmp -P mpas -t ${thr_nbr} -m ${rgr_map} -i ${fl_out[${var_idx}]} -o ${fl_rgr[${var_idx}]}"
 		fi # !mdl_typ
@@ -1512,6 +1545,14 @@ if [ "${sbs_flg}" = 'Yes' ]; then
 		    done # !pid_idx
 		fi # !bch_flg
 	    fi # !par_typ
+
+	    if [ "${no_ntv_tms}" = 'Yes' ]; then
+		# Omit native-grid split timeseries by moving fl_rgr to fl_out
+		for ((var_idx=0;var_idx<var_nbr;var_idx++)); do
+		    /bin/mv -f ${fl_rgr[${var_idx}]} ${fl_out[${var_idx}]}
+		done # !var_idx
+	    fi # !no_ntv_tms
+
 	fi # !rgr_map
 	
     done # !sgm_idx
diff --git a/data/ncremap b/data/ncremap
index a874289..e06cc51 100755
--- a/data/ncremap
+++ b/data/ncremap
@@ -246,6 +246,8 @@ fi # !TERM
 # Defaults for command-line options and some derived variables
 # Modify these defaults to save typing later
 alg_typ='bilinear' # [nbr] Algorithm for ESMF interpolation (bilinear|patch|neareststod|nearestdtos|conserve)
+bch_pbs='No' # [sng] PBS batch (non-interactive) job
+bch_slr='No' # [sng] SLURM batch (non-interactive) job
 cln_flg='Yes' # [flg] Clean-up (remove) intermediate files before exiting
 clm_flg='No' # [flg] Invoked by ncclimo script
 dbg_lvl=0 # [nbr] Debugging level
@@ -270,6 +272,10 @@ grd_src_xmp='grd_src.nc' # [sng] Source grid-file for examples
 hdr_pad='10000' # [B] Pad at end of header section
 in_fl='' # [sng] Input file
 in_xmp='in.nc' # [sng] Input file for examples
+inp_aut='No' # [sng] Input file list automatically generated (in ncclimo, or specified with -i in ncremap)
+inp_glb='No' # [sng] Input file list from globbing directory 
+inp_psn='No' # [sng] Input file list from positional arguments
+inp_std='No' # [sng] Input file list from stdin
 job_nbr=2 # [nbr] Job simultaneity for parallelism
 map_fl='' # [sng] Map-file
 map_xmp='map.nc' # [sng] Map-file for examples
@@ -332,12 +338,16 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     echo "${fnt_rvr}-M${fnt_nrm}          Multi-map-file toggle (unset means generate one map-file per input file) [${fnt_tlc}mlt_map, no_multimap${fnt_nrm}]"
     echo "${fnt_rvr}-m${fnt_nrm} ${fnt_bld}map_fl${fnt_nrm}   Map-file (empty means generate internally) (default ${fnt_bld}${map_fl}${fnt_nrm}) [${fnt_tlc}map_fl, map, map_file, rgr_map, regrid_map${fnt_nrm}]"
     echo "${fnt_rvr}-n${fnt_nrm} ${fnt_bld}nco_opt${fnt_nrm}  NCO options (empty means none) (default ${fnt_bld}${nco_opt}${fnt_nrm}) [${fnt_tlc}nco_opt, nco_options${fnt_nrm}]"
+    echo " ${fnt_bld}--no_cll_msr${fnt_nrm}  Omit cell_measures variables (e.g., 'area') [${fnt_tlc}no_area, no_cll_msr, no_cell_measures${fnt_nrm}]"
+    echo " ${fnt_bld}--no_frm_trm${fnt_nrm}  Omit formula_terms variables (e.g., 'hyba', 'PS') [${fnt_tlc}no_frm_trm, no_formula_terms${fnt_nrm}]"
+    echo " ${fnt_bld}--no_stg_grd${fnt_nrm}  Omit staggered grid variables ('slat, slon, w_stag') [${fnt_tlc}no_stg_grd, no_stg, no_stagger, no_staggered_grid${fnt_nrm}]"
     echo "${fnt_rvr}-O${fnt_nrm} ${fnt_bld}drc_out${fnt_nrm}  Output directory (default ${fnt_bld}${drc_out}${fnt_nrm}) [${fnt_tlc}drc_out, out_drc, dir_out, out_dir, output${fnt_nrm}]"
     echo "${fnt_rvr}-o${fnt_nrm} ${fnt_bld}out_fl${fnt_nrm}   Output-file (regridded file) (empty copies Input filename) (default ${fnt_bld}${out_fl}${fnt_nrm}) [${fnt_tlc}out_fl, out_file, output_file${fnt_nrm}]"
     echo "${fnt_rvr}-P${fnt_nrm} ${fnt_bld}pdq_typ${fnt_nrm}  Permutation type (empty means none) (default ${fnt_bld}${pdq_typ}${fnt_nrm}) [${fnt_tlc}pdq_typ, prm_typ, permutation, permute${fnt_nrm}]"
     echo "${fnt_rvr}-p${fnt_nrm} ${fnt_bld}par_typ${fnt_nrm}  Parallelism type (default ${fnt_bld}${par_typ}${fnt_nrm}) [${fnt_tlc}par_typ, par_md, parallel_type, parallel_mode, parallel${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}) [${fnt_tlc}rgr_opt, regrid_options${fnt_nrm}]"
     echo "${fnt_rvr}-s${fnt_nrm} ${fnt_bld}grd_src${fnt_nrm}  Grid-file (source) (empty means infer or use map_fl) (default ${fnt_bld}${grd_src}${fnt_nrm}) [${fnt_tlc}grd_src, grid_source, source_grid, src_grd${fnt_nrm}]"
+    echo " ${fnt_bld}--std_flg${fnt_nrm}  Stdin used for input (default ${fnt_bld}${inp_std}${fnt_nrm}) [${fnt_tlc}stdin, std_flg, inp_std, redirect, standard_input${fnt_nrm}]"
     echo "${fnt_rvr}-T${fnt_nrm} ${fnt_bld}tps_opt${fnt_nrm}  TempestRemap GenerateOfflineMap options (default ${fnt_bld}${tps_opt}${fnt_nrm}) [${fnt_tlc}tps_opt, tempest_opt, tempest, tempest_options${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}) [${fnt_tlc}thr_nbr, thread_number, thread, threads${fnt_nrm}]"
     echo "${fnt_rvr}-U${fnt_nrm} ${fnt_bld}drc_tmp${fnt_nrm}  Temporary directory (for intermediate files) (default ${fnt_bld}${drc_tmp}${fnt_nrm}) [${fnt_tlc}drc_tmp, tmp_drc, dir_tmp, tmp_dir, tmp${fnt_nrm}]"
@@ -439,12 +449,20 @@ while getopts :a:CD:d:E:f:g:G:h:I:i:j:Mm:n:O:o:P:p:R:s:T:t:U:u:V:v:w:x:-: OPT; d
 	       mlt_map=?* | multimap=?* | no_multimap=?* | nomultimap=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # -M # Multi-map flag
 	       map_fl=?* | map=?* | map_file=?* | rgr_map=?* | regrid_map=?* ) map_fl="${LONG_OPTARG}" ;; # -m # Map-file
 	       nco_opt=?* | nco=?* | nco_options=?* ) nco_usr="${LONG_OPTARG}" ;; # -n # NCO options
+	       no_area | no_cll_msr | no_cell_measures ) no_cll_msr='Yes' ;; # # Omit cell_measures variables
+	       no_area=?* | no_cell_msr=?* | no_cell_measures=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Omit cell_measures variables
+	       no_frm_trm | no_frm | no_formula_terms ) no_frm_trm='Yes' ;; # # Omit formula_terms variables
+	       no_frm_trm=?* | no_frm=?* | no_formula_terms=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Omit formula_terms variables
+	       no_stg_grd | no_stg | no_stagger | no_staggered_grid ) no_stg_grd='Yes' ;; # # Omit staggered grid variables
+	       no_stg_grd=?* | no_stg=?* | no_stagger=?* | no_staggered_grid ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Omit staggered grid variables
 	       drc_out=?* | out_drc=?* | dir_out=?* | out_dir=?* | output=?* ) drc_usr="${LONG_OPTARG}" ;; # -O # Output directory
 	       out_fl=?* | output_file=?* | out_file=?* ) out_fl="${LONG_OPTARG}" ;; # -o # Output file
 	       pdq_typ=?* | prm_typ=?* | permutation=?* | permute=?* ) pdq_typ="${LONG_OPTARG}" ;; # -P # Permutation type
 	       par_typ=?* | par_md=?* | parallel_type=?* | parallel_mode=?* | parallel=?* ) par_typ="${LONG_OPTARG}" ;; # -p # Parallelism type
 	       rgr_opt=?* | regrid_options=?* ) rgr_opt="${LONG_OPTARG}" ;; # -R # Regridding options
 	       grd_src=?* | grid_source=?* | source_grid=?* | src_grd=?* ) grd_src="${LONG_OPTARG}" ;; # -s # Source grid-file
+	       stdin | inp_std | std_flg | redirect | standard_input ) inp_std='Yes' ;; # # Input file list from stdin
+	       stdin=?* | inp_std=?* | std_flg=?* | redirect=?* | standard_input=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Input file list from stdin
 	       tps_opt=?* | tempest_opt=?* | tempest=?* | tempest_options=?* ) tps_opt="${LONG_OPTARG}" ;; # -T # Tempest options
 	       thr_nbr=?* | thread_number=?* | thread=?* | threads=?* ) thr_usr="${LONG_OPTARG}" ;; # -t # Thread number
 	       drc_tmp=?* | tmp_drc=?* | dir_tmp=?* | tmp_dir=?* | tmp=?* ) tmp_usr="${LONG_OPTARG}" ;; # -U # Temporary directory
@@ -464,6 +482,10 @@ while getopts :a:CD:d:E:f:g:G:h:I:i:j:Mm:n:O:o:P:p:R:s:T:t:U:u:V:v:w:x:-: OPT; d
     esac # !OPT
 done # !getopts
 shift $((OPTIND-1)) # Advance one argument
+psn_nbr=$#
+if [ ${psn_nbr} -ge 1 ]; then
+    inp_psn='Yes'
+fi # !psn_nbr
 if [ ${vrs_prn} = 'Yes' ]; then
     printf "${spt_nm}, the NCO regridder and map- and grid-generator, version ${nco_vrs}\n"
     printf "Copyright (C) 2016--2017 Charlie Zender\n"
@@ -477,14 +499,14 @@ if [ ${vrs_prn} = 'Yes' ]; then
     printf "Config: calling NCO binaries in directory ${drc_nco}\n"
     printf "Config: binaries linked to netCDF library version ${lbr_vrs}\n"
     wgt_cmd='ESMF_RegridWeightGen'
-    cmd_wgt=`command -v ${wgt_cmd} 2>&1 > /dev/null`
+    cmd_wgt=`command -v ${wgt_cmd} 2> /dev/null`
     if [ $? -eq 0 ]; then
 	printf "Config: ESMF weight-generation command ${wgt_cmd} found as ${cmd_wgt}\n"
     else
 	printf "Config: ESMF weight-generation command ${wgt_cmd} not found\n"
     fi # !err
     wgt_cmd='GenerateOverlapMesh'
-    cmd_wgt=`command -v ${wgt_cmd} 2>&1 > /dev/null`
+    cmd_wgt=`command -v ${wgt_cmd} 2> /dev/null`
     if [ $? -eq 0 ]; then
 	printf "Config: Tempest weight-generation command ${wgt_cmd} found as ${cmd_wgt}\n"
     else
@@ -496,12 +518,55 @@ fi # !vrs_prn
 # Detect input on pipe to stdin:
 # http://stackoverflow.com/questions/2456750/detect-presence-of-stdin-contents-in-shell-script
 # http://unix.stackexchange.com/questions/33049/check-if-pipe-is-empty-and-run-a-command-on-the-data-if-it-isnt
-# 20170119 "if [ ! -t 0 ]" tests whether stdin connected to terminal, not whether pipe has data
-# Non-interactive batch mode (e.g., qsub, sbatch) disconnects stdin from terminal and triggers false-positives
-# Switch test from "if [ ! -t 0 ]" to "if [ -p /dev/stdin ]"
-if [ -p /dev/stdin ]; then
-    std_flg='Yes'
-fi # !stdin
+# 20170119 "if [ ! -t 0 ]" tests whether unit 0 (stdin) is connected to terminal, not whether pipe has data
+# Non-interactive batch mode (e.g., qsub, sbatch) disconnects stdin from terminal and triggers false-positives with ! -t 0
+# 20170123 "if [ -p foo ]" tests whether foo exists and is a pipe or named pipe
+# Non-interactive batch mode (i.e., sbatch) behaves as desired for -p /dev/stdin on SLURM
+# Non-interactive batch mode (e.g., qsub) always returns true for -p /dev/stdin on PBS, leads to FALSE POSITIVES!
+# This is because PBS uses stdin to set the job name
+# Hence -p /dev/stdin test works everywhere tested except PBS non-interactive batch environment
+if [ -n "${PBS_ENVIRONMENT}" ]; then
+    if [ "${PBS_ENVIRONMENT}" = 'PBS_BATCH' ]; then
+	# PBS batch detection suggested by OLCF ticket CCS #338970 on 20170127
+	bch_pbs='Yes'
+    fi # !PBS_ENVIRONMENT
+fi # !PBS
+if [ -n "${SLURM_JOBID}" ] && [ -z "${SLURM_PTY_PORT}" ]; then
+    # SLURM batch detection suggested by NERSC ticket INC0096873 on 20170127
+    bch_slr='Yes'
+fi # !SLURM
+if [ ${bch_pbs} = 'Yes' ] || [ ${bch_slr} = 'Yes' ]; then
+    # Batch environment
+    if [ ${bch_pbs} = 'Yes' ]; then
+	if [ ! -p /dev/stdin ]; then
+	    # PBS batch jobs cause -p to return true except for stdin redirection 
+	    # When -p returns true we do not know whether stdin pipe contains any input
+	    # User must explicitly indicate use of stdin pipes with --stdin option
+	    # Redirection in PBS batch jobs unambiguously causes -p to return false
+	    inp_std='Yes'
+	fi # !stdin
+    fi # !bch_slr
+    if [ ${bch_slr} = 'Yes' ]; then
+	if [ -p /dev/stdin ]; then
+	    # SLURM batch jobs cause -p to return true for stdin pipes
+	    # When -p returns false we do not know whether output was redirectd
+	    # User must explicitly indicate use of redirection with --stdin option
+	    # Stdin pipes in SLURM batch jobs unambiguously cause -p to return true
+	    inp_std='Yes'
+	fi # !stdin
+    fi # !bch_slr
+else # !bch
+    # Interactive environment
+    if [ -p /dev/stdin ] || [ ! -t 0 ]; then
+	# Interactive environments unambiguously cause -p to return true for stdin pipes
+	# Interactive environments unambiguously cause -t 0 to return false for stdin redirection
+	inp_std='Yes'
+    fi # !stdin
+fi # !bch
+if [ ${inp_std} = 'Yes' ] && [ ${inp_psn} = 'Yes' ]; then
+    echo "${spt_nm}: ERROR expecting input both from stdin and positional command-line arguments\n"
+    exit 1
+fi # !inp_std
 
 # Derived variables
 if [ -n "${drc_usr}" ]; then
@@ -551,7 +616,7 @@ elif [ ${alg_typ} = 'conserve' ] || [ ${alg_typ} = 'conservative' ] || [ ${alg_t
 elif [ ${alg_typ} = 'nearestdtos' ] || [ ${alg_typ} = 'nds' ] || [ ${alg_typ} = 'dtos' ]; then 
     alg_opt='nearestdtos'
 elif [ ${alg_typ} = 'neareststod' ] || [ ${alg_typ} = 'nsd' ] || [ ${alg_typ} = 'stod' ]; then 
-    alg_opt='nearestdtos'
+    alg_opt='neareststod'
 elif [ ${alg_typ} = 'patch' ] || [ ${alg_typ} = 'pch' ] || [ ${alg_typ} = 'ptc' ]; then 
     alg_opt='patch'
 fi # !alg_typ
@@ -560,6 +625,9 @@ if [ -z "${drc_in}" ]; then
 else # !drc_in
     drc_in_usr_flg='Yes'
 fi # !drc_in
+if [ -n "${in_fl}" ]; then
+    inp_aut='Yes'
+fi # !in_fl
 if [ -n "${job_usr}" ]; then 
     job_nbr="${job_usr}"
 fi # !job_usr
@@ -575,6 +643,15 @@ fi # !var_lst
 if [ -n "${hdr_pad}" ]; then 
     nco_opt="${nco_opt} --hdr_pad=${hdr_pad}"
 fi # !hdr_pad
+if [ "${no_cll_msr}" = 'Yes' ]; then 
+    nco_opt="${nco_opt} --no_cll_msr"
+fi # !no_cll_msr
+if [ "${no_frm_trm}" = 'Yes' ]; then 
+    nco_opt="${nco_opt} --no_frm_trm"
+fi # !no_frm_trm
+if [ "${no_stg_grd}" = 'Yes' ]; then 
+    rgr_opt="${rgr_opt} --rgr no_stagger=Y"
+fi # !no_stg_grd
 if [ -n "${var_lst}" ]; then 
     nco_var_lst="-v ${var_lst}"
 fi # !var_lst
@@ -719,57 +796,68 @@ if [ "${map_mk}" = 'Yes' ] && [ "${wgt_gnr}" = 'tempest' ]; then
     msh_fl=${msh_fl_dfl}
 fi # !tempest
 
-# Parse grid/map arguments before in_fl arguments so we know whether this could be a map-only invocation
-if [ -n "${in_fl}" ]; then
+# Read files from stdin pipe, positional arguments, or directory glob
+# Code block taken from ncclimo
+# ncclimo sets inp_aut flag when file list is automatically (i.e., internally) generated
+# ncremap uses convention that input files specified with -i set inp_aut flag
+# That way, ncremap code block looks closer to ncclimo with introducing a new "inp_cmd" flag
+#printf "dbg: inp_aut  = ${inp_aut}\n"
+#printf "dbg: inp_glb  = ${inp_glb}\n"
+#printf "dbg: inp_psn  = ${inp_psn}\n"
+#printf "dbg: inp_std  = ${inp_std}\n"
+if [ ${inp_aut} = 'No' ] && [ ${inp_psn} = 'No' ] && [ ${inp_std} = 'No' ] && [ "${drc_in_usr_flg}" = 'Yes' ]; then
+    inp_glb='Yes'
+fi # !inp_psn, !inp_std
+if [ "${map_mk}" != 'Yes' ] && [ ${inp_aut} = 'No' ] && [ ${inp_glb} = 'No' ] && [ ${inp_psn} = 'No' ] && [ ${inp_std} = 'No' ]; then
+    echo "${spt_nm}: ERROR Specify input file(s) with -i \$in_fl or with -I \$drc_in or with positional argument(s) or with stdin"
+    if [ ${bch_pbs} = 'Yes' ]; then
+	echo "${spt_nm}: HINT PBS batch job environment detected, pipe to stdin not allowed, try positional arguments instead"
+    else # !bch_pbs
+	echo "${spt_nm}: HINT Pipe input file list to stdin with, e.g., 'ls *.nc | ${spt_nm}'"
+    fi # !bch_pbs
+    exit 1
+fi # !sbs_flg
+if [ ${inp_aut} = 'Yes' ]; then 
     # Single file argument
     fl_in[0]=${in_fl}
     fl_nbr=1
-else # !in_fl
-    if [ ${std_flg} = 'No' ]; then 
-	if [ "${drc_in_usr_flg}" = 'Yes' ]; then
-	    for fl in "${drc_in}"/*.nc "${drc_in}"/*.nc3 "${drc_in}"/*.nc4 "${drc_in}"/*.cdf "${drc_in}"/*.hdf "${drc_in}"/*.he5 "${drc_in}"/*.h5 ; do
-		if [ -f "${fl}" ]; then
-		    fl_in[${fl_nbr}]=${fl}
-		    let fl_nbr=${fl_nbr}+1
-		fi # !file
-	    done
-	else # !drc_in
-	    if [ "${map_mk}" != 'Yes' ]; then 
-		# Read any positional arguments
-		psn_nbr=$#
-		if [ ${psn_nbr} -eq 1 ]; then
-		    fl_in[0]=${1}
-		    fl_nbr=1
-		elif [ ${psn_nbr} -eq 2 ]; then
-		    if [ -z "${out_fl}" ]; then
-			out_fl=${2}
-			out_usr_flg='Yes'
-			fl_nbr=1
-		    else # !out_fl
-			echo "ERROR: Output file specified with -o (${out_fl}) conflicts with second positional argument ${2}"
-			echo "HINT: Use -o out_fl or positional argument, not both"
-			exit 1
-		    fi # !out_fl
-		elif [ ${psn_nbr} -ge 3 ]; then
-		    for ((psn_idx=1;psn_idx<=psn_nbr;psn_idx++)); do
-			fl_in[(${psn_idx}-1)]=${!psn_idx}
-			fl_nbr=${psn_nbr}
-		    done # !psn_idx
-		else
-		    echo "ERROR: Specify input file(s) with -i or with positional argument(s) or with pipe to stdin"
-		    echo "HINT: Pipe input file list to stdin with, e.g., 'ls *.nc | ${spt_nm}'"
-		    exit 1
-		fi # !psn_nbr
-	    fi # !map_mk
-	fi # !drc_in
-    else # !std_flg
-	# Input awaits on unit 0, i.e., on stdin
-	while read -r line; do # NeR05 p. 179
-	    fl_in[${fl_nbr}]=${line}
+fi # !inp_aut
+if [ ${inp_glb} = 'Yes' ]; then 
+    for fl in "${drc_in}"/*.nc "${drc_in}"/*.nc3 "${drc_in}"/*.nc4 "${drc_in}"/*.cdf "${drc_in}"/*.hdf "${drc_in}"/*.he5 "${drc_in}"/*.h5 ; do
+	if [ -f "${fl}" ]; then
+	    fl_in[${fl_nbr}]=${fl}
 	    let fl_nbr=${fl_nbr}+1
-	done < /dev/stdin
-    fi # stdin
-fi # !in_fl
+	fi # !file
+    done
+fi # !inp_glb
+if [ ${inp_psn} = 'Yes' ]; then
+    if [ ${psn_nbr} -eq 1 ]; then
+	fl_in[0]=${1}
+	fl_nbr=1
+    elif [ ${psn_nbr} -eq 2 ]; then
+	if [ -z "${out_fl}" ]; then
+	    out_fl=${2}
+	    out_usr_flg='Yes'
+	    fl_nbr=1
+	else # !out_fl
+	    echo "ERROR: Output file specified with -o (${out_fl}) conflicts with second positional argument ${2}"
+	    echo "HINT: Use -o out_fl or positional argument, not both"
+	    exit 1
+	fi # !out_fl
+    elif [ ${psn_nbr} -ge 3 ]; then
+	for ((psn_idx=1;psn_idx<=psn_nbr;psn_idx++)); do
+	    fl_in[(${psn_idx}-1)]=${!psn_idx}
+	    fl_nbr=${psn_nbr}
+	done # !psn_idx
+    fi # !psn_nbr
+fi # !inp_psn
+if [ ${inp_std} = 'Yes' ]; then
+    # Input awaits on unit 0, i.e., on stdin
+    while read -r line; do # NeR05 p. 179
+	fl_in[${fl_nbr}]=${line}
+	let fl_nbr=${fl_nbr}+1
+    done < /dev/stdin
+fi # !inp_std
 
 if [ "${mpi_flg}" = 'Yes' ]; then
     if [ -n "${COBALT_NODEFILE}" ]; then 
@@ -899,9 +987,9 @@ if [ ${vrb_lvl} -ge ${vrb_4} ]; then
 fi # !vrb_lvl
 if [ -f 'PET0.RegridWeightGen.Log' ]; then
     if [ ${vrb_lvl} -ge ${vrb_4} ]; then
-	printf "${spt_nm}: Removing PET0.RegridWeightGen.Log file from current directory before running\n"
+	printf "${spt_nm}: Removing PET0.RegridWeightGen.Log file and any other PET0.* files from current directory before running\n"
     fi # !vrb_lvl
-    /bin/rm -f PET0.RegridWeightGen.Log
+    /bin/rm -f PET0.*
 fi # !PETO
 if [ ${vrb_lvl} -ge ${vrb_3} ]; then
     printf "Started processing at `date`.\n"
@@ -1128,7 +1216,7 @@ for ((fl_idx=0;fl_idx<${fl_nbr};fl_idx++)); do
 	# Block 2: Source grid
 	# Block 2 Loop 1: Source gridfile command
 	if [ ! -f "${in_fl}" ]; then
-	    echo "${spt_nm}: ERROR Unable to find Input file ${in_fl}"
+	    echo "${spt_nm}: ERROR Unable to find input file ${in_fl}"
 	    echo "HINT: All files implied to exist must be in the directory specified by their filename or in ${drc_in} before ${spt_nm} will proceed"
 	    exit 1
 	fi # ! -f
diff --git a/debian/changelog b/debian/changelog
index 097b937..ab2d7e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+nco (4.6.6-1) unstable; urgency=low
+
+  * new upstream version no_cll_msr,no_frm_trm,no_stg_grd,hsi,lst_rnk_ge2,UGRID 2D,JSON shape,OMI
+
+ -- Charlie Zender <zender at uci.edu>  Fri, 21 Apr 2017 12:25:22 -0700
+
 nco (4.6.5-1) unstable; urgency=low
 
   * new upstream version cnk csh, EXIT_FAILURE, ncclimo/ncremap version/vrb_lvl, ncks --cal, nfr() refactor, POP fix
diff --git a/doc/ANNOUNCE b/doc/ANNOUNCE
index cfc4577..1e30471 100644
--- a/doc/ANNOUNCE
+++ b/doc/ANNOUNCE
@@ -1,123 +1,153 @@
 $Header$ -*-text-*-
 
-The netCDF Operators NCO version 4.6.5 are ready. 
+The netCDF Operators NCO version 4.6.6 are ready. 
 
 http://nco.sf.net (Homepage, Mailing lists)
 http://github.com/nco (Source Code, Releases, Developers)
 
 What's new?
-
-4.6.5 contains a potpurri of new features. Setting chunk cache size
-with --cnk_csh can accelerate aggregation of netCDF4 files.
-Climatology and regridder users may appreciate the cleaned-up
-ouput offered by the ncremap --vrb_lvl switch and more intelligent
-grid inferral. Everyone who has tried to convert "time since..." 
-values to calendar dates will like the new ncks --cal switch that does
-the UDUnits conversion for you. There are also helpful bugfixes for
-ncap2 attribute propagation in corner cases, and corrected error codes
-for bad command line arguments. 
-
-Work on NCO 4.6.6 has commenced. Planned improvements include 
-support for conda installs on MS Windows, and human-legible calendar
-date printing, more ncclimo and ncremap features.
+4.6.6 contains a potpurri of new features:
+Output 2D rectangular grids formatted as UGRID meshes.
+Calendar dates print for bounds and climatology variables.
+Revamped HPSS/hsi support. The splitter produces cleaner output. 
+The regridder groks more files and masks, and annotates output with
+more helpful metadata. CDL mode handles compound record variables.
+JSON output has changed slightly to re-use NcML keywords. 
+ncclimo and ncremap have new extract/exclude options.
+
+EVERYONE WHO USES NCKS TO PRINT DATA PLEASE READ THIS:
+
+We would like to change the default behavior of ncks printing.
+For 20+ years ncks has, by default, dumped the text representation
+of a file in (what we call) "traditional" mode. ncdump produces a
+format called CDL that is more useful than traditional mode for most
+NCO users. ncks has produced CDL since only 2013 and so CDL is not the
+default. ncdump has always printed CDL very cleanly and clearly there
+was little point in making CDL the default for ncks. 
+Now ncks CDL mode rivals ncdump, and is superior in some ways.
+In particular, ncks now prints times as human-readable calendar dates,
+the last ncdump feature I used that ncks did not have.
+We may change the default printed output of ncks to CDL.
+Then one would type simply "ncks" instead of "ncks --cdl". 
+A new "--trd" option would still print traditional output.
+Let us know if this bothers or pleases you prior to 4.6.7.
+You have been warned :)
+
+Work on NCO 4.6.7 has commenced. Planned improvements include 
+support for conda installs on MS Windows, more ncclimo and ncremap
+features. 
 
 Enjoy,
 Charlie
 
 NEW FEATURES (full details always in ChangeLog):
 
-A. ncks allows setting chunk cache-size with --cnk_csh with all
-   applicable operators. This sets the cache size for all variables. 
-   Users have demonstrated that increasing cache size can dramatically
-   speed-up chunking operations on large datasets.
-   This setting only works on netCDF4 files.
-   ncrcat --cnk_csh=1000000000 --cnk_plc=g3d --cnk_dmn=time,365 \
-          --cnk_dmn=lat,1800 --cnk_dmn=lon,3600 in*.nc4 out.nc4
-   http://nco.sf.net/nco.html#cnk_csh
-   Thanks to Hugo Oliveira for encouraging this feature
-
-B. ncks now prints the human-legible calendar string corresponding to
-   values with UDUnits date units (time since basetime, e.g., "days
-   since 2000-01-01") and CF calendar attribute, if any. Enact this
-   with the --calendar option when printing. Using dbg_lvl >= 1 in CDL 
-   mode prints both the value and calendar string (one in comments):
+A. ncremap and ncclimo support new extract/exclude switches:
+   --no_cll_msr: Exclude cell_measures variables
+   --no_frm_trm: Exclude formula_terms variables
+   --no_ntv_tms: Exclude native-grid timeseries (splitter only)
+   --no_stg_grd: Exclude staggered grid coordinates
+   By default, these variables are always extracted.
+   Use the above switches to exclude them instead, e.g.,
+   ncclimo --no_cll_msr --no_frm_trm --no_ntv_tms --no_stg_grd ...
+   http://nco.sf.net/nco.html#no_cll_msr
+   http://nco.sf.net/nco.html#no_frm_trm
+   http://nco.sf.net/nco.html#no_ntv_tms
+   http://nco.sf.net/nco.html#no_stg_grd
+
+B. ncclimo's splitter mode no longer requires variable lists. 
+   Previously the splitter required a '-v var_lst' option to know
+   which variables to split into timeseries. Now when the -v option
+   is omitted the splitter creates timeseries of all variables of
+   rank R >= 2. Typically this includes all spatial variables. 
+   Variables known to be extensive (like grid properties) are
+   automatically excluded from this list. However, we expect there
+   will be some cases where the splitter creates timeseries from
+   R >= 2 variables that are not desirable. We are happy to encode
+   manual exceptions as we receive notice of them.
+   ncclimo -s 1979 -e 1981 -o $drc_out in*.nc
+   http://nco.sf.net/nco.html#ncclimo
 
+C. The regridder now produces UGRID output for 2D rectangular grids.
+   Invoke ncremap in grid inferral mode with "--rgr ugrid=foo.nc"
+   and voilà, an annoted UGRID file is produce along with the
+   default SCRIP gridfile. The NCO UGRID is more complete than that 
+   produced by ESMF_Scrip2Unstruct, but ESMF can create UGRID for much 
+   more comlex grids. The NCO regridder can currently only generate
+   UGRID for rectangular 2D input grids, and there are no plans to
+   extend this to curvilinear or unstructured input grids.
+   ncks --rgr nfr=Y --rgr grid=scrip.nc --rgr ugrid=ugrid.nc in.nc out.nc
+   http://nco.sf.net/nco.html#rgr
+
+D. ncks now prints the units, if any, in comments after CDL values
+   when debugging is enabled with dbg_lvl >=1:
+   zender at foo: ncks --cdl -D 1 in.nc
+   lat = -90, 90 ; // units="degrees_north"
+   lon = 0, 90, 180, 270 ; // units="degrees_east"
+   tpt = 273.1, 273.2, ... 274 ; // units="kelvin"
+   http://nco.sf.net/nco.html#cdl
+
+E. ncap2 now implements the CF cell_methods convention.
+   ncra, nces, and ncwa have long implemented this, and now the
+   relevant ncap2 methods (avg, min, max, etc.) record the operation
+   type in the cell_methods attribute.
+   ncap2 -s 'avg=one_dmn_rec_var.avg()' ~/nco/data/in.nc ~/foo.nc
+   http://nco.sf.net/nco.html#cll_mth
+
+F. Since 4.6.5 ncks has printed the human-legible calendar string
+   corresponding to values with UDUnits date units (time since
+   basetime, e.g., "days since 2000-01-01") and CF calendar attribute,
+   if any. Now ncks also translates and prints time values associated
+   with CF climatology and bounds variables as human legible dates.
+   As before, enact this with the --calendar option when printing.
+   Using dbg_lvl >= 1 in CDL mode prints both the value and calendar
+   string (one in comments): 
    zender at aerosol:~$ ncks -D 1 --cdl --cal -v tm_365 ~/nco/data/in.nc
    tm_365 = "2013-03-01"; // double value: 59
    zender at aerosol:~$ ncks -D 1 --cdl -v tm_365 ~/nco/data/in.nc
    tm_365 = 59; // calendar format: "2013-03-01"
-
    This option is similar to the ncdump -t option.
    Does this work how you'd like? Let us know.
    http://nco.sf.net/nco.html#cal
 
-C. ncap2 now seamlessly edits character arrays.
-   Suppose you have a string stored as an old school character array
-   (not a netCDF4 string) with a fixed dimension size. ncap2 now
-   supports altering the string value without having to manually pad
-   the RHS to the exact dimension size of the LHS:
-
-   ncap2 -s 'date_sng="2016-05-11_06:00:00"' in.nc out.nc
-   ncap2 -s 'date_sng="automatic padding"' in.nc out.nc
-
-   The exact same syntax has always worked on netCDF4 strings.
-   This new feature frees users from needing to know the ugly details
-   of netCDF3 string storage.
-   http://nco.sf.net/nco.html#ncap2
-
-D. ncremap support a verbosity level option, --vrb_lvl.
-   Verbosity level is now independent of debug level, dbg_lvl, so
-   users can customize how much ncremap information to print.
-   Default vrb_lvl=2 and supported levels range from 0 (no output) to
-   4 (most verbose). The verbosity of the underlying remapping,
-   which invokes ncks, is still controlled by dbg_lvl not vrb_lvl.
-   ncremap --vrb_lvl=1 -i in.nc -m map.nc -o out.nc
-   http://nco.sf.net/nco.html#ncremap
-   Thanks to Milena Veneziani for requesting.
-
-E. ncremap and ncclimo now support a version option, --version.
-   This option prints the operator version and configuration.
-   It's a painless way to tell, e.g., if ncremap knows where your 
-   ESMF_RegridWeightGen executable is, and where these scripts
-   look for NCO and what version of netCDF is linked to:
-   ncremap --version
-   ncclimo --version
-   http://nco.sf.net/nco.html#ncremap
-   http://nco.sf.net/nco.html#ncclimo
-
-F. ncremap and ncks now parse more unknown grids than before.
-   The front-end of ncremap's grid-inferenence routine has been
-   refactored to rely on less user-provided information about
-   dimension names. Now it obtains more information than before
-   by examining the grid coordinates. As a result, grids from
-   data files with strange dimension names are likelier to be parsed. 
+G. ncks now prints "(no units)" instead of "(null)" as the units
+   string for variables with no units. And in CDL mode ncks, when
+   invoked with debugging (e.g., -D 1) prints the units string in the
+   comment section after the values of a variable.
 
 BUG FIXES:
 
-A. ncap2 attribute propagation for some unary operators is fixed.
-   It had been broken since ~4.6.3 for unary operations like 'time+=10'
-   whereas it was working fine for binary operations, e.g., 'T=T+10'.
-   Thanks to Qi Tang for sounding the alert. Solution is to upgrade.
+A. NCO now exits with a clear message instead of core dump on missing
+   files on HPSS systems with the hsi command.
+
+B. ncremap will no longer define mask variables in inferred grid
+   files unless it finds a mask variable in the source file.
+   Previously ncremap could define a mask variable in the inferred
+   grid file and never fill-it with data.
 
-B. The chunk cache option (--cnk_csh) implemented in ncks in 4.6.4 was  
-   inadvertently doing a no-op. Now it works as advertised.
-   No workaround, solution is to upgrade.
+C. ncremap now invokes the neareststod algorithm when requested.
+   Previously a typo caused ncremap to invoke nearestdtos when
+   neareststod was specified (doh!). Solution is to upgrade.
 
-C. A broken diagnostic introduced in 4.6.3 or 4.6.4 could cause the
-   regridder to fail. This occurred with some POP files. Diagnostic
-   now turned-off. Solution is to upgrade, workaround is use NCO <=
-   4.6.2. Thanks to Sungduk Yu for reporting.
+D. ncremap now converts non-default masks correctly in infer mode.
+   Previously a "mask" variable in an input file whose grid structure
+   was being inferred could be incorrectly handled for some numeric
+   types. This likely only affected masks with missing values.
+   Sources of files possibly affected include AMSR and CICE.
 
-D. Bad command-line options now always return with EXIT_FAILURE (1).
-   Previously they could return with EXIT_SUCCESS (0).
-   Thanks to Jerome Mao for reporting.
+E. ncks now prints braces required to disambiguate compound
+   record dimensions in CDL mode. Such braces have been required by 
+   ncgen-like parsers since ~2013 in order to unambiguously determine
+   the record dimension sizes in variables with multiple record
+   dimensions. This fix only affects CDL printing of netCDF4 files
+   that contain compound record variables. 
 
 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.5 built/tested under
-   MacOS 10.12.1 with netCDF 4.4.1 on HDF5 1.8.16 and with
+   These problems occur with NCO 4.6.6 built/tested under
+   MacOS 10.12.3 with netCDF 4.4.1 on HDF5 1.8.16 and with
    Linux with netCDF 4.4.2-development (20161116) on HDF5 1.8.16.
 
 A. NOT YET FIXED (NCO problem)
@@ -172,11 +202,23 @@ B. NOT YET FIXED (netCDF4 library bug)
    20160212: Verified problem still exists in netCDF library
    20160512: Ditto
    20161028: Verified problem still exists with netCDF 4.4.1
+   20170323: Verified problem still exists with netCDF 4.4.2-development
+
+   Bug tracking: https://www.unidata.ucar.edu/jira/browse/fxm
+   More details: http://nco.sf.net/nco.html#ncrename_crd
+
+C. NOT YET FIXED (netCDF4 library bug)
+   Renaming a non-coordinate variable to a coordinate variable fails in netCDF4
+
+   Demonstration:
+   ncrename -O -v non_coord,coord ~/nco/data/in_grp.nc ~/foo.nc # Fails (HDF error)
+
+   20170323: Confirmed problem reported by Paolo Oliveri, reported to Unidata
 
    Bug tracking: https://www.unidata.ucar.edu/jira/browse/fxm
    More details: http://nco.sf.net/nco.html#ncrename_crd
 
-C. FIXED in netCDF Development branch as of 20161116 and in maintenance release 4.4.1.1
+D. FIXED in netCDF Development branch as of 20161116 and in maintenance release 4.4.1.1
    nc-config/nf-config produce erroneous switches that cause NCO builds to fail
    This problem affects netCDF 4.4.1 on all operating systems.
    Some pre-compiled netCDF packages may have patched the problem.
@@ -195,7 +237,7 @@ C. FIXED in netCDF Development branch as of 20161116 and in maintenance release
    20161116: Unidata patch is in tree for netCDF 4.4.2 release
    20161123: Fixed in maintenance release netCDF 4.4.1.1
 
-D. NOT YET FIXED (would require DAP protocol change?)
+E. NOT YET FIXED (would require DAP protocol change?)
    Unable to retrieve contents of variables including period '.' in name
    Periods are legal characters in netCDF variable names.
    Metadata are returned successfully, data are not.
@@ -210,7 +252,7 @@ D. NOT YET FIXED (would require DAP protocol change?)
 
    Bug tracking: https://www.unidata.ucar.edu/jira/browse/NCF-47
 
-E. NOT YET FIXED (would require DAP protocol change)
+F. NOT YET FIXED (would require DAP protocol change)
    Correctly read scalar characters over DAP.
    DAP non-transparency: Works locally, fails through DAP server.
    Problem, IMHO, is with DAP definition/protocol
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 98bdc42..41d3b71 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,193 @@
+2017-04-21  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.6 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6 final changes';git push
+	git tag -a 4.6.6 -m 'Version 4.6.6 new features: no_cll_msr,no_frm_trm,no_stg_grd,hsi,lst_rnk_ge2,UGRID 2D,JSON shape,OMI';git push --tags
+
+2017-04-20  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.6-alpha08 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha08 final changes';git push
+	git tag -a 4.6.6-alpha08 -m 'Version 4.6.6-alpha08 new features: Document, implement ncremap and ncclimo --no_cll_msr, --no_frm_trm, --no_stg_grd switches';git push --tags
+
+	* Separate eps_rlt_wrt_thr = 3.0e-13 threshold to write frac_b to regridded files
+
+	* Document ncremap and ncclimo --no_cll_msr, --no_frm_trm, --no_stg_grd
+
+	* Document ncclimo --no_ntv_tms
+
+2017-04-17  Charlie Zender  <zender at uci.edu>
+
+	* Remove annoying quotation marks from version in nco_vrs_prn()
+
+	* Clarify conditions for outputting frac_b in regridder
+
+2017-04-16  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.6-alpha07 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha07 final changes';git push
+	git tag -a 4.6.6-alpha07 -m 'Version 4.6.6-alpha07 new features: Coordinate --cll_msr, --frm_trm, --no_stg_grd, --area_out in regridder and splitter';git push --tags
+
+	* Link --cll_msr, --frm_trm options to ncra, ncks front-ends
+
+	* Expose --no_cll_msr, --no_frm_trm, --no_stg_grd options to ncclimo users
+
+2017-04-15  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.6-alpha06 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha06 final changes';git push
+	git tag -a 4.6.6-alpha06 -m 'Version 4.6.6-alpha06 new features: fix which hsi; lst_rnk_ge2 generic; valid_min/max; rgr no_stg splitter';git push --tags
+
+2017-04-14  Charlie Zender  <zender at uci.edu>
+
+	* Splitter omits staggered FV grid by default when regridding
+
+	* Regridder implement no_stg flag to omit staggered FV grid information
+
+	* Regridder add valid_min/max to lat/lon
+
+	* --lst_rnk_ge2 successfully eliminates grid variables in generic cases
+
+	* Define is_crd_lk_var, is_rec_lk_var to avoid conflicting definitions of is_crd_var, is_rec_var
+
+	* Fix hsi discovery for generic case with `which hsi`
+
+	* NCO 4.6.6-alpha05 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha05 final changes';git push
+	git tag -a 4.6.6-alpha05 -m 'Version 4.6.6-alpha05 new features: ncremap front-end from ncclimo; --cal finds climatology, bounds variables; mmr documentation; UGRID 2D works; hsi locations; HPSS works';git push --tags
+
+	* Add characteric coordinates for edges/faces to UGRID 2D output
+
+	* Hard-code Cori/Edison and Rhea hsi locations
+
+2017-04-13  Charlie Zender  <zender at uci.edu>
+
+	* Fix nco_grd_nfr() to infer 2D grids written by nco_grd_mk()
+
+	* Better annotate skeleton files in nco_grd_mk()
+
+	* Exit with clear message instead of core dump on missing files on HPSS systems with hsi command
+
+	* Replace ncremap input file front-end with code from ncclimo
+
+	* Clarify effects of compression on expected memory use in documentation
+
+2017-04-11  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.6-alpha04 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha04 final changes';git push
+	git tag -a 4.6.6-alpha04 -m 'Version 4.6.6-alpha04 new features: ncap2 cell_methods fix; 2-D UGRID; lst_rnk_ge2 time_bnds; nfr msk fix; neareststod';git push --tags
+
+	* Quiet CONVENTIONS attribute printing
+
+	* Verified that ncremap mask changes produce expected results with neareststod
+	neareststod/dtos uses nearest value, regardless of whether that value is valid
+	Accurate interpolation of ocean values across continents requires custom algorithm
+
+	* Noted that is_crd_var member of trv structures has been defined incorrectly since birth
+	Member should have been named is_rec_crd for accuracy and consistency with older NCO
+
+	* ncremap nco_grd_nfr() tolerates files with mask and without area variables
+
+	* Hardwire exclusion of area, lat_bnds, lon_bnds into lst_rnk_ge2 so splitter works on NCO-regridded files
+
+2017-04-10  Charlie Zender  <zender at uci.edu>
+
+	* ncremap nco_grd_nfr() always writes mask data when input file has mask variable
+	Until today, nco_grd_nfr() would always define mask variable but only write data when input file had mask
+
+	* ncremap now invokes neareststod when requested, not nearestdtos (doh!)
+
+2017-04-10 Henry Butowsky  <henryb at hush.com>
+
+	* Refactor nco_msa_rcr_clc() to use less memory and run faster for --msa_usr_rdr
+
+2017-04-09  Charlie Zender  <zender at uci.edu>
+
+	* Add Cell_[Along/Across]_Swath_mod04 to dimension database for	ncl_convert2nc compatibility
+
+	* Hardwire exclusion of time_bnds into lst_rnk_ge2
+
+	* Complete minimal UGRID metadata
+
+	* Fix mask type conversion in nco_grd_nfr()
+
+2017-04-08  Charlie Zender  <zender at uci.edu>
+
+	* Add stubs to create UGRID grids from nco_grd_nfr()
+
+2017-04-05  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.6-alpha03 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha03 final changes';git push
+	git tag -a 4.6.6-alpha03 -m 'Version 4.6.6-alpha03 new features: ncap2 atoi(), atof(), cell_methods; nco_grd_nfr OMI DOMINO; lst_rnk_ge2; JSON dims->shape';git push --tags
+
+2017-04-01  Charlie Zender  <zender at uci.edu>
+
+  	* Allow nco_grd_nfr() to read grid corners in non-canonical (crn_nbr,lat_nbr,lon_nbr) and permute to canonical (lat_nbr,lon_nbr,crn_nbr) order (for OMI DOMINO)
+
+2017-03-30  Charlie Zender  <zender at uci.edu>
+
+	* Add HINT when nco_grd_nfr() cannot find coordinates
+
+2017-03-30 Henry Butowsky  <henryb at hush.com>
+
+	* Add cell_methods CF convention to aggregate operations in ncap2 agg_cls()
+	 Default is on, toggled by --cll_mth, --cell_method, --no_cell_method, --no_cll_mth
+
+2017-03-26  Charlie Zender  <zender at uci.edu>
+
+	* ncclimo: preliminary support for --lst_rnk_ge2
+
+	* Splitter infrastructure: ncks --lst_rnk_ge2 prints extraction list of R>=2 variables and exits
+
+2017-03-24  Charlie Zender  <zender at uci.edu>
+
+	* Slight simplification of FV grid terminology
+
+	* Change JSON to use "shape" instead of "dims" keyword in variable object
+
+2017-03-23  Charlie Zender  <zender at uci.edu>
+
+	* Reported below bug found by ncrename user Paolo Oliveri to Unidata
+
+	* Document failure of netCDF library 4.4.1+ to rename non-coordinates to coordinates
+
+2017-03-22  Charlie Zender  <zender at uci.edu>
+
+	* Reported where ncgen interprets "u" suffix as uint64 not uint32 to Unidata
+
+	* Change OpenMP INFO to print only when dbg_lvl >= 2
+
+	* NCO 4.6.6-alpha02 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha02 final changes';git push
+	git tag -d 4.6.6-alpha02;git push origin :refs/tags/4.6.6-alpha02
+	git tag -a 4.6.6-alpha02 -m 'Version 4.6.6-alpha02 new features: cpd braces, units comments';git push --tags
+
+2017-03-22 Henry Butowsky  <henryb at hush.com>
+
+	* Print braces for compound record variables in CDL mode
+
+2017-03-21  Charlie Zender  <zender at uci.edu>
+
+	* Tidy nco_prn.c
+
+2017-03-21 Henry Butowsky  <henryb at hush.com>
+
+	* Print units in comment for CDL output when dbg_lvl >= 1
+
+2017-03-17  Charlie Zender  <zender at uci.edu>
+
+	* Patch fmc_all_cls.cc to build on OpenSUSE https://sourceforge.net/p/nco/bugs/94
+
+2017-03-16  Charlie Zender  <zender at uci.edu>
+
+	* NCO 4.6.6-alpha01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 4.6.6-alpha01 final changes';git push
+	git tag -a 4.6.6-alpha01 -m 'Version 4.6.6-alpha01 new features: ncremap cmd_wgt fix';git push --tags
+
+	* Fix cmd_wgt reported by ncremap --version
+
 2017-03-15  Charlie Zender  <zender at uci.edu>
 
 	* NCO 4.6.5 release procedure:
diff --git a/doc/TODO b/doc/TODO
index b4403f8..4e1568e 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -680,7 +680,7 @@ nco1128. nco: ncrename --lowercase --uppercase options? MERRA2 merra
        ncrename --lowercase --var .ONE,.TWO,... in.nc out.nc
 nco1129. ncks allow --mk_rec_dmn to change multiple dimensions at one time
        ncks -O --mk_rec_dmn lat,lon ~/nco/data/in_grp.nc ~/foo.nc
-nco1130. ncatted support for '.' (dot) in names (reported by emontgomery 20160726 fixed 20160729)
+nco1130. ncatted support for '.' (dot) in names (reported by emontgomery 20160726 finished 20160729)
        ncatted treats dot.name as rx then fails to find match
        ncatted -O -a dot.name,global,o,c,value ~/nco/data/in.nc ~/foo.nc
 nco1131. nco: ncra --cb wrong unless single record per input file (see note tagged 20160824 in ncra.c)
@@ -689,15 +689,16 @@ nco1131. nco: ncra --cb wrong unless single record per input file (see note tagg
        ncks --cdl -v climatology_bounds ~/foo2.nc
        climatology_bounds are [0.5,1.5] but should be [2.5,6.5]
 nco1132. nco: ncclimo fails when input files have different variable orders. Allow user to suppress cb, or make ncra.c re-read cb IDs each file (Guido 20161101)
-nco1133. ncks CDL-mode do UDUnits time conversions to ISO (added 20161116)
+nco1133. ncks CDL-mode do UDUnits time conversions to ISO (added 20161116, finished 20170315)
 	 ncks -H -v tm_.? ~/nco/data/in.nc
 	 ncdump -t ~/nco/data/in.nc | grep tm_
 nco1134. MSA: wrapped limit with an additional limit pvn20160211 -- bug found that happens in nco 4.2.0 also
 	 ncks -O -C --msa -g g19 -v time -d time,9,0 -d time,1,2 ~/nco/data/in_grp_3.nc ~/foo.nc
-nco1135. USE_NC4_SRD_WORKAROUND is broken: (added 20170201 fixed 20170207)
+nco1135. USE_NC4_SRD_WORKAROUND is broken: (added 20170201, finished 20170207)
 	 ncks -v zg -H -C -d time,0,1 -d lev,0,2,2 ~/nco/data/in.nc # works
       	 ncks -v zg -H -C -d time,0,1 -d lev,0,2,2 ~/nco/data/in_4c.nc # borken
-nco1136. 
+nco1136. ncra valid_range, unpacked_valid_range, actual_range problem antonio rodriges https://sourceforge.net/p/nco/discussion/9830/thread/07f71305 (only valid_range is netCDF standard convention). One "solution" is to unpack valid_range attribute[s] using scale_factor, add_offset from first file. # added 20170407
+nco1137. 
 qrk
 ************************************************************************
 End ncoXXX TODOs
diff --git a/doc/VERSION b/doc/VERSION
index f18045d..ec3f25f 100644
--- a/doc/VERSION
+++ b/doc/VERSION
@@ -1 +1 @@
-4.6.5
+4.6.6
diff --git a/doc/debian.txt b/doc/debian.txt
index 19c831b..04a176f 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.5
-   First we create a clean source distribution of nco and place it in nco-4.6.5
+   For starters, we wish to create .debs of tagged releases, e.g., nco-4.6.6
+   First we create a clean source distribution of nco and place it in nco-4.6.6
    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.5
-/bin/rm nco.tar.gz;tar cvzf nco-4.6.5.tar.gz ./nco-4.6.5/*
-cd ~/nco/nco-4.6.5
-dh_make -e zender at uci.edu -f ../nco-4.6.5.tar.gz
+cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-4.6.6
+/bin/rm nco.tar.gz;tar cvzf nco-4.6.6.tar.gz ./nco-4.6.6/*
+cd ~/nco/nco-4.6.6
+dh_make -e zender at uci.edu -f ../nco-4.6.6.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.5.tar.gz
    from previous build
 
    cd ~/nco;/bin/rm *.gz
-   cd ~/nco/nco-4.6.5
+   cd ~/nco/nco-4.6.6
    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.5 with X.Y.Z+1
+# tags-query replace 4.6.6 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.5-1 # Update changelog (-b forces this version number)
+   cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 4.6.6-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.5
+   ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.6.6
 # Upload tarball to SF https://sourceforge.net/projects/nco/files 
-   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.6.5.tar.gz .
+   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-4.6.6.tar.gz .
 
 7. Ubuntu PPA
 https://help.launchpad.net/Packaging/PPA
-dput NCO nco_4.6.5-2~ppa1_source.changes
+dput NCO nco_4.6.6-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.5-1.dpkg-buildpackage.txt
-http://dust.ess.uci.edu/nco/src/nco_4.6.5-1.dsc
-http://dust.ess.uci.edu/nco/src/nco_4.6.5-1_i386.changes
-http://dust.ess.uci.edu/nco/src/nco_4.6.5-1_i386.deb
-http://dust.ess.uci.edu/nco/src/nco_4.6.5.orig.tar.gz
+http://dust.ess.uci.edu/nco/src/nco_4.6.6-1.dpkg-buildpackage.txt
+http://dust.ess.uci.edu/nco/src/nco_4.6.6-1.dsc
+http://dust.ess.uci.edu/nco/src/nco_4.6.6-1_i386.changes
+http://dust.ess.uci.edu/nco/src/nco_4.6.6-1_i386.deb
+http://dust.ess.uci.edu/nco/src/nco_4.6.6.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.5 ${DATA}/nco_4.6.5* ${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.5-1 -d nco-4.6.5 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.5 nco # Export most recent
-tar cvzf ./nco_4.6.5.orig.tar.gz --exclude='nco-4.6.5/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.5 
-/bin/rm -rf ${DATA}/nco-4.6.5 # Remove cvs-exported directory
-tar xvzf ./nco_4.6.5.orig.tar.gz # Untar to get directory without excluded files
-mkdir -p ${DATA}/nco-4.6.5/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.6.5/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.6.5/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
+sudo /bin/rm -rf ${DATA}/nco-4.6.6 ${DATA}/nco_4.6.6* ${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.6-1 -d nco-4.6.6 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.6 nco # Export most recent
+tar cvzf ./nco_4.6.6.orig.tar.gz --exclude='nco-4.6.6/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.6 
+/bin/rm -rf ${DATA}/nco-4.6.6 # Remove cvs-exported directory
+tar xvzf ./nco_4.6.6.orig.tar.gz # Untar to get directory without excluded files
+mkdir -p ${DATA}/nco-4.6.6/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-4.6.6/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-4.6.6/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.5;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
-#cd ${DATA}/nco-4.6.5;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
-cd ${DATA}/nco-4.6.5;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
+#cd ${DATA}/nco-4.6.6;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
+#cd ${DATA}/nco-4.6.6;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
+cd ${DATA}/nco-4.6.6;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
 sudo dpkg --remove nco
-sudo dpkg --install ${DATA}/nco_4.6.5-1_*.deb
+sudo dpkg --install ${DATA}/nco_4.6.6-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.5-1_*.deb
-ls -l ${DATA}/nco_4.6.5*
+lintian ${DATA}/nco_4.6.6-1_*.deb
+ls -l ${DATA}/nco_4.6.6*
 m ~/foo.nco
 # Upload Ubuntu (rather than Debian) packages to websites
-scp ${DATA}/nco_4.6.5* dust.ess.uci.edu:/var/www/html/nco/src
-scp ${DATA}/nco_4.6.5* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+scp ${DATA}/nco_4.6.6* dust.ess.uci.edu:/var/www/html/nco/src
+scp ${DATA}/nco_4.6.6* 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.5-1_*.changes
+# cd ${DATA};dupload -t mentors nco_4.6.6-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.5* # Cleanup prior build
+sudo /bin/rm /var/cache/pbuilder/result/nco_4.6.6* # 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.5-1.dsc > ~/foo.nco.pbuilder 2>&1
-cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.6.5-1_*.changes
-lintian /var/cache/pbuilder/result/nco_4.6.5-1_*.deb
+cd ${DATA};DIST=sid sudo pbuilder build nco_4.6.6-1.dsc > ~/foo.nco.pbuilder 2>&1
+cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_4.6.6-1_*.changes
+lintian /var/cache/pbuilder/result/nco_4.6.6-1_*.deb
 sudo dpkg --remove nco
-sudo dpkg --install /var/cache/pbuilder/result/nco_4.6.5-1_*.deb
+sudo dpkg --install /var/cache/pbuilder/result/nco_4.6.6-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.5-1_*.changes
+cd /var/cache/pbuilder/result;dupload -t mentors nco_4.6.6-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.5 ${DATA}/nco-4.6.5* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.6.6 ${DATA}/nco-4.6.6* # Cleanup last build
 ${sudo_sng} /bin/rm -r -f \
-${rpm_root}/BUILD/nco-4.6.5 \
-${rpm_root}/RPMS/i386/nco-4.6.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.5-?.i386.rpm \
-${rpm_root}/SOURCES/nco-4.6.5.tar.gz \
-${rpm_root}/SPECS/nco-4.6.5.spec \
-${rpm_root}/SRPMS/nco-4.6.5-?.src.rpm
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.5-1 -d nco-4.6.5 nco # Export based on tag
-${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.6.5.spec
-tar cvzf ./nco-4.6.5.tar.gz --exclude='nco-4.6.5/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.5 
-${sudo_sng} /bin/cp ${DATA}/nco-4.6.5.tar.gz ${rpm_root}/SOURCES
+${rpm_root}/BUILD/nco-4.6.6 \
+${rpm_root}/RPMS/i386/nco-4.6.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.6-?.i386.rpm \
+${rpm_root}/SOURCES/nco-4.6.6.tar.gz \
+${rpm_root}/SPECS/nco-4.6.6.spec \
+${rpm_root}/SRPMS/nco-4.6.6-?.src.rpm
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.6-1 -d nco-4.6.6 nco # Export based on tag
+${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-4.6.6.spec
+tar cvzf ./nco-4.6.6.tar.gz --exclude='nco-4.6.6/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.6 
+${sudo_sng} /bin/cp ${DATA}/nco-4.6.6.tar.gz ${rpm_root}/SOURCES
 cd ${rpm_root}/SPECS
-${sudo_sng} rpmbuild -ba --sign nco-4.6.5.spec > ~/foo.nco 2>&1
+${sudo_sng} rpmbuild -ba --sign nco-4.6.6.spec > ~/foo.nco 2>&1
 scp \
-${rpm_root}/RPMS/i386/nco-4.6.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.5-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.6.5-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.6.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.6-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.6.6-?.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/RPMS/i386/nco-4.6.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-4.6.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-4.6.5-?.i386.rpm \
-${rpm_root}/SRPMS/nco-4.6.5-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-4.6.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-4.6.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-4.6.6-?.i386.rpm \
+${rpm_root}/SRPMS/nco-4.6.6-?.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.5 ${DATA}/nco-4.6.5* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-4.6.6 ${DATA}/nco-4.6.6* # Cleanup last build
 /bin/rm -r -f \
-${rpm_root}/nco-4.6.5-?.src.rpm \
-${rpm_root}/nco-4.6.5.spec \
-${rpm_root}/nco-4.6.5.tar.gz \
-${rpm_root}/*/nco-4.6.5-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.5-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.5-?.*.rpm
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.5-1 -d nco-4.6.5 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.5 nco # Export most recent and build as 4.6.5-1
-tar cvzf ./nco-4.6.5.tar.gz --exclude='nco-4.6.5/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.5 
-/bin/cp ${DATA}/nco-4.6.5.tar.gz ${rpm_root}
+${rpm_root}/nco-4.6.6-?.src.rpm \
+${rpm_root}/nco-4.6.6.spec \
+${rpm_root}/nco-4.6.6.tar.gz \
+${rpm_root}/*/nco-4.6.6-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.6-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.6-?.*.rpm
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-4.6.6-1 -d nco-4.6.6 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.6 nco # Export most recent and build as 4.6.6-1
+tar cvzf ./nco-4.6.6.tar.gz --exclude='nco-4.6.6/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-4.6.6 
+/bin/cp ${DATA}/nco-4.6.6.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.5-?.*.rpm
+rpmlint ${rpm_root}/*/nco-4.6.6-?.*.rpm
 sudo yum remove nco
-sudo yum install ${rpm_root}/*/nco-4.6.5-?.*.rpm
+sudo yum install ${rpm_root}/*/nco-4.6.6-?.*.rpm
 scp \
-${rpm_root}/*/nco-4.6.5-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.5-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.5-?.*.rpm \
-${rpm_root}/nco-4.6.5-?.*.src.rpm \
+${rpm_root}/*/nco-4.6.6-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.6-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.6-?.*.rpm \
+${rpm_root}/nco-4.6.6-?.*.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/*/nco-4.6.5-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-4.6.5-?.*.rpm \
-${rpm_root}/*/nco-devel-4.6.5-?.*.rpm \
-${rpm_root}/nco-4.6.5-?.*.src.rpm \
+${rpm_root}/*/nco-4.6.6-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-4.6.6-?.*.rpm \
+${rpm_root}/*/nco-devel-4.6.6-?.*.rpm \
+${rpm_root}/nco-4.6.6-?.*.src.rpm \
 zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
diff --git a/doc/index.shtml b/doc/index.shtml
index 7adccc0..fd62c95 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.6.5 released <!--#flastmod file="src/nco-4.6.5.tar.gz"-->
+Current stable NCO version is 4.6.6 released <!--#flastmod file="src/nco-4.6.6.tar.gz"-->
 </h2>
 
 <table border=0 width=100%>
@@ -149,7 +149,7 @@ and
 <h2>Recent Releases & Milestones</h2>
 
 <ul>
-<li>2017 Apr ??: 4.6.6 (<i>In progress</i>)
+<li>2017 Apr 21: 4.6.6 (<i>In progress</i>)
 <li>2017 Mar 15: 4.6.5 (Sundry features/fixes)
 <li>2017 Feb 07: 4.6.4 (<tt>ncclimo</tt> splitter)
 <li>2017 Jan 27: <i>Geosci. Model Dev.</i> publishes compression-error trade-off <a href="http://www.geosci-model-dev.net/10/413/2017">paper</a></li>
@@ -625,7 +625,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.6.5 http://github.com/nco/nco.git nco-4.6.5</tt></a>.
+<tt>git clone -b 4.6.6 http://github.com/nco/nco.git nco-4.6.6</tt></a>.
 <ul>
 <li><b>NCO 4.6.7</b>: (<i>Future</i>)
 <a href="http://nco.sf.net/nco.html#cnk">Chunking</a> bytes not elements;
@@ -633,6 +633,8 @@ extensive hashing?;
 netCDF4 compound types?;
 <tt>ncks --xtn</tt> better extensive variable treatment;</li>
 <li><b>NCO 4.6.6</b>: (<i>In Progress, features in-progress or completed include</i>) 
+<tt>ncks --cdl</tt> prints units when <i>dbg_lvl</i> ≥ 1;
+<tt>ncks --cdl</tt> prints braces for compound record variables;
 <tt>ncks --xtn</tt> better extensive variable treatment;</li>
 <li><b>NCO 4.6.5</b>: (<i>Current Stable Release</i>)
 <tt>ncks --cal</tt> prints human-legible ISO8601 dates;
@@ -795,7 +797,7 @@ 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.5</a> Executables Anaconda-compatible. Maintained by Filipe Fernandes.</li>
+<li><a href="https://github.com/conda-forge/nco-feedstock">nco-4.6.6</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>
 
@@ -804,7 +806,7 @@ Thanks to Rich Signell, Filipe Fernandes (and others?) for developing and mainta
 <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.6.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.6</a></li>
 -->
 <a href="http://packages.debian.org/unstable/science/nco">Debian NCO</a> and 
 <a href="https://launchpad.net/ubuntu/+source/nco">Ubuntu NCO</a> homepages.
@@ -812,8 +814,8 @@ Thanks to Rich Signell, Filipe Fernandes (and others?) for developing and mainta
 NCO packages in the Debian/Ubuntu repositories (e.g., Sid and Raring) generally lag the packages distributed here by 6–12 months.
 <a name="beta"></a><a name="prerelease"> <!-- http://nco.sf.net#beta -->
 Newer (beta- or pre-release) packages are often available for intrepid Debian/Ubuntu users as described <a href="https://github.com/nco/nco/tree/master/doc/beta.txt">here</a>.
-<dt>Debian package for most recent NCO release (install with, e.g., ‘<tt>dpkg --install nco_4.6.5-1_i386.deb</tt>’):</dt>
-<li><a href="https://launchpad.net/ubuntu/+source/nco/4.6.5-1">nco_4.6.5-1_amd64.deb</a> : Executables AMD64-compatible</li>
+<dt>Debian package for most recent NCO release (install with, e.g., ‘<tt>dpkg --install nco_4.6.6-1_i386.deb</tt>’):</dt>
+<li><a href="https://launchpad.net/ubuntu/+source/nco/4.6.6-1">nco_4.6.6-1_amd64.deb</a> : Executables AMD64-compatible</li>
 Thanks to Daniel Baumann, Sebastian Couwenberg, Barry deFreese, Francesco Lovergine, 
 Brian Mays, Rorik Peterson, and Matej Vela for their help packaging
 NCO for Debian over the years. 
@@ -826,7 +828,7 @@ NCO for Debian over the years.
 <ul>
 <dt>The <a href="https://admin.fedoraproject.org/pkgdb/package/nco">Fedora NCO</a> RPMs are usually up-to-date so that ‘<tt>dnf install nco</tt>’ will install a recent version. 
 RHEL NCO RPMs are documented at the Fedora site.
-OpenSUSE keeps its NCO RPMs <a href="http://software.opensuse.org/package/nco">here</a>.
+OpenSUSE keeps NCO RPMs <a href="http://software.opensuse.org/package/nco">here</a>.
 A comprehensive list of pre-built RPMs for many OS's is <a href="http://rpmfind.net/linux/rpm2html/search.php?query=nco">here</a>.
 Volunteers have updated and maintained fairly up-to-date NCO packages in Fedora since it was added by Ed Hill in about 2004.
 Thanks to Patrice Dumas, Ed Hill, Orion Poplawski, and Manfred Schwarb for packaging NCO RPMs over the years.
@@ -857,10 +859,10 @@ Thanks to Gavin Burris and Kyle Wilcox for documenting build procedures for RHEL
 <!-- 
 # Mac OS X 10.12 (Sierra) 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.6.5.macosx.10.12.tar.gz nc*;scp ${DATA}/nco-4.6.5.macosx.10.12.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+cd ~/bin;tar cvzf ${DATA}/nco-4.6.6.macosx.10.12.tar.gz nc*;scp ${DATA}/nco-4.6.6.macosx.10.12.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
 -->
 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.5.macosx.10.12.tar.gz">nco-4.6.5.macosx.10.12.tar.gz</a> (<!--#fsize file="src/nco-4.6.5.macosx.10.12.tar.gz"-->): Executables MacOSX 10.12-compatible (last updated <!--#flastmod file="src/nco-4.6.5.macosx.10.12.tar.gz"-->). 
+<li><a href="src/nco-4.6.6.macosx.10.12.tar.gz">nco-4.6.6.macosx.10.12.tar.gz</a> (<!--#fsize file="src/nco-4.6.6.macosx.10.12.tar.gz"-->): Executables MacOSX 10.12-compatible (last updated <!--#flastmod file="src/nco-4.6.6.macosx.10.12.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>
@@ -882,9 +884,9 @@ To build NCO from source yourself using MSVC or Qt, please see the <a href="nco_
 <ul>
 <!-- Copy files from http://glace.ess.uci.edu
 /usr/bin/scp /home/pvicente/nco/doc/index.shtml pvicente,nco at web.sf.net:/home/project-web/nco/htdocs
-/usr/bin/scp /home/pvicente/windows_setup/nco-4.6.3.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.6.windows.mvs.exe pvicente,nco at web.sf.net:/home/project-web/nco/htdocs/src
 -->
-<li><a href="src/nco-4.6.3.windows.mvs.exe">nco-4.6.3.windows.mvs.exe</a> (<!--#fsize file="src/nco-4.6.3.windows.mvs.exe"-->) : Windows Self-Extracting Installer (last updated <!--#flastmod file="src/nco-4.6.3.windows.mvs.exe"-->). Maintained by Pedro Vicente.</li>
+<li><a href="src/nco-4.6.3.windows.mvs.exe">nco-4.6.5.windows.mvs.exe</a> (<!--#fsize file="src/nco-4.6.5.windows.mvs.exe"-->) : Windows Self-Extracting Installer (last updated <!--#flastmod file="src/nco-4.6.5.windows.mvs.exe"-->). Maintained by Pedro Vicente.</li>
 </ul>
 
 <a name="cygwin"></a> <!-- http://nco.sf.net#cygwin -->
@@ -1055,11 +1057,11 @@ site.</li>
 The simplest way to acquire the source is to download the compressed tarball:
 <ul>
 <li>
-<!-- scp ${DATA}/nco-4.6.5.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
-<a href="https://github.com/nco/nco/archive/4.6.5.tar.gz">nco-4.6.5.tar.gz</a> 
-(<!--#fsize file="src/nco-4.6.5.tar.gz"--> compressed tar-file)<br>
-<!--#exec cmd="openssl dgst -md5 src/nco-4.6.5.tar.gz"--><br>
-<!--#exec cmd="openssl dgst -sha1 src/nco-4.6.5.tar.gz"--> 
+<!-- scp ${DATA}/nco-4.6.6.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
+<a href="https://github.com/nco/nco/archive/4.6.6.tar.gz">nco-4.6.6.tar.gz</a> 
+(<!--#fsize file="src/nco-4.6.6.tar.gz"--> compressed tar-file)<br>
+<!--#exec cmd="openssl dgst -md5 src/nco-4.6.6.tar.gz"--><br>
+<!--#exec cmd="openssl dgst -sha1 src/nco-4.6.6.tar.gz"--> 
 </li>
 </ul>
 
@@ -1078,8 +1080,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.6.5</tt>:
-<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 4.6.5</tt></p>
+then checks out NCO version <tt>4.6.6</tt>:
+<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 4.6.6</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
@@ -1087,9 +1089,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.6.5</tt>) and the development version is that the
+(e.g., <tt>4.6.6</tt>) and the development version is that the
 tagged release operators will print a valid version number (e.g.,
-<tt>4.6.5</tt>) when asked to do so with the <tt>-r</tt> flag
+<tt>4.6.6</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.
@@ -1234,9 +1236,9 @@ Users should instead first download and install the ANTLR found <a href="http://
 
 <li>Once you have installed the pre-requisites as shown above, you may 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.6.5.tar.gz</dt>
-<dt>tar xvzf 4.6.5.tar.gz</dt>
-<dt>cd nco-4.6.5</dt>
+<dt>wget https://github.com/nco/nco/archive/4.6.6.tar.gz</dt>
+<dt>tar xvzf 4.6.6.tar.gz</dt>
+<dt>cd nco-4.6.6</dt>
 <dt>./configure --prefix=/usr/local</dt>
 <dt>make</dt>
 <dt>sudo make install</dt>
diff --git a/doc/nco.texi b/doc/nco.texi
index 94d2a42..66821be 100644
--- a/doc/nco.texi
+++ b/doc/nco.texi
@@ -118,12 +118,12 @@ Octave TeXInfo manual shows clean TeXInfo structure
 @setfilename nco.info
 
 @c Define edition, date, ...
- at set nco-edition 4.6.5
- at set doc-edition 4.6.5
+ at set nco-edition 4.6.6
+ at set doc-edition 4.6.6
 @set copyright-years 1995--2017
 @set update-year 2017
- at set update-date 15 March 2017
- at set update-month March 2017
+ at set update-date 21 April 2017
+ at set update-month April 2017
 
 @settitle @acronym{NCO} @value{nco-edition} User Guide
 
@@ -297,8 +297,8 @@ notice identical to this one except for the removal of this paragraph
 @html
 <meta name="Author" content="Charlie Zender">
 <meta name="Keywords" content="NCO documentation, NCO User Guide,
-netCDF, operator, GCM, CCM, scientific data, ncbo, ncfe, ncecat,
-ncflint, ncks, ncra, ncrcat, ncrename, ncwa">
+netCDF, operator, GCM, CCM, scientific data, ncbo, ncclimo, ncfe, ncecat,
+ncflint, ncks, ncra, ncrcat, ncremap, ncrename, ncwa">
 @end html
 @html
 <body text="#000000" link="#0000EF" vlink="#008080" alink="#FF0000">
@@ -340,6 +340,16 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
 Texts. The license is available online at 
 @uref{http://www.gnu.org/copyleft/fdl.html}
 @sp 2
+We gratefully acknowledge support for @acronym{NCO} development and
+maintenance provided by these institutions and programs:
+ at acronym{DOE} @acronym{ACME} DE-SC0012998, 
+ at acronym{NASA} @acronym{ACCESS} NNX12AF48A and NNX14AH55A, and
+ at acronym{NSF} @acronym{SEI} IIS-0431203.
+Research supported as part of the Accelerated Climate Modeling for
+Energy (@acronym{ACME}) program, funded by the U.S. Department of
+Energy, Office of Science, Office of Biological and Environmental
+Research.  
+ at sp 2
 The original author of this software, Charlie Zender, wants to improve it
 with the help of your suggestions, improvements, bug-reports, and patches.@*
 Charlie Zender <surname at uci dot edu> (yes, my surname is zender)@*
@@ -348,7 +358,6 @@ Department of Earth System Science@*
 University of California, Irvine@*
 Irvine, CA 92697-3100@*
 @sp 2
- at c Cover art by Robynn Rudel
 @end titlepage
 
 @c Print table of contents
@@ -529,7 +538,7 @@ Irvine, California@*
 @c 20150619 Test values automagically installed by version.texi, which is a nightmare
 @c Test print @value{EDITION}, @value{VERSION}, @value{UPDATED}, @value{UPDATED-MONTH}.
 The @acronym{NASA} @acronym{ACCESS} 2011 program generously supported 
-(Cooperative Agreement NNX12AF48A) @acronym{NCO} from 2012--2015.
+(Cooperative Agreement NNX12AF48A) @acronym{NCO} from 2012--2014.
 This allowed us to produce the first iteration of a Group-oriented 
 Data Analysis and Distribution (@acronym{GODAD}) software ecosystem. 
 Shifting more geoscience data analysis to @acronym{GODAD} is a 
@@ -553,17 +562,16 @@ June, 2015@*
 Irvine, California@*
 
 @ignore
-The @acronym{DOE} @acronym{ACME} program generously supported ...
-
-Matching @acronym{NCO} against other analysis software, and often
-besting them, has been exhilirating.
-Henry Butowsky has re-joined our efforts.
+The @acronym{DOE} @acronym{ACME} program has generously supported 
+ at acronym{NCO} development in support of high-performance climate
+modeling research. 
+This has allowed Henry Butowsky to re-join our efforts.
 Without him, much of this work would have been impossible.
 
 @sp 1
 @noindent
 Charlie Zender@*
-January, 2017@*
+June, 2017@*
 Laguna Beach, California@*
 @end ignore
 
@@ -2314,12 +2322,20 @@ We commend these greedy users for pushing @acronym{NCO} to its limits!
 @cindex shared memory machines
 This section describes the memory @acronym{NCO} requires during
 operation.
-The required memory is based on the underlying algorithms.
+The required memory depends on the underlying algorithms, datatypes,
+and compression, if any. 
 The description below is the memory usage per thread.
 Users with shared memory machines may use the threaded @acronym{NCO}
 operators (@pxref{OpenMP Threading}).
 The peak and sustained memory usage will scale accordingly,
 i.e., by the number of threads.
+In all cases the memory use refers to the @emph{uncompressed} size of
+the data. 
+The netCDF4 library automatically decompresses variables during reads. 
+The filesize can easily belie the true size of the uncompressed data.
+In other words, the usage below can be taken at face value for netCDF3
+datasets only.
+Chunking will also affect memory usage on netCDF4 operations.
 Memory consumption patterns of all operators are similar, with
 the exception of @command{ncap2}.
 
@@ -6418,6 +6434,14 @@ ncks --rgr grd_ttl='Equi-Angular grid 180x360' --rgr grid=${DATA}/grids/180x360_
 ncks --rgr grd_ttl='CAM-FV scalar grid 129x256' --rgr grid=${DATA}/grids/129x256_SCRIP.20150901.nc \
      --rgr latlon=129,256 --rgr lat_typ=fv --rgr lon_typ=grn_ctr ~zender/nco/data/in.nc ~/foo.nc
 
+# 91x180 CAM-FV grid, first longitude centered at Greenwich (2 degree grid)
+ncks --rgr grd_ttl='CAM-FV scalar grid 91x180'#latlon=91,180#lat_typ=fv#lon_typ=grn_ctr \
+     --rgr grid=${DATA}/grids/91x180_SCRIP.20170401.nc ~zender/nco/data/in.nc ~/foo.nc
+
+# 25x48 CAM-FV grid, first longitude centered at Greenwich (7.5 degree grid)
+ncks --rgr grd_ttl='CAM-FV scalar grid 25x48'#latlon=25,48#lat_typ=fv#lon_typ=grn_ctr \
+     --rgr grid=${DATA}/grids/25x48_SCRIP.20170401.nc ~zender/nco/data/in.nc ~/foo.nc
+
 # 128x256 Equi-Angular grid, Greenwich west edge of first longitude
 # This is the CAM-FV offset grid for the 129x256 CAM-FV scalar grid above
 ncks --rgr grd_ttl='Equi-Angular grid 128x256' --rgr grid=${DATA}/grids/128x256_SCRIP.20150901.nc \
@@ -6818,14 +6842,17 @@ These annotations include
 @cindex @code{cell_methods}
 @cindex @code{cell_area}
 @cindex @code{steradian}
- at cindex @samp{--rgr area_nm=@var{area_nm}}
+ at cindex @samp{--no_cll_msr}
+ at cindex @samp{--rgr no_area_out}
+ at cindex @samp{--rgr no_area}
+ at cindex @samp{--rgr area_out=@var{area_nm}}
 @cindex @var{area_nm}
 @cindex @acronym{SI}
 @cindex solid angle
 @cindex extensive variable
 @item Gridcell Area: @var{area}
-    The variable @var{area_nm} (which defaults to @code{area}) is
-    always (re-)created in the @var{output_file} to hold the gridcell
+    The variable @var{area_nm} (which defaults to @code{area}) is, by 
+    default, (re-)created in the @var{output_file} to hold the gridcell 
     area in steradians.     
     To store the area in a different variable, use the option
     @samp{--rgr area=@var{area_nm}}.
@@ -6837,6 +6864,11 @@ These annotations include
     that its value depends on the gridcell boundaries.  
     Since @var{area_nm} is a property of the grid, it is read directly
     from the @var{map-file} rather than regridded itself. 
+    To omit the area variable from the output file, set the
+    @var{no_area_out} variable to any value, e.g.,
+    @samp{--no_area_out='Y'}. 
+    The @code{--no_cll_msr} switch to @command{ncremap} and
+    @command{ncclimo} does this automatically.
 @cindex @code{frc}
 @cindex @samp{--rgr frc_nm=@var{frc_nm}}
 @cindex @var{frc_nm}
@@ -6880,6 +6912,47 @@ These annotations include
     The @var{map-file} and @var{input-file} names are stored in the
     @var{output-file} global attributes @code{mapping_file} and
     @code{source_file}, respectively.
+ at html
+<a name="slat"></a> <!-- http://nco.sf.net/nco.html#slat -->
+<a name="slon"></a> <!-- http://nco.sf.net/nco.html#slon -->
+<a name="stg"></a> <!-- http://nco.sf.net/nco.html#stg -->
+<a name="stagger"></a> <!-- http://nco.sf.net/nco.html#stagger -->
+<a name="no_stagger"></a> <!-- http://nco.sf.net/nco.html#no_stagger -->
+ at end html
+ at cindex @code{--no_stg}
+ at cindex @code{--no_stagger}
+ at cindex @code{--no_stg_grd}
+ at cindex @code{slat}
+ at cindex @code{slon}
+ at cindex @code{w_stag}
+ at cindex @acronym{CAM}
+ at cindex @acronym{FV}
+ at cindex @acronym{AMWG}
+ at cindex staggered-grid
+ at cindex no stagger
+ at item Staggered Grid Coordinates and Weights
+    Owing to its heritage as an early @acronym{CCM} analysis tool,
+    @acronym{NCO} tries to create output interoperable with other
+    @acronym{CESM} analysis tools. 
+    Like many models, @acronym{CAM} computes and archives thermodynamic
+    state variables on gridcell centers, while dynamics variables
+    (@var{U}, @var{V}) are on gridcell edges (interfaces).
+    The dual-grid, sometimes called the ``staggered grid'', formed
+    by connecting edge centers is thus the natural location for 
+    storing output dynamics variables.
+    Some analysis packages, such as the @acronym{AMWG} diagnostics, 
+    require access to these dual-grid coordinates with the names
+    @code{slat} and @code{slon} (for ``staggered'' latitude and
+    longitude).
+    By default the @acronym{NCO} regridder outputs these coordinates,
+    along with the latitude weights (called @code{w_stag}), when
+    the input is on a cap (aka @acronym{FV}) grid so that the result
+    can be processed by @acronym{AMWG} diagnostics. 
+    Turn-off archiving the staggered grid (i.e., @code{slat},
+    @code{slon}, and @code{w_stag}) by setting @var{no_stagger}
+    to any value, e.g., @samp{--no_stagger='Y'}.
+    The @code{--no_stg_grd} flag in @command{ncremap} and
+    @command{ncclimo} sets this @code{--no_stagger} flag.
 @end table
 
 One may supply muliple @samp{--rgr @var{key}=@var{value}} options
@@ -7406,8 +7479,9 @@ Use @samp{--mrd} to override this.
 @cindex @code{missing_value}
 @cindex @code{_FillValue}
 @cartouche
-Availability: @command{ncap2}, @command{ncbo}, @command{nces},
- at command{ncflint}, @command{ncpdq}, @command{ncra}, @command{ncwa}@* 
+Availability: @command{ncap2}, @command{ncbo}, @command{ncclimo},
+ at command{nces}, @command{ncflint}, @command{ncpdq}, @command{ncra},  
+ at command{ncremap}, @command{ncwa}@* 
 Short options: None@*
 @end cartouche
 
@@ -7415,7 +7489,7 @@ The phrase @dfn{missing data} refers to data points that are missing,
 invalid, or for any reason not intended to be arithmetically processed
 in the same fashion as valid data.  
 @cindex arithmetic operators
-The @acronym{NCO} arithmetic operators attempt to handle missing data in
+All @acronym{NCO} arithmetic operators attempt to handle missing data in 
 an intelligent fashion. 
 There are four steps in the @acronym{NCO} treatment of missing data:
 @enumerate
@@ -12059,36 +12133,35 @@ Spacing (or increment) between elements.
 Variable from which the array can derive its shape 1D or nD
 @end table
 
- at noindent @strong{ One-Dimensional Arrays@*}
+ at noindent @strong{One-Dimensional Arrays@*}
 Use form (A) or (B)  for 1D arrays 
 @example
-In the following var_out is of type NC_DOUBLE
-var_out=array(10.0, 2, $time)  //10.5,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,28.5
+# var_out will be NC_DOUBLE:
+var_out=array(10.0,2,$time) // 10.5,12.5,14.5,16.5,18.5,20.5,22.5,24.5,26.5,28.5
 
-The following is also ID 
-It gets its "shape" from the var "ilev" and is of type NC_UINT
-var_out=array( 0ul, 2, ilev)    // 0,2,4,6
+// var_out will be NC_UINT, and "shape" will duplicate "ilev"
+var_out=array(0ul,2,ilev) // 0,2,4,6
 
-The following is of type NC_FLOAT
-var_out=array(99.0f, 2.5, $lon) // 99,101.5,104,106.5
+// var_out will be NC_FLOAT
+var_out=array(99.0f,2.5,$lon) // 99,101.5,104,106.5
 
-// create an array of zeros 
-var_out=array(0, 0, $time) // 0,0,0,0,0,0,0,0,0,0 
+// Create an array of zeros 
+var_out=array(0,0,$time) // 0,0,0,0,0,0,0,0,0,0 
 
-// create an array of ones
-var_out=array(1.0, 0.0, $lon) // 1.0,1.0,1.0,1.0 
+// Create array of ones
+var_out=array(1.0,0.0,$lon) // 1.0,1.0,1.0,1.0 
 @end example
 
 @noindent @strong{ n-Dimensional Arrays@*}
 Use form (B) or (C) for creating n-D arrays.@* 
-nb In (C) the final argument is a list of dimensions
+NB: In (C) the final argument is a list of dimensions
 
 @example
-The following two are equivalent
+// These are equivalent
 var_out=array(1.0, 2.0, three_dmn_var)
 var_out=array(1.0, 2.0,/$lat, $lev, $lon/)
 
-Below the type is NC_BYTE
+// var_out is NC_BYTE
 var_out=array(20b, -4, /$lat,$lon/)  // 20,16,12,8,4,0,-4,-8  
 
 srt=3.14159f; inc=srt/2.0f
@@ -12096,7 +12169,6 @@ var_out(srt,inc, var_2D_rrg)
 // 3.14159, 4.712385, 6.28318, 7.853975, 9.42477, 10.99557, 12.56636, 14.13716 ; 
 @end example
 
-
 @cindex hyperslabs
 Hyperslabs in @command{ncap2} are more limited than hyperslabs with the
 other @acronym{NCO} operators. 
@@ -13196,7 +13268,7 @@ Consider the variables @code{float lon_2D_rct(lat,lon);} and
 Suppose we wish to multiply by two the elements for which @code{var_msk} 
 @w{equals 1}: 
 @example
-where(var_msk==1) lon_2D_rct=2*lon_2D_rct;
+where(var_msk == 1) lon_2D_rct=2*lon_2D_rct;
 @end example
 Suppose that we have the variable @code{int RDM(time)} and that we want
 to set its values less than 8 or greater than 80 @w{to 0}:
@@ -14718,7 +14790,7 @@ double gsl_stats_wmean (var_weight, weight_stride, var_data, data_stride, n, var
 double gsl_stats_quantile_from_sorted_data (var_sorted_data, data_stride, n, var_f) ;
 @end example
 
- at noindent @acronym{GSL} has no notion of missing values or dimensionality beyond one. If your data has missing values which you want ignored in the calculations then use the @command{ncap2} built in aggregate functions( @ref{Methods and functions} ). The @acronym{GSL} functions operate on a vector of values created from the var_data/stride/n arguments. The ncap wrappers check that there is no bounding error with regard to the size of the data and the final value in the vector. 
+ at noindent @acronym{GSL} has no notion of missing values or dimensionality beyond one. If your data has missing values which you want ignored in the calculations then use the @command{ncap2} built in aggregate functions(@ref{Methods and functions}). The @acronym{GSL} functions operate on a vector of values created from the var_data/stride/n arguments. The ncap wrappers check that there is no bounding error with regard to the size of the data and the final value in the vector. 
 
 Some examples
 
@@ -16788,6 +16860,7 @@ ncrcat t_anm_8589_??.nc t_anm_8589_0112.nc
 @html
 <a name="ncclimo"></a> <!-- http://nco.sf.net/nco.html#ncclimo -->
 <a name="ncsplit"></a> <!-- http://nco.sf.net/nco.html#ncsplit -->
+<a name="ncsplit"></a> <!-- http://nco.sf.net/nco.html#splitter -->
 @end html
 @node ncclimo netCDF Climatology Generator, ncecat netCDF Ensemble Concatenator, ncbo netCDF Binary Operator, Reference Manual
 @section @command{ncclimo} netCDF Climatology Generator
@@ -16801,7 +16874,8 @@ SYNTAX
 ncclimo [-a @var{dec_md}] [-C @var{clm_md}] [-c @var{caseid}] [-d @var{dbg_lvl}]
 [-E @var{yr_prv}] [-e @var{yr_end}] [-f @var{fml_nm}] [-h @var{hst_nm}] [-i @var{drc_in}]
 [-j @var{job_nbr}] [-l @var{lnk_flg}] [-m @var{mdl_nm}] [-n @var{nco_opt}] 
-[-O @var{drc_rgr}] [-o @var{drc_out}] [-p @var{par_typ}] [-R @var{rgr_opt}] [-r @var{rgr_map}] 
+[--no_cll_msr ] [--no_frm_trm] [--no_ntv_tms] [--no_stg_grd]
+[-O @var{drc_rgr}] [-o @var{drc_out}] [-p @var{par_typ}] [-R @var{rgr_opt}] [-r @var{rgr_map}]
 [-S @var{yr_prv}] [-s @var{yr_srt}] [--stdin] [-t @var{thr_nbr}] [--tpd=@var{tpd_dly}]
 [-v @var{var_lst}] [--version] [-x @var{cf_flg}] [-X @var{drc_xtn}] [-x @var{drc_prv}] 
 [-Y @var{rgr_xtn}] [-y @var{rgr_prv}] [--ypf=@var{ypf_max}]
@@ -17075,6 +17149,67 @@ 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{--no_cll_msr}
+ at cindex @code{--no_cll}
+ at cindex @code{--no_cell_measures}
+ at cindex @code{--no_area}
+ at cindex @code{cell_measures} attribute
+ at item --no_cll_msr (@code{--no_cll_msr}, @code{--no_cll}, @code{--no_cell_measures}, @code{--no_area})
+This switch (which takes no argument) controls whether @command{ncclimo}
+and @command{ncremap} add measures variables to the extraction list
+along with the primary variable and other associated variables. 
+See @ref{CF Conventions} for a detailed description.
+
+ at cindex @code{--no_frm_trm}
+ at cindex @code{--no_frm}
+ at cindex @code{--no_formula_terms}
+ at cindex @code{formula_terms} attribute
+ at item --no_frm_trm (@code{--no_frm_trm}, @code{--no_frm}, @code{--no_formula_terms})
+This switch (which takes no argument) controls whether @command{ncclimo}
+and @command{ncremap} add formula variables to the extraction list along
+with the primary variable and other associated variables. 
+See @ref{CF Conventions} for a detailed description.
+
+ at html
+<a name="no_ntv_tms"></a> <!-- http://nco.sf.net/nco.html#no_ntv_tms -->
+<a name="no_ntv"></a> <!-- http://nco.sf.net/nco.html#no_ntv -->
+<a name="no_native"></a> <!-- http://nco.sf.net/nco.html#no_native -->
+ at end html
+ at cindex @code{--no_ntv_tms}
+ at cindex @code{--no_ntv}
+ at cindex @code{--no_native}
+ at cindex @code{--remove_native}
+ at item --no_ntv_tms (@code{--no_ntv_tms}, @code{--no_ntv}, @code{--no_native}, @code{--remove_native})
+This switch (which takes no argument) controls whether the splitter
+retains native grid split files, which it does by default, or deletes them.
+ at command{ncclimo} can split model output from multi-variable native grid
+files into per-variable timeseries files and regrid those onto a
+so-called analysis grid. 
+That is the typical format in which Model Intercomparison Projects
+(@acronym{MIP}s) request and disseminate contributions.
+When the data producer has no use for the split timeseries on the native
+grid, he/she can invoke this flag to cause @command{ncclimo} to
+delete the native grid timeseries (not the raw native grid datafiles). 
+
+ at html
+<a name="no_stg_grd"></a> <!-- http://nco.sf.net/nco.html#no_stg_grd -->
+<a name="no_stg"></a> <!-- http://nco.sf.net/nco.html#no_stg -->
+ at end html
+ at cindex @code{slat}
+ at cindex @code{slon}
+ at cindex @code{w_stag}
+ at cindex @code{--no_stg_grd}
+ at cindex @code{--no_stg}
+ at cindex @code{--no_stagger}
+ at cindex @code{--no_staggered_grid}
+ at item --no_stg_grd (@code{--no_stg_grd}, @code{--no_stg}, @code{--no_stagger}, @code{--no_staggered_grid})
+This switch (which takes no argument) controls whether
+regridded output will contain the staggered grid coordinates 
+ at code{slat}, @code{slon}, and @code{w_stag} (@pxref{Regridding}). 
+By default the staggered grid is output for all files regridded from 
+a Cap (aka @acronym{FV}) grid, except when the regridding is performed
+as part of splitting (reshaping) into timeseries.
+
 @cindex @code{-o @var{drc_out}}
 @cindex @var{drc_out}
 @cindex @code{--drc_out}
@@ -17207,15 +17342,19 @@ This option only takes effect in daily-average climatology mode.
 @cindex @code{--variables}
 @cindex @code{--variable_list}
 @item -v @var{var_lst} (@code{--var_lst}, @code{--var}, @code{--vars}, @code{--variables}, @code{--variable_list})
-Variables to subset or split.
+Variables to subset or to split.
 Same behavior as @ref{Subsetting Files}.
-The use of @var{var_lst} is optional in climate generation mode but is 
-mandatory in timeseries reshaping mode (to prevent inadvertently copying 
-the results of an entire model simulation).
+The use of @var{var_lst} is optional in climate generation mode.
+Invoking this switch was required in the original splitter released in 
+version 4.6.5 (March, 2017), and became optional as of version 4.6.6
+(May, 2017). 
+This option is recommended in timeseries reshaping mode to prevent
+inadvertently copying the results of an entire model simulation. 
 Regular expressions are allowed so, e.g., @samp{PREC.?} extracts
 the variables @samp{PRECC,PRECL,PRECSC,PRECSL} if present.
-Note that in reshaping mode all matches to a regular expression are
+Current in reshaping mode all matches to a regular expression are
 placed in the same output file.
+We hope to remove this limitation in the future.
 
 @cindex @code{--version}
 @cindex @code{--vrs}
@@ -18321,7 +18460,7 @@ To add a new record dimension named ``time'' to all variables
 ncecat -u time in.nc out.nc
 @end example
 To glue together multiple files with a new record variable named
-``reaalization'' 
+``realization'' 
 @example
 ncecat -u realization 85_0[1-5].nc 85.nc
 @end example
@@ -18341,7 +18480,7 @@ and suppose the user wishes to convert @code{time} from a record
 dimension to a non-record dimension.
 This may be useful, for example, when the user has another use for the
 record variable.
-The simplest method is to use @samp{ncks --fix_rec_dmn} but another
+The simplest method is to use @samp{ncks --fix_rec_dmn}, and another
 possibility is to use @command{ncecat} followed by 
 @command{ncwa}: 
 @cindex degenerate dimension
@@ -19372,11 +19511,15 @@ Behold @acronym{JSON} output in default mode:
 @verbatim
 zender at aerosol:~$ ncks --jsn -v one ~/nco/data/in.nc
 {
+  "variables": {
     "one": {
       "type": "float",
-      "long_name": "one",
+      "attributes": {
+        "long_name": "one"
+      },
       "data": 1.0
     }
+  }
 }
 @end verbatim
 @end example
@@ -19555,7 +19698,7 @@ exact reproduction of the original dataset:
 
 @cindex @command{jsonlint}
 That @acronym{ncks} produces correct translations of for all supported
-datatypes may be verified by @acronym{JSON} syntax checker command
+datatypes may be verified by a @acronym{JSON} syntax checker command
 like @command{jsonlint}. 
 Please let us know how to improve @acronym{JSON} features for your
 application.  
@@ -21350,8 +21493,9 @@ SYNTAX
 @example
 ncremap [-a @var{alg_typ}] [-D @var{dbg_lvl}] [-d @var{dst_fl}] [-E @var{esmf_opt}]
 [-G @var{grd_sng}] [-g @var{grd_dst}] [-I @var{drc_in}] [-i @var{input-file}] [-j @var{job_nbr}]
-[-M] [-m @var{map_fl}] [-n @var{nco_opt}] [-O @var{drc_out}] [-o @var{output-file}]
-[-P @var{pdq_typ}] [-p @var{par_typ}] [-R @var{rgr_opt}] [-s @var{grd_src}] 
+[-M] [-m @var{map_fl}] [-n @var{nco_opt}] [--no_cll_msr ] [--no_frm_trm] [--no_stg_grd]
+[-O @var{drc_out}] [-o @var{output-file}]
+[-P @var{pdq_typ}] [-p @var{par_typ}] [-R @var{rgr_opt}] [-s @var{grd_src}] [--stdin]
 [-T @var{tempest_opt}] [-t @var{thr_nbr}] [-U @var{drc_tmp}] [-u @var{unq_sfx}] 
 [-V @var{rgr_var}] [-v @var{var_lst}[, at dots{}]] [--version] [--vrb=@var{vrb_lvl}] 
 [-w @var{wgt_gnr}] [-x @var{xtn_lst}[, at dots{}]] 
@@ -21766,6 +21910,42 @@ Specifies a string of options to pass-through unaltered to
 @command{ncks}. 
 @var{nco_opt} defaults to @samp{-O --no_tmp_fl}.
 
+ at cindex @code{--no_cll_msr}
+ at cindex @code{--no_cll}
+ at cindex @code{--no_cell_measures}
+ at cindex @code{--no_area}
+ at cindex @code{cell_measures} attribute
+ at item --no_cll_msr (@code{--no_cll_msr}, @code{--no_cll}, @code{--no_cell_measures}, @code{--no_area})
+This switch (which takes no argument) controls whether @command{ncclimo}
+and @command{ncremap} add measures variables to the extraction list
+along with the primary variable and other associated variables. 
+See @ref{CF Conventions} for a detailed description.
+
+ at cindex @code{--no_frm_trm}
+ at cindex @code{--no_frm}
+ at cindex @code{--no_formula_terms}
+ at cindex @code{formula_terms} attribute
+ at item --no_frm_trm (@code{--no_frm_trm}, @code{--no_frm}, @code{--no_formula_terms})
+This switch (which takes no argument) controls whether @command{ncclimo}
+and @command{ncremap} add formula variables to the extraction list along
+with the primary variable and other associated variables. 
+See @ref{CF Conventions} for a detailed description.
+
+ at cindex @code{slat}
+ at cindex @code{slon}
+ at cindex @code{w_stag}
+ at cindex @code{--no_stg_grd}
+ at cindex @code{--no_stg}
+ at cindex @code{--no_stagger}
+ at cindex @code{--no_staggered_grid}
+ at item --no_stg_grd (@code{--no_stg_grd}, @code{--no_stg}, @code{--no_stagger}, @code{--no_staggered_grid})
+This switch (which takes no argument) controls whether
+regridded output will contain the staggered grid coordinates 
+ at code{slat}, @code{slon}, and @code{w_stag} (@pxref{Regridding}). 
+By default the staggered grid is output for all files regridded from 
+a Cap (aka @acronym{FV}) grid, except when the regridding is performed
+as part of splitting (reshaping) into timeseries.
+
 @html
 <a name="out_drc"></a> <!-- http://nco.sf.net/nco.html#out_drc -->
 @end html
@@ -22031,8 +22211,8 @@ suspects'' to identify latitude and longitude coordinate variables.
 Now, if @var{var_rgr} is @acronym{CF}-compliant, then @command{ncremap}
 will automatically identify the horizontal spatial dimensions. 
 If @var{var_rgr} is supplied but is not @acronym{CF}-compliant, then
- at command{ncremap} will use its internal database to identify 
-horizontal spatial dimensions.
+ at command{ncremap} will still attempt to identify horizontal spatial
+dimensions using its internal database of ``likely names''.
 If both these automated methods fail, manually supply @command{ncremap}
 with the names of the horizontal spatial dimensions 
 @example
@@ -22643,20 +22823,33 @@ ncks -v /g1/lon ~/foo.nc # Shows units and new_units are both gone
 @end example
 
 Clearly, renaming dimensions in netCDF4 files is non-trivial.
-The latest chapter in this saga is a netCDF4 bug discovered in
+The penultimate chapter in this saga is a netCDF4 bug discovered in
 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.
+As of this writing (March, 2017), this bug is still present in netCDF4
+version 4.4.2-development. 
 This bug causes @command{ncrename} to create corrupted output files
-when attempting to rename two dimensions simultaneously.
+when attempting to rename two or more dimensions simultaneously.
 The workaround is to rename the dimensions sequentially, in two separate  
 @command{ncrename} calls.
 @example
 @verbatim
 # Demonstate bug in netCDF4/HDF5 library netCDF-4.3.3.1
-ncrename -d y,rlat -d x,rlon dayclim_withoutpr.nc dayclim2.nc
-ncdump dayclim2.nc # File is unreadable
+ncrename -O -d lev,z -d lat,y -d lon,x ~/nco/data/in_grp.nc ~/foo.nc # Completes but file is unreadable
+ncks -v one ~/foo.nc # File is unreadable
+ at end verbatim
+ at end example
+
+Last but not least is a netCDF4 bug discovered in March, 2017, and
+present in version 4.4.1 (and possibly earlier versions too) and later.
+This bug causes @command{ncrename} to fail to rename a variable when the
+result would become a coordinate.
+The workaround is to convert to netCDF3, then rename, then convert back
+to netCDF4.
+ at example
+ at verbatim
+# Demonstate bug in netCDF4/HDF5 library netCDF-4.4.1
+ncrename -O -v non_coord,coord ~/nco/data/in_grp.nc ~/foo.nc # Fails (HDF error)
 @end verbatim
 @end example
 
diff --git a/man/ncclimo.1 b/man/ncclimo.1
index 74af989..083b5a1 100644
--- a/man/ncclimo.1
+++ b/man/ncclimo.1
@@ -33,6 +33,7 @@ ncclimo
 .IR mdl_nm ] 
 [\-n
 .IR nco_usr ] 
+[\--no_cll_msr ] [\--no_frm_trm] [\--no_ntv_tms] [\--no_stg_grd]
 [\-O
 .IR drc_rgr ] 
 [\-o
@@ -42,8 +43,8 @@ ncclimo
 [\-R
 .IR rgr_opt ] 
 [\-r
-.IR rgr_map ] 
-[\-S
+.IR rgr_map ] [\--rm_ntv
+.IR rm_ntv ] [\-S
 .IR yr_prv ] 
 [\-s
 .IR yr_srt ] 
diff --git a/man/ncremap.1 b/man/ncremap.1
index 3b03c05..c7d24e7 100644
--- a/man/ncremap.1
+++ b/man/ncremap.1
@@ -29,6 +29,7 @@ ncremap
 .IR map_fl ] 
 [\-n
 .IR nco_usr ] 
+[\--no_cll_msr ] [\--no_frm_trm] [\--no_stg_grd]
 [\-O
 .IR out_drc ] 
 [\-o
@@ -40,7 +41,7 @@ ncremap
 [\-R
 .IR rgr_opt ] 
 [\-s
-.IR grd_src ] 
+.IR grd_src ] [\--stdin ]
 [\-T
 .IR tempest_opt ] 
 [\-t
@@ -53,8 +54,8 @@ ncremap
 .IR rgr_var ] 
 [\-v
 .IR var_lst ] 
-[\--verbose ] 
-.IR prn_vrb ] [\--version ] [\-w
+[\--vrb_lvl ] 
+.IR vrb_lvl ] [\--version ] [\-w
 .IR wgt_gnr ] 
 [\-x
 .IR xtn_lst ] 
diff --git a/src/nco++/NcapVar.hh b/src/nco++/NcapVar.hh
index 0eec28c..a68f448 100644
--- a/src/nco++/NcapVar.hh
+++ b/src/nco++/NcapVar.hh
@@ -31,7 +31,15 @@ public:
 
   bool flg_mem;   // true -- then var data is written to memory  
                   // rather than disk -- At the moment all meta-data
-                  // is cached  ? --     
+                  // is cached  ? --
+
+                  // for an attribute flg_mem=true - means mark att as transient
+                  // this means that it  is inherited or propgagated once then deleted
+                  // This is requried so for example agg_cls() adds the attribute 'var_nm at cell_methods'
+                  // we want this att be picked up on the LHS but NOT written to 'var_nm'
+                  // for example   three_sum=three_dmn_var_dbl.sum();
+                  // so only three_sum gets @cell_methods().
+
   int flg_stt;    // status flag
                   // 0 -- var is defined in memory
                   // 1 -- var is defined in output - but no data written
diff --git a/src/nco++/fmc_all_cls.cc b/src/nco++/fmc_all_cls.cc
index 90494f9..fb0f88c 100644
--- a/src/nco++/fmc_all_cls.cc
+++ b/src/nco++/fmc_all_cls.cc
@@ -89,9 +89,10 @@
             dmn_sct **dim_nw=NULL_CEWI;  
             var_sct *var=NULL_CEWI;
             var_sct *var1=NULL_CEWI;
+            var_sct *var_att_cll_mtd=NULL_CEWI;
            
-	    std::string susg;
-	    std::string sfnm=fmc_obj.fnm();
+	        std::string susg;
+	        std::string sfnm=fmc_obj.fnm();
 
             RefAST aRef;
             RefAST tr;
@@ -158,6 +159,7 @@
 
              } // end for 
 
+
 	    // Important to note that dmn_vtr contains dim pointers
             // picked up from var1->dim so there is no need to free them 
              if(vtr_args.size() >1) 
@@ -216,14 +218,14 @@
       
               dim_nw=(dmn_sct**)nco_malloc(nbr_dim*sizeof(dmn_sct*));
 
-	      for(idx=0 ; idx<nbr_dim; idx++){ 
+	          for(idx=0 ; idx<nbr_dim; idx++){
                 dim_nw[idx]=nco_dmn_dpl(var1->dim[idx]);   
                 dim_nw[idx]->srt=var1->srt[idx];
                 dim_nw[idx]->end=var1->end[idx];
                 dim_nw[idx]->cnt=var1->cnt[idx];
                 dim_nw[idx]->srd=var1->srd[idx];
                    
-	        var1->dim[idx]=dim_nw[idx]; 
+	            var1->dim[idx]=dim_nw[idx];
               }
 
             }  
@@ -231,12 +233,27 @@
             if(dmn_vtr.size() >0 && dmn_vtr.size()<nbr_dim ){
                 dim=&dmn_vtr[0];
                 avg_nbr_dim=dmn_vtr.size();
-	    // average over all dims                           
+	        // average over all dims
             }else{
                 dim=var1->dim;
                 avg_nbr_dim=nbr_dim; 
-            }    
-            
+            }
+
+
+          if(prs_arg->FLG_CLL_MTH) {
+            NcapVar *Nvar;
+            var_att_cll_mtd = ncap_att_cll_mtd(var1->nm,dim, avg_nbr_dim, (nco_op_typ)fdx);
+            Nvar=new NcapVar(var_att_cll_mtd);
+            // mark attribute as transient
+            // this mean it is propagated to the LHS only once then deleted
+            Nvar->flg_mem=true;
+            prs_arg->var_vtr.push_ow(Nvar);
+          }
+
+
+
+
+
             // do the heavy lifting
             switch(fdx){
                     
@@ -307,11 +324,12 @@
              // var1 is freed/destroyed in nco_var_avg()
 
 
+
             // free local dim list if necessary
             if(dim_nw){
-	      for(idx=0; idx<nbr_dim;idx++)
-		dim_nw[idx]=nco_dmn_free(dim_nw[idx]);
-              nco_free(dim_nw);
+	          for(idx=0; idx<nbr_dim;idx++)
+		        dim_nw[idx]=nco_dmn_free(dim_nw[idx]);
+                nco_free(dim_nw);
             }  		 
             return var;                
 
@@ -3292,31 +3310,30 @@ double bil_cls::clc_lin_ipl(double x1,double x2, double x, double Q0,double Q1){
     // check limits co-ord increasing 
     if(bInc){
       for(idx=0;idx<r_sz;idx++){ 
-	 dval=var2->val.dp[idx]; 
+	    dval=var2->val.dp[idx];
          /* default set to out of range */   
-         ip[idx]=-1;  
-         if(dval>=dp_crd[0] && dval<=dp_crd[c_sz-1] )
+        ip[idx]=-1;
+        if(dval>=dp_crd[0] && dval<=dp_crd[c_sz-1] )
            for(jdx=0 ; jdx<c_sz-1 ; jdx++)
-             if( dval >= dp_crd[jdx] && dval <= dp_crd[jdx+1] )
-             {  
-	        ip[idx]=(dval-dp_crd[jdx]<= dp_crd[jdx+1]-dval ? jdx: jdx+1 );    
-                break;
-	     }  
+             if( dval >= dp_crd[jdx] && dval <= dp_crd[jdx+1] ) {
+               ip[idx] = (dval - dp_crd[jdx] <= dp_crd[jdx + 1] - dval ? jdx : jdx + 1);
+               break;
+             }
       }
     }
     // check limits co-ord decreasing
     if(!bInc){
       for(idx=0;idx<r_sz;idx++){  
-	 dval=var2->val.dp[idx]; 
-         /* default set to out of range */   
-         ip[idx]=-1;  
-         if(dval<=dp_crd[0] && dval>=dp_crd[c_sz-1] )
-           for(jdx=0 ; jdx<c_sz-1 ; jdx++)
-             if( dval <= dp_crd[jdx] && dval >= dp_crd[jdx+1] )
-             {  
-	        ip[idx]=(dp_crd[jdx]-dval <= dval-dp_crd[jdx+1] ? jdx: jdx+1 );    
-                break;
-	     }  
+	    dval=var2->val.dp[idx];
+        /* default set to out of range */
+        ip[idx]=-1;
+        if(dval<=dp_crd[0] && dval>=dp_crd[c_sz-1] )
+          for(jdx=0 ; jdx<c_sz-1 ; jdx++)
+            if( dval <= dp_crd[jdx] && dval >= dp_crd[jdx+1] )
+            {
+	          ip[idx]=(dp_crd[jdx]-dval <= dval-dp_crd[jdx+1] ? jdx: jdx+1 );
+              break;
+	        }
       }  
     }              
     (void)cast_nctype_void(NC_DOUBLE,&var1->val);
@@ -3772,9 +3789,15 @@ double bil_cls::clc_lin_ipl(double x1,double x2, double x, double Q0,double Q1){
        return get_fnd(is_mtd, vtr_args,fmc_obj, walker);    
        break;
   
-     case PATOI: 
+     case PATOI:
+     case PATOL:
        return atoi_fnd(is_mtd, vtr_args,fmc_obj, walker);     
        break;
+
+       // 20170317 Patch to build on OpenSUSE provided by Manfred Schwarb https://sourceforge.net/p/nco/bugs/94/
+  default:        // PJOIN, PATOL
+    return NULL;  // silence rpmlint error: is this correct?
+    break;        // E: nco no-return-in-nonvoid-function fmc_all_cls.cc:3780
   }
 
   }
@@ -4172,14 +4195,16 @@ var_sct *vlist_cls::push_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cl
          iout=0; 
 
 	 // allows whites space prefix & suffix                                                                                                                                
-         iout=std::strtol(buffer,&pend,10);
+         iout=(nco_int)std::strtol(buffer,&pend,10);
 
          if( pend !=buffer  && (*pend=='\0'|| *pend==' ') )
             ierr=0;
          else
             ierr=errno;
 
-         var=ncap_sclr_var_mk( SCS("~zz at value_list"), vtype,iout);  
+         //wrn_prn(fnc_nm,"buffer="+ SCS(buffer)+ " value=" + nbr2sng(iout)+"\n" );
+         //var=ncap_sclr_var_mk( SCS("~zz at value_list"), vtype,iout);
+         var=ncap_sclr_var_mk(SCS("~zz at value_list"),iout);
 
        }   
        break; 
@@ -4190,22 +4215,26 @@ var_sct *vlist_cls::push_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cl
          nco_int64 lout;
          lout=0; 
 
-	 // allows whites space prefix & suffix                                                                                                                                
-         lout=std::strtoll(buffer,&pend,10);
+	      // allows whites space prefix & suffix
+         lout=(nco_int64)std::strtoll(buffer,&pend,10);
 
          if( pend !=buffer  && (*pend=='\0'|| *pend==' ') )
             ierr=0;
          else
-	   ierr=errno;
+	        ierr=errno;
+
 
-         var=ncap_sclr_var_mk( SCS("~zz at value_list"), vtype,lout);  
+         wrn_prn(fnc_nm,"buffer="+ SCS(buffer)+ " value=" + nbr2sng(lout)+"\n" );
+         var=ncap_sclr_var_mk( SCS("~zz at value_list"),lout);
 
        }   
        break; 
   }
-  
-  var_err=ncap_sclr_var_mk(std::string("~zz at atoi_methods_err"), ierr);
-  prs_arg->ncap_var_write(var_err,true);
+
+  if(ierr) {
+    var_err = ncap_sclr_var_mk(std::string("~zz at atoi_methods_err"), ierr);
+    prs_arg->ncap_var_write(var_err, true);
+  }
                  
 
 
diff --git a/src/nco++/fmc_all_cls.hh b/src/nco++/fmc_all_cls.hh
index c7434b8..1b283f1 100644
--- a/src/nco++/fmc_all_cls.hh
+++ b/src/nco++/fmc_all_cls.hh
@@ -77,11 +77,13 @@ public:
     var_sct *fnd(RefAST expr, RefAST fargs,fmc_cls &fmc_obj, ncoTree &walker);
 };
 
+
 //Aggregate Functions /***************************************/
 class agg_cls: public vtl_cls {
 private:
-  enum{ PAVG ,PAVGSQR , PMIBS, PMABS, PMEBS, PMAX ,PMIN ,PRMS,
-	PRMSSDN, PSQRAVG, PTTL};
+  /* we want the enums to be exactly identical to the values of nco_op_typ */
+  enum{ PAVG=nco_op_avg ,PAVGSQR=nco_op_avgsqr , PMIBS=nco_op_mibs, PMABS=nco_op_mabs, PMEBS=nco_op_mebs, PMAX=nco_op_max ,PMIN=nco_op_min ,PRMS=nco_op_rms,
+	PRMSSDN=nco_op_rmssdn, PSQRAVG=nco_op_sqravg, PTTL=nco_op_ttl};
   bool _flg_dbg;
 public:
   agg_cls(bool flg_dbg);
diff --git a/src/nco++/ncap2.cc b/src/nco++/ncap2.cc
index c2a1eef..e62a637 100644
--- a/src/nco++/ncap2.cc
+++ b/src/nco++/ncap2.cc
@@ -207,8 +207,9 @@ main(int argc,char **argv)
   nco_bool RAM_OPEN=False; /* [flg] Open (netCDF3-only) file(s) in RAM */
   nco_bool RM_RMT_FL_PST_PRC=True; /* Option R */
   nco_bool WRT_TMP_FL=True; /* [flg] Write output to temporary file */
-  nco_bool flg_mmr_cln=True; /* [flg] Clean memory prior to exit */
-  
+  nco_bool flg_mmr_cln=True;  /* [flg] Clean memory prior to exit */
+  nco_bool flg_cll_mth=True;  /* [flg] Add/modify cell_methods attributes */
+
   nm_id_sct *dmn_lst=NULL_CEWI;
   nm_id_sct *xtr_lst=NULL_CEWI; /* Non-processed variables to copy to OUTPUT */
   nm_id_sct *xtr_lst_a=NULL_CEWI; /* Initialize to ALL variables in OUTPUT file */
@@ -232,6 +233,10 @@ main(int argc,char **argv)
   static struct option opt_lng[]={ /* Structure ordered by short option key if possible */
     /* Long options with no argument, no short option counterpart */
     {"clean",no_argument,0,0}, /* [flg] Clean memory prior to exit */
+    {"cll_mth",no_argument,0,0}, /* [flg] Add/modify cell_methods attributes */
+    {"cell_methods",no_argument,0,0}, /* [flg] Add/modify cell_methods attributes */
+    {"no_cll_mth",no_argument,0,0}, /* [flg] Do not add/modify cell_methods attributes */
+    {"no_cell_methods",no_argument,0,0}, /* [flg] Do not add/modify cell_methods attributes */
     {"mmr_cln",no_argument,0,0}, /* [flg] Clean memory prior to exit */
     {"drt",no_argument,0,0}, /* [flg] Allow dirty memory on exit */
     {"dirty",no_argument,0,0}, /* [flg] Allow dirty memory on exit */
@@ -401,8 +406,15 @@ main(int argc,char **argv)
 	(void)nco_vrs_prn(CVS_Id,CVS_Revision);
 	nco_exit(EXIT_SUCCESS);
       } /* endif "vrs" */
+
       if(!strcmp(opt_crr,"wrt_tmp_fl") || !strcmp(opt_crr,"write_tmp_fl")) WRT_TMP_FL=True;
       if(!strcmp(opt_crr,"no_tmp_fl")) WRT_TMP_FL=False;
+      if(!strcmp(opt_crr,"cll_mth") || !strcmp(opt_crr,"cell_methods")) flg_cll_mth=True; /* [flg] Add/modify cell_methods attributes */
+
+      if(!strcmp(opt_crr,"cll_mth") || !strcmp(opt_crr,"cell_methods")) flg_cll_mth=True; /* [flg] Add/modify cell_methods attributes */
+      if(!strcmp(opt_crr,"no_cll_mth") || !strcmp(opt_crr,"no_cell_methods")) flg_cll_mth=False; /* [flg] Add/modify cell_methods attributes */
+
+
     } /* opt != 0 */
     /* Process short options */
     switch(opt){
@@ -736,7 +748,7 @@ main(int argc,char **argv)
   prs_arg.ATT_PROPAGATE=ATT_PROPAGATE;      
   prs_arg.ATT_INHERIT=ATT_INHERIT;
   prs_arg.NCAP_MPI_SORT=(thr_nbr > 1 ? true:false);
-  
+  prs_arg.FLG_CLL_MTH=(flg_cll_mth ? true:false);
   prs_arg.dfl_lvl=dfl_lvl;  /* [enm] Deflate level */
   prs_arg.cnk_sz=(size_t *)NULL; /* Chunk sizes NULL for now */ 
   
@@ -995,7 +1007,7 @@ main(int argc,char **argv)
     } */
     if(var_vtr[idx]->xpr_typ == ncap_att){
       /* Skip missing values (for now) */
-      if(var_vtr[idx]->getAtt() == nco_mss_val_sng_get()) continue;     
+      if(var_vtr[idx]->getAtt() == nco_mss_val_sng_get() || var_vtr[idx]->flg_mem  ) continue;
       /* skip NC_STRING without warning - we  use NC_STRING as  variable pointers */  
       if( fl_out_fmt != NC_FORMAT_NETCDF4 &&  var_vtr[idx]->var->type==NC_STRING ) continue;   
       att_item.att_nm=strdup(var_vtr[idx]->getAtt().c_str());
diff --git a/src/nco++/ncap2_att.cc b/src/nco++/ncap2_att.cc
index 87fd208..a238b92 100644
--- a/src/nco++/ncap2_att.cc
+++ b/src/nco++/ncap2_att.cc
@@ -217,10 +217,15 @@ ncap_att_gnrl
   std::string s_fll;
   
   NcapVar *Nvar;
-  
+
+  // this holds the idx of transient attributes in var_vtr
+  // these are one shot attributes that are used once
+  std::vector<int> tr_int_vtr;
   // De-reference 
   NcapVarVector &var_vtr=prs_arg->var_vtr;
   NcapVarVector att_vtr; // hold new attributes.
+
+
   
   if(location == 1) fl_id=prs_arg->in_id;  
   if(location == 2) fl_id=prs_arg->out_id;  
@@ -259,6 +264,10 @@ ncap_att_gnrl
 
       // Create string for new attribute
       s_fll=s_dst+"@"+(var_vtr[idx]->getAtt());
+      // mark transient att
+      if(var_vtr[idx]->flg_mem )
+        tr_int_vtr.push_back(idx);
+
       var_att=nco_var_dpl(var_vtr[idx]->var);
       Nvar=new NcapVar(var_att,s_fll);
       att_vtr.push_back(Nvar);
@@ -278,6 +287,13 @@ ncap_att_gnrl
     var_vtr.push_ow(att_vtr[idx]);         
 #endif
   }
+
+  //delete transient atts
+  // nb go through vector in reverse order deleting
+  if(tr_int_vtr.size())
+    for(idx=tr_int_vtr.size()-1; idx>=0; idx--)
+      var_vtr.erase( tr_int_vtr[idx] );
+
   return sz;
   
 } /* end ncap_att_gnrl() */
@@ -667,6 +683,44 @@ ncap_att_char  /* extract string from a NC_CHAR or first NC_STRING */
 }
 
 
+var_sct *
+ncap_att_cll_mtd(
+const char *nm,
+dmn_sct **dim,
+int nbr_dim,
+enum nco_op_typ op_typ
+){
+  int idx;
+  var_sct *var_att;
+  std::string var_nm;
+  std::string att_txt("");
+
+  var_nm=std::string(nm)+SCS("@cell_methods");
+
+  for(idx=0;idx<nbr_dim;idx++){
+      att_txt += std::string(dim[idx]->nm);
+    if(idx<nbr_dim-1) att_txt+=SCS(", ");
+  }
+
+
+  att_txt+= SCS(": ")+SCS( nco_op_typ_to_rdc_sng(op_typ));
+
+  var_att=ncap_sclr_var_mk(var_nm, NC_CHAR,false);
+  var_att->val.vp=(void*)nco_malloc( sizeof(char)*att_txt.size());
+
+  cast_void_nctype(NC_CHAR,&var_att->val);
+  strncpy(var_att->val.cp, att_txt.c_str(), att_txt.size());
+  var_att->sz=att_txt.size();
+  cast_nctype_void(NC_CHAR,&var_att->val);
+
+  return var_att;
+
+}
+
+
+
+
+
 
 var_sct *
 ncap_sclr_var_mk
diff --git a/src/nco++/ncap2_att.hh b/src/nco++/ncap2_att.hh
index 643eded..6f560fa 100644
--- a/src/nco++/ncap2_att.hh
+++ b/src/nco++/ncap2_att.hh
@@ -134,6 +134,13 @@ char *            /* new malloc'ed string */
 ncap_att_char    /* extract string from a NC_CHAR or first NC_STRING */
 (var_sct *var_att);
 
+var_sct *
+ncap_att_cll_mtd(
+char const *nm,
+dmn_sct **dim,
+int nbr_dim,
+enum nco_op_typ op_typ
+);
 
 /*********************** make scalar vars/atts ********************************************/
 
diff --git a/src/nco++/ncoEnumTokenTypes.hpp b/src/nco++/ncoEnumTokenTypes.hpp
index d05a372..cf490d6 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 (2006-11-01): "ncoGrammer.g" -> "ncoEnumTokenTypes.hpp"$ */
+/* $ANTLR 2.7.7 (20161005): "ncoGrammer.g" -> "ncoEnumTokenTypes.hpp"$ */
 
 #ifndef CUSTOM_API
 # define CUSTOM_API
diff --git a/src/nco++/ncoLexer.cpp b/src/nco++/ncoLexer.cpp
index c139f30..60f22c5 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 (20161005): "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 992626c..1dca095 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 (20130428): "ncoGrammer.g" -> "ncoLexer.hpp"$ */
+/* $ANTLR 2.7.7 (20161005): "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 6275a11..4276541 100644
--- a/src/nco++/ncoParser.cpp
+++ b/src/nco++/ncoParser.cpp
@@ -1,4 +1,4 @@
-/* $ANTLR 2.7.7 (20130428): "ncoGrammer.g" -> "ncoParser.cpp"$ */
+/* $ANTLR 2.7.7 (20161005): "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 12ed8a6..322426f 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 (20130428): "ncoGrammer.g" -> "ncoParser.hpp"$ */
+/* $ANTLR 2.7.7 (20161005): "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 7632c4d..d3dcc08 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 (20130428): "ncoGrammer.g" -> "ncoParserTokenTypes.hpp"$ */
+/* $ANTLR 2.7.7 (20161005): "ncoGrammer.g" -> "ncoParserTokenTypes.hpp"$ */
 
 #ifndef CUSTOM_API
 # define CUSTOM_API
diff --git a/src/nco++/ncoTree.cpp b/src/nco++/ncoTree.cpp
index ae7d76c..084ff3b 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 (20161005): "ncoGrammer.g" -> "ncoTree.cpp"$ */
 #include "ncoTree.hpp"
 #include <antlr/Token.hpp>
 #include <antlr/AST.hpp>
diff --git a/src/nco++/ncoTree.hpp b/src/nco++/ncoTree.hpp
index f8fdb91..dd01575 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 (20161005): "ncoGrammer.g" -> "ncoTree.hpp"$ */
 #include <antlr/TreeParser.hpp>
 
 #line 1 "ncoGrammer.g"
diff --git a/src/nco++/prs_cls.hh b/src/nco++/prs_cls.hh
index d4c5d3d..a2d1302 100644
--- a/src/nco++/prs_cls.hh
+++ b/src/nco++/prs_cls.hh
@@ -40,7 +40,8 @@ class fmc_cls;
   bool ATT_INHERIT;                      //Var on LHS inherits attributtes from var of the same name
                                          // in the input file 
   bool NCAP_MPI_SORT;                    // sort exressions after second parse for MPI optimization
-  bool NCAP4_FILL;                        //if true Ouptut file is netcdf4 & missing value="_FillValue"
+  bool NCAP4_FILL;                       //if true Ouptut file is netcdf4 & missing value="_FillValue"
+  bool FLG_CLL_MTH;                      // if true then add @cell_methods attribute to var for an agg_cls operation
   size_t *cnk_sz; /* [nbr] Chunk sizes */
   int dfl_lvl; /* [enm] Deflate level */
 
@@ -79,6 +80,7 @@ class fmc_cls;
      ATT_INHERIT=prs_cpy.ATT_INHERIT; 
      NCAP_MPI_SORT=prs_cpy.NCAP_MPI_SORT;
      NCAP4_FILL=prs_cpy.NCAP4_FILL;
+     FLG_CLL_MTH=prs_cpy.FLG_CLL_MTH;
      dfl_lvl=prs_cpy.dfl_lvl;
      cnk_sz=prs_cpy.cnk_sz;     
    }
@@ -114,6 +116,7 @@ class fmc_cls;
      ATT_INHERIT=prs_cpy.ATT_INHERIT; 
      NCAP_MPI_SORT=prs_cpy.NCAP_MPI_SORT;
      NCAP4_FILL=prs_cpy.NCAP4_FILL;
+     FLG_CLL_MTH=prs_cpy.FLG_CLL_MTH;
      dfl_lvl=prs_cpy.dfl_lvl;      
 
      return *this;
diff --git a/src/nco/ncks.c b/src/nco/ncks.c
index 67a03f3..4c4e7c4 100644
--- a/src/nco/ncks.c
+++ b/src/nco/ncks.c
@@ -131,7 +131,6 @@ main(int argc,char **argv)
   char *fl_out_tmp=NULL_CEWI;
   char *fl_pth=NULL; /* Option p */
   char *fl_pth_lcl=NULL; /* Option l */
-  char *fl_scrip=NULL; /* [sng] SCRIP file name */
   char *lmt_arg[NC_MAX_DIMS];
   char *opt_crr=NULL; /* [sng] String representation of current long-option name */
   char *optarg_lcl=NULL; /* [sng] Local copy of system optarg */
@@ -217,8 +216,6 @@ main(int argc,char **argv)
   int xtn_nbr=0; /* [nbr] Number of extensive variables */
   int xtr_nbr=0; /* xtr_nbr will not otherwise be set for -c with no -v */
 
-  kvm_sct *sld_nfo=NULL; /* [sct] Container for SLD/SCRIP information */
-
   md5_sct *md5=NULL; /* [sct] MD5 configuration */
  
   nco_bool ALPHABETIZE_OUTPUT=True; /* Option a */
@@ -239,8 +236,9 @@ main(int argc,char **argv)
   nco_bool GET_LIST=False; /* [flg] Iterate file, print variables and exit */
   nco_bool GRP_VAR_UNN=False; /* [flg] Select union of specified groups and variables */
   nco_bool GRP_XTR_VAR_XCL=False; /* [flg] Extract matching groups, exclude matching variables */
-  nco_bool HISTORY_APPEND=True; /* Option h */
   nco_bool HAVE_LIMITS=False; /* [flg] Are there user limits? (-d) */
+  nco_bool HISTORY_APPEND=True; /* Option h */
+  nco_bool LST_RNK_GE2=False; /* [flg] Print extraction list of rank >= 2 variables */
   nco_bool MSA_USR_RDR=False; /* [flg] Multi-Slab Algorithm returns hyperslabs in user-specified order */
   nco_bool PRN_CDL=False; /* [flg] Print CDL */
   nco_bool PRN_HDN=False; /* [flg] Print hidden attributes */
@@ -323,6 +321,7 @@ main(int argc,char **argv)
     {"id",no_argument,0,0}, /* [flg] Print normally hidden information, like file, group, and variable IDs */
     {"lbr",no_argument,0,0},
     {"library",no_argument,0,0},
+    {"lst_rnk_ge2",no_argument,0,0}, /* [flg] Print extraction list of rank >= 2 variables */
     {"md5_dgs",no_argument,0,0}, /* [flg] Perform MD5 digests */
     {"md5_digest",no_argument,0,0}, /* [flg] Perform MD5 digests */
     {"md5_wrt_att",no_argument,0,0}, /* [flg] Write MD5 digests as attributes */
@@ -417,7 +416,6 @@ main(int argc,char **argv)
     {"rgr_rnr",required_argument,0,0}, /* [flg] Renormalize destination values by valid area */
     {"rnr",required_argument,0,0}, /* [flg] Renormalize destination values by valid area */
     {"renormalize",required_argument,0,0}, /* [flg] Renormalize destination values by valid area */
-    {"scrip",required_argument,0,0}, /* SCRIP file */
     {"trr",required_argument,0,0}, /* [sng] Terraref */
     {"terraref",required_argument,0,0}, /* [sng] Terraref */
     {"trr_in",required_argument,0,0}, /* [sng] File containing raw Terraref imagery */
@@ -584,6 +582,10 @@ main(int argc,char **argv)
         cnk_plc_sng=(char *)strdup(optarg);
         cnk_plc=nco_cnk_plc_get(cnk_plc_sng);
       } /* endif cnk_plc */
+      if(!strcmp(opt_crr,"cll_msr") || !strcmp(opt_crr,"cell_measures")) EXTRACT_CLL_MSR=True; /* [flg] Extract cell_measures variables */
+      if(!strcmp(opt_crr,"no_cll_msr") || !strcmp(opt_crr,"no_cell_measures")) EXTRACT_CLL_MSR=False; /* [flg] Do not extract cell_measures variables */
+      if(!strcmp(opt_crr,"frm_trm") || !strcmp(opt_crr,"formula_terms")) EXTRACT_FRM_TRM=True; /* [flg] Extract formula_terms variables */
+      if(!strcmp(opt_crr,"no_frm_trm") || !strcmp(opt_crr,"no_formula_terms")) EXTRACT_FRM_TRM=False; /* [flg] Do not extract formula_terms variables */
       if(!strcmp(opt_crr,"cmp") || !strcmp(opt_crr,"compiler")){
         (void)fprintf(stdout,"%s\n",nco_cmp_get());
         nco_exit(EXIT_SUCCESS);
@@ -624,11 +626,7 @@ main(int argc,char **argv)
         nco_exit(EXIT_SUCCESS);
       } /* endif "lbr" */
       if(!strcmp(opt_crr,"lbr_rcd")) nco_exit_lbr_rcd();
-      if(!strcmp(opt_crr,"scrip")){
-        fl_scrip=strdup(optarg);
-	sld_nfo=(kvm_sct *)nco_malloc(BUFSIZ*sizeof(kvm_sct));
-        nco_scrip_read(fl_scrip,sld_nfo);
-      } /* endif "scrip" */
+      if(!strcmp(opt_crr,"lst_rnk_ge2") || !strcmp(opt_crr,"rank_ge2"))	LST_RNK_GE2=True; /* [flg] Print extraction list of rank >= 2 variables */
       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);
@@ -965,6 +963,9 @@ main(int argc,char **argv)
   /* Construct GTT (Group Traversal Table), check -v and -g input names and create extraction list */
   (void)nco_bld_trv_tbl(in_id,trv_pth,lmt_nbr,lmt_arg,aux_nbr,aux_arg,MSA_USR_RDR,FORTRAN_IDX_CNV,grp_lst_in,grp_lst_in_nbr,var_lst_in,xtr_nbr,EXTRACT_ALL_COORDINATES,GRP_VAR_UNN,GRP_XTR_VAR_XCL,EXCLUDE_INPUT_LIST,EXTRACT_ASSOCIATED_COORDINATES,EXTRACT_CLL_MSR,EXTRACT_FRM_TRM,nco_pck_plc_nil,&flg_dne,trv_tbl);
 
+  /* [fnc] Print extraction list of N>=D variables and exit */
+  if(LST_RNK_GE2) nco_xtr_ND_lst(trv_tbl);
+
   /* Were all user-specified dimensions found? */ 
   (void)nco_chk_dmn(lmt_nbr,flg_dne);    
 
@@ -1080,6 +1081,7 @@ main(int argc,char **argv)
       rgr_nfo->fl_out_fmt=fl_out_fmt;
       rgr_nfo->dfl_lvl=dfl_lvl;
       rgr_nfo->fl_out_tmp=nco_fl_out_open(rgr_nfo->fl_out,&FORCE_APPEND,FORCE_OVERWRITE,fl_out_fmt,&bfr_sz_hnt,RAM_CREATE,RAM_OPEN,WRT_TMP_FL,&out_id);
+      if(EXTRACT_CLL_MSR) rgr_nfo->flg_area_out=True; else rgr_nfo->flg_area_out=False; /* [flg] Add area to output */
 
       /* Copy Global Metadata */
       rgr_nfo->out_id=out_id;
@@ -1225,7 +1227,7 @@ main(int argc,char **argv)
 
     /* Derived formats */
     if(prn_flg.cdl){
-      prn_flg.PRN_DMN_UNITS=False;
+      prn_flg.PRN_DMN_UNITS=True;
       prn_flg.PRN_DMN_VAR_NM=True;
       prn_flg.PRN_MSS_VAL_BLANK=True;
     } /* endif */
@@ -1320,12 +1322,6 @@ close_and_free:
     /* ncks-specific memory */
     if(fl_bnr) fl_bnr=(char *)nco_free(fl_bnr);
     if(rec_dmn_nm) rec_dmn_nm=(char *)nco_free(rec_dmn_nm); 
-    if(fl_scrip){
-      fl_scrip=(char *)nco_free(fl_scrip);
-      idx=0;
-      if(nco_dbg_lvl > nco_dbg_fl) while(sld_nfo[idx].key) nco_kvm_prn(sld_nfo[idx++]);
-      if(sld_nfo) sld_nfo=nco_kvm_lst_free(sld_nfo,idx);
-    } /* endif fl_scrip */
     /* NCO-generic clean-up */
     /* Free individual strings/arrays */
     if(cmd_ln) cmd_ln=(char *)nco_free(cmd_ln);
diff --git a/src/nco/nco.h b/src/nco/nco.h
index be28e0a..67f568b 100644
--- a/src/nco/nco.h
+++ b/src/nco/nco.h
@@ -336,7 +336,7 @@ extern "C" {
 # define NCO_VERSION_MINOR 6
 #endif /* !NCO_VERSION_MINOR */
 #ifndef NCO_VERSION_PATCH
-# define NCO_VERSION_PATCH 5
+# define NCO_VERSION_PATCH 6
 #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 */
@@ -346,7 +346,7 @@ extern "C" {
 # define NCO_LIB_VERSION ( NCO_VERSION_MAJOR * 100 + NCO_VERSION_MINOR * 10 + NCO_VERSION_PATCH )
 #endif /* !NCO_LIB_VERSION */
 #ifndef NCO_VERSION
-# define NCO_VERSION "4.6.5"
+# define NCO_VERSION "4.6.6"
 #endif /* !NCO_VERSION */
 
 /* Compatibility tokens new to netCDF4 netcdf.h: */
@@ -1114,7 +1114,8 @@ extern "C" {
     char *lon_vrt_nm; /* [sng] Name of non-rectangular boundary variable for longitude */
     char *vrt_nm; /* [sng] Name of dimension to employ for vertices */
     // User-specified grid properties
-    char *fl_grd; /* [sng] Name of grid file to create */
+    char *fl_grd; /* [sng] Name of SCRIP grid file to create */
+    char *fl_ugrid; /* [sng] Name of UGRID grid file to create */
     char *fl_skl; /* [sng] Name of skeleton data file to create */
     char *grd_ttl; /* [sng] Grid title */
     double lat_crv; /* [dgr] Latitudinal  curvilinearity */
@@ -1140,6 +1141,7 @@ extern "C" {
     int xtn_nbr; /* [nbr] Number of extensive variables */
     long idx_dbg; /* [idx] Index of gridcell for debugging */
     long tst; /* [enm] Generic key for testing (undocumented) */
+    nco_bool flg_area_out; /* [flg] Add area to output */
     nco_bool flg_cll_msr; /* [flg] Add cell_measures attribute */
     nco_bool flg_crv; /* [flg] Use curvilinear coordinates */
     nco_bool flg_grd; /* [flg] Create SCRIP-format grid file */
@@ -1148,6 +1150,7 @@ extern "C" {
     nco_bool flg_map; /* [flg] User-specified mapping weights */
     nco_bool flg_nfr; /* [flg] Infer SCRIP-format grid file */
     nco_bool flg_rnr; /* [flg] Renormalize destination values by valid area */
+    nco_bool flg_stg; /* [flg] Write staggered grid with FV output */
     nco_bool flg_usr_rqs; /* [flg] User requested regridding */
   } rgr_sct; /* end Regrid structure */
 
@@ -1286,10 +1289,14 @@ extern "C" {
   typedef struct{ 
     nco_obj_typ nco_typ;              /* [enm] netCDF4 object type: group or variable */
     char *nm_fll;                     /* [sng] Fully qualified name (path) */
-    var_dmn_sct *var_dmn;             /* [sct] (For variables only) Dimensions for variable object */
-    nco_bool is_crd_var;              /* [flg] (For variables only) Is a coordinate variable? (unique dimension exists in scope) */
-    nco_bool is_rec_var;              /* [flg] (For variables only) Is a record variable? (is_crd_var must be True) */
-    nc_type var_typ;                  /* [enm] (For variables only) NetCDF type  */  
+    var_dmn_sct *var_dmn;             /* [sct] Dimensions for variable object */
+    nco_bool is_crd_lk_var;           /* [flg] Is a coordinate-like variable (same as var_sct is_crd_var: crd, 2D, bounds...) */
+    nco_bool is_rec_lk_var;           /* [flg] Is a record variable of any dimension (same as var_sct is_rec_var) */
+    nco_bool is_1D_crd;               /* [flg] Is a 1D coordinate variable? (unique dimension exists in scope) */
+    nco_bool is_1D_rec_crd;           /* [flg] Is a 1D record coordinate (e.g., time)? */
+    nco_bool is_crd_var;              /* [flg] Is a coordinate variable? (OLD incompatible definition meant is_1D_crd, new definition identical with is_crd_var in var_sct, i.e., coordinate-like variables, 2D, bounds...) */
+    nco_bool is_rec_var;              /* [flg] Is a record variable? (OLD incorrect definition meant is_1D_rec_crd, new definition identical with is_rec_var in var_sct, i.e., any variable with a record dimension) */
+    nc_type var_typ;                  /* [enm] netCDF type */
     size_t nm_fll_lng;                /* [sng] Length of full name */
     char *grp_nm_fll;                 /* [sng] Full group name (for groups, same as nm_fll) */
     char *grp_nm;                     /* [sng] Group name (for groups, same as nm) */
diff --git a/src/nco/nco_att_utl.c b/src/nco/nco_att_utl.c
index 0c0c16a..cb15772 100644
--- a/src/nco/nco_att_utl.c
+++ b/src/nco/nco_att_utl.c
@@ -1916,15 +1916,18 @@ nco_vrs_att_cat /* [fnc] Add NCO version global attribute */
   /* Purpose: Write NCO version information to global metadata */
   aed_sct vrs_sng_aed;
   char att_nm[]="NCO"; /* [sng] Name of attribute in which to store NCO version */
-  char vrs_git[]=TKN2SNG(NCO_VERSION); /* [sng] Version according to Git */
-  char *vrs_cvs; /* [sng] Version according to RCS/CVS-like release tag */
+  char vrs_cpp[]=TKN2SNG(NCO_VERSION); /* [sng] Version according to Git */
   char *vrs_sng; /* [sng] NCO version */
   ptr_unn att_val;
   
-  vrs_cvs=cvs_vrs_prs();
-  
-  vrs_sng=vrs_cvs;
-  vrs_sng=vrs_git;
+  /* 20170417: vrs_cpp is typically something like "4.6.6-alpha07" (quotes included) 
+     The quotation marks annyoy me yet are necessary to protect the string in nco.h 
+     Here we remove the quotation marks by pointing past the first and putting NUL in the last */
+  vrs_sng=vrs_cpp;
+  if(vrs_cpp[0L] == '"'){
+    vrs_cpp[strlen(vrs_cpp)-1L]='\0';
+    vrs_sng=vrs_cpp+1L;
+  } /* endif */
 
   /* Insert thread number into value */
   att_val.cp=vrs_sng;
@@ -1939,7 +1942,6 @@ nco_vrs_att_cat /* [fnc] Add NCO version global attribute */
   vrs_sng_aed.mode=aed_overwrite;
   /* Write NCO version attribute to disk */
   (void)nco_aed_prc(out_id,NC_GLOBAL,vrs_sng_aed);
-  // vrs_sng=(char *)nco_free(vrs_sng);
 
 } /* end nco_vrs_att_cat() */
 
diff --git a/src/nco/nco_cnv_csm.c b/src/nco/nco_cnv_csm.c
index b9e3929..9a22af5 100644
--- a/src/nco/nco_cnv_csm.c
+++ b/src/nco/nco_cnv_csm.c
@@ -51,7 +51,7 @@ nco_cnv_ccm_ccsm_cf_inq /* O [fnc] Check if file obeys CCM/CCSM/CF conventions *
     if(strstr(att_val,"CF-1.")) CNV_CCM_CCSM_CF=True; /* NB: Not fully implemented TODO nco145 */
     /* As of 20060514, CLM 3.0 uses CF1.0 not CF-1.0 (CAM gets it right) */
     if(strstr(att_val,"CF1.")) CNV_CCM_CCSM_CF=True; /* NB: Not fully implemented TODO nco145 */
-    if(CNV_CCM_CCSM_CF && nco_dbg_lvl_get() >= nco_dbg_std){
+    if(CNV_CCM_CCSM_CF && nco_dbg_lvl_get() >= nco_dbg_fl){
       (void)fprintf(stderr,"%s: CONVENTION File \"%s\" attribute is \"%s\"\n",nco_prg_nm_get(),cnv_sng,att_val);
       if(cnv_sng == cnv_sng_LC) (void)fprintf(stderr,"%s: WARNING: This file uses a non-standard attribute (\"%s\") to indicate the netCDF convention. The correct attribute is \"%s\".\n",nco_prg_nm_get(),cnv_sng_LC,cnv_sng_UC);
       /* Only warn in arithmetic operators where conventions change behavior */
diff --git a/src/nco/nco_ctl.c b/src/nco/nco_ctl.c
index 6a8eca5..8857715 100644
--- a/src/nco/nco_ctl.c
+++ b/src/nco/nco_ctl.c
@@ -844,7 +844,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 "Promotion\n";
+  return "Step-Half-Brother-in-Law\n";
 } /* end nco_nmn_get() */
 
 char * /* O [sng] nm_in stripped of any path (i.e., program name stub) */ 
diff --git a/src/nco/nco_fl_utl.c b/src/nco/nco_fl_utl.c
index 8e8b386..1bd5255 100644
--- a/src/nco/nco_fl_utl.c
+++ b/src/nco/nco_fl_utl.c
@@ -686,7 +686,7 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
   if(!DAP_URL) rcd_stt=stat(fl_nm_lcl,&stat_sct);
   if(rcd_stt == -1 && (nco_dbg_lvl_get() >= nco_dbg_fl)) (void)fprintf(stderr,"\n%s: INFO stat() #1 failed: %s does not exist\n",nco_prg_nm_get(),fl_nm_lcl);
 
-  /* If not, check if file exists on local system under same path interpreted relative to current working directory */
+  /* If not, does file exist on local system under same path interpreted relative to current working directory? */
   if(rcd_stt == -1){
     if(fl_nm_lcl[0] == '/'){
       rcd_stt=stat(fl_nm_lcl+1UL,&stat_sct);
@@ -694,8 +694,8 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
     } /* end if */
     if(rcd_stt == 0){
       /* NB: Adding one to filename pointer is like deleting initial slash on filename
-      Then free(fl_nm_lcl) would miss this initial byte (memory is lost)
-      Hence must copy new name into its own memory space */
+	 Then free(fl_nm_lcl) would miss this initial byte (memory is lost)
+	 Hence must copy new name into its own memory space */
       fl_nm_lcl_tmp=(char *)strdup(fl_nm_lcl+1UL);
       fl_nm_lcl=(char *)nco_free(fl_nm_lcl);
       fl_nm_lcl=fl_nm_lcl_tmp;
@@ -782,7 +782,7 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
         fl_nm_rmt=fl_nm;
 
         /* URL specifier in filename unambiguously signals to use FTP */
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           if(FTP_URL){
             /* fxm: use autoconf HAVE_XXX rather than WIN32 token TODO nco292 */
 #ifdef WIN32
@@ -911,7 +911,7 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
 	   Hence actual transfer via SFTP uses scp syntax (for single files)
 	   Multiple file transfer via SFTP can use FTP-like scripts, requires more work
 	   NCO SFTP file specification must have colon separating hostname from filename */
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           if(SFTP_URL){
             /* Remote filename begins after URL but includes hostname */
             fl_nm_rmt+=url_sng_lng;
@@ -926,7 +926,7 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
         } /* end if rmt_cmd */
 
         /* Attempt wget on files that contain http:// prefix and are not accessible via DAP */
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           if(HTTP_URL){
             rmt_cmd=&http;
             (void)fprintf(stderr,"%s: INFO Will now attempt wget on the full filepath. wget will fail if the file is \"hidden\" behind a DAP server. Unfortunately, failed wget attempts creates rather long pathnames in the current directory. fxm TODO nco970, nco971. On the other hand, wget should succeed if the file is stored in any publicly-accessible web location.\n",nco_prg_nm_get());
@@ -937,7 +937,7 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
 	   Determining whether to try scp instead of rcp is difficult
 	   Ideally, NCO would test remote machine for rcp/scp priveleges with system command like, e.g., "ssh echo ok"
 	   To start we use scp which has its own fall-through to rcp */
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           if((cln_ptr=strchr(fl_nm_rmt,':'))){
             if(((cln_ptr-4 >= fl_nm_rmt) && *(cln_ptr-4) == '.') ||
               ((cln_ptr-3 >= fl_nm_rmt) && *(cln_ptr-3) == '.')){
@@ -948,7 +948,7 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
 
 #if 0
         /* NB: MSS commands deprecated 20110419 */
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           /* Does msrcp command exist on local system? */
           rcd_stt=stat("/usr/local/bin/msrcp",&stat_sct); /* SCD Dataproc, Ouray */
           if(rcd_stt != 0) rcd_stt=stat("/usr/bin/msrcp",&stat_sct); /* ACD Linux */
@@ -957,20 +957,20 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
           if(rcd_stt == 0) rmt_cmd=&msrcp;
         } /* end if */
 
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           /* Does msread command exist on local system? */
           rcd_stt=stat("/usr/local/bin/msread",&stat_sct);
           if(rcd_stt == 0) rmt_cmd=&msread;
         } /* end if */
 
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           /* Does nrnet command exist on local system? */
           rcd_stt=stat("/usr/local/bin/nrnet",&stat_sct);
           if(rcd_stt == 0) rmt_cmd=&nrnet;
         } /* end if */
 
-        /* Before we look for file on remote system, make sure
-        filename has correct syntax to exist on remote system */
+        /* Before we look for file on remote system, be sure
+	   filename has correct syntax to exist on remote system */
         if(rmt_cmd == &msread || rmt_cmd == &nrnet || rmt_cmd == &msrcp){
           if (fl_nm_rmt[0] != '/' || fl_nm_rmt[1] < 'A' || fl_nm_rmt[1] > 'Z'){
             (void)fprintf(stderr,"%s: ERROR %s is not on local filesystem and is not a syntactically valid filename on remote file system\n",nco_prg_nm_get(),fl_nm_rmt);
@@ -980,24 +980,40 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
 #endif /* endif False */
 
         /* NB: HPSS commands replaced MSS commands in NCO 4.0.8 in 201104 */
-        if(rmt_cmd == NULL){
+        if(!rmt_cmd){
           /* Does hsi command exist on local system? */
-          rcd_stt=stat("/usr/local/bin/hsi",&stat_sct); /* CISL Bluefire default */
+	  rcd_stt=system("which hsi"); /* Generic location on user's PATH */
+          if(rcd_stt != 0) rcd_stt=stat("/usr/local/bin/hsi",&stat_sct); /* CISL Bluefire default */
           if(rcd_stt != 0) rcd_stt=stat("/opt/hpss/bin/hsi",&stat_sct); /* CISL alternate */
-          if(rcd_stt != 0) rcd_stt=stat("/ncar/opt/hpss/hsi",&stat_sct); /* Yellowstone default added to NCO 4.3.2 in 201306 */
+          if(rcd_stt != 0) rcd_stt=stat("/usr/common/mss/bin/hsi",&stat_sct); /* Cori/Edison */
+	  if(rcd_stt != 0) rcd_stt=stat("/ncar/opt/hpss/hsi",&stat_sct); /* Yellowstone default added to NCO 4.3.2 in 201306 */
           if(rcd_stt == 0) rmt_cmd=&hsiget;
         } /* end if */
 
-        if(rmt_cmd == NULL){
-          (void)fprintf(stderr,"%s: ERROR file %s neither exists locally nor matches remote filename patterns\n",nco_prg_nm_get(),fl_nm_rmt);
+        if(!rmt_cmd){
+          (void)fprintf(stderr,"%s: ERROR file %s not found. It does not exist on the local filesystem, nor does it match remote filename patterns (e.g., http://foo or foo.bar.edu:file), nor did NCO detect a High Performance Storage System (HPSS) to retrieve it from remote storage.\n",nco_prg_nm_get(),fl_nm_rmt);
+	  (void)fprintf(stderr,"%s: HINT file-not-found errors usually arise from filename typos, incorrect paths, missing files, or capricious gods. Please verify spelling and location of requested file.\n",nco_prg_nm_get());
           nco_exit(EXIT_FAILURE);
         } /* end if */
 
         if(fl_pth_lcl == NULL){
           /* Derive path for storing local file from remote filename */
-          (void)fprintf(stderr,"%s: INFO deriving local filepath from remote filename\n",nco_prg_nm_get());
-          fl_nm_stub=strrchr(fl_nm_lcl,'/')+1UL;
-          if(HTTP_URL){
+          (void)fprintf(stderr,"%s: INFO Unable to find file %s on local system. Found hsi command indicating presence of High Performance Storage System (HPSS). Will assume file is stored on HPSS. Received no local path information and so will try to derive suitable local filepath from given filename...\n",nco_prg_nm_get(),fl_nm_lcl);
+	  /* Unlike old MSS, HPSS paths need not be absolute, i.e., begin with slash
+	     HPSS is smart, HPSS:${HOME}/foo and foo are same file
+	     Search backwards from end for last path separator */
+	  fl_nm_stub=strrchr(fl_nm_lcl,'/');
+	  if(fl_nm_stub){
+	    /* Successful search points to slash, add one to point to stub */
+	    fl_nm_stub++;
+	  }else{
+	    fl_nm_stub=fl_nm_lcl;
+	  } /* !fl_nm_stb */
+	  /* HPSS has no restrictions on filename syntax, following is deprecated:
+	  (void)fprintf(stderr,"%s: ERROR %s unable to find path component of requested file %s. HPSS filenames must have a multi-component path structure (i.e., contain slashes).\n",nco_prg_nm_get(),fnc_nm,fl_nm_lcl);
+	  (void)fprintf(stderr,"%s: HINT This error often occurs because of a simple filename typo or missing file. NCO calls exit() with a simpler error message when it cannot find a specified file on systems without HPSS clients. NCO just performed and failed a more elaborate search for the file because this system appears to have hsi (see http://nco.sf.net/nco.html#hsi). Please verify spelling/location of requested file.\n",nco_prg_nm_get());
+	  nco_exit(EXIT_FAILURE); */
+	  if(HTTP_URL){
             /* Strip leading slash from fl_nm_lcl for HTTP files so, e.g., 
 	       http://dust.ess.uci.edu/nco/in.nc produces local path "nco" not "/nco" */
             fl_nm_lcl_tmp=(char *)strdup(fl_nm_lcl+1UL);
@@ -1005,7 +1021,7 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
             fl_nm_lcl=fl_nm_lcl_tmp;
           } /* !HTTP_URL */
           /* Construct local storage filepath name */
-          fl_pth_lcl_lng=strlen(fl_nm_lcl)-strlen(fl_nm_stub)-1UL;
+          if(fl_nm_stub != fl_nm_lcl) fl_pth_lcl_lng=strlen(fl_nm_lcl)-strlen(fl_nm_stub)-1UL; else fl_pth_lcl_lng=0L;
           /* Allocate enough room for terminating NUL */
           fl_pth_lcl_tmp=(char *)nco_malloc((fl_pth_lcl_lng+1UL)*sizeof(char));
           (void)strncpy(fl_pth_lcl_tmp,fl_nm_lcl,fl_pth_lcl_lng);
@@ -1019,8 +1035,8 @@ nco_fl_mk_lcl /* [fnc] Retrieve input file and return local filename */
 
         /* Does local filepath exist already on local system? */
         rcd_stt=stat(fl_pth_lcl_tmp,&stat_sct);
-        /* If not, then create local filepath */
-        if(rcd_stt != 0){
+        /* If not, then create local filepath if one is needed */
+        if(rcd_stt != 0 && fl_pth_lcl_lng > 0L){
           /* Allocate enough room for joining space ' ' and terminating NUL */
           cmd_sys=(char *)nco_malloc((strlen(cmd_mkdir)+fl_pth_lcl_lng+2UL)*sizeof(char));
           (void)strcpy(cmd_sys,cmd_mkdir);
diff --git a/src/nco/nco_grp_utl.c b/src/nco/nco_grp_utl.c
index c174f31..07823d5 100644
--- a/src/nco/nco_grp_utl.c
+++ b/src/nco/nco_grp_utl.c
@@ -1039,6 +1039,66 @@ nco_xtr_crd_add                       /* [fnc] Add all coordinates to extraction
 } /* end nco_xtr_crd_add() */
 
 void
+nco_xtr_ND_lst /* [fnc] Print extraction list of N>=D variables and exit */
+(trv_tbl_sct * const trv_tbl) /* I [sct] GTT (Group Traversal Table) */
+{
+  /* Purpose: Print extraction list of N>=D variables and exit
+     Used by ncks to supply arguments to splitter
+     Hence we restrict returned list to non-coordinate record variables
+     Usage:
+     ncks --lst_rnk_ge2 ~/nco/data/in.nc
+     ncks --lst_rnk_ge2 ~/data/ne30/raw/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc
+     ncks --lst_rnk_ge2 ~/data/ne30/rgr/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc */
+
+  const char fnc_nm[]="nco_xtr_ND_lst()"; /* [sng] Function name */
+
+  int xtr_nbr_crr=0; /* [nbr] Number of N>=D variables found so far */
+  int rnk_xtr=2; /* [nbr] Minimum rank to extract */
+
+  /* 20170414: csz add new definitions is_crd_lk_var and is_rec_lk_var, avoid PVN definitions for sanity */
+  for(unsigned idx_var=0;idx_var<trv_tbl->nbr;idx_var++){
+    trv_sct var_trv=trv_tbl->lst[idx_var];
+    int nc_id; /* [id] File ID */
+    int var_id; /* [id] Variable ID */
+    int grp_id; /* [id] Group ID */
+    nc_id=trv_tbl->in_id_arr[0];
+    if(var_trv.nco_typ == nco_obj_typ_var){
+      (void)nco_inq_grp_full_ncid(nc_id,var_trv.grp_nm_fll,&grp_id);
+      (void)nco_inq_varid(grp_id,var_trv.nm,&var_id);
+      trv_tbl->lst[idx_var].is_crd_lk_var=trv_tbl->lst[idx_var].is_crd_lk_var;
+      if(nco_is_spc_in_cf_att(grp_id,"bounds",var_id,NULL)) trv_tbl->lst[idx_var].is_crd_lk_var=True;
+      if(nco_is_spc_in_cf_att(grp_id,"cell_measures",var_id,NULL)) trv_tbl->lst[idx_var].is_crd_lk_var=True;
+      if(nco_is_spc_in_cf_att(grp_id,"climatology",var_id,NULL)) trv_tbl->lst[idx_var].is_crd_lk_var=True;
+      for(int dmn_idx=0;dmn_idx<var_trv.nbr_dmn;dmn_idx++){
+	if(var_trv.var_dmn[dmn_idx].is_rec_dmn) trv_tbl->lst[idx_var].is_rec_lk_var=True;
+      } /* !dmn_idx */
+    } /* !nco_typ */
+  } /* !idx_var */
+
+  /* If variable has N>=D dimensions, add it to list */
+  for(unsigned idx_var=0;idx_var<trv_tbl->nbr;idx_var++)
+    if(trv_tbl->lst[idx_var].nco_typ == nco_obj_typ_var)
+      if((trv_tbl->lst[idx_var].nbr_dmn >= rnk_xtr) && /* Rank at least 2 */
+	 (!trv_tbl->lst[idx_var].is_crd_lk_var) && /* Not a coordinate-like variable */
+	 (trv_tbl->lst[idx_var].is_rec_lk_var) && /* Is a record variable */
+	 (trv_tbl->lst[idx_var].var_typ != NC_CHAR) && /* Not an array of characters */
+	 True){
+	(void)fprintf(stdout,"%s%s",(xtr_nbr_crr > 0) ? "," : "",trv_tbl->lst[idx_var].nm);
+	xtr_nbr_crr++;
+      } /* !N>=D */
+
+  if(xtr_nbr_crr > 0){
+    (void)fprintf(stdout,"\n");
+    nco_exit(EXIT_SUCCESS);
+  }else{
+    (void)fprintf(stdout,"%s: ERROR %s reports no variables found with rank >= 2\n",nco_prg_nm_get(),fnc_nm);
+    nco_exit(EXIT_FAILURE);
+  } /* !xtr_nbr_crr */
+    
+  return;
+} /* end nco_xtr_ND_lst() */
+
+void
 nco_xtr_cf_add /* [fnc] Add to extraction list variables associated with CF convention */
 (const int nc_id, /* I [ID] netCDF file ID */
  const char * const cf_nm, /* I [sng] CF convention ("ancillary_variables", "bounds", "climatology", "coordinates", or "grid_mapping") */
@@ -2219,6 +2279,7 @@ nco_grp_itr                            /* [fnc] Populate traversal table by exam
   trv_tbl->lst[idx].ppc=NC_MAX_INT;               /* [nbr] Precision-preserving compression, i.e., number of total or decimal significant digits */
   trv_tbl->lst[idx].flg_nsd=True;                 /* [flg] PPC is NSD */
 
+  trv_tbl->lst[idx].is_crd_lk_var=nco_obj_typ_err; /* [flg] Is a coordinate-like variable (same as var_sct is_crd_var: crd, 2D, bounds...) */
   trv_tbl->lst[idx].is_crd_var=nco_obj_typ_err;   /* [flg] (For variables only) Is this a coordinate variable? (unique dimension exists in-scope) */
   trv_tbl->lst[idx].is_rec_var=nco_obj_typ_err;   /* [flg] (For variables only) Is a record variable? (is_crd_var must be True) */
   trv_tbl->lst[idx].var_typ=(nc_type)nco_obj_typ_err;/* [enm] (For variables only) NetCDF type  */  
@@ -2323,6 +2384,7 @@ nco_grp_itr                            /* [fnc] Populate traversal table by exam
     trv_tbl->lst[idx].ppc=NC_MAX_INT; /* [nbr] Precision-preserving compression, i.e., number of total or decimal significant digits */
     trv_tbl->lst[idx].flg_nsd=True; /* [flg] PPC is NSD */
     
+    trv_tbl->lst[idx].is_crd_lk_var=False;             
     trv_tbl->lst[idx].is_crd_var=False;             
     trv_tbl->lst[idx].is_rec_var=False; 
     trv_tbl->lst[idx].var_typ=var_typ; 
@@ -2507,7 +2569,8 @@ nco_bld_crd_rec_var_trv /* [fnc] Build dimension information for all variables *
           if(nco_crd_var_dmn_scp(&var_trv,&dmn_trv,trv_tbl)){
             /* Mark this variable as coordinate variable. NB: True coordinate variables are 1D */
             if(var_trv.nbr_dmn == 1) trv_tbl->lst[idx_var].is_crd_var=True; else trv_tbl->lst[idx_var].is_crd_var=False;
-            /* If the group dimension is a record dimension then the variable is a record variable */
+            /* 20170411: fxm this algorithm detects is_rec_crd not is_rec_var
+	       If group dimension is a record dimension then coordinate is a record coordinate */
             trv_tbl->lst[idx_var].is_rec_var=dmn_trv.is_rec_dmn;
             if(nco_dbg_lvl_get() == nco_dbg_old){
               (void)fprintf(stdout,"%s: INFO %s reports %s is ",nco_prg_nm_get(),fnc_nm,var_trv.nm_fll);
@@ -2589,7 +2652,7 @@ nco_bld_crd_var_trv /* [fnc] Build GTT "crd_sct" coordinate variable structure *
       if(var_trv.nco_typ == nco_obj_typ_var){
 
         /* Is there a variable with this dimension name anywhere? (relative name)  */
-        if(strcmp(dmn_trv.nm,var_trv.nm) == 0 ){
+        if(!strcmp(dmn_trv.nm,var_trv.nm)){
 
           /* Is variable in-scope of dimension ? */
           if(nco_crd_var_dmn_scp(&var_trv,&dmn_trv,trv_tbl)){
@@ -2615,7 +2678,7 @@ nco_bld_crd_var_trv /* [fnc] Build GTT "crd_sct" coordinate variable structure *
             /* Store relative name (same for dimension and variable) */
             trv_tbl->lst_dmn[idx_dmn].crd[crd_idx]->nm=strdup(var_trv.nm); 
 
-            /* Is a record dimension(variable) if the dimennsion is a record dimension */
+            /* Is a record dimension(variable) if the dimension is a record dimension */
             trv_tbl->lst_dmn[idx_dmn].crd[crd_idx]->is_rec_dmn=dmn_trv.is_rec_dmn;
 
             /* Size is size */
@@ -2703,7 +2766,8 @@ nco_prn_trv_tbl                      /* [fnc] Print GTT (Group Traversal Table)
       } /* endif */
       if(var_trv.is_rec_var) (void)fprintf(stdout," (record)");
 
-      /* If record variable must be coordinate variable */
+      /* 20170411: WRONG!!! Following line confuses generic record variables with record coordinates
+	 If record variable must be coordinate variable */
       if(var_trv.is_rec_var) assert(var_trv.is_crd_var);
       (void)fprintf(stdout," %d dimensions: ",var_trv.nbr_dmn); 
 
@@ -4051,7 +4115,8 @@ nco_var_fll_trv                       /* [fnc] Allocate variable structure and f
     var->srd[idx_dmn]=1L;
     var->sz*=dmn_cnt;
     
-    /* This definition of "is_rec_var" says if any of the dimensions is a record then the variable is marked as so */
+    /* This definition of "is_rec_var" says if any of the dimensions is a record then the variable is marked as so 
+       20170411: Yes, because that IS the correct definition! */
     if(dmn_trv->is_rec_dmn) var->is_rec_var=True; else var->sz_rec*=var->cnt[idx_dmn];
 
     /* Return a completed dmn_sct, use dimension ID and name from TRV object */
@@ -4132,9 +4197,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_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, "bounds", var->id, NULL)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id, "climatology", var->id, NULL)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id, "coordinates", var->id, NULL)) 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);
diff --git a/src/nco/nco_grp_utl.h b/src/nco/nco_grp_utl.h
index 3333178..d57b2a5 100644
--- a/src/nco/nco_grp_utl.h
+++ b/src/nco/nco_grp_utl.h
@@ -156,6 +156,10 @@ nco_xtr_crd_add                       /* [fnc] Add all coordinates to extraction
 (trv_tbl_sct * const trv_tbl);        /* I/O [sct] Traversal table */
 
 void
+nco_xtr_ND_lst /* [fnc] Print extraction list of N>=D variables and exit */
+(trv_tbl_sct * const trv_tbl); /* I [sct] GTT (Group Traversal Table) */
+
+void
 nco_xtr_cf_add                        /* [fnc] Add to extraction list variable associated with CF convention */
 (const int nc_id,                     /* I [ID] netCDF file ID */
  const char * const cf_nm,            /* I [sng] CF convention ("coordinates" or "bounds") */
diff --git a/src/nco/nco_mmr.c b/src/nco/nco_mmr.c
index 16f715e..e4d997b 100644
--- a/src/nco/nco_mmr.c
+++ b/src/nco/nco_mmr.c
@@ -199,7 +199,7 @@ nco_malloc_err_hnt_prn /* [fnc] Explain meaning and workarounds for malloc() fai
 (void)
 {
   /* Purpose: Explain meaning and workarounds for malloc() failures */
-  (void)fprintf(stdout,"%s: INFO NCO has reported a malloc() failure. malloc() failures usually indicate that your machine does not have enough free memory (RAM+swap) to perform the requested operation. As such, malloc() failures result from the physical limitations imposed by your hardware. Read http://nco.sf.net/nco.html#mmr for a description of NCO memory usage. The likiest case is that this problem is caused by inadequate RAM on your system, and is not an NCO bug. If so, there are tw [...]
+  (void)fprintf(stdout,"%s: INFO NCO has reported a malloc() failure. malloc() failures usually indicate that your machine has less free memory (RAM+swap) than the requested amount. As such, malloc() failures result from the physical limitations imposed by your hardware. Read http://nco.sf.net/nco.html#mmr for a description of NCO memory usage. The likiest case is that this problem is caused by inadequate RAM on your system, and is not an NCO bug. If so, there are two potential workaroun [...]
   if(nco_prg_id_get() == ncap) (void)fprintf(stdout,"Large tasks may uncover memory leaks in NCO. ncap2 scripts are completely dynamic and may be of arbitrary length and complexity. A script that contains many thousands of operations may uncover a slow memory leak even though each single operation consumes little additional memory. Memory leaks are usually identifiable by their memory usage signature. Leaks cause peak memory usage to increase monotonically with time regardless of script  [...]
 } /* nco_malloc_err_hnt_prn() */
 
diff --git a/src/nco/nco_msa.c b/src/nco/nco_msa.c
index 4b46bfe..9029af6 100644
--- a/src/nco/nco_msa.c
+++ b/src/nco/nco_msa.c
@@ -38,10 +38,70 @@ nco_msa_rcr_clc /* [fnc] Multi-slab algorithm (recursive routine, returns a sing
 
   /* Multiple hyperslabs */
   if(nbr_slb > 1){
+
+
+  /* True if wrapped dims or slabs DO NOT overlap or user-specified order */
+  if(lmt_lst[dpt_crr]->WRP || lmt_lst[dpt_crr]->MSA_USR_RDR)
+  {
+    long var_sz=1L;
+    long lcnt;
+
+    char *cp_wrp;
+    char *cp_stp;
+    char *slb;
+
+    ptrdiff_t slb_sz;
+    ptrdiff_t cp_inc;
+    ptrdiff_t cp_max;
+    ptrdiff_t cp_fst;
+
+
+    for(idx=0;idx<dpt_crr_max;idx++)
+       var_sz*=(idx<dpt_crr ? lmt[idx]->cnt : lmt_lst[idx]->dmn_cnt);
+
+
+    /* Used nco_callloc() for unknown reasons until 20140930 */
+    /*    vp=(void *)nco_clloc((size_t)var_sz,nco_typ_lng(vara->type));*/
+    vp=(void *)nco_malloc(var_sz*nco_typ_lng(vara->type));
+
+    lcnt=nco_typ_lng(vara->type);
+    for(idx=dpt_crr+1;idx<dpt_crr_max;idx++) 
+       lcnt*=lmt_lst[idx]->dmn_cnt;
+
+    cp_inc=(ptrdiff_t)(lcnt*lmt_lst[dpt_crr]->dmn_cnt);
+    cp_max=(ptrdiff_t)(var_sz*nco_typ_lng(vara->type));
+
+    cp_fst=0L;
+
+
+
+    for(idx=0;idx<nbr_slb;idx++)
+    {
+      lmt[dpt_crr]=lmt_lst[dpt_crr]->lmt_dmn[idx];
+      /* NB: nco_msa_rcr_clc() with same nc_id contains OpenMP critical region */
+      cp_wrp=(char *)nco_msa_rcr_clc(dpt_crr+1,dpt_crr_max,lmt,lmt_lst,vara);
+
+      cp_stp=(char *)vp+cp_fst;
+      slb=cp_wrp;
+      slb_sz=(ptrdiff_t)(lcnt*(lmt_lst[dpt_crr]->lmt_dmn[idx]->cnt));
+      while(cp_stp-(char *)vp < cp_max)
+      {
+	(void)memcpy(cp_stp,slb,(size_t)slb_sz);
+	slb+=slb_sz;
+	cp_stp+=cp_inc;
+      } 
+      cp_fst+=slb_sz;      
+      cp_wrp=(char*)nco_free(cp_wrp); 
+    } 
+    vara->sz=var_sz; 
+  }
+  /* deal with possibly overlapping slabs */
+  else
+  { 
+  
     int slb_idx;
     long var_sz=1L;
     long lcnt;
-    long *cp_sz;
     long *indices;
 
     ptrdiff_t slb_sz;
@@ -55,15 +115,14 @@ nco_msa_rcr_clc /* [fnc] Multi-slab algorithm (recursive routine, returns a sing
     char *slb;
     lmt_sct lmt_ret;
 
-    cp_sz=(long *)nco_malloc(nbr_slb*sizeof(long));
     indices=(long *)nco_malloc(nbr_slb*sizeof(long));
     cp_wrp=(char **)nco_malloc(nbr_slb*sizeof(void *));
 
-    for(idx=0;idx<nbr_slb;idx++){
+    for(idx=0;idx<nbr_slb;idx++)
+    {
       lmt[dpt_crr]=lmt_lst[dpt_crr]->lmt_dmn[idx];
       /* NB: nco_msa_rcr_clc() with same nc_id contains OpenMP critical region */
       cp_wrp[idx]=(char *)nco_msa_rcr_clc(dpt_crr+1,dpt_crr_max,lmt,lmt_lst,vara);
-      cp_sz[idx]=vara->sz;
     } /* end loop over idx */
 
     for(idx=0;idx<dpt_crr_max;idx++) var_sz*=(idx<dpt_crr ? lmt[idx]->cnt : lmt_lst[idx]->dmn_cnt);
@@ -82,46 +141,36 @@ nco_msa_rcr_clc /* [fnc] Multi-slab algorithm (recursive routine, returns a sing
 
     cp_fst=0L;
 
-    /* Deal first with wrapped dimensions
-       True if wrapped dims or slabs DO NOT overlap or user-specified order */
-    if(lmt_lst[dpt_crr]->WRP || lmt_lst[dpt_crr]->MSA_USR_RDR){
-
-      for(slb_idx=0;slb_idx<nbr_slb;slb_idx++){
-        cp_stp=(char *)vp+cp_fst;
-        slb=cp_wrp[slb_idx];
-        slb_sz=(ptrdiff_t)(lcnt*(lmt_lst[dpt_crr]->lmt_dmn[slb_idx]->cnt));
-        while(cp_stp-(char *)vp < cp_max){
-          (void)memcpy(cp_stp,slb,(size_t)slb_sz);
-          slb+=slb_sz;
-          cp_stp+=cp_inc;
-        } /* end while */
-        cp_fst+=slb_sz;      
-      } /* end loop over two slabs */
-    }else{ 
-      /* Multiple hyper-slabs */
-      while(nco_msa_clc_idx(True,lmt_lst[dpt_crr],&indices[0],&lmt_ret,&slb_idx)){
-        cp_stp=(char *)vp+cp_fst;
-        slb=cp_wrp[slb_idx]+(ptrdiff_t)(lmt_ret.srt*lcnt);
-        slb_stp=(ptrdiff_t)(lcnt*(lmt_lst[dpt_crr]->lmt_dmn[slb_idx]->cnt));
-        slb_sz=(ptrdiff_t)(lmt_ret.cnt*lcnt);
-
-        while(cp_stp-(char *)vp < cp_max){
-          (void)memcpy(cp_stp,slb,(size_t)slb_sz);
-          slb+=slb_stp;
-          cp_stp+=cp_inc;
-        } /* end while */
-        cp_fst+=slb_sz;
+    /* Multiple hyper-slabs */
+    while(nco_msa_clc_idx(True,lmt_lst[dpt_crr],&indices[0],&lmt_ret,&slb_idx))
+    {
+      cp_stp=(char *)vp+cp_fst;
+      slb=cp_wrp[slb_idx]+(ptrdiff_t)(lmt_ret.srt*lcnt);
+      slb_stp=(ptrdiff_t)(lcnt*(lmt_lst[dpt_crr]->lmt_dmn[slb_idx]->cnt));
+      slb_sz=(ptrdiff_t)(lmt_ret.cnt*lcnt);
+
+      while(cp_stp-(char *)vp < cp_max)
+      {
+	(void)memcpy(cp_stp,slb,(size_t)slb_sz);
+	slb+=slb_stp;
+	cp_stp+=cp_inc;
       } /* end while */
-    } /* end else */  
+      cp_fst+=slb_sz;
+    } /* end while */
+
+
+    for(idx=0;idx<nbr_slb;idx++) 
+       cp_wrp[idx]=(char *)nco_free(cp_wrp[idx]);
 
     indices=(long *)nco_free(indices);
-    cp_sz=(long *)nco_free(cp_sz);
-    for(idx=0;idx<nbr_slb;idx++) cp_wrp[idx]=(char *)nco_free(cp_wrp[idx]);
     cp_wrp=(char **)nco_free(cp_wrp);
 
     vara->sz=var_sz;
-    return vp;
+
   } /* endif multiple hyperslabs */
+   
+  return vp;
+  } 
 
 read_lbl:
   { 
@@ -229,6 +278,7 @@ read_lbl:
     vara->sz=var_sz;
     return vp;
   } /* end read_lbl */
+   
 
 } /* end nco_msa_rcr_clc() */
 
diff --git a/src/nco/nco_omp.c b/src/nco/nco_omp.c
index 122f6ad..6e332fa 100644
--- a/src/nco/nco_omp.c
+++ b/src/nco/nco_omp.c
@@ -58,7 +58,7 @@ nco_openmp_ini /* [fnc] Initialize OpenMP threading environment */
   int thr_nbr_rqs=int_CEWI; /* [nbr] Number of threads to request */
 
 #ifndef _OPENMP
-  if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(fp_stderr,"%s: INFO Build compiler lacked (or user turned-off) OpenMP support. Code will execute with single thread in Uni-Processor (UP) mode.\n",nco_prg_nm_get());
+  if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(fp_stderr,"%s: INFO Build compiler lacked (or user turned-off) OpenMP support. Code will execute with single thread in Uni-Processor (UP) mode.\n",nco_prg_nm_get());
   return (int)1;
 #endif /* !_OPENMP */
 
@@ -171,13 +171,13 @@ nco_openmp_ini /* [fnc] Initialize OpenMP threading environment */
     
     /* Automatic algorithm tries to play nice with others */
     (void)omp_set_dynamic(dyn_thr); /* [flg] Allow system to dynamically set number of threads */
-    if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(fp_stderr,"%s: INFO omp_set_dynamic() used to %s OS to dynamically set threads\n",nco_prg_nm_get(),(dyn_thr ? "ALLOW" : "DISALLOW"));
+    if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(fp_stderr,"%s: INFO omp_set_dynamic() used to %s OS to dynamically set threads\n",nco_prg_nm_get(),(dyn_thr ? "ALLOW" : "DISALLOW"));
     dyn_thr=omp_get_dynamic(); /* [flg] Allow system to dynamically set number of threads */
-    if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(fp_stderr,"%s: INFO omp_get_dynamic() reports system will%s utilize dynamic threading\n",nco_prg_nm_get(),(dyn_thr ? "" : " NOT"));
+    if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(fp_stderr,"%s: INFO omp_get_dynamic() reports system will%s utilize dynamic threading\n",nco_prg_nm_get(),(dyn_thr ? "" : " NOT"));
 
     /* Apply program/system limitations */
     if(thr_nbr_max > thr_nbr_max_fsh){
-      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(fp_stderr,"%s: INFO Reducing default thread number from %d to %d, an operator-dependent \"play-nice\" number set in nco_openmp_ini()\n",nco_prg_nm_get(),thr_nbr_max,thr_nbr_max_fsh);
+      if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(fp_stderr,"%s: INFO Reducing default thread number from %d to %d, an operator-dependent \"play-nice\" number set in nco_openmp_ini()\n",nco_prg_nm_get(),thr_nbr_max,thr_nbr_max_fsh);
       thr_nbr_rqs=thr_nbr_max_fsh; /* [nbr] Number of threads to request */
     } /* endif */      
   } /* !USR_SPC_THR_RQS */
@@ -195,7 +195,7 @@ nco_openmp_ini /* [fnc] Initialize OpenMP threading environment */
     nco_exit(EXIT_FAILURE);
   }else{
     (void)omp_set_num_threads(thr_nbr_rqs); 
-    if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(fp_stderr,"%s: INFO omp_set_num_threads() used to set execution environment to spawn teams of %d thread(s)\n",nco_prg_nm_get(),thr_nbr_rqs);
+    if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(fp_stderr,"%s: INFO omp_set_num_threads() used to set execution environment to spawn teams of %d thread(s)\n",nco_prg_nm_get(),thr_nbr_rqs);
   } /* end error */
 
   thr_nbr_act=omp_get_max_threads();
@@ -207,7 +207,7 @@ nco_openmp_ini /* [fnc] Initialize OpenMP threading environment */
 # pragma omp single nowait
       { /* begin OpenMP single */
 	thr_nbr_act=omp_get_num_threads(); /* [nbr] Number of threads NCO uses */
-	if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(fp_stderr,"%s: INFO Small parallel test region spawned team of %d thread(s)\n",nco_prg_nm_get(),thr_nbr_act);
+	if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(fp_stderr,"%s: INFO Small parallel test region spawned team of %d thread(s)\n",nco_prg_nm_get(),thr_nbr_act);
       } /* end OpenMP single */
     } /* end OpenMP parallel */
   } /* end dbg */
@@ -216,7 +216,7 @@ nco_openmp_ini /* [fnc] Initialize OpenMP threading environment */
   /* Issue any warnings about OpenMP credibility during debugging phase */
   if(True)
      if((nco_prg_id_get() == ncwa || nco_prg_id_get() == ncra) && thr_nbr_act > 1)
-      if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(fp_stderr,"%s: WARNING OpenMP threading active with %d threads but not guaranteed to work on this operator. If strange behavior (e.g., NaN results) ensues, manually turn-off multi-threading by specifying \"-t 1\" option.\n",nco_prg_nm_get(),thr_nbr_act);
+      if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(fp_stderr,"%s: WARNING OpenMP threading active with %d threads but not guaranteed to work on this operator. If strange behavior (e.g., NaN results) ensues, manually turn-off multi-threading by specifying \"-t 1\" option.\n",nco_prg_nm_get(),thr_nbr_act);
 
   return thr_nbr_act; /* O [nbr] Number of threads NCO uses */
 } /* end nco_openmp_ini() */
diff --git a/src/nco/nco_ppc.c b/src/nco/nco_ppc.c
index e008214..2860e90 100644
--- a/src/nco/nco_ppc.c
+++ b/src/nco/nco_ppc.c
@@ -239,7 +239,9 @@ 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_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)){
+	if(!nco_is_spc_in_cf_att(grp_id, "bounds", var_id, NULL) && !nco_is_spc_in_cf_att(grp_id, "climatology", var_id,
+                                                                                      NULL) && !nco_is_spc_in_cf_att(
+    grp_id, "coordinates", var_id, NULL)){
 	  trv_tbl->lst[idx_tbl].ppc=ppc_val;
 	  trv_tbl->lst[idx_tbl].flg_nsd=flg_nsd;
 	} /* endif */
diff --git a/src/nco/nco_prn.c b/src/nco/nco_prn.c
index f8c285e..719b15e 100644
--- a/src/nco/nco_prn.c
+++ b/src/nco/nco_prn.c
@@ -1442,10 +1442,6 @@ nco_prn_var_dfn                     /* [fnc] Print variable metadata */
     if(prn_flg->trd) (void)fprintf(stdout,"%*s%s size (RAM) = %ld*sizeof(%s) = %ld*%lu = %lu bytes\n",prn_ndn,spc_sng,var_trv->nm,var_sz,nco_typ_sng(var_typ),var_sz,(unsigned long)nco_typ_lng(var_typ),(unsigned long)(var_sz*nco_typ_lng(var_typ)));
     /* 20131122: Implement ugly NcML requirement that scalars have shape="" attribute */
     if(prn_flg->xml) (void)sprintf(dmn_sng," shape=\"\"");
-
-    /* if scalar var then print NOTHING  
-    if(prn_flg->jsn) (void)sprintf(dmn_sng,"%*s\"dims\": [],", prn_ndn+prn_flg->sxn_fst,spc_sng); 
-    */
   }else{
     for(dmn_idx=0;dmn_idx<nbr_dim;dmn_idx++){
       if(prn_flg->xml){
@@ -1453,8 +1449,8 @@ nco_prn_var_dfn                     /* [fnc] Print variable metadata */
       }else if(prn_flg->jsn){
         /* indent content */ 
         nm_jsn=nm2sng_jsn(var_trv->var_dmn[dmn_idx].dmn_nm);
-        if(dmn_idx==0) (void)sprintf(dmn_sng,"%*s\"dims\": [", prn_ndn+prn_flg->sxn_fst,spc_sng); 
-	(void)sprintf(sng_foo,"\"%s\"%s",nm_jsn,(dmn_idx < nbr_dim-1) ? "," : "],"); 
+        if(dmn_idx==0) (void)sprintf(dmn_sng,"%*s\"shape\": [", prn_ndn+prn_flg->sxn_fst,spc_sng); 
+	(void)sprintf(sng_foo,"\"%s\"%s",nm_jsn,(dmn_idx < nbr_dim-1) ? ", " : "],"); 
 	nm_jsn=(char *)nco_free(nm_jsn);
       }else{
 	nm_cdl=nm2sng_cdl(var_trv->var_dmn[dmn_idx].dmn_nm);
@@ -1598,10 +1594,10 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
   int rcd_prn;
   int prn_ndn=0; /* [nbr] Indentation for printing */
   int val_sz_byt=int_CEWI; /* [nbr] Type size */
-
   lmt_msa_sct **lmt_msa=NULL_CEWI; /* [sct] MSA Limits for only for variable dimensions  */          
   lmt_sct **lmt=NULL_CEWI; /* [sct] Auxiliary Limit used in MSA */
 
+
   long *dmn_sbs_dsk=NULL_CEWI; /* [nbr] Indices of hyperslab relative to original on disk */
   long *dmn_sbs_ram=NULL_CEWI; /* [nbr] Indices in hyperslab */
   long *mod_map_cnt=NULL_CEWI; /* [nbr] MSA modulo array */
@@ -1613,7 +1609,7 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
   long var_dsk; /* [nbr] Variable index relative to disk */
   long var_szm1;
 
-
+  nco_cln_typ lmt_cln = cln_std;   /* calendar type - for time at units */
   const nco_bool CDL=prn_flg->cdl; /* [flg] CDL output */
   const nco_bool XML=prn_flg->xml; /* [flg] XML output */
   const nco_bool TRD=prn_flg->trd; /* [flg] Traditional output */
@@ -1683,64 +1679,72 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
   var->has_mss_val=nco_mss_val_get(var->nc_id,var);
 
 
+  /* only TRD and CDL need units at this stage and have this flag set */
+  if(prn_flg->PRN_DMN_UNITS) {
+    int cf_var_id;
+    char *cln_sng = (char *) NULL;
+    var_sct *var_tmp=NULL_CEWI;
+    var_sct *var_swp=NULL_CEWI;
+
+    if (!nco_is_spc_in_cf_att(grp_id, "bounds", var->id, &cf_var_id) &&
+        !nco_is_spc_in_cf_att(grp_id, "climatology", var->id, &cf_var_id))
+      cf_var_id = var->id;
 
-  unit_sng_var = nco_lmt_get_udu_att(grp_id,var->id,"units");
-  if( unit_sng_var && strlen(unit_sng_var)) {
-    flg_malloc_unit_var=True;
-    unit_cln_var=nco_cln_chk_tm(unit_sng_var);
-  }
 
-  if(unit_cln_var && ( prn_flg->PRN_CLN_LGB || nco_dbg_lvl_get()== nco_dbg_std)) {
+    unit_sng_var = nco_lmt_get_udu_att(grp_id, cf_var_id, "units");
+    if (unit_sng_var && strlen(unit_sng_var)) {
 
-    var_sct *var_tmp=NULL_CEWI;
-    nco_cln_typ lmt_cln = cln_std;
-    char *cln_sng = (char *) NULL;
+      flg_malloc_unit_var = True;
+      unit_cln_var = nco_cln_chk_tm(unit_sng_var);
 
-    var_tmp=nco_var_dpl(var);
+      cln_sng = nco_lmt_get_udu_att(grp_id, cf_var_id, "calendar");
+      if (cln_sng)
+        lmt_cln = nco_cln_get_cln_typ(cln_sng);
+      else
+        lmt_cln = cln_std;
 
-    //(void)fprintf(stderr,"%s: %s reports var \"%s\" has missing value %d\n",nco_prg_nm_get(),fnc_nm,var.nm,var.has_mss_val);
 
-    cln_sng = nco_lmt_get_udu_att(grp_id, var->id, "calendar");
-    if (cln_sng)
-      lmt_cln = nco_cln_get_cln_typ(cln_sng);
-    else
-      lmt_cln = cln_std;
+      if (cln_sng)
+        cln_sng = (char *) nco_free(cln_sng);
+
+    }
+
+    /* set default for TRD */
+    if(TRD && flg_malloc_unit_var ==False){
+      unit_sng_var=strdup("(no units)");
+      flg_malloc_unit_var=True;
+    }
+    else if(CDL && flg_malloc_unit_var == True)
+      if(prn_flg->PRN_CLN_LGB || nco_dbg_lvl_get()== nco_dbg_std) {
+
+
+        var_tmp=nco_var_dpl(var);
 
-    var_aux = nco_var_dpl(var);
-    var_aux->val.vp = nco_free(var_aux->val.vp);
+        var_aux = nco_var_dpl(var);
+        var_aux->val.vp = nco_free(var_aux->val.vp);
 
-    if(var_aux->has_mss_val)
-      var_aux->mss_val.vp=nco_free(var_aux->mss_val.vp);
-    var_aux->has_mss_val=False;
+        if(var_aux->has_mss_val)
+          var_aux->mss_val.vp=nco_free(var_aux->mss_val.vp);
+        var_aux->has_mss_val=False;
 
-    nco_var_cnf_typ(NC_STRING, var_aux);
+        nco_var_cnf_typ(NC_STRING, var_aux);
 
-    /* nb nco_cln_var_prs modifies var */
-    if (nco_cln_var_prs(unit_sng_var, lmt_cln, 2, var_tmp, var_aux) == NCO_NOERR) {
-      /* swap vars about */
-      if (prn_flg->PRN_CLN_LGB) {
-         var_sct *var_swp;
-          var_swp=var;
-          var=var_aux;
-          var_aux=var_swp;
+        /* nb nco_cln_var_prs modifies var_tmp and var_aux */
+        if (nco_cln_var_prs(unit_sng_var, lmt_cln, 2, var_tmp, var_aux) == NCO_ERR)
+          var_aux = nco_var_free(var_aux);
+        /* swap values about */
+        else if (prn_flg->PRN_CLN_LGB) { var_swp=var;var=var_aux;var_aux=var_swp; }
+
+        if(var_tmp) var_tmp=(var_sct*)nco_var_free(var_tmp);
       }
 
     }else{
-      /* nco_cln_var_prs() has failed  */
-      if (var_aux) var_aux = nco_var_free(var_aux);
-    }
+      flg_malloc_unit_var=False;
+      unit_sng_var=&nul_chr;
+  }
 
-    if(var_tmp) var_tmp=(var_sct*)nco_var_free(var_tmp);
-    if (cln_sng) cln_sng = (char *) nco_free(cln_sng);
 
-  }
 
-  /* no need to print units if we are using a timestamp */
-  if(unit_cln_var || !prn_flg->PRN_DMN_UNITS){
-    unit_sng_var=(char*)nco_free(unit_sng_var);
-    flg_malloc_unit_var=False;
-    unit_sng_var=&nul_chr;
-  }
 
   if(var->has_mss_val) val_sz_byt=nco_typ_lng(var->type);
 
@@ -1844,11 +1848,8 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
   if(CDL || JSN || XML){
     char fmt_sng[NCO_MAX_LEN_FMT_SNG];
     dmn_trv_sct *dmn_trv; /* [sct] Unique dimension object */
-    int cpd_rec_dmn_idx[NC_MAX_DIMS]; /* [idx] Indices of non-leading record dimensions */
-    int cpd_nbr=0; /* [nbr] Number of non-leading record dimensions */
     long chr_idx;
     nco_bool is_compound; /* [flg] Variable is compound (has non-leading record dimension) */
-    nco_bool cpd_rec_dmn[NC_MAX_DIMS]; /* [flg] Dimension is compound */
     char * (*chr2sng_sf)(const char chr_val, /* I [chr] Character to process */
     char * const val_sng); /* I/O [sng] String to stuff printable result into */
 
@@ -1909,32 +1910,39 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
       } /* var.sz */
       (void)fprintf(stdout,">");
     } /* !xml */
-    if(CDL) (void)fprintf(stdout,"%*s%s = ",prn_ndn,spc_sng,nm_cdl);
+    if(CDL) {
+      (void)fprintf(stdout,"%*s%s = ",prn_ndn,spc_sng,nm_cdl);
+      /* pretty printing */
+      if(var->nbr_dim >=2)
+        (void)fprintf(stdout,"\n%*s",prn_ndn,spc_sng);
+    }
     nm_cdl=(char *)nco_free(nm_cdl);
     var_szm1=var->sz-1L;
-    is_compound=nco_prn_cpd_chk(var_trv,trv_tbl);
 
+
+    is_compound=False;
     /* Pre-compute elements that need brace punctuation */
-    if(is_compound){
-      /* Create brace list */
-      for(dmn_idx=1;dmn_idx<var->nbr_dim;dmn_idx++){ /* NB: dimension index starts at 1 */
-        dmn_trv=nco_dmn_trv_sct(var_trv->var_dmn[dmn_idx].dmn_id,trv_tbl); 
-        cpd_rec_dmn[dmn_idx]=False;
-        if(dmn_trv->is_rec_dmn){
-          cpd_rec_dmn[dmn_idx]=True; 
-          cpd_rec_dmn_idx[cpd_nbr]=dmn_idx;
-          cpd_nbr++;
-        } /* endif */
-      } /* end loop over dimensions */
-    } /* !is_compound */
+    if(CDL && var->nbr_dim>1){
+      mod_map_rv_cnt[0]=0L;
+      /* Create brace list - here we simply modify mod_map_rv_cnt[idx] -
+       * if the dim is NOT unlimited we set mod_map_rv_cnt[idx] to zero  */
+      for(dmn_idx=1;dmn_idx<var->nbr_dim;dmn_idx++) { /* NB: dimension index starts at 1 */
+        dmn_trv = nco_dmn_trv_sct(var_trv->var_dmn[dmn_idx].dmn_id, trv_tbl);
+        if(dmn_trv->is_rec_dmn)
+          is_compound=True;
+        else
+          mod_map_rv_cnt[dmn_idx]=0L;
+      }
+    }
 
     for(lmn=0;lmn<var->sz;lmn++){
 
       /* do bracketing of data if specified */
-      if(JSN_BRK)
-        for(int bdz=var->nbr_dim-1;bdz>=1;bdz--)
-          if(lmn % mod_map_rv_cnt[bdz] == 0)
-	    (void)fprintf(stdout,"[");   
+      if(JSN_BRK || is_compound)
+        for(int bdz=1; bdz<var->nbr_dim ; bdz++)
+          if(mod_map_rv_cnt[bdz]  && lmn % mod_map_rv_cnt[bdz] == 0)
+	        (void)fprintf(stdout,"%c", (JSN_BRK ? '[' : '{' ) );
+
 
       is_mss_val=False;
       if(prn_flg->PRN_MSS_VAL_BLANK && var->has_mss_val){
@@ -2028,35 +2036,47 @@ nco_prn_var_val_trv /* [fnc] Print variable data (GTT version) */
         } /* end switch */
       } /* !is_mss_val */
 
-      if(  var->type != NC_CHAR ||  (var->type == NC_STRING && is_mss_val))
+      if((var->type != NC_CHAR && var->type != NC_STRING) || (var->type==NC_STRING && is_mss_val))
         (void)fprintf(stdout,"%s",val_sng);
 
-      /* do bracketing of data if specified */
-      if(JSN_BRK)
-        for(int bdz=var->nbr_dim-1; bdz>=1 ; bdz--)
-          if( (lmn+1) % mod_map_rv_cnt[bdz] == 0)
-	      (void)fprintf(stdout,"]");   
+      /* Bracket data if specified */
+      if(JSN_BRK || is_compound)
+        for(int bdz=1; bdz<var->nbr_dim ; bdz++)
+          if(mod_map_rv_cnt[bdz]  && (lmn+1) % mod_map_rv_cnt[bdz] == 0)
+	        (void)fprintf(stdout,"%c",  (JSN_BRK ? ']' : '}' ));
+
+      if(lmn != var_szm1)
+        if((var->type == NC_CHAR && lmn%sng_lng == sng_lngm1) || var->type != NC_CHAR)
+          (void)fprintf(stdout,"%s",spr_sng);
+
+      /* pretty printing */
+      if(CDL && var->nbr_dim && lmn< var_szm1 && (lmn+1) % lmt_msa[var->nbr_dim-1]->dmn_cnt  ==0)
+        (void)fprintf(stdout,"\n%*s",prn_ndn,spc_sng);
 
 
-      if( lmn != var_szm1 )
-        if( (var->type == NC_CHAR && lmn%sng_lng == sng_lngm1) || var->type != NC_CHAR  )
-          (void)fprintf(stdout,"%s", spr_sng );
 
       /* if(var.type != NC_CHAR && var.type != NC_STRING ) (void)fprintf(stdout,"%s%s",val_sng,(lmn != var_szm1) ? spr_sng : ""); */
 
     } /* end loop over element */
     rcd_prn+=0; /* CEWI */
 
-    if(CDL){
-      if(var_aux && nco_dbg_lvl_get() == nco_dbg_std ){
-        fprintf(stdout, "; // ");
+    if(CDL) {
+      char tmp_sng[100] = {0};
+      if (nco_dbg_lvl_get() >= nco_dbg_std && flg_malloc_unit_var)
+        (void) sprintf(tmp_sng, "units=\"%s\"", unit_sng_var);
+
+      if (nco_dbg_lvl_get() == nco_dbg_std && var_aux) {
+        fprintf(stdout, "; // %s  ", tmp_sng);
         // print out list of values as a CDL text comment
-        nco_prn_var_val_cmt(var_aux,prn_flg);
-      }else {
-        (void) fprintf(stdout, " ;\n");
-      }
+        nco_prn_var_val_cmt(var_aux, prn_flg);
+
+      } else if (tmp_sng[0])
+        (void) fprintf(stdout, " ; // %s\n", tmp_sng);
+      else
+        (void) fprintf(stdout, " ; \n");
 
     }
+
     if(XML) (void)fprintf(stdout,"</values>\n");
     /* close out array bracket if sz>1 */ 
     if(JSN && var->sz > 1 ) (void)fprintf(stdout,"]");
diff --git a/src/nco/nco_rgr.c b/src/nco/nco_rgr.c
index 6ac8db0..eb660fe 100644
--- a/src/nco/nco_rgr.c
+++ b/src/nco/nco_rgr.c
@@ -242,12 +242,15 @@ nco_rgr_ini /* [fnc] Initialize regridding structure */
   rgr->vrt_nm=NULL; /* [sng] Name of dimension to employ for vertices */
 
   /* Initialize key-value properties used in grid generation */
-  rgr->fl_grd=NULL; /* [sng] Name of grid file to create */
+  rgr->fl_grd=NULL; /* [sng] Name of SCRIP grid file to create */
   rgr->fl_skl=NULL; /* [sng] Name of skeleton data file to create */
+  rgr->fl_ugrid=NULL; /* [sng] Name of UGRID grid file to create */
+  rgr->flg_area_out=True; /* [flg] Add area to output */
   rgr->flg_cll_msr=True; /* [flg] Add cell_measures attribute */
   rgr->flg_crv=False; /* [flg] Use curvilinear coordinates */
   rgr->flg_grd=False; /* [flg] Create SCRIP-format grid file */
   rgr->flg_nfr=False; /* [flg] Infer SCRIP-format grid file */
+  rgr->flg_stg=True; /* [flg] Write staggered grid with FV output */
   rgr->grd_ttl=strdup("None given (supply with --rgr grd_ttl=\"Grid Title\")"); /* [enm] Grid title */
   rgr->grd_typ=nco_grd_2D_eqa; /* [enm] Grid type */
   rgr->idx_dbg=0; /* [idx] Index of gridcell for debugging */
@@ -276,6 +279,15 @@ nco_rgr_ini /* [fnc] Initialize regridding structure */
       rgr->flg_grd=True;
       continue;
     } /* !skl */
+    if(!strcasecmp(rgr_lst[rgr_var_idx].key,"ugrid")){
+      rgr->fl_ugrid=(char *)strdup(rgr_lst[rgr_var_idx].val);
+      rgr->flg_nfr=True;
+      continue;
+    } /* !ugrid */
+    if(!strcasecmp(rgr_lst[rgr_var_idx].key,"no_area") || !strcasecmp(rgr_lst[rgr_var_idx].key,"no_area_out")){
+      rgr->flg_area_out=False;
+      continue;
+    } /* !area */
     if(!strcasecmp(rgr_lst[rgr_var_idx].key,"cell_measures") || !strcasecmp(rgr_lst[rgr_var_idx].key,"cll_msr")){
       rgr->flg_cll_msr=True;
       continue;
@@ -292,6 +304,10 @@ nco_rgr_ini /* [fnc] Initialize regridding structure */
       rgr->flg_nfr=True;
       continue;
     } /* !infer */
+    if(!strcasecmp(rgr_lst[rgr_var_idx].key,"no_stagger") || !strcasecmp(rgr_lst[rgr_var_idx].key,"no_stg")){
+      rgr->flg_stg=False;
+      continue;
+    } /* !stagger */
     if(!strcasecmp(rgr_lst[rgr_var_idx].key,"grd_ttl")){
       if(rgr->grd_ttl) rgr->grd_ttl=(char *)nco_free(rgr->grd_ttl);
       rgr->grd_ttl=(char *)strdup(rgr_lst[rgr_var_idx].val);
@@ -511,7 +527,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 (rgr_sct * const rgr, /* I/O [sct] Regridding structure */
  trv_tbl_sct * const trv_tbl) /* I/O [sct] Traversal Table */
 {
-  /* Purpose: Regrid fields using external weights (i.e., a mapping file)
+  /* Purpose: Regrid fields using external weights contained in a mapfile
 
      Examine ESMF, SCRIP, Tempest map-files:
      ncks --cdl -M -m ${DATA}/scrip/rmp_T42_to_POP43_conserv.nc | m
@@ -617,6 +633,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   nco_bool RM_RMT_FL_PST_PRC=True; /* Option R */
   nco_bool flg_dgn_area_out=False; /* [flg] Diagnose area_out from grid boundaries */
   nco_bool flg_bnd_1D_usable=False; /* [flg] Usable 1D cell vertices exist */
+  nco_bool flg_stg=rgr->flg_stg; /* [flg] Write staggered grid with FV output */
   
   nco_grd_2D_typ_enm nco_grd_2D_typ=nco_grd_2D_nil; /* [enm] Two-dimensional grid-type enum */
   nco_grd_lat_typ_enm nco_grd_lat_typ=nco_grd_lat_nil; /* [enm] Latitude grid-type enum */
@@ -772,7 +789,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     (void)fprintf(stderr,"mapfile_generator = %s, map_method = %s, normalization = %s, src_grid_size = n_a = %li, dst_grid_size = n_b = %li, src_grid_corners = nv_a = %li, dst_grid_corners = nv_b = %li, src_grid_rank = %li, dst_grid_rank = %li, num_links = n_s = %li, num_wgts = %li\n",nco_rgr_mpf_sng(nco_rgr_mpf_typ),nco_rgr_mth_sng(nco_rgr_mth_typ),nco_rgr_nrm_sng(nco_rgr_nrm_typ),rgr_map.src_grid_size,rgr_map.dst_grid_size,rgr_map.src_grid_corners,rgr_map.dst_grid_corners,rgr_map.src_g [...]
   } /* endif dbg */
   if(nco_rgr_nrm_typ == nco_rgr_nrm_none){
-    (void)fprintf(stdout,"%s: ERROR %s reports requested normalization type = %s is not yet supported. Specifically, masks specified by a mask variable (dst_grid_imask,mask_b) are not yet supported. Ask Charlie to do this.\n",nco_prg_nm_get(),fnc_nm,nco_rgr_nrm_sng(nco_rgr_nrm_typ));
+    (void)fprintf(stdout,"%s: ERROR %s reports requested normalization type = %s is not yet supported. Specifically, masks specified by a mask variable (dst_grid_imask,mask_b) are ignored. More specifically, any destination mask information is assumed to be built into the weight array so that no source points will contribute to masked locations. Talk to Charlie if you want this changed.\n",nco_prg_nm_get(),fnc_nm,nco_rgr_nrm_sng(nco_rgr_nrm_typ));
     nco_exit(EXIT_FAILURE);
   } /* !msk */
     
@@ -1295,7 +1312,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stderr,"%s: INFO %s diagnosed output longitude grid-type: %s\n",nco_prg_nm_get(),fnc_nm,nco_grd_lon_sng(nco_grd_lon_typ));
     if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stderr,"%s: INFO %s diagnosed output grid-extent: %s\n",nco_prg_nm_get(),fnc_nm,nco_grd_xtn_sng(nco_grd_xtn));
     
-    if(nco_grd_lat_typ == nco_grd_lat_fv){
+    if(nco_grd_lat_typ == nco_grd_lat_fv && flg_stg){
       slat_ctr_out=(double *)nco_malloc(slat_nbr_out*nco_typ_lng(crd_typ_out));
       slat_wgt_out=(double *)nco_malloc(slat_nbr_out*nco_typ_lng(crd_typ_out));
       slon_ctr_out=(double *)nco_malloc(slon_nbr_out*nco_typ_lng(crd_typ_out));
@@ -1396,7 +1413,12 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   } /* !tst */
 
   /* Verify frc_out is sometimes non-zero
-     ESMF: "For bilinear and patch remapping, the destination grid frac array [frac_b] is one where the grid point participates in the remapping and zero otherwise. For bilinear and patch remapping, the source grid frac array is always set to zero." */
+     ESMF: "The grid frac arrays (frac_a and frac_b) are calculated by ESMF_RegridWeightGen. For conservative remapping, the grid frac array returns the area fraction of the grid cell which participates in the remap- ping. For bilinear and patch remapping, the destination grid frac array [frac_b] is one where the grid point participates in the remapping and zero otherwise. For bilinear and patch remapping, the source grid frac array is always set to zero."
+     SCRIP: Similar to ESMF
+     For both ESMF+SCRIP frac_[ab] are computed by the weight-generation algorithm and are not specified as part of the input grids
+     How does an input ocean grid indicate that, say, half the gridcell is land and half ocean?
+     Does it use the area variable to tell the weight generation algorithm that a gridcell is fractional?
+     In other words does it use grid_imask=1 and grid_area=0.5*full_gridcell_area and, e.g., T=273.0? */
   for(idx=0;idx<(long)grd_sz_out;idx++)
     if(frc_out[idx] != 0.0) break;
   if(idx == (long)grd_sz_out){
@@ -1410,7 +1432,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     if(idx != (long)grd_sz_out)
       (void)fprintf(stdout,"%s: INFO %s reports frc_out contains zero-elements (e.g., at 1D idx=%ld)\n",nco_prg_nm_get(),fnc_nm,idx);
   /* Normalizing by frc_out is redundant iff frc_out == 1.0, so we can save time without sacrificing accuracy
-     However, frc_out is often (e.g., for CS <-> RLL maps) close but not equal to unity (an ESMF_Regrid_Weight_Gen issue?)
+     However, frc_out is often (e.g., for CS <-> RLL maps) close but not equal to unity (an ESMF_RegridWeightGen issue?)
      Hence, decide whether to normalize by frc_out by diagnosing the furthest excursion of frc_out from unity */
   nco_bool flg_frc_out_one=True;
   nco_bool flg_frc_out_wrt=False;
@@ -1428,8 +1450,12 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   nco_bool flg_frc_nrm=False; /* [flg] Must normalize by frc_out because frc_out is not always unity and specified normalization is destarea or none */
   if(!flg_frc_out_one && nco_rgr_mth_typ == nco_rgr_mth_conservative && (nco_rgr_nrm_typ == nco_rgr_nrm_destarea || nco_rgr_nrm_typ == nco_rgr_nrm_none)){
     flg_frc_nrm=True;
-    flg_frc_out_wrt=True;
-    if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"%s: INFO %s reports global metadata specifies conservative remapping with normalization of type = %s. Furthermore, destination fractions frc_dst = dst_frac = frac_b = frc_out contain non-unity elements (maximum deviation from unity of %g occurs for frc_out[%ld] = %g). Thus normalization issues cannot be ignored. Will apply \'destarea\' normalization (i.e., divide by non-zero frc_out[dst_idx]) to all regridded arrays.\n",nco_p [...]
+    /* Avoid writing frc_out unless discrepancies are particularly egregious
+       Otherwise would frc_out for standard remaps like ne30->fv129x256 for which eps=2.46e-13 */
+    double eps_rlt_wrt_thr=3.0e-13;
+    if(frc_out_dff_one_max > eps_rlt_wrt_thr) flg_frc_out_wrt=True;
+    if(nco_dbg_lvl_get() >= nco_dbg_std) (void)fprintf(stdout,"%s: INFO %s reports global metadata specifies conservative remapping with normalization of type = %s. Furthermore, destination fractions frc_dst = dst_frac = frac_b = frc_out contain non-unity elements (maximum deviation from unity of %g exceeds hard-coded (in variable eps_rlt) relative-epsilon threshold of %g for frc_out[%ld] = %g). Thus normalization issues will be explicitly treated. Will apply \'destarea\' normalization ( [...]
+    if(nco_dbg_lvl_get() >= nco_dbg_std && flg_frc_out_wrt) (void)fprintf(stdout,"%s: INFO %s Maximum deviation exceeds threshold of %g that triggers automatic writing of fractional destination area as variable named frac_b in regridded output.\n",nco_prg_nm_get(),fnc_nm,eps_rlt_wrt_thr);
   } /* !sometimes non-unity */
   if(flg_frc_nrm && rgr->flg_rnr){
     (void)fprintf(stdout,"%s: INFO %s reports manual request (with --rnr) to renormalize fields with non-unity frc_dst = dst_frac = frac_b at same time global metadata specifies normalization type = %s. Normalizing twice can be an error, depending on intent of each. Charlie is all ears on how NCO should handle this :)\n",nco_prg_nm_get(),fnc_nm,nco_rgr_nrm_sng(nco_rgr_nrm_typ));
@@ -1724,6 +1750,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     else if((rcd=nco_inq_dimid_flg(in_id,"GeoTrack",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("GeoTrack"); /* AIRS L2 DAP NC */
     else if((rcd=nco_inq_dimid_flg(in_id,"GeoTrack:L2_Standard_atmospheric&surface_product",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("GeoTrack:L2_Standard_atmospheric&surface_product"); /* AIRS L2 HDF */
     else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Along_Swath:mod04",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("Cell_Along_Swath:mod04"); /* MODIS MOD04 L2 */
+    else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Along_Swath_mod04",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("Cell_Along_Swath_mod04"); /* MODIS MOD04 L2 (ncl_convert2nc changes colon to underscore) */
     else if((rcd=nco_inq_dimid_flg(in_id,"CO_Latitude",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("CO_Latitude");
     else if((rcd=nco_inq_dimid_flg(in_id,"x",&dmn_id_lat)) == NC_NOERR) lat_nm_in=strdup("x"); /* NSIDC polar stereographic */
     else{
@@ -1754,6 +1781,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     else if((rcd=nco_inq_dimid_flg(in_id,"GeoXTrack",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("GeoXTrack"); /* AIRS L2 DAP NC */
     else if((rcd=nco_inq_dimid_flg(in_id,"GeoXTrack:L2_Standard_atmospheric&surface_product",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("GeoXTrack:L2_Standard_atmospheric&surface_product"); /* AIRS L2 HDF */
     else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Across_Swath:mod04",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("Cell_Across_Swath:mod04"); /* MODIS MOD04 L2 */
+    else if((rcd=nco_inq_dimid_flg(in_id,"Cell_Across_Swath_mod04",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("Cell_Across_Swath_mod04"); /* MODIS MOD04 L2 (ncl_convert2nc changes colon to underscore) */
     else if((rcd=nco_inq_dimid_flg(in_id,"y",&dmn_id_lon)) == NC_NOERR) lon_nm_in=strdup("y"); /* NSIDC polar stereographic */
     else{
       (void)fprintf(stdout,"%s: ERROR %s reports unable to find longitude dimension in input file. Tried the usual suspects. HINT: Inform regridder of longitude dimension name with --rgr lon_nm=name\n",nco_prg_nm_get(),fnc_nm);
@@ -1769,7 +1797,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   /* Do not extract grid variables (that are also extensive variables) like lon, lat, and area
      If necessary, use remap data to diagnose them from scratch
      Other extensive variables (like counts, population) will be extracted and summed not averaged */
-  const int var_xcl_lst_nbr=42; /* [nbr] Number of objects on exclusion list */
+  const int var_xcl_lst_nbr=44; /* [nbr] Number of objects on exclusion list */
   /* Exception list source:
      AMSR: Latitude, Longitude
      CAM, CERES, CMIP5: lat, lon
@@ -1785,12 +1813,13 @@ nco_rgr_map /* [fnc] Regrid with external weights */
      MPAS-O/I: areaCell, latCell, lonCell
      NCO: lat_vertices, lon_vertices
      OCO2: latitude_bnds, longitude_bnds
+     OMI DOMINO: Latitude, LatitudeCornerpoints, Longitude, LongitudeCornerpoints
      POP: TLAT, TLONG, ULAT, ULONG  (NB: CICE uses ?LON and POP uses ?LONG) (POP does not archive spatial bounds)
      TRMM: Latitude, Longitude
      UV-CDAT regridder: bounds_lat, bounds_lon
      Unknown: XLAT_M, XLONG_M
      WRF: XLAT, XLONG */
-  const char *var_xcl_lst[]={"/area","/areaCell","/gridcell_area","/gw","/LAT","/lat","/latCell","/Latitude","/latitude","/CO_Latitude","/slat","/S1_Latitude","/TLAT","/ULAT","/XLAT","/XLAT_M","/lat_bnds","/lat_vertices","/latt_bounds","/latu_bounds","/latitude_bnds","/bounds_lat","/LON","/lon","/lonCell","/Longitude","/longitude","/slon","/S1_Longitude","/TLON","/TLONG","/ULON","/ULONG","/XLONG","/XLONG_M","/lon_bnds","/lon_vertices","/lont_bounds","/lonu_bounds","/longitude_bnds","/bou [...]
+  const char *var_xcl_lst[]={"/area","/areaCell","/gridcell_area","/gw","/LAT","/lat","/latCell","/Latitude","/latitude","/CO_Latitude","/slat","/S1_Latitude","/TLAT","/ULAT","/XLAT","/XLAT_M","/lat_bnds","/lat_vertices","/latt_bounds","/latu_bounds","/latitude_bnds","/LatitudeCornerpoints","/bounds_lat","/LON","/lon","/lonCell","/Longitude","/longitude","/slon","/S1_Longitude","/TLON","/TLONG","/ULON","/ULONG","/XLONG","/XLONG_M","/lon_bnds","/lon_vertices","/lont_bounds","/lonu_bounds" [...]
   int var_cpy_nbr=0; /* [nbr] Number of copied variables */
   int var_rgr_nbr=0; /* [nbr] Number of regridded variables */
   int var_xcl_nbr=0; /* [nbr] Number of deleted variables */
@@ -1961,7 +1990,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     lat_bnd_nm_out=rgr->lat_bnd_nm;
     lon_bnd_nm_out=rgr->lon_bnd_nm;
   } /* !flg_grd_out_2D */
-  if(nco_grd_lat_typ == nco_grd_lat_fv){
+  if(nco_grd_lat_typ == nco_grd_lat_fv && flg_stg){
     slat_nm_out=strdup("slat");
     slat_wgt_nm_out=strdup("w_stag");
     slon_nm_out=strdup("slon");
@@ -1986,6 +2015,12 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   (void)sprintf(att_val_crd,"%s %s",lat_nm_out,lon_nm_out);
   aed_mtd_crd.val.cp=att_val_crd;
 
+  /* Reminder: 
+     Regridder area_out options, e.g., --rgr area_out=Y, set flg_area_out to control adding "area" variable to regridded output
+     Regridder cll_msr options, --rgr cll_msr=Y, set flg_cll_msr to control adding "cell_measures" attribute to regridded output
+     ncks & ncra cll_msr options, --cll_msr, set EXTRACT_CLL_MSR to control adding "cell_measures" variables (e.g., area) to extraction list of input file
+     EXTRACT_CLL_MSR supercedes --rgr area_out in determining whether to add "area" to regridded output */
+  nco_bool flg_area_out=rgr->flg_area_out; /* [flg] Add area to output */
   nco_bool flg_cll_msr=rgr->flg_cll_msr; /* [flg] Add cell_measures attribute */
   aed_sct aed_mtd_cll_msr;
   char *att_nm_cll_msr=NULL;
@@ -2008,7 +2043,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(flg_grd_out_2D){
     rcd+=nco_def_dim(out_id,lat_nm_out,lat_nbr_out,&dmn_id_lat);
     rcd+=nco_def_dim(out_id,lon_nm_out,lon_nbr_out,&dmn_id_lon);
-    if(nco_grd_lat_typ == nco_grd_lat_fv){
+    if(nco_grd_lat_typ == nco_grd_lat_fv && flg_stg){
       rcd+=nco_def_dim(out_id,slat_nm_out,slat_nbr_out,&dmn_id_slat);
       rcd+=nco_def_dim(out_id,slon_nm_out,slon_nbr_out,&dmn_id_slon);
     } /* !nco_grd_lat_fv */
@@ -2055,9 +2090,11 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     rcd+=nco_def_var(out_id,lon_bnd_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&lon_bnd_id);
     if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,lon_bnd_id,shuffle,deflate,dfl_lvl);
     var_crt_nbr++;
-    rcd+=nco_def_var(out_id,area_nm_out,crd_typ_out,dmn_nbr_1D,&dmn_id_col,&area_out_id);
-    if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,area_out_id,shuffle,deflate,dfl_lvl);
-    var_crt_nbr++;
+    if(flg_area_out){
+      rcd+=nco_def_var(out_id,area_nm_out,crd_typ_out,dmn_nbr_1D,&dmn_id_col,&area_out_id);
+      if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,area_out_id,shuffle,deflate,dfl_lvl);
+      var_crt_nbr++;
+    } /* !flg_area_out */
     if(flg_frc_out_wrt){
       rcd+=nco_def_var(out_id,frc_nm_out,crd_typ_out,dmn_nbr_1D,&dmn_id_col,&frc_out_id);
       if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,frc_out_id,shuffle,deflate,dfl_lvl);
@@ -2073,9 +2110,11 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     rcd+=nco_def_var(out_id,lon_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&lon_out_id);
     if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,lon_out_id,shuffle,deflate,dfl_lvl);
     var_crt_nbr++;
-    rcd+=nco_def_var(out_id,area_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&area_out_id);
-    if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,area_out_id,shuffle,deflate,dfl_lvl);
-    var_crt_nbr++;
+    if(flg_area_out){
+      rcd+=nco_def_var(out_id,area_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&area_out_id);
+      if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,area_out_id,shuffle,deflate,dfl_lvl);
+      var_crt_nbr++;
+    } /* !flg_area_out */
     if(flg_frc_out_wrt){
       rcd+=nco_def_var(out_id,frc_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&frc_out_id);
       if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,frc_out_id,shuffle,deflate,dfl_lvl);
@@ -2098,7 +2137,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     rcd+=nco_def_var(out_id,lon_nm_out,crd_typ_out,dmn_nbr_1D,&dmn_id_lon,&lon_out_id);
     if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,lon_out_id,shuffle,deflate,dfl_lvl);
     var_crt_nbr++;
-    if(nco_grd_lat_typ == nco_grd_lat_fv){
+    if(nco_grd_lat_typ == nco_grd_lat_fv && flg_stg){
       rcd+=nco_def_var(out_id,slat_nm_out,crd_typ_out,dmn_nbr_1D,&dmn_id_slat,&slat_out_id);
       if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,slat_out_id,shuffle,deflate,dfl_lvl);
       var_crt_nbr++;
@@ -2124,9 +2163,11 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     var_crt_nbr++;
     dmn_ids_out[0]=dmn_id_lat;
     dmn_ids_out[1]=dmn_id_lon;
-    rcd+=nco_def_var(out_id,area_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&area_out_id);
-    if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,area_out_id,shuffle,deflate,dfl_lvl);
-    var_crt_nbr++;
+    if(flg_area_out){
+      rcd+=nco_def_var(out_id,area_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&area_out_id);
+      if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,area_out_id,shuffle,deflate,dfl_lvl);
+      var_crt_nbr++;
+    } /* !flg_area_out */
     if(flg_frc_out_wrt){
       rcd+=nco_def_var(out_id,frc_nm_out,crd_typ_out,dmn_nbr_2D,dmn_ids_out,&frc_out_id);
       if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,frc_out_id,shuffle,deflate,dfl_lvl);
@@ -2314,58 +2355,60 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(dmn_ids_rec) dmn_ids_rec=(int *)nco_free(dmn_ids_rec);
 
   /* Define new metadata in regridded file */
-  att_nm=strdup("long_name");
-  att_val=strdup("Solid angle subtended by gridcell");
-  aed_mtd.att_nm=att_nm;
-  aed_mtd.var_nm=area_nm_out;
-  aed_mtd.id=area_out_id;
-  aed_mtd.sz=strlen(att_val);
-  aed_mtd.type=NC_CHAR;
-  aed_mtd.val.cp=att_val;
-  aed_mtd.mode=aed_create;
-  (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
-  if(att_nm) att_nm=(char *)nco_free(att_nm);
-  if(att_val) att_val=(char *)nco_free(att_val);
-
-  att_nm=strdup("standard_name");
-  att_val=strdup("area");
-  aed_mtd.att_nm=att_nm;
-  aed_mtd.var_nm=area_nm_out;
-  aed_mtd.id=area_out_id;
-  aed_mtd.sz=strlen(att_val);
-  aed_mtd.type=NC_CHAR;
-  aed_mtd.val.cp=att_val;
-  aed_mtd.mode=aed_create;
-  (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
-  if(att_nm) att_nm=(char *)nco_free(att_nm);
-  if(att_val) att_val=(char *)nco_free(att_val);
-
-  att_nm=strdup("units");
-  att_val=strdup("steradian");
-  aed_mtd.att_nm=att_nm;
-  aed_mtd.var_nm=area_nm_out;
-  aed_mtd.id=area_out_id;
-  aed_mtd.sz=strlen(att_val);
-  aed_mtd.type=NC_CHAR;
-  aed_mtd.val.cp=att_val;
-  aed_mtd.mode=aed_create;
-  (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
-  if(att_nm) att_nm=(char *)nco_free(att_nm);
-  if(att_val) att_val=(char *)nco_free(att_val);
-
-  att_nm=strdup("cell_methods");
-  att_val=(char *)nco_calloc((strlen(lat_nm_out)+strlen(lon_nm_out)+8L),sizeof(char));
-  (void)sprintf(att_val,"%s, %s: sum",lat_nm_out,lon_nm_out);
-  aed_mtd.att_nm=att_nm;
-  aed_mtd.var_nm=area_nm_out;
-  aed_mtd.id=area_out_id;
-  aed_mtd.sz=strlen(att_val);
-  aed_mtd.type=NC_CHAR;
-  aed_mtd.val.cp=att_val;
-  aed_mtd.mode=aed_create;
-  (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
-  if(att_nm) att_nm=(char *)nco_free(att_nm);
-  if(att_val) att_val=(char *)nco_free(att_val);
+  if(flg_area_out){
+    att_nm=strdup("long_name");
+    att_val=strdup("Solid angle subtended by gridcell");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=area_nm_out;
+    aed_mtd.id=area_out_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+    
+    att_nm=strdup("standard_name");
+    att_val=strdup("area");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=area_nm_out;
+    aed_mtd.id=area_out_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+    
+    att_nm=strdup("units");
+    att_val=strdup("steradian");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=area_nm_out;
+    aed_mtd.id=area_out_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+    
+    att_nm=strdup("cell_methods");
+    att_val=(char *)nco_calloc((strlen(lat_nm_out)+strlen(lon_nm_out)+8L),sizeof(char));
+    (void)sprintf(att_val,"%s, %s: sum",lat_nm_out,lon_nm_out);
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=area_nm_out;
+    aed_mtd.id=area_out_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,area_out_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+  } /* !flg_area_out */
 
   if(flg_frc_out_wrt){
     att_nm=strdup("long_name");
@@ -2448,6 +2491,32 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(att_nm) att_nm=(char *)nco_free(att_nm);
   if(att_val) att_val=(char *)nco_free(att_val);
 
+  double vld_min;
+  double vld_max;
+  vld_min=-90.0;
+  att_nm=strdup("valid_min");
+  aed_mtd.att_nm=att_nm;
+  aed_mtd.var_nm=lat_nm_out;
+  aed_mtd.id=lat_out_id;
+  aed_mtd.sz=1;
+  aed_mtd.type=NC_DOUBLE;
+  aed_mtd.val.dp=&vld_min;
+  aed_mtd.mode=aed_create;
+  (void)nco_aed_prc(out_id,lat_out_id,aed_mtd);
+  if(att_nm) att_nm=(char *)nco_free(att_nm);
+  
+  vld_max=90.0;
+  att_nm=strdup("valid_max");
+  aed_mtd.att_nm=att_nm;
+  aed_mtd.var_nm=lat_nm_out;
+  aed_mtd.id=lat_out_id;
+  aed_mtd.sz=1;
+  aed_mtd.type=NC_DOUBLE;
+  aed_mtd.val.dp=&vld_max;
+  aed_mtd.mode=aed_create;
+  (void)nco_aed_prc(out_id,lat_out_id,aed_mtd);
+  if(att_nm) att_nm=(char *)nco_free(att_nm);
+  
   att_nm=strdup("bounds");
   att_val=lat_bnd_nm_out;
   aed_mtd.att_nm=att_nm;
@@ -2526,7 +2595,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(att_val) att_val=(char *)nco_free(att_val);
 
   /* UGRID Conventions define "topology" and "modulo" attributes 
-     https://github.com/ugrid-conventions/ugrid-conventions/blob/master/ugrid-conventions.md
+     https://github.com/ugrid-conventions/ugrid-conventions
      My understanding is these should only be utilized for global grids */
   if(nco_rgr_typ == nco_rgr_grd_2D_to_2D){
     /* fxm: change this to check whether lon_spn >= 360 or nco_grd_xtn == global */
@@ -2556,6 +2625,30 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     if(att_val) att_val=(char *)nco_free(att_val);
   } /* !nco_rgr_grd_2D_to_2D */
 
+  if(lon_ctr_out[0] >= 0.0) vld_min=0.0; else vld_min=-180.0;
+  att_nm=strdup("valid_min");
+  aed_mtd.att_nm=att_nm;
+  aed_mtd.var_nm=lon_nm_out;
+  aed_mtd.id=lon_out_id;
+  aed_mtd.sz=1;
+  aed_mtd.type=NC_DOUBLE;
+  aed_mtd.val.dp=&vld_min;
+  aed_mtd.mode=aed_create;
+  (void)nco_aed_prc(out_id,lon_out_id,aed_mtd);
+  if(att_nm) att_nm=(char *)nco_free(att_nm);
+  
+  if(lon_ctr_out[0] >= 0.0) vld_max=360.0; else vld_max=180.0;
+  att_nm=strdup("valid_max");
+  aed_mtd.att_nm=att_nm;
+  aed_mtd.var_nm=lon_nm_out;
+  aed_mtd.id=lon_out_id;
+  aed_mtd.sz=1;
+  aed_mtd.type=NC_DOUBLE;
+  aed_mtd.val.dp=&vld_max;
+  aed_mtd.mode=aed_create;
+  (void)nco_aed_prc(out_id,lon_out_id,aed_mtd);
+  if(att_nm) att_nm=(char *)nco_free(att_nm);
+  
   att_nm=strdup("bounds");
   att_val=lon_bnd_nm_out;
   aed_mtd.att_nm=att_nm;
@@ -2581,7 +2674,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
   if(att_nm) att_nm=(char *)nco_free(att_nm);
   if(att_val) att_val=(char *)nco_free(att_val);
 
-  if(nco_grd_lat_typ == nco_grd_lat_fv){
+  if(nco_grd_lat_typ == nco_grd_lat_fv && flg_stg){
     att_nm=strdup("long_name");
     att_val=strdup("Latitude for staggered FV grid");
     aed_mtd.att_nm=att_nm;
@@ -2691,10 +2784,12 @@ nco_rgr_map /* [fnc] Regrid with external weights */
 
   /* Annotate persistent metadata that should appear last in attribute list */
   if(flg_grd_out_1D){
-    aed_mtd_crd.var_nm=area_nm_out;
-    aed_mtd_crd.id=area_out_id;
-    (void)nco_aed_prc(out_id,area_out_id,aed_mtd_crd);
-
+    if(flg_area_out){
+      aed_mtd_crd.var_nm=area_nm_out;
+      aed_mtd_crd.id=area_out_id;
+      (void)nco_aed_prc(out_id,area_out_id,aed_mtd_crd);
+    } /* !flg_area_out */
+    
     if(flg_frc_out_wrt){
       aed_mtd_crd.var_nm=frc_nm_out;
       aed_mtd_crd.id=frc_out_id;
@@ -2718,7 +2813,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     if(att_val_cll_msr) att_val_cll_msr=(char *)nco_free(att_val_cll_msr);
   } /* !flg_cll_msr */
 
-  if(nco_grd_lat_typ == nco_grd_lat_fv){
+  if(nco_grd_lat_typ == nco_grd_lat_fv && flg_stg){
     if(slat_nm_out) slat_nm_out=(char *)nco_free(slat_nm_out);
     if(slat_wgt_nm_out) slat_wgt_nm_out=(char *)nco_free(slat_wgt_nm_out);
     if(slon_nm_out) slon_nm_out=(char *)nco_free(slon_nm_out);
@@ -2746,9 +2841,11 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     dmn_cnt_tuo[0]=col_nbr_out;
     dmn_cnt_tuo[1]=bnd_nbr_out;
     (void)nco_put_vara(out_id,lon_bnd_id,dmn_srt_out,dmn_cnt_tuo,lon_bnd_out,crd_typ_out);
-    dmn_srt_out[0]=0L;
-    dmn_cnt_tuo[0]=col_nbr_out;
-    (void)nco_put_vara(out_id,area_out_id,dmn_srt_out,dmn_cnt_tuo,area_out,crd_typ_out);
+    if(flg_area_out){
+      dmn_srt_out[0]=0L;
+      dmn_cnt_tuo[0]=col_nbr_out;
+      (void)nco_put_vara(out_id,area_out_id,dmn_srt_out,dmn_cnt_tuo,area_out,crd_typ_out);
+    } /* !flg_area_out */
   } /* !flg_grd_out_1D */
   if(flg_grd_out_crv){
     dmn_srt_out[0]=dmn_srt_out[1]=0L;
@@ -2756,7 +2853,9 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     dmn_cnt_tuo[1]=lon_nbr_out;
     (void)nco_put_vara(out_id,lat_out_id,dmn_srt_out,dmn_cnt_tuo,lat_ctr_out,crd_typ_out);
     (void)nco_put_vara(out_id,lon_out_id,dmn_srt_out,dmn_cnt_tuo,lon_ctr_out,crd_typ_out);
-    (void)nco_put_vara(out_id,area_out_id,dmn_srt_out,dmn_cnt_tuo,area_out,crd_typ_out);
+    if(flg_area_out){
+      (void)nco_put_vara(out_id,area_out_id,dmn_srt_out,dmn_cnt_tuo,area_out,crd_typ_out);
+    } /* !flg_area_out */
     if(flg_frc_out_wrt){
       (void)nco_put_vara(out_id,frc_out_id,dmn_srt_out,dmn_cnt_tuo,frc_out,crd_typ_out);
     } /* !flg_frc_out_wrt */
@@ -2775,7 +2874,7 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     dmn_srt_out[0]=0L;
     dmn_cnt_tuo[0]=lon_nbr_out;
     (void)nco_put_vara(out_id,lon_out_id,dmn_srt_out,dmn_cnt_tuo,lon_ctr_out,crd_typ_out);
-    if(nco_grd_lat_typ == nco_grd_lat_fv){
+    if(nco_grd_lat_typ == nco_grd_lat_fv && flg_stg){
       dmn_srt_out[0]=0L;
       dmn_cnt_tuo[0]=slat_nbr_out;
       (void)nco_put_vara(out_id,slat_out_id,dmn_srt_out,dmn_cnt_tuo,slat_ctr_out,crd_typ_out);
@@ -2801,7 +2900,9 @@ nco_rgr_map /* [fnc] Regrid with external weights */
     dmn_srt_out[0]=dmn_srt_out[1]=0L;
     dmn_cnt_tuo[0]=lat_nbr_out;
     dmn_cnt_tuo[1]=lon_nbr_out;
-    (void)nco_put_vara(out_id,area_out_id,dmn_srt_out,dmn_cnt_tuo,area_out,crd_typ_out);
+    if(flg_area_out){
+      (void)nco_put_vara(out_id,area_out_id,dmn_srt_out,dmn_cnt_tuo,area_out,crd_typ_out);
+    } /* !flg_area_out */
     if(flg_frc_out_wrt){
       (void)nco_put_vara(out_id,frc_out_id,dmn_srt_out,dmn_cnt_tuo,frc_out,crd_typ_out);
     } /* !flg_frc_out_wrt */
@@ -3810,7 +3911,7 @@ nco_grd_2D_sng /* [fnc] Convert two-dimensional grid-type enum to string */
   switch(nco_grd_2D_typ){
   case nco_grd_2D_unk: return "Unknown, unclassified, or unrepresentable 2D grid type (e.g., unstructured, curvilinear, POP displaced-pole)";
   case nco_grd_2D_gss: return "Gaussian latitude grid. Used by spectral transform models, e.g., CCM 1-3, CAM 1-3, LSM, MATCH, UCICTM.";
-  case nco_grd_2D_fv: return "Cap grid. Uniform/Equi-angle (except at poles) latitude grid with poles are considered at (and labeled as) centers of first and last gridcells (i.e., lat_ctr[0]=-90), and those polar gridcells span half the equi-angular latitude increment. AKA FV-scalar grid (in Lin-Rood representation). Used by CAM FV, GEOS-CHEM, UCICTM, UKMO.";
+  case nco_grd_2D_fv: return "Cap grid. Uniform/Equi-angle (except at poles) latitude grid. Poles are considered at (and labeled as) centers of first and last gridcells (i.e., lat_ctr[0]=-90). Polar gridcells span half the equi-angular latitude increment. AKA FV-scalar grid (in Lin-Rood representation). Used by CAM FV, GEOS-CHEM, UCICTM, UKMO.";
   case nco_grd_2D_eqa: return "Uniform/Equi-Angular latitude grid. Uniform/Equi-angle (everywhere) latitude grid. When global (not regional) in extent, poles are at edges of first and last gridcells (i.e., lat_ctr[0]=-89.xxx). When global forms valid FV-staggered AKA FV velocity grid (for Lin-Rood representation). Used by CIESIN/SEDAC, IGBP-DIS, TOMS AAI.";
   default: nco_dfl_case_generic_err(); break;
   } /* end switch */
@@ -3827,7 +3928,7 @@ nco_grd_lat_sng /* [fnc] Convert latitude grid-type enum to string */
   switch(nco_grd_lat_typ){
   case nco_grd_lat_unk: return "Unknown, unclassified, or unrepresentable latitude grid type (e.g., unstructured, curvilinear, POP3)";
   case nco_grd_lat_gss: return "Gaussian latitude grid used by global spectral models: CCM 1-3, CAM 1-3, LSM, MATCH, UCICTM";
-  case nco_grd_lat_fv: return "Cap-latitude grid. Uniform/Equi-angle (except at poles) latitude grid with poles are considered at (and labeled as) centers of first and last gridcells (i.e., lat_ctr[0]=-90), and those polar gridcells span half the equi-angular latitude increment. AKA FV-scalar grid (in Lin-Rood representation). Used by: CAM FV, GEOS-CHEM, UCICTM, UKMO";
+  case nco_grd_lat_fv: return "Cap-latitude grid. Uniform/Equi-angle (except at poles) latitude grid. Poles are considered at (and labeled as) centers of first and last gridcells (i.e., lat_ctr[0]=-90). Polar gridcells span half the equi-angular latitude increment. AKA FV-scalar grid (in Lin-Rood representation). Used by: CAM FV, GEOS-CHEM, UCICTM, UKMO";
   case nco_grd_lat_eqa: return "Uniform/Equi-Angular latitude grid. Uniform/Equi-angle (everywhere) latitude grid. When global (not regional) in extent, poles are at edges of first and last gridcells (e.g., lat_ctr[0]=-89.xxx). When global can be latitude-component of a valid FV-staggered grid AKA FV velocity grid (for Lin-Rood representation). Used by: CIESIN/SEDAC, IGBP-DIS, TOMS AAI";
   default: nco_dfl_case_generic_err(); break;
   } /* end switch */
@@ -4084,7 +4185,7 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
      ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr grid=${DATA}/sld/rgr/grd_dst.nc --rgr latlon=100,100 --rgr snwe=30.0,70.0,-120.0,-90.0 ~/nco/data/in.nc ~/foo.nc
 
      Global RLL skeleton:
-     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr skl=${DATA}/sld/rgr/skl_180x360.nc --rgr grid=${DATA}/grids/180x360_SCRIP.20150901.nc --rgr latlon=180,360 --rgr lat_typ=eqa --rgr lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+     ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr skl=${DATA}/sld/rgr/skl_180x360.nc --rgr grid=${DATA}/grids/180x360_SCRIP.20150901.nc --rgr latlon=180,360#lat_typ=eqa#lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
 
      Curvilinear grids:
      ncks -O -D 1 --rgr grd_ttl='Curvilinear grid 10x20. Degenerate case.' --rgr crv=Y --rgr lon_crv=0.0 --rgr skl=${DATA}/sld/rgr/skl_crv.nc --rgr grid=${DATA}/sld/rgr/grd_crv.nc --rgr latlon=10,20 --rgr snwe=-5.0,5.0,-10.0,10.0 ~/nco/data/in.nc ~/foo.nc
@@ -4782,7 +4883,7 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
     if(rgr->lon_nm_out) lon_nm_out=rgr->lon_nm_out; else lon_nm_out=(char *)strdup("lon");
     if(rgr->col_nm_out) col_nm_out=rgr->col_nm_out; else col_nm_out=(char *)strdup("ncol");
 
-  /* Name output dimensions */
+    /* Name output dimensions */
     area_nm=rgr->area_nm;
     bnd_nm=rgr->bnd_nm;
     //bnd_tm_nm=rgr->bnd_tm_nm;
@@ -4872,7 +4973,7 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
       if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,area_id,shuffle,deflate,dfl_lvl);
     } /* !flg_grd_2D */
     
-    /* Define "units" attributes */
+    /* Define attributes */
     att_nm=strdup("title");
     att_val=strdup(rgr->grd_ttl);
     aed_mtd.att_nm=att_nm;
@@ -4941,6 +5042,32 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
     if(att_nm) att_nm=(char *)nco_free(att_nm);
     if(att_val) att_val=(char *)nco_free(att_val);
     
+    att_nm=strdup("long_name");
+    att_val=strdup("Solid angle subtended by gridcell");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=area_nm;
+    aed_mtd.id=area_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,area_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("area");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=area_nm;
+    aed_mtd.id=area_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,area_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+    
     att_nm=strdup("units");
     att_val=strdup("steradian");
     aed_mtd.att_nm=att_nm;
@@ -4954,62 +5081,208 @@ nco_grd_mk /* [fnc] Create SCRIP-format grid file */
     if(att_nm) att_nm=(char *)nco_free(att_nm);
     if(att_val) att_val=(char *)nco_free(att_val);
     
+    att_nm=strdup("long_name");
+    att_val=strdup("Latitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lat_nm_out;
+    aed_mtd.id=lat_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lat_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("latitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lat_nm_out;
+    aed_mtd.id=lat_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lat_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+    
     att_nm=strdup("units");
-    att_val=strdup("degrees");
+    att_val=strdup("degrees_north");
     aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lat_nm_out;
+    aed_mtd.id=lat_id;
     aed_mtd.sz=strlen(att_val);
     aed_mtd.type=NC_CHAR;
     aed_mtd.val.cp=att_val;
     aed_mtd.mode=aed_create;
-    /* Add same units attribute to four different variables */
+    (void)nco_aed_prc(out_id,lat_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+    
+    att_nm=strdup("axis");
+    att_val=strdup("Y");
+    aed_mtd.att_nm=att_nm;
     aed_mtd.var_nm=lat_nm_out;
     aed_mtd.id=lat_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
     (void)nco_aed_prc(out_id,lat_id,aed_mtd);
-    aed_mtd.var_nm=lon_nm_out;
-    aed_mtd.id=lon_id;
-    (void)nco_aed_prc(out_id,lon_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("bounds");
+    att_val=lat_bnd_nm;
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lat_nm_out;
+    aed_mtd.id=lat_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lat_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+
+    att_nm=strdup("long_name");
+    if(flg_grd_2D) 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;
     aed_mtd.id=lat_bnd_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
     (void)nco_aed_prc(out_id,lat_bnd_id,aed_mtd);
-    aed_mtd.var_nm=lon_bnd_nm;
-    aed_mtd.id=lon_bnd_id;
-    (void)nco_aed_prc(out_id,lon_bnd_id,aed_mtd);
     if(att_nm) att_nm=(char *)nco_free(att_nm);
     if(att_val) att_val=(char *)nco_free(att_val);
+
+    if(flg_grd_2D){
+      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;
+      aed_mtd.var_nm=lat_wgt_nm;
+      aed_mtd.id=lat_wgt_id;
+      aed_mtd.sz=strlen(att_val);
+      aed_mtd.type=NC_CHAR;
+      aed_mtd.val.cp=att_val;
+      aed_mtd.mode=aed_create;
+      (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_rct */
     
-    /* Begin data mode */
-    (void)nco_enddef(out_id);
+    att_nm=strdup("long_name");
+    att_val=strdup("Longitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lon_nm_out;
+    aed_mtd.id=lon_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lon_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("longitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lon_nm_out;
+    aed_mtd.id=lon_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lon_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
     
-    /* Write new coordinates and variables to regridded file */
-    if(flg_grd_1D){
-      dmn_srt[0]=0L;
-      dmn_cnt[0]=col_nbr;
-      (void)nco_put_vara(out_id,lat_id,dmn_srt,dmn_cnt,lat_ctr,crd_typ);
-      dmn_srt[0]=0L;
-      dmn_cnt[0]=col_nbr;
-      (void)nco_put_vara(out_id,lon_id,dmn_srt,dmn_cnt,lon_ctr,crd_typ);
-      dmn_srt[0]=dmn_srt[1]=0L;
-      dmn_cnt[0]=col_nbr;
-      dmn_cnt[1]=bnd_nbr;
-      (void)nco_put_vara(out_id,lat_bnd_id,dmn_srt,dmn_cnt,lat_bnd,crd_typ);
-      dmn_srt[0]=dmn_srt[1]=0L;
-      dmn_cnt[0]=col_nbr;
-      dmn_cnt[1]=bnd_nbr;
-      (void)nco_put_vara(out_id,lon_bnd_id,dmn_srt,dmn_cnt,lon_bnd,crd_typ);
-      dmn_srt[0]=0L;
-      dmn_cnt[0]=col_nbr;
-      (void)nco_put_vara(out_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
-    } /* !flg_grd_1D */
-    if(flg_grd_crv){
-      dmn_srt[0]=dmn_srt[1]=0L;
-      dmn_cnt[0]=lat_nbr;
-      dmn_cnt[1]=lon_nbr;
-      (void)nco_put_vara(out_id,lat_id,dmn_srt,dmn_cnt,grd_ctr_lat,crd_typ);
-      (void)nco_put_vara(out_id,lon_id,dmn_srt,dmn_cnt,grd_ctr_lon,crd_typ);
-      (void)nco_put_vara(out_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
-      dmn_srt[0]=dmn_srt[1]=0L;dmn_srt[2]=0L;
-      dmn_cnt[0]=lat_nbr;
-      dmn_cnt[1]=lon_nbr;
+    att_nm=strdup("units");
+    att_val=strdup("degrees_east");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lon_nm_out;
+    aed_mtd.id=lon_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lon_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+    
+    att_nm=strdup("axis");
+    att_val=strdup("X");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lon_nm_out;
+    aed_mtd.id=lon_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lon_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("bounds");
+    att_val=lon_bnd_nm;
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=lon_nm_out;
+    aed_mtd.id=lon_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lon_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+
+    att_nm=strdup("long_name");
+    if(flg_grd_2D) 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;
+    aed_mtd.id=lon_bnd_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,lon_bnd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    /* Begin data mode */
+    (void)nco_enddef(out_id);
+    
+    /* Write new coordinates and variables to regridded file */
+    if(flg_grd_1D){
+      dmn_srt[0]=0L;
+      dmn_cnt[0]=col_nbr;
+      (void)nco_put_vara(out_id,lat_id,dmn_srt,dmn_cnt,lat_ctr,crd_typ);
+      dmn_srt[0]=0L;
+      dmn_cnt[0]=col_nbr;
+      (void)nco_put_vara(out_id,lon_id,dmn_srt,dmn_cnt,lon_ctr,crd_typ);
+      dmn_srt[0]=dmn_srt[1]=0L;
+      dmn_cnt[0]=col_nbr;
+      dmn_cnt[1]=bnd_nbr;
+      (void)nco_put_vara(out_id,lat_bnd_id,dmn_srt,dmn_cnt,lat_bnd,crd_typ);
+      dmn_srt[0]=dmn_srt[1]=0L;
+      dmn_cnt[0]=col_nbr;
+      dmn_cnt[1]=bnd_nbr;
+      (void)nco_put_vara(out_id,lon_bnd_id,dmn_srt,dmn_cnt,lon_bnd,crd_typ);
+      dmn_srt[0]=0L;
+      dmn_cnt[0]=col_nbr;
+      (void)nco_put_vara(out_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
+    } /* !flg_grd_1D */
+    if(flg_grd_crv){
+      dmn_srt[0]=dmn_srt[1]=0L;
+      dmn_cnt[0]=lat_nbr;
+      dmn_cnt[1]=lon_nbr;
+      (void)nco_put_vara(out_id,lat_id,dmn_srt,dmn_cnt,grd_ctr_lat,crd_typ);
+      (void)nco_put_vara(out_id,lon_id,dmn_srt,dmn_cnt,grd_ctr_lon,crd_typ);
+      (void)nco_put_vara(out_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
+      dmn_srt[0]=dmn_srt[1]=0L;dmn_srt[2]=0L;
+      dmn_cnt[0]=lat_nbr;
+      dmn_cnt[1]=lon_nbr;
       dmn_cnt[2]=grd_crn_nbr;
       (void)nco_put_vara(out_id,lat_bnd_id,dmn_srt,dmn_cnt,grd_crn_lat,crd_typ);
       (void)nco_put_vara(out_id,lon_bnd_id,dmn_srt,dmn_cnt,grd_crn_lon,crd_typ);
@@ -5079,6 +5352,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   const double rdn2dgr=180.0/M_PI;
   const double dgr2rdn=M_PI/180.0;
 
+  const int dmn_nbr_0D=0; /* [nbr] Rank of 0-D grid variables */
   const int dmn_nbr_1D=1; /* [nbr] Rank of 1-D grid variables */
   const int dmn_nbr_2D=2; /* [nbr] Rank of 2-D grid variables */
   const int dmn_nbr_3D=3; /* [nbr] Rank of 3-D grid variables */
@@ -5097,6 +5371,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   char *msk_nm_in=NULL;
   char dmn_nm[NC_MAX_NAME]; /* [sng] Dimension name */
 
+  /* SCRIP-format grid names are non-negotiable and thus fixed not dynamic */
   char area_nm[]="grid_area"; /* 20150830: NB ESMF_RegridWeightGen --user_areas looks for variable named "grid_area" */
   char dmn_sz_nm[]="grid_dims";
   char grd_crn_lat_nm[]="grid_corner_lat";
@@ -5168,6 +5443,9 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   int lat_bnd_id=NC_MIN_INT; /* [id] Latitude centers of rectangular grid variable ID */
   int lon_bnd_id=NC_MIN_INT; /* [id] Longitude centers of rectangular grid variable ID */
   int msk_id=NC_MIN_INT; /* [id] Mask variable ID */
+  int mss_val_int_out=NC_MIN_INT; /* [nbr] Value that can be non-erroneously pointed to */
+  int val_two=2; /* [nbr] Value that can be non-erroneously pointed to */
+  int val_zero=0; /* [nbr] Value that can be non-erroneously pointed to */
   int var_id; /* [id] Current variable ID */
 
   long dmn_srt[dmn_nbr_grd_max];
@@ -5212,6 +5490,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   nco_bool flg_grd_2D=False;
   nco_bool flg_grd_crv=False;
   nco_bool flg_wrt_crn=True;
+  nco_bool flg_crn_grd_lat_lon=False; /* [flg] Curvilinear corner array ordered non-canonically as grd_nbr,lat_nbr,lon_nbr */
   nco_bool has_mss_val_ctr=False;
   nco_bool has_mss_val_msk;
 
@@ -5240,7 +5519,6 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   if(RAM_OPEN) md_open=NC_NOWRITE|NC_DISKLESS; else md_open=NC_NOWRITE;
   rcd+=nco_fl_open(fl_in,md_open,&bfr_sz_hnt,&in_id);
 
-  /* Identify grid-related variables, usually latitude and longitude */
   char *bnd_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as bounds */
   char *col_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as column */
   char *lat_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as latitude */
@@ -5251,8 +5529,8 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   char *lon_bnd_nm=NULL_CEWI; /* [sng] Name of longitude boundary variable */
   int dmn_id_bnd=NC_MIN_INT; /* [id] Dimension ID for spatial bounds */
   int dmn_id_col=NC_MIN_INT; /* [id] Dimension ID for unstructured grids */
-  int dmn_id_lat=NC_MIN_INT; /* [id] Dimension ID */
-  int dmn_id_lon=NC_MIN_INT; /* [id] Dimension ID */
+  int dmn_id_lat=NC_MIN_INT; /* [id] Dimension ID for latitude */
+  int dmn_id_lon=NC_MIN_INT; /* [id] Dimension ID for longitude */
 
   /* Begin CF-coordinates block */
   cf_crd_sct *cf=NULL;
@@ -5416,6 +5694,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   /* End CF-coordinates block */
   
   /* Locate fields that must be present in input file
+     Required variables are usually latitude and longitude
      Currently these variables must be in root group
      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 */
@@ -5455,7 +5734,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   } /* !lon_ctr_id */
   
   if(!lat_nm_in || !lon_nm_in){
-    (void)fprintf(stdout,"%s: ERROR %s unable to identify latitude and/or longitude variable.\n",nco_prg_nm_get(),fnc_nm);
+    (void)fprintf(stdout,"%s: ERROR %s unable to identify latitude and/or longitude variable.\nHINT: Potential causes and workarounds for this include: 1. Coordinate variables must be in the root directory (not in a group). If this might be the problem, try to \"flatten\" the input file before regridding it (see http://nco.sf.net/nco.html#flatten). 2. Horizontal dimensions with \"unusual\" names are hard to identify unless the user designates them somehow. ncremap will search for horizon [...]
     nco_exit(EXIT_FAILURE);
   } /* !lat_nm_in */
     
@@ -5484,7 +5763,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 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);
+    (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.\nHINT: 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);
@@ -5569,6 +5848,10 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     lon_typ=nco_grd_lon_nil;
     /* Assume rectangular grids that do not specify otherwise use quadrilaterals */
     if(dmn_id_bnd == NC_MIN_INT) grd_crn_nbr=4;
+    /* Sometimes we infer from a 2D grid, like those produced by nco_grd_mk(), that has bounds with nv=2
+       This signals rectangular gridcell bounds are interfaces not vertices (to save half the space)
+       These rectangles really have four corners so we change grd_crn_nbr (not bnd_nbr) accordingly */
+    if(grd_crn_nbr == 2) grd_crn_nbr=4;
     /* Convention is to archive only two bounds for rectangular grids (since sides are identical)
        Non-quadrilateral rectangular grids are untested */
     if(grd_crn_nbr == 4) bnd_nbr=2;
@@ -5636,12 +5919,14 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   else if((rcd=nco_inq_varid_flg(in_id,"lat_ntf",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("lat_ntf");
   else if((rcd=nco_inq_varid_flg(in_id,"lat_vertices",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("lat_vertices");
   else if((rcd=nco_inq_varid_flg(in_id,"latitude_bnds",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("latitude_bnds"); /* OCO2 */
+  else if((rcd=nco_inq_varid_flg(in_id,"LatitudeCornerpoints",&lat_bnd_id)) == NC_NOERR) lat_bnd_nm=strdup("LatitudeCornerpoints"); /* OMI */
   if((rcd=nco_inq_varid_flg(in_id,"lon_bnds",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lon_bnds");
   else if((rcd=nco_inq_varid_flg(in_id,"lont_bounds",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lont_bounds");
   else if((rcd=nco_inq_varid_flg(in_id,"lonu_bounds",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lonu_bounds");
   else if((rcd=nco_inq_varid_flg(in_id,"lon_ntf",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lon_ntf");
   else if((rcd=nco_inq_varid_flg(in_id,"lon_vertices",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("lon_vertices");
   else if((rcd=nco_inq_varid_flg(in_id,"longitude_bnds",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("longitude_bnds"); /* OCO2 */
+  else if((rcd=nco_inq_varid_flg(in_id,"LongitudeCornerpoints",&lon_bnd_id)) == NC_NOERR) lon_bnd_nm=strdup("LongitudeCornerpoints"); /* OMI */
 
   if((rcd=nco_inq_varid_flg(in_id,"area",&area_id)) == NC_NOERR) area_nm_in=strdup("area");
   else if((rcd=nco_inq_varid_flg(in_id,"Area",&area_id)) == NC_NOERR) area_nm_in=strdup("Area");
@@ -5677,7 +5962,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 
     /* Obtain fields that may be present in unstructured input file */
     if(area_id != NC_MIN_INT) rcd=nco_get_vara(in_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
-    if(msk_id != NC_MIN_INT)  rcd=nco_get_vara(in_id,msk_id,dmn_srt,dmn_cnt,msk_unn.vp,msk_typ);
+    if(msk_id != NC_MIN_INT) rcd=nco_get_vara(in_id,msk_id,dmn_srt,dmn_cnt,msk_unn.vp,msk_typ);
     dmn_srt[0]=dmn_srt[1]=0L;
     dmn_cnt[0]=col_nbr;
     if(flg_1D_psd_rct_bnd){
@@ -5708,18 +5993,65 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     } /* !msk */
     /* Corners are on curvilinear corner grid
        Rectangular boundaries (i.e., lat_bnd=[lat_nbr,2]) DNE for curvilinear grids 
-       Read-in *_crn arrays in curvilinear grids, and *_bnd arrays for rectilinear grids */
+       Read-in *_crn arrays in curvilinear grids, and *_bnd arrays for rectilinear grids
+       Rank-ordering of corner arrays is usually lat_nbr,lon_nbr,grd_crn_nbr as produced/expected by SCRIP
+       However some datasets, e.g., OMI DOMINO use grd_crn_nbr,lat_nbr,lon_nbr
+       Sigh... */
     dmn_srt[0]=dmn_srt[1]=dmn_srt[2]=0L;
-    dmn_cnt[0]=lat_nbr;
-    dmn_cnt[1]=lon_nbr;
-    dmn_cnt[2]=grd_crn_nbr;
-    if(lat_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lat_bnd_id,dmn_srt,dmn_cnt,lat_crn,crd_typ);
-    if(lon_bnd_id != NC_MIN_INT) rcd=nco_get_vara(in_id,lon_bnd_id,dmn_srt,dmn_cnt,lon_crn,crd_typ);
+    if(lat_bnd_id != NC_MIN_INT && lon_bnd_id != NC_MIN_INT){
+      rcd=nco_inq_vardimid(in_id,lat_bnd_id,dmn_ids);
+      if((dmn_ids[0] == dmn_id_lat && dmn_ids[1] == dmn_id_lon) || (dmn_ids[0] == dmn_id_lon && dmn_ids[1] == dmn_id_lat)){
+	dmn_id_bnd=dmn_ids[2];
+	dmn_cnt[0]=lat_nbr;
+	dmn_cnt[1]=lon_nbr;
+	dmn_cnt[2]=grd_crn_nbr;
+      }else if((dmn_ids[1] == dmn_id_lat && dmn_ids[2] == dmn_id_lon) || (dmn_ids[1] == dmn_id_lon && dmn_ids[2] == dmn_id_lat)){
+	dmn_id_bnd=dmn_ids[0];
+	dmn_cnt[0]=grd_crn_nbr;
+	dmn_cnt[1]=lat_nbr;
+	dmn_cnt[2]=lon_nbr;
+	flg_crn_grd_lat_lon=True;
+      }else{
+	(void)fprintf(stdout,"%s: WARNING %s confused by dimension-ordering of latitude bounds variable \"%s. Will ignore this bounds variable and attempt to extrapolate vertices from centers internally...\n",nco_prg_nm_get(),fnc_nm,lat_nm_in);
+	lat_bnd_id=NC_MIN_INT;
+	lon_bnd_id=NC_MIN_INT;
+      } /* !dmn_ids */
+      rcd=nco_get_vara(in_id,lat_bnd_id,dmn_srt,dmn_cnt,lat_crn,crd_typ);
+      rcd=nco_get_vara(in_id,lon_bnd_id,dmn_srt,dmn_cnt,lon_crn,crd_typ);
+      if(flg_crn_grd_lat_lon){
+	/* Permute corner arrays from non-canonical (grd_nbr,lat_nbr,lon_nbr) to canonical (lat_nbr,lon_nbr,grd_nbr) order */
+	double *lat_crn_tmp=NULL;
+	double *lon_crn_tmp=NULL;
+	lat_crn_tmp=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
+	lon_crn_tmp=(double *)nco_malloc(grd_sz_nbr*grd_crn_nbr*nco_typ_lng(crd_typ));
+	memcpy(lat_crn_tmp,lat_crn,grd_sz_nbr*grd_crn_nbr*sizeof(double));
+	memcpy(lon_crn_tmp,lon_crn,grd_sz_nbr*grd_crn_nbr*sizeof(double));
+	for(crn_idx=0;crn_idx<grd_crn_nbr;crn_idx++){
+	  for(idx=0;idx<grd_sz_nbr;idx++){
+	    lat_idx=idx/lon_nbr;
+	    lon_idx=idx%lon_nbr;
+	    /* NB: Variables differ (lat vs. lon) but indexes are identical in next to lines */
+	    lat_crn[lat_idx*lon_nbr*grd_crn_nbr+lon_idx*grd_crn_nbr+crn_idx]=lat_crn_tmp[crn_idx*grd_sz_nbr+idx];
+	    lon_crn[lat_idx*lon_nbr*grd_crn_nbr+lon_idx*grd_crn_nbr+crn_idx]=lon_crn_tmp[crn_idx*grd_sz_nbr+idx];
+	  } /* !idx */
+	} /* !crn_idx */
+	if(lat_crn_tmp) lat_crn_tmp=(double *)nco_free(lat_crn_tmp);
+	if(lon_crn_tmp) lon_crn_tmp=(double *)nco_free(lon_crn_tmp);
+	/* In this code branch, thought to be executed only for OMI DOMINO grids, re-compute grid center arrays (known to contain missing values) as centroids of supplied grid corners */
+	for(idx=0;idx<grd_sz_nbr;idx++){
+	  lat_idx=idx/lon_nbr;
+	  lon_idx=idx%lon_nbr;
+	  lat_ctr[idx]=0.25*(lat_crn[idx*grd_crn_nbr+0L]+lat_crn[idx*grd_crn_nbr+1L]+lat_crn[idx*grd_crn_nbr+2L]+lat_crn[idx*grd_crn_nbr+3L]);
+	  lon_ctr[idx]=nco_lon_crn_avg_brnch(lon_crn[idx*grd_crn_nbr+0L],lon_crn[idx*grd_crn_nbr+1L],lon_crn[idx*grd_crn_nbr+2L],lon_crn[idx*grd_crn_nbr+3L]);
+	} /* !idx */
+      } /* !flg_crd_grd_lat_lon */
+    } /* !lat_bnd_id */
   } /* !flg_grd_crv */
 
   if(flg_grd_2D){
-    int lon_psn_in; /* [idx] Ordinal position of longitude size in rectangular grid */
-    int lat_psn_in; /* [idx] Ordinal position of latitude  size in rectangular grid */
+    int lon_psn_in=0L; /* [idx] Ordinal position of longitude size in rectangular grid */
+    int lat_psn_in=1L; /* [idx] Ordinal position of latitude  size in rectangular grid */
+    int tpl_id=NC_MIN_INT; /* [idx] Ordinal position of latitude  size in rectangular grid */
 
     /* Obtain fields that must be present in input file */
     dmn_srt[0]=0L;
@@ -5729,9 +6061,14 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     dmn_cnt[0]=lon_nbr;
     rcd=nco_get_vara(in_id,lon_ctr_id,dmn_srt,dmn_cnt,lon_ctr,crd_typ);
 
-    /* Obtain fields that may be present in input file */
-    if(area_id != NC_MIN_INT){
-      var_id=area_id;
+    /* Use fields that may be present in input file to override, if necessary, default lon/lat order
+       area and mask are both suitable templates for determining input lat/lon ordering
+       NB: Algorithm assumes area and mask do not have time dimension */
+    if(area_id != NC_MIN_INT) tpl_id=area_id;
+    else if(msk_id != NC_MIN_INT) tpl_id=msk_id;
+
+    if(tpl_id != NC_MIN_INT){
+      var_id=tpl_id;
       rcd=nco_inq_vardimid(in_id,var_id,dmn_ids);
       /* fxm: optimize discovery of lat/lon ordering */
       for(dmn_idx=0;dmn_idx<grd_rnk_nbr;dmn_idx++){
@@ -5748,6 +6085,12 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	  lon_psn_in=dmn_idx;
 	} /* !lon */
       } /* !dmn_idx */
+    } /* !tpl */
+
+    /* Obtain fields that may be present in input file */
+    if(area_id != NC_MIN_INT){
+      var_id=area_id;
+      rcd=nco_inq_vardimid(in_id,var_id,dmn_ids);
       dmn_srt[lat_psn_in]=0L;
       dmn_cnt[lat_psn_in]=lat_nbr;
       dmn_srt[lon_psn_in]=0L;
@@ -5765,7 +6108,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       rcd=nco_get_vara(in_id,msk_id,dmn_srt,dmn_cnt,msk_unn.vp,msk_typ);
     } /* !msk */
 
-    /* Rectangular boundaries are on "abbreviated" bounds grid (two bounds per center)
+    /* Rectangular boundaries are often on "abbreviated" bounds grid (two bounds per center)
        Read-in *_crn arrays for 1D and curvilinear grids, and *_bnd arrays for rectilinear grids */
     dmn_srt[0]=dmn_srt[1]=0L;
     dmn_cnt[0]=lat_nbr;
@@ -6052,7 +6395,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 
   if(flg_grd_crv || flg_1D_psd_rct_bnd){
     /* As of 20160308, use same sanity check for 1D pseudo-rectangular grids as for curvilinear grids
-       Pseudo-rectangular grids rely on user-produced boundaries which may be psychotic (CW, non-branch-cut)
+       Pseudo-rectangular grids rely on user-produced boundaries that may be psychotic (CW, non-branch-cut)
        Starting 20151205, use same sanity check for both inferred and copied curvilinear grids
        20151129: Curvilinear extrapolation technique above yields corners outside [-90.0,90.0], [-180.0,360.0]
        Also, it may assume input is ascending swath and fail for descending swaths
@@ -6157,15 +6500,11 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 	lat_bnd[2*idx+1]=lat_ntf[idx+1];
       } /* !idx */
     }else{ /* !(lat_bnd_id && lon_bnd_id) */
-      /* Derive interfaces (ntf) and bounds (bnd) from corner data on disk */
-      for(idx=0;idx<lon_nbr;idx++){
-	lon_ntf[idx]=lon_bnd[2*idx];
-	lon_ntf[idx+1]=lon_bnd[2*idx+1];
-      } /* !idx */
-      for(idx=0;idx<lat_nbr;idx++){
-	lat_ntf[idx]=lat_bnd[2*idx];
-	lat_ntf[idx+1]=lat_bnd[2*idx+1];
-      } /* !idx */
+      /* Derive interfaces (ntf) from bounds (bnd) data on disk */
+      for(idx=0;idx<lon_nbr;idx++) lon_ntf[idx]=lon_bnd[2*idx];
+      lon_ntf[lon_nbr]=lon_bnd[2*lon_nbr-1];
+      for(idx=0;idx<lat_nbr;idx++) lat_ntf[idx]=lat_bnd[2*idx];
+      lat_ntf[lat_nbr]=lat_bnd[2*lat_nbr-1];
       lat_spn=lat_ntf[lat_nbr]-lat_ntf[0];
       lon_spn=lon_ntf[lon_nbr]-lon_ntf[0];
     } /* !(lat_bnd_id && lon_bnd_id) */
@@ -6338,32 +6677,32 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
 	idx=grd_crn_nbr*lon_idx;
 	lon_crn[idx]=lon_ntf[lon_idx]; /* LL */
-	lon_crn[idx+1]=lon_ntf[lon_idx+1]; /* LR */
-	lon_crn[idx+2]=lon_ntf[lon_idx+1]; /* UR */
-	lon_crn[idx+3]=lon_ntf[lon_idx]; /* UL */
+	lon_crn[idx+1L]=lon_ntf[lon_idx+1L]; /* LR */
+	lon_crn[idx+2L]=lon_ntf[lon_idx+1L]; /* UR */
+	lon_crn[idx+3L]=lon_ntf[lon_idx]; /* UL */
       } /* !lon_idx */
       for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
 	idx=grd_crn_nbr*lat_idx;
 	lat_crn[idx]=lat_ntf[lat_idx]; /* LL */
-	lat_crn[idx+1]=lat_ntf[lat_idx]; /* LR */
-	lat_crn[idx+2]=lat_ntf[lat_idx+1]; /* UR */
-	lat_crn[idx+3]=lat_ntf[lat_idx+1]; /* UL */
+	lat_crn[idx+1L]=lat_ntf[lat_idx]; /* LR */
+	lat_crn[idx+2L]=lat_ntf[lat_idx+1L]; /* UR */
+	lat_crn[idx+3L]=lat_ntf[lat_idx+1L]; /* UL */
       } /* !lat_idx */
     }else{ /* !lat_bnd_id */
       /* If boundaries were provided in input dataset, copy corners from boundaries */
       for(lon_idx=0;lon_idx<lon_nbr;lon_idx++){
 	idx=grd_crn_nbr*lon_idx;
 	lon_crn[idx]=lon_bnd[2*lon_idx]; /* LL */
-	lon_crn[idx+1]=lon_bnd[2*lon_idx+1]; /* LR */
-	lon_crn[idx+2]=lon_bnd[2*lon_idx+1]; /* UR */
-	lon_crn[idx+3]=lon_bnd[2*lon_idx]; /* UL */
+	lon_crn[idx+1L]=lon_bnd[2*lon_idx+1L]; /* LR */
+	lon_crn[idx+2L]=lon_bnd[2*lon_idx+1L]; /* UR */
+	lon_crn[idx+3L]=lon_bnd[2*lon_idx]; /* UL */
       } /* !lon_idx */
       for(lat_idx=0;lat_idx<lat_nbr;lat_idx++){
 	idx=grd_crn_nbr*lat_idx;
 	lat_crn[idx]=lat_bnd[2*lat_idx]; /* LL */
-	lat_crn[idx+1]=lat_bnd[2*lat_idx]; /* LR */
-	lat_crn[idx+2]=lat_bnd[2*lat_idx+1]; /* UR */
-	lat_crn[idx+3]=lat_bnd[2*lat_idx+1]; /* UL */
+	lat_crn[idx+1L]=lat_bnd[2*lat_idx]; /* LR */
+	lat_crn[idx+2L]=lat_bnd[2*lat_idx+1L]; /* UR */
+	lat_crn[idx+3L]=lat_bnd[2*lat_idx+1L]; /* UL */
       } /* !lat_idx */
     } /* !lat_bnd_id */
   } /* !flg_grd_2D */
@@ -6452,7 +6791,9 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
 
   /* Input mask can be any type and output mask will always be NC_INT */
   if(msk_id == NC_MIN_INT){
-    /* Default mask if necessary */
+    /* ERWG will fail unless the grid file has a mask variable
+       The nul-mask (all points included) will be used whenever a true mask variable is not detected
+       fxm: Optionally construct mask from missing values of var_rgr? */
     for(idx=0;idx<grd_sz_nbr;idx++) msk[idx]=1;
   }else{
     /* Change missing value mask points to 0 integer mask for SCRIP grids, which have no missing value convention
@@ -6471,7 +6812,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       break;
     case NC_DOUBLE:
       if(has_mss_val_msk){
-	const float mss_val_dbl=mss_val_msk_dbl;
+	const double mss_val_dbl=mss_val_msk_dbl;
 	for(idx=0;idx<grd_sz_nbr;idx++)
 	  if(msk_unn.dp[idx] == mss_val_dbl) msk[idx]=0; else msk[idx]=msk_unn.dp[idx];
       }else{
@@ -6480,7 +6821,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       break;
     case NC_INT:
       if(has_mss_val_msk){
-	const float mss_val_int=mss_val_msk_dbl;
+	const int mss_val_int=mss_val_msk_dbl;
 	for(idx=0;idx<grd_sz_nbr;idx++)
 	  if(msk_unn.ip[idx] == mss_val_int) msk[idx]=0; else msk[idx]=msk_unn.ip[idx];
       }else{
@@ -6489,7 +6830,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
       break;
     case NC_SHORT:
       if(has_mss_val_msk){
-	const float mss_val_sht=mss_val_msk_dbl;
+	const short mss_val_sht=mss_val_msk_dbl;
 	for(idx=0;idx<grd_sz_nbr;idx++)
 	  if(msk_unn.sp[idx] == mss_val_sht) msk[idx]=0; else msk[idx]=msk_unn.sp[idx];
       }else{
@@ -6558,7 +6899,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
     if(dfl_lvl > 0) (void)nco_def_var_deflate(out_id,grd_crn_lon_id,shuffle,deflate,dfl_lvl);
   } /* !flg_wrt_crn */
   
-  /* Define "units" attributes */
+  /* Define attributes */
   aed_sct aed_mtd;
   char *att_nm;
   char *att_val;
@@ -6686,11 +7027,9 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   dmn_srt[0]=0L;
   dmn_cnt[0]=grd_sz_nbr;
   rcd=nco_put_vara(out_id,area_id,dmn_srt,dmn_cnt,area,crd_typ);
-  if(msk_id != NC_MIN_INT){
-    dmn_srt[0]=0L;
-    dmn_cnt[0]=grd_sz_nbr;
-    rcd=nco_put_vara(out_id,msk_id,dmn_srt,dmn_cnt,msk,(nc_type)NC_INT);
-  } /* !msk */
+  dmn_srt[0]=0L;
+  dmn_cnt[0]=grd_sz_nbr;
+  rcd=nco_put_vara(out_id,msk_id,dmn_srt,dmn_cnt,msk,(nc_type)NC_INT);
   dmn_srt[0]=0L;
   dmn_cnt[0]=grd_sz_nbr;
   rcd=nco_put_vara(out_id,grd_ctr_lat_id,dmn_srt,dmn_cnt,grd_ctr_lat,crd_typ);
@@ -6711,6 +7050,791 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
   /* Close output file and move it from temporary to permanent location */
   (void)nco_fl_out_cls(fl_out,fl_out_tmp,out_id);
   
+  fl_out=rgr->fl_ugrid;
+  if(fl_out){
+    /* Test UGRID:
+       Documentation: https://github.com/ugrid-conventions/ugrid-conventions
+       Procedure: Create 1x1 skeleton file, infer UGRID and SCRIP grids from it
+       ncks -O -D 1 --rgr grd_ttl='Equiangular grid 180x360' --rgr skl=${HOME}/skl_180x360.nc --rgr grid=${HOME}/grd_180x360_SCRIP.nc --rgr latlon=180,360#lat_typ=eqa#lon_typ=Grn_ctr ~/nco/data/in.nc ~/foo.nc
+       ncks -O -D 1 --rgr nfr=y --rgr ugrid=${HOME}/grd_ugrid.nc --rgr grid=${HOME}/grd_scrip.nc ~/skl_180x360.nc ~/foo.nc
+       ncks --cdl -v mesh_node_y ~/grd_ugrid.nc
+       ncks --cdl -v mesh_face_nodes,mesh_face_x,mesh_face_y -d nFaces,0 ~/grd_ugrid.nc
+       ncks --cdl -v mesh_edge_nodes,mesh_edge_x,mesh_edge_y -d nEdges,0 ~/grd_ugrid.nc
+       ncks --cdl -v grid_center_lat,grid_corner_lat -d grid_size,0,,360 -d grid_corners,0,3 ~/grd_scrip.nc
+       ncks --cdl -m -M ~/grd_ugrid.nc */
+
+    char *dgx_nm=NULL_CEWI; /* [sng] Name of edge_coordinates x variable */
+    char *dgy_nm=NULL_CEWI; /* [sng] Name of edge_coordinates y variable */
+    char *dg_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as edges */
+    char *dg_nd_nm=NULL_CEWI; /* [sng] Name of edge_node_connectivity variable */
+    char *fcx_nm=NULL_CEWI; /* [sng] Name of face_coordinates x variable */
+    char *fcy_nm=NULL_CEWI; /* [sng] Name of face_coordinates y variable */
+    char *fc_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as faces */
+    char *fc_nd_nm=NULL_CEWI; /* [sng] Name of face_node_connectivity variable */
+    char *msh_nm=NULL_CEWI; /* [sng] Name of mesh topology variable */
+    char *nd_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as nodes */
+    char *ndx_nm=NULL_CEWI; /* [sng] Name of node_coordinates x variable */
+    char *ndy_nm=NULL_CEWI; /* [sng] Name of node_coordinates y variable */
+    char *npe_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as nodes-per-edge */
+    char *npf_dmn_nm=NULL_CEWI; /* [sng] Name of dimension to recognize as nodes-per-face */
+    
+    double *dgx=NULL_CEWI; /* [dgr] Characteristic longitude of edges */
+    double *dgy=NULL_CEWI; /* [dgr] Characteristic latitude  of edges */
+    double *fcx=NULL_CEWI; /* [dgr] Characteristic longitude of faces */
+    double *fcy=NULL_CEWI; /* [dgr] Characteristic latitude  of faces */
+    double *ndx=NULL_CEWI; /* [dgr] Longitude of nodes */
+    double *ndy=NULL_CEWI; /* [dgr] Latitude  of nodes */
+
+    int *dg_nd; /* [idx] edge_node_connectivity variable */
+    int *fc_nd; /* [idx] face_node_connectivity variable */
+
+    int dg_nd_id=NC_MIN_INT; /* [id] edge_node_connectivity variable ID */
+    int dgx_id=NC_MIN_INT; /* [id] Characteristic longitude of edges variable ID */
+    int dgy_id=NC_MIN_INT; /* [id] Characteristic latitude  of edges variable ID */
+    int dmn_id_dg=NC_MIN_INT; /* [id] Dimension ID for edges */
+    int dmn_id_fc=NC_MIN_INT; /* [id] Dimension ID for faces */
+    int dmn_id_nd=NC_MIN_INT; /* [id] Dimension ID for nodes */
+    int dmn_id_npe=NC_MIN_INT; /* [id] Dimension ID for nodes-per-edge */
+    int dmn_id_npf=NC_MIN_INT; /* [id] Dimension ID for nodes-per-face */
+    int fc_nd_id=NC_MIN_INT; /* [id] face_node_connectivity variable ID */
+    int fcx_id=NC_MIN_INT; /* [id] Characteristic longitude of faces variable ID */
+    int fcy_id=NC_MIN_INT; /* [id] Characteristic latitude  of faces variable ID */
+    int msh_id=NC_MIN_INT; /* [id] Mesh topology variable ID */
+    int msh_val=42; /* [id] Mesh topology variable value from Monty Python */
+    int ndx_id=NC_MIN_INT; /* [id] Longitude of mesh nodes variable ID */
+    int ndy_id=NC_MIN_INT; /* [id] Latitude  of mesh nodes variable ID */
+    
+    const long fc_nbr=grd_sz_nbr; /* [nbr] Number of faces in mesh */
+    const long npe_nbr=2; /* [nbr] Number of nodes per edge */
+    const long npf_nbr=grd_crn_nbr; /* [nbr] Number of nodes per face */
+
+    long dg_idx; /* [idx] Counting index for edges */
+    long dg_nbr=NC_MIN_INT64; /* [nbr] Number of edges in mesh */
+    long fc_idx; /* [idx] Counting index for faces */
+    long nd_idx; /* [idx] Counting index for nodes */
+    long nd_nbr=NC_MIN_INT64; /* [nbr] Number of nodes in mesh */
+    long srt_idx=0; /* [idx] start_index (C/Fortran) for edge_nodes, face_nodes */
+
+    if(!dgx_nm) dgx_nm=(char *)strdup("mesh_edge_x");
+    if(!dgy_nm) dgy_nm=(char *)strdup("mesh_edge_y");
+    if(!dg_dmn_nm) dg_dmn_nm=(char *)strdup("nEdges");
+    if(!fcx_nm) fcx_nm=(char *)strdup("mesh_face_x");
+    if(!fcy_nm) fcy_nm=(char *)strdup("mesh_face_y");
+    if(!fc_dmn_nm) fc_dmn_nm=(char *)strdup("nFaces");
+    if(!dg_nd_nm) dg_nd_nm=(char *)strdup("mesh_edge_nodes");
+    if(!fc_nd_nm) fc_nd_nm=(char *)strdup("mesh_face_nodes");
+    if(!msh_nm) msh_nm=(char *)strdup("mesh");
+    if(!nd_dmn_nm) nd_dmn_nm=(char *)strdup("nNodes");
+    if(!ndx_nm) ndx_nm=(char *)strdup("mesh_node_x");
+    if(!ndy_nm) ndy_nm=(char *)strdup("mesh_node_y");
+    if(!npe_dmn_nm) npe_dmn_nm=(char *)strdup("two");
+    if(!npf_dmn_nm) npf_dmn_nm=(char *)strdup("maxNodesPerFace");
+
+    if(flg_grd_1D){
+      (void)fprintf(stdout,"%s: ERROR %s UGRID output does not yet support 1D grids\n",nco_prg_nm_get(),fnc_nm);
+      nco_exit(EXIT_FAILURE);
+    }else if(flg_grd_2D){
+      /* Assume 2D grids are global and comprised of quadrilaterals */
+      switch(lat_typ){
+      case nco_grd_lat_fv:
+	/* Currently all 2D grids are converted to the same UGRID representation 
+	   fxm: Cap grids (e.g., FV) should eventually be written with a real cap,
+	   rather than as the "polar teeth" representation currently used.
+	   Polar teeth convention allows cap grid to be represented as rectangular on disk
+	   However, cap grids are better suited to non-rectangular UGRID meshes */
+      case nco_grd_lat_eqa:
+      case nco_grd_lat_gss:
+	/* Numbers of unique edges and nodes counted from South Pole (SP) to North Pole (NP) */
+	dg_nbr=lon_nbr*2+ /* SP: cells_per_lat*unique_edges_per_cell */
+	  (lat_nbr-2)*lon_nbr*2+ /* Mid: lats*cells_per_lat*unique_edges_per_cell */
+	  lon_nbr*1; /* NP: cells_per_lat*unique_edges_per_cell */
+	nd_nbr=1+lon_nbr*1+ /* SP: SP+cells_per_lat*unique_nodes_per_cell */
+	  (lat_nbr-2)*lon_nbr*1+ /* Mid: lats*cells_per_lat*unique_nodes_per_cell */
+	  1; /* NP: NP */
+	break;
+      case nco_grd_lat_unk:
+      case nco_grd_lat_nil:
+      default:
+	nco_dfl_case_generic_err(); break;
+      } /* !lat_typ */
+    }else if(flg_grd_crv){
+      (void)fprintf(stdout,"%s: ERROR %s UGRID output does not yet support curvilinear grids\n",nco_prg_nm_get(),fnc_nm);
+      nco_exit(EXIT_FAILURE);
+    } /* !flg_grd */
+    
+    dg_nd=(int *)nco_malloc(dg_nbr*npe_nbr*nco_typ_lng(NC_INT));
+    dgx=(double *)nco_malloc(dg_nbr*nco_typ_lng(crd_typ));
+    dgy=(double *)nco_malloc(dg_nbr*nco_typ_lng(crd_typ));
+    fc_nd=(int *)nco_malloc(fc_nbr*npf_nbr*nco_typ_lng(NC_INT));
+    fcx=(double *)nco_malloc(fc_nbr*nco_typ_lng(crd_typ));
+    fcy=(double *)nco_malloc(fc_nbr*nco_typ_lng(crd_typ));
+    ndx=(double *)nco_malloc(nd_nbr*nco_typ_lng(crd_typ));
+    ndy=(double *)nco_malloc(nd_nbr*nco_typ_lng(crd_typ));
+
+    const long int idx_fst_crn_ll=0;
+    const long int idx_fst_crn_lr=1;
+    const long int idx_fst_crn_ur=2;
+    const long int idx_fst_crn_ul=3;
+
+    /* Node Ordering:
+       Each interior face requires one new node
+       Node 0 at SP
+       New latitude row moves next node North
+       Add nodes to run West->East */
+    /* SP */
+    ndx[0]=lon_crn[0]; /* Longitude degenerate at SP, NP, keep same longitude as corner array */
+    ndy[0]=lat_crn[0];
+    /* Mid */
+    for(nd_idx=1;nd_idx<nd_nbr-1L;nd_idx++){
+      fc_idx=nd_idx-1L;
+      lat_idx=fc_idx/lon_nbr;
+      lon_idx=fc_idx%lon_nbr;
+      ndx[nd_idx]=lon_crn[lon_idx*grd_crn_nbr+idx_fst_crn_ul];
+      ndy[nd_idx]=lat_crn[lat_idx*grd_crn_nbr+idx_fst_crn_ul];
+    } /* !nd_idx */
+    /* NP */
+    ndx[nd_nbr-1L]=lon_crn[(lon_nbr-1)*grd_crn_nbr+idx_fst_crn_ul];
+    ndy[nd_nbr-1L]=lat_crn[(lat_nbr-1)*grd_crn_nbr+idx_fst_crn_ul];
+
+    /* Edge Ordering:
+       epf_nbr is number of distinct edges-per-face (incremental, for interior cells)
+       Each additional interior rectangular gridcell requires two new edges:
+       Edge 0 runs South->North for all cells
+       Edge 1 runs West->East for all cells
+       NP row requires only one new edge per face */
+    /* SP */
+    const int epf_nbr=2; /* [nbr] Number of distinct edges-per-face (incremental, for interior cells) */
+    for(fc_idx=0;fc_idx<lon_nbr;fc_idx++){
+      dg_idx=fc_idx*epf_nbr;
+      /* Edge 0 */
+      dg_nd[(dg_idx+0L)*npe_nbr+0L]=srt_idx;
+      dg_nd[(dg_idx+0L)*npe_nbr+1L]=srt_idx+fc_idx+1L;
+      /* Edge 1 */
+      dg_nd[(dg_idx+1L)*npe_nbr+0L]=srt_idx+fc_idx+1L;
+      dg_nd[(dg_idx+1L)*npe_nbr+1L]=srt_idx+fc_idx+2L;
+    } /* !fc_idx */
+    /* Mid */
+    for(fc_idx=lon_nbr;fc_idx<(lat_nbr-1L)*lon_nbr;fc_idx++){
+      dg_idx=fc_idx*epf_nbr;
+      /* Edge 0 */
+      dg_nd[(dg_idx+0L)*npe_nbr+0L]=srt_idx+fc_idx-lon_nbr+1L;
+      dg_nd[(dg_idx+0L)*npe_nbr+1L]=srt_idx+fc_idx+1L;
+      /* Edge 1 */
+      dg_nd[(dg_idx+1L)*npe_nbr+0L]=srt_idx+fc_idx+1L;
+      dg_nd[(dg_idx+1L)*npe_nbr+1L]=srt_idx+fc_idx+2L;
+    } /* !fc_idx */
+    /* NP */
+    for(fc_idx=fc_nbr-lon_nbr;fc_idx<fc_nbr;fc_idx++){
+      /* Only one new edge per face in last row, easiest to count backwards from last edge */
+      dg_idx=dg_nbr-(fc_nbr-fc_idx);
+      /* NP faces require only only one new edge, Edge 0 */
+      dg_nd[(dg_idx+0L)*npe_nbr+0L]=srt_idx+fc_idx-lon_nbr+1L;
+      dg_nd[(dg_idx+0L)*npe_nbr+1L]=srt_idx+nd_nbr-1L;
+    } /* !fc_idx */
+
+    /* SP */
+    for(fc_idx=0;fc_idx<lon_nbr;fc_idx++){
+      fc_nd[fc_idx*npf_nbr+0L]=srt_idx+0L;
+      fc_nd[fc_idx*npf_nbr+1L]=srt_idx+fc_idx+2L; /* NB: CCW */
+      fc_nd[fc_idx*npf_nbr+2L]=srt_idx+fc_idx+1L; /* NB: CCW */
+      fc_nd[fc_idx*npf_nbr+3L]=mss_val_int_out;
+    } /* !fc_idx */
+    /* Mid */
+    for(fc_idx=lon_nbr;fc_idx<fc_nbr-lon_nbr;fc_idx++){
+      fc_nd[fc_idx*npf_nbr+idx_fst_crn_ll]=srt_idx+fc_idx-lon_nbr+1L;
+      fc_nd[fc_idx*npf_nbr+idx_fst_crn_lr]=srt_idx+fc_idx-lon_nbr+2L;
+      fc_nd[fc_idx*npf_nbr+idx_fst_crn_ur]=srt_idx+fc_idx+2L;
+      fc_nd[fc_idx*npf_nbr+idx_fst_crn_ul]=srt_idx+fc_idx+1L;
+    } /* !fc_idx */
+    /* NP */
+    for(fc_idx=fc_nbr-lon_nbr;fc_idx<fc_nbr;fc_idx++){
+      fc_nd[fc_idx*npf_nbr+0L]=srt_idx+nd_nbr-(fc_nbr-fc_idx)-2L;
+      fc_nd[fc_idx*npf_nbr+1L]=srt_idx+nd_nbr-(fc_nbr-fc_idx)-1L;
+      fc_nd[fc_idx*npf_nbr+2L]=srt_idx+nd_nbr-1L;
+      fc_nd[fc_idx*npf_nbr+3L]=mss_val_int_out;
+    } /* !fc_idx */
+
+    /* Characteristic coordinates */
+    for(dg_idx=0;dg_idx<dg_nbr-1L;dg_idx++){
+      idx=dg_idx*npe_nbr;
+      dgx[dg_idx]=0.5*(ndx[dg_nd[idx+0L]]+ndx[dg_nd[idx+1L]]);
+      dgy[dg_idx]=0.5*(ndy[dg_nd[idx+0L]]+ndy[dg_nd[idx+1L]]);
+    } /* !dg_idx */
+    /* Degenerate longitude at SP, NP, causes weird characterisic longitude unless special care taken */
+    for(fc_idx=0;fc_idx<fc_nbr-1L;fc_idx++){
+      idx=fc_idx*npf_nbr;
+      if(fc_idx < lon_nbr){
+	fcx[fc_idx]=0.5*(ndx[fc_nd[idx+1]]+ndx[fc_nd[idx+2]]);
+      }else if(fc_idx >= fc_nbr-lon_nbr-1){
+	fcx[fc_idx]=0.5*(ndx[fc_nd[idx+0]]+ndx[fc_nd[idx+1]]);
+      }else if(fc_nd[idx+3] != mss_val_int_out){
+	/* fxm for fcx use nco_lon_crn_avg_brnch() and 3-node version too */
+	fcx[fc_idx]=0.25*(ndx[fc_nd[idx+0]]+ndx[fc_nd[idx+1]]+ndx[fc_nd[idx+2]]+ndx[fc_nd[idx+3]]);
+      }else{
+	abort();
+      } /* !fc_idx */
+      if(fc_nd[idx+3] != mss_val_int_out) fcy[fc_idx]=0.25*(ndy[fc_nd[idx+0]]+ndy[fc_nd[idx+1]]+ndy[fc_nd[idx+2]]+ndy[fc_nd[idx+3]]); else fcy[fc_idx]=0.33*(ndy[fc_nd[idx+0]]+ndy[fc_nd[idx+1]]+ndy[fc_nd[idx+2]]);
+    } /* !fc_idx */
+
+    fl_out_tmp=nco_fl_out_open(fl_out,&FORCE_APPEND,FORCE_OVERWRITE,fl_out_fmt,&bfr_sz_hnt,RAM_CREATE,RAM_OPEN,WRT_TMP_FL,&out_id);
+
+    rcd=nco_def_dim(out_id,dg_dmn_nm,dg_nbr,&dmn_id_dg);
+    rcd=nco_def_dim(out_id,fc_dmn_nm,fc_nbr,&dmn_id_fc);
+    rcd=nco_def_dim(out_id,nd_dmn_nm,nd_nbr,&dmn_id_nd);
+    rcd=nco_def_dim(out_id,npe_dmn_nm,npe_nbr,&dmn_id_npe);
+    rcd=nco_def_dim(out_id,npf_dmn_nm,npf_nbr,&dmn_id_npf);
+
+    dmn_ids[0]=dmn_id_dg;
+    dmn_ids[1]=dmn_id_npe;
+    rcd=nco_def_var(out_id,dg_nd_nm,(nc_type)NC_INT,dmn_nbr_2D,dmn_ids,&dg_nd_id);
+    dmn_ids[0]=dmn_id_fc;
+    dmn_ids[1]=dmn_id_npf;
+    rcd=nco_def_var(out_id,fc_nd_nm,(nc_type)NC_INT,dmn_nbr_2D,dmn_ids,&fc_nd_id);
+    rcd=nco_def_var(out_id,msh_nm,(nc_type)NC_INT,dmn_nbr_0D,(int *)NULL,&msh_id);
+    rcd=nco_def_var(out_id,ndx_nm,crd_typ,dmn_nbr_1D,&dmn_id_nd,&ndx_id);
+    rcd=nco_def_var(out_id,ndy_nm,crd_typ,dmn_nbr_1D,&dmn_id_nd,&ndy_id);
+    rcd=nco_def_var(out_id,dgx_nm,crd_typ,dmn_nbr_1D,&dmn_id_dg,&dgx_id);
+    rcd=nco_def_var(out_id,dgy_nm,crd_typ,dmn_nbr_1D,&dmn_id_dg,&dgy_id);
+    rcd=nco_def_var(out_id,fcx_nm,crd_typ,dmn_nbr_1D,&dmn_id_fc,&fcx_id);
+    rcd=nco_def_var(out_id,fcy_nm,crd_typ,dmn_nbr_1D,&dmn_id_fc,&fcy_id);
+
+    att_nm=strdup("Conventions");
+    att_val=strdup("CF-1.6, UGRID-1.0");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=NULL;
+    aed_mtd.id=NC_GLOBAL;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,NC_GLOBAL,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    (void)nco_hst_att_cat(out_id,rgr->cmd_ln);
+    (void)nco_vrs_att_cat(out_id);
+
+    att_nm=strdup("cf_role");
+    att_val=strdup("mesh_topology");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("mesh_topology");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Topology data");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("topology_dimension");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=1;
+    aed_mtd.type=NC_INT;
+    aed_mtd.val.ip=&val_two;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+
+    att_nm=strdup("node_coordinates");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.sz=strlen(ndx_nm)+strlen(ndy_nm)+1L;
+    att_val=(char *)nco_malloc((aed_mtd.sz+1L)*nco_typ_lng(aed_mtd.type));
+    (void)sprintf(att_val,"%s %s",ndx_nm,ndy_nm);
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("face_node_connectivity");
+    att_val=strdup(fc_nd_nm);
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("face_coordinates");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.sz=strlen(fcx_nm)+strlen(fcy_nm)+1L;
+    att_val=(char *)nco_malloc((aed_mtd.sz+1L)*nco_typ_lng(aed_mtd.type));
+    (void)sprintf(att_val,"%s %s",fcx_nm,fcy_nm);
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("face_dimension");
+    att_val=strdup(fc_dmn_nm);
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("edge_node_connectivity");
+    att_val=strdup(dg_nd_nm);
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("edge_coordinates");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.sz=strlen(dgx_nm)+strlen(dgy_nm)+1L;
+    att_val=(char *)nco_malloc((aed_mtd.sz+1L)*nco_typ_lng(aed_mtd.type));
+    (void)sprintf(att_val,"%s %s",dgx_nm,dgy_nm);
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("edge_dimension");
+    att_val=strdup(dg_dmn_nm);
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=msh_nm;
+    aed_mtd.id=msh_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,msh_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("longitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=ndx_nm;
+    aed_mtd.id=ndx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,ndx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Longitude of mesh nodes");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=ndx_nm;
+    aed_mtd.id=ndx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,ndx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("units");
+    att_val=strdup("degrees_east");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=ndx_nm;
+    aed_mtd.id=ndx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,ndx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("latitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=ndy_nm;
+    aed_mtd.id=ndy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,ndy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Latitude of mesh nodes");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=ndy_nm;
+    aed_mtd.id=ndy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,ndy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("units");
+    att_val=strdup("degrees_north");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=ndy_nm;
+    aed_mtd.id=ndy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,ndy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("cf_role");
+    att_val=strdup("edge_node_connectivity");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dg_nd_nm;
+    aed_mtd.id=dg_nd_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dg_nd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Maps every edge to the two nodes that it connects");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dg_nd_nm;
+    aed_mtd.id=dg_nd_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dg_nd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("start_index");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dg_nd_nm;
+    aed_mtd.id=dg_nd_id;
+    aed_mtd.sz=1;
+    aed_mtd.type=NC_INT;
+    aed_mtd.val.ip=&val_zero;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dg_nd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+
+    att_nm=strdup("cf_role");
+    att_val=strdup("face_node_connectivity");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fc_nd_nm;
+    aed_mtd.id=fc_nd_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fc_nd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Maps every face to its corner nodes");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fc_nd_nm;
+    aed_mtd.id=fc_nd_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fc_nd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("start_index");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fc_nd_nm;
+    aed_mtd.id=fc_nd_id;
+    aed_mtd.sz=1;
+    aed_mtd.type=NC_INT;
+    aed_mtd.val.ip=&val_zero;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fc_nd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+
+    att_nm=strdup("_FillValue");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fc_nd_nm;
+    aed_mtd.id=fc_nd_id;
+    aed_mtd.sz=1;
+    aed_mtd.type=NC_INT;
+    aed_mtd.val.ip=&mss_val_int_out;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fc_nd_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("longitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dgx_nm;
+    aed_mtd.id=dgx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dgx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Characteristic longitude of 2D mesh face");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dgx_nm;
+    aed_mtd.id=dgx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dgx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("units");
+    att_val=strdup("degrees_east");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dgx_nm;
+    aed_mtd.id=dgx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dgx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("latitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dgy_nm;
+    aed_mtd.id=dgy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dgy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Characteristic latitude of 2D mesh face");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dgy_nm;
+    aed_mtd.id=dgy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dgy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("units");
+    att_val=strdup("degrees_north");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=dgy_nm;
+    aed_mtd.id=dgy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,dgy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("longitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fcx_nm;
+    aed_mtd.id=fcx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fcx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Characteristic longitude of 2D mesh edge");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fcx_nm;
+    aed_mtd.id=fcx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fcx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("units");
+    att_val=strdup("degrees_east");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fcx_nm;
+    aed_mtd.id=fcx_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fcx_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("standard_name");
+    att_val=strdup("latitude");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fcy_nm;
+    aed_mtd.id=fcy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fcy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("long_name");
+    att_val=strdup("Characteristic latitude of 2D mesh edge");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fcy_nm;
+    aed_mtd.id=fcy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fcy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    att_nm=strdup("units");
+    att_val=strdup("degrees_north");
+    aed_mtd.att_nm=att_nm;
+    aed_mtd.var_nm=fcy_nm;
+    aed_mtd.id=fcy_id;
+    aed_mtd.sz=strlen(att_val);
+    aed_mtd.type=NC_CHAR;
+    aed_mtd.val.cp=att_val;
+    aed_mtd.mode=aed_create;
+    (void)nco_aed_prc(out_id,fcy_id,aed_mtd);
+    if(att_nm) att_nm=(char *)nco_free(att_nm);
+    if(att_val) att_val=(char *)nco_free(att_val);
+
+    /* Begin data mode */
+    (void)nco_enddef(out_id);
+
+    (void)nco_put_vara(out_id,msh_id,dmn_srt,dmn_cnt,&msh_val,(nc_type)NC_INT);
+    dmn_srt[0]=dmn_srt[1]=0L;
+    dmn_cnt[0]=dg_nbr;
+    dmn_cnt[1]=epf_nbr;
+    (void)nco_put_vara(out_id,dg_nd_id,dmn_srt,dmn_cnt,dg_nd,(nc_type)NC_INT);
+    dmn_srt[0]=dmn_srt[1]=0L;
+    dmn_cnt[0]=fc_nbr;
+    dmn_cnt[1]=npf_nbr;
+    (void)nco_put_vara(out_id,fc_nd_id,dmn_srt,dmn_cnt,fc_nd,(nc_type)NC_INT);
+    dmn_srt[0]=0L;
+    dmn_cnt[0]=nd_nbr;
+    (void)nco_put_vara(out_id,ndx_id,dmn_srt,dmn_cnt,ndx,crd_typ);
+    dmn_srt[0]=0L;
+    dmn_cnt[0]=nd_nbr;
+    (void)nco_put_vara(out_id,ndy_id,dmn_srt,dmn_cnt,ndy,crd_typ);
+    dmn_srt[0]=0L;
+    dmn_cnt[0]=dg_nbr;
+    (void)nco_put_vara(out_id,dgx_id,dmn_srt,dmn_cnt,dgx,crd_typ);
+    (void)nco_put_vara(out_id,dgy_id,dmn_srt,dmn_cnt,dgy,crd_typ);
+    dmn_srt[0]=0L;
+    dmn_cnt[0]=fc_nbr;
+    (void)nco_put_vara(out_id,fcx_id,dmn_srt,dmn_cnt,fcx,crd_typ);
+    (void)nco_put_vara(out_id,fcy_id,dmn_srt,dmn_cnt,fcy,crd_typ);
+
+    /* Close output file and move it from temporary to permanent location */
+    (void)nco_fl_out_cls(fl_out,fl_out_tmp,out_id);
+    (void)fprintf(stdout,"%s: DBG %s ending UGRID section\n",nco_prg_nm_get(),fnc_nm);
+
+    /* Free memory associated with output file */
+    if(dgx) dgx=(double *)nco_free(dgx);
+    if(dgy) dgy=(double *)nco_free(dgy);
+    if(dg_nd) dg_nd=(int *)nco_free(dg_nd);
+    if(fcx) fcx=(double *)nco_free(fcx);
+    if(fcy) fcy=(double *)nco_free(fcy);
+    if(fc_nd) fc_nd=(int *)nco_free(fc_nd);
+    if(ndx) ndx=(double *)nco_free(ndx);
+    if(ndy) ndy=(double *)nco_free(ndy);
+
+    /* Free strings */
+    if(dgx_nm) dgx_nm=(char *)nco_free(dgx_nm);
+    if(dgy_nm) dgy_nm=(char *)nco_free(dgy_nm);
+    if(dg_dmn_nm) dg_dmn_nm=(char *)nco_free(dg_dmn_nm);
+    if(dg_nd_nm) dg_nd_nm=(char *)nco_free(dg_nd_nm);
+    if(fcx_nm) fcx_nm=(char *)nco_free(fcx_nm);
+    if(fcy_nm) fcy_nm=(char *)nco_free(fcy_nm);
+    if(fc_dmn_nm) fc_dmn_nm=(char *)nco_free(fc_dmn_nm);
+    if(fc_nd_nm) fc_nd_nm=(char *)nco_free(fc_nd_nm);
+    if(msh_nm) msh_nm=(char *)nco_free(msh_nm);
+    if(nd_dmn_nm) nd_dmn_nm=(char *)nco_free(nd_dmn_nm);
+    if(ndx_nm) ndx_nm=(char *)nco_free(ndx_nm);
+    if(ndy_nm) ndy_nm=(char *)nco_free(ndy_nm);
+    if(npe_dmn_nm) npe_dmn_nm=(char *)nco_free(npe_dmn_nm);
+    if(npf_dmn_nm) npf_dmn_nm=(char *)nco_free(npf_dmn_nm);
+  } /* !fl_ugrid */
+  
   /* Free memory associated with input file */
   if(dmn_sz_int) dmn_sz_int=(int *)nco_free(dmn_sz_int);
   if(msk) msk=(int *)nco_free(msk);
diff --git a/src/nco/nco_scm.c b/src/nco/nco_scm.c
index c087020..c63feed 100644
--- a/src/nco/nco_scm.c
+++ b/src/nco/nco_scm.c
@@ -168,10 +168,21 @@ nco_vrs_prn /* [fnc] Print NCO version */
   const char date_cpp[]=__DATE__; /* [sng] Date from C pre-processor */
   const char time_cpp[]=__TIME__; /* [sng] Time from C pre-processor */
   /*  const char time_cpp[]=__TIME__; *//* [sng] Time from C pre-processor */
-  const char vrs_cpp[]=TKN2SNG(NCO_VERSION); /* [sng] Version from C pre-processor */
   const char hst_cpp[]=TKN2SNG(HOSTNAME); /* [sng] Hostname from C pre-processor */
   const char usr_cpp[]=TKN2SNG(USER); /* [sng] Hostname from C pre-processor */
 
+  char vrs_cpp[]=TKN2SNG(NCO_VERSION); /* [sng] Version from C pre-processor */
+
+  /* 20170417: vrs_cpp is typically something like "4.6.6-alpha08" (quotes included) 
+     The quotation marks annyoy me yet are necessary to protect the string in nco.h 
+     Here we remove the quotation marks by pointing past the first and putting NUL in the last */
+  char *vrs_sng; /* [sng] NCO version */
+  vrs_sng=vrs_cpp;
+  if(vrs_cpp[0L] == '"'){
+    vrs_cpp[strlen(vrs_cpp)-1L]='\0';
+    vrs_sng=vrs_cpp+1L;
+  } /* endif */
+
   if(strlen(CVS_Id) > strlen("*Id*")){
     /* CVS_Id is defined */
     date_cvs_lng=10;
@@ -195,17 +206,17 @@ nco_vrs_prn /* [fnc] Print NCO version */
   } /* endif */
 
   if(strlen(CVS_Id) > strlen("*Id*")){
-    (void)fprintf(stderr,"NCO netCDF Operators version %s last modified %s built %s on %s by %s\n",vrs_cpp,date_cvs,date_cpp,hst_cpp,usr_cpp);
+    (void)fprintf(stderr,"NCO netCDF Operators version %s last modified %s built %s on %s by %s\n",vrs_sng,date_cvs,date_cpp,hst_cpp,usr_cpp);
   }else{
     /* 20141008: Try new nco.h-based versioning */
-    /*    (void)fprintf(stderr,"NCO netCDF Operators version %s built %s on %s by %s\n",vrs_cpp,date_cpp,hst_cpp,usr_cpp);*/
-    (void)fprintf(stderr,"NCO netCDF Operators version %s built by %s on %s at %s %s\n",vrs_cpp,usr_cpp,hst_cpp,date_cpp,time_cpp);
+    /*    (void)fprintf(stderr,"NCO netCDF Operators version %s built %s on %s by %s\n",vrs_sng,date_cpp,hst_cpp,usr_cpp);*/
+    (void)fprintf(stderr,"NCO netCDF Operators version %s built by %s on %s at %s %s\n",vrs_sng,usr_cpp,hst_cpp,date_cpp,time_cpp);
   } /* endif */
   if(strlen(CVS_Id) > strlen("*Id*")){
     vrs_cvs=cvs_vrs_prs();
     (void)fprintf(stderr,"%s version %s\n",nco_prg_nm_get(),vrs_cvs);
   }else{
-    (void)fprintf(stderr,"%s version %s\n",nco_prg_nm_get(),vrs_cpp);
+    (void)fprintf(stderr,"%s version %s\n",nco_prg_nm_get(),vrs_sng);
   } /* endif */
 
   if(date_cvs) date_cvs=(char *)nco_free(date_cvs);
diff --git a/src/nco/nco_var_lst.c b/src/nco/nco_var_lst.c
index 20c9d16..15828f1 100644
--- a/src/nco/nco_var_lst.c
+++ b/src/nco/nco_var_lst.c
@@ -1076,7 +1076,7 @@ nco_var_lst_dvd /* [fnc] Divide input lists into output lists */
       (void)fprintf(stdout,"%s: HINT Extraction list must contain at least one record variable that is not NC_CHAR or NC_STRING. A record variable is a variable defined with a record dimension. Often the record dimension, aka unlimited dimension, refers to time. To change an existing dimension from a fixed to a record dimensions see http://nco.sf.net/nco.html#mk_rec_dmn or to add a new record dimension to all variables see http://nco.sf.net/nco.html#ncecat_rnm\n",nco_prg_nm_get());
       break;
     case ncrcat:
-      (void)fprintf(stdout,"%s: HINT Extraction list must contain a record variable which to concatenate. A record variable is a variable defined with a record dimension. Often the record dimension, aka unlimited dimension, refers to time. To change an existing dimension from a fixed to a record dimensions see http://nco.sf.net/nco.html#mk_rec_dmn or to add a new record dimension to all variables see http://nco.sf.net/nco.html#ncecat_rnm\n",nco_prg_nm_get());
+      (void)fprintf(stdout,"%s: HINT Extraction list must contain a record variable to concatenate. A record variable is a variable defined with a record dimension. Often the record dimension, aka unlimited dimension, refers to time. To change an existing dimension from a fixed to a record dimensions see http://nco.sf.net/nco.html#mk_rec_dmn or to add a new record dimension to all variables see http://nco.sf.net/nco.html#ncecat_rnm\n",nco_prg_nm_get());
       break;
     case ncwa:
       (void)fprintf(stdout,"%s: HINT Extraction list must contain a non-character variable with a dimension to be averaged\n",nco_prg_nm_get());
diff --git a/src/nco/nco_var_utl.c b/src/nco/nco_var_utl.c
index 7c6bcc0..8e06318 100644
--- a/src/nco/nco_var_utl.c
+++ b/src/nco/nco_var_utl.c
@@ -1386,9 +1386,10 @@ nco_var_val_cpy /* [fnc] Copy variables data from input to output file */
 
 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 */
+(const int nc_id,    /* I [id] netCDF file ID */
+ const char *const cf_nm, /* I [sng] cf att name */
+ const int var_trg_id,  /* I [id] CF Variable ID */
+ int *cf_var_id) /* O [id] CF Variable ID */
 {
   /* Purpose: Is variable specified in an associated attribute?
      Associated attributes include "ancillary_variables", "bounds", "climatology", "coordinates", "grid_mapping"
@@ -1454,17 +1455,115 @@ nco_is_spc_in_cf_att /* [fnc] Variable is listed in this CF attribute, thereby a
           /* 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);
+
+        if(idx_cf!=nbr_cf){
+           IS_SPC_IN_CF_ATT = True;
+           if(cf_var_id) *cf_var_id=var_id;
+           goto end_lbl; /* break out of all loops */
+        }
       } /* !coordinates */
     } /* end loop over attributes */
   } /* end loop over idx_var */
 
+  end_lbl: ;
+
   return IS_SPC_IN_CF_ATT; /* [flg] Variable is listed in this CF attribute */
 } /* end nco_is_spc_in_cf_att() */
 
+
+char ***  /* [0] [ptr]  list of lists - each ragged array terminated with empty string    */
+nco_lst_cf_att /* [fnc] look in all vars for att cf_nm  */
+(const int nc_id,    /* I [id] netCDF file ID */
+ const char *const cf_nm,  /* I [sng] cf att name */
+ int *nbr_lst) /* 0 [nbr] number of ragged arrays returned */
+{
+  /* 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() */
+
+  const char dlm_sng[]=" "; /* [sng] Delimiter string */
+  const char fnc_nm[]="nco_lst_cf_att()"; /* [sng] Function name */
+  char **cf_lst; /* [sng] 1D array of list elements */
+  char **int_lst=NULL_CEWI; /* store pointer to ragged array */
+  char *att_val;
+  char ***ra_lst=NULL_CEWI; /* array of ragged array */
+  char att_nm[NC_MAX_NAME];
+  char var_nm[NC_MAX_NAME];
+  int idx;
+  int jdx;
+  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;
+
+  *nbr_lst=0;
+  rcd+=nco_inq_nvars(nc_id,&nbr_var);
+
+  /* This assumption, praise the Lord, is valid in netCDF2, netCDF3, and netCDF4 */
+  for(var_id=0; var_id<nbr_var;var_id++){
+
+    nco_inq_varname(nc_id,var_id,var_nm);
+
+    /* Find number of attributes */
+    rcd+=nco_inq_varnatts(nc_id,var_id,&nbr_att);
+    for(idx=0;idx<nbr_att;idx++){
+      rcd+=nco_inq_attname(nc_id,var_id,idx,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) continue;
+
+        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);
+
+
+        int_lst=(char**)nco_malloc( (nbr_cf+3) * sizeof(char*)  );
+        int_lst[0]=strdup(var_nm);
+        int_lst[1]=strdup(cf_nm);
+
+        for(jdx=0;jdx<nbr_cf;jdx++)
+          int_lst[jdx+2]=strdup(cf_lst[jdx]);
+
+        /* very important - ragged array is terminated by an empty string */
+        int_lst[nbr_cf+2]=strdup("");
+
+        /* add ragged array to list */
+        ra_lst=(char***)nco_realloc( ra_lst, sizeof(char**)*(*nbr_lst+1) );
+        ra_lst[*nbr_lst]=int_lst;
+        ++*nbr_lst;
+
+        att_val=(char *)nco_free(att_val);
+        cf_lst=nco_sng_lst_free(cf_lst,nbr_cf);
+        // cf_lst=nco_free(cf_lst);
+        int_lst=(char**)NULL_CEWI;
+
+      }
+    } /* end loop over attributes */
+  } /* end loop over var_id */
+
+
+  return ra_lst;
+} /* end nco_lst_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 */
@@ -1999,10 +2098,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_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;
+  if(nco_is_spc_in_cf_att(var->nc_id, "bounds", var->id, NULL)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id, "climatology", var->id, NULL)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id, "coordinates", var->id, NULL)) var->is_crd_var=True;
+  if(nco_is_spc_in_cf_att(var->nc_id, "grid_mapping", var->id, NULL)) 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 ff366fb..53314ca 100644
--- a/src/nco/nco_var_utl.h
+++ b/src/nco/nco_var_utl.h
@@ -118,12 +118,19 @@ extern "C" {
   nco_var_lst_free /* [fnc] Free memory associated with variable structure list */
   (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 */
+  (const int nc_id,    /* I [id] netCDF file ID */
+   const char *const cf_nm,  /* I [sng] cf att name */
+   const int var_trg_id, /* I [id] Variable ID */
+   int *cf_var_id); /* I [id] Variable ID */
+
+  char ***  /* [0] [ptr]  list of lists - each ragged array terminated with empty string    */
+  nco_lst_cf_att /* [fnc] look in all vars for att cf_nm  */
+  (const int nc_id,    /* I [id] netCDF file ID */
+  const char *const cf_nm,  /* I [sng] cf att name */
+  int *nbr_lst); /* 0 [nbr] number of ragged arrays returned */
 
   nco_bool /* [flg] Variable is listed in a "bounds" attribute */
   nco_is_spc_in_bnd_att /* [fnc] Variable is listed in a "bounds" attribute */
diff --git a/src/nco/ncra.c b/src/nco/ncra.c
index 6d2e30c..17d0e6e 100644
--- a/src/nco/ncra.c
+++ b/src/nco/ncra.c
@@ -103,6 +103,12 @@
 #include "nco.h" /* netCDF Operator (NCO) definitions */
 #include "libnco.h" /* netCDF Operator (NCO) library */
 
+
+/* forward declaration */
+nco_bool ra_lst_chk(char ***ra_lst, int nbr_lst, char *var_nm, char *bnds_nm);
+void ra_lst_free(char ***ra_lst, int nbr_lst);
+
+
 /* Define inline'd functions in header so source is visible to calling files
    C99 only: Declare prototype in exactly one header
    http://www.drdobbs.com/the-new-c-inline-functions/184401540 */
@@ -1190,6 +1196,11 @@ main(int argc,char **argv)
 
       /* Loop over number of different record dimensions in file */
       for(idx_rec=0;idx_rec<nbr_rec;idx_rec++){
+        char *fl_udu_sng=NULL_CEWI;
+        char ***ra_bnds_lst=NULL_CEWI;
+        char ***ra_climo_lst=NULL_CEWI;
+        int ra_bnds_nbr=0;
+        int ra_climo_nbr=0;
 
         /* Obtain group ID */
         (void)nco_inq_grp_full_ncid(in_id,lmt_rec[idx_rec]->grp_nm_fll,&grp_id);
@@ -1197,6 +1208,19 @@ main(int argc,char **argv)
         /* Fill record array */
         (void)nco_lmt_evl(grp_id,lmt_rec[idx_rec],rec_usd_cml[idx_rec],FORTRAN_IDX_CNV);
 
+        if(lmt_rec[idx_rec]->is_rec_dmn)
+        {
+          int mid=-1;
+
+          if(nco_inq_varid_flg(grp_id, lmt_rec[idx_rec]->nm, &mid)==NC_NOERR  && mid>=0) {
+            fl_udu_sng = nco_lmt_get_udu_att(grp_id, mid, "units"); /* Units attribute of coordinate variable */
+
+            ra_bnds_lst=nco_lst_cf_att(grp_id,"bounds",&ra_bnds_nbr);
+            ra_climo_lst=nco_lst_cf_att(grp_id,"climatology",&ra_climo_nbr);
+          }
+
+        }
+
         if(REC_APN){
           /* Append records directly to output file */
           int rec_dmn_out_id=NCO_REC_DMN_UNDEFINED;
@@ -1208,7 +1232,7 @@ main(int argc,char **argv)
           (void)nco_inq_dimlen(grp_out_id,rec_dmn_out_id,&idx_rec_out[idx_rec]);
         } /* !REC_APN */
 
-        if(nco_dbg_lvl_get() == nco_dbg_old) (void)fprintf(fp_stdout,"%s: DEBUG record %d id %d name %s rec_dmn_sz %ld\n",nco_prg_nm_get(),idx_rec,lmt_rec[idx_rec]->id,lmt_rec[idx_rec]->nm_fll,lmt_rec[idx_rec]->rec_dmn_sz);                    
+        if(nco_dbg_lvl_get() == nco_dbg_std)  (void)fprintf(fp_stdout,"%s: DEBUG record %d id %d name %s rec_dmn_sz %ld units=\"%s\"\n",nco_prg_nm_get(),idx_rec,lmt_rec[idx_rec]->id,lmt_rec[idx_rec]->nm_fll,lmt_rec[idx_rec]->rec_dmn_sz,fl_udu_sng);
         /* Two distinct ways to specify MRO are --mro and -d dmn,a,b,c,d,[m,M] */
         if(FLG_MRO) lmt_rec[idx_rec]->flg_mro=True;
         if(lmt_rec[idx_rec]->flg_mro) FLG_MRO=True;
@@ -1265,7 +1289,7 @@ main(int argc,char **argv)
           if(nco_dbg_lvl >= nco_dbg_scl) (void)fprintf(fp_stdout,"%s: INFO Record %ld of %s contributes to output record %ld\n",nco_prg_nm_get(),idx_rec_crr_in,fl_in,idx_rec_out[idx_rec]);
 
 #ifdef _OPENMP
-#pragma omp parallel for default(none) private(idx,in_id) shared(CNV_ARM,FLG_BFR_NRM,FLG_MRO,NORMALIZE_BY_WEIGHT,REC_FRS_GRP,REC_LST_DSR,base_time_crr,base_time_srt,fl_idx,fl_in,fl_nbr,fl_out,flg_skp1,flg_skp2,gpe,grp_id,grp_out_fll,grp_out_id,idx_rec,idx_rec_crr_in,idx_rec_out,in_id_arr,lmt_rec,md5,nbr_dmn_fl,nbr_rec,nbr_var_prc,nco_dbg_lvl,nco_op_typ,nco_prg_id,out_id,rcd,rec_usd_cml,trv_tbl,var_out_id,var_prc,var_prc_out,var_prc_typ_pre_prm,var_trv,wgt_arr,wgt_avg,wgt_avg_scl,wgt_nbr, [...]
+#pragma omp parallel for default(none) private(idx,in_id) shared(CNV_ARM,FLG_BFR_NRM,FLG_MRO,NORMALIZE_BY_WEIGHT,REC_FRS_GRP,REC_LST_DSR,base_time_crr,base_time_srt,fl_idx,fl_in,fl_nbr,fl_out,flg_skp1,flg_skp2,gpe,grp_id,grp_out_fll,grp_out_id,idx_rec,idx_rec_crr_in,idx_rec_out,in_id_arr,lmt_rec,md5,nbr_dmn_fl,nbr_rec,nbr_var_prc,nco_dbg_lvl,nco_op_typ,nco_prg_id,out_id,rcd,rec_usd_cml,trv_tbl,var_out_id,var_prc,var_prc_out,var_prc_typ_pre_prm,var_trv,wgt_arr,wgt_avg,wgt_avg_scl,wgt_nbr, [...]
 #endif /* !_OPENMP */
           for(idx=0;idx<nbr_var_prc;idx++){
 
@@ -1300,16 +1324,30 @@ 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(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))
+            /* if(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)) */
+
+            /*  This code rebases  the  coordinate var to the units of the coordinate var in the first input file */
+            /* if the record hyperslab indice(s) are double or strings then the coordinate var and limits are (re)read earlier by (void)nco_lmt_evl() */
+            /* so if the units between files are incompatible the ncra will bomb out in that call  and not in  nco_cln_clc_dbl_var_dff() below*/
+            if(var_prc[idx]->is_crd_var)
             {
-              char *fl_udu_sng=nco_lmt_get_udu_att(grp_id,var_prc[idx]->id,"units"); /* Units attribute of coordinate variable */ 
-              if(fl_udu_sng && lmt_rec[idx_rec]->rbs_sng)
-	      { 
-                if( nco_cln_clc_dbl_var_dff(fl_udu_sng,lmt_rec[idx_rec]->rbs_sng, lmt_rec[idx_rec]->lmt_cln, (double*)NULL, var_prc[idx]) !=NCO_NOERR)
-                    nco_exit(EXIT_FAILURE);     
-
-                nco_free(fl_udu_sng); 
-	      } /* end re-basing */
+              nco_bool do_rebase=False;
+
+              if( !strcmp(var_prc[idx]->nm, lmt_rec[idx_rec]->nm) ||
+                  ra_lst_chk( ra_bnds_lst,ra_bnds_nbr, lmt_rec[idx_rec]->nm, var_prc[idx]->nm ) ||
+                  ra_lst_chk( ra_climo_lst, ra_climo_nbr, lmt_rec[idx_rec]->nm, var_prc[idx]->nm   )
+              ) do_rebase=True;
+
+
+              //(void)fprintf(fp_stderr,"%s: converting variable \"%s\" from units \"%s\" to \" %s\"\n",nco_prg_nm_get(), var_prc[idx]->nm, fl_udu_sng, lmt_rec[idx_rec]->rbs_sng);
+
+              if(do_rebase && fl_udu_sng && lmt_rec[idx_rec]->rbs_sng) {
+                if( nco_cln_clc_dbl_var_dff(fl_udu_sng,lmt_rec[idx_rec]->rbs_sng, lmt_rec[idx_rec]->lmt_cln, (double*)NULL, var_prc[idx]) !=NCO_NOERR) {
+                  (void)fprintf(fp_stderr,"%s: problem converting variable \"%s\" from units \"%s\" to \" %s\"\n",nco_prg_nm_get(), var_prc[idx]->nm, fl_udu_sng, lmt_rec[idx_rec]->rbs_sng);
+                  nco_exit(EXIT_FAILURE);
+                }
+                //nco_free(fl_udu_sng);
+              } /* end re-basing */
             } 
               
             if(nco_prg_id == ncra){
@@ -1516,6 +1554,13 @@ main(int argc,char **argv)
           } /* end if */
         } /* end if */
 
+
+        if(fl_udu_sng) fl_udu_sng=(char*)nco_free(fl_udu_sng);
+
+        ra_lst_free(ra_bnds_lst, ra_bnds_nbr);
+        ra_lst_free(ra_climo_lst, ra_climo_nbr);
+
+
       } /* end idx_rec loop over different record variables to process */
 
       if(flg_cb && nco_prg_id == ncra){
@@ -1881,3 +1926,47 @@ main(int argc,char **argv)
   nco_exit_gracefully();
   return EXIT_SUCCESS;
 } /* end main() */
+
+
+/* remember ra_lst is a list of ragged arrays */
+/* the first element the is var_nm
+   the second element the cf_nm
+   the rest of the elements are the var names mentioned in attribute var_nm at cf_nm
+*/
+nco_bool
+ra_lst_chk(char ***ra_lst, int nbr_lst, char *var_nm, char *bnds_nm)
+{
+  int idx=0;
+  int jdx=0;
+
+  for( idx=0;idx<nbr_lst;idx++)
+    if(!strcmp(var_nm, ra_lst[idx][0]))
+      break;
+
+  if(idx==nbr_lst)
+      return False;
+
+  jdx=2;
+  while( strlen(ra_lst[idx][jdx])>0 )
+     if(!strcmp(ra_lst[idx][jdx++], bnds_nm ))
+       return True;
+
+  return False;
+
+}
+
+/* remember ra_lst is a list of ragged arrays */
+/* the end of the ragged array is indicated by a zero-length (not null) string */
+void ra_lst_free(char ***ra_lst, int nbr_lst){
+  int sz=1;
+  int fdx;
+    for (fdx = 0; fdx < nbr_lst; fdx++) {
+      while (strlen(ra_lst[fdx][sz]) > 0) sz++;
+      ra_lst[fdx] = nco_sng_lst_free(ra_lst[fdx], sz);
+    }
+}
+
+
+
+
+

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