Title: DISTRI'C'O'
1DISTRI.C.O.
- The new GRIB distribution system at CNMCA
- Presented by Capt. Enrico FUCILE
2Overview
- Introduction
- System requirements
- System description
- GRIB Database
- PHP Classes Library
- WEB Interface
- Future development
3Introduction
- DISTRIbuzione Catena Operativa (Distribution
Operational Suite) - A kind of post-processing of the GRIB data
produced by the numerical models is needed to
fulfil the requests of the internal and external
users - Delivering of processed products to users must be
controlled and should be easy to configure and
modify
4System requirements
- Transformation of GRIB data from a grid to
another one (e.g. from a rotated lat-lon grid to
a geographical lat-lon grid) - Interpolation, rotation and extraction of
single point data from a GRIB file - Processing a large number of GRIB files
5System requirements
- Distribution of processed GRIB to users
- Freandly graphical interface for the operator
- Easy access to system facilities through a
scripting language - Graphical real time control of the activities
(processing and distribution)
6System description
WEB client
Filesystem
WEB PHP Server Pages
PHP classes library
PHP Scripts for loading
PHP Scripts for processing
USERS
PHP Scripts for distribution
7GRIB Database
- Represents operational production cycle
(separation of the database in two areas static
and dynamic) - Implements distribution logic (users are
important entities of the database design phase)
8GRIB Database
Registered products (static)
Products (dynamic)
Users
9Why PHP ?
- Simple syntax (smooth learning curve)
- Quick development (scripting language no
compilation, weakly typed language) - A lot of extensions available (gd, xml, network,
DB connectivity modules) - Easy to extend with compiled C code (easy reuse
of existing code and easy extension with high
performance routines for intensive calculations)
10Why PHP ?
- Allows object oriented syntax (good code
maintenance and extension) - Can be used both as independent scripting
language and embedded in a WEB server (a PHP
class library can be used both from operational
scripts and from Web server pages) - It is OPEN SOURCE
11PHP Classes Library
GRIB DECODING include(grib.inc) grib new
GRIB grib-gtWith(parameterid,11) grib-gtWith(cen
terid,80) grib-gtWith(processid,2) grib-gtWith(l
evelid,110) while (grib-gtDBGetNext())
grib-gtDecode() grib-gtPrintPDS()
grib-gtPrintGDS() grib-gtUnpack() for (i
0 ilt20 i) print
grib-gtfieldi
12PHP Classes Library
VALID PARAMETERS parameterid tableid centerid p
rocessid gridid levelid level1 level2 bitmapid
run timeid timeunitid time1 time2 latfirst lat
last lonfirst lonlast ni nj di dj latpole l
onpole rotation pojection scanmode ref_date
13PHP Classes Library
INTERPOLATION include(grib.inc) grib new
GRIB grib-gtWith(parameterid,11) grib-gtWith(cen
terid,80) grib-gtWith(processid,2) grib-gtWith(l
evelid,110) while (grib-gtDBGetNext())
grib-gtSetNewGrid(new_grid_id)
grib-gtIntepolate() grib-gtDBPut()
14Why WEB interface ?
- Central administration and control
- Easy access from any operating system
- Security policy (single machine access can be
controlled through IP address) - Apache WEB server is OPEN SOURCE
- Further development of interface can be done
without any installation on client machines - Scalability and portability
15Future development
- Elaboration of gaussian grids and spherical
harmonics - Simple mathematical operators for GRIB objects
- Development of a tool for automatic inclusion of
C and Fortran code into the PHP parser - Inclusion of MAGICS routines into the PHP
language