Skip to content
Commits on Source (8)
......@@ -50,11 +50,16 @@ endif()
#/////////////////////////////////////////////////////////////////////////////////////
#general C/C++ build flags
#on single-configuration generators (Unix Makefiles, NMake Makefiles) use Debug as default
#on multi-configuration generators (Visual Studio, Xcode) define only 2 types: Debug;Release
#/////////////////////////////////////////////////////////////////////////////////////
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build.")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libs.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release")
endif()
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libs.")
if (NOT BUILD_SHARED_LIBS)
add_definitions(-DENABLE_STATIC)
endif()
......@@ -87,6 +92,18 @@ if(netcdf_root)
message("${color_blue}-- Using user defined netCDF location: ${netcdf_root}${color_reset}")
endif()
#//////////////////////////
#a user defined -DNETCDF_INCLUDE was specified; check if it really exists :-)
#//////////////////////////
if(NETCDF_INCLUDE)
if(EXISTS "${NETCDF_INCLUDE}/netcdf.h")
message("-- Using ${NETCDF_INCLUDE}/netcdf.h")
else()
message(FATAL_ERROR "${color_red}netcdf.h not found at ${NETCDF_INCLUDE}${color_reset}")
endif()
endif()
find_path(NETCDF_INCLUDE netcdf.h ${find_opt})
if(NOT NETCDF_INCLUDE)
message(FATAL_ERROR "${color_red}netcdf.h header file not found${color_reset}")
......@@ -94,6 +111,18 @@ else()
message("-- Found netcdf.h header file at: " ${NETCDF_INCLUDE})
endif()
#//////////////////////////
#a user defined -DNETCDF_LIBRARY was specified; check if it really exists :-)
#//////////////////////////
if(NETCDF_LIBRARY)
if(EXISTS "${NETCDF_LIBRARY}")
message("-- Using ${NETCDF_LIBRARY}")
else()
message(FATAL_ERROR "${color_red}Specified ${NETCDF_LIBRARY} does not exist${color_reset}")
endif()
endif()
find_library(NETCDF_LIBRARY NAMES netcdf PATHS ${NETCDF_LIBRARY_PATH} NO_DEFAULT_PATH)
find_library(NETCDF_LIBRARY NAMES netcdf ${find_opt})
if(NOT NETCDF_LIBRARY)
......@@ -122,14 +151,25 @@ if (has_nc_inq_format)
add_definitions(-DHAVE_NC_INQ_FORMAT)
endif()
find_path(netcdf_mem_h netcdf_mem.h)
if (netcdf_mem_h)
message("-- Found netcdf_mem.h in: " ${netcdf_mem_h})
find_path(path_netcdf_mem_h netcdf_mem.h PATHS ${NETCDF_INCLUDE})
if (path_netcdf_mem_h)
message("-- Found netcdf_mem.h in: " ${path_netcdf_mem_h})
endif()
check_library_exists(${NETCDF_LIBRARY} nc_open_mem "" has_nc_open_mem)
if (has_nc_open_mem)
message("-- Found nc_open_mem in: " ${NETCDF_LIBRARY})
endif()
if (has_nc_open_mem AND path_netcdf_mem_h)
add_definitions(-DHAVE_NETCDF_MEM_H)
message("-- NetCDF diskless functionaliy enabled")
else()
message("-- NetCDF diskless functionaliy not available, netcdf_mem.h not found")
message("-- NetCDF diskless functionaliy not available, netcdf_mem.h or nc_open_mem not found")
endif()
#/////////////////////////////////////////////////////////////////////////////////////
#HDF5
#/////////////////////////////////////////////////////////////////////////////////////
......@@ -249,26 +289,31 @@ endif()
#compile as C++/static CRT on Visual Studio and as C99 on UNIX
#//////////////////////////
set(NCO_MSVC_USE_MT yes CACHE BOOL "Use MT flags when compiling in MSVC")
if (MSVC)
add_definitions( "/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE" )
if (NCO_MSVC_USE_MT)
foreach(CompilerFlag CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
set(MSVC_USE_STATIC_CRT ON CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")
if (MSVC_USE_STATIC_CRT)
message("-- Using static CRT ${MSVC_USE_STATIC_CRT}")
foreach(flag_var CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO)
string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()
endif()
#//////////////////////////
#compile as C++ Code (/TP)
#//////////////////////////
foreach(CompilerFlag CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
set(${CompilerFlag} "/TP ${${CompilerFlag}}")
foreach(flag_var CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO)
set(${flag_var} "/TP ${${flag_var}}")
endforeach()
#//////////////////////////
......
......@@ -3,7 +3,7 @@
# Purpose: GNU Makefile for NCO module nco
# Requires GNU Make---AT&T Make chokes on GNU syntax
# Copyright (C) 1994--2017 Charlie Zender
# Copyright (C) 1994--2018 Charlie Zender
# License: GNU General Public License (GPL) Version 3
# See http://www.gnu.org/copyleft/gpl.html for full license text
......@@ -15,17 +15,18 @@
# Machine build parameters
# Source Method Packages Compiler
# aerosol.ess.uci.edu: NCO Configure All else clang
# cheyenne.ucar.edu : NCO Makefile All else Intel
# cooley.alcf.anl.g : NCO Configure All else GCC
# edison.nersc.gov : NCO Configure All else Intel
# firn.ess.uci.edu : NCO Configure All else clang
# frazil.ess.uci.edu : NCO Configure All else clang
# glace.ess.uci.edu : NCO CMake All else GCC
# grele.ess.uci.edu : NCO Makefile All else GCC
# katabatic.ess.uci.e: NCO All else clang
# rhea.ccs.ornl.gov : NCO Makefile All else GCC
# roulee.ess.uci.edu : NCO + netCDF Makefile All else GCC
# skyglow.ess.uci.edu: NCO + netCDF Configure All else GCC
# travis CI : NCO Configure All else gcc,clang,g++
# yellowstone.ucar.e : NCO Makefile All else Intel
# Usage (testing):
# make tst # Vanilla regression test
......
......@@ -2,17 +2,17 @@
# http://cvs.fedoraproject.org/viewvc/devel/nco/nco.spec?view=co
Name: nco
Version: 4.7.1
Version: 4.7.2
Release: 1%{?dist}
Summary: Programs that manipulate netCDF files
Group: Applications/Engineering
License: GPL3
URL: http://nco.sf.net/
# Obtain NCO version 4.7.1-1 tar.gz from Sourceforge using CVS:
# Obtain NCO version 4.7.2-1 tar.gz from Sourceforge using CVS:
# cvs -d:pserver:anonymous@nco.cvs.sf.net:/cvsroot/nco login
# cvs -z3 -d:pserver:anonymous@nco.cvs.sf.net:/cvsroot/nco co -r nco-4.7.1-1 -d nco-%{version} nco
# tar czf nco-%{version}.tar.gz --exclude='nco-4.7.1/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude='ncap_yacc.[ch]' ./nco-%{version}
# cvs -z3 -d:pserver:anonymous@nco.cvs.sf.net:/cvsroot/nco co -r nco-4.7.2-1 -d nco-%{version} nco
# tar czf nco-%{version}.tar.gz --exclude='nco-4.7.2/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
* Thu Jan 21 2018 Charlie Zender <zender@uci.edu> - 4.7.2-1
- new upstream 4.7.2
* Thu Dec 21 2017 Charlie Zender <zender@uci.edu> - 4.7.1-1
- new upstream 4.7.1
......
......@@ -5,20 +5,20 @@
# Usage:
# Export tagged, public versions
# /usr/bin/scp ${DATA}/nco-4.7.1.tar.gz zender,nco@web.sf.net:/home/project-web/nco/htdocs/src
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.7.1 # Build, do not release on SF
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.7.1 # Build, release on SF
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.7.1 # Install, do not build
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.7.1 # Build and install
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.7.1
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.7.1
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.7.1
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.7.1
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.7.1
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.7.1
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.7.1
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.7.1
# /usr/bin/scp ${DATA}/nco-4.7.2.tar.gz zender,nco@web.sf.net:/home/project-web/nco/htdocs/src
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln nco-4.7.2 # Build, do not release on SF
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --sf nco-4.7.2 # Build, release on SF
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --nst_all nco-4.7.2 # Install, do not build
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --bld --cln --nst_all nco-4.7.2 # Build and install
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_cnt nco-4.7.2
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --acd_prs nco-4.7.2
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cgd_cnt nco-4.7.2
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --cray_prs nco-4.7.2
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --bbl_cnt nco-4.7.2
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --blk_cnt nco-4.7.2
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --dat_cnt nco-4.7.2
# ${HOME}/nco/bld/nco_dst.pl --dbg=2 --cln --ute_prs nco-4.7.2
# Export daily snapshot
# ${HOME}/nco/bld/nco_dst.pl --dbg=2
......@@ -256,7 +256,7 @@ if($bld){
# Set up FTP server
chdir $dst_pth_pfx or die "$prg_nm: ERROR unable to chdir to $dst_pth_pfx: $!\n"; # $! is system error string
cmd_prc("$cp_cmd $doc_fl ./$dst_vrs/doc"); # Copy derived documentation to source directory
cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-4.7.1/debian*' --exclude='.cvsignore' --exclude=ncap_lex.c --exclude=ncap_yacc.[ch] ./$dst_vrs"); # Create gzipped tarfile
cmd_prc("$tar_cmd cvzf $dst_fl --exclude='nco-4.7.2/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
......
......@@ -136,7 +136,7 @@ appending history to file.
This script is part of the netCDF Operators package:
http://nco.sf.net
Copyright 1995--2017 Charlie Zender
Copyright 1995--2018 Charlie Zender
USAGE
exit(0);
......
......@@ -374,7 +374,7 @@ $server_name="sand.ess.uci.edu"; #change this to dust.ess.uci.edu?
$server_ip="128.200.14.132";
$server_port=29659;
if($usg){bm_usg()};
if($usg){NCO_bm::bm_usg()};
if(0){tst_tm_hrz();} # Test hires timer - needs explicit code mod to do this
if($iosockfound){
......
# nco_bld
build NCO and its dependencies on Windows
https://github.com/nco/nco
Do
```
clone.bat
bld.bat
```
this git clones and builds the following NCO dependency libraries
```
zlib
szip
hdf5
curl
netcdf
expat
udunits
gsl
antlr
```
## Options
Use static linking of the C Run-time Library (CRT)
```
bld crt
```
# Changes needed
## hdf5
edit CMakeLists.txt at root and add for case when static linking of the C Run-time Library (CRT)
```
INCLUDE(config/cmake/UserMacros/WINDOWS_MT.cmake)
```
## netcdf
edit CMakeLists.txt and add an option to detect the HDF5 HL library
```
INCLUDE_DIRECTORIES(${HDF5_HL_INCLUDE_DIR})
```
# NCO CMake build
NCO should detect the ZLIB dependency in HDF5 as
```
-- Looking for H5Z_DEFLATE in I:/nco/cmake/hdf5/build/bin/Debug/libhdf5_D.lib
-- Looking for H5Z_DEFLATE in I:/nco/cmake/hdf5/build/bin/Debug/libhdf5_D.lib - found
-- ZLIB library is needed...
```
the netcdf function detection should be
```
-- Found netcdf library at: I:/nco/cmake/netcdf-c/build/liblib/Debug/netcdf.lib
-- Looking for nc_inq_path in I:/nco/cmake/netcdf-c/build/liblib/Debug/netcdf.lib
-- Looking for nc_inq_path in I:/nco/cmake/netcdf-c/build/liblib/Debug/netcdf.lib - found
```
# NCO tests
```
ncks.exe -v lat http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/cmap/enh/precip.mon.mean.nc
```
it requires curl built with WinSSL (default)
# Changes needed for static CRT
To static linking of the C Run-time Library (CRT), these changes must be made for the following libraries,
in the CMakeLists.txt file
```
set(MSVC_USE_STATIC_CRT off CACHE BOOL "Use MT flags when compiling in MSVC")
if (MSVC)
if (MSVC_USE_STATIC_CRT)
message("-- Using static CRT ${MSVC_USE_STATIC_CRT}")
foreach(flag_var CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()
endif()
endif()
```
## zlib
git clone https://github.com/madler/zlib
## szip
git clone https://github.com/soumagne/szip
## expat (dependency for UDUNITS-2)
git clone https://github.com/libexpat/libexpat
## UDUNITS-2
git clone https://github.com/Unidata/UDUNITS-2
# Changes needed for ZLIB and SZIP detection in NCO
## hdf5
edit hdf5-static.vcxproj and add full path of ZLIB and SZIP libraries as dependencies
```
<Lib>
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
<AdditionalDependencies>I:\nco\cmake\zlib\build\Debug\zlibstaticd.lib;I:\nco\cmake\szip\build\bin\Debug\libszip_D.lib</AdditionalDependencies>
</Lib>
```
## netcdf
edit netcdf.vcxproj and add full path of HDF5 and curl libraries as dependencies
```
<Lib>
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
<AdditionalDependencies>I:\nco\cmake\hdf5\build\bin\Debug\libhdf5_hl_D.lib;I:\nco\cmake\hdf5\build\bin\Debug\libhdf5_D.lib;I:\nco\cmake\curl\builds\libcurl-vc14-x64-debug-static-ipv6-sspi-winssl\lib\libcurl_a_debug.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
```
# List of dependencies
```
git clone https://github.com/Unidata/netcdf-c
pushd netcdf-c
git checkout tags/v4.5.0
popd
git clone https://github.com/curl/curl
git clone https://github.com/madler/zlib
git clone https://github.com/soumagne/szip
git clone https://github.com/live-clones/hdf5
git clone https://github.com/Unidata/UDUNITS-2
git clone https://github.com/libexpat/libexpat
git clone https://github.com/ampl/gsl
git clone https://github.com/Distrotech/antlr2
```
## Changes needed for libcurl if building with CMake
edit libcurl.vcxproj to include ws2_32.lib as library dependenccy and set LinkLibraryDependencies as true
```
<Lib>
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
<AdditionalDependencies>ws2_32.lib</AdditionalDependencies>
</Lib>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
```
\ No newline at end of file
:: cmake build all NCO dependencies obtained with 'git clone'
:: Pedro Vicente
@echo off
if not defined DevEnvDir (
echo "%VS140COMNTOOLS%VsDevCmd.bat"
call "%VS140COMNTOOLS%VsDevCmd.bat"
echo "%VCINSTALLDIR%vcvarsall.bat" amd64
call "%VCINSTALLDIR%vcvarsall.bat" amd64
if errorlevel 1 goto :eof
)
if "%~1" == "crt" (
set STATIC_CRT=ON
) else (
set STATIC_CRT=OFF
)
set MSVC_VERSION="Visual Studio 14 2015 Win64"
echo using static crt %STATIC_CRT%
echo using %MSVC_VERSION%
:: replace the character string '\' with '/' needed for cmake
set root_win=%cd%
set root=%root_win:\=/%
echo cmake root is %root%
:build_zlib
if exist %root_win%\zlib\build\zlib.sln (
echo skipping zlib build
goto build_szip
) else (
echo building zlib
pushd zlib
mkdir build
pushd build
cmake .. -G %MSVC_VERSION% ^
-DMSVC_USE_STATIC_CRT=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DBUILD_SHARED_LIBS=OFF
msbuild zlib.sln /target:build /property:configuration=debug
cp %root%\zlib\build\zconf.h %root%\zlib
popd
popd
if errorlevel 1 goto :eof
)
:build_szip
if exist %root_win%\szip\build\SZIP.sln (
echo skipping szip build
goto build_hdf5
) else (
echo building szip
pushd szip
mkdir build
pushd build
cmake .. -G %MSVC_VERSION% ^
-DMSVC_USE_STATIC_CRT=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF
msbuild SZIP.sln /target:build /property:configuration=debug
popd
popd
if errorlevel 1 goto :eof
)
:build_hdf5
if exist %root_win%\hdf5\build\bin\Debug\h5dump.exe (
echo skipping hdf5 build
goto build_curl
) else (
echo building hdf5
pushd hdf5
mkdir build
pushd build
cmake .. -G %MSVC_VERSION% ^
-DBUILD_STATIC_CRT_LIBS=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_STATIC_EXECS=ON ^
-DBUILD_TESTING=OFF ^
-DHDF5_BUILD_EXAMPLES=OFF ^
-DHDF5_BUILD_CPP_LIB=OFF ^
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON ^
-DH5_ZLIB_HEADER=%root%/zlib/zlib.h ^
-DZLIB_STATIC_LIBRARY:FILEPATH=%root%/zlib/build/Debug/zlibstaticd.lib ^
-DZLIB_INCLUDE_DIRS:PATH=%root%/zlib ^
-DHDF5_ENABLE_SZIP_SUPPORT=ON ^
-DSZIP_USE_EXTERNAL=ON ^
-DSZIP_FOUND=ON ^
-DSZIP_STATIC_LIBRARY:FILEPATH=%root%/szip/build/bin/Debug/libszip_D.lib ^
-DSZIP_INCLUDE_DIRS:PATH=%root%/szip/src
msbuild HDF5.sln /target:build /property:configuration=debug
popd
popd
if errorlevel 1 goto :eof
)
:build_curl
if exist %root_win%\curl\builds\libcurl-vc14-x64-debug-static-ipv6-sspi-winssl\lib\libcurl_a_debug.lib (
echo skipping curl build
goto build_netcdf
) else (
echo building curl
pushd curl
call buildconf.bat
pushd winbuild
@echo on
if %STATIC_CRT% == ON (
nmake /f Makefile.vc mode=static vc=14 debug=yes gen_pdb=yes MACHINE=x64 RTLIBCFG=static
) else (
nmake /f Makefile.vc mode=static vc=14 debug=yes gen_pdb=yes MACHINE=x64
)
@echo off
popd
popd
if errorlevel 1 goto :eof
)
:build_netcdf
if exist %root_win%\netcdf-c\build\ncdump\ncdump.exe (
echo skipping netcdf build
goto test_netcdf
) else (
echo building netcdf
pushd netcdf-c
mkdir build
pushd build
cmake .. -G %MSVC_VERSION% ^
-DNC_USE_STATIC_CRT=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DENABLE_TESTS=OFF ^
-DBUILD_SHARED_LIBS=OFF ^
-DHDF5_HL_LIBRARY=%root%/hdf5/build/bin/Debug/libhdf5_hl_D.lib ^
-DHDF5_C_LIBRARY=%root%/hdf5/build/bin/Debug/libhdf5_D.lib ^
-DHDF5_INCLUDE_DIR=%root%/hdf5/src ^
-DZLIB_LIBRARY:FILE=%root%/zlib/build/Debug/zlibstaticd.lib ^
-DSZIP_LIBRARY:FILE=%root%/szip/build/bin/Debug/libszip_D.lib ^
-DZLIB_INCLUDE_DIR:PATH=%root%/zlib ^
-DHAVE_HDF5_H=%root%/hdf5/build ^
-DHDF5_HL_INCLUDE_DIR=%root%/hdf5/hl/src ^
-DCURL_LIBRARY=%root%/curl/builds/libcurl-vc14-x64-debug-static-ipv6-sspi-winssl/lib/libcurl_a_debug.lib ^
-DCURL_INCLUDE_DIR=%root%/curl/include
msbuild netcdf.sln /target:build /property:configuration=debug
popd
popd
if errorlevel 1 goto :eof
)
:test_netcdf
if exist %root_win%\netcdf-c\build\ncdump\ncdump.exe (
echo testing netcdf build
@echo on
%root_win%\netcdf-c\build\ncdump\ncdump.exe -k http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/cmap/enh/precip.mon.mean.nc
@echo off
@echo.
goto build_expat
)
:build_expat
if exist %root_win%\libexpat\expat\build\expat.sln (
echo skipping expat build
goto build_udunits
) else (
echo building expat
pushd libexpat
pushd expat
mkdir build
pushd build
cmake .. -G %MSVC_VERSION% ^
-DMSVC_USE_STATIC_CRT=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_shared=OFF
msbuild expat.sln /target:build /property:configuration=debug
popd
popd
popd
if errorlevel 1 goto :eof
)
:build_udunits
if exist %root_win%\UDUNITS-2\build\udunits.sln (
echo skipping udunits build
goto build_gsl
) else (
echo building udunits
pushd UDUNITS-2
mkdir build
pushd build
cmake .. -G %MSVC_VERSION% ^
-DMSVC_USE_STATIC_CRT=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DEXPAT_INCLUDE_DIR=%root%/libexpat/expat/lib ^
-DEXPAT_LIBRARY=%root%/libexpat/expat/build/Debug/expatd.lib
msbuild udunits.sln /target:build /property:configuration=debug
popd
popd
if errorlevel 1 goto :eof
)
:build_gsl
if exist %root_win%\GSL\build\GSL.sln (
echo skipping gsl build
goto build_antlr
) else (
echo building gsl
pushd GSL
mkdir build
pushd build
if %STATIC_CRT%==ON (
set DYNAMIC_CRT=OFF
) else (
set DYNAMIC_CRT=ON
)
echo using dynamic CRT %DYNAMIC_CRT%
cmake .. -G %MSVC_VERSION% ^
-DMSVC_RUNTIME_DYNAMIC=%DYNAMIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DGSL_DISABLE_TESTS=ON
msbuild GSL.sln /target:build /property:configuration=debug
popd
popd
if errorlevel 1 goto :eof
)
:build_antlr
if exist %root_win%\antlr2\lib\cpp\build\Project.sln (
echo skipping antlr build
goto build_nco
) else (
echo building antlr
pushd antlr2
pushd lib
pushd cpp
mkdir build
pushd build
cmake .. -G %MSVC_VERSION% ^
-DMSVC_USE_STATIC_CRT=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DBUILD_SHARED_LIBS=OFF
msbuild Project.sln /target:build /property:configuration=debug
popd
popd
popd
popd
if errorlevel 1 goto :eof
)
:build_nco
if exist Debug\ncks.exe (
echo skipping nco build
goto test_nco
) else (
echo building NCO
rm -rf CMakeCache.txt CMakeFiles
cmake .. -G %MSVC_VERSION% ^
-DMSVC_USE_STATIC_CRT=%STATIC_CRT% ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DNETCDF_INCLUDE:PATH=%root%/netcdf-c/include ^
-DNETCDF_LIBRARY:FILE=%root%/netcdf-c/build/liblib/Debug/netcdf.lib ^
-DHDF5_LIBRARY:FILE=%root%/hdf5/build/bin/Debug/libhdf5_D.lib ^
-DHDF5_HL_LIBRARY:FILE=%root%/hdf5/build/bin/Debug/libhdf5_hl_D.lib ^
-DZLIB_LIBRARY:FILE=%root%/zlib/build/Debug/zlibstaticd.lib ^
-DSZIP_LIBRARY:FILE=%root%/szip/build/bin/Debug/libszip_D.lib ^
-DCURL_LIBRARY:FILE=%root%/curl/builds/libcurl-vc14-x64-debug-static-ipv6-sspi-winssl/lib/libcurl_a_debug.lib ^
-DUDUNITS2_INCLUDE:PATH=%root%/UDUNITS-2/lib ^
-DUDUNITS2_LIBRARY:FILE=%root%/UDUNITS-2/build/lib/Debug/udunits2.lib ^
-DEXPAT_LIBRARY:FILE=%root%/libexpat/expat/build/Debug/expatd.lib ^
-DGSL_INCLUDE:PATH=%root%/gsl/build ^
-DGSL_LIBRARY:FILE=%root%/gsl/build/Debug/gsl.lib ^
-DGSL_CBLAS_LIBRARY:FILE=%root%/gsl/build/Debug/gslcblas.lib ^
-DANTLR_INCLUDE:PATH=%root%/antlr2/lib/cpp ^
-DANTLR_LIBRARY:FILE=%root%/antlr2/lib/cpp/build/Debug/antlr.lib
msbuild nco.sln /target:build /property:configuration=debug
if errorlevel 1 goto :eof
)
:test_nco
@echo on
%root_win%\netcdf-c\build\ncgen\ncgen.exe -k netCDF-4 -b -o %root_win%\..\data\in_grp.nc %root_win%\..\data\in_grp.cdl
%root_win%\netcdf-c\build\ncgen\ncgen.exe -k netCDF-4 -b -o %root_win%\..\data\in.nc %root_win%\..\data\in.cdl
%root_win%\Debug\ncks.exe --jsn_fmt 2 -C -g g10 -v two_dmn_rec_var %root_win%\..\data\in_grp.nc
%root_win%\Debug\ncks.exe -v lat http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/cmap/enh/precip.mon.mean.nc
:: generate text files in_grp.nc.gen.txt from in_grp.nc and in.nc and use tool FC to compare contents
:: with pre-existing in_grp.nc.txt, in.nc.txt, generated in Linux
:: generation of in_grp.nc.gen.txt must be done in 'data' folder so that paths match
@pushd %root_win%\..\data
%root_win%\Debug\ncks.exe in_grp.nc > %root_win%\in_grp.nc.gen.txt
%root_win%\Debug\ncks.exe in.nc > %root_win%\in.nc.gen.txt
@popd
fc in_grp.nc.gen.txt in_grp.nc.txt
fc in.nc.gen.txt in.nc.txt
echo done
\ No newline at end of file
......@@ -14,5 +14,6 @@ cmake .. ^
-DGSL_INCLUDE:PATH=I:/gsl-1.8/src ^
-DGSL_LIBRARY:FILE=I:/gsl-1.8/src/gsl/1.8/gsl-1.8/VC8/libgsl/Debug-StaticLib/libgsl_d.lib ^
-DGSL_CBLAS_LIBRARY:FILE=I:/gsl-1.8/src/gsl/1.8/gsl-1.8/VC8/libgslcblas/Debug-StaticLib/libgslcblas_d.lib
msbuild nco.sln /target:build /property:configuration=debug
git clone https://github.com/Unidata/netcdf-c
pushd netcdf-c
git checkout tags/v4.5.0
popd
git clone https://github.com/curl/curl
git clone https://github.com/madler/zlib
git clone https://github.com/soumagne/szip
git clone https://github.com/live-clones/hdf5
git clone https://github.com/Unidata/UDUNITS-2
git clone https://github.com/libexpat/libexpat
git clone https://github.com/ampl/gsl
git clone https://github.com/Distrotech/antlr2
\ No newline at end of file
:: cmake build all NCO dependencies obtained with 'git clone' using nmake
:: Pedro Vicente
@echo off
@call "%VS140COMNTOOLS%VsDevCmd.bat" amd64
:: replace the character string '\' with '/' needed for cmake
set temp=%cd%
set root=%temp:\=/%
echo root is %root%
pushd zlib
if exist build\Makefile (
echo skipping zlib build
popd
goto build_hdf5
) else (
echo building zlib
mkdir build
pushd build
cmake .. -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DBUILD_SHARED_LIBS=OFF
nmake
popd
popd
)
:build_hdf5
pushd hdf5
if exist build\Makefile (
echo skipping hdf5 build
popd
goto build_curl
) else (
echo building hdf5
mkdir build
pushd build
cmake .. -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_STATIC_EXECS=ON ^
-DBUILD_TESTING=OFF ^
-DHDF5_BUILD_EXAMPLES=OFF ^
-DHDF5_BUILD_CPP_LIB=OFF
nmake
popd
popd
)
:build_curl
pushd curl
if exist build\Makefile (
echo skipping curl build
popd
goto build_netcdf
) else (
echo building curl
mkdir build
pushd build
cmake .. -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF
nmake
popd
popd
)
:build_netcdf
pushd netcdf-c
if exist build\ncdump\ncdump.exe (
echo skipping netcdf build
popd
goto test_netcdf
) else (
echo building netcdf
mkdir build
pushd build
cmake .. -G "NMake Makefiles" ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DENABLE_TESTS=OFF ^
-DCMAKE_BUILD_TYPE=Debug ^
-DBUILD_SHARED_LIBS=OFF ^
-DHDF5_HL_LIBRARY=%root%/hdf5/build/bin/libhdf5_hl_D.lib ^
-DHDF5_C_LIBRARY=%root%/hdf5/build/bin/libhdf5_D.lib ^
-DHDF5_INCLUDE_DIR=%root%/hdf5/src ^
-DZLIB_LIBRARY:FILE=%root%/zlib/build/zlibstaticd.lib ^
-DZLIB_INCLUDE_DIR:PATH=%root%/zlib ^
-DHAVE_HDF5_H=%root%/hdf5/build ^
-DHDF5_HL_INCLUDE_DIR=%root%/hdf5/hl/src ^
-DCURL_LIBRARY=%root%/curl/build/lib/libcurl-d_imp.lib ^
-DCURL_INCLUDE_DIR=%root%/curl/include
nmake
popd
popd
)
:test_netcdf
if exist %root%\netcdf-c\build\ncdump\ncdump.exe (
echo testing netcdf build
pushd netcdf-c
pushd build
pushd ncdump
cp %root%\curl\build\lib\libcurl-d.dll %root%\netcdf-c\build\ncdump
ncdump http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/cmap/enh/precip.mon.mean.nc
popd
popd
popd
goto build_nco
)
:build_nco
cmake .. ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
-DMSVC_USE_STATIC_CRT=OFF ^
-DNETCDF_INCLUDE:PATH=%root%/netcdf-c/include ^
-DNETCDF_LIBRARY:FILE=%root%/netcdf-c/build/liblib/netcdf.lib ^
-DHDF5_LIBRARY:FILE=%root%/hdf5/build/bin/libhdf5_D.lib ^
-DHDF5_HL_LIBRARY:FILE=%root%/hdf5/build/bin/libhdf5_hl_D.lib ^
-DZLIB_LIBRARY:FILE=%root%/zlib/build/zlibstaticd.lib ^
-DCURL_LIBRARY:FILE=%root%/curl/build/lib/libcurl-d_imp.lib
\ No newline at end of file
This diff is collapsed.
netcdf in_grp {
dimensions:
coord = 2 ;
gds_crd = 8 ;
lat = 2 ;
lev = 3 ;
lon = 4 ;
time = UNLIMITED ; // (10 currently)
vrt_nbr = 2 ;
variables:
float area(lat) ;
area:units = "meter2" ;
float att_var(time) ;
att_var:byte_att = 0b, 1b, 2b, 127b, -128b, -127b, -2b, -1b ;
att_var:char_att = "Sentence one.\n",
"Sentence two.\n" ;
att_var:short_att = 37s ;
att_var:int_att = 73 ;
att_var:long_att = 73 ;
att_var:float_att = 73.f, 72.f, 71.f, 70.01f, 69.001f, 68.01f, 67.01f ;
att_var:double_att = 73., 72., 71., 70.01, 69.001, 68.01, 67.010001 ;
int att_var_jsn ;
att_var_jsn:char\ att\ with\ whitespace = "cf-json.org <http://cf-json.org>" ;
att_var_jsn:double\ att\ with\ whitespace = 3.14 ;
att_var_jsn:int\ att\ with\ whitespace = 1 ;
att_var_jsn:int_array\ att\ with\ whitespace = 1, 2 ;
string att_var_jsn:string_array\ att\ with\ whitespace = "1", "2" ;
int att_var_spc_chr ;
att_var_spc_chr:space\ in\ name = "foo" ;
att_var_spc_chr:comma_in_name\, = "foo" ;
att_var_spc_chr:lt_in_name\< = "foo" ;
att_var_spc_chr:gt_in_name\> = "foo" ;
att_var_spc_chr:hash_in_name\# = "foo" ;
att_var_spc_chr:xclaim_in_name\! = "foo" ;
att_var_spc_chr:dollar_in_name\$ = "foo" ;
att_var_spc_chr:ampersand_in_name\& = "foo" ;
att_var_spc_chr:equals_in_name\= = "foo" ;
att_var_spc_chr:semicolon_in_name\; = "foo" ;
att_var_spc_chr:colon_in_name\: = "foo" ;
att_var_spc_chr:lbrace_in_name\{ = "foo" ;
att_var_spc_chr:rbrace_in_name\} = "foo" ;
att_var_spc_chr:lparen_in_name\( = "foo" ;
att_var_spc_chr:rparen_in_name\) = "foo" ;
att_var_spc_chr:lbracket_in_name\[ = "foo" ;
att_var_spc_chr:rbracket_in_name\] = "foo" ;
att_var_spc_chr:plus_in_name+ = "foo" ;
att_var_spc_chr:hyphen_in_name- = "foo" ;
att_var_spc_chr:at_in_name@ = "foo" ;
float lat(lat) ;
lat:units = "degrees_north" ;
float lat_lon(lat,lon) ;
float lev(lev) ;
lev:units = "hybrid_sigma_pressure" ;
lev:bounds = "lev_bnd" ;
float lev_bnd(lev,vrt_nbr) ;
lev_bnd:purpose = "Cell boundaries for lev coordinate" ;
float lon(lon) ;
lon:units = "degrees_east" ;
float non_coord(coord) ;
non_coord:purpose = "Test whether netCDF4 supports renaming non-coordinates to coordinates" ;
float one ;
double ppc_big(time) ;
double ppc_dbl(time) ;
ppc_dbl:long_name = "Precision-Preserving Compression, big numbers" ;
ppc_dbl:purpose = "test --ppc switches" ;
ppc_dbl:original_values = "123456789e-10,123456789e-9,123456789e-8,123456789e-7,123456789e-6,123456789e-5,123456789e-4,123456789e-3,123456789e-2,123456789e-1" ;
float ppc_flt(time) ;
ppc_flt:long_name = "Precision-Preserving Compression, single precision" ;
ppc_flt:purpose = "test --ppc switches" ;
ppc_flt:original_values = "0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789" ;
float scl ;
double time(time) ;
int unique ;
unique:purpose = "the only variable of this name in this file, to test smallest possible access requests" ;
float val_one_mss(lat) ;
val_one_mss:long_name = "one regular value, one missing value" ;
val_one_mss:_FillValue = 1.e+36f ;
// global attributes:
:Conventions = "CF-1.0" ;
:history = "History global attribute.\n" ;
:julian_day = 200000.04 ;
:RCS_Header = "$Header$" ;
data:
area = 10, 10 ;
att_var = 10, 10.1, 10.2, 10.3, 10.40101, 10.5, 10.6, 10.7, 10.8, 10.99 ;
att_var_jsn = 73 ;
att_var_spc_chr = 73 ;
lat = -90, 90 ;
lat_lon =
1, 2, 3, 4,
5, 6, 7, 8 ;
lev = 100, 500, 1000 ;
lev_bnd =
0, 300,
300, 750,
750, 1013.25 ;
lon = 0, 90, 180, 270 ;
non_coord = 9.96921e+36, 9.96921e+36 ;
one = 1 ;
ppc_big = 0.0123456789, 0.123456789, 1.23456789, 12.3456789, 123.456789, 1234.56789, 12345.6789, 123456.789, 1234567.89, 12345678.9 ;
ppc_dbl = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.12345678, 0.123456789 ;
ppc_flt = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.1234568, 0.1234568 ;
scl = 1 ;
time = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ;
unique = 73 ;
val_one_mss = 1, _ ;
group: g1 {
variables:
int g1v1 ;
int g1v2 ;
float lon(lon) ;
lon:units = "degrees_east" ;
double ppc_big(time) ;
double ppc_dbl(time) ;
ppc_dbl:long_name = "Precision-Preserving Compression, big numbers" ;
ppc_dbl:purpose = "test --ppc switches" ;
ppc_dbl:original_values = "123456789e-10,123456789e-9,123456789e-8,123456789e-7,123456789e-6,123456789e-5,123456789e-4,123456789e-3,123456789e-2,123456789e-1" ;
float ppc_flt(time) ;
ppc_flt:long_name = "Precision-Preserving Compression, single precision" ;
ppc_flt:purpose = "test --ppc switches" ;
ppc_flt:original_values = "0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789" ;
float scl ;
int v1 ;
// group attributes:
:history = "History group attribute.\n" ;
data:
g1v1 = 1 ;
g1v2 = 2 ;
lon = 0, 90, 180, 270 ;
ppc_big = 0.0123456789, 0.123456789, 1.23456789, 12.3456789, 123.456789, 1234.56789, 12345.6789, 123456.789, 1234567.89, 12345678.9 ;
ppc_dbl = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.12345678, 0.123456789 ;
ppc_flt = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.1234568, 0.1234568 ;
scl = 1.1 ;
v1 = 1 ;
group: g1g1 {
variables:
double ppc_big(time) ;
double ppc_dbl(time) ;
ppc_dbl:long_name = "Precision-Preserving Compression, big numbers" ;
ppc_dbl:purpose = "test --ppc switches" ;
ppc_dbl:original_values = "123456789e-10,123456789e-9,123456789e-8,123456789e-7,123456789e-6,123456789e-5,123456789e-4,123456789e-3,123456789e-2,123456789e-1" ;
float ppc_flt(time) ;
ppc_flt:long_name = "Precision-Preserving Compression, single precision" ;
ppc_flt:purpose = "test --ppc switches" ;
ppc_flt:original_values = "0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789" ;
float scl ;
int v1 ;
data:
ppc_big = 0.0123456789, 0.123456789, 1.23456789, 12.3456789, 123.456789, 1234.56789, 12345.6789, 123456.789, 1234567.89, 12345678.9 ;
ppc_dbl = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.12345678, 0.123456789 ;
ppc_flt = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.1234568, 0.1234568 ;
scl = 1.11 ;
v1 = 11 ;
} // group /g1/g1g1
group: g1\:g2 {
// group attributes:
:purpose = "group name with semi-special character, a colon (makes CDL-parsing hard)" ;
:csznote = "As of 20131006, ncks skips groups whose names contain special characters. ncdump handles them fine. e.g.,\n",
"ncgen -k netCDF-4 -b -o ~/nco/data/in_grp.nc ~/nco/data/in_grp.cdl\n",
"ncks --cdl -m -g g1 ~/nco/data/in_grp.nc | m\n",
"ncdump -h -g g1 ~/nco/data/in_grp.nc | m\n" ;
} // group /g1/g1\:g2
} // group /g1
group: g2 {
variables:
float lon(lon) ;
float scl ;
double time(time) ;
data:
lon = 0, 90, 180, 270 ;
scl = 1.2 ;
time = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ;
} // group /g2
group: g4 {
variables:
int one_dmn_rec_var(time) ;
one_dmn_rec_var:long_name = "one dimensional record variable" ;
one_dmn_rec_var:units = "kelvin" ;
double ppc_big(time) ;
double ppc_dbl(time) ;
ppc_dbl:long_name = "Precision-Preserving Compression, big numbers" ;
ppc_dbl:purpose = "test --ppc switches" ;
ppc_dbl:original_values = "123456789e-10,123456789e-9,123456789e-8,123456789e-7,123456789e-6,123456789e-5,123456789e-4,123456789e-3,123456789e-2,123456789e-1" ;
float ppc_flt(time) ;
ppc_flt:long_name = "Precision-Preserving Compression, single precision" ;
ppc_flt:purpose = "test --ppc switches" ;
ppc_flt:original_values = "0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789" ;
data:
one_dmn_rec_var = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ;
ppc_big = 0.0123456789, 0.123456789, 1.23456789, 12.3456789, 123.456789, 1234.56789, 12345.6789, 123456.789, 1234567.89, 12345678.9 ;
ppc_dbl = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.12345678, 0.123456789 ;
ppc_flt = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.1234568, 0.1234568 ;
} // group /g4
group: g5 {
dimensions:
time51 = UNLIMITED ; // (2 currently)
time52 = UNLIMITED ; // (10 currently)
variables:
int one_dmn_rec_var(time52) ;
one_dmn_rec_var:long_name = "one dimensional record variable" ;
one_dmn_rec_var:units = "kelvin" ;
double time51(time51) ;
double time52(time52) ;
data:
one_dmn_rec_var = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ;
time51 = 1, 2 ;
time52 = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ;
} // group /g5
group: g6 {
variables:
float area(lat) ;
float area1(lat) ;
data:
area = 20, 30 ;
area1 = 21, 31 ;
group: g6g1 {
variables:
float area(lat) ;
data:
area = 40, 50 ;
} // group /g6/g6g1
} // group /g6
group: g7 {
variables:
float gds_crd(gds_crd) ;
gds_crd:long_name = "Geodesic coordinate" ;
gds_crd:units = "degree" ;
gds_crd:purpose = "enumerated coordinate like those that might define points in a geodesic grid" ;
gds_crd:coordinates = "lat_gds lon_gds" ;
double lat_gds(gds_crd) ;
lat_gds:units = "degree" ;
lat_gds:long_name = "Latitude" ;
lat_gds:standard_name = "latitude" ;
lat_gds:purpose = "1-D latitude coordinate referred to by geodesic grid variables" ;
double lon_gds(gds_crd) ;
lon_gds:long_name = "Longitude" ;
lon_gds:standard_name = "longitude" ;
lon_gds:units = "degree" ;
lon_gds:purpose = "1-D longitude coordinate referred to by geodesic grid variables" ;
double ppc_big(time) ;
double ppc_dbl(time) ;
ppc_dbl:long_name = "Precision-Preserving Compression, big numbers" ;
ppc_dbl:purpose = "test --ppc switches" ;
ppc_dbl:original_values = "123456789e-10,123456789e-9,123456789e-8,123456789e-7,123456789e-6,123456789e-5,123456789e-4,123456789e-3,123456789e-2,123456789e-1" ;
float ppc_flt(time) ;
ppc_flt:long_name = "Precision-Preserving Compression, single precision" ;
ppc_flt:purpose = "test --ppc switches" ;
ppc_flt:original_values = "0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789" ;
data:
gds_crd = 0, 1, 2, 3, 4, 5, 6, 7 ;
lat_gds = -90, -30, -30, 0, 0, 30, 30, 90 ;
lon_gds = 0, 0, 180, 0, 180, 0, 180, 0 ;
ppc_big = 0.0123456789, 0.123456789, 1.23456789, 12.3456789, 123.456789, 1234.56789, 12345.6789, 123456.789, 1234567.89, 12345678.9 ;
ppc_dbl = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.12345678, 0.123456789 ;
ppc_flt = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.1234568, 0.1234568 ;
group: g7g1 {
variables:
float gds_var(gds_crd) ;
gds_var:units = "meter" ;
gds_var:coordinates = "lat_gds lon_gds" ;
data:
gds_var = 273.1, 273.2, 273.3, 273.4, 273.5, 273.6, 273.7, 273.8 ;
} // group /g7/g7g1
} // group /g7
group: g8 {
group: g8g1 {
group: g8g1g1 {
group: g8g1g1g1 {
// group attributes:
:mtd_grp = "Group metadata from g8g1g1g1, a leaf-group with no variables, to test whether metadata-only leaf groups are copied and/or printed" ;
:answer = "Twerking" ;
} // group /g8/g8g1/g8g1g1/g8g1g1g1
} // group /g8/g8g1/g8g1g1
} // group /g8/g8g1
} // group /g8
group: g9 {
group: g9g1 {
variables:
int v6 ;
data:
v6 = 63 ;
group: g9g1g1 {
group: g9g1g1g1 {
// group attributes:
:mtd_grp = "Group metadata from g9g1g1g1, a group with no variables, to test whether group metadata are copied to ancestor groups of extracted variables" ;
group: g9g1g1g1g1 {
group: g9g1g1g1g1g1 {
group: g9g1g1g1g1g1g1 {
variables:
double ppc_big(time) ;
double ppc_dbl(time) ;
ppc_dbl:long_name = "Precision-Preserving Compression, big numbers" ;
ppc_dbl:purpose = "test --ppc switches" ;
ppc_dbl:original_values = "123456789e-10,123456789e-9,123456789e-8,123456789e-7,123456789e-6,123456789e-5,123456789e-4,123456789e-3,123456789e-2,123456789e-1" ;
float ppc_flt(time) ;
ppc_flt:long_name = "Precision-Preserving Compression, single precision" ;
ppc_flt:purpose = "test --ppc switches" ;
ppc_flt:original_values = "0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789" ;
int v7 ;
data:
ppc_big = 0.0123456789, 0.123456789, 1.23456789, 12.3456789, 123.456789, 1234.56789, 12345.6789, 123456.789, 1234567.89, 12345678.9 ;
ppc_dbl = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.12345678, 0.123456789 ;
ppc_flt = 0, 0.1, 0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567, 0.1234568, 0.1234568 ;
v7 = 73 ;
} // group /g9/g9g1/g9g1g1/g9g1g1g1/g9g1g1g1g1/g9g1g1g1g1g1/g9g1g1g1g1g1g1
} // group /g9/g9g1/g9g1g1/g9g1g1g1/g9g1g1g1g1/g9g1g1g1g1g1
} // group /g9/g9g1/g9g1g1/g9g1g1g1/g9g1g1g1g1
} // group /g9/g9g1/g9g1g1/g9g1g1g1
} // group /g9/g9g1/g9g1g1
} // group /g9/g9g1
} // group /g9
group: g10 {
variables:
float three_dmn_rec_var(time,lat,lon) ;
three_dmn_rec_var:units = "watt meter-2" ;
float two_dmn_rec_var(time,lev) ;
data:
three_dmn_rec_var =
1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
13, 14, 15, 16,
17, 18, 19, 20,
21, 22, 23, 24,
25, 26, 27, 28,
29, 30, 31, 32,
33, 34, 35, 36,
37, 38, 39, 40,
41, 42, 43, 44,
45, 46, 47, 48,
49, 50, 51, 52,
53, 54, 55, 56,
57, 58, 59, 60,
61, 62, 63, 64,
65, 66, 67, 68,
69, 70, 71, 72,
73, 74, 75, 76,
77, 78, 79, 80 ;
two_dmn_rec_var =
1, 2, 3,
1, 2.1, 3,
1, 2.2, 3,
1, 2.3, 3,
1, 2.4, 3,
1, 2.5, 3,
1, 2.6, 3,
1, 2.7, 3,
1, 2.8, 3,
1, 2.9, 3 ;
} // group /g10
group: g11 {
variables:
byte byte_var ;
byte_var:long_name = "byte-type variable" ;
char char_var ;
char_var:long_name = "char-type variable" ;
char char_var_arr(time) ;
char_var_arr:long_name = "char-type variable array" ;
double double_var ;
double_var:long_name = "double-type variable" ;
float float_var ;
float_var:long_name = "float-type variable" ;
int64 int64_var ;
int64_var:long_name = "int64-type variable" ;
int int_var ;
int_var:long_name = "int-type variable" ;
int long_var ;
long_var:long_name = "long-type variable" ;
long_var:purpose = "Variable of CDL type=long, which is deprecated for int. Included to test back-compatibility" ;
short short_var ;
short_var:long_name = "short-type variable" ;
string string_arr(lat) ;
string_arr:long_name = "string-type array variable" ;
string string_rec_arr(time) ;
string_rec_arr:long_name = "string-type record array variable" ;
string string_var ;
string_var:long_name = "string-type variable" ;
ubyte ubyte_var ;
ubyte_var:long_name = "ubyte-type variable" ;
uint64 uint64_var ;
uint64_var:long_name = "uint64-type variable" ;
uint uint_arr(lat) ;
uint_arr:long_name = "uint-type array variable" ;
uint uint_var ;
uint_var:long_name = "uint-type variable" ;
uint_var:_FillValue = 73ul ;
uint_var:purpose = "_FillValue attribute tests whether NcML parser inadvertently creates two _FillValues for unsigned types" ;
ushort ushort_var ;
ushort_var:long_name = "ushort-type variable" ;
data:
byte_var = 122 ;
char_var = "z" ;
char_var_arr = "two words" ;
double_var = 10 ;
float_var = 10 ;
int64_var = 9223372036854775807 ;
int_var = 10 ;
long_var = 10 ;
short_var = 10 ;
string_arr = "Stanza 1", "Stanza 2" ;
string_rec_arr = "One little ", "two little ", "three little indians, ", "four little ", "five little ", "six little indians, ", "seven little ", "eight little ", "nine little indians, ", "ten little indian boys." ;
string_var = "If you prick us, do we not bleed? If you tickle us, do we not laugh? If you poison us, do we not die? And if you wrong us, shall we not revenge?" ;
ubyte_var = 122 ;
uint64_var = 0 ;
uint_arr = 4294967295, 4294967295 ;
uint_var = 0 ;
ushort_var = 65535 ;
} // group /g11
group: g12 {
// group attributes:
:space\ in\ name = "foo" ;
:comma_in_name\, = "foo" ;
:lt_in_name\< = "foo" ;
:gt_in_name\> = "foo" ;
:hash_in_name\# = "foo" ;
:xclaim_in_name\! = "foo" ;
:dollar_in_name\$ = "foo" ;
:ampersand_in_name\& = "foo" ;
:equals_in_name\= = "foo" ;
:semicolon_in_name\; = "foo" ;
:colon_in_name\: = "foo" ;
:lbrace_in_name\{ = "foo" ;
:rbrace_in_name\} = "foo" ;
:lparen_in_name\( = "foo" ;
:rparen_in_name\) = "foo" ;
:lbracket_in_name\[ = "foo" ;
:rbracket_in_name\] = "foo" ;
:plus_in_name+ = "foo" ;
:hyphen_in_name- = "foo" ;
:at_in_name@ = "foo" ;
} // group /g12
} // group /
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for NCO netCDF Operators 4.7.1.
# Generated by GNU Autoconf 2.69 for NCO netCDF Operators 4.7.2.
#
# Report bugs to <nco-bugs@lists.sourceforge.net>.
#
......@@ -592,8 +592,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='NCO netCDF Operators'
PACKAGE_TARNAME='nco'
PACKAGE_VERSION='4.7.1'
PACKAGE_STRING='NCO netCDF Operators 4.7.1'
PACKAGE_VERSION='4.7.2'
PACKAGE_STRING='NCO netCDF Operators 4.7.2'
PACKAGE_BUGREPORT='nco-bugs@lists.sourceforge.net'
PACKAGE_URL=''
 
......@@ -1394,7 +1394,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures NCO netCDF Operators 4.7.1 to adapt to many kinds of systems.
\`configure' configures NCO netCDF Operators 4.7.2 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1465,7 +1465,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of NCO netCDF Operators 4.7.1:";;
short | recursive ) echo "Configuration of NCO netCDF Operators 4.7.2:";;
esac
cat <<\_ACEOF
 
......@@ -1633,7 +1633,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
NCO netCDF Operators configure 4.7.1
NCO netCDF Operators configure 4.7.2
generated by GNU Autoconf 2.69
 
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2499,7 +2499,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by NCO netCDF Operators $as_me 4.7.1, which was
It was created by NCO netCDF Operators $as_me 4.7.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
$ $0 $@
......@@ -3755,7 +3755,7 @@ fi
 
# Define the identity of the package.
PACKAGE='nco'
VERSION='4.7.1'
VERSION='4.7.2'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -21548,7 +21548,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by NCO netCDF Operators $as_me 4.7.1, which was
This file was extended by NCO netCDF Operators $as_me 4.7.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -21614,7 +21614,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
NCO netCDF Operators config.status 4.7.1
NCO netCDF Operators config.status 4.7.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
 
......
......@@ -3,7 +3,7 @@
# Purpose: Template autoconf uses to generate NCO configure script
# Newer convention names this file configure.ac, rather than configure.in
# Copyright (C) 2003--2017 Charlie Zender
# Copyright (C) 2003--2018 Charlie Zender
# License: GNU General Public License (GPL) Version 3
# See http://www.gnu.org/copyleft/gpl.html for full license text
......@@ -54,7 +54,7 @@
# 20170808: Choose between traditional version and Git-based version
# If Git, consider that Linux dynamic libraries will have full messy name, MacOSX will not
# https://stackoverflow.com/questions/43526939/how-to-insert-git-based-version-in-autoconf-managed-project
AC_INIT([NCO netCDF Operators],[4.7.1],[nco-bugs@lists.sourceforge.net],[nco])
AC_INIT([NCO netCDF Operators],[4.7.2],[nco-bugs@lists.sourceforge.net],[nco])
#AC_INIT([NCO netCDF Operators],m4_esyscmd([git describe --abbrev=7 --dirty --always --tags | tr -d '\n']),[nco-bugs@lists.sourceforge.net],[nco])
# Print GNU copyright in configure script
......
This diff is collapsed.
......@@ -627,7 +627,13 @@ variables:
char_var_space:long_name = "Character variable with whitespace on ends";
char char_var_nul;
char_var_nul:long_name = "Character variable containing one NUL";
char_var_nul:long_name = "Character variable containing one NUL specified as empty string: \"\"";
char char_var_nul_c_format;
char_var_nul_c_format:long_name = "Character variable containing one NUL specified in C-format: \'\\0\'";
char char_var_zero;
char_var_zero:long_name = "Character variable containing zero";
char char_var_1D_arr(time);
char_var_1D_arr:long_name = "char-type 1D variable array";
......@@ -799,6 +805,13 @@ variables:
att_var_spc_chr:hyphen_in_name- = "foo";
att_var_spc_chr:at_in_name@ = "foo";
// Purpose test special chars in char atts
int att_sng;
att_sng:nul_sng = '\0';
att_sng:empty_sng = "";
att_sng:space_sng = " ";
att_sng:zero_sng = "0";
int bnd_var(lev,bnd);
bnd_var:byte_att = '\0';
bnd_var:char_att = "Sentence one.\nSentence two.\n";
......@@ -1342,6 +1355,7 @@ data:
att_var=10.0,10.1,10.20,10.3000,10.40101,10.500001,10.60000001,10.7000001,10.80,10.9900;
att_var_jsn=73;
att_var_spc_chr=73;
att_sng=20;
area=10.,10.;
area2=20.,5.;
area_asm=1.,2.;
......@@ -1366,11 +1380,20 @@ data:
// 20131015: This confuses the XML parser
// char_var_multinul="\b\n\0";
// char_var_multinul='0','\n','\0';
char_var_nul='\0';
// 20180111: Historically we specified char_var_nul as '\0'
// However, ncgen apparently turns '\0' into a zero
// "correct" (meaning ncgen-supported) way to specify a scalar NUL character is with ""
// As of today we specify char_var_nul as "" and char_var_nul_c_format as '\0'
// char_var_nul_c_format indicates what happens when specifying characters in C-format
// I think ncgen should support C-format byte codes for characters, though ncgen does not yet do so correctly
char_var_nul="";
char_var_nul_c_format='\0';
char_var_zero="0";
char_var_space=" ";
char_var_1D_arr="two words";
char_var_2D_arr="one","two";
cnv_CF_grd=1,2,3,4,5,6,7,8;
albers_conical_equal_area="";
cnv_CF_crd=273.1,273.2,273.3,273.4,273.5,273.6,273.7,273.8;
cnv_CF_ncl=1.,2.,3.,4.,5.,6.,7.,8.,9.,10.;
cnv_CF_ncl_var_1=11.,22.,23.,24.,25.,26.,27.,28.,29.,30.;
......
This diff is collapsed.
This diff is collapsed.
nco (4.7.1-2) UNRELEASED; urgency=medium
nco (4.7.2-1) unstable; urgency=medium
* New upstream release.
* Update copyright-format URL to use HTTPS.
* Bump Standards-Version to 4.1.3, no changes.
* Update copyright years for Charlie Zender.
* Add lintian overrides for binary-without-manpage.
* Strip trailing whitespace from changelog file.
-- Bas Couwenberg <sebastic@debian.org> Sat, 20 Jan 2018 22:22:59 +0100
-- Bas Couwenberg <sebastic@debian.org> Thu, 25 Jan 2018 20:04:04 +0100
nco (4.7.1-1) unstable; urgency=medium
......