Charlie,
A form of "dismember" is useful not only for checking for CF, but for easily converting files to be usable by legacy tools that currently support only netCDF3 and netCDF4 Classic Model. As such, it may provide a critical on-ramp for the successful adoption to bridge the flat-earthers, sorry, flat netcdf-ers (like me) with the newer hierarchical capability.
On Sep 26, 2013, at 11:23 PM, Charlie Zender <zender at uci.edu>
wrote:
> Hi All,
>
> Some users at NASA have to flatten their hierarchical files so that
> the constituent groups can be checked for CF-compliance with standard
> CF checkers that are not "group-aware". This can be painful if done by
> "brute force": ncdump (or h5dump), strip out group info, rebuild each
> group as flat netCDF3, pass to a checker. To accelerate this procedure
> I've modified the script I mentioned earlier so it can call cfchecker:
>
> http://nco.sf.net/nco.html#dismember
>
> ncdismember is a script that calls ncks to extract each leaf group
> into a netCDF3 file, as expected by most compliance checkers.
> It calls cfchecker when invoked with an optional third argument of
> 'cf'. An example follows. Thanks to the Juelich group for making
> cfchecker so painless to intall!
>
> Enjoy,
> cz
>
> Dismembering:
> zender at roulee:~$ ncdismember ~/nco/data/mdl.nc /data/zender/nco/tmp
> Dismembering file /home/zender/nco/data/mdl.nc into following files:
> /data/zender/nco/tmp/cesm.cesm_01.nc
> /data/zender/nco/tmp/cesm.cesm_02.nc
> /data/zender/nco/tmp/ecmwf.ecmwf_01.nc
> /data/zender/nco/tmp/ecmwf.ecmwf_02.nc
>
> Dismembering followed by cfchecker compliance check:
> zender at roulee:~$ ncdismember ~/nco/data/mdl.nc /data/zender/nco/tmp cf
> Dismembering file /home/zender/nco/data/mdl.nc into following files:
> /data/zender/nco/tmp/cesm.cesm_01.nc
> WARNING: Using the default (non-CF) Udunits database
> /data/zender/nco/tmp/cesm.cesm_01.nc:
> INFO: INIT: running CFchecker version 1.5.15
> INFO: INIT: checking compliance with convention CF-1.5
> INFO: INIT: using standard name table version: 25, last modified:
> 2013-07-05T05:40:30Z
> INFO: INIT: using area type table version: 2, date: 10 July 2013
> INFO: 2.4: no axis information found in dimension variables, not
> checking dimension order
> WARNING: 3: variable "tas" contains neither long_name nor standard_name
> attribute
> INFO: 3.1: variable "tas" does not contain units attribute
> --------------------------------------------------
> total files: 1, OK: 0, with warnings: 1, with errors: 0
> /data/zender/nco/tmp/cesm.cesm_02.nc
> WARNING: Using the default (non-CF) Udunits database
> ...
>
> --
> Charlie Zender, Earth System Sci. & Computer Sci.
> University of California, Irvine 949-891-2429 )'(
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
--
Christopher Lynnes
"The future is already here ? it's just not very evenly distributed." - Wm. Gibson
Received on Fri Sep 27 2013 - 06:58:58 BST