Git Product home page Git Product logo

nco's Introduction

NCO NetCDF Operators

The NCO toolkit manipulates and analyzes data stored in netCDF-accessible formats, including DAP, HDF4, and HDF5. It exploits the geophysical expressivity of many CF (Climate & Forecast) metadata conventions, the flexible description of physical dimensions translated by UDUnits, the network transparency of OPeNDAP, the storage features (e.g., compression, chunking, groups) of HDF (the Hierarchical Data Format), and many powerful mathematical and statistical algorithms of GSL (the GNU Scientific Library). NCO is fast, powerful, and free.

What is NCO?

The netCDF Operators (NCO) comprise a dozen standalone, command-line programs that take netCDF, HDF, and/or DAP files as input, then operate (e.g., derive new data, compute statistics, print, hyperslab, manipulate metadata) and output the results to screen or files in text, binary, or netCDF formats. NCO aids analysis of gridded scientific data. The shell-command style of NCO allows users to manipulate and analyze files interactively, or with expressive scripts that avoid some overhead of higher-level programming environments.

Traditional geoscience data analysis requires users to work with numerous flat (data in one level or namespace) files. In that paradigm instruments or models produce, and then repositories archive and distribute, and then researchers request and analyze, collections of flat files. NCO works well with that paradigm, yet it also embodies the necessary algorithms to transition geoscience data analysis from relying solely on traditional (or “flat”) datasets to allowing newer hierarchical (or “nested”) datasets.

Operator Full Name Examples
ncap2 netCDF Arithmetic Processor here
ncatted netCDF ATTribute EDitor here
ncbo netCDF Binary Operator here
ncclimo netCDF CLIMatOlogy Generator here
nces netCDF Ensemble Statistics here
ncecat netCDF Ensemble conCATenator here
ncflint netCDF FiLe INTerpolator here
ncks netCDF Kitchen Sink here
ncpdq netCDF Permute Dimensions Quickly, Pack Data Quietly here
ncra netCDF Record Averager here
ncrcat netCDF Record conCATenator here
ncremap netCDF REMAPer here
ncrename netCDF RENAMEer here
ncwa netCDF Weighted Averager here

How to Contribute: Volunteer, Endorse, or Donate

The NCO project homepage points to mailing lists, discussion forums, and instructions to make contributing easy.

Acknowledgements

NCO has been supported by volunteers and professionals since 1995. External support from DOE, NASA, and NSF has sustained development and addition of its most powerful features.

nco's People

Contributors

czender avatar drf5n avatar dywei avatar flyingwithjerome avatar hbdch avatar hegish avatar hmb1 avatar isuruf avatar jedwards4b avatar kgerheiser avatar ocefpaf avatar ocehugo avatar opoplawski avatar rkouznetsov avatar sebastic avatar wangd avatar wenshanw avatar whannah1 avatar xylar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nco's Issues

Performance issues with Increasingly record chunk size

Hi,

I'm facing a performance problem with ncrcat with large files and chunking.

I can get a "standard" performance doing the following:

ncrcat -D9 -4 -L1 --cnk_plc=g3d --cnk_dmn=time,1 --cnk_dmn=lat,1500 --cnk_dmn=lon,1500 `ls *.nc` test.nc

for this case nco is a rather quick. My individual files are nc6 (~150mb each/no chunking) with size 1x6000x7000.

but when i tried to increase the time chunk:

ncrcat -D9 -4 -L1 --cnk_plc=g3d --cnk_dmn=time,360 --cnk_dmn=lat,1500 --cnk_dmn=lon,1500 `ls *.nc` test.nc

I get runtimes much slower and nco is taking much more time to process each individual file.
Example:
Using time chunks of 1,5 and 10 cause runtimes of about 6s, 20s, 50s for 10 individual files (1.6gb). All files were already cached in these tests and were lying in tmpfs locations (both input and output).

If I keep increasing the time chunksize beyond the number of files (say I have the same 10 as above) the speed is more problematic: ncrcat -D9 -4 -L1 --cnk_plc=g3d --cnk_dmn=time,100 ... generate runtimes of the order 100s. So it's clear that the time chunking is affecting performance when reading individual files/arrays. This get worse when using large classical time chunks dimensions (like 365 , 1460, 2920).

Is this expected?

I can feel a memory access pattern problem but i would like to have the best performance without flipping the dimensions and avoid using nonrecord files. A coffee would also be good...

Currently my aggregations are taking a long time and it's clearly bounded by cpu (several parallel calls are consistently slow and reading/writing at about the same speed). The case is a classical aggregation - individual daily files of a year chunked in time for half a year. The chunks are about 180x1000x1000 from the full variable 365x6000x7000 and again from nc6 files. They were originally N4L1 files with chunking and the ncrcat call were also doing a subset, but I dumb down to full nc6 files to check if it was a reading problem when dealing with chunking/cutting.

MPAS-Seaice renamed

MPAS-CICE has been renamed MPAS-Seaice (and mpascice has been changed to mpasseaice accordingly). It would be very helpful if this new name were supported (in addition to mpascice for backward compatibility) in ncclimo the next version of nco. I think the changes required to support this would be quite trivial.

@czender, is this something you can take care of?

4.6.7 tar content has changed

Hi. I am one of the homebrew package manager maintainers.

We pushed the 4.6.7 release to our users. Meanwhile the sha256 of the tar file has changed, meaning that the tag has been moved. This is pretty bad practice. We rely on the sha256 for security reasons, allowing to check if upstream is delivering something fishy. In general you may want to tag a new release instead of moving the tag, if you realise that your release had some major flaw.

Could you please confirm that the change was made on purpose? Also, how big is the difference between the two tags? Should we distribute this with a different version to our users to notify them that there was some change between 4.6.7 and 4.6.7.new ?

See https://github.com/Homebrew/homebrew-science/pull/5887 for reference.

ncks flags

@czender
In order to double check, here is the list of ncks flags (i.e., the argument that does not need to be in / cannot be in key-value pair) I summarized from the ncks documentation.

description flag(s)
Do not alphabetize extracted fields --abc, --alphabetize
Print human-legible calendar strings --cal --calendar, --cln, prn_lgb
Print hidden attributes --hdn, --hidden
Print as valid CDL --cdl
Print as JSON --jsn, --json
Turn on/off copy global/group metadata --Mtd, --Metadata
Turn on/off copy variable metadata --mtd, --metadata
Print numeric representation of missing values --no_blank, --noblank, --no-blank
Print data, metadata and units --print, --prn
Quench all printing to the screen --quench
Retain all dimensions --rad, --retain_all_dimensions, --orphan_dimensions, --rph_dmn
Print summary of ncks hidden features --secret, --ssh, --scr
Toggle the printing of a variable’s units attribute --units
Print as XML in NcML --xml, --ncml, (additional: --xml_no_location, --xml_spr_chr, --xml_spr_nmr)

If there's no interface like

int nco_is_flag(char* flag);

I will try to hard-code them into the source file so that the NCO can clearly recognize the flags and invalid keys (the keys without values).

The list above only includes the long argument.
I would also like to know how a flag is passed to the NCO processor, also by a key-value structure but with a NULL value?

ncrcat segfault if input files are invalid

If I can ncrcat with invalid inputs I get a segfault rather than an informational error. If file2.nc doesn't exist I get the following output:

> ncrcat ../file1.nc file2.nc file3.nc
ncrcat: INFO deriving local filepath from remote filename
Segmentation fault (core dumped)

This is against the conda release of nco 4.6.5. As an aside it would be great to include a --version option in these utilities so you can ascertain the version of the machine install

Packaging NCO in Spack

I'm a developer for the Spack package manager. We had a preliminary package for NCO, but it didn't have a lot of the fancier features. I'm trying to update our package to support things like openmp, dap, and esmf, but I have a few remaining questions:

  1. For the DAP dependency, does NCO directly link to DAP, or does it pick it up from NetCDF? Also, is curl fine or should I use opendap or libdap?

  2. For the OpenMP support, is it smart enough to not use openmp when I try building with Clang or should I explicitly disable that?

  3. What is necessary for ESMF support?

  4. Does NCO require flex and bison? I notice it is looking for them during configure. Does the build crash or do anything differently if they are not found?

  5. I tried running make -j16 check but it looks like it's hanging. The last thing it prints is:

cd bm && ./nco_bm.pl --regress 

INFO: Testing for required modules 

Ooops! Time::HiRes (needed for accurate timing) not found 
Continuing without timing. IO::Socket ... found. 

Any idea what is going wrong with the tests? Or does it just take a long time with no output?

missing cap.h?

I think ncap.h is missing from src/nco in master. I copied it from 4.6.1.

Add support to print non-atomic (NTM) types

This includes enum, vlen, opaque, and compound types. However, the only approach we can attempt with current resources is incremental. The easiest NTM type to support is probably enum, so we'll start with that, then perhaps do vlen next. Supporting printing before writing (to netCDF) makes sense because it reduces the number of calls to add by factor of ~two. ncks will be the initial target. Adding NTM variables to extraction list is not difficult per se, because we actually had to work around NTM to create current list. However, once NTM variables are on main extraction list all operators will try to use them. Hence I may create NTM-specific extraction list, and check/use that only for printing for now. Other operators will ignore NTM list until much later.

libgsl.so.0 error on RHEL6.9

@czender on an LLNL-built RHEL6.9 machine I got the following error:

$ yum install nco.x86_64
Loaded plugins: changelog, priorities, product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-manager,
              : versionlock
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Unable to connect to the host and port specified
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nco.x86_64 0:4.3.7-2.el6 will be installed
--> Processing Dependency: libnetcdf.so.6()(64bit) for package: nco-4.3.7-2.el6.x86_64
--> Processing Dependency: libgslcblas.so.0()(64bit) for package: nco-4.3.7-2.el6.x86_64
--> Processing Dependency: libgsl.so.0()(64bit) for package: nco-4.3.7-2.el6.x86_64
--> Running transaction check
---> Package nco.x86_64 0:4.3.7-2.el6 will be installed
--> Processing Dependency: libgslcblas.so.0()(64bit) for package: nco-4.3.7-2.el6.x86_64
--> Processing Dependency: libgsl.so.0()(64bit) for package: nco-4.3.7-2.el6.x86_64
---> Package netcdf.x86_64 0:4.1.1-3.el6.5 will be installed
--> Processing Dependency: libhdf5_hl.so.6()(64bit) for package: netcdf-4.1.1-3.el6.5.x86_64
--> Processing Dependency: libhdf5.so.6()(64bit) for package: netcdf-4.1.1-3.el6.5.x86_64
--> Running transaction check
---> Package hdf5.x86_64 0:1.8.5.patch1-10.el6 will be installed
---> Package nco.x86_64 0:4.3.7-2.el6 will be installed
--> Processing Dependency: libgslcblas.so.0()(64bit) for package: nco-4.3.7-2.el6.x86_64
--> Processing Dependency: libgsl.so.0()(64bit) for package: nco-4.3.7-2.el6.x86_64
--> Finished Dependency Resolution
Error: Package: nco-4.3.7-2.el6.x86_64 (epel)
           Requires: libgsl.so.0()(64bit)
Error: Package: nco-4.3.7-2.el6.x86_64 (epel)
           Requires: libgslcblas.so.0()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Is there a work around to get this installed?

ncks segfault with --rgr grid* options

This command

ncks -O -D 10 --rgr grd_ttl='FV-scalar grid'
--rgr grid=/tmp/65x128_SCRIP.nc --rgr lat_nbr=65
--rgr lon_nbr=128 --rgr lat_typ=ngl_eqi_pol --rgr lon_typ=Grn_ctr
~/codes/nco/data/in.nc /tmp/foo.nc

will produce a grid file that appears correct, but then will exit with a segfault:

On RHEL6:

...
ncks: INFO nco_grd_mk() reports destination rectangular latitude grid:
lat_wgt_ttl = 2.000000000000000, frc_lat_wgt = 1.000000000000000, area_ttl = 12.566370614358775, frc_area = 0.999999999999968
ncks: nco_fl_out_open() reports sizeof(pid_t) = 4 bytes, pid = 9468, pid_sng_lng = 5 bytes, strlen(pid_sng) = 4 bytes, fl_out_tmp_lng = 38 bytes, strlen(fl_out_tmp) = 37, fl_out_tmp = /tmp/65x128_SCRIP.nc.pid9468.ncks.tmp
ncks: INFO nco_aed_prc() examining variable Global
ncks: INFO nco_aed_prc() examining variable Global
ncks: INFO nco_aed_prc() examining variable Global
ncks: INFO nco_aed_prc() examining variable Global
ncks: INFO nco_aed_prc() examining variable Global
ncks: INFO nco_aed_prc() examining variable area
ncks: INFO nco_aed_prc() examining variable grid_center_lat
ncks: INFO nco_aed_prc() examining variable grid_center_lon
ncks: INFO nco_aed_prc() examining variable grid_corner_lat
ncks: INFO nco_aed_prc() examining variable grid_corner_lon
ncks: INFO Temporary and final files /tmp/65x128_SCRIP.nc are identical---no need to move.
Segmentation fault

Follow all draft CF2 Group scoping rules

There is only one CF2 scoping rule to my knowledge that NCO does not yet follow, and it is somewhat of a corner case, yet NCO should handle it correctly. The CF2 Group draft proposal states:

An identifier specified with a relative path (i.e., with an internal but no leading slash "/") resolves to the indicated location. For example, a coordinates attribute of g1/lat refers to the lat variable in subgroup g1 of the current (referring) group. Upward path traversals from the current group are indicated with the UNIX convention. For example, ../g1/lat refers to the lat variable in the sibling group g1 of the current (referring) group.

Please implement this procedure so that "../" is interpreted as the parent group and "./" is interpreted as the current group, and add regression test(s) to verify compliance.

Remove extra newline for scalar vlen file

When a vlen file has a single scalar variable, and thus no dimensions, ncks prints an extra newline between the types and variable sections. We should eliminate the extra newline:

ncgen -k netCDF-4 -b -o ~/nco/data/vlen.nc ~/nco/data/vlen.cdl
nccopy -V vlen_flt_scl ~/nco/data/vlen.nc ~/vlen_flt.nc
ncks --ntm ~/vlen_flt.nc

zender@aerosol:~/nco$  ncks --ntm ~/vlen_flt.nc
netcdf vlen_flt {
  types:
    float(*) vlen_flt_t ;
    int(*) vlen_int_t ;
    short(*) vlen_sht_t ;
    char(*) vlen_chr_t ;
    uint64(*) vlen_uint64_t ;
    string(*) vlen_sng_t ;


  variables:
    vlen_flt_t vlen_flt_scl ;

  data:
    vlen_flt_scl = {9.96921e+36, 17, 18, 19} ;

} // group /

Version number mismatch

Hello
Not a major bug, and may not be a bug at all, but I just compiled version (release) 4.4.8 from git on my machine and when I check the installed version number on the bin files I get this:

NCO netCDF Operators version 4.4.9 built by sserbin on test at Feb 28 2015 12:08:17
ncap2 version "4.4.9"

However the version number downloaded was indicated as 4.4.8. I am running on SciLinux 6.5 with the latest version of netCDF (4.3.3.1).

Shawn

Fails to build with GCC 7 (invalid conversion from 'char' to 'char*')

As reported by Matthias Klose in Debian Bug #853569:

The package fails to build in a test rebuild on at least amd64 with
gcc-7/g++-7, but succeeds to build with gcc-6/g++-6. The
severity of this report may be raised before the buster release.
There is no need to fix this issue in time for the stretch release.

The full build log can be found at:
http://people.debian.org/~doko/logs/gcc7-20170126/nco_4.6.3-1_unstable_gcc7.log
The last lines of the build log are at the end of this report.

To build with GCC 7, either set CC=gcc-7 CXX=g++-7 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

apt-get -t experimental install g++

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-7/porting_to.html

[...]
                 from ncap2.cc:80:
fmc_gsl_cls.hh:45:0: warning: "NCO_GSL_VERSION" redefined
 #  define NCO_GSL_VERSION ( NCO_GSL_MAJOR_VERSION * 100 + NCO_GSL_MINOR_VERSION * 10 + NCO_GSL_PATCH_VERSION )

In file included from fmc_gsl_cls.hh:12:0,
                 from libnco++.hh:26,
                 from ncap2.cc:80:
../../config.h:431:0: note: this is the location of the previous definition
 #define NCO_GSL_VERSION 203

In file included from fmc_gsl_cls.cc:10:0:
fmc_gsl_cls.hh:45:0: warning: "NCO_GSL_VERSION" redefined
 #  define NCO_GSL_VERSION ( NCO_GSL_MAJOR_VERSION * 100 + NCO_GSL_MINOR_VERSION * 10 + NCO_GSL_PATCH_VERSION )

In file included from ../nco/nco_srm.h:17:0,
                 from ../nco/libnco.h:57,
                 from ncap2_utl.hh:52,
                 from ncoGrammer.g:29,
                 from fmc_gsl_cls.hh:39,
                 from fmc_gsl_cls.cc:10:
../../config.h:431:0: note: this is the location of the previous definition
 #define NCO_GSL_VERSION 203

fmc_all_cls.cc: In member function 'var_sct* vlist_cls::atoi_fnd(bool&, std::vector<antlr::ASTRefCount<antlr::AST> >&, fmc_cls&, ncoTree&)':
fmc_all_cls.cc:4146:21: error: invalid conversion from 'char' to 'char*' [-fpermissive]
          char *pend='\0';
                     ^~~~
fmc_all_cls.cc:4165:21: error: invalid conversion from 'char' to 'char*' [-fpermissive]
          char *pend='\0';
                     ^~~~
Makefile:550: recipe for target 'fmc_all_cls.o' failed
make[5]: *** [fmc_all_cls.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/<<PKGBUILDDIR>>/src/nco++'
Makefile:385: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src'
Makefile:446: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>'
Makefile:378: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: make -j64 returned exit code 2
debian/rules:39: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules:11: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

ncks -V seg faults

Hi,
I am consultant at CISL/NCAR. One of our users has noticed that ncks (nco 4.5.1,nco 4.5.3) will seg fault for some of his files.

./ncks -V -v datesec file.nc
datesec: type NC_INT, 1 dimension, 1 attribute, compressed? no, chunked? no, packed? no
datesec size (RAM) = 1_sizeof(NC_INT) = 1_4 = 4 bytes
datesec dimension 0: time, size = 1 NC_DOUBLE (Record coordinate is time)
datesec attribute 0: long_name, size = 31 NC_CHAR, value = current seconds of current date

time: type NC_DOUBLE, 1 dimension, 4 attributes, compressed? no, chunked? no, packed? no
time size (RAM) = 1_sizeof(NC_DOUBLE) = 1_8 = 8 bytes
time dimension 0: time, size = 1 NC_DOUBLE (Record coordinate is time)
time attribute 0: long_name, size = 4 NC_CHAR, value = time
time attribute 1: units, size = 30 NC_CHAR, value = days since 2006-01-11 00:00:00
time attribute 2: calendar, size = 9 NC_CHAR, value = gregorian
time attribute 3: bounds, size = 9 NC_CHAR, value = time_bnds

time_bnds: type NC_DOUBLE, 2 dimensions, 1 attribute, compressed? no, chunked? no, packed? no
time_bnds size (RAM) = 1_2_sizeof(NC_DOUBLE) = 2*8 = 16 bytes
time_bnds dimension 0: time, size = 1 NC_DOUBLE (Record coordinate is time)
time_bnds dimension 1: nbnd, size = 2 (Non-coordinate dimension)
time_bnds attribute 0: long_name, size = 23 NC_CHAR, value = time interval endpoints

0
ncks(64777,0x7fff7d5f0310) malloc: *** error for object 0x2: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
Note that this is the output from a MAC, it does the same on Linux w/o the helpful message.
The same command without the -V completes without issue. I can send a .nc file for this if need be but github does not like the .nc ending.
Thanks,
Patrick Nichols
pnichols AT the usual ucar email address suffix

Deprecate ncap

Please take some time to deprecate ncap (i.e., ncap1) from NCO.
That means eliminate it from autoconf and CMake build engines.
Then you will be an expert at autoconf and CMake
Be careful to retain the flex scanner for ncwa!
Please do and test this all on a branch not on master
and ask for a review and PR when ready.

I will eliminate ncap from bld/Makefile.

Benchmark ncclimo

We need multiple plots that show a "control"
(ctl) and multiple experiments (xpt).
On all plots include a solid black curve
with the timing from climos start with nc3
and write to nc3. this is the "control" (ctl).
On all plots make the "control" (ctl) a solid black curve.

  1. climos start from nc3.
    Show effects of writing different nc7.
    ctl : -3 -> -3
    xpt1: -3 -> -7
    xpt2: -3 -> -7 -L 1
    xpt3: -3 -> -7 -L 9
    xpt4: -3 -> -7 -L 1 --default=3
    xpt5: -3 -> -7 --cnk_plc=g2d --cnk_map=nc4
    xpt6: -3 -> -7 --cnk_plc=g2d --cnk_map=nco
    xpt7: -3 -> -7 --cnk_plc=g2d --cnk_map=rew
  2. climos start from plain nc7 and write to nc7
    Show effects of writing different nc7 from nc7
    ctl : -7 -> -7
    xpt1: -7 -> -7 -L 1
    xpt2: -7 -> -7 -L 9
    xpt3: -7 -> -7 -L 1 --default=3
    xpt4: -7 -> -7 --cnk_plc=g2d --cnk_map=nc4
    xpt5: -7 -> -7 --cnk_plc=g2d --cnk_map=nco
    xpt6: -7 -> -7 --cnk_plc=g2d --cnk_map=rew
  3. climos start from various nc7 and write to same
    Show effects of reading different nc7, writing same
    ctl : -7 -> same
    xpt1: -7 -L 1 -> same
    xpt2: -7 -L 9 -> same
    xpt3: -7 -L 1 --default=3 -> same
    xpt4: -7 --cnk_plc=g2d --cnk_map=nc4 -> same
    xpt5: -7 --cnk_plc=g2d --cnk_map=nco -> same
    xpt6: -7 --cnk_plc=g2d --cnk_map=rew -> same

All plots should have a "legend box" with a
colored line and the short text description
of the "experiment" or meaning of the curve
of that color.

Compile a text table that describes the full
parameters of each experiment.

Error with Hyperslabs on the Right Hand Side of an assign

Hey, I possibly encountered a minor issue with ncap2. I attached files to reproduce the issue (issue_right_hand_hyperslabs.zip). Cheers, Daniel

Note

This issue arises with NCO 4.6.7 on openSUSE Leap 42.3 with netCDF 4.4.1.1 and HDF5 1.8.18. Unfortunately, I don't have the time to set up a more recent NCO version.

Issue

I have got a netCDF file of the following structure (removed not-relevant parts):

netcdf grddat_test {
dimensions:
        depth = 36 ;
        lat = 347 ;
        lon = 414 ;
        time = UNLIMITED ; // (3 currently)
variables:
        double depth(depth) ;
                depth:units = "m" ;
                depth:standard_name = "depth" ;
                depth:long_name = "depth" ;
                depth:positive = "down" ;
        byte mask(time, depth, lat, lon) ;
                mask:long_name = "sea_binary_mask" ;
                mask:_FillValue = -1b ;
                mask:missing_value = -1b ;
}

If I apply the following scripts with ncap2

defdim("lev",$depth.size);
lev[$lev]=depth(:);
 sea_mask[$time,$lev,$lat,$lon]=mask(:,:,:,:);

it results in the error

copy_mask.nco:3:38: unexpected token: :

I attached a zip archive with the script and the netCDF file so that one can easily reproduce the issue.

issue_right_hand_hyperslabs.zip

Why it should work

According to the manual this should work. In section Hyperslabs on the Right Hand Side of an assign of the NCO manual it is written:

because the $lon dimension now only has two elements. The above can be calculated by using a LHS cast with $lon_nw as replacement dim for $lon:

defdim("lon_nw",2);
th_nw[$lat,$lon_nw]=th(0,:,0:1) +th(9,:,0:1);

ncap2 where() behavior

This question occurs a lot. Please clarify this in the manual, provide a workaround example, and perhaps change ncap2 to die with an informative HINT when people attempt subscripting within where(). Otherwise they could inadvertently use the incorrect answers ncap2 currently produces in these situtations.

Auxiliary coordinates without standard_name attribute

The ncks -X lon_min,lon_max,lat_min,lat_max option works well only when NCO can find variables with standard_name=latitude and longitude. We want it to work well even when variables with those standard names do not exist, and we want it to fail gracefully when no points are in the selected rectangle. Please download the test files

http://dust.ess.uci.edu/tmp/raw.nc # Raw output, no "standard_name"
http://dust.ess.uci.edu/tmp/rgr.nc # Regridded output, includes "standard_name"

This command succeeds as it should (writes only data in region):
ncks -O -X 128.0,134.0,-16.0,-9.0 ~/rgr.nc ~/foo.nc
This command yields a false positive (writes all data instead of regional data):
ncks -O -X 128.0,134.0,-16.0,-9.0 ~/raw.nc ~/foo.nc
Please fix the second command so it writes only the data in the region. Basically we want NCO to treat lat and lon in raw.nc as if they had the appropriate standard_name attributes. So when NCO fails to locate variables with standard_name="latitude" and standard_name="longitude" we want it to fall-back to an internal database of names/attributes that commonly indicate latitude and longitude variables. Chief among these are variable names = "latitude", "lat", "Lat", "Latitude" and similar for longitude. If those fall-back searches do not work then search for the first variables found with units attributes = "degrees_north" or "degrees_east". Code to do these fall-back searches is already in nco_grd_nfr() near line 5990.

The overall purpose is to get auxiliary coordinate hyperslabs to play well with E3SM/CESM data that is poorly annotated with metadata (it lacks standard_name, etc.).

Regression tests for ncks --cal option

Please add regression tests to verify ncks --cal option works, e.g.,

ncks --cal -v tm_365 ~/nco/data/in.nc
...
    tm_365 = 59; // calendar format: "2013-03-01"
...

Currently this option appears to be broken on my Mac

ncap deprecation broke my build

I tried to explain yesterday that the deprecation PR was not to be done until my mods were merged, and that those would be forthcoming once the mods from @hmb1 passed all tests. Not only did you execute the PR without waiting, but master no longer builds for me:

gcc -DHAVE_CONFIG_H -I. -I../..   -I/opt/local/include -I/opt/local/include  -I/opt/local/include -I/opt/local/include -I/opt/local/include/udunits2  -fno-common   -std=c99 -D_BSD_SOURCE  -MT ncap_lex.o -MD -MP -MF .deps/ncap_lex.Tpo -c -o ncap_lex.o ncap_lex.c
ncap_lex.l:59:10: fatal error: 'ncap.h' file not found
#include "ncap.h" /* netCDF arithmetic processor-specific definitions (symbol table, ...) */
         ^~~~~~~~
1 error generated.
gmake: *** [Makefile:1039: ncap_lex.o] Error 1

Please fix ASAP!

Trying to install nco inside uvcdat

if I try to install nco via conda inside of uvcdat, I have a conflict, I think this is due to nco being built against old hdf5/netcdf.
It appears that nco will downgrade our hdf5 but not our netcdf

quick summary, at nco install time:
conda install nco -c ocnda-forge

output warns about HDF5:

The following NEW packages will be INSTALLED:

    expat:  2.1.0-2       conda-forge
    gsl:    2.1-2         conda-forge
    krb5:   1.14.2-0      conda-forge
    libgcc: 4.8.5-1                  
    nco:    4.6.0-0       conda-forge

The following packages will be SUPERCEDED by a higher-priority channel:

    hdf5:   1.8.16-UVCDAT uvcdat      --> 1.8.15.1-2

It goes through the motions but then cannot function:

((2016.9.14)) doutriaux1@sofia:[~]:[6605]> ncks --help
dyld: Library not loaded: @rpath/libhdf5.10.dylib
  Referenced from: /Users/doutriaux1/anaconda2/envs/2016.9.14/lib/libnetcdf.7.dylib
  Reason: Incompatible library version: libnetcdf.7.dylib requires version 12.0.0 or later, but libhdf5.10.dylib provides version 11.0.0
Trace/BPT trap: 5

Annotate issues

As requested I turned your current tasks into GitHub issues. Please annotate each with the current status and include clickable links to the latest results.

ncks produces 0 for area on mac 10.10.3

ncks -O --map=/Users/doutriaux1/map_ne30np4_to_fv257x512_bilin.150418.nc /Users/doutriaux1/famipc5_ne30_v0.3_00003.cam.h0.1979-01.nc test_regrid_nco.nc

using tag point 4.5.0

Fails to build with GSL 2.0

nco 4.5.3 fails to build on Debian unstable with --enable-gsl:

In file included from ../nco/nco_srm.h:17:0,
                 from ../nco/libnco.h:56,
                 from ncap2_utl.hh:52,
                 from ncoGrammer.g:29,
                 from fmc_gsl_cls.hh:39,
                 from fmc_gsl_cls.cc:10:
../../config.h:423:31: error: floating constant in preprocessor expression
 #define NCO_GSL_MINOR_VERSION 2.0
                               ^
fmc_gsl_cls.cc:120:6: note: in expansion of macro 'NCO_GSL_MINOR_VERSION'
 # if NCO_GSL_MINOR_VERSION >= 8
      ^
...

This seems to be caused by the recently started gsl transition from 1.16 to 2.0.

The issue is caused by this code in configure.ac that doesn't handle GSL >= 2.0:

 652 # Assumes GSL version in form 1.[0-9]+  extract minor version only
 653         GSL_VER="`${GSL_CONFIG} --version`"
 654         GSL_VER=`echo "${GSL_VER}" | sed -e 's/^1\.//'`
 655         if test "x${GSL_VER}" = 'x'; then
 656             # 20100115: Fix for machines like bluefire that lack gsl-config
 657             GSL_VER='4'
 658         fi
 659         AC_DEFINE(ENABLE_GSL,1,Compile operators with GSL support)
 660         AC_DEFINE_UNQUOTED(NCO_GSL_MINOR_VERSION,${GSL_VER},GSL minor version number)
 661         AC_MSG_NOTICE([GSL support enabled])

I'm not sure how GSL 2.0 should be handled in NCO, I guess NCO_GSL_MAJOR_VERSION should be added now and all # if NCO_GSL_MINOR_VERSION >= <n> checks changed to take the NCO_GSL_MAJOR_VERSION into account too.

Find cause of core dumps with complex netCDF4 group hierarchies

NCO is unable to print all the contents of some netCDF4 files. This file illustrates the problem:

zender@skyglow:~$ ncks -m s5p.nc > ~/foo 2>&1
*** Error in `ncks': free(): invalid next size (fast): 0x0000000000d67c00 ***
======= Backtrace: =========
/usr/lib64/libc.so.6(+0x7cbac)[0x154e2a3acbac]
/usr/lib64/libc.so.6(+0x87a59)[0x154e2a3b7a59]
/usr/lib64/libc.so.6(cfree+0x16e)[0x154e2a3bd3be]
/home/zender/lib/libnco-4.7.4-alpha01.so(nco_free+0xe)[0x154e2b9a7c0e]
/home/zender/lib/libnco-4.7.4-alpha01.so(nco_xtr_cf_var_add+0x2c8)[0x154e2b9854e8]
/home/zender/lib/libnco-4.7.4-alpha01.so(nco_xtr_cf_add+0x62)[0x154e2b985772]
/home/zender/lib/libnco-4.7.4-alpha01.so(nco_bld_trv_tbl+0x513)[0x154e2b99a103]
ncks[0x404d9c]

ncdump has no problem printing this file (NB: sometime ncdump can print corrupt files that NCO chokes on because NCO tries to build a complete table of the CF relationships and dimension IDs involved in the file, and the netCDF4 library, at least the renaming functions, has bugs that can produce invalid entries such as duplicate IDs for the same dimension).

Please investigate whether this is an NCO bug, or ... perhaps a corrupt file? The failure above seems to occur during the creation of the list of bounds/coordinates associated with variables. However, some variables include CF bounds/coordinates attributes that reference Out-of-Group (OOG) variables that are specified with an absolute path. This makes me wonder if NCO is robust to absolute path specifications and OOG coordinates/bounds in group hierarchies. I thought it was, but it has not been thoroughly tested.

Thanks!

great circle arc spherical area

if NCO is updated to compute missing areas for unstructured grids with great circle arcs (a reasonable default for unstructured grids), suggest to use "L'Huilier's Theorem" instead of the simpler Girard's Spherical Excess Formula. Girard's formula is simpler, but looses precision for small area. ( Girard's formula computes (pi+area)-pi, which looses precision if area << pi )

http://mathworld.wolfram.com/LHuiliersTheorem.html

http://mathworld.wolfram.com/GirardsSphericalExcessFormula.html

Feature request: ability to specify MPAS input file prefix to ncclimo

E3SM runs have a very specific format for the monthly mean output files from MPAS components (currently MPAS-O and MPAS-SeaIce, soon MPAS-LandIce). When we do standalone runs, these files can have different names by default. It isn't that hard for us to use the E3SM naming convention but sometimes we forget.

It would be nice to have a flag that would allow us to override the default file prefix (e.g. mpaso.hist.am.timeSeriesStatsMonthly) for MPAS input files. It looks like there is a --fl_lst_in, --file_list for some NCO commands, so might it be appropriate to have something like --fl_pfx_in, --file_prefix_in for ncclimo? I'm not sure whether you would want to support this for all the different file formats supported by ncclimo or just for MPAS, I'd leave that up to you.

Problems building nco 4.4.8: "cannot find netCDF library"

I've just hit issues trying to build nco 4.4.8 against netcdf 4.3.3.1.

I've tried the following:

> uname -a
Linux machine 2.6.32-504.12.2.el6.x86_64 #1 SMP Sun Feb 1 12:14:02 EST 2015 x86_64 x86_64 x86_64 GNU/Linux
> more /etc/redhat-release
Red Hat Enterprise Linux Workstation release 6.6 (Santiago)
> gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
> setenv NETCDF_INC $NETCDF_INSTALL_DIR/include
> setenv NETCDF_LIB $NETCDF_INSTALL_DIR/lib
> setenv NETCDF_ROOT $NETCDF_INSTALL_DIR
> pwd
nco
> chmod 755 -R *
> configure --disable-netcdf
> make

And get the following output:

################################
#  Test for netCDF             #
################################
checking for /opt/local/include/netcdf.h... no
checking for /opt/local/lib/libnetcdf.a... no
checking for /sopt/netcdf/netcdf411-gcc-serial/include/netcdf.h... no
checking for /sopt/netcdf/netcdf411-gcc-serial/lib/libnetcdf.a... no
checking netcdf.h usability... yes
checking netcdf.h presence... yes
checking for netcdf.h... yes
checking for nc_open in -lnetcdf... no
configure: error: in `nco':
configure: error: cannot find netCDF library
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

I get the identical result if I change the configure argument to

--enable-netcdf4

For completeness here are the configure options for netcdf 4.3.3.1

configure --prefix=install --enable-netcdf-4 --disable-dap

This issue appears with the 4.4.9-alpha and the current master branch

Improve ncap2 command-line string handling in Windows

Basically, it has never worked. Please create a regression test whose failure demonstrates that, and try to improve matters. Goal is for ncap2 on Windows to work identically to Linux, or, failing that, at least to work better with command line strings so ncap2 -s 'foo=bar' in.nc out.nc works on Windows instead of requiring ncap2 -S foo.nco in.nc out.nc.

Can not convert file with a '_Netcdf4Dimid` attribute to NetCDF4

If there is a _Netcdf4Dimid attribute on any variable, ncks will error when trying to convert to NetCDF4 (-4 or -7).

Reproduce:

No workie

$ ncks -O -v z http://oceanmodeling.pmc.ucsc.edu:8080/thredds/dodsC/ccsra_2016a_phys_agg_zlevs/fmrc/CCSRA_2016a_Phys_ROMS_z-level_\(depth\)_Aggregation_best.ncd out.nc
$ ncks -O -7 out.nc out.nc
nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_copy_att()
nco_err_exit(): ERROR Error code is -42. Translation into English with nc_strerror(-42) is "NetCDF: String match to name in use"
nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

Workie

$ ncks -O -v z http://oceanmodeling.pmc.ucsc.edu:8080/thredds/dodsC/ccsra_2016a_phys_agg_zlevs/fmrc/CCSRA_2016a_Phys_ROMS_z-level_\(depth\)_Aggregation_best.ncd out.nc
$ ncatted -h -O -a _Netcdf4Dimid,,d,, out.nc out.nc
$ ncks -O -7 out.nc out.nc

doc build errors on mac 10.10.3

Making all in doc
restore=: && backupdir=".am$$" && \
    am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
    rm -rf $backupdir && mkdir $backupdir && \
    if (/bin/sh /git/nco/autobld/missing makeinfo --version) >/dev/null 2>&1; then \
      for f in nco.info nco.info-[0-9] nco.info-[0-9][0-9] nco.i[0-9] nco.i[0-9][0-9]; do \
        if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
      done; \
    else :; fi && \
    cd "$am__cwd"; \
    if /bin/sh /git/nco/autobld/missing makeinfo   -I . \
     -o nco.info nco.texi; \
    then \
      rc=0; \
      CDPATH="${ZSH_VERSION+.}:" && cd .; \
    else \
      rc=$?; \
      CDPATH="${ZSH_VERSION+.}:" && cd . && \
      $restore $backupdir/* `echo "./nco.info" | sed 's|[^/]*$||'`; \
    fi; \
    rm -rf $backupdir; exit $rc
nco.texi:7139: warning: unlikely character ( in @var.
nco.texi:7139: warning: unlikely character ) in @var.
nco.texi:19499: Unknown command `textdegree'.
nco.texi:19499: Misplaced {.
nco.texi:19499: Misplaced }.
nco.texi:19500: Unknown command `textdegree'.
nco.texi:19500: Misplaced {.
nco.texi:19500: Misplaced }.
nco.texi:19500: Unknown command `textdegree'.
nco.texi:19500: Misplaced {.
nco.texi:19500: Misplaced }.
nco.texi:19501: Unknown command `textdegree'.
nco.texi:19501: Misplaced {.
nco.texi:19501: Misplaced }.
nco.texi:19502: Unknown command `textdegree'.
nco.texi:19502: Misplaced {.
nco.texi:19502: Misplaced }.
nco.texi:19503: Unknown command `textdegree'.
nco.texi:19503: Misplaced {.
nco.texi:19503: Misplaced }.
nco.texi:19503: Unknown command `textdegree'.
nco.texi:19503: Misplaced {.
nco.texi:19503: Misplaced }.
nco.texi:19504: Unknown command `textdegree'.
nco.texi:19504: Misplaced {.
nco.texi:19504: Misplaced }.
makeinfo: Removing output file `nco.info' due to errors; use --force to preserve.
make[2]: *** [nco.info] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

4.5.0 tag point and master

AppVeyor build broke

Broke on build 1.0.239 on 3/13. Details in the AppVeyor logs. The actual breakage appears unrelated to NCO:

conda.exe list
CondaEnvironmentNotFoundError: Could not find environment: C:\Miniconda36-x64\envs\base .
You can list all discoverable environments with `conda info --envs`.

@pedro-vicente do you have any ideas?

NCO organization and Python bindings to NCO

Hi Charlie -

First off, its great that you've moved nco over to Github. I think this is great.

As I think you already know, I've developed Python bindings to NCO. I'm wondering if you would be interested in creating a "Github Organization" to house the nco and nco-bindings repositories (and others that seem fitting). Similar organizations may be Unidata or Pydata? I'm happy to continue to contribute to the development of the Python bindings, but I get the feeling the larger user community may be more likely to contribute to both packages if they are outside of my Github domain.

Just a few thought, no worries if you don't like the idea.

Cheers,

Joe

Fails to build with -j64: ncap_lex.l:60:60: fatal error: ncap_yacc.h: No such file or directory

As reported by Lucas Nussbaum in Debian Bug #844865, nco failed to build in Debian unstable.

It seems to be caused by a missing dependency allowing autotools to build files depending on ncap_yacc.h before that file is built, and only triggered in massively parallel builds (e.g. -j64 as used by Lucas), limiting the number of processes to 32 did not trigger the issue.

I did not find an obvious fault in the Makefile.am to fix this.

Full report by Lucas:

During a rebuild of all packages in sid, your package failed to build on amd64.

Relevant part (hopefully):

gcc -DHAVE_CONFIG_H -I. -I../..   -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c -o ncap_lex.o ncap_lex.c
In file included from /usr/include/stdio.h:27:0,
                 from ncap_lex.c:38:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_cnf_typ.c  -fPIC -DPIC -o .libs/nco_cnf_typ.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_cln_utl.c  -fPIC -DPIC -o .libs/nco_cln_utl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_att_utl.c  -fPIC -DPIC -o .libs/nco_att_utl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_rgr.c  -fPIC -DPIC -o .libs/nco_rgr.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_mta.c  -fPIC -DPIC -o .libs/nco_mta.o
In file included from /usr/include/math.h:26:0,
                 from nco_att_utl.h:21,
                 from nco_att_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/math.h:26:0,
                 from nco_cnf_typ.h:17,
                 from nco_cnf_typ.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/limits.h:25:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/limits.h:168,
                 from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/limits.h:34,
                 from nco_rgr.h:17,
                 from nco_rgr.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_cnk.c  -fPIC -DPIC -o .libs/nco_cnk.o
In file included from /usr/include/ctype.h:25:0,
                 from nco_cln_utl.h:21,
                 from nco_cln_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_mta.h:21,
                 from nco_mta.c:12:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_cnf_dmn.c  -fPIC -DPIC -o .libs/nco_cnf_dmn.o
In file included from /usr/include/math.h:26:0,
                 from nco_cnk.h:17,
                 from nco_cnk.c:45:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_dmn_utl.c  -fPIC -DPIC -o .libs/nco_dmn_utl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_dbg.c  -fPIC -DPIC -o .libs/nco_dbg.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_netcdf.c  -fPIC -DPIC -o .libs/nco_netcdf.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_sld.c  -fPIC -DPIC -o .libs/nco_sld.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_var_utl.c  -fPIC -DPIC -o .libs/nco_var_utl.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_cnf_dmn.h:17,
                 from nco_cnf_dmn.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_grp_utl.c  -fPIC -DPIC -o .libs/nco_grp_utl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_lst_utl.c  -fPIC -DPIC -o .libs/nco_lst_utl.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_dbg.h:17,
                 from nco_dbg.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_aux.c  -fPIC -DPIC -o .libs/nco_aux.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_var_lst.c  -fPIC -DPIC -o .libs/nco_var_lst.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_dmn_utl.h:21,
                 from nco_dmn_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/ctype.h:25:0,
                 from nco_netcdf.h:43,
                 from nco_netcdf.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_scl_utl.c  -fPIC -DPIC -o .libs/nco_scl_utl.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_sld.h:17,
                 from nco_sld.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_cnv_csm.c  -fPIC -DPIC -o .libs/nco_cnv_csm.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_var_avg.c  -fPIC -DPIC -o .libs/nco_var_avg.o
In file included from /usr/include/assert.h:35:0,
                 from nco_var_utl.h:21,
                 from nco_var_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_grp_trv.c  -fPIC -DPIC -o .libs/nco_grp_trv.o
In file included from /usr/include/assert.h:35:0,
                 from nco_grp_utl.h:21,
                 from nco_grp_utl.c:19:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_lst_utl.h:21,
                 from nco_lst_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/math.h:26:0,
                 from nco_aux.h:17,
                 from nco_aux.c:22:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_ctl.c  -fPIC -DPIC -o .libs/nco_ctl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_rec_var.c  -fPIC -DPIC -o .libs/nco_rec_var.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_srm.c  -fPIC -DPIC -o .libs/nco_srm.o
In file included from /usr/include/assert.h:35:0,
                 from nco_var_lst.h:21,
                 from nco_var_lst.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_cnv_arm.c  -fPIC -DPIC -o .libs/nco_cnv_arm.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_bnr.c  -fPIC -DPIC -o .libs/nco_bnr.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_scl_utl.h:21,
                 from nco_scl_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_md5.c  -fPIC -DPIC -o .libs/nco_md5.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_cnv_csm.h:17,
                 from nco_cnv_csm.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_mss_val.c  -fPIC -DPIC -o .libs/nco_mss_val.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_fl_utl.c  -fPIC -DPIC -o .libs/nco_fl_utl.o
In file included from /usr/include/math.h:26:0,
                 from nco_var_avg.h:17,
                 from nco_var_avg.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_rth_utl.c  -fPIC -DPIC -o .libs/nco_rth_utl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_omp.c  -fPIC -DPIC -o .libs/nco_omp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_msa.c  -fPIC -DPIC -o .libs/nco_msa.o
In file included from /usr/include/string.h:25:0,
                 from nco_grp_trv.h:21,
                 from nco_grp_trv.c:14:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_lmt.c  -fPIC -DPIC -o .libs/nco_lmt.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_prn.c  -fPIC -DPIC -o .libs/nco_prn.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_rec_var.h:17,
                 from nco_rec_var.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_var_scv.c  -fPIC -DPIC -o .libs/nco_var_scv.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_ppc.c  -fPIC -DPIC -o .libs/nco_ppc.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_mmr.c  -fPIC -DPIC -o .libs/nco_mmr.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_ctl.h:21,
                 from nco_ctl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_bnr.h:17,
                 from nco_bnr.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_md5.h:22,
                 from nco_md5.c:25:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_srm.h:21,
                 from nco_srm.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_sng_utl.c  -fPIC -DPIC -o .libs/nco_sng_utl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_scm.c  -fPIC -DPIC -o .libs/nco_scm.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_cnv_arm.h:17,
                 from nco_cnv_arm.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_var_rth.c  -fPIC -DPIC -o .libs/nco_var_rth.o
In file included from /usr/include/math.h:26:0,
                 from nco_rth_utl.h:17,
                 from nco_rth_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_rth_flt.c  -fPIC -DPIC -o .libs/nco_rth_flt.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_mss_val.h:21,
                 from nco_mss_val.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/errno.h:28:0,
                 from nco_fl_utl.h:21,
                 from nco_fl_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_omp.h:17,
                 from nco_omp.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/math.h:26:0,
                 from nco_prn.h:21,
                 from nco_prn.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/ctype.h:25:0,
                 from nco_ppc.h:17,
                 from nco_ppc.c:13:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/errno.h:28:0,
                 from nco_mmr.h:21,
                 from nco_mmr.c:27:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_msa.h:21,
                 from nco_msa.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/math.h:26:0,
                 from nco_lmt.h:21,
                 from nco_lmt.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/math.h:26:0,
                 from nco_var_scv.h:17,
                 from nco_var_scv.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I/usr/include/hdf5/serial -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -c nco_pck.c  -fPIC -DPIC -o .libs/nco_pck.o
In file included from /usr/include/stdio.h:27:0,
                 from nco_sng_utl.h:21,
                 from nco_sng_utl.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
In file included from /usr/include/stdio.h:27:0,
                 from nco_scm.h:21,
                 from nco_scm.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
ncap_lex.l:60:60: fatal error: ncap_yacc.h: No such file or directory
 #include "ncap_yacc.h" /* Symbol definitions from parser */
                                                            ^
compilation terminated.
In file included from /usr/include/math.h:26:0,
                 from nco_var_rth.h:21,
                 from nco_var_rth.c:10:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
Makefile:1082: recipe for target 'ncap_lex.o' failed
make[5]: *** [ncap_lex.o] Error 1

The full build log is available from:
http://aws-logs.debian.net/2016/11/18/nco_4.6.2-1_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.

Netcdf requirements missing

It would be nice to put in INSTALL file or to check in configure the needed version of netCDF library.
I tried to build NCO 4.6.3 on Ubuntu XENIAL (netCDF C 4.4.0 installed by package) where netcdf_mem.h is missing (and nc_open_mem function). configure passed but make failed.
Maybe it would be the same thing with other libraries.
After trying 4.6.2 which had the same issue, I switched to 4.6.1 which does not seem to use in memory files.

Why does this S5P dataset break ncks?

This S5P L1B file breaks ncks, and the question is why. If the answer is fixable, then we'll do that later, for now we just need to know why:

zender@aerosol:~/data$ ncks -v spectral_channel_quality -m s5p.nc
ncks: WARNING File contains 6 non-atomic (e.g., compound, enum_t, opaque, vlen_t, and user-defined) variable types. NCO currently ignores non-atomic variables. ncks will process and copy to output only the atomic variables.
netcdf S5P_TEST_L1B_RA_BD1_20171119T041255_20171119T055342_00522_04_010000_20180401T080000 {
  group: BAND1_RADIANCE {
    group: STANDARD_MODE {
      dimensions:
        ground_pixel = 77 ;
        ncorner = 4 ;
        scanline = 63 ;
        spectral_channel = 497 ;
        time = 1 ;
      group: OBSERVATIONS {

        variables:
          int ground_pixel(ground_pixel) ;
            ground_pixel:comment = "This dimension variable defines the indices across track; index starts at 0" ;
            ground_pixel:long_name = "across track dimension index" ;
            ground_pixel:units = "1" ;

          int scanline(scanline) ;
            scanline:comment = "This dimension variable defines the indices along track; index starts at 0" ;
            scanline:long_name = "along track dimension index" ;
            scanline:units = "1" ;

Segmentation fault: 11

The warning clearly says there are non-atomic type (NAT, i.e., vlen_t) variables. Is that what breaks it? ncks was designed to ignore NAT variables, but maybe in some cases it does not. Or maybe it's a fixable bug in the ncks print or extraction code. Please run this through a debugger and see why it fails. I got this stacktrace but do not have time to follow through:

(gdb) where
#0  0x000015555472ce60 in nc_utf8proc_iterate () from /usr/local/lib/libnetcdf.so.13
#1  0x000015555472dfbf in nc_utf8proc_decompose_custom () from /usr/local/lib/libnetcdf.so.13
#2  0x000015555472e8c2 in nc_utf8proc_map_custom () from /usr/local/lib/libnetcdf.so.13
#3  0x000015555472e868 in nc_utf8proc_map () from /usr/local/lib/libnetcdf.so.13
#4  0x000015555472203b in nc_utf8_normalize () from /usr/local/lib/libnetcdf.so.13
#5  0x00001555547c7ea4 in nc4_normalize_name () from /usr/local/lib/libnetcdf.so.13
#6  0x00001555547cd067 in NC4_inq_varid () from /usr/local/lib/libnetcdf.so.13
#7  0x0000155554720f4a in nc_inq_varid () from /usr/local/lib/libnetcdf.so.13
#8  0x000015555509e2a6 in nco_inq_varid (nc_id=65539, 
    var_nm=0x13f61 <error: Cannot access memory at address 0x13f61>, var_id=var_id@entry=0x7ffffffe115c)
    at nco_netcdf.c:1807
#9  0x00001555550afc43 in nco_prn_cdl_trd (nc_id=nc_id@entry=65536, 
    grp_nm_fll=grp_nm_fll@entry=0xb80920 "/BAND1_RADIANCE/STANDARD_MODE/OBSERVATIONS", 
    prn_flg=prn_flg@entry=0x7ffffffe60b0, trv_tbl=trv_tbl@entry=0x61dd30) at nco_prn.c:3060
#10 0x00001555550b00bd in nco_prn_cdl_trd (nc_id=nc_id@entry=65536, 
    grp_nm_fll=grp_nm_fll@entry=0xb80b70 "/BAND1_RADIANCE/STANDARD_MODE", 
    prn_flg=prn_flg@entry=0x7ffffffe60b0, trv_tbl=trv_tbl@entry=0x61dd30) at nco_prn.c:3119
#11 0x00001555550b00bd in nco_prn_cdl_trd (nc_id=nc_id@entry=65536, 
    grp_nm_fll=grp_nm_fll@entry=0xb809b0 "/BAND1_RADIANCE", prn_flg=prn_flg@entry=0x7ffffffe60b0, 
    trv_tbl=trv_tbl@entry=0x61dd30) at nco_prn.c:3119
#12 0x00001555550b00bd in nco_prn_cdl_trd (nc_id=nc_id@entry=65536, 
    grp_nm_fll=grp_nm_fll@entry=0x7ffffffe5fe6 "/", prn_flg=prn_flg@entry=0x7ffffffe60b0, 
    trv_tbl=<optimized out>) at nco_prn.c:3119
#13 0x0000000000406561 in main (argc=<optimized out>, argv=<optimized out>) at ncks.c:1349

Thanks!

Monotonic option for ncrcat

We often encounter files that we want to concatenate along the record dimension, but that have overlapping time values. It would be great to have a --monotonic option for ncrcat.

I realize that this means you would have to read the coordinate variable in the record dimension, but since NCO allows slicing now on coordinate variables that should be straightforward, no? 😺

The default behavior should be that later files overwrite the previous files when overlapping coordinate records are found.

VLEN and ENUM output

@czender
HI Charlie,
have fixed in nco_var_val_trv() CDL output for vlen's and enum's - comma's in output are now correct for a variable with a record dim that is NOT first dim.

What do you wish me to focus on next ?
The below is not subsetting ?
ncks -d lat,1 --ntm --cdl vlen.nc

Eliminate ncap2 compiler warnings

Please use the Travis and AppVeyor build
logs to keep squashing warnings until the g++, clang, and MSVC
warnings are also eliminated or minimized.

Unable to run "make" with 4.6.9

I am attempting to install the 4.6.9 NCO libraries on a Red Hat Enterprise Linux desktop. I already have the NetCDF4 libraries installed on my machine (installed to /usr/local) and I have tried setting the NETCDF_ROOT, NETCDF_INC, and NETCDF_LIB environment variables but I still get the following output when I try to run "make":

./.libs/libnco.so: undefined reference to nc_get_chunk_cache' ./.libs/libnco.so: undefined reference to nc_def_var_deflate'
./.libs/libnco.so: undefined reference to nc_inq_ncid' ./.libs/libnco.so: undefined reference to nc_inq_var_fletcher32'
./.libs/libnco.so: undefined reference to nc_inq_grp_parent' ./.libs/libnco.so: undefined reference to nc_inq_unlimdims'
./.libs/libnco.so: undefined reference to nc_inq_grpname_len' ./.libs/libnco.so: undefined reference to nc_inq_grps'
./.libs/libnco.so: undefined reference to nc_def_var_chunking' ./.libs/libnco.so: undefined reference to nc_inq_var_chunking'
./.libs/libnco.so: undefined reference to nc_inq_var_deflate' ./.libs/libnco.so: undefined reference to nc_inq_grp_ncid'
./.libs/libnco.so: undefined reference to nc_inq_var_fill' ./.libs/libnco.so: undefined reference to nc_def_var_fletcher32'
./.libs/libnco.so: undefined reference to nc_inq_grpname' ./.libs/libnco.so: undefined reference to nc_inq_grpname_full'
./.libs/libnco.so: undefined reference to nc_def_grp' ./.libs/libnco.so: undefined reference to nc_inq_dimids'
./.libs/libnco.so: undefined reference to nc_set_chunk_cache' ./.libs/libnco.so: undefined reference to nc_inq_grp_full_ncid'
./.libs/libnco.so: undefined reference to nc_inq_varids' ./.libs/libnco.so: undefined reference to nc_inq_var_endian'
./.libs/libnco.so: undefined reference to nc_rename_grp' collect2: error: ld returned 1 exit status make[4]: *** [ncap] Error 1 make[4]: Leaving directory /home/wsmith/Downloads/nco-4.6.9/src/nco'
make[3]: *** [all] Error 2
make[3]: Leaving directory /home/wsmith/Downloads/nco-4.6.9/src/nco' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory /home/wsmith/Downloads/nco-4.6.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wsmith/Downloads/nco-4.6.9'

./configure runs to completion and tells me I am ready to run "make," but nonetheless I still have this problem. I am attaching config_log and my configure_output text as well.

Please let me know if you have any ideas for why this doesn't work.

config_log.txt
config_output.txt

Thank you!

Ren Smith

rh6 build with esmf enabled

I'm trying to build nco inside uvcdat.
on aims4:
I run

export ESMF_LIB="/usr/local/uvcdat/2016-01-21/Externals/lib/libO/Linux.gfortran.64.openmpi.default"
export ESMF_INC="/usr/local/uvcdat/2016-01-21/Externals/include"
make clean
make distclean
git clean -fd
source /usr/local/uvcdat/2016-01-21/bin/setup_runtime.sh
./configure --prefix=/usr/local/uvcdat/2016-01-21/Externals --enable-esmf

I get:

Configuration Parameters:
AR_FLAGS............. cru
CC................... gcc -std=gnu99
CFLAGS............... -g -O2 -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE
CPP.................. gcc -E
CPPFLAGS............. -I/usr/local/uvcdat/2016-01-21/Externals/include -I/usr/local/uvcdat/2016-01-21/Externals/include -I/usr/local/uvcdat/2016-01-21/Externals/lib/libffi-3.1/include  -I/usr/local/uvcdat/2016-01-21/Externals/include -I/usr/include -I/usr/include/udunits2
CXX.................. g++
CXXFLAGS............. -g -O2
ENABLE_DAP........... yes
ENABLE_ESMF...........yes
ENABLE_GSL........... yes
ENABLE_NETCDF4....... yes
ENABLE_OPENMP........ yes
ENABLE_UDUNITS....... no
ENABLE_UDUNITS2...... yes
GSL_ROOT............. /usr
HAVE_ANTLR........... antlr
HAVE_MAKEINFO........ no
HAVE_NETCDF4_H....... yes
HOST................. 
HOSTNAME............. aims4.llnl.gov
LDFLAGS.............. -L/usr/local/uvcdat/2016-01-21/Externals/lib -lnetcdf 
LIBS................. -ludunits2 -lexpat -lgsl -lesmf -lrt -lgfortran -ldl -lnetcdff -lnetcdf_c++ -lm -lnetcdf -lnetcdf -lnetcdf  -lcurl -L/usr/local/uvcdat/2016-01-21/Externals/lib/libO/Linux.gfortran.64.openmpi.default -lgsl -lgslcblas -lm -ludunits2
NETCDF_ROOT.......... /usr/local/uvcdat/2016-01-21/Externals
OPENMP_CFLAGS........ -fopenmp
host................. x86_64-unknown-linux-gnu
install prefix ...... /usr/local/uvcdat/2016-01-21/Externals
*******************************************************************
Configuration complete. You are now ready to run 'make'.
Ensure 'make' points to GNU Make (AT&T Make chokes on GNU syntax).
If the build fails, please examine the file 'configure.eg'
in the top-level NCO directory.  It contains examples known to
build NCO for various platforms and compilers.
*******************************************************************

then runnnig

make

I get:

/bin/sh ../../libtool --tag=CXX  --tag=CC   --mode=link gcc -std=gnu99  -g -O2 -fopenmp -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -release 4.5.4 -L/usr/local/uvcdat/2016-01-21/Externals/lib -lnetcdf  -o libnco.la -rpath /usr/local/uvcdat/2016-01-21/Externals/lib   nco_att_utl.lo nco_aux.lo nco_bnr.lo nco_cln_utl.lo nco_cnf_dmn.lo nco_cnf_typ.lo nco_cnk.lo nco_cnv_arm.lo nco_cnv_csm.lo nco_ctl.lo nco_dbg.lo nco_dmn_utl.lo nco_fl_utl.lo nco_grp_utl.lo nco_grp_trv.lo nco_lmt.lo nco_lst_utl.lo nco_md5.lo nco_mmr.lo nco_msa.lo nco_mss_val.lo nco_netcdf.lo nco_omp.lo nco_pck.lo nco_ppc.lo nco_prn.lo nco_rec_var.lo nco_rgr.lo nco_rth_flt.lo nco_rth_utl.lo nco_scl_utl.lo nco_scm.lo nco_sld.lo nco_sng_utl.lo nco_srm.lo nco_var_avg.lo nco_var_lst.lo nco_var_rth.lo nco_var_scv.lo nco_var_utl.lo  -ludunits2 -lexpat -lgsl -lesmf -lrt -lgfortran -ldl -lnetcdff -lnetcdf_c++ -lm -lnetcdf -lnetcdf -lnetcdf  -lcurl -L/usr/local/uvcdat/2016-01-21/Externals/lib/libO/Linux.gfortran.64.openmpi.default -lgsl -lgslcblas -lm -ludunits2
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtbeginS.o  .libs/nco_att_utl.o .libs/nco_aux.o .libs/nco_bnr.o .libs/nco_cln_utl.o .libs/nco_cnf_dmn.o .libs/nco_cnf_typ.o .libs/nco_cnk.o .libs/nco_cnv_arm.o .libs/nco_cnv_csm.o .libs/nco_ctl.o .libs/nco_dbg.o .libs/nco_dmn_utl.o .libs/nco_fl_utl.o .libs/nco_grp_utl.o .libs/nco_grp_trv.o .libs/nco_lmt.o .libs/nco_lst_utl.o .libs/nco_md5.o .libs/nco_mmr.o .libs/nco_msa.o .libs/nco_mss_val.o .libs/nco_netcdf.o .libs/nco_omp.o .libs/nco_pck.o .libs/nco_ppc.o .libs/nco_prn.o .libs/nco_rec_var.o .libs/nco_rgr.o .libs/nco_rth_flt.o .libs/nco_rth_utl.o .libs/nco_scl_utl.o .libs/nco_scm.o .libs/nco_sld.o .libs/nco_sng_utl.o .libs/nco_srm.o .libs/nco_var_avg.o .libs/nco_var_lst.o .libs/nco_var_rth.o .libs/nco_var_scv.o .libs/nco_var_utl.o   -Wl,-rpath -Wl,/usr/local/uvcdat/2016-01-21/Externals/lib -Wl,-rpath -Wl,/usr/local/uvcdat/2016-01-21/Externals/lib -L/usr/local/uvcdat/2016-01-21/Externals/lib -lexpat -lesmf -lrt -lgfortran -ldl -lnetcdff /usr/local/uvcdat/2016-01-21/Externals/lib/libnetcdf_c++.so /usr/local/uvcdat/2016-01-21/Externals/lib/libnetcdf.so -lcurl -L/usr/local/uvcdat/2016-01-21/Externals/lib/libO/Linux.gfortran.64.openmpi.default -lgsl -lgslcblas /usr/local/uvcdat/2016-01-21/Externals/lib/libudunits2.so -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crtn.o  -O2 -fopenmp   -fopenmp -Wl,-soname -Wl,libnco-4.5.4.so -o .libs/libnco-4.5.4.so
.libs/nco_sld.o:(.rodata+0x88): multiple definition of `ESMC_CoordSys_Deg2Rad'
.libs/nco_rgr.o:(.rodata+0x80): first defined here
.libs/nco_sld.o:(.rodata+0x90): multiple definition of `ESMC_CoordSys_Rad2Deg'
.libs/nco_rgr.o:(.rodata+0x88): first defined here
collect2: ld returned 1 exit status
make[3]: *** [libnco.la] Error 1
make[3]: Leaving directory `/export/doutriaux1/git/nco/src/nco'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/export/doutriaux1/git/nco/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/doutriaux1/git/nco'
make: *** [all] Error 2

Benchmark chunking

Please design and implement an input data set
exactly the same as described in

https://www.unidata.ucar.edu/blogs/developer/en/entry/chunking_data_choosing_shapes

and construct a script that runs ncks, ncccopy,
and h5repack to (re-)chunk and the dataset
exactly as in the tables in that page.

  1. Verify that the NCO rew algorithm
    produces the same chunksizes as in Table 1.

  2. Then re-run tests in Table 2, where now
    there's a third column for ncks with rew.
    nccopy and ncks should have similar timings.

  3. Then re-do the timings in Table 3 with
    ncks and rew

Do Unicode characters work in NCO?

@hmb1
Please find the answer to this question, add some regression tests, and fix NCO if Unicode breaks it. The task is to create some Unicode-encoded text strings (European characters to start with) and store them as NC_CHAR and NC_STRING in both attributes and variables and then see if NCO can read/write/manipulate them? Of course this should be done in regularly called regression tests if possible. If something is broken, e.g., printing the file, the next step will be to fix it.
Thanks!

dst_grid_dims and src_grid_dims in TempestRemap files

TempestRemap recently (2015-8-14) tweaked it's map file format to be more compatible with SCRIP. In particular, dst_grid_dims() and src_grid_dims() are now in lon/lat order. This has the advantage that TempestRemap mapping files can now be applied by ESMF based utilities. But it breaks ncks.

To get ncks to work with this new version, I made the following change (listed below for reference - I realize this is not a good way to fix this).

diff --git a/src/nco/nco_rgr.c b/src/nco/nco_rgr.c
index a4b1204..da18ba6 100644
--- a/src/nco/nco_rgr.c
+++ b/src/nco/nco_rgr.c
@@ -716,8 +716,8 @@ nco_rgr_map /* [fnc] Regrid with external weights /
int lat_psn_dst=int_CEWI; /
[idx] Ordinal position of latitude size in rectangular destination
if(flg_grd_in_2D){
if(nco_rgr_mpf_typ == nco_rgr_mpf_Tempest){

  •  lon_psn_src=1;
    
  •  lat_psn_src=0;
    
  •  lon_psn_src=0;
    
  •  lat_psn_src=1;
    
    }else{
    lon_psn_src=0;
    lat_psn_src=1;
    @@ -725,8 +725,8 @@ nco_rgr_map /* [fnc] Regrid with external weights /
    } /
    !flg_grd_in_2D */
    if(flg_grd_out_2D){
    if(nco_rgr_mpf_typ == nco_rgr_mpf_Tempest){
  •  lon_psn_dst=1;
    
  •  lat_psn_dst=0;
    
  •  lon_psn_dst=0;
    
  •  lat_psn_dst=1;
    
    }else{
    lon_psn_dst=0;
    lat_psn_dst=1;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.