[Git][debian-gis-team/nco][upstream] New upstream version 5.3.6
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Wed Oct 29 04:47:00 GMT 2025
Bas Couwenberg pushed to branch upstream at Debian GIS Project / nco
Commits:
f3602ae9 by Bas Couwenberg at 2025-10-29T05:41:05+01:00
New upstream version 5.3.6
- - - - -
19 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/nco.h
- src/nco/nco_grp_utl.c
- src/nco/nco_map.c
- src/nco/nco_rgr.c
- src/nco/nco_scm.c
Changes:
=====================================
bld/nco.spec
=====================================
@@ -2,17 +2,17 @@
# http://cvs.fedoraproject.org/viewvc/devel/nco/nco.spec?view=co
Name: nco
-Version: 5.3.5
+Version: 5.3.6
Release: 1%{?dist}
Summary: Programs that manipulate netCDF files
Group: Applications/Engineering
License: BSD
URL: http://nco.sf.net/
-# Obtain NCO version 5.3.5-1 tar.gz from Sourceforge using CVS:
+# Obtain NCO version 5.3.6-1 tar.gz from Sourceforge using CVS:
# cvs -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco login
-# cvs -z3 -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco co -r nco-5.3.5-1 -d nco-%{version} nco
-# tar czf nco-%{version}.tar.gz --exclude='nco-5.3.5/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude='ncap_yacc.[ch]' ./nco-%{version}
+# cvs -z3 -d:pserver:anonymous at nco.cvs.sf.net:/cvsroot/nco co -r nco-5.3.6-1 -d nco-%{version} nco
+# tar czf nco-%{version}.tar.gz --exclude='nco-5.3.6/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude='ncap_yacc.[ch]' ./nco-%{version}
Source0: nco-%{version}.tar.gz
#Patch0: nco_install_C_headers.patch
#Patch1: nco_find_udunits-dat.patch
@@ -108,6 +108,9 @@ fi
# %{_libdir}/libnco++.so
%changelog
+* Tue Oct 28 2025 Charlie Zender <zender at uci.edu> - 5.3.6-1
+- new upstream 5.3.6
+
* Thu Sep 25 2025 Charlie Zender <zender at uci.edu> - 5.3.5-1
- new upstream 5.3.5
=====================================
bld/nco_dst.pl
=====================================
@@ -5,20 +5,20 @@
# Usage:
# Export tagged, public versions
-# /usr/bin/scp ${DATA}/nco-5.3.5.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
-
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-5.3.5 # Build, do not release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-5.3.5 # Build, release on SF
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-5.3.5 # Install, do not build
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-5.3.5 # Build and install
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-5.3.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-5.3.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-5.3.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-5.3.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-5.3.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-5.3.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-5.3.5
-# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-5.3.5
+# /usr/bin/scp ${DATA}/nco-5.3.6.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-5.3.6 # Build, do not release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-5.3.6 # Build, release on SF
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-5.3.6 # Install, do not build
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-5.3.6 # Build and install
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-5.3.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-5.3.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-5.3.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-5.3.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-5.3.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-5.3.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-5.3.6
+# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-5.3.6
# Export daily snapshot
# ${HOME}/nco/bld/nco_dst.pl --dbg=2
@@ -256,7 +256,7 @@ if($bld){
# Set up FTP server
chdir $dst_pth_pfx or die "$prg_nm: ERROR unable to chdir to $dst_pth_pfx: $!\n"; # $! is system error string
cmd_prc("$cp_cmd $doc_fl ./$dst_vrs/doc"); # Copy derived documentation to source directory
- cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-5.3.5/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude=ncap_yacc.[ch] ./$dst_vrs"); # Create gzipped tarfile
+ cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-5.3.6/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude=ncap_yacc.[ch] ./$dst_vrs"); # Create gzipped tarfile
cmd_prc("$rsh_cmd $www_mch $rm_cmd $www_drc/src/$dst_fl"); # Remove any distribution with same name
if($dly_snp){cmd_prc("$rsh_cmd $www_mch $rm_cmd -r $www_drc/src/nco-????????.tar.gz");} # Remove previous daily snapshots from WWW server
cmd_prc("$rcp_cmd $dst_fl $www_mch:$www_drc/src"); # Copy local tarfile to WWW server
=====================================
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.3.5.
+# Generated by GNU Autoconf 2.72 for NCO netCDF Operators 5.3.6.
#
# 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.3.5'
-PACKAGE_STRING='NCO netCDF Operators 5.3.5'
+PACKAGE_VERSION='5.3.6'
+PACKAGE_STRING='NCO netCDF Operators 5.3.6'
PACKAGE_BUGREPORT='nco-bugs at lists.sourceforge.net'
PACKAGE_URL=''
@@ -1426,7 +1426,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.3.5 to adapt to many kinds of systems.
+'configure' configures NCO netCDF Operators 5.3.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1498,7 +1498,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of NCO netCDF Operators 5.3.5:";;
+ short | recursive ) echo "Configuration of NCO netCDF Operators 5.3.6:";;
esac
cat <<\_ACEOF
@@ -1670,7 +1670,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-NCO netCDF Operators configure 5.3.5
+NCO netCDF Operators configure 5.3.6
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2449,7 +2449,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.3.5, which was
+It was created by NCO netCDF Operators $as_me 5.3.6, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -4556,7 +4556,7 @@ fi
# Define the identity of the package.
PACKAGE='nco'
- VERSION='5.3.5'
+ VERSION='5.3.6'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -23181,7 +23181,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.3.5, which was
+This file was extended by NCO netCDF Operators $as_me 5.3.6, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23249,7 +23249,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.3.5
+NCO netCDF Operators config.status 5.3.6
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.3.5],[nco-bugs at lists.sourceforge.net],[nco])
+AC_INIT([NCO netCDF Operators],[5.3.6],[nco-bugs at lists.sourceforge.net],[nco])
# Print GNU copyright in configure script
AC_COPYRIGHT
=====================================
configure.eg
=====================================
@@ -354,9 +354,9 @@ scp nco.configure.foo nco.config.log.foo nco.libtool.foo nco.make.foo dust.ess.u
export LINUX_CC='gcc -std=c99 -pedantic -D_DEFAULT_SOURCE'
export LINUX_CXX='g++ -std=c++11'
export LINUX_FC='gfortran'
-export NETCDF_ROOT=/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest
-export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest/lib
-export PATH=${PATH}:/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest/bin
+export NETCDF_ROOT=/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/andes
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/andes/lib
+export PATH=${PATH}:/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/andes/bin
cd ~/nco;git reset --hard origin/master
cd ~/nco;CC=${LINUX_CC} CXX=${LINUX_CXX} NETCDF_ROOT=${HOME}/anaconda ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.foo 2>&1
# !Andes
@@ -420,9 +420,9 @@ cd ~/nco;/bin/rm -f *.foo;make distclean
export LINUX_CC='gcc -std=c99 -pedantic -D_DEFAULT_SOURCE -fopenmp'
export LINUX_CXX='g++ -std=c++11 -fopenmp'
export LINUX_FC='gfortran'
-export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest/lib
-export NETCDF_ROOT=/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest
-export PATH=${PATH}:/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest/bin
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco/chrysalis/lib
+export NETCDF_ROOT=/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco/chrysalis
+export PATH=${PATH}:/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco/chrysalis/bin
cd ~/nco;git reset --hard origin/master
cd ~/nco;CC=${LINUX_CC} CXX=${LINUX_CXX} NETCDF_ROOT=${HOME}/anaconda ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.foo 2>&1
/bin/cp -f config.log nco.config.log.foo
@@ -507,12 +507,12 @@ export LINUX_FC='gfortran'
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HOME}/anaconda/lib
export NETCDF_ROOT=${HOME}/anaconda
export PATH=${PATH}:${HOME}/anaconda/bin
-#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest/lib
-#export NETCDF_ROOT=/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest
-#export PATH=${PATH}:/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest/bin
+#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier/lib
+#export NETCDF_ROOT=/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier
+#export PATH=${PATH}:/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier/bin
cd ~/nco;git reset --hard origin/master
cd ~/nco/bld;make ANTLR_ROOT=${HOME}/anaconda ANTLR_LIB=${HOME}/anaconda NETCDF_ROOT=${HOME}/anaconda OPTS=D OMP=Y allinone;cd -
-cd ~/nco/bld;make ANTLR_ROOT=${HOME} ANTLR_LIB=${MY_LIB_DIR} NETCDF_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest' OPTS=D OMP=Y allinone;cd -
+cd ~/nco/bld;make ANTLR_ROOT=${HOME} ANTLR_LIB=${MY_LIB_DIR} NETCDF_ROOT='/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier' OPTS=D OMP=Y allinone;cd -
# !Frontier
# gcc/g++ Zender uses this to develop/install/update netCDF4-enabled NCO in personal directories on Perlmutter with GNU:
@@ -528,12 +528,12 @@ cd ~/nco;/bin/rm -f *.foo;make distclean
export LINUX_CC='gcc -std=c99 -pedantic -D_DEFAULT_SOURCE'
export LINUX_CXX='g++ -std=c++11'
export LINUX_FC='gfortran'
-export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest/lib
-export NETCDF_ROOT=/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest
-export PATH=${PATH}:/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest/bin
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu/lib
+export NETCDF_ROOT=/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu
+export PATH=${PATH}:/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu/bin
cd ~/nco;git reset --hard origin/master
cd ~/nco;CC=${LINUX_CC} CXX=${LINUX_CXX} NETCDF_ROOT=${HOME}/anaconda ./configure --prefix=${HOME} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.foo 2>&1
-cd ~/nco;CC=${LINUX_CC} CPPFLAGS="-I${DATA}/anaconda/include -I/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest/include" CXX=${LINUX_CXX} LDFLAGS="-L${DATA}/anaconda/lib -L/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest/lib" NETCDF_ROOT=${DATA}/anaconda UDUNITS2_ROOT=${HOME} ./configure --prefix=${DATA} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.foo 2>&1
+cd ~/nco;CC=${LINUX_CC} CPPFLAGS="-I${DATA}/anaconda/include -I/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu/include" CXX=${LINUX_CXX} LDFLAGS="-L${DATA}/anaconda/lib -L/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu/lib" NETCDF_ROOT=${DATA}/anaconda UDUNITS2_ROOT=${HOME} ./configure --prefix=${DATA} --bindir=${MY_BIN_DIR} --datadir=${HOME}/nco/data --libdir=${MY_LIB_DIR} --mandir=${HOME}/nco/man > nco.configure.foo 2>&1
/bin/cp -f config.log nco.config.log.foo
/bin/cp -f libtool nco.libtool.foo
make clean;make > nco.make.foo 2>&1
=====================================
data/ncclimo
=====================================
@@ -144,15 +144,27 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
andes* )
# 20190827: Must guarantee finding mpirun
source ${MODULESHOME}/init/sh # 20150607: PMC Ensures find module commands will be found
- E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
- export PATH='/ccs/home/zender/bin_andes'\:${PATH}
+ if [ -d '/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/andes'
+ else
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
+ export PATH='/ccs/home/zender/bin_andes'\:${PATH}
export LD_LIBRARY_PATH='/ccs/home/zender/lib_andes'\:${E3SMU_ROOT}/lib\:${LD_LIBRARY_PATH} ; ;;
blues* | blogin* | b[0123456789][0123456789][0123456789] )
- E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco/anvil'
+ else
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
export PATH='/home/zender/bin_blues'\:${PATH}
export LD_LIBRARY_PATH='/home/zender/lib_blues'\:${E3SMU_ROOT}/lib\:${LD_LIBRARY_PATH} ; ;;
chrysalis* | chrlogin* | chr-[0123456789][0123456789][0123456789][0123456789] )
- E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco/chrysalis'
+ else
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
export PATH='/home/ac.zender/bin_chrysalis'\:${PATH}
export LD_LIBRARY_PATH='/home/ac.zender/lib_chrysalis:/home/ac.zender/anaconda/lib'\:${E3SMU_ROOT}/lib\:${LD_LIBRARY_PATH} ; ;;
compy* | n[0123456789][0123456789][0123456789][0123456789] )
@@ -161,7 +173,11 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
# 20210519: This script takes significant time (5-10 seconds) to load
# 20230914: Deprecate special MOAB paths, rely on E3SMU
# source /compyfs/software/mbtempest.envs.sh
- E3SMU_ROOT='/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_latest'
+ if [ -d '/share/apps/E3SM/conda_envs/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/share/apps/E3SM/conda_envs/e3smu_latest_for_nco/compy'
+ else
+ E3SMU_ROOT='/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_latest'
+ fi
export PATH='/qfs/people/zender/bin:/qfs/people/zender/anaconda/bin'\:${PATH}
export LD_LIBRARY_PATH='/qfs/people/zender/lib:/qfs/people/zender/anaconda/lib'\:${LD_LIBRARY_PATH} ; ;;
derecho* )
@@ -180,13 +196,21 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
export LD_LIBRARY_PATH='/home/zender/lib:/home/zender/anaconda/lib'\:${LD_LIBRARY_PATH} ; ;;
frontier* )
if [ ${spt_nm} = 'ncremap' ]; then
- E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier'
+ else
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
fi # !ncremap
export PATH='/ccs/home/zender/bin_frontier:/ccs/home/zender/anaconda/bin'\:${PATH}
export LD_LIBRARY_PATH='/ccs/home/zender/lib_frontier:/ccs/home/zender/anaconda/lib'\:${LD_LIBRARY_PATH} ; ;;
login[0123456789][0123456789] ) # 20230831 Frontier and Perlmutter login nodes share this name :(
if [ "${LMOD_SYSTEM_NAME}" = 'frontier' ]; then
- E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier'
+ else
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
export PATH='/ccs/home/zender/bin_frontier:/ccs/home/zender/anaconda/bin'\:${PATH}
export LD_LIBRARY_PATH='/ccs/home/zender/lib_frontier:/ccs/home/zender/anaconda/lib'\:${LD_LIBRARY_PATH}
elif [ "${LMOD_SYSTEM_NAME}" = 'perlmutter' ]; then
@@ -196,7 +220,11 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
module load cray-netcdf/4.9.0.9
MOAB_ROOT=/project/projectdirs/e3sm/software/moab
TEMPESTREMAP_ROOT=/project/projectdirs/e3sm/software/tempestremap
- E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ if [ -d '/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu'
+ else
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ fi
if [ -n "${NCARG_ROOT}" ]; then
export PATH="${PATH}:${NCARG_ROOT}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${NCARG_ROOT}/lib"
@@ -212,7 +240,11 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
module load cray-netcdf/4.9.0.9
MOAB_ROOT=/project/projectdirs/e3sm/software/moab
TEMPESTREMAP_ROOT=/project/projectdirs/e3sm/software/tempestremap
- E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ if [ -d '/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu'
+ else
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ fi
if [ -n "${NCARG_ROOT}" ]; then
export PATH="${PATH}:${NCARG_ROOT}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${NCARG_ROOT}/lib"
@@ -237,6 +269,7 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
# Append E3SM-U binaries to _end_ of PATH so NCO binaries not redirected, e.g., from CSZ's development directory to E3SM-U
if [ -n "${E3SMU_ROOT}" ] && [ ${spt_nm} = 'ncremap' ]; then
export PATH="${PATH}:${E3SMU_ROOT}/bin"
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${E3SMU_ROOT}/lib"
fi # !E3SMU_ROOT
fi # !hrd_pth && !NCO_PATH_OVERRIDE
=====================================
data/ncremap
=====================================
@@ -161,15 +161,27 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
andes* )
# 20190827: Must guarantee finding mpirun
source ${MODULESHOME}/init/sh # 20150607: PMC Ensures find module commands will be found
- E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
- export PATH='/ccs/home/zender/bin_andes'\:${PATH}
+ if [ -d '/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/andes'
+ else
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
+ export PATH='/ccs/home/zender/bin_andes'\:${PATH}
export LD_LIBRARY_PATH='/ccs/home/zender/lib_andes:/ccs/home/zender/anaconda/lib'\:${E3SMU_ROOT}/lib\:${LD_LIBRARY_PATH} ; ;;
blues* | blogin* | b[0123456789][0123456789][0123456789] )
- E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco/anvil'
+ else
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
export PATH='/home/zender/bin_blues'\:${PATH}
export LD_LIBRARY_PATH='/home/zender/lib_blues'\:${E3SMU_ROOT}/lib\:${LD_LIBRARY_PATH} ; ;;
chrysalis* | chrlogin* | chr-[0123456789][0123456789][0123456789][0123456789] )
- E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/e3smu_latest_for_nco/chrysalis'
+ else
+ E3SMU_ROOT='/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
export PATH='/home/ac.zender/bin_chrysalis'\:${PATH}
export LD_LIBRARY_PATH='/home/ac.zender/lib_chrysalis:/home/ac.zender/anaconda/lib'\:${E3SMU_ROOT}/lib\:${LD_LIBRARY_PATH} ; ;;
compy* | n[0123456789][0123456789][0123456789][0123456789] )
@@ -178,7 +190,11 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
# 20210519: This script takes significant time (5-10 seconds) to load
# 20230914: Deprecate special MOAB paths, rely on E3SMU
# source /compyfs/software/mbtempest.envs.sh
- E3SMU_ROOT='/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_latest'
+ if [ -d '/share/apps/E3SM/conda_envs/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/share/apps/E3SM/conda_envs/e3smu_latest_for_nco/compy'
+ else
+ E3SMU_ROOT='/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_latest'
+ fi
export PATH='/qfs/people/zender/bin:/qfs/people/zender/anaconda/bin'\:${PATH}
export LD_LIBRARY_PATH='/qfs/people/zender/lib:/qfs/people/zender/anaconda/lib'\:${LD_LIBRARY_PATH} ; ;;
derecho* )
@@ -197,13 +213,21 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
export LD_LIBRARY_PATH='/home/zender/lib:/home/zender/anaconda/lib'\:${LD_LIBRARY_PATH} ; ;;
frontier* )
if [ ${spt_nm} = 'ncremap' ]; then
- E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier'
+ else
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
fi # !ncremap
export PATH='/ccs/home/zender/bin_frontier:/ccs/home/zender/anaconda/bin'\:${PATH}
export LD_LIBRARY_PATH='/ccs/home/zender/lib_frontier:/ccs/home/zender/anaconda/lib'\:${LD_LIBRARY_PATH} ; ;;
login[0123456789][0123456789] ) # 20230831 Frontier and Perlmutter login nodes share this name :(
if [ "${LMOD_SYSTEM_NAME}" = 'frontier' ]; then
- E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ if [ -d '/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/e3smu_latest_for_nco/frontier'
+ else
+ E3SMU_ROOT='/ccs/proj/cli115/software/e3sm-unified/base/envs/e3sm_unified_latest'
+ fi
export PATH='/ccs/home/zender/bin_frontier:/ccs/home/zender/anaconda/bin'\:${PATH}
export LD_LIBRARY_PATH='/ccs/home/zender/lib_frontier:/ccs/home/zender/anaconda/lib'\:${LD_LIBRARY_PATH}
elif [ "${LMOD_SYSTEM_NAME}" = 'perlmutter' ]; then
@@ -213,7 +237,11 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
module load cray-netcdf/4.9.0.9
MOAB_ROOT=/project/projectdirs/e3sm/software/moab
TEMPESTREMAP_ROOT=/project/projectdirs/e3sm/software/tempestremap
- E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ if [ -d '/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu'
+ else
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ fi
if [ -n "${NCARG_ROOT}" ]; then
export PATH="${PATH}:${NCARG_ROOT}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${NCARG_ROOT}/lib"
@@ -229,7 +257,11 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
module load cray-netcdf/4.9.0.9
MOAB_ROOT=/project/projectdirs/e3sm/software/moab
TEMPESTREMAP_ROOT=/project/projectdirs/e3sm/software/tempestremap
- E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ if [ -d '/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco' ]; then
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/e3smu_latest_for_nco/pm-cpu'
+ else
+ E3SMU_ROOT='/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_latest'
+ fi
if [ -n "${NCARG_ROOT}" ]; then
export PATH="${PATH}:${NCARG_ROOT}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${NCARG_ROOT}/lib"
@@ -254,6 +286,7 @@ if [ "${hrd_pth}" = 'Yes' ] && [ "${NCO_PATH_OVERRIDE}" = 'Yes' ]; then
# Append E3SM-U binaries to _end_ of PATH so NCO binaries not redirected, e.g., from CSZ's development directory to E3SM-U
if [ -n "${E3SMU_ROOT}" ] && [ ${spt_nm} = 'ncremap' ]; then
export PATH="${PATH}:${E3SMU_ROOT}/bin"
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${E3SMU_ROOT}/lib"
fi # !E3SMU_ROOT
fi # !hrd_pth && !NCO_PATH_OVERRIDE
@@ -1491,7 +1524,7 @@ elif [ ${wgt_typ} = 'esmf' ]; then
wgt_exe="${wgt_exe_esmf}"
wgt_opt="${wgt_opt_esmf}"
elif [ ${wgt_typ} = 'nco' ]; then
- if [ "${alg_opt}" = 'nco_idw' ]; then
+ if [ "${alg_opt}" = 'ncoidw' ]; then
wgt_opt_nco="${wgt_opt_nco} --rgr wgt_typ=${alg_opt} --rgr xtr_nsp=${xtr_nsp} --rgr xtr_xpn=${xtr_xpn}"
fi # alg_opt
wgt_cmd="${wgt_exe_nco}"
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+nco (5.3.6-1) unstable; urgency=low
+
+ * new upstream version Goff Island: ncremap/ncks: Fix 5.3.5 row/col check, nco_idw=ncoidw; ncremap/ncclimo: E3SMU_PATH for v1.12; ncclimo lndgrid is 2D
+
+ -- Charlie Zender <zender at uci.edu> Tue, 28 Nov 2025 12:26:23 -0700
+
nco (5.3.5-1) unstable; urgency=low
* new upstream version Playground: all: quiet dbg output, --var_lst = -v; ncks: add mask_a/b dgn; ncclimo/ncremap: Fix OpenMP w/ GCC, add par doc, dgn bad map row/col, --npo refactor, plev xtr fl
=====================================
doc/ANNOUNCE
=====================================
@@ -1,79 +1,50 @@
$Header$ -*-text-*-
-netCDF Operators NCO version 5.3.5 strikes a chord
+netCDF Operators NCO version 5.3.6 makes landfall
http://nco.sf.net (Homepage, Mailing lists, Help)
http://github.com/nco/nco (Source Code, Issues, Releases)
What's new?
-Version 5.3.5 contains mostly speed, robustness, and documentation
-improvements for the regridder. The ability to select alternate
-executable and library paths for testing snapshots is also improved.
-Skip this release if these changes do not interest you.
+Version 5.3.6 consists mainly of bugfixes:
+There is a regridder fix that prevent it from failing to work
+with some regional destination grids (global grids are not affected).
+ncclimo fixes an issue computing global timeseries from ELM/CLM data
+on unstructured grids, e.g., from "bigrid" ESM simulations.
+Smaller fixes abound, including to the map-checker.
+Regridder should upgrade. Others may skip this release.
Enjoy,
Charlie
NEW FEATURES (full details always in ChangeLog):
-A. The map checker (ncks --chk_map) is more robust and clear in its
-reports. For robustness, the checker now ensures that all row/col
-indices are valid before attempting to use them. Illegal values are
-summarized and printed. The regridder also does now. Illegal values
-previously caused the checker and regridder to die with baffling
-core-dumps. Conservation and Consistency metrics now include
-plain-language definitions.
-
-B. The ncremap tutorial on the E3SM Confluence page
+A. The ncremap tutorial on the E3SM Confluence page
https://e3sm.atlassian.net/wiki/spaces/DOC/pages/edit-v2/754286611
-now contains extensive documentation on how to exploit the three types
+contains still more documentation on how to exploit the three types
of parallelism (node-, workflow-, and thread-level) supported by
-ncremap. New examples show the scaling of performance with OpenMP
-threads for regridding and for weight-generation.
-
-C. The --npo (NCO Path Override) option allows other users to
-easily test bleeding-edge features present in development versions
-of NCO in C. Zender's home directories at DOE HPC centers.
-This feature has been updated to work with the latest paths on Andes,
-Chrysalis, and Perlmutter.
-http://nco.sf.net/nco.html#npo
-http://nco.sf.net/nco.html#nco_path_override
-
-D. All operators that accept -v as the option to indicate
-a list of variables now also accept --var_lst. This makes
-the binary executables consistent with ncremap/ncclimo.
-http://nco.sf.net/nco.html#var_lst
-
-E. plev can now be a full path name. Previously the pressure
-levels for vertical interpolation were always contained in
-the destination vertical grid file. However, pure pressure
-vertical grids require only the plev variable so requiring
-that variable to be in its own file was unnecessary. Now the 'plev'
-variable can be specified as a full path name, e.g.,
---vrt=/home/bar/data.nc/plev. Here the variable "plev" will
-be searched for in the file /home/bar/data.nc. This is similar to the
-way the surface pressure ps for hybrid sigma-pressure coordinates can
-be a full-pathname. This is the first step to supporting 3D pressure
-fields as target grids.
-ncremap --vrt=/path/to/file.nc/plev in.nc out.nc
-http://nco.sf.net/nco.html#vrt
+ncremap.
BUG FIXES:
-A. GCC-compiled executables once again have working OpenMP parallelism
-in the regridder. Previously only Clang or Intel-compiled executables
-could access OpenMP parallelism in the regridder. GCC-compiled
-installations always used one thread, no matter how many were
-requested via --thr_nbr=# threads or OMP_NUM_THREADS. An incorrect CPP
-token caused this misbehavior. Now both horizontal regridding and
-vertical interpolation adhere to the requested parallelism. OpenMP
-increases throughput by about a factor of two, so users of this update
-may notice significant speed improvements. Safeguards and additional
-checks have been implemented to prevent this problem from occuring
-again. There is no workaround, users must upgrade to exploit OpenMP
-while regridding with GCC-compiled installations.
-http://nco.sf.net/nco.html#thr_nbr
-http://nco.sf.net/nco.html#thr_nbr_ncremap
+A. The map checker (ncks --chk_map) and regridder robustness check
+implemented in 5.3.5 contained a bug that affected regional
+destination grids. The bug could cause these tools to report correct
+mapfiles as invalid. This has been fixed. The solution is to upgrade
+to 5.3.6 or downgrade to 5.3.4.
+
+B. The regridder now accepts 'nco_idw' and 'ncoidw' as synonyms for
+NCO's inverse-distance-weighted algorithm. 'nco_idw' was not
+recognized on some earlier versions. Thanks to Zachary Moon for
+reporting this.
+
+C. ncclimo's 5.3.5 feature to automatically detect surface fields
+did not recognized the 'lndgrid' dimension of ELM and CLM as
+indicating a horizontal spatial dimension. This prevented ncclimo
+from constructing automated spatial timeseries averages of datasets
+on native unstructured grids. That is now fixed. The workaround is
+to downgrade to version 5.3.3 and explicitly specify the desired
+fields. The solution is to upgrade.
Full release statement at http://nco.sf.net/ANNOUNCE
=====================================
doc/ChangeLog
=====================================
@@ -1,3 +1,43 @@
+2025-10-28 Charlie Zender <zender at uci.edu>
+
+ * NCO 5.3.6 release procedure:
+ cd ~/nco;git commit -a -m 'Version 5.3.6: Goff Island';git push
+ git tag -a 5.3.6 -m 'ncremap/ncks: Fix 5.3.5 row/col check, nco_idw=ncoidw; ncremap/ncclimo: E3SMU_PATH for v1.12; ncclimo lndgrid is 2D';git push --tags
+
+2025-10-27 Charlie Zender <zender at uci.edu>
+
+ * Merge changes to E3SMU_PATH by Andrew Nolan into ncremap/ncclimo
+
+2025-10-17 Charlie Zender <zender at uci.edu>
+
+ * nco_grd_nfr() Add stubs to correctly infer corners of 2D regional grids that cross longitude branch cut
+
+2025-10-16 Charlie Zender <zender at uci.edu>
+
+ * NCO 5.3.6-alpha02 release procedure:
+ cd ~/nco;git commit -a -m 'Version 5.3.6-alpha02: Casa Chimayo';git push
+ git tag -a 5.3.6-alpha02 -m 'ncclimo/ncremap: E3SMU_PATH/lib; ncremap ncoidw fix, row/col chk sz fix';git push --tags
+
+ * Fix 20250905 row/col sanity check to use correct size
+
+ * ncks: map-checker print filename first so batch invocation informs reader of current map-file
+
+2025-10-09 Charlie Zender <zender at uci.edu>
+
+ * Change ncremap nco_idw to new normalized name ncoidw. Fixes GitHub Issue #295 from Zachary Moon.
+
+2025-10-08 Charlie Zender <zender at uci.edu>
+
+ * Add E3SMU_PATH/lib to ncclimo/ncremap
+
+2025-09-29 Charlie Zender <zender at uci.edu>
+
+ * NCO 5.3.6-alpha01 release procedure:
+ cd ~/nco;git commit -a -m 'Version 5.3.6-alpha01: Alien: Earth';git push
+ git tag -a 5.3.6-alpha01 -m 'Functionally identical to 5.3.5 plus nco_is_hrz() fix';git push --tags
+
+ * nco_is_hrz() add lndgrid as valid 1D horizontal dimension, fixes ncclimo timeseries generation on bigrid data
+
2025-09-25 Charlie Zender <zender at uci.edu>
* NCO 5.3.5 release procedure:
=====================================
doc/VERSION
=====================================
@@ -1 +1 @@
-5.3.5
+5.3.6
=====================================
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.3.5
- First we create a clean source distribution of nco and place it in nco-5.3.5
+ For starters, we wish to create .debs of tagged releases, e.g., nco-5.3.6
+ First we create a clean source distribution of nco and place it in nco-5.3.6
Until we know what is necessary, however, we just copy a snapshot
2.1 Clean all build files from development directory
cd ~/nco;make distclean;cd bld;make clean;cd ~
tar cvzf ./nco/nco.tar.gz ./nco/*
-cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-5.3.5
-/bin/rm nco.tar.gz;tar cvzf nco-5.3.5.tar.gz ./nco-5.3.5/*
-cd ~/nco/nco-5.3.5
-dh_make -e zender at uci.edu -f ../nco-5.3.5.tar.gz
+cd ~/nco;tar xvzf nco.tar.gz;mv nco nco-5.3.6
+/bin/rm nco.tar.gz;tar cvzf nco-5.3.6.tar.gz ./nco-5.3.6/*
+cd ~/nco/nco-5.3.6
+dh_make -e zender at uci.edu -f ../nco-5.3.6.tar.gz
2.2 The preceding steps created template debian files for a .deb,
Those files now reside in ~/nco/debian.
@@ -55,7 +55,7 @@ dh_make -e zender at uci.edu -f ../nco-5.3.5.tar.gz
from previous build
cd ~/nco;/bin/rm *.gz
- cd ~/nco/nco-5.3.5
+ cd ~/nco/nco-5.3.6
dpkg-buildpackage -rfakeroot > foo 2>&1
dpkg-buildpackage -rsudo > foo 2>&1
@@ -84,33 +84,33 @@ patch -p0 < nco_X.Y.Z-3.diff # Patch destination with Debian diff
make tags
# Put cute version-specific string in nco_ctl.c:nco_nmn_get()
# Install correct version numbers before updating Debian
-# tags-query replace 5.3.5 with X.Y.Z+1
+# tags-query replace 5.3.6 with X.Y.Z+1
# If tags-query replace does not work, be sure to manually change
# versions in configure.ac, debian/files, doc/ANNOUNCE, doc/debian.txt,
# doc/index.shtml, doc/nco.texi, bld/nco_dst.pl, doc/VERSION
# 20141201: Change NCO_VERSION_PATCH in src/nco.h!!!!!!!!!!!!!!!!!!!!!!
- cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 5.3.5-1 # Update changelog (-b forces this version number)
+ cd ~/nco/debian;dch -b --force-distribution --distribution=unstable -v 5.3.6-1 # Update changelog (-b forces this version number)
emacs ~/nco/bld/nco.spec # Update changelog
# For unknown reason rules file may lose its executable bit
chmod a+x ~/nco/debian/rules
# Rebuild autotools so new version # propagates
cd ~/nco;aclocal;autoheader;automake --foreign;autoconf
# Save all files in emacs before tagging
- ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-5.3.5
+ ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-5.3.6
# Upload tarball to SF https://sourceforge.net/projects/nco/files
- cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-5.3.5.tar.gz .
+ cd;scp dust.ess.uci.edu:/var/www/html/nco/src/nco-5.3.6.tar.gz .
7. Ubuntu PPA
https://help.launchpad.net/Packaging/PPA
-dput NCO nco_5.3.5-2~ppa1_source.changes
+dput NCO nco_5.3.6-2~ppa1_source.changes
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com
# Location of build diagnostics for mentors to help
-http://dust.ess.uci.edu/nco/src/nco_5.3.5-1.dpkg-buildpackage.txt
-http://dust.ess.uci.edu/nco/src/nco_5.3.5-1.dsc
-http://dust.ess.uci.edu/nco/src/nco_5.3.5-1_i386.changes
-http://dust.ess.uci.edu/nco/src/nco_5.3.5-1_i386.deb
-http://dust.ess.uci.edu/nco/src/nco_5.3.5.orig.tar.gz
+http://dust.ess.uci.edu/nco/src/nco_5.3.6-1.dpkg-buildpackage.txt
+http://dust.ess.uci.edu/nco/src/nco_5.3.6-1.dsc
+http://dust.ess.uci.edu/nco/src/nco_5.3.6-1_i386.changes
+http://dust.ess.uci.edu/nco/src/nco_5.3.6-1_i386.deb
+http://dust.ess.uci.edu/nco/src/nco_5.3.6.orig.tar.gz
# Becoming a Debian developer
http://www.debian.org/devel/join/newmaint
@@ -164,31 +164,31 @@ Matej Vela <vela at debian.org>, Daniel Baumann <daniel at debian.org>, Warren Turkal
# export LD_LIBRARY_PATH=/usr/lib:/lib:/usr/X11R6/lib
# sudo aptitude install antlr bison flex gsl-bin libgsl0-dev libantlr-dev netcdf-bin libnetcdfc7 libnetcdf-dev texinfo libcurl4-gnutls-dev libexpat1-dev libxml2-dev udunits-bin libudunits2-0 libudunits2-dev
cd ~/nco;cvc
-sudo /bin/rm -rf ${DATA}/nco-5.3.5 ${DATA}/nco_5.3.5* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.3.5-1 -d nco-5.3.5 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-5.3.5 nco # Export most recent
-tar cvzf ./nco_5.3.5.orig.tar.gz --exclude='nco-5.3.5/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.3.5
-/bin/rm -rf ${DATA}/nco-5.3.5 # Remove cvs-exported directory
-tar xvzf ./nco_5.3.5.orig.tar.gz # Untar to get directory without excluded files
-mkdir -p ${DATA}/nco-5.3.5/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-5.3.5/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-5.3.5/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
+sudo /bin/rm -rf ${DATA}/nco-5.3.6 ${DATA}/nco_5.3.6* ${DATA}/debian # Cleanup last build. sudo necessary for removal because dpkg-buildpackage uses sudo?
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.3.6-1 -d nco-5.3.6 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -d nco-5.3.6 nco # Export most recent
+tar cvzf ./nco_5.3.6.orig.tar.gz --exclude='nco-5.3.6/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.3.6
+/bin/rm -rf ${DATA}/nco-5.3.6 # Remove cvs-exported directory
+tar xvzf ./nco_5.3.6.orig.tar.gz # Untar to get directory without excluded files
+mkdir -p ${DATA}/nco-5.3.6/debian/source;cd ~/nco/debian;/bin/cp changelog compat control convert copyright doc-base files info rules ${DATA}/nco-5.3.6/debian;cd ~/nco/debian/source;/bin/cp format ${DATA}/nco-5.3.6/debian/source # Replace debian directory with _CURRENT_ (main trunk) settings
#export DEB_BUILD_OPTIONS='disable-dap-netcdf disable-netcdf4 disable-udunits2'; # Disable optional packages based on available Debian support
-#cd ${DATA}/nco-5.3.5;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
-#cd ${DATA}/nco-5.3.5;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes
-cd ${DATA}/nco-5.3.5;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
+#cd ${DATA}/nco-5.3.6;dpkg-buildpackage -rsudo -uc -us > ~/foo.nco 2>&1 # -uc -us: Do not sign changes or source files
+#cd ${DATA}/nco-5.3.6;dpkg-buildpackage -rsudo -sa > ~/foo.nco 2>&1 # -sa: Include _orig.tar.gz in .changes
+cd ${DATA}/nco-5.3.6;dpkg-buildpackage -rsudo > ~/foo.nco 2>&1
sudo dpkg --remove nco
-sudo dpkg --install ${DATA}/nco_5.3.5-1_*.deb
+sudo dpkg --install ${DATA}/nco_5.3.6-1_*.deb
cd ~/nco/bld;MY_BIN_DIR=/usr/bin ../bm/nco_bm.pl --regress
# http://lintian.debian.org/full/zender@uci.edu.html
-lintian ${DATA}/nco_5.3.5-1_*.deb
-ls -l ${DATA}/nco_5.3.5*
+lintian ${DATA}/nco_5.3.6-1_*.deb
+ls -l ${DATA}/nco_5.3.6*
m ~/foo.nco
# Upload Ubuntu (rather than Debian) packages to websites
-scp ${DATA}/nco_5.3.5* dust.ess.uci.edu:/var/www/html/nco/src
-scp ${DATA}/nco_5.3.5* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+scp ${DATA}/nco_5.3.6* dust.ess.uci.edu:/var/www/html/nco/src
+scp ${DATA}/nco_5.3.6* zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
# NB: Make sure RPMs build before uploading to debian, since changing
# Debian versions is a PITA
# NB: Only upload pbuilder Debian Sid (not personal Ubuntu) .deb builds to Debian mentors
-# cd ${DATA};dupload -t mentors nco_5.3.5-1_*.changes
+# cd ${DATA};dupload -t mentors nco_5.3.6-1_*.changes
bsrc # Reset shell environment for regular development
# New build system #2
@@ -202,52 +202,52 @@ DIST=sid sudo pbuilder update # Update chroot before building package in it
# dget http://ftp.debian.org/debian/pool/main/n/nco/nco_3.9.0-1.dsc
# dget http://ftp.debian.org/debian/pool/main/n/netcdf/netcdf_3.6.1-1.dsc
# apt-get source nco # Get package source
-sudo /bin/rm /var/cache/pbuilder/result/nco_5.3.5* # Cleanup prior build
+sudo /bin/rm /var/cache/pbuilder/result/nco_5.3.6* # Cleanup prior build
# To pass DEB_BUILD_OPTIONS to pbuilder while using sudo, one must first
# modify sudoers with visudo to prevent sudo from resetting environment
#export DEB_BUILD_OPTIONS='disable-dap-netcdf disable-netcdf4 disable-udunits2'; # Disable optional packages based on available Debian support
-cd ${DATA};DIST=sid sudo pbuilder build nco_5.3.5-1.dsc > ~/foo.nco.pbuilder 2>&1
-cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_5.3.5-1_*.changes
-lintian /var/cache/pbuilder/result/nco_5.3.5-1_*.deb
+cd ${DATA};DIST=sid sudo pbuilder build nco_5.3.6-1.dsc > ~/foo.nco.pbuilder 2>&1
+cd /var/cache/pbuilder/result;debsign -k6F635D10 nco_5.3.6-1_*.changes
+lintian /var/cache/pbuilder/result/nco_5.3.6-1_*.deb
sudo dpkg --remove nco
-sudo dpkg --install /var/cache/pbuilder/result/nco_5.3.5-1_*.deb
+sudo dpkg --install /var/cache/pbuilder/result/nco_5.3.6-1_*.deb
cd ~/nco/bld;MY_BIN_DIR=/usr/bin ../bm/nco_bm.pl --regress
# NB: Upload pbuilder Debian Sid packages to Debian mentors, but not
# to personal or NCO websites since most people use Ubuntu not Debian
# NB: Debian versions are a PITA, ensure RPMs build before uploading to Debian
-cd /var/cache/pbuilder/result;dupload -t mentors nco_5.3.5-1_*.changes
+cd /var/cache/pbuilder/result;dupload -t mentors nco_5.3.6-1_*.changes
# RPM builds as root
export rpm_root='/usr/src/redhat'
# export sudo_sng='' # sudo not-necessary when builing in user directories
export sudo_sng='sudo' # sudo necessary when building in system directories
cd ~/nco;cvc;cvu
-/bin/rm -rf ${DATA}/nco-5.3.5 ${DATA}/nco-5.3.5* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-5.3.6 ${DATA}/nco-5.3.6* # Cleanup last build
${sudo_sng} /bin/rm -r -f \
-${rpm_root}/BUILD/nco-5.3.5 \
-${rpm_root}/RPMS/i386/nco-5.3.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-5.3.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-5.3.5-?.i386.rpm \
-${rpm_root}/SOURCES/nco-5.3.5.tar.gz \
-${rpm_root}/SPECS/nco-5.3.5.spec \
-${rpm_root}/SRPMS/nco-5.3.5-?.src.rpm
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.3.5-1 -d nco-5.3.5 nco # Export based on tag
-${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-5.3.5.spec
-tar cvzf ./nco-5.3.5.tar.gz --exclude='nco-5.3.5/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.3.5
-${sudo_sng} /bin/cp ${DATA}/nco-5.3.5.tar.gz ${rpm_root}/SOURCES
+${rpm_root}/BUILD/nco-5.3.6 \
+${rpm_root}/RPMS/i386/nco-5.3.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-5.3.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-5.3.6-?.i386.rpm \
+${rpm_root}/SOURCES/nco-5.3.6.tar.gz \
+${rpm_root}/SPECS/nco-5.3.6.spec \
+${rpm_root}/SRPMS/nco-5.3.6-?.src.rpm
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.3.6-1 -d nco-5.3.6 nco # Export based on tag
+${sudo_sng} ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/SPECS/nco-5.3.6.spec
+tar cvzf ./nco-5.3.6.tar.gz --exclude='nco-5.3.6/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.3.6
+${sudo_sng} /bin/cp ${DATA}/nco-5.3.6.tar.gz ${rpm_root}/SOURCES
cd ${rpm_root}/SPECS
-${sudo_sng} rpmbuild -ba --sign nco-5.3.5.spec > ~/foo.nco 2>&1
+${sudo_sng} rpmbuild -ba --sign nco-5.3.6.spec > ~/foo.nco 2>&1
scp \
-${rpm_root}/RPMS/i386/nco-5.3.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-5.3.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-5.3.5-?.i386.rpm \
-${rpm_root}/SRPMS/nco-5.3.5-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-5.3.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-5.3.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-5.3.6-?.i386.rpm \
+${rpm_root}/SRPMS/nco-5.3.6-?.src.rpm \
dust.ess.uci.edu:/var/www/html/nco/src
scp \
-${rpm_root}/RPMS/i386/nco-5.3.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-debuginfo-5.3.5-?.i386.rpm \
-${rpm_root}/RPMS/i386/nco-devel-5.3.5-?.i386.rpm \
-${rpm_root}/SRPMS/nco-5.3.5-?.src.rpm \
+${rpm_root}/RPMS/i386/nco-5.3.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-debuginfo-5.3.6-?.i386.rpm \
+${rpm_root}/RPMS/i386/nco-devel-5.3.6-?.i386.rpm \
+${rpm_root}/SRPMS/nco-5.3.6-?.src.rpm \
zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
# RPM builds as user
@@ -256,33 +256,33 @@ zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
export rpm_root="${DATA}/rpm/nco"
#cd ~/nco;cvc;cvu # This risks committing unwanted *.[ch]pp files
mkdir -p ${DATA}/rpm/nco/TMP ${DATA}/rpm/nco/BUILD
-/bin/rm -rf ${DATA}/nco-5.3.5 ${DATA}/nco-5.3.5* # Cleanup last build
+/bin/rm -rf ${DATA}/nco-5.3.6 ${DATA}/nco-5.3.6* # Cleanup last build
/bin/rm -r -f \
-${rpm_root}/nco-5.3.5-?.src.rpm \
-${rpm_root}/nco-5.3.5.spec \
-${rpm_root}/nco-5.3.5.tar.gz \
-${rpm_root}/*/nco-5.3.5-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-5.3.5-?.*.rpm \
-${rpm_root}/*/nco-devel-5.3.5-?.*.rpm
-# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.3.5-1 -d nco-5.3.5 nco # Export based on tag
-cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-5.3.5 nco # Export most recent and build as 5.3.5-1
-tar cvzf ./nco-5.3.5.tar.gz --exclude='nco-5.3.5/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.3.5
-/bin/cp ${DATA}/nco-5.3.5.tar.gz ${rpm_root}
+${rpm_root}/nco-5.3.6-?.src.rpm \
+${rpm_root}/nco-5.3.6.spec \
+${rpm_root}/nco-5.3.6.tar.gz \
+${rpm_root}/*/nco-5.3.6-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-5.3.6-?.*.rpm \
+${rpm_root}/*/nco-devel-5.3.6-?.*.rpm
+# cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -r nco-5.3.6-1 -d nco-5.3.6 nco # Export based on tag
+cd ${DATA};cvs -d zender at nco.cvs.sf.net:/cvsroot/nco export -kkv -D "1 second ago" -dnco-5.3.6 nco # Export most recent and build as 5.3.6-1
+tar cvzf ./nco-5.3.6.tar.gz --exclude='nco-5.3.6/debian*' --exclude='.cvsignore' --exclude='ncap_lex.c' --exclude='ncap_yacc.[ch]' ./nco-5.3.6
+/bin/cp ${DATA}/nco-5.3.6.tar.gz ${rpm_root}
ln -s ${HOME}/nco/bld/nco.spec ${rpm_root}/nco.spec
cd ${rpm_root}
rpmbuild -ba --sign nco.spec > ~/foo.nco 2>&1
-rpmlint ${rpm_root}/*/nco-5.3.5-?.*.rpm
+rpmlint ${rpm_root}/*/nco-5.3.6-?.*.rpm
sudo yum remove nco
-sudo yum install ${rpm_root}/*/nco-5.3.5-?.*.rpm
+sudo yum install ${rpm_root}/*/nco-5.3.6-?.*.rpm
scp \
-${rpm_root}/*/nco-5.3.5-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-5.3.5-?.*.rpm \
-${rpm_root}/*/nco-devel-5.3.5-?.*.rpm \
-${rpm_root}/nco-5.3.5-?.*.src.rpm \
+${rpm_root}/*/nco-5.3.6-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-5.3.6-?.*.rpm \
+${rpm_root}/*/nco-devel-5.3.6-?.*.rpm \
+${rpm_root}/nco-5.3.6-?.*.src.rpm \
dust.ess.uci.edu:/var/www/html/nco/src
scp \
-${rpm_root}/*/nco-5.3.5-?.*.rpm \
-${rpm_root}/*/nco-debuginfo-5.3.5-?.*.rpm \
-${rpm_root}/*/nco-devel-5.3.5-?.*.rpm \
-${rpm_root}/nco-5.3.5-?.*.src.rpm \
+${rpm_root}/*/nco-5.3.6-?.*.rpm \
+${rpm_root}/*/nco-debuginfo-5.3.6-?.*.rpm \
+${rpm_root}/*/nco-devel-5.3.6-?.*.rpm \
+${rpm_root}/nco-5.3.6-?.*.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.3.5 released <!--#flastmod file="src/nco-5.3.5.tar.gz"-->
+Current stable NCO version is 5.3.6 released <!--#flastmod file="src/nco-5.3.6.tar.gz"-->
</h2>
<table border=0 width=100%>
@@ -155,7 +155,8 @@ and
<h2>Recent Releases & Milestones</h2>
<ul>
-<li>2025 Nov ??: 5.3.6 <i>In Progress...</i>
+<li>2025 Nov ??: 5.3.7 <i>In Progress...</i>
+<li>2025 Oct 28: 5.3.6 E3SM-Unified 1.12
<li>2025 Sep 25: 5.3.5 GCC OpenMP
<li>2025 Jun 16: 5.3.4 GAD + S1D Urban
<li>2025 Mar 28: 5.3.3 Minor features + fixes
@@ -666,21 +667,22 @@ 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.3.5 http://github.com/nco/nco.git nco-5.3.5</tt></a>.
+<tt>git clone -b 5.3.6 http://github.com/nco/nco.git nco-5.3.6</tt></a>.
<ul>
-<li><b>NCO 5.3.7</b>: (<i>Future</i>)
+<li><b>NCO 5.3.8</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> CF Convention for longitude vertices in map-files;
-<tt>ncremap</tt> Gracefully autoconvert N-D NC_STRING->(N+1)-D NC_CHAR variables</li>
-<tt>ncremap</tt> small-circle weights;</li>
-<li><b>NCO 5.3.6</b>: (<i>In Progress, features in-progress or complete include</i>)
+<tt>ncremap</tt> Gracefully autoconvert N-D NC_STRING->(N+1)-D NC_CHAR variables;
+<tt>ncremap</tt> small-circle weights;
+<li><b>NCO 5.3.7</b>: (<i>In Progress, features in-progress or complete include</i>)
+<tt>ncremap --vrt</tt> works with 3D pressure fields (e.g., MERRA2)</li>
+<li><b>NCO 5.3.6</b>: (<i>Current Stable Release</i>)
<tt>ncks --chk_map</tt> row+col index checking;
<tt>ncremap/ncclimo --npo</tt> works on Andes, Chrysalis, Perlmutter;
-<tt>ncremap --thr_nbr</tt> GCC OpenMP is fixed;
-<tt>ncremap --vrt</tt> works with 3D pressure fields (e.g., MERRA2)</li>
-<li><b>NCO 5.3.5</b>: (<i>Current Stable Release</i>)
+<tt>ncremap --thr_nbr</tt> GCC OpenMP is fixed</li>
+<li><b>NCO 5.3.5</b>:
<tt>ncremap --vrt=/path/to/file.nc/plev</tt> </li>
<li><b>NCO 5.3.4</b>:
<tt>all</tt> --gad Global Attribute Delete option;
@@ -890,7 +892,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.3.5</a> Executables Anaconda-compatible. Maintained by Filipe Fernandes.</li>
+<li><a href="https://github.com/conda-forge/nco-feedstock">nco-5.3.6</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>
@@ -899,7 +901,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.3.5</a></li>
+<li><a href="http://www.debian.org">Debian</a> and <a href="http://www.ubuntu.com">Ubuntu</a> GNU/Linux-compatible Intel systems, prebuilt binary executable <a href="http://www.debian.org">deb</a>: <a href="http://packages.debian.org/testing/math/nco.html">nco-5.3.6</a></li>
-->
<a href="http://packages.debian.org/unstable/science/nco">Debian NCO</a> and
<a href="https://launchpad.net/ubuntu/+source/nco">Ubuntu NCO</a> homepages.
@@ -907,8 +909,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.3.5-1_i386.deb</tt>’):</dt>
-<li><a href="https://launchpad.net/ubuntu/+source/nco/5.3.5-1">nco_5.3.5-1_amd64.deb</a> : Executables AMD64-compatible</li>
+<dt>Debian package for most recent NCO release (install with, e.g., ‘<tt>dpkg --install nco_5.3.6-1_i386.deb</tt>’):</dt>
+<li><a href="https://launchpad.net/ubuntu/+source/nco/5.3.6-1">nco_5.3.6-1_amd64.deb</a> : Executables AMD64-compatible</li>
Thanks to Daniel Baumann, Sebastian Couwenberg, Barry deFreese, Francesco Lovergine,
Brian Mays, Rorik Peterson, and Matej Vela for their help packaging
NCO for Debian over the years.
@@ -950,12 +952,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 15.5 (Sequoia) systems (sastrugi, spectral):
+# MacOS 15.6 (Sequoia) systems (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.3.5.macos.15.5.tar.gz nc*;scp ${DATA}/nco-5.3.5.macos.15.5.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src
+cd ~/bin;tar cvzf ${DATA}/nco-5.3.6.macos.15.6.tar.gz nc*;scp ${DATA}/nco-5.3.6.macos.15.6.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.3.5.macos.15.5.tar.gz">nco-5.3.5.macos.15.5.tar.gz</a> (<!--#fsize file="src/nco-5.3.5.macos.15.5.tar.gz"-->): Executables MacOS 15.5-compatible (last updated <!--#flastmod file="src/nco-5.3.5.macos.15.5.tar.gz"-->). Maintained by NCO Project.</li>
+<li><a href="src/nco-5.3.6.macos.15.6.tar.gz">nco-5.3.6.macos.15.6.tar.gz</a> (<!--#fsize file="src/nco-5.3.6.macos.15.6.tar.gz"-->): Executables MacOS 15.6-compatible (last updated <!--#flastmod file="src/nco-5.3.6.macos.15.6.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>
@@ -1158,12 +1160,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.3.5.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
-<a href="https://github.com/nco/nco/archive/5.3.5.tar.gz">nco-5.3.5.tar.gz</a>
-(<!--#fsize file="src/nco-5.3.5.tar.gz"--> compressed tar-file)<br>
-<!--#exec cmd="openssl dgst -md5 src/nco-5.3.5.tar.gz"--><br>
-<!--#exec cmd="openssl dgst -sha1 src/nco-5.3.5.tar.gz"--><br>
-<!--#exec cmd="openssl dgst -sha256 src/nco-5.3.5.tar.gz"-->
+<!-- scp ${DATA}/nco-5.3.6.tar.gz zender,nco at web.sf.net:/home/project-web/nco/htdocs/src -->
+<a href="https://github.com/nco/nco/archive/5.3.6.tar.gz">nco-5.3.6.tar.gz</a>
+(<!--#fsize file="src/nco-5.3.6.tar.gz"--> compressed tar-file)<br>
+<!--#exec cmd="openssl dgst -md5 src/nco-5.3.6.tar.gz"--><br>
+<!--#exec cmd="openssl dgst -sha1 src/nco-5.3.6.tar.gz"--><br>
+<!--#exec cmd="openssl dgst -sha256 src/nco-5.3.6.tar.gz"-->
</li>
</ul>
@@ -1184,8 +1186,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.3.5</tt>:
-<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 5.3.5</tt></p>
+then checks out NCO version <tt>5.3.6</tt>:
+<p><tt>git clone https://github.com/nco/nco.git;cd nco;git checkout 5.3.6</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
@@ -1195,12 +1197,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.3.5</tt>) and the development version is that the
+(e.g., <tt>5.3.6</tt>) and the development version is that the
tagged release operators will print a valid version number (e.g.,
-<tt>5.3.5</tt>) when asked to do so with the <tt>-r</tt> flag
+<tt>5.3.6</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.3.5-alpha06</tt>).
+information (e.g., <tt>5.3.6-alpha06</tt>).
<!--
<a name="doxy"></a>
@@ -1384,9 +1386,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.3.5.tar.gz</dt>
-<dt>tar xvzf 5.3.5.tar.gz</dt>
-<dt>cd nco-5.3.5</dt>
+<dt>wget https://github.com/nco/nco/archive/5.3.6.tar.gz</dt>
+<dt>tar xvzf 5.3.6.tar.gz</dt>
+<dt>cd nco-5.3.6</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.3.5
- at set doc-edition 5.3.5
+ at set nco-edition 5.3.6
+ at set doc-edition 5.3.6
@set copyright-years 1995--2025
@set update-year 2025
- at set update-date 25 September 2025
- at set update-month September 2025
+ at set update-date 28 October 2025
+ at set update-month October 2025
@settitle @acronym{NCO} @value{nco-edition} User Guide
@@ -31591,6 +31591,7 @@ Large work-load testing
@cindex Erik Koene
@cindex Daniel Macks
@cindex Seth McGinnis
+ at cindex Zachary Moon
@cindex Stu Muller
@cindex Daniel Neumann
@cindex Mike Page
@@ -31610,7 +31611,7 @@ Large work-load testing
@cindex Min Xu
@cindex Remik Ziemlinski
@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, Erik Koene, Markus Liebig, Keith Lindsay, Daniel Macks, Seth McGinnis, 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
+ 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, Erik Koene, Markus Liebig, Keith Lindsay, Daniel Macks, Seth McGinnis, Zachary Moon, 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
@@ -31627,11 +31628,12 @@ Anaconda packaging
@cindex Daniel Baumann
@cindex Nick Bower
@cindex Luk Claes
+ at cindex Bas Couwenberg
@cindex Barry deFreese
@cindex Francesco Lovergine
- at cindex Bas Couwenberg
+ at cindex Andrew Nolan
@cindex Matej Vela
- at item Xylar Asay-Davis, Daniel Baumann, Nick Bower, Luk Claebs, Bas Couwenberg, Barry deFreese, Francesco Lovergine, Matej Vela
+ at item Xylar Asay-Davis, Daniel Baumann, Nick Bower, Luk Claebs, Bas Couwenberg, Barry deFreese, Francesco Lovergine, Andrew Nolan, Matej Vela
Cygwin packaging
@cindex Marco Atzeri
@item Marco Atzeri
=====================================
src/nco/nco.h
=====================================
@@ -380,7 +380,7 @@ extern "C" {
# define NCO_VERSION_MINOR 3
#endif /* !NCO_VERSION_MINOR */
#ifndef NCO_VERSION_PATCH
-# define NCO_VERSION_PATCH 5
+# define NCO_VERSION_PATCH 6
#endif /* !NCO_VERSION_PATCH */
#ifndef NCO_VERSION_NOTE
# define NCO_VERSION_NOTE "" /* Blank for final versions, non-blank (e.g., "-beta73") for pre-release versions */
@@ -390,7 +390,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.3.5"
+# define NCO_VERSION "5.3.6"
#endif /* !NCO_VERSION */
/* Compatibility tokens new to netCDF4 netcdf.h: */
=====================================
src/nco/nco_grp_utl.c
=====================================
@@ -1376,7 +1376,8 @@ nco_var_is_hrz /* [fnc] Print "Yes"/"No" if variable is horizontal (i.e., has di
Based on nco_xtr_hrz_lst() and, before that, nco_xtr_ND_lst()
Usage:
ncks --is_hrz three_dmn_rec_var ~/nco/data/in.nc
- ncks --is_hrz W_SCALAR ~/data/bm/elmv3_r05l15.nc */
+ ncks --is_hrz W_SCALAR ~/data/bm/elmv3_r05l15.nc
+ ncks --is_hrz LAISUN ~/data/bm/elmv2_ne30pg2l15.nc */
const char fnc_nm[]="nco_var_is_hrz()"; /* [sng] Function name */
@@ -1428,7 +1429,7 @@ nco_var_is_hrz /* [fnc] Print "Yes"/"No" if variable is horizontal (i.e., has di
dmn_nbr_in=trv_tbl->lst[idx_var].nbr_dmn;
for(dmn_idx=0;dmn_idx<dmn_nbr_in;dmn_idx++){
dmn_nm_cp=trv_tbl->lst[idx_var].var_dmn[dmn_idx].dmn_nm;
- if(strcmp(dmn_nm_cp,"lat") && strcmp(dmn_nm_cp,"lon") && strcmp(dmn_nm_cp,"ncol") && strcmp(dmn_nm_cp,"nCells") && strcasecmp(dmn_nm_cp,"time")) break;
+ if(strcmp(dmn_nm_cp,"lat") && strcmp(dmn_nm_cp,"lon") && strcmp(dmn_nm_cp,"ncol") && strcmp(dmn_nm_cp,"lndgrid") && strcmp(dmn_nm_cp,"nCells") && strcasecmp(dmn_nm_cp,"time")) break;
} /* !dmn_idx */
if(dmn_idx == dmn_nbr_in){
xtr_nbr_crr++;
=====================================
src/nco/nco_map.c
=====================================
@@ -1848,7 +1848,7 @@ nco_map_hst_mk /* Create histogram */
var_sct * /* [sct] Variable structure */
nco_map_var_init /* Fill-in variable or return NULL */
(int in_id,
- char * var_nm,
+ char *var_nm,
dmn_sct **dmn,
int dmn_in_nbr)
{
@@ -2189,6 +2189,9 @@ nco_map_chk /* Map-file evaluation */
if(flg_frac_b_nrm) rcd=nco_fl_open(fl_in,NC_WRITE,&bfr_sz_hnt,&in_id); else rcd=nco_fl_open(fl_in,NC_NOWRITE,&bfr_sz_hnt,&in_id);
(void)nco_inq_format(in_id,&fl_in_fmt);
+ /* Print filename first so batch invocation informs reader of current map-file */
+ (void)fprintf(stdout,"Map-checker characterization of %s\n",fl_in);
+
/* Read weight type, if it exists */
char *cnv_sng=NULL; /* [sng] Convention string (i.e., attribute name) */
char *att_val;
@@ -2260,37 +2263,36 @@ nco_map_chk /* Map-file evaluation */
var_yc_a=nco_map_var_init(in_id,"yc_a",dmn_in,dmn_in_nbr);
var_yc_b=nco_map_var_init(in_id,"yc_b",dmn_in,dmn_in_nbr);
- /* 20250905 Sanity check on row,col because Walter H. produced and tried to use a map with uninitialized values of row, col, and wgt! */
+ /* 20250905 Sanity check on row,col because Walter H. produced and tried to use a map with uninitialized values of row, col, and wgt! All values of row + col in that file were NC_MIN_INT. */
sz=var_S->sz;
if(1){
int idx_row; /* Use int not size_t in case values are corrupt and contain negative numbers */
int idx_col; /* Use int not size_t in case values are corrupt and contain negative numbers */
size_t cnt_bad; /* [nbr] Number of invalid indexes */
- sz=var_frac_a->sz;
cnt_bad=0L;
for(idx=0;idx<sz;idx++){
- idx_row=var_row->val.ip[idx]-1L;
+ idx_row=var_row->val.ip[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_row < 0L) cnt_bad++;
} /* !idx */
for(idx=0;idx<sz;idx++){
- idx_row=var_row->val.ip[idx]-1L;
+ idx_row=var_row->val.ip[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_row < 0L) break;
} /* !idx */
if(idx != sz){
- (void)fprintf(stderr,"%s: ERROR %s (aka \"the map-checker\") reports map-file variable \"row\" contains %lu illegal value(s) among %lu total values. First illegal value found is, in Fortran (1-based) index notation, row(%lu) = %ld. \"row\" contains indexes into the weight matrix S. Each Fortran-convention index must be >= 1. Without valid indexes, the map-file is unusable.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_row+1L);
+ (void)fprintf(stderr,"%s: ERROR %s (aka \"the map-checker\") reports map-file variable \"row\" contains %lu illegal value(s) among %lu total values. \"row\" contains indexes into the weight matrix S. First illegal value found is, in Fortran (1-based) index notation, row(%lu) = %ld. Each Fortran-convention index must be >= 1. Illegal indexes make this map-file corrupt.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_row+1L);
nco_exit(EXIT_FAILURE);
} /* !idx */
cnt_bad=0L;
for(idx=0;idx<sz;idx++){
- idx_col=var_col->val.ip[idx]-1L;
+ idx_col=var_col->val.ip[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_col < 0L) cnt_bad++;
} /* !idx */
for(idx=0;idx<sz;idx++){
- idx_col=var_col->val.ip[idx]-1L;
+ idx_col=var_col->val.ip[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_col < 0L) break;
} /* !idx */
if(idx != sz){
- (void)fprintf(stderr,"%s: ERROR %s (aka \"the map-checker\") reports map-file variable \"col\" contains %lu illegal value(s) among %lu total values. First illegal value found is, in Fortran (1-based) index notation, col(%lu) = %ld. \"col\" contains indexes into the weight matrix S. Each Fortran-convention index must be >= 1. Without valid indexes, the map-file is unusable.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_col+1L);
+ (void)fprintf(stderr,"%s: ERROR %s (aka \"the map-checker\") reports map-file variable \"col\" contains %lu illegal value(s) among %lu total values. \"col\" contains indexes into the weight matrix S. First illegal value found is, in Fortran (1-based) index notation, col(%lu) = %ld. Each Fortran-convention index must be >= 1. Illegal indexes make this map-file corrupt.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_col+1L);
nco_exit(EXIT_FAILURE);
} /* !idx */
} /* !1 */
@@ -2331,7 +2333,7 @@ nco_map_chk /* Map-file evaluation */
if(val[idx] == 0.0) break;
if(idx < sz) area_wgt_a=False;
if(idx < sz) has_area_a=False;
- if(idx < sz) fprintf(stdout,"WARNING area_a = %g for grid A cell [%lu,%+g,%+g] (and possibly others). Empty areas are legal (e.g., for bilinear maps) yet prevent calculation of some diagnostics.\n",val[idx],idx+1UL,var_yc_a->val.dp[idx],var_xc_a->val.dp[idx]);
+ if(idx < sz) (void)fprintf(stdout,"WARNING area_a = %g for grid A cell [%lu,%+g,%+g] (and possibly others). Empty areas are legal (e.g., for bilinear maps) yet prevent calculation of some diagnostics.\n",val[idx],idx+1UL,var_yc_a->val.dp[idx],var_xc_a->val.dp[idx]);
} /* !var_area_a */
if(var_area_b){
has_area_b=True;
@@ -2341,7 +2343,7 @@ nco_map_chk /* Map-file evaluation */
if(val[idx] == 0.0) break;
if(idx < sz) area_wgt_b=False;
if(idx < sz) has_area_b=False;
- if(idx < sz) fprintf(stdout,"WARNING area_b = %g for grid B cell [%lu,%+g,%+g] (and possibly others). Empty areas are legal (e.g., for bilinear maps) yet prevent calculation of some diagnostics.\n",val[idx],idx+1UL,var_yc_b->val.dp[idx],var_xc_b->val.dp[idx]);
+ if(idx < sz) (void)fprintf(stdout,"WARNING area_b = %g for grid B cell [%lu,%+g,%+g] (and possibly others). Empty areas are legal (e.g., for bilinear maps) yet prevent calculation of some diagnostics.\n",val[idx],idx+1UL,var_yc_b->val.dp[idx],var_xc_b->val.dp[idx]);
} /* !var_area_b */
if(var_frac_a){
has_frac_a=True;
@@ -2464,9 +2466,8 @@ nco_map_chk /* Map-file evaluation */
if(has_area_a) nco_map_var_min_max_ttl(var_area_a,(double *)NULL,flg_area_wgt,(int *)NULL,&area_a_min,&idx_min_area_a,&area_a_max,&idx_max_area_a,&area_a_ttl,&avg,&mebs,&rms,&sdn);
if(var_mask_a) nco_map_var_min_max_ttl(var_mask_a,(double *)NULL,flg_area_wgt,(int *)NULL,&mask_a_min,&idx_min,&mask_a_max,&idx_max,&mask_a_ttl,&avg,&mebs,&rms,&sdn);
- fprintf(stdout,"Characterization of map-file %s\n",fl_in);
- fprintf(stdout,"Cell triplet elements : [Fortran (1-based) index, center latitude, center longitude]\n");
- fprintf(stdout,"Sparse-matrix size n_s: %lu\n",var_S->sz);
+ (void)fprintf(stdout,"Cell triplet elements : [Fortran (1-based) index, center latitude, center longitude]\n");
+ (void)fprintf(stdout,"Sparse-matrix size n_s: %lu\n",var_S->sz);
nco_map_var_min_max_ttl(var_S,(double *)NULL,flg_area_wgt,(int *)NULL,&s_min,&idx_min,&s_max,&idx_max,&s_ttl,&avg,&mebs,&rms,&sdn);
idx_sng_lng_max=(long)ceil(log10((double)var_S->sz));
if(idx_sng_lng_max == (long)log10((double)var_S->sz)) idx_sng_lng_max++;
@@ -2474,14 +2475,14 @@ nco_map_chk /* Map-file evaluation */
idx_sng=(char *)nco_malloc((idx_sng_lng_max+1UL)*sizeof(char));
(void)sprintf(idx_sng,idx_sng_fmt,idx_min+1UL);
//(void)fprintf(stdout,"idx_sng_fmt = %s, idx_sng = %s\n",idx_sng_fmt,idx_sng);
- fprintf(stdout,"Weight min S(%s): % 0.16e from cell [%d,%+g,%+g] to [%d,%+g,%+g]\n",idx_sng,s_min,var_col->val.ip[idx_min],var_yc_a->val.dp[var_col->val.ip[idx_min]-1],var_xc_a->val.dp[var_col->val.ip[idx_min]-1],var_row->val.ip[idx_min],var_yc_b->val.dp[var_row->val.ip[idx_min]-1],var_xc_b->val.dp[var_row->val.ip[idx_min]-1]);
+ (void)fprintf(stdout,"Weight min S(%s): % 0.16e from cell [%d,%+g,%+g] to [%d,%+g,%+g]\n",idx_sng,s_min,var_col->val.ip[idx_min],var_yc_a->val.dp[var_col->val.ip[idx_min]-1],var_xc_a->val.dp[var_col->val.ip[idx_min]-1],var_row->val.ip[idx_min],var_yc_b->val.dp[var_row->val.ip[idx_min]-1],var_xc_b->val.dp[var_row->val.ip[idx_min]-1]);
(void)sprintf(idx_sng,idx_sng_fmt,idx_max+1UL);
- fprintf(stdout,"Weight max S(%s): % 0.16e from cell [%d,%+g,%+g] to [%d,%+g,%+g]\n",idx_sng,s_max,var_col->val.ip[idx_max],var_yc_a->val.dp[var_col->val.ip[idx_max]-1],var_xc_a->val.dp[var_col->val.ip[idx_max]-1],var_row->val.ip[idx_max],var_yc_b->val.dp[var_row->val.ip[idx_max]-1],var_xc_b->val.dp[var_row->val.ip[idx_max]-1]);
- fprintf(stdout,"Ignored weights (S=0.0): %ld\n",wgt_zro_nbr);
+ (void)fprintf(stdout,"Weight max S(%s): % 0.16e from cell [%d,%+g,%+g] to [%d,%+g,%+g]\n",idx_sng,s_max,var_col->val.ip[idx_max],var_yc_a->val.dp[var_col->val.ip[idx_max]-1],var_xc_a->val.dp[var_col->val.ip[idx_max]-1],var_row->val.ip[idx_max],var_yc_b->val.dp[var_row->val.ip[idx_max]-1],var_xc_b->val.dp[var_row->val.ip[idx_max]-1]);
+ (void)fprintf(stdout,"Ignored weights (S=0.0): %ld\n",wgt_zro_nbr);
if(nco_dbg_lvl_get() >= nco_dbg_std){
- fprintf(stdout,"Commands to examine extrema:\n");
- fprintf(stdout,"min(S): ncks --fortran -H --trd -d n_s,%lu -d n_a,%d -d n_b,%d -v S,row,col,.?_a,.?_b %s\n",idx_min+1UL,var_col->val.ip[idx_min],var_row->val.ip[idx_min],fl_in);
- fprintf(stdout,"max(S): ncks --fortran -H --trd -d n_s,%lu -d n_a,%d -d n_b,%d -v S,row,col,.?_a,.?_b %s\n",idx_max+1UL,var_col->val.ip[idx_max],var_row->val.ip[idx_max],fl_in);
+ (void)fprintf(stdout,"Commands to examine extrema:\n");
+ (void)fprintf(stdout,"min(S): ncks --fortran -H --trd -d n_s,%lu -d n_a,%d -d n_b,%d -v S,row,col,.?_a,.?_b %s\n",idx_min+1UL,var_col->val.ip[idx_min],var_row->val.ip[idx_min],fl_in);
+ (void)fprintf(stdout,"max(S): ncks --fortran -H --trd -d n_s,%lu -d n_a,%d -d n_b,%d -v S,row,col,.?_a,.?_b %s\n",idx_max+1UL,var_col->val.ip[idx_max],var_row->val.ip[idx_max],fl_in);
} /* !dbg */
/* Check for and report NaNs in weight array */
sz=var_S->sz;
@@ -2490,10 +2491,10 @@ nco_map_chk /* Map-file evaluation */
for(idx=0;idx<sz;idx++){
if(isnan(val[idx])){
(void)sprintf(idx_sng,idx_sng_fmt,idx+1UL);
- if(nco_dbg_lvl_get() >= nco_dbg_quiet) fprintf(stdout,"WARNING: Weight S(%s) = NaN from cell [%d,%+g,%+g] to [%d,%+g,%+g]\n",idx_sng,var_col->val.ip[idx],var_yc_a->val.dp[var_col->val.ip[idx]-1],var_xc_a->val.dp[var_col->val.ip[idx]-1],var_row->val.ip[idx],var_yc_b->val.dp[var_row->val.ip[idx]-1],var_xc_b->val.dp[var_row->val.ip[idx]-1]);
+ if(nco_dbg_lvl_get() >= nco_dbg_quiet) (void)fprintf(stdout,"WARNING: Weight S(%s) = NaN from cell [%d,%+g,%+g] to [%d,%+g,%+g]\n",idx_sng,var_col->val.ip[idx],var_yc_a->val.dp[var_col->val.ip[idx]-1],var_xc_a->val.dp[var_col->val.ip[idx]-1],var_row->val.ip[idx],var_yc_b->val.dp[var_row->val.ip[idx]-1],var_xc_b->val.dp[var_row->val.ip[idx]-1]);
} /* !isnan */
} /* !idx */
- fprintf(stdout,"\n");
+ (void)fprintf(stdout,"\n");
if(idx_sng) idx_sng=(char *)nco_free(idx_sng);
int hst_idx;
@@ -2514,44 +2515,44 @@ nco_map_chk /* Map-file evaluation */
} /* !hst_idx */
} /* !idx */
- fprintf(stdout,"Grid A size n_a: %lu // Number of columns/sources\n",var_area_a->sz);
- if(var_mask_a) fprintf(stdout,"mask_a 0's, 1's: %lu, %lu\n",mask_a_zro,mask_a_one); else fprintf(stdout,"mask_a 0's, 1's: map-file omits mask_a\n");
- if(var_mask_a) fprintf(stdout,"mask_a min, max: %.0f, %.0f\n",mask_a_min,mask_a_max); else fprintf(stdout,"mask_a min, max: map-file omits mask_a\n");
- if(var_mask_a) fprintf(stdout,"mask_a S errors: %lu%s\n",mask_a_err,mask_a_err ? " <--- # of weights that, in violation of mask_a, contribute from masked source cells to destination gridcells WARNING WARNING WARNING" : ""); else fprintf(stdout,"mask_a S errors: map-file omits mask_a\n");
+ (void)fprintf(stdout,"Grid A size n_a: %lu // Number of columns/sources\n",var_area_a->sz);
+ if(var_mask_a) (void)fprintf(stdout,"mask_a 0's, 1's: %lu, %lu\n",mask_a_zro,mask_a_one); else (void)fprintf(stdout,"mask_a 0's, 1's: map-file omits mask_a\n");
+ if(var_mask_a) (void)fprintf(stdout,"mask_a min, max: %.0f, %.0f\n",mask_a_min,mask_a_max); else (void)fprintf(stdout,"mask_a min, max: map-file omits mask_a\n");
+ if(var_mask_a) (void)fprintf(stdout,"mask_a S errors: %lu%s\n",mask_a_err,mask_a_err ? " <--- # of weights that, in violation of mask_a, contribute from masked source cells to destination gridcells WARNING WARNING WARNING" : ""); else (void)fprintf(stdout,"mask_a S errors: map-file omits mask_a\n");
if(has_area_a){
- fprintf(stdout,"area_a sum/4*pi: %0.16f = 1.0%s%0.1e // Perfect is 1.0 for global Grid A\n",area_a_ttl/4.0/M_PI,area_a_ttl/4.0/M_PI > 1 ? "+" : "-",fabs(1.0-area_a_ttl/4.0/M_PI));
+ (void)fprintf(stdout,"area_a sum/4*pi: %0.16f = 1.0%s%0.1e // Perfect is 1.0 for global Grid A\n",area_a_ttl/4.0/M_PI,area_a_ttl/4.0/M_PI > 1 ? "+" : "-",fabs(1.0-area_a_ttl/4.0/M_PI));
// 20240708: Output radius (rds) or diameter (dmt) of circle with same area as smallest/largest gridcell A_g:
// s=r_e*theta, A=r_e^2*sr=pi*rds^2 -> rds=r_e*sqrt(sr/pi), dmt=2*r_e*sqrt(sr/pi), dx=r_e*sqrt(sr) <--dx is side of square
- fprintf(stdout,"area_a min, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid A cell [%lu,%+g,%+g]\n",area_a_min,rds_earth*sqrt(area_a_min)/1000.0,sqrt(area_a_min)*180.0/M_PI,idx_min_area_a+1UL,var_yc_a->val.dp[idx_min_area_a],var_xc_a->val.dp[idx_min_area_a]);
- fprintf(stdout,"area_a max, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid A cell [%lu,%+g,%+g]\n",area_a_max,rds_earth*sqrt(area_a_max)/1000.0,sqrt(area_a_max)*180.0/M_PI,idx_max_area_a+1UL,var_yc_a->val.dp[idx_max_area_a],var_xc_a->val.dp[idx_max_area_a]);
+ (void)fprintf(stdout,"area_a min, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid A cell [%lu,%+g,%+g]\n",area_a_min,rds_earth*sqrt(area_a_min)/1000.0,sqrt(area_a_min)*180.0/M_PI,idx_min_area_a+1UL,var_yc_a->val.dp[idx_min_area_a],var_xc_a->val.dp[idx_min_area_a]);
+ (void)fprintf(stdout,"area_a max, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid A cell [%lu,%+g,%+g]\n",area_a_max,rds_earth*sqrt(area_a_max)/1000.0,sqrt(area_a_max)*180.0/M_PI,idx_max_area_a+1UL,var_yc_a->val.dp[idx_max_area_a],var_xc_a->val.dp[idx_max_area_a]);
if(fabs(1.0-area_a_ttl/4.0/M_PI) < 1.0e-2) grid_a_tiles_sphere=True;
}else{
- fprintf(stdout,"area_a sum/4*pi: map-file does not provide completely non-zero area_a\n");
- fprintf(stdout,"area_a min, ~dx: map-file does not provide completely non-zero area_a\n");
- fprintf(stdout,"area_a max, ~dx: map-file does not provide completely non-zero area_a\n");
+ (void)fprintf(stdout,"area_a sum/4*pi: map-file does not provide completely non-zero area_a\n");
+ (void)fprintf(stdout,"area_a min, ~dx: map-file does not provide completely non-zero area_a\n");
+ (void)fprintf(stdout,"area_a max, ~dx: map-file does not provide completely non-zero area_a\n");
} /* !has_area_a */
- fprintf(stdout,"Column (source cell) indices utilized min, max: %.0f, %.0f\n",col_min,col_max);
- fprintf(stdout,"Ignored source cells (empty columns): %d\n\n",hst_col[0]);
+ (void)fprintf(stdout,"Column (source cell) indices utilized min, max: %.0f, %.0f\n",col_min,col_max);
+ (void)fprintf(stdout,"Ignored source cells (empty columns): %d\n\n",hst_col[0]);
if(has_area_b) nco_map_var_min_max_ttl(var_area_b,(double *)NULL,flg_area_wgt,(int *)NULL,&area_b_min,&idx_min_area_b,&area_b_max,&idx_max_area_b,&area_b_ttl,&avg,&mebs,&rms,&sdn);
if(var_mask_b) nco_map_var_min_max_ttl(var_mask_b,(double *)NULL,flg_area_wgt,(int *)NULL,&mask_b_min,&idx_min,&mask_b_max,&idx_max,&mask_b_ttl,&avg,&mebs,&rms,&sdn);
- fprintf(stdout,"Grid B size n_b: %lu // Number of rows/destinations\n",var_area_b->sz);
- if(var_mask_b) fprintf(stdout,"mask_b 0's, 1's: %lu, %lu\n",mask_b_zro,mask_b_one); else fprintf(stdout,"mask_b 0's, 1's: map-file omits mask_b\n");
- if(var_mask_b) fprintf(stdout,"mask_b min, max: %.0f, %.0f\n",mask_b_min,mask_b_max); else fprintf(stdout,"mask_b min, max: map-file omits mask_b\n");
- if(var_mask_b) fprintf(stdout,"mask_b S errors: %lu%s\n",mask_b_err,mask_b_err ? " <--- # of weights that, in violation of mask_b, contribute from source gridcells to masked destination gridcells WARNING WARNING WARNING" : ""); else fprintf(stdout,"mask_b S errors: map-file omits mask_b\n");
+ (void)fprintf(stdout,"Grid B size n_b: %lu // Number of rows/destinations\n",var_area_b->sz);
+ if(var_mask_b) (void)fprintf(stdout,"mask_b 0's, 1's: %lu, %lu\n",mask_b_zro,mask_b_one); else (void)fprintf(stdout,"mask_b 0's, 1's: map-file omits mask_b\n");
+ if(var_mask_b) (void)fprintf(stdout,"mask_b min, max: %.0f, %.0f\n",mask_b_min,mask_b_max); else (void)fprintf(stdout,"mask_b min, max: map-file omits mask_b\n");
+ if(var_mask_b) (void)fprintf(stdout,"mask_b S errors: %lu%s\n",mask_b_err,mask_b_err ? " <--- # of weights that, in violation of mask_b, contribute from source gridcells to masked destination gridcells WARNING WARNING WARNING" : ""); else (void)fprintf(stdout,"mask_b S errors: map-file omits mask_b\n");
if(has_area_b){
- fprintf(stdout,"area_b sum/4*pi: %0.16f = 1.0%s%0.1e // Perfect is 1.0 for global Grid B\n",area_b_ttl/4.0/M_PI,area_b_ttl/4.0/M_PI > 1 ? "+" : "-",fabs(1.0-area_b_ttl/4.0/M_PI));
- fprintf(stdout,"area_b min, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid B cell [%lu,%+g,%+g]\n",area_b_min,rds_earth*sqrt(area_b_min)/1000.0,sqrt(area_b_min)*180.0/M_PI,idx_min_area_b+1UL,var_yc_b->val.dp[idx_min_area_b],var_xc_b->val.dp[idx_min_area_b]);
- fprintf(stdout,"area_b max, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid B cell [%lu,%+g,%+g]\n",area_b_max,rds_earth*sqrt(area_b_max)/1000.0,sqrt(area_a_max)*180.0/M_PI,idx_max_area_b+1UL,var_yc_b->val.dp[idx_max_area_b],var_xc_b->val.dp[idx_max_area_b]);
+ (void)fprintf(stdout,"area_b sum/4*pi: %0.16f = 1.0%s%0.1e // Perfect is 1.0 for global Grid B\n",area_b_ttl/4.0/M_PI,area_b_ttl/4.0/M_PI > 1 ? "+" : "-",fabs(1.0-area_b_ttl/4.0/M_PI));
+ (void)fprintf(stdout,"area_b min, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid B cell [%lu,%+g,%+g]\n",area_b_min,rds_earth*sqrt(area_b_min)/1000.0,sqrt(area_b_min)*180.0/M_PI,idx_min_area_b+1UL,var_yc_b->val.dp[idx_min_area_b],var_xc_b->val.dp[idx_min_area_b]);
+ (void)fprintf(stdout,"area_b max, ~dx: %0.16e sr, ~%0.2f km, ~%0.2f degrees in grid B cell [%lu,%+g,%+g]\n",area_b_max,rds_earth*sqrt(area_b_max)/1000.0,sqrt(area_a_max)*180.0/M_PI,idx_max_area_b+1UL,var_yc_b->val.dp[idx_max_area_b],var_xc_b->val.dp[idx_max_area_b]);
if(fabs(1.0-area_b_ttl/4.0/M_PI) < 1.0e-2) grid_b_tiles_sphere=True;
}else{
- fprintf(stdout,"area_b sum/4*pi: map-file does not provide completely non-zero area_b\n");
- fprintf(stdout,"area_b min, ~dx: map-file does not provide completely non-zero area_b\n");
- fprintf(stdout,"area_b max, ~dx: map-file does not provide completely non-zero area_b\n");
+ (void)fprintf(stdout,"area_b sum/4*pi: map-file does not provide completely non-zero area_b\n");
+ (void)fprintf(stdout,"area_b min, ~dx: map-file does not provide completely non-zero area_b\n");
+ (void)fprintf(stdout,"area_b max, ~dx: map-file does not provide completely non-zero area_b\n");
} /* !has_area_b */
- fprintf(stdout,"Row (destination cell) indices utilized min, max: %.0f, %.0f\n",row_min,row_max);
- fprintf(stdout,"Ignored destination cells (empty rows): %d\n\n",hst_row[0]);
+ (void)fprintf(stdout,"Row (destination cell) indices utilized min, max: %.0f, %.0f\n",row_min,row_max);
+ (void)fprintf(stdout,"Ignored destination cells (empty rows): %d\n\n",hst_row[0]);
/* Compute frac_a statistics from frac_a disk values */
if(has_frac_a) nco_map_var_min_max_ttl(var_frac_a,var_area_a->val.dp,area_wgt_a,mask_a_val,&frac_min_dsk,&idx_min,&frac_max_dsk,&idx_max,&frac_ttl_dsk,&frac_avg_dsk,&mebs,&rms,&sdn);
@@ -2560,15 +2561,15 @@ nco_map_chk /* Map-file evaluation */
nco_map_var_min_max_ttl(var_frac_a,var_area_a->val.dp,area_wgt_a,mask_a_val,&frac_min_cmp,&idx_min,&frac_max_cmp,&idx_max,&frac_ttl_cmp,&frac_avg_cmp,&mebs,&rms,&sdn);
/* Ignore frac_a values when area_a or area_b are all invalid or zero */
- if(!has_area_a || !has_area_b) fprintf(stdout,"INFO: The following frac_a metrics may be safely ignored because either or both area_a and area_b are everywhere undefined or zero\n");
- if(nco_rgr_mth_typ == nco_rgr_mth_bilinear) fprintf(stdout,"INFO: Map-file metadata indicates that these weights were produced by an intentionally non-conservative algorithm (e.g., bilinear). Scary-looking conservation metrics are therefore expected.\n");
- fprintf(stdout,"Conservation metrics (column-sums of area_b-weighted weights normalized by area_a) and errors\nEnglish translation: Conservation measures the total fraction of an input/source gridcell that contributes to the output/destination grid\nPerfect conservation metrics for global unmasked Grid B are frac_a avg = min = max = 1.0, frac_a mbs = rms = sdn = 0.0:\n");
- fprintf(stdout,"frac_a avg: %0.16f = 1.0%s%0.1e // %sean\n",frac_avg_cmp,frac_avg_cmp > 1 ? "+" : "-",fabs(1.0-frac_avg_cmp),area_wgt_a ? "Area-weighted m" : "M");
- fprintf(stdout,"frac_a min: %0.16f = 1.0%s%0.1e // Minimum in grid A cell [%lu,%+g,%+g]\n",frac_min_cmp,frac_min_cmp > 1 ? "+" : "-",fabs(1.0-frac_min_cmp),idx_min+1UL,var_yc_a->val.dp[idx_min],var_xc_a->val.dp[idx_min]);
- fprintf(stdout,"frac_a max: %0.16f = 1.0%s%0.1e // Maximum in grid A cell [%lu,%+g,%+g]\n",frac_max_cmp,frac_max_cmp > 1 ? "+" : "-",fabs(1.0-frac_max_cmp),idx_max+1UL,var_yc_a->val.dp[idx_max],var_xc_a->val.dp[idx_max]);
- fprintf(stdout,"frac_a mbs: %0.16f = %0.1e // %sean absolute bias from 1.0\n",mebs,mebs,area_wgt_a ? "Area-weighted m" : "M");
- fprintf(stdout,"frac_a rms: %0.16f = %0.1e // %sRMS relative to 1.0\n",rms,rms,area_wgt_a ? "Area-weighted " : "");
- fprintf(stdout,"frac_a sdn: %0.16f = %0.1e // Standard deviation\n",sdn,sdn);
+ if(!has_area_a || !has_area_b) (void)fprintf(stdout,"INFO: The following frac_a metrics may be safely ignored because either or both area_a and area_b are everywhere undefined or zero\n");
+ if(nco_rgr_mth_typ == nco_rgr_mth_bilinear) (void)fprintf(stdout,"INFO: Map-file metadata indicates that these weights were produced by an intentionally non-conservative algorithm (e.g., bilinear). Scary-looking conservation metrics are therefore expected.\n");
+ (void)fprintf(stdout,"Conservation metrics (column-sums of area_b-weighted weights normalized by area_a) and errors\nEnglish translation: Conservation measures the total fraction of an input/source gridcell that contributes to the output/destination grid\nPerfect conservation metrics for global unmasked Grid B are frac_a avg = min = max = 1.0, frac_a mbs = rms = sdn = 0.0:\n");
+ (void)fprintf(stdout,"frac_a avg: %0.16f = 1.0%s%0.1e // %sean\n",frac_avg_cmp,frac_avg_cmp > 1 ? "+" : "-",fabs(1.0-frac_avg_cmp),area_wgt_a ? "Area-weighted m" : "M");
+ (void)fprintf(stdout,"frac_a min: %0.16f = 1.0%s%0.1e // Minimum in grid A cell [%lu,%+g,%+g]\n",frac_min_cmp,frac_min_cmp > 1 ? "+" : "-",fabs(1.0-frac_min_cmp),idx_min+1UL,var_yc_a->val.dp[idx_min],var_xc_a->val.dp[idx_min]);
+ (void)fprintf(stdout,"frac_a max: %0.16f = 1.0%s%0.1e // Maximum in grid A cell [%lu,%+g,%+g]\n",frac_max_cmp,frac_max_cmp > 1 ? "+" : "-",fabs(1.0-frac_max_cmp),idx_max+1UL,var_yc_a->val.dp[idx_max],var_xc_a->val.dp[idx_max]);
+ (void)fprintf(stdout,"frac_a mbs: %0.16f = %0.1e // %sean absolute bias from 1.0\n",mebs,mebs,area_wgt_a ? "Area-weighted m" : "M");
+ (void)fprintf(stdout,"frac_a rms: %0.16f = %0.1e // %sRMS relative to 1.0\n",rms,rms,area_wgt_a ? "Area-weighted " : "");
+ (void)fprintf(stdout,"frac_a sdn: %0.16f = %0.1e // Standard deviation\n",sdn,sdn);
/* Inform/Warn if difference between disk and computed values */
double cmp_dsk_dff;
@@ -2587,7 +2588,7 @@ nco_map_chk /* Map-file evaluation */
if(var_area_a->val.dp[idx] == 0.0) cnt_zro++;
if(has_area_a && has_area_b && nco_rgr_mth_typ != nco_rgr_mth_bilinear)
- if(fabs(frac_max_cmp-1.0) > eps_max_wrn || (grid_b_tiles_sphere && !mask_b_zro && (fabs(frac_min_cmp-1.0) > eps_max_wrn))) fprintf(stdout,"\nWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\tDanger, Will Robinson! max(frac_a) or min(frac_a) error exceeds %0.1e\n\tRegridding with these embarrassing weights will produce funny results\n\tSuggest re-generating weights with a better algorithm/weight-generator\n\tHave both input grid-files been validated? If not, one might be barmy\nWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\n",eps_max_wrn);
+ if(fabs(frac_max_cmp-1.0) > eps_max_wrn || (grid_b_tiles_sphere && !mask_b_zro && (fabs(frac_min_cmp-1.0) > eps_max_wrn))) (void)fprintf(stdout,"\nWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\tDanger, Will Robinson! max(frac_a) or min(frac_a) error exceeds %0.1e\n\tRegridding with these embarrassing weights will produce funny results\n\tSuggest re-generating weights with a better algorithm/weight-generator\n\tHave both input grid-files been validated? If not, one might be barmy\nWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\n",eps_max_wrn);
if(nco_dbg_lvl_get() >= nco_dbg_std){
sz=var_frac_a->sz;
@@ -2597,18 +2598,18 @@ nco_map_chk /* Map-file evaluation */
for(idx=0;idx<sz;idx++){
if(!has_mask_a || (has_mask_a && var_mask_a->val.ip[idx] == 1)){
if((val[idx]-1.0 > eps_err) || (grid_b_tiles_sphere && (fabs(val[idx]-1.0) > eps_err))){
- if(nco_dbg_lvl_get() >= nco_dbg_fl) fprintf(stdout,"WARNING conservation = %0.16f = 1.0%s%0.1e for grid A cell [%lu,%+g,%+g]\n",val[idx],val[idx] > 1 ? "+" : "-",fabs(1.0-val[idx]),idx+1UL,var_yc_a->val.dp[idx],var_xc_a->val.dp[idx]);
+ if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(stdout,"WARNING conservation = %0.16f = 1.0%s%0.1e for grid A cell [%lu,%+g,%+g]\n",val[idx],val[idx] > 1 ? "+" : "-",fabs(1.0-val[idx]),idx+1UL,var_yc_a->val.dp[idx],var_xc_a->val.dp[idx]);
wrn_nbr++;
} /* !err */
} /* !msk */
} /* !idx */
- if(wrn_nbr > 0) fprintf(stdout,"WARNING non-conservative weighted column-sums (error exceeds tolerance = %0.1e) for %d of %lu grid A cells\nNB: conservation WARNINGS may be safely ignored for Grid A cells not completely overlapped with unmasked Grid B cells (e.g., coastlines)\nThese diagnostics imperfectly attempt to rule-out such false-positive WARNINGs\nTrue-positive WARNINGs occur in source gridcells that this map under-extracts (error < 0) or over-extracts (error > 0)\n\n",eps_err,wrn_nbr,var_area_a->sz);
+ if(wrn_nbr > 0) (void)fprintf(stdout,"WARNING non-conservative weighted column-sums (error exceeds tolerance = %0.1e) for %d of %lu grid A cells\nNB: conservation WARNINGS may be safely ignored for Grid A cells not completely overlapped with unmasked Grid B cells (e.g., coastlines)\nThese diagnostics imperfectly attempt to rule-out such false-positive WARNINGs\nTrue-positive WARNINGs occur in source gridcells that this map under-extracts (error < 0) or over-extracts (error > 0)\n\n",eps_err,wrn_nbr,var_area_a->sz);
} /* !dbg */
if(nco_dbg_lvl_get() >= nco_dbg_std){
- fprintf(stdout,"Commands to examine conservation extrema:\n");
- fprintf(stdout,"min(frac_a): ncks --fortran -H --trd -d n_a,%lu -v .?_a %s\n",idx_min+1UL,fl_in);
- fprintf(stdout,"max(frac_a): ncks --fortran -H --trd -d n_a,%lu -v .?_a %s\n",idx_max+1UL,fl_in);
+ (void)fprintf(stdout,"Commands to examine conservation extrema:\n");
+ (void)fprintf(stdout,"min(frac_a): ncks --fortran -H --trd -d n_a,%lu -v .?_a %s\n",idx_min+1UL,fl_in);
+ (void)fprintf(stdout,"max(frac_a): ncks --fortran -H --trd -d n_a,%lu -v .?_a %s\n",idx_max+1UL,fl_in);
} /* !dbg */
/* Compute frac_b statistics from frac_b disk values */
@@ -2617,14 +2618,14 @@ nco_map_chk /* Map-file evaluation */
nco_map_frac_b_clc(var_S,var_row,var_frac_b);
nco_map_var_min_max_ttl(var_frac_b,var_area_b->val.dp,area_wgt_b,mask_b_val,&frac_min_cmp,&idx_min,&frac_max_cmp,&idx_max,&frac_ttl_cmp,&frac_avg_cmp,&mebs,&rms,&sdn);
- fprintf(stdout,"\n");
- fprintf(stdout,"Consistency metrics (row-sums of weights) and errors\nEnglish Translation: Consistency measures the total fraction of an output/destination gridcell that is contributed by the input/source grid\nPerfect consistency metrics for global unmasked Grid A are frac_b avg = min = max = 1.0, frac_b mbs = rms = sdn = 0.0:\n");
- fprintf(stdout,"frac_b avg: %0.16f = 1.0%s%0.1e // %sean\n",frac_avg_cmp,frac_avg_cmp > 1 ? "+" : "-",fabs(1.0-frac_avg_cmp),area_wgt_b ? "Area-weighted m" : "M");
- fprintf(stdout,"frac_b min: %0.16f = 1.0%s%0.1e // Minimum in grid B cell [%lu,%+g,%+g]\n",frac_min_cmp,frac_min_cmp > 1 ? "+" : "-",fabs(1.0-frac_min_cmp),idx_min+1UL,var_yc_b->val.dp[idx_min],var_xc_b->val.dp[idx_min]);
- fprintf(stdout,"frac_b max: %0.16f = 1.0%s%0.1e // Maximum in grid B cell [%lu,%+g,%+g]\n",frac_max_cmp,frac_max_cmp > 1 ? "+" : "-",fabs(1.0-frac_max_cmp),idx_max+1UL,var_yc_b->val.dp[idx_max],var_xc_b->val.dp[idx_max]);
- fprintf(stdout,"frac_b mbs: %0.16f = %0.1e // %sean absolute bias from 1.0\n",mebs,mebs,area_wgt_b ? "Area-weighted m" : "M");
- fprintf(stdout,"frac_b rms: %0.16f = %0.1e // %sRMS relative to 1.0\n",rms,rms,area_wgt_b ? "Area-weighted " : "");
- fprintf(stdout,"frac_b sdn: %0.16f = %0.1e // Standard deviation\n",sdn,sdn);
+ (void)fprintf(stdout,"\n");
+ (void)fprintf(stdout,"Consistency metrics (row-sums of weights) and errors\nEnglish Translation: Consistency measures the total fraction of an output/destination gridcell that is contributed by the input/source grid\nPerfect consistency metrics for global unmasked Grid A are frac_b avg = min = max = 1.0, frac_b mbs = rms = sdn = 0.0:\n");
+ (void)fprintf(stdout,"frac_b avg: %0.16f = 1.0%s%0.1e // %sean\n",frac_avg_cmp,frac_avg_cmp > 1 ? "+" : "-",fabs(1.0-frac_avg_cmp),area_wgt_b ? "Area-weighted m" : "M");
+ (void)fprintf(stdout,"frac_b min: %0.16f = 1.0%s%0.1e // Minimum in grid B cell [%lu,%+g,%+g]\n",frac_min_cmp,frac_min_cmp > 1 ? "+" : "-",fabs(1.0-frac_min_cmp),idx_min+1UL,var_yc_b->val.dp[idx_min],var_xc_b->val.dp[idx_min]);
+ (void)fprintf(stdout,"frac_b max: %0.16f = 1.0%s%0.1e // Maximum in grid B cell [%lu,%+g,%+g]\n",frac_max_cmp,frac_max_cmp > 1 ? "+" : "-",fabs(1.0-frac_max_cmp),idx_max+1UL,var_yc_b->val.dp[idx_max],var_xc_b->val.dp[idx_max]);
+ (void)fprintf(stdout,"frac_b mbs: %0.16f = %0.1e // %sean absolute bias from 1.0\n",mebs,mebs,area_wgt_b ? "Area-weighted m" : "M");
+ (void)fprintf(stdout,"frac_b rms: %0.16f = %0.1e // %sRMS relative to 1.0\n",rms,rms,area_wgt_b ? "Area-weighted " : "");
+ (void)fprintf(stdout,"frac_b sdn: %0.16f = %0.1e // Standard deviation\n",sdn,sdn);
/* Inform/Warn if difference between disk and computed values */
if(has_frac_b){
@@ -2636,7 +2637,7 @@ nco_map_chk /* Map-file evaluation */
/* NB: fabs() does not enclose frac_max_cmp below yet does in corresponding expression for frac_a above
I think this is correct, or at least harmless, and rejects some false positive WARNINGs */
- if(frac_max_cmp-1.0 > eps_max_wrn || (grid_a_tiles_sphere && !mask_a_zro && (fabs(frac_min_cmp-1.0) > eps_max_wrn))) fprintf(stdout,"\nWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\tDanger, Will Robinson! max(frac_b) or min(frac_b) error exceeds %0.1e\n\tRegridding with these embarrassing weights will produce funny results\n\tSuggest re-generating weights with a better algorithm/weight-generator\n\tHave both input grid-files been validated? If not, one might be barmy\n%sWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\n",eps_max_wrn,(frac_max_cmp-1.0 > eps_max_wrn) ? "\tFor example, a source grid that overlaps itself will usually result in frac_b >> 1\n" : "");
+ if(frac_max_cmp-1.0 > eps_max_wrn || (grid_a_tiles_sphere && !mask_a_zro && (fabs(frac_min_cmp-1.0) > eps_max_wrn))) (void)fprintf(stdout,"\nWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\tDanger, Will Robinson! max(frac_b) or min(frac_b) error exceeds %0.1e\n\tRegridding with these embarrassing weights will produce funny results\n\tSuggest re-generating weights with a better algorithm/weight-generator\n\tHave both input grid-files been validated? If not, one might be barmy\n%sWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n\n",eps_max_wrn,(frac_max_cmp-1.0 > eps_max_wrn) ? "\tFor example, a source grid that overlaps itself will usually result in frac_b >> 1\n" : "");
if(nco_dbg_lvl_get() >= nco_dbg_std){
sz=var_frac_b->sz;
@@ -2646,12 +2647,12 @@ nco_map_chk /* Map-file evaluation */
for(idx=0;idx<sz;idx++){
if(!has_mask_b || (has_mask_b && var_mask_b->val.ip[idx] == 1)){
if((val[idx]-1.0 > eps_err) || (grid_a_tiles_sphere && (fabs(val[idx]-1.0) > eps_err))){
- if(nco_dbg_lvl_get() >= nco_dbg_fl) fprintf(stdout,"WARNING consistency = %0.16f = 1.0%s%0.1e for grid B cell [%lu,%+g,%+g]\n",val[idx],val[idx] > 1 ? "+" : "-",fabs(1.0-val[idx]),idx+1UL,var_yc_b->val.dp[idx],var_xc_b->val.dp[idx]);
+ if(nco_dbg_lvl_get() >= nco_dbg_fl) (void)fprintf(stdout,"WARNING consistency = %0.16f = 1.0%s%0.1e for grid B cell [%lu,%+g,%+g]\n",val[idx],val[idx] > 1 ? "+" : "-",fabs(1.0-val[idx]),idx+1UL,var_yc_b->val.dp[idx],var_xc_b->val.dp[idx]);
wrn_nbr++;
} /* !err */
} /* !msk */
} /* !idx */
- if(wrn_nbr > 0) fprintf(stdout,"WARNING non-consistent row-sums (error exceeds tolerance = %0.1e) for %d of %lu grid B cells\nNB: consistency WARNINGS may be safely ignored for Grid B cells not completely overlapped with unmasked Grid A cells (e.g., coastlines)\nThese diagnostics imperfectly attempt to rule-out such false-positive WARNINGs\nTrue-positive WARNINGs occur in destination gridcells that this map underfills (error < 0) or overfills (error > 0)\n\n",eps_err,wrn_nbr,var_area_b->sz);
+ if(wrn_nbr > 0) (void)fprintf(stdout,"WARNING non-consistent row-sums (error exceeds tolerance = %0.1e) for %d of %lu grid B cells\nNB: consistency WARNINGS may be safely ignored for Grid B cells not completely overlapped with unmasked Grid A cells (e.g., coastlines)\nThese diagnostics imperfectly attempt to rule-out such false-positive WARNINGs\nTrue-positive WARNINGs occur in destination gridcells that this map underfills (error < 0) or overfills (error > 0)\n\n",eps_err,wrn_nbr,var_area_b->sz);
} /* !dbg */
if(flg_frac_b_nrm){
@@ -2690,27 +2691,27 @@ nco_map_chk /* Map-file evaluation */
} /* !flg_frac_b_nrm */
if(nco_dbg_lvl_get() >= nco_dbg_std){
- fprintf(stdout,"Commands to examine consistency extrema:\n");
- fprintf(stdout,"min(frac_b): ncks --fortran -H --trd -d n_b,%lu -v .?_b %s\n",idx_min+1UL,fl_in);
- fprintf(stdout,"max(frac_b): ncks --fortran -H --trd -d n_b,%lu -v .?_b %s\n",idx_max+1UL,fl_in);
+ (void)fprintf(stdout,"Commands to examine consistency extrema:\n");
+ (void)fprintf(stdout,"min(frac_b): ncks --fortran -H --trd -d n_b,%lu -v .?_b %s\n",idx_min+1UL,fl_in);
+ (void)fprintf(stdout,"max(frac_b): ncks --fortran -H --trd -d n_b,%lu -v .?_b %s\n",idx_max+1UL,fl_in);
} /* !dbg */
- fprintf(stdout,"\nHistogram of non-zero entries in sparse-matrix:\n");
- fprintf(stdout," Column 1: Number of non-zero entries (histogram bin)\n");
- fprintf(stdout," Column 2: Number of columns (source cells) with that many non-zero entries\n");
- fprintf(stdout," Column 3: Number of rows (destination cells) with that many non-zero entries\n");
- fprintf(stdout," [");
+ (void)fprintf(stdout,"\nHistogram of non-zero entries in sparse-matrix:\n");
+ (void)fprintf(stdout," Column 1: Number of non-zero entries (histogram bin)\n");
+ (void)fprintf(stdout," Column 2: Number of columns (source cells) with that many non-zero entries\n");
+ (void)fprintf(stdout," Column 3: Number of rows (destination cells) with that many non-zero entries\n");
+ (void)fprintf(stdout," [");
hst_sz_nnz=hst_sz;
for(idx=0;idx<=hst_sz;idx++)
if(hst_col[idx] > 0 || hst_row[idx] > 0) hst_sz_nnz=idx;
for(idx=0;idx<=hst_sz_nnz;idx++)
- if(hst_col[idx] > 0 || hst_row[idx] > 0) fprintf(stdout,"[%s%lu,%d,%d]%s",idx == hst_sz ? ">= " : "",idx,hst_col[idx],hst_row[idx],idx != hst_sz_nnz ? ", " : "]\n");
+ if(hst_col[idx] > 0 || hst_row[idx] > 0) (void)fprintf(stdout,"[%s%lu,%d,%d]%s",idx == hst_sz ? ">= " : "",idx,hst_col[idx],hst_row[idx],idx != hst_sz_nnz ? ", " : "]\n");
- fprintf(stdout,"\nHistogram of weights S: [bin_min < weights <= bin_max]\n");
- fprintf(stdout," Column 1: Lower bound on weights (bin_min)\n");
- fprintf(stdout," Column 2: Number of weights in bin\n");
- fprintf(stdout," Column 3: Upper bound on weights (bin_max)\n");
- fprintf(stdout," [");
+ (void)fprintf(stdout,"\nHistogram of weights S: [bin_min < weights <= bin_max]\n");
+ (void)fprintf(stdout," Column 1: Lower bound on weights (bin_min)\n");
+ (void)fprintf(stdout," Column 2: Number of weights in bin\n");
+ (void)fprintf(stdout," Column 3: Upper bound on weights (bin_max)\n");
+ (void)fprintf(stdout," [");
hst_sz_nnz=0;
int hst_vld_crr=0;
for(idx=0;idx<hst_wgt_nbr;idx++)
=====================================
src/nco/nco_rgr.c
=====================================
@@ -5134,7 +5134,7 @@ nco_rgr_wgt /* [fnc] Regrid with external weights */
rcd=nco_get_vars(in_id,wgt_raw_id,dmn_srt,dmn_cnt,dmn_srd,wgt_raw,NC_DOUBLE);
} /* !SCRIP */
- /* 20250906 Sanity check on row,col because Walter H. produced and tried to use a map with uninitialized values of row, col, and wgt! */
+ /* 20250905 Sanity check on row,col because Walter H. produced and tried to use a map with uninitialized values of row, col, and wgt! All values of row + col in that file were NC_MIN_INT. */
/* NB: Identical code in nco_map.c:nco_map_chk() */
size_t sz; /* [nbr] Number of links */
sz=mpf.num_links;
@@ -5144,28 +5144,28 @@ nco_rgr_wgt /* [fnc] Regrid with external weights */
size_t cnt_bad; /* [nbr] Number of invalid indexes */
cnt_bad=0L;
for(idx=0;idx<sz;idx++){
- idx_row=row_dst_adr[idx]-1L;
+ idx_row=row_dst_adr[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_row < 0L) cnt_bad++;
} /* !idx */
for(idx=0;idx<sz;idx++){
- idx_row=row_dst_adr[idx]-1L;
+ idx_row=row_dst_adr[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_row < 0L) break;
} /* !idx */
if(idx != sz){
- (void)fprintf(stderr,"%s: ERROR %s (aka \"the regridder\") reports map-file variable \"row\" contains %lu illegal value(s) among %lu total values. First illegal value found is, in Fortran (1-based) index notation, row(%lu) = %ld. \"row\" contains indexes into the weight matrix S. Each Fortran-convention index must be >= 1. Without valid indexes, the map-file is unusable.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_row+1L);
+ (void)fprintf(stderr,"%s: ERROR %s (aka \"the regridder\") reports map-file variable \"row\" contains %lu illegal value(s) among %lu total values. \"row\" contains indexes into the weight matrix S. First illegal value found is, in Fortran (1-based) index notation, row(%lu) = %ld. Each Fortran-convention index must be >= 1. Illegal indexes make this map-file corrupt.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_row+1L);
nco_exit(EXIT_FAILURE);
} /* !idx */
cnt_bad=0L;
for(idx=0;idx<sz;idx++){
- idx_col=col_src_adr[idx]-1L;
+ idx_col=col_src_adr[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_col < 0L) cnt_bad++;
} /* !idx */
for(idx=0;idx<sz;idx++){
- idx_col=col_src_adr[idx]-1L;
+ idx_col=col_src_adr[idx]-1L; /* Convert from on-disk 1-based Fortran index to in-RAM 0-based C index */
if(idx_col < 0L) break;
} /* !idx */
if(idx != sz){
- (void)fprintf(stderr,"%s: ERROR %s (aka \"the regridder\") reports map-file variable \"col\" contains %lu illegal value(s) among %lu total values. First illegal value found is, in Fortran (1-based) index notation, col(%lu) = %ld. \"col\" contains indexes into the weight matrix S. Each Fortran-convention index must be >= 1. Without valid indexes, the map-file is unusable.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_col+1L);
+ (void)fprintf(stderr,"%s: ERROR %s (aka \"the regridder\") reports map-file variable \"col\" contains %lu illegal value(s) among %lu total values. \"col\" contains indexes into the weight matrix S. First illegal value found is, in Fortran (1-based) index notation, col(%lu) = %ld. Each Fortran-convention index must be >= 1. Illegal indexes make this map-file corrupt.\nHINT: Re-generate this map and, before using it, check it with \"ncks --chk_map map.nc\"\n",nco_prg_nm_get(),fnc_nm,cnt_bad,sz,(size_t)(idx+1L),idx_col+1L);
nco_exit(EXIT_FAILURE);
} /* !idx */
} /* !1 */
@@ -5672,7 +5672,7 @@ nco_rgr_wgt /* [fnc] Regrid with external weights */
If necessary, use remap data to diagnose them from scratch
Other extensive variables (like counts, population) will be extracted and summed not averaged */
/* Exception list source:
- ALM/CLM: landmask (20170504: Debatable, including erroneous mask may be better than completely excluding an expected mask) (20170504: must keep landfrac since regridded by ncremap for SGS option)
+ ALM/CLM/CTSM/ELM: landmask (20170504: Debatable, including erroneous mask may be better than completely excluding an expected mask) (20170504: must keep landfrac since regridded by ncremap for SGS option)
AMSR: Latitude, Longitude
ARGO: LATITUDE, LONGITUDE
CAM, CERES, CMIP5: lat, lon
@@ -10397,7 +10397,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
else if((rcd=nco_inq_varid_flg(in_id,"Mask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("Mask");
else if((rcd=nco_inq_varid_flg(in_id,"mask_b",&msk_id)) == NC_NOERR) msk_nm_in=strdup("mask_b");
else if((rcd=nco_inq_varid_flg(in_id,"grid_imask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("grid_imask");
- else if((rcd=nco_inq_varid_flg(in_id,"landmask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("landmask"); /* ALM/CLM */
+ else if((rcd=nco_inq_varid_flg(in_id,"landmask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("landmask"); /* ALM/CLM/CTSM/ELM */
else if((rcd=nco_inq_varid_flg(in_id,"tmask",&msk_id)) == NC_NOERR) msk_nm_in=strdup("tmask"); /* CICE */
} /* !msk_nm_in */
@@ -11542,6 +11542,10 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
double lat_min; /* [dgr] Minimum latitude */
double lon_max; /* [dgr] Maximum longitude */
double lon_min; /* [dgr] Minimum longitude */
+ double lon_dff; /* [dgr] Current longitude difference between adjacent cells */
+ double lon_dff_max; /* [dgr] Maximum longitude difference between adjacent cells */
+ double lon_dff_max_thr; /* [dgr] Threshold maximum longitude difference between adjacent cells for branch cut */
+ nco_bool flg_2D_brnch_cut=False; /* [flg] Domain of 2D grid crosses longitude branch cut */
idx_ctr=0;
if(has_mss_val_ctr){
/* Find first non-missing value center and thus corners */
@@ -11568,12 +11572,12 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
} /* !idx */
}else{ /* !flg_wrt_crn */
/* 20170424: Diagnose grid-extent when corners were not provided or inferred
- This is usually (always?) for 1d unstructured grids with only centers provided */
+ This can be for 1D unstructured grids or 2D grids with only centers provided */
lon_max=grd_ctr_lon[idx_ctr];
lat_max=grd_ctr_lat[idx_ctr];
lon_min=grd_ctr_lon[idx_ctr];
lat_min=grd_ctr_lat[idx_ctr];
- for(idx_ctr=1;idx_ctr<grd_sz_nbr;idx_ctr++){
+ for(idx_ctr=1;idx_ctr<grd_sz_nbr;idx_ctr++){ /* NB: Starts from 1 */
if(has_mss_val_ctr)
if(grd_ctr_lat[idx_ctr] == mss_val_ctr_dbl)
continue;
@@ -11585,6 +11589,26 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
} /* flg_wrt_crn */
lat_spn=lat_max-lat_min;
lon_spn=lon_max-lon_min;
+ /* 20251017 lon_spn=lon_max-lon_min fails for regional 2D grids that cross branch cut, e.g., lon_ctr=[358,359,0,1,2]
+ Solution: Search for whether adjacent cells' longitude spacing exceeds lon_dff_max_thr=340 degrees
+ This threshold chosen because lon_dff_max for 1 degree grids e.g., lon_ctr=[358,359,0,1,2] == 359 degrees
+ This threshold accomodates reasonably large regions of grids with resolution < ~10 degrees */
+ lon_dff_max=0.0;
+ lon_dff_max_thr=340.0;
+ if(flg_grd_2D){
+ for(idx_ctr=1;idx_ctr<grd_sz_nbr;idx_ctr++){ /* NB: Starts from 1 */
+ if(has_mss_val_ctr)
+ if(grd_ctr_lat[idx_ctr] == mss_val_ctr_dbl)
+ continue;
+ lon_dff=fabs(grd_ctr_lon[idx_ctr]-grd_ctr_lon[idx_ctr-1]);
+ lon_dff_max=(lon_dff > lon_dff_max) ? lon_dff : lon_dff_max;
+ } /* !idx_ctr */
+ if((float)lon_dff_max > lon_dff_max_thr){
+ (void)fprintf(stderr,"%s: INFO %s Greatest angle between adjacent longitudes in 2D grid exceeds lon_dff_max_thr = %g degrees (lon_dff_max = %g) which implies that this grid crosses the longitudinal branch cut\n",nco_prg_nm_get(),fnc_nm,lon_dff_max_thr,lon_dff_max);
+ (void)fprintf(stderr,"%s: INFO %s Recomputing longitude span by placing all longitudes on same branch cut\n",nco_prg_nm_get(),fnc_nm);
+ flg_2D_brnch_cut=True;
+ } /* lon_dff_max */
+ } /* !flg_grd_2D */
/* Use strict rules for rectangular grids, looser for spans that are inferred, or center-to-center not corner-to-corner */
if(flg_grd_2D){
if((float)lon_spn == 360.0f && (float)lat_spn == 180.0f) nco_grd_xtn=nco_grd_xtn_glb; else nco_grd_xtn=nco_grd_xtn_rgn;
@@ -11621,8 +11645,8 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
} /* !nco_grd_xtn */
/* Diagnose area if necessary
- 20170510: ALM/CLM "area" is _FillValue=1.0e36f over ocean and total gridcell area in km2 (not multiplied by landfrac) elsewhere
- Writing this ALM/CLM "area" variable to gridfile, then using with ERWG --user_areas could be disastrous (depending on mask array and interpolation type)
+ 20170510: ALM/CLM/CTSM/ELM "area" is _FillValue=1.0e36f over ocean and total gridcell area in km2 (not multiplied by landfrac) elsewhere
+ Writing this ALM/CLM/CTSM/ELM "area" variable to gridfile, then using with ERWG --user_areas could be disastrous (depending on mask array and interpolation type)
On the other hand CAM "area" variable is exactly what we want for gridfile
Input areas are considered "untrustworthy" iff they have _and use_ missing value attribute
Re-diagnose areas considered untrustworthy so output area array does not contain missing values */
@@ -11664,7 +11688,7 @@ nco_grd_nfr /* [fnc] Infer SCRIP-format grid file from input data file */
/* Change missing-value-masked points to 0 integer mask for SCRIP grids (SCRIP has no missing value convention)
Input mask can be any type and output mask will always be NC_INT
Applications:
- ALM/CLM mask (landmask) is NC_FLOAT and defines though does not use NC_FLOAT missing value
+ ALM/CLM/CTSM/ELM mask (landmask) is NC_FLOAT and defines though does not use NC_FLOAT missing value
CICE mask (tmask/umask) is NC_FLOAT and defines and uses NC_FLOAT missing value
RACMO mask is NC_FLOAT and defines though does not use NC_FLOAT missing value
AMSR mask is NC_SHORT and has no missing value
=====================================
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 "Playground";
+ return "Goff Island";
} /* !nco_nmn_get() */
void
View it on GitLab: https://salsa.debian.org/debian-gis-team/nco/-/commit/f3602ae93fbdf70499cb1454bb09decdcca617e6
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/nco/-/commit/f3602ae93fbdf70499cb1454bb09decdcca617e6
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/20251029/f614ec06/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list