[Git][debian-gis-team/nco][upstream] New upstream version 5.2.3

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Thu Apr 4 05:15:12 BST 2024



Bas Couwenberg pushed to branch upstream at Debian GIS Project / nco


Commits:
589b24be by Bas Couwenberg at 2024-04-04T05:46:50+02:00
New upstream version 5.2.3
- - - - -


28 changed files:

- bld/nco.spec
- bld/nco_dst.pl
- configure
- configure.ac
- configure.eg
- data/ncclimo
- data/ncremap
- debian/changelog
- doc/ANNOUNCE
- doc/ChangeLog
- doc/VERSION
- doc/debian.txt
- doc/index.shtml
- doc/nco.texi
- src/nco++/ncap2.cc
- src/nco/ncatted.c
- src/nco/ncecat.c
- src/nco/ncflint.c
- src/nco/ncks.c
- src/nco/nco.h
- src/nco/nco_mss_val.c
- src/nco/nco_netcdf.c
- src/nco/nco_rgr.c
- src/nco/nco_scm.c
- src/nco/ncpdq.c
- src/nco/ncra.c
- src/nco/ncrename.c
- src/nco/ncwa.c


Changes:

=====================================
bld/nco.spec
=====================================
@@ -2,17 +2,17 @@
 # http://cvs.fedoraproject.org/viewvc/devel/nco/nco.spec?view=co
 
 Name:           nco
-Version:        5.2.2
+Version:        5.2.3
 Release:        1%{?dist}
 Summary:        Programs that manipulate netCDF files
 Group:          Applications/Engineering
 License:        BSD
 URL:            http://nco.sf.net/
 
-# Obtain NCO version 5.2.2-1 tar.gz from Sourceforge using CVS:
+# Obtain NCO version 5.2.3-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-5.2.2-1 -d nco-%{version} nco
-# tar czf nco-%{version}.tar.gz --exclude='nco-5.2.2/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-5.2.3-1 -d nco-%{version} nco
+# tar czf nco-%{version}.tar.gz --exclude='nco-5.2.3/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
+* Wed Apr 03 2024 Charlie Zender <zender at uci.edu> - 5.2.3-1
+- new upstream 5.2.3
+
 * Fri Mar 22 2024 Charlie Zender <zender at uci.edu> - 5.2.2-1
 - new upstream 5.2.2
 


=====================================
bld/nco_dst.pl
=====================================
@@ -5,20 +5,20 @@
 
 # Usage:
 # Export tagged, public versions
-# /usr/bin/scp ${DATA}/nco-5.2.2.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
-
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-5.2.2 # Build, do not release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-5.2.2 # Build, release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-5.2.2 # Install, do not build
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-5.2.2 # Build and install
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-5.2.2
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-5.2.2
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-5.2.2
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-5.2.2
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-5.2.2
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-5.2.2
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-5.2.2
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-5.2.2
+# /usr/bin/scp ${DATA}/nco-5.2.3.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-5.2.3 # Build, do not release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-5.2.3 # Build, release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-5.2.3 # Install, do not build
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-5.2.3 # Build and install
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-5.2.3
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-5.2.3
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-5.2.3
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-5.2.3
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-5.2.3
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-5.2.3
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-5.2.3
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-5.2.3
 
 # 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-5.2.2/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-5.2.3/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


=====================================
configure
=====================================
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for NCO netCDF Operators 5.2.2.
+# Generated by GNU Autoconf 2.72 for NCO netCDF Operators 5.2.3.
 #
 # Report bugs to <nco-bugs at lists.sourceforge.net>.
 #
@@ -616,8 +616,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='NCO netCDF Operators'
 PACKAGE_TARNAME='nco'
-PACKAGE_VERSION='5.2.2'
-PACKAGE_STRING='NCO netCDF Operators 5.2.2'
+PACKAGE_VERSION='5.2.3'
+PACKAGE_STRING='NCO netCDF Operators 5.2.3'
 PACKAGE_BUGREPORT='nco-bugs at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1424,7 +1424,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 5.2.2 to adapt to many kinds of systems.
+'configure' configures NCO netCDF Operators 5.2.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1496,7 +1496,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of NCO netCDF Operators 5.2.2:";;
+     short | recursive ) echo "Configuration of NCO netCDF Operators 5.2.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1668,7 +1668,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-NCO netCDF Operators configure 5.2.2
+NCO netCDF Operators configure 5.2.3
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2447,7 +2447,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 5.2.2, which was
+It was created by NCO netCDF Operators $as_me 5.2.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -4366,7 +4366,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='nco'
- VERSION='5.2.2'
+ VERSION='5.2.3'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -22890,7 +22890,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 5.2.2, which was
+This file was extended by NCO netCDF Operators $as_me 5.2.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -22958,7 +22958,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-NCO netCDF Operators config.status 5.2.2
+NCO netCDF Operators config.status 5.2.3
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 


=====================================
configure.ac
=====================================
@@ -56,7 +56,7 @@
 # 20170808: Choose between traditional version and Git-based version
 # If Git, consider that Linux dynamic libraries will have full messy name, MacOS will not
 # https://stackoverflow.com/questions/43526939/how-to-insert-git-based-version-in-autoconf-managed-project
-AC_INIT([NCO netCDF Operators],[5.2.2],[nco-bugs at lists.sourceforge.net],[nco])
+AC_INIT([NCO netCDF Operators],[5.2.3],[nco-bugs at lists.sourceforge.net],[nco])
 
 # Print GNU copyright in configure script
 AC_COPYRIGHT


=====================================
configure.eg
=====================================
@@ -313,8 +313,8 @@ make install
 # Latest sysadmin-compiled module usage: 
 # Personal recipe last modified: 20231026 (Use ~/anaconda rather than E3SMU)
 # Personal recipe last borken: 20231026
-# Personal recipe last successful: 20240221
-# Current build error: 20231019 "configure: error: cannot find netCDF library"
+# Most recent build error: 20231019 "configure: error: cannot find netCDF library"
+# Personal recipe last successful: 20240328
 # NB: aims4 and acme1 only accept connections from whitelisted domains (e.g., uci.edu)
 cd ~/nco;/bin/rm -f *.foo;make distclean
 # NB: Necessary to explicitly specify NETCDF_BIN and NETCDF_LIB. NETCDF_ROOT may be borken.
@@ -395,7 +395,7 @@ cd ~/nco/bld;make ANTLR_ROOT=${HOME} GSL_ROOT='/glade/u/apps/ch/opt/gsl/2.4/gnu/
 # Latest ticket to build NCO: AREQ0215917 on 20180413
 # Latest sysadmin-compiled module usage: module load netcdf-c/4.7.4-a4uk6zy # gcc netCDF 4.7.4
 # Personal recipe last modified: 20231206 (define NETCDF_ROOT once, in configure.eg)
-# Personal recipe last borken: 20231103 (problem caused by -I/usr/include)
+# Personal recipe last borken: 2024326 "checking for netcdf.h... yes; checking for nc_open in -lnetcdf... no"
 # Personal recipe last successful: 20231206
 cd ~/nco;/bin/rm -f *.foo;make distclean
 # Default as of 20210924 is to build with Anaconda netCDF


=====================================
data/ncclimo
=====================================
@@ -598,8 +598,8 @@ yr_srt='1' # [yr] Start year
 function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_nm{} syntax
     # Print usage
     printf "${fnt_rvr}Basic usage:\n${fnt_nrm}${fnt_bld}${spt_nm} -c caseid -s yr_srt -e yr_end -i drc_in -o drc_out -r rgr_map${fnt_nrm} # Generate & regrid climatology\n"
-    printf "${fnt_bld}${spt_nm} -v var_lst -s yr_srt -e yr_end -o drc_out -r rgr_map in1.nc in2.nc ... inN.nc${fnt_nrm} # Split, reshape, & regrid timeseries\n"
-    printf "${fnt_bld}${spt_nm} --case=caseid --start=yr_srt --end=yr_end --input=drc_in --output=drc_out --map=rgr_map${fnt_nrm} # Long options\n\n"
+    printf "${fnt_bld}${spt_nm} --split -v var_lst -s yr_srt -e yr_end -o drc_out -r rgr_map in1.nc in2.nc ... inN.nc${fnt_nrm} # Split, reshape, & regrid timeseries\n"
+    printf "${fnt_bld}${spt_nm} --case=caseid --start=yr_srt --end=yr_end --input=drc_in --output=drc_out --map=rgr_map${fnt_nrm} # Long options (NB: '=' is REQUIRED)\n\n"
     echo "Command-line options [long-option synonyms in ${fnt_tlc}italics${fnt_nrm}]:"
     echo "${fnt_rvr}-3${fnt_nrm}          Output file format CLASSIC (netCDF3 classic CDF1) [${fnt_tlc}fl_fmt, file_format=classic${fnt_nrm}]"
     echo "${fnt_rvr}-4${fnt_nrm}          Output file format NETCDF4 (netCDF4 extended HDF5) [${fnt_tlc}fl_fmt, file_format=netcdf4${fnt_nrm}]"
@@ -622,7 +622,6 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     echo " ${fnt_bld}--fl_fmt${fnt_nrm}   File format (empty is inherited from input) (default ${fnt_bld}${fl_fmt}${fnt_nrm}) [${fnt_tlc}fl_fmt, fmt_out, file_format, format_out${fnt_nrm}]"
     echo "${fnt_rvr}-h${fnt_nrm} ${fnt_bld}hst_nm${fnt_nrm}   History volume name (default ${fnt_bld}${hst_nm}${fnt_nrm}) [${fnt_tlc}hst_nm, history_name, history${fnt_nrm}]"
     echo " ${fnt_bld}--hrd_pth${fnt_nrm}  Use CSZ's hard-coded paths on known machines (e.g., chrysalis, compy, perlmutter) NB: Must be first option! [${fnt_tlc}hrd_pth, hard_path, npo, nco_path_override${fnt_nrm}]"
-    echo " ${fnt_bld}--hrz_dmn${fnt_nrm}  Horizontal dimension name(s) (default ${fnt_bld}${hrz_dmn}${fnt_nrm}) [${fnt_tlc}hrz_dmn, dmn_hrz, hrz_dmn_nm, horizontal_dimension${fnt_nrm}]"
     echo "${fnt_rvr}-i${fnt_nrm} ${fnt_bld}drc_in${fnt_nrm}   Input directory (default ${fnt_bld}${drc_in}${fnt_nrm}) [${fnt_tlc}drc_in, in_drc, dir_in, in_dir, input${fnt_nrm}]"
     echo "${fnt_rvr}-j${fnt_nrm} ${fnt_bld}job_nbr${fnt_nrm}  Job simultaneity for parallelism (default ${fnt_bld}${job_nbr}${fnt_nrm}) [${fnt_tlc}job_nbr, job_number, jobs${fnt_nrm}]"
     echo "${fnt_rvr}-L${fnt_nrm} ${fnt_bld}dfl_lvl${fnt_nrm}  Deflate level (empty is none) (default ${fnt_bld}${dfl_lvl}${fnt_nrm}) [${fnt_tlc}dfl_lvl, dfl, deflate${fnt_nrm}]"
@@ -775,7 +774,6 @@ while getopts :34567a:C:c:d:E:e:f:h:i:j:L:l:m:n:O:o:P:p:R:r:S:s:t:v:X:x:Y:y:-: O
 	       fl_fmt=?* | fmt_out=?* | file_format=?* | format_out=?* ) fl_fmt="${LONG_OPTARG}" ;; # # Output file format
 	       hrd_pth | hard_path | npo | nco_path_override | NCO_PATH_OVERRIDE ) hrd_pth='Yes' ;; # # Use hard-coded paths on known machines (intentional no-op because already handled prior to getopt())
 	       hrd_pth=?* | hard_path=?* | npo=?* | nco_path_override=?* | NCO_PATH_OVERRIDE=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Use hard-coded paths on known machines
-	       hrz_dmn=?* | hrz_dmn_nm=?* | dmn_hrz=?* | horizontal_dimension=?* ) hrz_dmn="${LONG_OPTARG}" ;; # # Horizontal dimension name(s)
 	       job_nbr=?* | job_number=?* | jobs=?* ) job_usr="${LONG_OPTARG}" ;; # -j # Job simultaneity
 	       lnk_flg=?* | link_flag=?* ) lnk_flg="${LONG_OPTARG}" ;; # -l # Link E3SM to AMWG name
 	       amwg_link | amwg_links | AMWG_link | AMWG_links ) lnk_flg='Yes' ;; # # Link E3SM to AMWG name
@@ -1467,9 +1465,10 @@ if [ ${inp_std} = 'Yes' ]; then
 fi # !inp_std
 
 # Prepend drc_in to fl_in in MFOs (ncra, ncrcat)
+# 20240401 Also prepend drc_in to fl_in in SFOs (ncks, ncap2) used in hfc/hfs modes and in rgn_avg
+# Otherwise operators will fail to find input files when cwd != drc_in
 ppn_opt="-p ${drc_in}"
 # 20220111 If input files include absolute path, then use fl_in as-is later on
-# 20220130 fl_in is defined here only for inp_[std,cmd,glb], do not test iff inp_aut
 if [ "${fl_in[0]}" ]; then
     if [ "$(basename ${fl_in[0]})" != "${fl_in[0]}" ] || [ "${fl_in[0]:0:1}" = '/' ]; then
 	ppn_opt=''
@@ -1481,14 +1480,14 @@ if [ ${clm_md} = 'hfc' ] || [ ${clm_md} = 'hfs' ]; then
 	# User requested high-frequency mode and did not specify tpd so (try to) infer it
 	# Examine bounds of second timestep in case first timestep is instantaneous (e.g., restart values)
 	tm_var='time'
-	tm_bnds=`ncks --trd -M -m -v ${tm_var} ${fl_in[0]} | grep -E -i "^${tm_var} attribute [0-9]+: bounds" | cut -f 11- -d ' ' | sed 's/^ *//g'`
+	tm_bnds=`ncks --trd -M -m -v ${tm_var} ${ppn_opt} ${fl_in[0]} | grep -E -i "^${tm_var} attribute [0-9]+: bounds" | cut -f 11- -d ' ' | sed 's/^ *//g'`
 	# 20201220: Using %g not %f in format results in tpd=10 not tpd=8 for 3-hourly EAM data!
 	# 20210815: Prefer to hyperslab second time index since some files contain an "instantaneous" (i.e., zero-duration) first timestep.
 	# However this presumes file has multiple timesteps---fails with monthly data
 	# 20210902: Use first time index if file has only one timestep
-	tm_nbr=`ncks --trd -M ${fl_in[0]} | grep -E -i "^Root record dimension 0:" | cut -f 10- -d ' '`
+	tm_nbr=`ncks --trd -M ${ppn_opt} ${fl_in[0]} | grep -E -i "^Root record dimension 0:" | cut -f 10- -d ' '`
 	[ "${tm_nbr}" -gt 1 ] 2>/dev/null && tm_idx='1' || tm_idx='0'
-	tpd_out=`ncks --trd -H -s '%25.15f ' -v ${tm_bnds} -d ${tm_var},${tm_idx} -C ${fl_in[0]} | awk '{ print 1.0/($2-$1); exit }'`
+	tpd_out=`ncks --trd -H -s '%25.15f ' -v ${tm_bnds} -d ${tm_var},${tm_idx} -C ${ppn_opt} ${fl_in[0]} | awk '{ print 1.0/($2-$1); exit }'`
 	# Ensure result is positive integer
 	[ "${tpd_out}" -ge 0 ] 2>/dev/null && tpd_ntg='Yes' || tpd_ntg='No'
 	if [ "${tpd_ntg}" != 'Yes' ]; then
@@ -1506,12 +1505,12 @@ if [ "${tms_flg}" = 'Yes' ]; then
     # Only necessary in subset mode to extract distinct timeseries
     # https://stackoverflow.com/questions/26621736/how-to-check-if-a-string-contains-a-special-character
     if [ -n "${var_lst}" ] && [[ "${var_lst}" == *[\^\$\+\?\.\&\(\)\[\]\{\}\|]* ]]; then
-	var_lst=`ncks -C -v ${var_lst} --lst_xtr ${fl_in[0]}`
+	var_lst=`ncks -C -v ${var_lst} --lst_xtr ${ppn_opt} ${fl_in[0]}`
     fi # !var_lst
     
     if [ -z "${var_lst}" ]; then
 	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"
-	var_lst=`ncks --lst_rnk_ge2 ${fl_in[0]}`
+	var_lst=`ncks --lst_rnk_ge2 ${ppn_opt} ${fl_in[0]}`
     fi # !var_lst
     # http://stackoverflow.com/questions/27702452/loop-through-a-comma-separated-shell-variable
     var_nbr=0 # [sng] Split (subset into timeseries) files
@@ -1525,7 +1524,7 @@ if [ "${tms_flg}" = 'Yes' ]; then
 	job_nbr=${var_nbr}
     fi # !job_usr
 
-    # Input files per year
+# Input files per year
     flg_dct='Yes' # [flg] Double-check time in years against file count
     if [ "${clm_md}" = 'ann' ]; then
 	fpy=1
@@ -1546,8 +1545,8 @@ if [ "${tms_flg}" = 'Yes' ]; then
 	    # Solution: Base dpf on second file, not first file, if it exists
 	    fl_idx=$((fl_nbr > 1 ? 1 : 0))
 	    tm_var='time'
-	    tm_bnds=`ncks --trd -M -m -v ${tm_var} ${fl_in[${fl_idx}]} | grep -E -i "^${tm_var} attribute [0-9]+: bounds" | cut -f 11- -d ' ' | sed 's/^ *//g'`
-	    dpf=`ncks --trd -H -s '%25.15f ' -v ${tm_bnds} -d ${tm_var},0 -d ${tm_var},-1 -C ${fl_in[${fl_idx}]} | awk '{ print $4-$1; exit }'`
+	    tm_bnds=`ncks --trd -M -m -v ${tm_var} ${ppn_opt} ${fl_in[${fl_idx}]} | grep -E -i "^${tm_var} attribute [0-9]+: bounds" | cut -f 11- -d ' ' | sed 's/^ *//g'`
+	    dpf=`ncks --trd -H -s '%25.15f ' -v ${tm_bnds} -d ${tm_var},0 -d ${tm_var},-1 -C ${ppn_opt} ${fl_in[${fl_idx}]} | awk '{ print $4-$1; exit }'`
 	    # Ensure result is positive integer
 	    [ "${dpf}" -ge 0 ] 2>/dev/null && dpf_ntg='Yes' || dpf_ntg='No'
 	    if [ "${dpf_ntg}" != 'Yes' ]; then
@@ -1617,6 +1616,32 @@ if [ "${tms_flg}" = 'Yes' ]; then
     fi  # !mth_flg
     let sgm_nbrm1=${sgm_nbr}-1
 
+    if [ "${rgn_avg}" = 'Yes' ]; then 
+
+	# 20191217 Regional average timeseries require area and latitude variables
+	var_xtr="${var_xtr},${area_nm},${lat_nm}"
+
+	if [ "${prc_typ}" = 'clm' ] || [ "${prc_typ}" = 'elm' ]; then 
+	    sgs_frc='landfrac'
+	fi # !prc_typ
+	if [ -n "${sgs_frc}" ]; then
+	    area_wgt="${area_nm}*${sgs_frc}"
+	    var_xtr="${var_xtr},${sgs_frc}"
+	else
+	    area_wgt="${area_nm}"
+	fi # !sgs_frc
+
+	# 20240329 Simplify life by automatically determining hrz_dmn from area_nm in first file
+	# Works for EAM, ELM, unstructured, structured, ...
+	# https://unix.stackexchange.com/questions/108250/print-the-string-between-two-parentheses
+	#hrz_dmn=`ncks -C -m -v ${area_nm} ${ppn_opt} ${fl_in[0]} | grep "${area_nm}\(" | sed 's/^.*(//;s/) ;$//'` # Works at prompt, not in script
+	hrz_dmn=`ncks -C -m -v ${area_nm} ${ppn_opt} ${fl_in[0]} | grep -E "float.*${area_nm}|double.*${area_nm}" | sed 's/^.*(//;s/) ;$//'`
+	if [ -n "${hrz_dmn}" ]; then
+	    # 20240329 Prepend string literal '$' to each horizontal dimension for use in argument to ncap2 avg() function  (e.g., 'lat,lon' -> '$lat,$lon')
+	    hrz_arg="\$${hrz_dmn/,/,\$}"
+	fi # !hrz_dmn
+    fi # !rgn_avg
+
 else # !tms_flg
 
     if [ "${rgn_avg}" = 'Yes' ]; then 
@@ -1932,6 +1957,8 @@ fi # !clm_md !bnr_flg
 
 # Print initial state
 if [ ${dbg_lvl} -ge 2 ]; then
+    printf "dbg: area_nm  = ${area_nm}\n"
+    printf "dbg: area_wgt = ${area_wgt}\n"
     printf "dbg: bnr_flg  = ${bnr_flg}\n"
     printf "dbg: bs_nm    = ${bs_nm}\n"
     printf "dbg: bs_sfx   = ${bs_sfx}\n"
@@ -1962,6 +1989,7 @@ if [ ${dbg_lvl} -ge 2 ]; then
     printf "dbg: gaa_sng  = ${gaa_sng}\n"
     printf "dbg: hdr_pad  = ${hdr_pad}\n"
     printf "dbg: hrd_pth  = ${hrd_pth}\n"
+    printf "dbg: hrz_arg  = ${hrz_arg}\n"
     printf "dbg: hrz_dmn  = ${hrz_dmn}\n"
     printf "dbg: hst_nm   = ${hst_nm}\n"
     printf "dbg: inp_aut  = ${inp_aut}\n"
@@ -1999,7 +2027,9 @@ if [ ${dbg_lvl} -ge 2 ]; then
     printf "dbg: tpd_out  = ${tpd_out}\n"
     printf "dbg: uio_flg  = ${uio_flg}\n"
     printf "dbg: var_lst  = ${var_lst}\n"
+    printf "dbg: var_xtr  = ${var_xtr}\n"
     printf "dbg: vrt_out  = ${vrt_out}\n"
+    printf "dbg: vrt_xtr  = ${vrt_xtr}\n"
     printf "dbg: wnt_md   = ${wnt_md}\n"
     printf "dbg: xcl_flg  = ${xcl_flg}\n"
     printf "dbg: xtn_flg  = ${xtn_flg}\n"
@@ -2119,7 +2149,11 @@ if [ "${tms_flg}" = 'Yes' ]; then
     elif [ ${clm_md} = 'mth' ]; then 
 	printf "Each input file assumed to contain statistics for one month\n"
     fi # !mth
-    printf "Native-grid split files to directory ${drc_out}\n"
+    if [ "${rgn_avg}" = 'Yes' ]; then 
+	printf "Hemispherically and globally averaged timeseries files saved to directory ${drc_out}\n"
+    else
+	printf "Native-grid timeseries files saved to directory ${drc_out}\n"
+    fi # !rgn_avg
     if [ -n "${rgr_opt}" ]; then 
 	printf "Regridded split files to directory ${drc_rgr}\n"
 	if [ "${thr_nbr}" -ne 1 ]; then 
@@ -2300,7 +2334,7 @@ if [ "${clm_flg}" = 'Yes' ] && [ "${clm_hfc_or_mth}" = 'Yes' ]; then
 	    if [ "${fl_nbr}" -eq 1 ]; then
 		# Compute interleaved mean of single-file input (e.g., CMIP timeseries format)
 		#cmd_clm[${clm_idx}]="${cmd_mpi[${clm_idx}]} ncra -O ${nco_opt} ${gaa_sng} -d time,${tm_srt},${tm_end},${srd},${ssc},${tpd_out} ${fl_in} ${fl_out[${clm_idx}]}"
-		tm_nbr=`ncks --trd -M ${fl_in} | grep -E -i "^Root record dimension 0:" | cut -f 10- -d ' '`
+		tm_nbr=`ncks --trd -M ${ppn_opt} ${fl_in} | grep -E -i "^Root record dimension 0:" | cut -f 10- -d ' '`
 		let ssc2=${tm_nbr}*${tpd_out}/${srd}
 		# Ensure result is positive integer
 		[ "${ssc2}" -ge 0 ] 2>/dev/null && ssc2_ntg='Yes' || ssc2_ntg='No'
@@ -2520,20 +2554,6 @@ fi # !clm_md
 # Block 1 Loop N: Split
 if [ "${tms_flg}" = 'Yes' ]; then
 
-    if [ "${rgn_avg}" = 'Yes' ]; then 
-	
-	# 20191217 Regional average timeseries require area and latitude variables
-	var_xtr="${var_xtr},${area_nm},${lat_nm}"
-
-	if [ -n "${sgs_frc}" ]; then
-	    area_wgt="${area_nm}*${sgs_frc}"
-	    var_xtr="${var_xtr},${sgs_frc}"
-	else
-	    area_wgt="${area_nm}"
-	fi # !sgs_frc
-
-    fi # !rgn_avg
-	
     # Populate input file arguments fl_sgm with all files necessary to bracket each segment
     for ((sgm_idx=0;sgm_idx<sgm_nbr;sgm_idx++)); do
 	fl_sgm[${sgm_idx}]=''
@@ -2793,7 +2813,7 @@ if [ "${tms_flg}" = 'Yes' ]; then
 	    
 	    if [ "${rgn_avg}" = 'Yes' ]; then 
 		for ((var_idx=var_idx_srt;var_idx<=var_idx_end;var_idx++)); do
-		    cmd_rgn="*rgn_nbr=3;defdim(\"rgn\",rgn_nbr);*${var_sbs[${var_idx}]}_tmp=0.0f*${var_sbs[${var_idx}]}.avg(\$${hrz_dmn});*${var_sbs[${var_idx}]}_rgn[time,rgn]=${var_sbs[${var_idx}]}_tmp;${var_sbs[${var_idx}]}_rgn at coordinates=\"region_name\";*${lat_nm}_area=${lat_nm}+0.0*${area_nm};*msk_sth=0*${lat_nm}_area.int();*msk_nrt=0*${lat_nm}_area.int();*idx_glb=0;*idx_nrt=1;*idx_sth=2;*rgn_len=19;defdim(\"rgn_len\",rgn_len);region_name[rgn,rgn_len]=\" \";region_name(idx_glb,0:5)=\"Global\";region_name(idx_nrt,:)=\"Northern Hemisphere\";region_name(idx_sth,:)=\"Southern Hemisphere\";region_name at long_name=\"${var_sbs[${var_idx}]} timeseries array contains area-weighted averages over these regions\";where(${lat_nm}_area < 0.0) msk_sth=1; elsewhere msk_nrt=1;${var_sbs[${var_idx}]}_rgn(:,idx_nrt)=((${var_sbs[${var_idx}]}*${area_wgt}*msk_nrt).avg(\$${hrz_dmn})/(${area_wgt}*msk_nrt).avg(\$${hrz_dmn})).float();${var_sbs[${var_idx}]}_rgn(:,idx_sth)=((${var_sbs[${var_idx}]}*${area_wgt}*msk_sth).avg(\$${hrz_dmn})/(${area_wgt}*msk_sth).avg(\$${hrz_dmn})).float();${var_sbs[${var_idx}]}_rgn(:,idx_glb)=((${var_sbs[${var_idx}]}*${area_wgt}).avg(\$${hrz_dmn})/${area_wgt}.avg(\$${hrz_dmn})).float();${var_sbs[${var_idx}]}=${var_sbs[${var_idx}]}_rgn;push(&${var_sbs[${var_idx}]}@cell_methods,\" area: mean\");if(exists(time_bnds)) time_bnds=time_bnds;if(exists(time_bounds)) time_bounds=time_bounds;"
+		    cmd_rgn="*rgn_nbr=3;defdim(\"rgn\",rgn_nbr);*${var_sbs[${var_idx}]}_tmp=0.0f*${var_sbs[${var_idx}]}.avg(${hrz_arg});*${var_sbs[${var_idx}]}_rgn[time,rgn]=${var_sbs[${var_idx}]}_tmp;${var_sbs[${var_idx}]}_rgn at coordinates=\"region_name\";*${lat_nm}_area=${lat_nm}+0.0*${area_nm};*msk_sth=0*${lat_nm}_area.int();delete_miss(msk_sth);*msk_nrt=0*${lat_nm}_area.int();delete_miss(msk_nrt);*idx_glb=0;*idx_nrt=1;*idx_sth=2;*rgn_len=19;defdim(\"rgn_len\",rgn_len);region_name[rgn,rgn_len]=\" \";region_name(idx_glb,0:5)=\"Global\";region_name(idx_nrt,:)=\"Northern Hemisphere\";region_name(idx_sth,:)=\"Southern Hemisphere\";region_name at long_name=\"${var_sbs[${var_idx}]} timeseries array contains area-weighted averages over these regions\";${var_sbs[${var_idx}]}_rgn(:,idx_glb)=((${var_sbs[${var_idx}]}*${area_wgt}).avg(${hrz_arg})/(${area_wgt}).avg(${hrz_arg})).float();where(${lat_nm}_area < 0.0) msk_sth=1; elsewhere msk_nrt=1;${var_sbs[${var_idx}]}_rgn(:,idx_nrt)=((${var_sbs[${var_idx}]}*${area_wgt}*msk_nrt).avg(${hrz_arg})/(${area_wgt}*msk_nrt).avg(${hrz_arg})).float();${var_sbs[${var_idx}]}_rgn(:,idx_sth)=((${var_sbs[${var_idx}]}*${area_wgt}*msk_sth).avg(${hrz_arg})/(${area_wgt}*msk_sth).avg(${hrz_arg})).float();${var_sbs[${var_idx}]}=${var_sbs[${var_idx}]}_rgn;push(&${var_sbs[${var_idx}]}@cell_methods,\" area: mean\");if(exists(time_bnds)) time_bnds=time_bnds;if(exists(time_bounds)) time_bounds=time_bounds;"
 		    cmd_avg[${var_idx}]="${cmd_mpi[${var_idx}]} OMP_PROC_BIND=false ncap2 -O -v -s '${cmd_rgn}' ${fl_out[${var_idx}]} ${fl_out[${var_idx}]}"
 		    # 20220817: Prior to today, --glb_avg used ncwa for global average
 		    # As of NCO 5.1.1, --glb_avg is a deprecated synonym for --rgn_avg


=====================================
data/ncremap
=====================================
@@ -652,7 +652,7 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     printf "${fnt_rvr}Basic usage:\n"
     printf "${fnt_nrm} ${fnt_bld}${spt_nm} --map=map.nc in_fl out_fl${fnt_nrm} # Apply existing map from in->out\n"
     printf "${fnt_nrm} ${fnt_bld}${spt_nm} -d dst_fl in_fl out_fl${fnt_nrm} # Construct map in->dst, regrid to out\n"
-    printf "${fnt_nrm} ${fnt_bld}${spt_nm} --destination=dst_fl --input_file=in_fl --output_file=out_fl${fnt_nrm} # As above, with long options\n\n"
+    printf "${fnt_nrm} ${fnt_bld}${spt_nm} --destination=dst_fl --input_file=in_fl --output_file=out_fl${fnt_nrm} # Long options (NB: '='is REQUIRED)\n\n"
     echo "Command-line options [long-option synonyms in ${fnt_tlc}italics${fnt_nrm}]:"
     echo "${fnt_rvr}-3${fnt_nrm}          Output file format ${fmt_sng_nc3} [${fnt_tlc}fl_fmt, file_format=classic${fnt_nrm}]"
     echo "${fnt_rvr}-4${fnt_nrm}          Output file format ${fmt_sng_nc4} [${fnt_tlc}fl_fmt, file_format=netcdf4${fnt_nrm}]"
@@ -749,9 +749,9 @@ function fnc_usg_prn { # NB: dash supports fnc_nm (){} syntax, not function fnc_
     echo " ${fnt_bld}--version${fnt_nrm}  Version and configuration information [${fnt_tlc}version, vrs, config, configuration, cnf${fnt_nrm}]"
     echo " ${fnt_bld}--vrb_lvl${fnt_nrm}  Verbosity level (default ${fnt_bld}${vrb_lvl}${fnt_nrm}) [${fnt_tlc}vrb_lvl, vrb, verbosity, print_verbosity${fnt_nrm}]"
     echo " ${fnt_bld}--vrt_in${fnt_nrm}   Vertical grid file for input (empty means none) (default ${fnt_bld}${vrt_in}${fnt_nrm}) [${fnt_tlc}vrt_in, vrt_grd_in${fnt_nrm}]"
-    echo " ${fnt_bld}--vrt_nm${fnt_nrm}   Vertical coordinate name (empty means \"plev\") (default ${fnt_bld}${vrt_nm}${fnt_nrm}) [${fnt_tlc}vrt_nm, plev_nm, vertical_coordinate_name${fnt_nrm}]"
+    echo " ${fnt_bld}--vrt_nm${fnt_nrm}   Vertical coordinate name (empty means \"plev\") (default ${fnt_bld}${vrt_nm}${fnt_nrm}) [${fnt_tlc}vrt_nm, plev_nm, vrt_crd, vertical_coordinate_name${fnt_nrm}]"
     echo " ${fnt_bld}--vrt_ntp${fnt_nrm}  Vertical interpolation type (empty means none) (default ${fnt_bld}${vrt_ntp}${fnt_nrm}) [${fnt_tlc}vrt_ntp, ntp_mth, interpolation_type, interpolation_method${fnt_nrm}] (lin|log)"
-    echo " ${fnt_bld}--vrt_out${fnt_nrm}  Vertical grid file for output (empty means none) (default ${fnt_bld}${vrt_out}${fnt_nrm}) [${fnt_tlc}vrt_out, vrt_fl, vrt, vrt_crd, vrt_grd_out${fnt_nrm}]"
+    echo " ${fnt_bld}--vrt_out${fnt_nrm}  Vertical grid file for output (empty means none) (default ${fnt_bld}${vrt_out}${fnt_nrm}) [${fnt_tlc}vrt_out, vrt_fl, vrt, vrt_grd_out${fnt_nrm}]"
     echo " ${fnt_bld}--vrt_xtr${fnt_nrm}  Vertical extrapolation type (empty means none) (default ${fnt_bld}nrs_ngh${fnt_nrm}) [${fnt_tlc}vrt_xtr, xtr_mth, extrapolation_type, extrapolation_method${fnt_nrm}] (linear|mss_val|nrs_ngh|zero)"
     echo "${fnt_rvr}-W${fnt_nrm} ${fnt_bld}wgt_opt${fnt_nrm}  Weight-generator options (default ${fnt_bld}${wgt_opt_esmf}${fnt_nrm}) [${fnt_tlc}wgt_opt, esmf_opt, esmf_options, tempest_opt, tps_opt${fnt_nrm}]"
     echo "${fnt_rvr}-w${fnt_nrm} ${fnt_bld}wgt_cmd${fnt_nrm}  Weight-generator command (default ${fnt_bld}${wgt_exe_esmf}${fnt_nrm}) [${fnt_tlc}wgt_cmd, wgt_gnr, weight_command, weight_generator${fnt_nrm}]"
@@ -963,9 +963,9 @@ while getopts :34567a:CD:d:f:g:G:h:I:i:j:L:Mm:n:O:o:P:p:R:r:s:T:t:Uu:V:v:W:w:x:-
 	       version=?* | vrs=?* | config=?* | configuration=?* | cnf=?* ) echo "No argument allowed for --${OPTARG switch}" >&2; exit 1 ;; # # Print version information
 	       vrb_lvl=?* | vrb=?* | verbosity=?* | print_verbosity=?* ) vrb_lvl="${LONG_OPTARG}" ;; # # Print verbosity
 	       vrt_in=?* | vrt_grd_in=?* ) vrt_in="${LONG_OPTARG}" ;; # # Vertical grid file for input
-	       vrt_nm=?* | plev_nm=?* | vertical_coordinate_name=?* ) vrt_nm="${LONG_OPTARG}" ;; # # Vertical coordinate name
+	       vrt_nm=?* | plev_nm=?* | vrt_crd=?* | vertical_coordinate_name=?* ) vrt_nm="${LONG_OPTARG}" ;; # # Vertical coordinate name
 	       vrt_ntp=?* | ntp_mth=?* | interpolation_type=?* | interpolation_method=?* ) vrt_ntp="${LONG_OPTARG}" ;; # # Vertical interpolation type (lin|log)
-	       vrt_out=?* | vrt_fl=?* | vrt=?* | vrt_crd=?* | vrt_grd_out=?* ) vrt_out="${LONG_OPTARG}" ;; # # Vertical grid file for output
+	       vrt_out=?* | vrt_fl=?* | vrt=?* | vrt_grd_out=?* ) vrt_out="${LONG_OPTARG}" ;; # # Vertical grid file for output
 	       vrt_xtr=?* | xtr_mth=?* | extrapolation_type=?* | extrapolation_method=?* ) vrt_xtr="${LONG_OPTARG}" ;; # # Vertical extrapolation type (linear|mss_val|nrs_ngh|zero)
 	       wgt_opt=?* | esmf_opt=?* | esmf_options=?* | tps_opt=?* | tempest_opt=?* | tempest_options=?* ) wgt_opt_usr="${LONG_OPTARG}" ;; # -W # Weight-generator options
 	       wgt_cmd=?* | weight_command=?* | wgt_gnr=?* | weight_generator=?* ) wgt_usr="${LONG_OPTARG}" ;; # -w # Weight-generator command
@@ -1316,7 +1316,7 @@ elif [ ${alg_typ} = 'fv2fv_flx' ] || [ ${alg_typ} = 'traave' ] || [ ${alg_typ} =
     wgt_opt_tps='--in_type fv --in_np 1 --out_type fv --out_np 1'
     alg_opt='fv2fv_flx'
     wgt_typ='tempest'
-elif [ ${alg_typ} = 'trfv2' ] || [ ${alg_typ} = 'trfvnp2' ] || [ ${alg_typ} = '' ]; then # alg_sng='trfv2'
+elif [ ${alg_typ} = 'trfv2' ] || [ ${alg_typ} = 'trfvnp2' ]; then # alg_sng='trfv2'
     cnv_opt_src="-B"
     cnv_opt_dst="-B"
     # 20231129: E3SMv3 recommended for fluxes when source grid resolution uniformly is _not_ >> target grid resolution (e.g., ne30pg2->r05), i.e., coarse->fine


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+nco (5.2.3-1) unstable; urgency=low
+
+  * new upstream version Cowboy Carter: all: mss_val wrn; ncclimo: rgn_avg fix elm, hrz_dmn, hrz_arg, area_wgt, ppn_opt; ncremap: upd doc
+
+ -- Charlie Zender <zender at uci.edu> Wed, 03 Apr 2024 12:26:10 -0700
+
 nco (5.2.2-1) unstable; urgency=low
 
   * new upstream version Bambino: ncchecker; ncclimo: elm rgn_avg time_bounds; ncremap: xcl level, mbtr --monotonicity


=====================================
doc/ANNOUNCE
=====================================
@@ -1,18 +1,19 @@
 $Header$ -*-text-*-
 
-netCDF Operators NCO version 5.2.2 kangeroo forward
+netCDF Operators NCO version 5.2.3 paddle imua
 
 http://nco.sf.net (Homepage, Mailing lists, Help)
 http://github.com/nco/nco (Source Code, Issues, Releases)
 
 What's new?
-Version 5.2.2 introduces a new operator, ncchecker, that checks
-dataset compliance with a small yet growing number of
-recommendations. ncclimo no longer omits time_bounds from ELM/CLM
-regional averages. No new features are implemented.
+Version 5.2.3 introduces ...
+ncclimo now automates the correct options for regional averages
+of timeseries of subgridscale fields (useful for ELM/CLM).)
+Other fixes to ncclimo splitter behavior are included.
+No major new features are implemented.
 Skip this release if these changes are not important to you.
 
-Work on NCO 5.2.3 has commenced and aims to add support for Zarr S3 
+Work on NCO 5.2.4 has commenced and aims to add support for Zarr S3 
 stores, and to enhance the vertical regridder.
 
 Enjoy,
@@ -20,41 +21,46 @@ Charlie
 
 NEW FEATURES (full details always in ChangeLog):
 
-A. The new ncchecker command checks netCDF files for compliance with
-select best practices rules and recommendations from various data and
-metadata standards bodies. These include the Climate & Forecast (CF)
-Metadata Conventions and the NASA Dataset Interoperability Working Group
-(DIWG) recommendations. Only a small subset (six tests) of CF and
-DIWG recommendations are currently supported. The number of tests
-implemented, or, equivalently, of recommendations checked, is expected
-to grow. 
-
-ncchecker in1.nc in2.nc # Run all tests on two files
-ncchecker -v var1,var2 in1.nc # Check only two variables
-ncchecker *.nc # Glob input files via wildcard
-ls *.nc | ncchecker # Input files via stdin
-ncchecker --dbg=2 *.nc # Debug ncchecker
-ncchecker --tests=nan,mss *.nc # Select only two tests
-ncchecker --tests=xtn,tm,nan,mss,chr,bnd *.nc # Change test ordering
-ncchecker file:///Users/zender/in_zarr4#mode=nczarr,file # Check Zarr object(s)
-
-The output contains counts of the location and number of failed tests,
-or prints "SUCCESS" for tests with no failures.
-http://nco.sf.net/nco.html#ncchecker
+A. ncclimo automatically supports ELM/CLM regional averages.
+Previously, ncclimo required non-obvious options to correctly invoke
+regional averages of timeseries with sub-gridscale (SGS) fractions,
+like surface models often have. Now, when ncclimo is invoked with the
+surface model name as the processing type, e.g., ncclimo -P elm ...,
+the command internally selects the correct SGS field (landfrac, in
+this case) for weighting spatial averages. 
+ncclimo -P elm --split -v TBOT -s 1 -e 9 -o $out in*.nc
+ncclimo --sgs_frc=landfrac --split -v TBOT -s 1 -e 9 -o $out in*.nc
+http://nco.sf.net/nco.html#rgn_avg
+
+B. ncremap's documentation has been updated to include newer weight
+generation algotihms and naming conventions. In particular, three
+new TempestRemap algorithms are supported and described. Moreover,
+the preferred names of about eight algorithms have changed to align
+with E3SM conventions. The older names are still supported to ensure
+back-compatibility.
+ncremap -a ncoaave --map=map.nc in.nc out.nc # New name
+ncremap -a esmfaave --map=map.nc in.nc out.nc # New name
+ncremap -a esmfbilin --map=map.nc in.nc out.nc # New name
+ncremap -a traave --map=map.nc in.nc out.nc # New name
+ncremap -a traave --map=map.nc in.nc out.nc # New name
+ncremap -a trbilin --map=map.nc in.nc out.nc # New algorithm
+ncremap -a trintbilin --map=map.nc in.nc out.nc # New algorithm
+ncremap -a trfv2 --map=map.nc in.nc out.nc # New algorithm
+http://nco.sf.net/nco.html#alg_typ
 
 BUG FIXES:
    
-A. ncclimo fixes an error where it omitted the time_bounds variable
-from regional averages of ELM/CLM timeseries. The workaround is to
-manually append the variable. The solution is to upgrade. 
-ncclimo --split --rgn_avg -c $caseid -s 2000 -e 2024 ...
-
-B. ncremap fixes an error where it used the wrong option to
-mbtempest to invoke monotonicity. Instead of "--monotonicity"
-it used "--monotonic", which is unknown to mbtempest.
-The workaround is to supply the correct option with ncremap
---wgt_opt. The solution is to upgrade. Thanks to Walter Hannah of
-LLNL for reporting this mistake.
+A. ncclimo fixes an error where it would output, without warning,
+unvarying, time-constant timeseries regional averages for ELM.
+Those averages are incorrect, and they should vary with time.
+There is no workaround. The solution is to upgrade.
+Thanks to Sha Feng (PNNL) and Ryan Forsyth (LLNL) for reporting this.
+
+B. ncclimo fixes a recently introduced bug where, when clm_md=hfc
+or clm_md=hfs, ncclimo could fail to find input files when run from a 
+working directory distinct from the specified input directory.
+There is no workaround. The solution is to upgrade.
+Thanks to Tony Bartoletti (PNNL) for reporting this.
 
 Full release statement at http://nco.sf.net/ANNOUNCE
     
@@ -63,7 +69,7 @@ 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 5.2.0 built/tested under
-MacOS 14.2.1 with netCDF 4.9.3-dev on HDF5 1.14.3 and with
+MacOS 14.4.1 with netCDF 4.9.3-dev on HDF5 1.14.3 and with
 Linux FC38 with netCDF 4.9.2 on HDF5 1.14.1.
 
 A. NOT YET FIXED (NCO problem)


=====================================
doc/ChangeLog
=====================================
@@ -1,9 +1,71 @@
+2024-04-03  Charlie Zender  <zender at uci.edu>
+
+	* NCO 5.2.3 release procedure:
+	cd ~/nco;git commit -a -m 'Version 5.2.3: Cowboy Carter';git push
+	git tag -a 5.2.3 -m 'all: mss_val wrn; ncclimo: rgn_avg fix elm, hrz_dmn, hrz_arg, area_wgt, ppn_opt; ncremap: upd doc';git push --tags
+
+	* NCO 5.2.3-beta01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 5.2.3-beta01: Stormy Saturday';git push
+	git tag -a 5.2.3-beta01 -m 'all: mss_val wrn; ncclimo: rgn_avg fix elm, hrz_dmn, hrz_arg, area_wgt, ppn_opt; ncremap: upd doc';git push --tags
+
+2024-04-01  Charlie Zender  <zender at uci.edu>
+
+	* ncclimo: Add ppn_opt to ncks/ncap2 calls so operators find files when cwd != drc_in
+
+	* ncclimo/ncremap: Clarify that '=' is REQUIRED for long options
+
+2024-03-30  Charlie Zender  <zender at uci.edu>
+
+	* nco.texi: more documentation fixes/updates on supported/default regridding algorithms
+
+	* NCO 5.2.3-alpha02 release procedure:
+	cd ~/nco;git commit -a -m 'Version 5.2.3-alpha02: Grandparent Promotion';git push
+	git tag -a 5.2.3-alpha02 -m 'all: mss_val wrn; ncclimo: rgn_avg	fix elm, hrz_dmn, hrz_arg, area_wgt';git push --tags
+
+	* ncclimo: Verify that ELM glb_avg is accurate
+
+	* ncclimo: automatically determine sgs_frc, area_wgt from prc_typ, now no var_xtr necessary for rgn_avg
+
+	* ncclimo: Simplify life--automatically determine hrz_dmn from area_nm, remove hrz_dmn input option
+
+2024-03-29  Charlie Zender  <zender at uci.edu>
+
+	* ncclimo: much progress ELM rgn_avg completes yet normalization needs work
+
+	* nco_mss_val.c: Clarify nco_mss_val_cnf() WARNING message when missing values of binary operation differ
+
+	* ncclimo: delete_miss(msk_[nrt,sth]) to eliminate "WARNING Input variables have different NCO_MSS_VAL_SNG's" errors
+
+	* ncclimo: Add parentheses to enclose global area_wgt before .avg()
+
+2024-03-28  Charlie Zender  <zender at uci.edu>
+
+	* nco.texi: fix/update documentation of supported/default regridding algorithms
+
+	* NCO 5.2.3-alpha01 release procedure:
+	cd ~/nco;git commit -a -m 'Version 5.2.3-alpha01: Sleepover';git push
+	git tag -a 5.2.3-alpha01 -m 'Functionally identical to 5.2.2 (except for slight vrt_ntp fixes)';git push --tags
+
+	* nco_vrt_ntp() set hybrid grid output temporal size tm_nbr_out to size of PS "time" dimension if it exists and there are no record dimensions
+
+	* nco_vrt_ntp() allow, though print INFO or WARNING when, tm_nbr_in != tm_nbr_out
+
+	* nco_inq_varname() print dataset name on NC_ENOTVAR
+
+2024-03-26  Charlie Zender  <zender at uci.edu>
+
+	* ncremap use vrt_crd as synonym for vrt_nm, not for vrt_fl
+
+	* Add out_fl synonym to --output, --fl_out for symmetry with ncremap
+
 2024-03-22  Charlie Zender  <zender at uci.edu>
 
 	* NCO 5.2.2 release procedure:
 	cd ~/nco;git commit -a -m 'Version 5.2.2: Bambino';git push
 	git tag -a 5.2.2 -m 'ncchecker; ncclimo: elm rgn_avg time_bounds; ncremap: xcl level, mbtr --monotonicity';git push --tags
 
+	* Let it be known that ncap2 stopped working correctly with MacOS again today
+
 	* ncchecker tidy manpage, add to homepage, add to nco.texi
 
 2024-03-21  Charlie Zender  <zender at uci.edu>


=====================================
doc/VERSION
=====================================
@@ -1 +1 @@
-5.2.2
+5.2.3


=====================================
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-5.2.2
-   First we create a clean source distribution of nco and place it in nco-5.2.2
+   For starters, we wish to create .debs of tagged releases, e.g., nco-5.2.3
+   First we create a clean source distribution of nco and place it in nco-5.2.3
    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-5.2.2
-/bin/rm nco.tar.gz;tar cvzf nco-5.2.2.tar.gz ./nco-5.2.2/*
-cd ~/nco/nco-5.2.2
-dh_make -e zender at uci.edu -f ../nco-5.2.2.tar.gz
+cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-5.2.3
+/bin/rm nco.tar.gz;tar cvzf nco-5.2.3.tar.gz ./nco-5.2.3/*
+cd ~/nco/nco-5.2.3
+dh_make -e zender at uci.edu -f ../nco-5.2.3.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-5.2.2.tar.gz
    from previous build
 
    cd ~/nco;/bin/rm *.gz
-   cd ~/nco/nco-5.2.2
+   cd ~/nco/nco-5.2.3
    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 5.2.2 with X.Y.Z+1
+# tags-query replace 5.2.3 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 5.2.2-1 # Update changelog (-b forces this version number)
+   cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 5.2.3-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-5.2.2
+   ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-5.2.3
 # Upload tarball to SF https://sourceforge.net/projects/nco/files 
-   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-5.2.2.tar.gz .
+   cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-5.2.3.tar.gz .
 
 7. Ubuntu PPA
 https://help.launchpad.net/Packaging/PPA
-dput NCO nco_5.2.2-2~ppa1_source.changes
+dput NCO nco_5.2.3-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_5.2.2-1.dpkg-buildpackage.txt
-http://dust.ess.uci.edu/nco/src/nco_5.2.2-1.dsc
-http://dust.ess.uci.edu/nco/src/nco_5.2.2-1_i386.changes
-http://dust.ess.uci.edu/nco/src/nco_5.2.2-1_i386.deb
-http://dust.ess.uci.edu/nco/src/nco_5.2.2.orig.tar.gz
+http://dust.ess.uci.edu/nco/src/nco_5.2.3-1.dpkg-buildpackage.txt
+http://dust.ess.uci.edu/nco/src/nco_5.2.3-1.dsc
+http://dust.ess.uci.edu/nco/src/nco_5.2.3-1_i386.changes
+http://dust.ess.uci.edu/nco/src/nco_5.2.3-1_i386.deb
+http://dust.ess.uci.edu/nco/src/nco_5.2.3.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-5.2.2 ${DATA}/nco_5.2.2* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.2.2-1 -d nco-5.2.2 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-5.2.2 nco # Export most recent
-tar cvzf ./nco_5.2.2.orig.tar.gz --exclude='nco-5.2.2/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.2.2 
-/bin/rm -rf ${DATA}/nco-5.2.2 # Remove cvs-exported directory
-tar xvzf ./nco_5.2.2.orig.tar.gz # Untar to get directory without excluded files
-mkdir -p ${DATA}/nco-5.2.2/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-5.2.2/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-5.2.2/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
+sudo /bin/rm -rf ${DATA}/nco-5.2.3 ${DATA}/nco_5.2.3* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.2.3-1 -d nco-5.2.3 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-5.2.3 nco # Export most recent
+tar cvzf ./nco_5.2.3.orig.tar.gz --exclude='nco-5.2.3/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.2.3 
+/bin/rm -rf ${DATA}/nco-5.2.3 # Remove cvs-exported directory
+tar xvzf ./nco_5.2.3.orig.tar.gz # Untar to get directory without excluded files
+mkdir -p ${DATA}/nco-5.2.3/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-5.2.3/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-5.2.3/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-5.2.2;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
-#cd ${DATA}/nco-5.2.2;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
-cd ${DATA}/nco-5.2.2;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
+#cd ${DATA}/nco-5.2.3;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
+#cd ${DATA}/nco-5.2.3;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes 
+cd ${DATA}/nco-5.2.3;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
 sudo dpkg --remove nco
-sudo dpkg --install ${DATA}/nco_5.2.2-1_*.deb
+sudo dpkg --install ${DATA}/nco_5.2.3-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_5.2.2-1_*.deb
-ls -l ${DATA}/nco_5.2.2*
+lintian ${DATA}/nco_5.2.3-1_*.deb
+ls -l ${DATA}/nco_5.2.3*
 m ~/foo.nco
 # Upload Ubuntu (rather than Debian) packages to websites
-scp ${DATA}/nco_5.2.2* dust.ess.uci.edu:/var/www/html/nco/src
-scp ${DATA}/nco_5.2.2* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+scp ${DATA}/nco_5.2.3* dust.ess.uci.edu:/var/www/html/nco/src
+scp ${DATA}/nco_5.2.3* 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_5.2.2-1_*.changes
+# cd ${DATA};dupload -t mentors nco_5.2.3-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_5.2.2* # Cleanup prior build
+sudo /bin/rm /var/cache/pbuilder/result/nco_5.2.3* # 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_5.2.2-1.dsc > ~/foo.nco.pbuilder 2>&1
-cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_5.2.2-1_*.changes
-lintian /var/cache/pbuilder/result/nco_5.2.2-1_*.deb
+cd ${DATA};DIST=sid sudo pbuilder build nco_5.2.3-1.dsc > ~/foo.nco.pbuilder 2>&1
+cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_5.2.3-1_*.changes
+lintian /var/cache/pbuilder/result/nco_5.2.3-1_*.deb
 sudo dpkg --remove nco
-sudo dpkg --install /var/cache/pbuilder/result/nco_5.2.2-1_*.deb
+sudo dpkg --install /var/cache/pbuilder/result/nco_5.2.3-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_5.2.2-1_*.changes
+cd /var/cache/pbuilder/result;dupload -t mentors nco_5.2.3-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-5.2.2 ${DATA}/nco-5.2.2* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-5.2.3 ${DATA}/nco-5.2.3* # Cleanup last build
 ${sudo_sng} /bin/rm -r -f \
-${rpm_root}/BUILD/nco-5.2.2 \
-${rpm_root}/RPMS/i386/nco-5.2.2-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-5.2.2-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-5.2.2-?.i386.rpm \
-${rpm_root}/SOURCES/nco-5.2.2.tar.gz \
-${rpm_root}/SPECS/nco-5.2.2.spec \
-${rpm_root}/SRPMS/nco-5.2.2-?.src.rpm
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.2.2-1 -d nco-5.2.2 nco # Export based on tag
-${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-5.2.2.spec
-tar cvzf ./nco-5.2.2.tar.gz --exclude='nco-5.2.2/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.2.2 
-${sudo_sng} /bin/cp ${DATA}/nco-5.2.2.tar.gz ${rpm_root}/SOURCES
+${rpm_root}/BUILD/nco-5.2.3 \
+${rpm_root}/RPMS/i386/nco-5.2.3-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-5.2.3-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-5.2.3-?.i386.rpm \
+${rpm_root}/SOURCES/nco-5.2.3.tar.gz \
+${rpm_root}/SPECS/nco-5.2.3.spec \
+${rpm_root}/SRPMS/nco-5.2.3-?.src.rpm
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.2.3-1 -d nco-5.2.3 nco # Export based on tag
+${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-5.2.3.spec
+tar cvzf ./nco-5.2.3.tar.gz --exclude='nco-5.2.3/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.2.3 
+${sudo_sng} /bin/cp ${DATA}/nco-5.2.3.tar.gz ${rpm_root}/SOURCES
 cd ${rpm_root}/SPECS
-${sudo_sng} rpmbuild -ba --sign nco-5.2.2.spec > ~/foo.nco 2>&1
+${sudo_sng} rpmbuild -ba --sign nco-5.2.3.spec > ~/foo.nco 2>&1
 scp \
-${rpm_root}/RPMS/i386/nco-5.2.2-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-5.2.2-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-5.2.2-?.i386.rpm \
-${rpm_root}/SRPMS/nco-5.2.2-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-5.2.3-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-5.2.3-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-5.2.3-?.i386.rpm \
+${rpm_root}/SRPMS/nco-5.2.3-?.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/RPMS/i386/nco-5.2.2-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-5.2.2-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-5.2.2-?.i386.rpm \
-${rpm_root}/SRPMS/nco-5.2.2-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-5.2.3-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-5.2.3-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-5.2.3-?.i386.rpm \
+${rpm_root}/SRPMS/nco-5.2.3-?.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-5.2.2 ${DATA}/nco-5.2.2* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-5.2.3 ${DATA}/nco-5.2.3* # Cleanup last build
 /bin/rm -r -f \
-${rpm_root}/nco-5.2.2-?.src.rpm \
-${rpm_root}/nco-5.2.2.spec \
-${rpm_root}/nco-5.2.2.tar.gz \
-${rpm_root}/*/nco-5.2.2-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-5.2.2-?.*.rpm \
-${rpm_root}/*/nco-devel-5.2.2-?.*.rpm
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.2.2-1 -d nco-5.2.2 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-5.2.2 nco # Export most recent and build as 5.2.2-1
-tar cvzf ./nco-5.2.2.tar.gz --exclude='nco-5.2.2/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.2.2 
-/bin/cp ${DATA}/nco-5.2.2.tar.gz ${rpm_root}
+${rpm_root}/nco-5.2.3-?.src.rpm \
+${rpm_root}/nco-5.2.3.spec \
+${rpm_root}/nco-5.2.3.tar.gz \
+${rpm_root}/*/nco-5.2.3-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-5.2.3-?.*.rpm \
+${rpm_root}/*/nco-devel-5.2.3-?.*.rpm
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.2.3-1 -d nco-5.2.3 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-5.2.3 nco # Export most recent and build as 5.2.3-1
+tar cvzf ./nco-5.2.3.tar.gz --exclude='nco-5.2.3/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.2.3 
+/bin/cp ${DATA}/nco-5.2.3.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-5.2.2-?.*.rpm
+rpmlint ${rpm_root}/*/nco-5.2.3-?.*.rpm
 sudo yum remove nco
-sudo yum install ${rpm_root}/*/nco-5.2.2-?.*.rpm
+sudo yum install ${rpm_root}/*/nco-5.2.3-?.*.rpm
 scp \
-${rpm_root}/*/nco-5.2.2-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-5.2.2-?.*.rpm \
-${rpm_root}/*/nco-devel-5.2.2-?.*.rpm \
-${rpm_root}/nco-5.2.2-?.*.src.rpm \
+${rpm_root}/*/nco-5.2.3-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-5.2.3-?.*.rpm \
+${rpm_root}/*/nco-devel-5.2.3-?.*.rpm \
+${rpm_root}/nco-5.2.3-?.*.src.rpm \
 dust.ess.uci.edu:/var/www/html/nco/src
 scp \
-${rpm_root}/*/nco-5.2.2-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-5.2.2-?.*.rpm \
-${rpm_root}/*/nco-devel-5.2.2-?.*.rpm \
-${rpm_root}/nco-5.2.2-?.*.src.rpm \
+${rpm_root}/*/nco-5.2.3-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-5.2.3-?.*.rpm \
+${rpm_root}/*/nco-devel-5.2.3-?.*.rpm \
+${rpm_root}/nco-5.2.3-?.*.src.rpm \
 zender,nco at web.sf.net:/home/project-web/nco/htdocs/src


=====================================
doc/index.shtml
=====================================
@@ -71,7 +71,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 5.2.2 released <!--#flastmod file="src/nco-5.2.2.tar.gz"-->
+Current stable NCO version is 5.2.3 released <!--#flastmod file="src/nco-5.2.3.tar.gz"-->
 </h2>
 
 <table border=0 width=100%>
@@ -155,7 +155,8 @@ and
 <h2>Recent Releases & Milestones</h2>
 
 <ul>
-<li>2024 Apr ??: 5.2.3 <i>In Progress...</i>
+<li>2024 May ??: 5.2.4 <i>In Progress...</i>
+<li>2024 Apr 03: 5.2.3 ncclimo --rgn_avg
 <li>2024 Mar 22: 5.2.2 ncchecker
 <li>2024 Feb 18: 5.2.1 Quick fix to 5.2.0
 <li>2024 Feb 16: 5.2.0 S1D ELM restart unpacking
@@ -653,16 +654,19 @@ 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 5.2.2 http://github.com/nco/nco.git nco-5.2.2</tt></a>.
+<tt>git clone -b 5.2.3 http://github.com/nco/nco.git nco-5.2.3</tt></a>.
 <ul>
-<li><b>NCO 5.2.4</b>: (<i>Future</i>)
+<li><b>NCO 5.2.5</b>: (<i>Future</i>)
 netCDF4 user-defined types support;
 <tt>ncks --xtn</tt> better extensive variable treatment?;
 <tt>ncks --bsa</tt> Byte-swap algoritm;
 <tt>ncremap</tt> small-circle weights;</li>
-<li><b>NCO 5.2.3</b>: (<i>In Progress, features in-progress or complete include</i>)
+<li><b>NCO 5.2.4</b>: (<i>In Progress, features in-progress or complete include</i>)
 <tt>ncremap</tt> CF Convention for longitude vertices in map-files</li>
-<li><b>NCO 5.2.2</b>: (<i>Current Stable Release</i>)
+<li><b>NCO 5.2.3</b>: (<i>Current Stable Release</i>)
+<tt>ncclimo --rgn_avg</tt> fixes;
+<tt>ncremap</tt> documentation updates</tt></li>
+<li><b>NCO 5.2.2</b>:
 <tt>ncchecker</tt> debuts;
 <tt>ncclimo --rgn_avg</tt> includes <tt>time_bounds</tt> in ELM/CLM;
 <tt>ncremap</tt> MBTR <tt>--monotonicity</tt></li>
@@ -814,7 +818,7 @@ Or, alternatively, permanently add conda-forge (which teems with goodies besides
 ‘<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-5.2.2</a> Executables Anaconda-compatible. Maintained by Filipe Fernandes.</li>
+<li><a href="https://github.com/conda-forge/nco-feedstock">nco-5.2.3</a> Executables Anaconda-compatible. Maintained by Filipe Fernandes.</li>
 Thanks to Rich Signell, Filipe Fernandes, Pedro Vicente, Xylar Asay-Davis and others for developing and maintaining the NCO package for conda.
 </ul>
 
@@ -823,7 +827,7 @@ Thanks to Rich Signell, Filipe Fernandes, Pedro Vicente, Xylar Asay-Davis and ot
 <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-5.2.2</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-5.2.3</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.
@@ -831,8 +835,8 @@ Thanks to Rich Signell, Filipe Fernandes, Pedro Vicente, Xylar Asay-Davis and ot
 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_5.2.2-1_i386.deb</tt>’):</dt>
-<li><a href="https://launchpad.net/ubuntu/+source/nco/5.2.2-1">nco_5.2.2-1_amd64.deb</a> : Executables AMD64-compatible</li>
+<dt>Debian package for most recent NCO release (install with, e.g., ‘<tt>dpkg --install nco_5.2.3-1_i386.deb</tt>’):</dt>
+<li><a href="https://launchpad.net/ubuntu/+source/nco/5.2.3-1">nco_5.2.3-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. 
@@ -874,12 +878,12 @@ Thanks to Gavin Burris and Kyle Wilcox for documenting build procedures for RHEL
 <h3><a href="http://www.apple.com/macosx/">MacOS Darwin</a></h3>
 <ul>
 <!-- 
-# MacOS 14.3.1 (Ventura) systems (firn, sastrugi, spectral):
+# MacOS 14.4.1 (Ventura) systems (firn, sastrugi, spectral):
 /usr/bin/scp ~/nco/doc/index.shtml zender,nco at web.sf.net:/home/project-web/nco/htdocs
-cd ~/bin;tar cvzf ${DATA}/nco-5.2.2.macos.14.3.tar.gz nc*;scp ${DATA}/nco-5.2.2.macos.14.3.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+cd ~/bin;tar cvzf ${DATA}/nco-5.2.3.macos.14.4.tar.gz nc*;scp ${DATA}/nco-5.2.3.macos.14.4.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-5.2.2.macos.14.3.tar.gz">nco-5.2.2.macos.14.3.tar.gz</a> (<!--#fsize file="src/nco-5.2.2.macos.14.3.tar.gz"-->): Executables MacOS 14.3-compatible (last updated <!--#flastmod file="src/nco-5.2.2.macos.14.3.tar.gz"-->). Maintained by NCO Project.</li>
+<li><a href="src/nco-5.2.3.macos.14.4.tar.gz">nco-5.2.3.macos.14.4.tar.gz</a> (<!--#fsize file="src/nco-5.2.3.macos.14.4.tar.gz"-->): Executables MacOS 14.4-compatible (last updated <!--#flastmod file="src/nco-5.2.3.macos.14.4.tar.gz"-->). Maintained by NCO Project.</li>
 <li><a href="http://fink.sf.net">Fink</a> packages for <a href="http://fink.sf.net/pdb/package.php/nco">NCO</a>: Currently NCO 4.9.5. Maintained by Alexander Hansen.</li> 
 <li><a href="http://brew.sh">Homebrew</a> packages for <a href="https://formulae.brew.sh/formula/nco">NCO</a>: Currently NCO 5.1.5. Install with ‘<tt>brew install nco</tt>’. Maintained by Carlo Cabrera, Ian Lancaster, Alejandro Soto, and others over the years.</li> 
 <li><a href="http://trac.macosforge.org/projects/macports/wiki">MacPorts</a> infrastructure for <a href="https://ports.macports.org/port/nco">NCO</a>: <a href="https://ports.macports.org/port/nco">Portfile</a>: Currently NCO 5.1.1. Install with ‘<tt>sudo port install nco</tt>’. Maintained by Takeshi Enomoto.</li>
@@ -1082,12 +1086,12 @@ On the <a href="https://sourceforge.net/p/nco/bugs">Bug Tickets</a> site.</li>
 The simplest way to acquire the source is to download the compressed tarball:
 <ul>
 <li>
-<!-- scp ${DATA}/nco-5.2.2.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
-<a href="https://github.com/nco/nco/archive/5.2.2.tar.gz">nco-5.2.2.tar.gz</a> 
-(<!--#fsize file="src/nco-5.2.2.tar.gz"--> compressed tar-file)<br>
-<!--#exec cmd="openssl dgst -md5 src/nco-5.2.2.tar.gz"--><br>
-<!--#exec cmd="openssl dgst -sha1 src/nco-5.2.2.tar.gz"--><br>
-<!--#exec cmd="openssl dgst -sha256 src/nco-5.2.2.tar.gz"--> 
+<!-- scp ${DATA}/nco-5.2.3.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
+<a href="https://github.com/nco/nco/archive/5.2.3.tar.gz">nco-5.2.3.tar.gz</a> 
+(<!--#fsize file="src/nco-5.2.3.tar.gz"--> compressed tar-file)<br>
+<!--#exec cmd="openssl dgst -md5 src/nco-5.2.3.tar.gz"--><br>
+<!--#exec cmd="openssl dgst -sha1 src/nco-5.2.3.tar.gz"--><br>
+<!--#exec cmd="openssl dgst -sha256 src/nco-5.2.3.tar.gz"--> 
 </li>
 </ul>
 
@@ -1108,8 +1112,8 @@ To avoid the churn that comes with using the latest snapshot,
 potential contributors may wish to retrieve a recent tagged (i.e.,
 stable and released) version, 
 This command retrieves the entire NCO repository (< 20 MB) and
-then checks out NCO version <tt>5.2.2</tt>:
-<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 5.2.2</tt></p>
+then checks out NCO version <tt>5.2.3</tt>:
+<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 5.2.3</tt></p>
 However, the most efficient way to actively track and develop NCO is to
 retrieve the current (“bleeding edge”) NCO snapshot.
 This command retrieves the latest NCO master branch into a local
@@ -1119,12 +1123,12 @@ 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>5.2.2</tt>) and the development version is that the
+(e.g., <tt>5.2.3</tt>) and the development version is that the
 tagged release operators will print a valid version number (e.g.,
-<tt>5.2.2</tt>) when asked to do so with the <tt>-r</tt> flag
+<tt>5.2.3</tt>) when asked to do so with the <tt>-r</tt> flag
 (e.g., <tt>ncks -r</tt>).
 Snapshots will include the sub-version and patch-level in the version
-information (e.g., <tt>5.2.2-alpha06</tt>). 
+information (e.g., <tt>5.2.3-alpha06</tt>). 
 
 <!--
 <a name="doxy"></a>
@@ -1307,9 +1311,9 @@ As of 20131101 there is no Cygwin package for ANTLR, and the Cygwin netCDF packa
 
 <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/5.2.2.tar.gz</dt>
-<dt>tar xvzf 5.2.2.tar.gz</dt>
-<dt>cd nco-5.2.2</dt>
+<dt>wget https://github.com/nco/nco/archive/5.2.3.tar.gz</dt>
+<dt>tar xvzf 5.2.3.tar.gz</dt>
+<dt>cd nco-5.2.3</dt>
 <dt>./configure --prefix=/usr/local</dt>
 <dt>make</dt>
 <dt>sudo make install</dt>


=====================================
doc/nco.texi
=====================================
@@ -128,12 +128,12 @@ Octave TeXInfo manual shows clean TeXInfo structure
 @setfilename nco.info
 
 @c Define edition, date, ...
- at set nco-edition 5.2.2
- at set doc-edition 5.2.2
+ at set nco-edition 5.2.3
+ at set doc-edition 5.2.3
 @set copyright-years 1995--2024
 @set update-year 2024
- at set update-date 22 March 2024
- at set update-month March 2024
+ at set update-date 3 April 2024
+ at set update-month April 2024
 
 @settitle @acronym{NCO} @value{nco-edition} User Guide
 
@@ -20118,6 +20118,15 @@ The three timeseries are now saved in a two-dimensional (time
 by region) array with a ``region dimension'' named @code{rgn}.
 The region names are stored in the variable named @code{region_name}.
 
+As of @acronym{NCO} version 5.2.3 (released March, 2024), this switch
+works with sub-gridscale fractions, such as are common in surface
+models like @acronym{ELM} and @acronym{CLM}.
+The correct weights for (@acronym{SGS}) fraction will automatically be
+applied so long as @command{ncclimo} is invoked with
+ at samp{-P @var{prc_typ}}.
+Otherwise the field containing the (@acronym{SGS}) fraction must be
+supplied with @samp{--sgs_frc=@var{sgs_frc}}.
+
 This switch only has effect in timeseries splitting mode.
 This is useful, for example, to quickly diagnose the behavior of ongoing
 model simulations prior to a full-blown analysis. 
@@ -26045,10 +26054,16 @@ Features common to many operators are described in
 <a name="patc"></a> <!-- http://nco.sf.net/nco.html#patc -->
 <a name="pch"></a> <!-- http://nco.sf.net/nco.html#pch -->
 <a name="bilinear"></a> <!-- http://nco.sf.net/nco.html#bilinear -->
+<a name="esmfbilin"></a> <!-- http://nco.sf.net/nco.html#esmfbilin -->
 <a name="bilin"></a> <!-- http://nco.sf.net/nco.html#bilin -->
 <a name="blin"></a> <!-- http://nco.sf.net/nco.html#blin -->
 <a name="conserve"></a> <!-- http://nco.sf.net/nco.html#conserve -->
 <a name="aave"></a> <!-- http://nco.sf.net/nco.html#aave -->
+<a name="esmfaave"></a> <!-- http://nco.sf.net/nco.html#esmfaave -->
+<a name="traave"></a> <!-- http://nco.sf.net/nco.html#traave -->
+<a name="trbilin"></a> <!-- http://nco.sf.net/nco.html#trbilin -->
+<a name="trintbilin"></a> <!-- http://nco.sf.net/nco.html#trintbilin -->
+<a name="trfv2"></a> <!-- http://nco.sf.net/nco.html#trfv2 -->
 <a name="fv2se_flx"></a> <!-- http://nco.sf.net/nco.html#fv2se_flx -->
 <a name="se2fv_flx"></a> <!-- http://nco.sf.net/nco.html#se2fv_flx -->
 <a name="fv2se_stt"></a> <!-- http://nco.sf.net/nco.html#fv2se_stt -->
@@ -26061,6 +26076,7 @@ Features common to many operators are described in
 <a name="fv2fv_flx"></a> <!-- http://nco.sf.net/nco.html#fv2fv_flx -->
 <a name="fv2fv_stt"></a> <!-- http://nco.sf.net/nco.html#fv2fv_stt -->
 <a name="rll2rll"></a> <!-- http://nco.sf.net/nco.html#rll2rll -->
+<a name="ncoaave"></a> <!-- http://nco.sf.net/nco.html#ncoaave -->
 <a name="nco_con"></a> <!-- http://nco.sf.net/nco.html#nco_con -->
 <a name="nco_dwe"></a> <!-- http://nco.sf.net/nco.html#nco_dwe -->
 <a name="nco_idw"></a> <!-- http://nco.sf.net/nco.html#nco_idw -->
@@ -26085,8 +26101,10 @@ Features common to many operators are described in
 @cindex @code{pch}
 @cindex @code{bilinear}
 @cindex @code{bilin}
+ at cindex @code{esmfbilin}
 @cindex @code{blin}
 @cindex @code{aave}
+ at cindex @code{esmfaave}
 @cindex @code{conserve}
 @cindex @code{conserve2nd}
 @item -a @var{alg_typ} (@code{--alg_typ}, @code{--algorithm}, @code{--regrid_algorithm})
@@ -26106,8 +26124,8 @@ TempestRemap algorithms (with both @acronym{TR} and @acronym{MOAB}).
 <a name="alg_erwg"></a> <!-- http://nco.sf.net/nco.html#alg_erwg -->
 @end html
 The seven @acronym{ERWG} weight generation algorithms are:
- at code{bilinear} (default, acceptable abbreviations are @code{bilin}, @code{blin}, @code{bln}), 
- at code{conserve} (or @code{conservative}, @code{cns}, @code{c1}, or @code{aave}), 
+ at code{bilinear} (acceptable abbreviations are: @code{esmfbilin} (preferred), @code{bilin}, @code{blin}, @code{bln}), 
+ at code{conserve} (or @code{esmfaave} (preferred), @code{conservative}, @code{cns}, @code{c1}, or @code{aave}), 
 @code{conserve2nd} (or @code{conservative2nd}, @code{c2}, or @code{c2nd})
 (@acronym{NCO} supports @code{conserve2nd} as of version 4.7.4 (April, 2018)), 
 @code{nearestdtos} (or @code{nds} or @code{dtos} or @code{ndtos}), 
@@ -26116,10 +26134,6 @@ and @code{patch} (or @code{pch} or @code{patc}).
 See @acronym{ERWG} documentation
 @uref{http://www.earthsystemmodeling.org/esmf_releases/public/ESMF_6_3_0rp1/ESMF_refdoc/node3.html#SECTION03020000000000000000, here}
 for detailed descriptions of @acronym{ERWG} algorithms.
- at cindex @code{nco_con}
- at cindex @code{nco_cns}
- at cindex @code{nco_conserve}
- at cindex @code{nco}
 
 @html
 <a name="alg_nco"></a> <!-- http://nco.sf.net/nco.html#alg_nco -->
@@ -26132,6 +26146,12 @@ for detailed descriptions of @acronym{ERWG} algorithms.
 <a name="distance_weighted"></a> <!-- http://nco.sf.net/nco.html#distance_weighted -->
 <a name="nearest_neighbor"></a> <!-- http://nco.sf.net/nco.html#nearest_neighbor -->
 @end html
+ at cindex @code{ncoaave}
+ at cindex @code{nco_con}
+ at cindex @code{nco_cns}
+ at cindex @code{nco_conserve}
+ at cindex @code{nco}
+ at cindex @code{ncoidw}
 @cindex @code{nco_idw}
 @cindex @code{nco_dwe}
 @cindex @code{idw}
@@ -26147,11 +26167,11 @@ for detailed descriptions of @acronym{ERWG} algorithms.
 @command{ncremap} implements its own internal weight-generation
 algorithm as of @acronym{NCO} version 4.8.0 (May, 2019).
 The first @acronym{NCO}-native algorithm is a first-order conservative
-algorithm that competes well in accuracy with similar algorithms
-(e.g., @acronym{ERWG}'s conservative algorithm).
+algorithm @code{ncoaave} that competes well in accuracy with similar
+algorithms (e.g., @acronym{ERWG}'s conservative algorithm @code{esmfaave}).
 This algorithm is built-in to @acronym{NCO} and requires no external
-software so it is the default weight generation algorithm and is
-recommended for everyday use. 
+software so it is @acronym{NCO}'s default weight generation algorithm.
+It works well for everyday use. 
 The algorithm may also be explicitly invoked with @code{nco_con} (or
 @code{nco_cns}, @code{nco_conservative}, or simply @code{nco}).
 
@@ -26233,6 +26253,18 @@ synonyms (shown below).
 As of @acronym{NCO} version 4.9.0 (December, 2019), @command{ncremap} 
 added two further boutique mappings (@code{fv2fv_flx} and
 @code{fv2fv_stt}). 
+As of @acronym{NCO} version 5.1.9 (November, 2023), @command{ncremap} 
+added support for two brand new TempestRemap bilinear interpolation
+algorithms for @acronym{FV} grids.
+These are (@code{trbilin} for traditional bilinear interpolation,
+and @code{trintbilin}), for integrated bilinear or barycentric
+interpolation. 
+As of @acronym{NCO} version 5.2.0 (February, 2024), @command{ncremap} 
+added support for @code{trfv2}, a new second-order conservative
+algorithm.
+These newer TempestRemap algorithms are briefly described at
+ at url{https://acme-climate.atlassian.net/wiki/spaces/DOC/pages/1217757434/Mapping+file+algorithms+and+naming+convention}.
+
 The @samp{-a tempest} algorithm can be specified with the precise
 TempestRemap options as arguments to the @samp{-W} (or
 @samp{--wgt_opt}) option.  
@@ -26256,7 +26288,7 @@ Generate and use the recommended weights to remap fluxes from
 @acronym{FV} to @acronym{FV} grids, for example, with
 @example
 @verbatim
-ncremap -a fv2fv_flx --src_grd=src.g --dst_grd=dst.nc -m map.nc
+ncremap -a traave --src_grd=src.g --dst_grd=dst.nc -m map.nc
 ncremap -m map.nc in.nc out.nc
 @end verbatim
 @end example
@@ -26269,7 +26301,7 @@ Invoke @acronym{MOAB} to compute these weights by adding the
 @samp{--mpi_nbr=@var{mpi_nbr}} option:
 @example
 @verbatim
-ncremap --mpi_nbr=8 -a fv2fv_flx --src_grd=src.g --dst_grd=dst.nc -m map.nc
+ncremap --mpi_nbr=8 -a traave --src_grd=src.g --dst_grd=dst.nc -m map.nc
 @end verbatim
 @end example
 This causes @command{ncremap} to automatically invoke multiple
@@ -26295,7 +26327,7 @@ ncatted -O --gaa <command lines> map.nc map.nc
 The @acronym{MOAB} toolchain should produce a map-file identical, to
 rounding precision, to one produced by @acronym{TR}.
 When speed matters (i.e., large grids), and the algorithm is supported
-(i.e., @code{fv2fv_flx}), invoke @acronym{MOAB}, otherwise invoke
+(e.g., @code{traave}), invoke @acronym{MOAB}, otherwise invoke
 @acronym{TR}. 
 
 @cindex Galerkin methods
@@ -26305,7 +26337,7 @@ When speed matters (i.e., large grids), and the algorithm is supported
 @cindex @code{--mono}
 TempestRemap options have the following meanings:
 @code{mono} specifies a monotone remapping, i.e., one that does not
-generate any new extrema in the field variables.a
+generate any new extrema in the field variables.
 @code{cgll} indicates the input or output are represented by a
 continuous Galerkin method on Gauss-Lobatto-Legendre nodes.
 This is appropriate for spectral element datasets.
@@ -26323,7 +26355,7 @@ Specifying @samp{-a tempest} without additional options in the
 @samp{-W} clause causes TempestRemap to employ defaults.
 The default configuration requires both input and output grids to be
 @acronym{FV}, and produces a conservative, non-monotonic mapping.
-The @samp{-a fv2fv} option described below may produce more desirable
+The @samp{-a traave} option described below may produce more desirable
 results than this default for many users.
 Using @samp{-a tempest} alone without other options for spectral
 element grids will lead to undefined and likely unintentional
@@ -26343,7 +26375,7 @@ and boutique options passed to @command{GenerateOfflineMap} or to
 @cartouche
 Caveat lector:
 As of September, 2021 @acronym{MOAB}-generated weights are only
-trustworthy for the @code{fv2fv_flx} algorithm. 
+trustworthy for the @code{traave} algorithm (synonym for @code{fv2fv_flx}). 
 The options for all other algorithms are implemented as indicated
 though they should be invoked for testing purposes only.
 High order and spectral element maps are completely unsupported.
@@ -26359,6 +26391,19 @@ Always use the map-checker to test maps before use, e.g., with
 <a name="alg_moab"></a> <!-- http://nco.sf.net/nco.html#alg_moab -->
 @end html
 @table @asis
+ at item @code{traave} (synonyms @code{fv2fv_flx}, @code{fv2fv_mono}, @code{conservative_monotone_fv2fv}),
+ at acronym{TR} options: @samp{--in_type fv --in_np 1 --out_type fv --out_np 1}@*
+ at acronym{MOAB} options: @samp{--method fv --order 1 --method fv --order 1}
+ at item @code{trbilin} (no synonyms),
+ at acronym{TR} options: @samp{--in_type fv --out_type fv --method bilin}@*
+ at acronym{MOAB} options: @samp{--method fv --method fv --order 1 --order 1 --fvmethod bilin}
+ at item @code{trintbilin} (no synonyms),
+ at acronym{TR} options: @samp{--in_type fv --out_type fv --method intbilin}@*
+ at acronym{MOAB} options: @samp{--method fv --method fv --order 1 --order 1 --fvmethod intbilin}
+ at item @code{trfv2} (synonyms @code{trfvnp2}),
+ at acronym{TR} options: @samp{--in_type fv --in_np 2 --out_type fv --out_np 1 --method normalize}@*
+ at acronym{MOAB} options: @samp{--method fv --order 2 --method fv --order 1 --fvmethod normalize}
+
 @item @code{se2fv_flx} (synonyms @code{mono_se2fv}, @code{conservative_monotone_se2fv})
 @acronym{TR} options: @samp{--in_type cgll --in_np 4 --out_type fv --mono}@*
 @acronym{MOAB} options: @samp{--method cgll --order 4 --global_id GLOBAL_DOFS --method fv --monotonic 1 --global_id GLOBAL_ID}
@@ -26386,12 +26431,14 @@ is employed.@*
 @item @code{fv2fv} (synonyms @code{rll2rll}),
 @acronym{TR} options: @samp{--in_type fv --in_np 2 --out_type fv}@*
 @acronym{MOAB} options: @samp{--method fv --order 2 --method fv}
- at item @code{fv2fv_flx} (synonyms @code{fv2fv_mono}, @code{conservative_monotone_fv2fv}),
+ at item @code{fv2fv_flx} (synonyms @code{traave} @code{fv2fv_mono}, @code{conservative_monotone_fv2fv}),
 @acronym{TR} options: @samp{--in_type fv --in_np 1 --out_type fv --out_np 1}@*
 @acronym{MOAB} options: @samp{--method fv --order 1 --method fv --order 1}
 @item @code{fv2fv_stt} (synonyms @code{fv2fv_highorder}, @code{accurate_conservative_nonmonotone_fv2fv}),
 @acronym{TR} options: @samp{--in_type fv --in_np 2 --out_type fv}@*
 @acronym{MOAB} options: @samp{--method fv --order 2 --method fv}
+
+
 @end table
 Thus these boutique options are specialized for @acronym{SE} grids with
 fourth order resolution (@math{@var{np} = 4}).
@@ -28734,19 +28781,43 @@ information.
 Note that @var{vrb_lvl} is distinct from @var{dbg_lvl} which is
 passed to the regridder (@command{ncks}) for additional diagnostics.
 
+ at html
+<a name="vrt_crd"></a> <!-- http://nco.sf.net/nco.html#vrt_crd -->
+<a name="plev_nm"></a> <!-- http://nco.sf.net/nco.html#plev_nm -->
+<a name="vrt_nm"></a> <!-- http://nco.sf.net/nco.html#vrt_nm -->
+<a name="vertical_coordinate_name"></a> <!-- http://nco.sf.net/nco.html#vertical_coordinate_name -->
+ at end html
+ at cindex @code{--vrt_crd} 
+ at cindex @code{--plev_nm}
+ at cindex @code{--vertical_coordinate_name}
+ at cindex @code{--vrt_nm=@var{vrt_fl}}
+ at cindex @var{vrt_crd}
+ at cindex Vertical coordinate
+ at cindex @acronym{MPAS}
+ at item --vrt_nm=@var{vrt_nm} (@code{--vrt_nm}, @code{--plev_nm}, @code{--vrt_crd}, @code{--vertical_coordinate_name})
+The @samp{--vrt_nm=@var{vrt_nm}} option instructs @command{ncremap}
+to use @var{vrt_nm}, instead of the default @code{plev}, as the vertical
+coordinate name for pure pressure grids.
+This option first appeared in @acronym{NCO} @w{version 4.8.0},
+released in May, 2019.
+The vertical coordinate @var{vrt_nm} is usually, though not
+necessarily, specified in millibars.
+
 @html
 <a name="vrt"></a> <!-- http://nco.sf.net/nco.html#vrt -->
 <a name="vrt_fl"></a> <!-- http://nco.sf.net/nco.html#vrt_fl -->
+<a name="vrt_grd_out"></a> <!-- http://nco.sf.net/nco.html#vrt_grd_out -->
+<a name="vrt_out"></a> <!-- http://nco.sf.net/nco.html#vrt_out -->
 @end html
 @cindex @code{vrt}
 @cindex @code{--vrt}
- at cindex @code{--vrt_crd}
 @cindex @code{--vrt_fl_out}
+ at cindex @code{--vrt_grd_out}
 @cindex @code{--vrt_out=@var{vrt_fl}}
 @cindex @var{vrt_fl}
 @cindex Vertical coordinate
 @cindex @acronym{MPAS}
- at item --vrt_out=@var{vrt_fl} (@code{--vrt_out}, @code{--vrt_fl}, @code{--vrt}, @code{--vrt_crd}, @code{--vrt_grd_out})
+ at item --vrt_out=@var{vrt_fl} (@code{--vrt_out}, @code{--vrt_fl}, @code{--vrt}, @code{--vrt_grd_out})
 The @samp{--vrt_out=@var{vrt_fl}} option instructs @command{ncremap}
 to vertically interpolate the input file to the vertical coordinate
 grid contained in the file @var{vrt_fl}.
@@ -30649,12 +30720,14 @@ Auxiliary coordinate support.
 Large work-load testing
 @cindex Xylar Asay-Davis
 @cindex Sterling Baldwin 
+ at cindex Tony Bartoletti
 @cindex Dave Blodgett
 @cindex Peter Campbell
 @cindex Peter Caldwell
 @cindex Philip Cameron-Smith
 @cindex Martin Dix
 @cindex Mark Flanner
+ at cindex Ryan Forsyth
 @cindex Chris Golaz
 @cindex Barron Henderson
 @cindex Ben Hillman
@@ -30680,7 +30753,8 @@ Large work-load testing
 @cindex George White
 @cindex Min Xu
 @cindex Remik Ziemlinski
- at item Xylar Asay-Davis, Sterling Baldwin, Dave Blodgett, Peter Caldwell, Philip Cameron-Smith, Peter Campbell, Martin Dix, Mark Flanner, Chris Golaz, Barron Henderson, Ben Hillman, Aleksandar Jelenak, Markus Liebig, Keith Lindsay, Daniel Macks, Daniel Neumann, Mike Page, Martin Schmidt, Michael Schulz, Lori Sentman, Rich Signell, Bob Simons, Gary Strand, Mark Taylor, Matthew Thompson, Qi Tang, Adrian Tompkins, Paul Ullrich, George White, Andrew Wittenberg, Min Xu, Remik Ziemlinski
+ at cindex Jill Zhang
+ at item Xylar Asay-Davis, Sterling Baldwin, Tony Bartoletti, Dave Blodgett, Peter Caldwell, Philip Cameron-Smith, Peter Campbell, Martin Dix, Mark Flanner, Ryan Forsyth, Chris Golaz, Barron Henderson, Ben Hillman, Aleksandar Jelenak, Markus Liebig, Keith Lindsay, Daniel Macks, Daniel Neumann, Mike Page, Martin Schmidt, Michael Schulz, Lori Sentman, Rich Signell, Bob Simons, Gary Strand, Mark Taylor, Matthew Thompson, Qi Tang, Adrian Tompkins, Paul Ullrich, George White, Andrew Wittenberg, Min Xu, Remik Ziemlinski, Jill Zhang
 Excellent bug reports and feature requests.
 @cindex Xylar Asay-Davis
 @cindex Filipe Fernandes
@@ -30737,11 +30811,12 @@ RHEL and CentOS build scripts and bug reports.
 @cindex Andrea Cimatoribus
 @item Andrea Cimatoribus
 @acronym{NCO} Spiral Logo
+ at cindex Sha Feng
 @cindex Walter Hannah
 @cindex Martin Otte
 @cindex Etienne Tourigny
- at item Walter Hannah, Martin Otte, Etienne Tourigny
-Single bug reports and fixes
+ at item Sha Feng, Walter Hannah, Martin Otte, Etienne Tourigny
+Miscellaneous bug reports and fixes
 @cindex Wenshan Wang
 @item Wenshan Wang
 @acronym{CMIP5} and @acronym{MODIS} processing documentation, reference card


=====================================
src/nco++/ncap2.cc
=====================================
@@ -341,6 +341,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"path",required_argument,0,'p'},
     {"retain",no_argument,0,'R'},
     {"rtn",no_argument,0,'R'},


=====================================
src/nco/ncatted.c
=====================================
@@ -259,6 +259,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"path",required_argument,0,'p'},
     {"retain",no_argument,0,'R'},
     {"rtn",no_argument,0,'R'},


=====================================
src/nco/ncecat.c
=====================================
@@ -356,6 +356,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"path",required_argument,0,'p'},
     {"retain",no_argument,0,'R'},
     {"rtn",no_argument,0,'R'},


=====================================
src/nco/ncflint.c
=====================================
@@ -358,6 +358,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"path",required_argument,0,'p'},
     {"retain",no_argument,0,'R'},
     {"rtn",no_argument,0,'R'},


=====================================
src/nco/ncks.c
=====================================
@@ -601,6 +601,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"print",required_argument,0,'P'},
     {"prn",required_argument,0,'P'},
     {"path",required_argument,0,'p'},


=====================================
src/nco/nco.h
=====================================
@@ -373,7 +373,7 @@ extern "C" {
 # define NCO_VERSION_MINOR 2
 #endif /* !NCO_VERSION_MINOR */
 #ifndef NCO_VERSION_PATCH
-# define NCO_VERSION_PATCH 2
+# define NCO_VERSION_PATCH 3
 #endif /* !NCO_VERSION_PATCH */
 #ifndef NCO_VERSION_NOTE
 # define NCO_VERSION_NOTE "" /* Blank for final versions, non-blank (e.g., "-beta73") for pre-release versions */
@@ -383,7 +383,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 "5.2.2"
+# define NCO_VERSION "5.2.3"
 #endif /* !NCO_VERSION */
 
 /* Compatibility tokens new to netCDF4 netcdf.h: */


=====================================
src/nco/nco_mss_val.c
=====================================
@@ -92,6 +92,7 @@ nco_mss_val_cnf /* [fnc] Change missing_value of var2 to missing_value of var1 *
      2. Change missing_value of var1 to missing_value of var2 when only var2 has a missing_value
      3. Change missing_value of var2 to missing_value of var1 when only var1 has a missing_value
      4. Return false when neither operand has missing value */
+  const char fnc_nm[]="nco_mss_val_cnf()"; /* [sng] Function name */
   int has_mss_val=False; /* [flg] One or both operands have missing value */
   nco_bool MSS_VAL_EQL=False; /* [flg] Missing values of input operands are identical */
   long idx;
@@ -122,7 +123,7 @@ nco_mss_val_cnf /* [fnc] Change missing_value of var2 to missing_value of var1 *
     case NC_UINT64: MSS_VAL_EQL=(*var1->mss_val.ui64p == *var2->mss_val.ui64p); break;
     case NC_STRING: MSS_VAL_EQL=(*var1->mss_val.sngp == *var2->mss_val.sngp); break;
     default: nco_dfl_case_nc_type_err(); break;
-    } /* end switch */
+    } /* !var_typ */
     if(!MSS_VAL_EQL){
       char mss_val_1_sng[NCO_MAX_LEN_FMT_SNG];
       char mss_val_2_sng[NCO_MAX_LEN_FMT_SNG];
@@ -142,7 +143,7 @@ nco_mss_val_cnf /* [fnc] Change missing_value of var2 to missing_value of var1 *
       case NC_UINT64: (void)sprintf(mss_val_1_sng,fmt_sng,var1->mss_val.ui64p[0]); break;
       case NC_STRING: (void)sprintf(mss_val_1_sng,fmt_sng,var1->mss_val.sngp[0]); break;
       default: nco_dfl_case_nc_type_err(); break;
-      } /* end switch */
+      } /* !var_typ */
       fmt_sng=nco_typ_fmt_sng(var2->type);
       switch(var2->type){
       case NC_FLOAT: (void)sprintf(mss_val_2_sng,fmt_sng,var2->mss_val.fp[0]); break;
@@ -158,9 +159,9 @@ nco_mss_val_cnf /* [fnc] Change missing_value of var2 to missing_value of var1 *
       case NC_UINT64: (void)sprintf(mss_val_2_sng,fmt_sng,var2->mss_val.ui64p[0]); break;
       case NC_STRING: (void)sprintf(mss_val_2_sng,fmt_sng,var2->mss_val.sngp[0]); break;
       default: nco_dfl_case_nc_type_err(); break;
-      } /* end switch */
+      } /* !var_typ */
       /* World's most anally formatted warning message... */
-      (void)fprintf(stderr,"%s: WARNING Input variables have different NCO_MSS_VAL_SNG's:\nVariable #1 = %s has NCO_MSS_VAL_SNG type = %s, value = %s\nVariable #2 = %s has NCO_MSS_VAL_SNG type = %s, value = %s\nVariable #3 = output = %s will have NCO_MSS_VAL_SNG type = %s, value = %s\nWill translate values of var2 equaling mss_val2 to mss_val1 before evaluating arithmetic operation to compute var3\n",nco_prg_nm_get(),var1->nm,nco_typ_sng(var1->type),mss_val_1_sng,var2->nm,nco_typ_sng(var2->type),mss_val_2_sng,var1->nm,nco_typ_sng(var1->type),mss_val_1_sng);
+      (void)fprintf(stderr,"%s: WARNING %s reports input variables to binary operand have different missing values (i.e., _FillValue's differ):\nVariable #1 = %s has _FillValue type = %s, value = %s\nVariable #2 = %s has _FillValue type = %s, value = %s\nVariable #3 = output = %s will have _FillValue type = %s, value = %s\nWill translate values of var2 equaling mss_val2 to mss_val1 before evaluating arithmetic operation to compute var3\n",nco_prg_nm_get(),fnc_nm,var1->nm,nco_typ_sng(var1->type),mss_val_1_sng,var2->nm,nco_typ_sng(var2->type),mss_val_2_sng,var1->nm,nco_typ_sng(var1->type),mss_val_1_sng);
     } /* MSS_VAL_EQL */
     (void)cast_nctype_void(var_typ,&var1->mss_val);
     (void)cast_nctype_void(var_typ,&var2->mss_val);
@@ -486,7 +487,7 @@ nco_mss_val_get_unn /* [fnc] Return missing value of variable, if any, as double
      Basically this is a stripped-down, fast version of nco_mss_val_get()
      No matter what type missing_value is on disk, this routine returns a double precision value */
   
-  static nco_bool WRN_FIRST=True; /* [flg] No warnings yet for _FillValue/missing_value mismatch */
+  //  static nco_bool WRN_FIRST=True; /* [flg] No warnings yet for _FillValue/missing_value mismatch */
   
   char att_nm[NC_MAX_NAME];
   char var_nm[NC_MAX_NAME];


=====================================
src/nco/nco_netcdf.c
=====================================
@@ -2487,7 +2487,13 @@ nco_inq_varname(const int nc_id,const int var_id,char * const var_nm)
   int rcd;
   rcd=nc_inq_varname(nc_id,var_id,var_nm);
   if(rcd == NC_ENOTVAR){
-    (void)fprintf(stdout,"ERROR: %s reports specified dataset %d has no variable ID %d\n",fnc_nm,nc_id,var_id);
+    char *path=NULL;
+    size_t pathlen;
+    rcd=nc_inq_path(nc_id,&pathlen,NULL);
+    path=(char *)malloc(pathlen*sizeof(char));
+    rcd=nc_inq_path(nc_id,NULL,path);
+    (void)fprintf(stdout,"ERROR: %s reports specified dataset %s has no variable ID %d\n",fnc_nm,path,var_id);
+    if(path) free(path);
   } /* endif */
   if(rcd != NC_NOERR) nco_err_exit(rcd,"nco_inq_varname()");
   return rcd;


=====================================
src/nco/nco_rgr.c
=====================================
@@ -8,11 +8,12 @@
    3-Clause BSD License with exceptions described in the LICENSE file */
 
 #include "nco_rgr.h" /* Regridding */
-
 extern double min_dbl(double a, double b);
 extern double max_dbl(double a, double b);
 inline double min_dbl(double a, double b){return (a < b) ? a : b;}
 inline double max_dbl(double a, double b){return (a > b) ? a : b;}
+extern int max_int(int a, int b);
+inline int max_int(int a, int b){return (a > b) ? a : b;}
 
 int /* O [enm] Return code */
 nco_rgr_ctl /* [fnc] Control regridding logic */
@@ -1172,7 +1173,7 @@ nco_ntp_vrt /* [fnc] Interpolate vertically */
   long tm_idx=0L; /* [idx] Current timestep */
   long tm_nbr=1L; /* [idx] Number of timesteps in vertical grid */
   long tm_nbr_in=1L; /* [nbr] Number of timesteps in input vertical grid definition */
-  long tm_nbr_out=1L; /* [nbr] Number of timesetps in output vertical grid definition */
+  long tm_nbr_out=1L; /* [nbr] Number of timesteps in output vertical grid definition */
   nco_bool flg_grd_hrz_0D=False; /* [flg] Input data is single vertical column */
   nco_bool flg_grd_hrz_1D=False; /* [flg] Input data is 1D (unstructured) array of vertical columns */
   nco_bool flg_grd_hrz_2D=False; /* [flg] Input data is 2D (structured) array of vertical columns */
@@ -1271,9 +1272,21 @@ nco_ntp_vrt /* [fnc] Interpolate vertically */
       dmn_srt=(long *)nco_malloc((dmn_nbr_out+1)*sizeof(long));
       rcd=nco_inq_vardimid(tpl_id,ps_id,dmn_ids_out);
       rcd=nco_inq_unlimdims(tpl_id,&dmn_nbr_rec,(int *)NULL);
+      /* Time dimension (if any) of PS is normally a record dimension */
+      rcd=nco_inq_unlimdims(tpl_id,&dmn_nbr_rec,NULL);
+      dmn_ids_rec=(int *)nco_malloc(max_int(dmn_nbr_rec,1)*sizeof(int));
       if(dmn_nbr_rec > 0){
-	dmn_ids_rec=(int *)nco_malloc(dmn_nbr_rec*sizeof(int));
-	rcd=nco_inq_unlimdims(tpl_id,&dmn_nbr_rec,dmn_ids_rec);
+	rcd=nco_inq_unlimdims(tpl_id,NULL,dmn_ids_rec);
+      }else if(dmn_nbr_rec == 0){
+	/* 20240329: Unfortunately some important datasets like ERA5 have time as a fixed not record dimension
+	   nco_inq_unlimdims() approach above for getting tm_nbr_out fails in this case
+	   Instead for "time" dimension, if any, and, if found, spoof it (and its size) as a record dimension */
+	int dmn_id_tm_out=NC_MIN_INT; /* [id] Dimension ID for time in output hybrid coordinate PS grid */
+	rcd=nco_inq_dimid_flg(tpl_id,"time",&dmn_id_tm_out);
+	if(rcd == NC_NOERR){
+	  dmn_nbr_rec=1;
+	  dmn_ids_rec[0]=dmn_id_tm_out;
+	} /* !rcd */
       } /* !dmn_nbr_rec */
       for(dmn_idx=0;dmn_idx<dmn_nbr_out;dmn_idx++){
 	rcd=nco_inq_dimlen(tpl_id,dmn_ids_out[dmn_idx],dmn_cnt_out+dmn_idx);
@@ -2047,9 +2060,11 @@ nco_ntp_vrt /* [fnc] Interpolate vertically */
     tm_nbr=tm_nbr_in > tm_nbr_out ? tm_nbr_in : tm_nbr_out;
 
     /* Sanity checks */
-    if(grd_sz_in != grd_sz_out || tm_nbr_in != tm_nbr_out) (void)fprintf(stdout,"%s: ERROR %s reports that temporal or horizontal spatial dimensions differ: grd_sz_in = %ld != %ld = grd_sz_out, and/or tm_nbr_in = %ld != %ld = tm_nbr_out\n",nco_prg_nm_get(),fnc_nm,grd_sz_in,grd_sz_out,tm_nbr_in,tm_nbr_out);
+    if(grd_sz_in != grd_sz_out) (void)fprintf(stdout,"%s: ERROR %s reports that horizontal spatial dimensions of input and output grids differ: grd_sz_in = %ld != %ld = grd_sz_out\n",nco_prg_nm_get(),fnc_nm,grd_sz_in,grd_sz_out);
     assert(grd_sz_in == grd_sz_out);
-    assert(tm_nbr_in == tm_nbr_out);
+    if(tm_nbr_in != tm_nbr_out) (void)fprintf(stdout,"%s: WARNING %s reports that temporal dimensions of input and output vertical grids differ, results unpredictable: tm_nbr_in = %ld != %ld = tm_nbr_out\n",nco_prg_nm_get(),fnc_nm,tm_nbr_in,tm_nbr_out);
+    // 20240329: following lines prevents single pure pressure grid ERA5 timeseries from interpolating to hybrid PS timeseries
+    //assert(tm_nbr_in == tm_nbr_out);
 
     dpt_mdp_in=(double *)nco_malloc_dbg(tm_nbr_in*lev_nbr_in*grd_sz_in*nco_typ_lng(var_typ_rgr),fnc_nm,"Unable to malloc() dpt_mdp_in value buffer");
 
@@ -2321,7 +2336,9 @@ nco_ntp_vrt /* [fnc] Interpolate vertically */
        These are not necessarily the same as the number of timesteps in either file
        Time-invariant hybrid or pure-pressure coordinates are valid vertical grids for timeseries
        Usually hybrid grids have as many timesteps in the grids as in the timeseries 
-       Usually pressure grids are time-invariant (as of 20190511 time-varying pure pressure grids are still not supported)
+       Usually pressure grids are time-invariant (time-varying pure pressure grids have never been supported)
+       20240326:
+       ERA5 time-invariant pure pressure grid input file with timeseries variables 
        This implementation interpolates timeseries to/from time-invariant vertical grids in one OpenMP call! */
     if(tm_nbr_in > 1L || tm_nbr_out > 1L){
       if(tm_nbr_in > tm_nbr_out) assert((float)tm_nbr_in/(float)tm_nbr_out == tm_nbr_in/tm_nbr_out); else assert((float)tm_nbr_out/(float)tm_nbr_in == tm_nbr_out/tm_nbr_in);
@@ -2329,9 +2346,11 @@ nco_ntp_vrt /* [fnc] Interpolate vertically */
     tm_nbr=tm_nbr_in > tm_nbr_out ? tm_nbr_in : tm_nbr_out;
 
     /* Sanity checks */
-    if(grd_sz_in != grd_sz_out || tm_nbr_in != tm_nbr_out) (void)fprintf(stdout,"%s: ERROR %s reports that temporal or horizontal spatial dimensions differ: grd_sz_in = %ld != %ld = grd_sz_out, and/or tm_nbr_in = %ld != %ld = tm_nbr_out\n",nco_prg_nm_get(),fnc_nm,grd_sz_in,grd_sz_out,tm_nbr_in,tm_nbr_out);
+    if(grd_sz_in != grd_sz_out) (void)fprintf(stdout,"%s: ERROR %s reports that horizontal spatial dimensions of input and output grids differ: grd_sz_in = %ld != %ld = grd_sz_out\n",nco_prg_nm_get(),fnc_nm,grd_sz_in,grd_sz_out);
     assert(grd_sz_in == grd_sz_out);
-    assert(tm_nbr_in == tm_nbr_out);
+    if(tm_nbr_in != tm_nbr_out) (void)fprintf(stdout,"%s: INFO %s reports that temporal dimensions of input and output vertical grids differ: tm_nbr_in = %ld != %ld = tm_nbr_out\n",nco_prg_nm_get(),fnc_nm,tm_nbr_in,tm_nbr_out);
+    // 20240329: following lines prevents single pure pressure grid ERA5 timeseries from interpolating to hybrid PS timeseries
+    //assert(tm_nbr_in == tm_nbr_out);
 
     ps_in=(double *)nco_malloc_dbg(tm_nbr_in*grd_sz_in*nco_typ_lng(var_typ_rgr),fnc_nm,"Unable to malloc() ps_in value buffer");
 
@@ -2356,7 +2375,7 @@ nco_ntp_vrt /* [fnc] Interpolate vertically */
     } /* !ps_id_tpl */
   } /* !flg_grd_in_hyb, !flg_grd_out_hyb */
 
-  if(nco_dbg_lvl_get() >= nco_dbg_scl) (void)fprintf(stdout,"%s: INFO temporal and spatial dimensions: grd_sz_in = grd_sz_out = %ld, tm_nbr_in = tm_nbr_out = %ld\n",nco_prg_nm_get(),grd_sz_in,tm_nbr_in);
+  if(nco_dbg_lvl_get() >= nco_dbg_scl) (void)fprintf(stdout,"%s: INFO temporal and spatial dimensions of horizontal and vertical grids: grd_sz_in = grd_sz_out = %ld, tm_nbr_in = %ld, tm_nbr_out = %ld\n",nco_prg_nm_get(),grd_sz_in,tm_nbr_in,tm_nbr_out);
 
   /* Compare input and output surface pressure fields to determine whether subterranean extrapolation required */
   nco_bool flg_add_msv_att; /* [flg] Extrapolation requires _FillValue */
@@ -2832,6 +2851,7 @@ nco_ntp_vrt /* [fnc] Interpolate vertically */
     rcd+=nco_def_var(out_id,"P0",crd_typ_out,dmn_nbr_0D,(int *)NULL,&p0_id);
     if(nco_cmp_glb_get()) rcd+=nco_flt_def_out(out_id,p0_id,NULL,nco_flt_flg_prc_fll);
     var_crt_nbr++;
+    
     if(flg_grd_hyb_cameam) rcd+=nco_def_var(out_id,ps_nm_out,crd_typ_out,dmn_nbr_ps,dmn_ids_out,&ps_id);
     if(flg_grd_hyb_ecmwf){
       /* Remove degenerate ECMWF vertical dimension so that output PS has dmn_nbr_ps-1 not dmn_nbr_ps dimensions */


=====================================
src/nco/nco_scm.c
=====================================
@@ -210,7 +210,7 @@ nco_nmn_get(void) /* [fnc] Return mnemonic that describes current NCO version */
   /* Purpose: Return mnemonic describing current NCO version
      20191221: ncremap/ncclimo print left quote and first word of this string, so one-word strings look best
      20200117: fixed this limitation, multi-word versions work fine */
-  return "Bambino";
+  return "Cowboy Carter";
 } /* !nco_nmn_get() */
 
 void


=====================================
src/nco/ncpdq.c
=====================================
@@ -361,6 +361,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"pack_policy",required_argument,0,'P'},
     {"pck_plc",required_argument,0,'P'},
     {"path",required_argument,0,'p'},


=====================================
src/nco/ncra.c
=====================================
@@ -465,6 +465,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"path",required_argument,0,'p'},
     {"pack",required_argument,0,'P'},
     {"retain",no_argument,0,'R'},


=====================================
src/nco/ncrename.c
=====================================
@@ -217,6 +217,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"path",required_argument,0,'p'},
     {"revision",no_argument,0,'r'},
     {"variable",required_argument,0,'v'},


=====================================
src/nco/ncwa.c
=====================================
@@ -393,6 +393,7 @@ main(int argc,char **argv)
     {"ovr",no_argument,0,'O'},
     {"output",required_argument,0,'o'},
     {"fl_out",required_argument,0,'o'},
+    {"out_fl",required_argument,0,'o'},
     {"path",required_argument,0,'p'},
     {"retain",no_argument,0,'R'},
     {"rtn",no_argument,0,'R'},



View it on GitLab: https://salsa.debian.org/debian-gis-team/nco/-/commit/589b24beb5aa69ade1ce53f30f9522ba62bfac06

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/nco/-/commit/589b24beb5aa69ade1ce53f30f9522ba62bfac06
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20240404/5c6ef6e6/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list