Commit 939e3e7c authored by MAISSIAT's avatar MAISSIAT
Browse files

Add Grib Plugin

parent 59207834
......@@ -44,6 +44,7 @@
<xs:enumeration value='RegexpDataReader'/>
<xs:enumeration value='DirRegexpDataReader'/>
<xs:enumeration value='NetCDFDataReader'/>
<xs:enumeration value='GribDataReader'/>
</xs:restriction>
</xs:simpleType>
......
......@@ -282,6 +282,10 @@
onchange="checkRegexpDataReader();" value="NetCDFDataReader"
{% if file_data.data_source.date_extraction.attrib.plugin == "NetCDFDataReader" %} checked {% endif %}>
Extract from a NetCDF global attribute</input></br>
<input type="radio" name="data_reader" id="GribDataReader"
onchange="checkRegexpDataReader();" value="GribDataReader"
{% if file_data.data_source.date_extraction.attrib.plugin == "GribDataReader" %} checked {% endif %}>
Extract the forecast date from a GRIB</input></br>
</div>
</div>
</div>
......@@ -384,6 +388,30 @@
</div>
</div>
<div id="dataGribDataReader" style="margin-bottom: 40%;">
<div class="control-group">
<label for="metadata" class="control-label"> </label>
<div class="well span6" style="width: 500px;">
<div id="file_name_cg" class="control-group">
<label class="control-label">
Test the sensing time extraction by entering a Grib local filepath</label>
<div class="controls">
<input onmouseout="grib();" onchange="grib();" onkeyup="grib();"
class="input-xlarge" type="text" id="grib_file" />
<!-- not empty msg err -->
<span id="file_name_cg_err" class="pull-right help-inline hide">Required</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Step 3 : Selection ======================================================== -->
......@@ -1702,6 +1730,7 @@
var _REGEXP_DATA_READER_ = "RegexpDataReader";
var _DIRREGEXP_DATA_READER_ = "DirRegexpDataReader";
var _NetCDF_DATA_READER_ = "NetCDFDataReader";
var _GRIB_DATA_READER_ = "GribDataReader";
var _BAD_TEST_ = "bad_test";
var _NO_DATE_ = "no_date";
......@@ -1720,6 +1749,7 @@
hideNetCDFDataReaderChecker();
hideRegexpDataReaderChecker();
hideGribReaderChecker();
if ( number == _REGEXP_DATA_READER_
|| number == _DIRREGEXP_DATA_READER_) {
......@@ -1728,6 +1758,9 @@
if (number == _NetCDF_DATA_READER_) {
displayNetCDFDataReaderChecker();
}
if (number == _GRIB_DATA_READER_) {
displayGribDataReaderChecker();
}
if (number == _DIRREGEXP_DATA_READER_) {
displaySAFEChecker();
} else {
......@@ -1755,6 +1788,14 @@
$('#dataNetCDFDataReader').fadeOut();
}
function displayGribDataReaderChecker() {
$('#dataGribDataReader').fadeIn().show();
}
function hideGribDataReaderChecker() {
$('#dataGribDataReader').fadeOut();
}
function displaySAFEChecker() {
$('#dataSAFE').fadeIn().show();
}
......@@ -1782,11 +1823,17 @@
}
function netcdf() {
var filename = $("#netcdf_file").val();
var netcdfdate = $("#netcdf_date").val();
var strfdate = $("#date_format").val();
var strfpath = $("#storage_path").val();
}
function grib() {
var filename = $("#grib_file").val();
var strfpath = $("#storage_path").val();
}
function regexp() {
var filename = $("#regexp_file").val();
......
......@@ -9,23 +9,7 @@ import simplejson
# Get settings from environment variables
# -----------------------------------------------------------------------------
"""
if 'DOWNLOADER_WORKSPACE' not in os.environ:
raise Exception('Missing DOWNLOADER_WORKSPACE environment variable.')
if not os.path.exists(os.environ['DOWNLOADER_WORKSPACE']):
raise Exception('Downloader worspace directory %s not found.' % os.environ['DOWNLOADER_WORKSPACE'])
WORKSPACE = os.environ.get('DOWNLOADER_WORKSPACE', '')
if 'DOWNLOADER_APPDATA' not in os.environ:
raise Exception('Missing DOWNLOADER_APPDATA environment variable.')
if not os.path.exists(os.environ['DOWNLOADER_APPDATA']):
raise Exception('Downloader application data directory %s not found.' % os.environ['DOWNLOADER_APPDATA'])
APPDATA = os.environ.get('DOWNLOADER_APPDATA', '')
if 'FELYX_CELERY_CFG' not in os.environ:
raise Exception('Missing FELYX_CELERY_CFG environment variable.')
if not os.path.exists(os.environ['FELYX_CELERY_CFG']):
raise Exception('Felyx Celery configuration file %s not found.' % os.environ['FELYX_CELERY_CFG'])
"""
if 'CELERY_CFG' not in os.environ:
raise Exception('Missing CELERY_CFG environment variable.')
if not os.path.exists(os.environ['CELERY_CFG']):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment