Git Product home page Git Product logo

adaguc-checker's Introduction

ADAGUC / adaguc-checker

This checker extends the existing cfchecker by Rosalyn Hatcher (NCAS-CMS, Univ. of Reading, UK) at https://github.com/cedadev/cf-checker by extending the CFChecker class through inheritance.

Usage information will follow when the original checker's command line argument passing is merged with the ADAGUC specific command line argument parsing.

Getting started

Prerequisites

For the moment, you need a compiled binary of adaguc-server with the reporting capability. The output is not very meaningful as of yet. You can get adaguc-server with reporting capability here: https://github.com/saskiawagenaar/adaguc-server

Create a python virtual environment and initialize it.

virtualenv ./env-cf-checker
source ./env-cf-checker/bin/activate

Clone the existing checker repository:

git clone https://github.com/cedadev/cf-checker.git

or install it through pip:

pip install cfchecker

Pillow is also needed for some image processing. Install it with pip in the virtual environment:

pip install Pillow

Running the software

Assuming that the autowms toplevel directory is /data/autowms:

export INPUT_DIR=/tmp
export OUTPUT_DIR=/tmp
./adaguc-checker.py --checks=adaguc /nobackup/users/neutvd/data/autowms/S-O3M_GOME_ARP_02_M01_20171015063857Z_20171015073557Z_N_O_20171015134801Z.nc
CHECKING NetCDF FILE: /nobackup/users/neutvd/data/autowms/S-O3M_GOME_ARP_02_M01_20171015063857Z_20171015073557Z_N_O_20171015134801Z.nc
=====================
Using CF Checker Version 3.0.5
Checking against CF Version CF-1.6
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Area Type Table Version 6 (22 February 2017)

Checking ADAGUC extensions

For now it is required that the file is located in the autowms directory of the adaguc-server and you must also supply the full path to the file on the command line. This is to satisfy both adaguc-server and the cfchecker library dependency.

If you wish to keep the images generated for all layers. Supply the --imagedir command line option:

$ ./adaguc-checker.py --checks=adaguc --imagedir=./ /nobackup/users/neutvd/data/autowms/S-O3M_GOME_ARP_02_M01_20171019065654Z_20171019075354Z_N_O_20171019144803Z.nc > output.json

The above command also redirects the JSON output to a file named output.json. Images are stored in the current directory with the following naming scheme input_filename.layername.png where the .nc extension is stripped from the input filename.

When using the adaguc-server docker started from the start-docker.sh script you probably want to supply the --baseurl command line arguement to set the base url to http://localhost:8090/adaguc-services/adagucserver?. The default is set for use in conjunction with a separate WPS wrapper using 2 docker instances in a network. Example:

./adaguc-checker.py --baseurl='http://localhost:8090/adaguc-services/adagucserver?'  --checks=adaguc --imagedir=./ /nobackup/users/neutvd/data/autowms/S-O3M_GOME_ARP_02_M01_20171019065654Z_20171019075354Z_N_O_20171019144803Z.nc

Running ADAGUC as Docker container

Configure

mkdir /tmp/input_dir
chmod 777 /tmp/input_dir
mkdir /tmp/output_dir
chmod 777 /tmp/output_dir

check adguc-checker.env: directories $INPUT_DIR and $OUTPUT_DIR should exist and have mods 777

source adaguc_checker.env

Build ADAGUC server docker image

git clone [email protected]:saskiawagenaar/adaguc-server.git  # For now, should be ADAGUC repo.
cd adaguc-server
git checkout checker

docker build -t $ADAGUC_CHECKER_IMAGE .
./start-docker-adaguc-checker                # maybe "docker rm adaguc-checker" first

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.