Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Validate the structure and metadata content of GSICS CF-netCDF files

Notifications You must be signed in to change notification settings

ajelenak/gsics-metadata-validator

Repository files navigation

GSICS Metadata Validator

What is This?

This repository holds ISO Schematron files that implement the conformance testing suite for GSICS CF-netCDF files. The tests validate both the structure and the metadata content of these files.

Also included are two bash scripts: sch2xslt.sh and validate.sh. The first script translates the Schematron files (.sch) into the form the second script can utilize for validation.

Prerequisites

  • Java virtual machine version 1.4 or later
  • Saxon-HE for Java
  • ncdump command-line program that can produce NcML output if validating local netCDF files
  • curl command-line program if validating netCDF files via URLs
  • XSLT 2.0 implementation of the ISO Schematron

Installation

No special installation is required beyond setting up the prerequisites and knowing the location of the GSICS Schematron files. The two bash scripts are independent from the run location. For their specific instructions invoke the scripts with the -h option.

How to Use

The conformance tests are implemented in a modular fashion. The gsics-ncml-base.sch file contains abstract pattern definitions of almost all the content objects expected in GSICS netCDF files: global attribute (generic, geospatial, datetime), dimension, and variable. These abstract patterns comprise of ISO Schematron rules that check for presence and various metadata properties of those objects.

The gsics-geoleoir-common.sch file uses the abstract patterns from gsics-ncml-base.sch file and implements the conformance tests for the content required to appear in all GSICS netCDF files of one product type, in this case the GEO-LEO-IR.

The producer-specific content is validated with the rules found in the gsics-nesdis-geoleoir.sch (for NESDIS) and gsics-jma-geoleoir.sch (for JMA) files. These two files also import all the tests from the gsics-geoleoir-common.sch file so they are the only Schematron files needed for complete validation of GSICS netCDF files from a particular data producer.

In order to use producer-specific Schematron files for conformance testing they need to be translated into XSLT 2.0 statements. This is the task of the sch2xslt.sh bash script. Once the Schematron rules are translated, the validate.sh bash script performs the actual validation. For more detailed information on how to use these scripts invoke them with the -h option.

About

Validate the structure and metadata content of GSICS CF-netCDF files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages