Remove the eccode prefix and revert to previous gribapi. Will revisit when merging with ecCodes

This commit is contained in:
Shahram Najm 2013-06-14 13:56:55 +01:00
parent 0dd424b03a
commit 9736050a61
28 changed files with 1163 additions and 1162 deletions

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
VERBOSE=1 # verbose error reporting
@ -20,16 +20,16 @@ def example():
out = open(sys.argv[2],'w')
while 1:
gid = new_from_file(f)
gid = grib_new_from_file(f)
if gid is None: break
message = get_message(gid)
message = grib_get_message(gid)
newgid = new_from_message(message)
write(newgid,out)
release(newgid)
newgid = grib_new_from_message(message)
grib_write(newgid,out)
grib_release(newgid)
release(gid)
grib_release(gid)
out.close()
f.close()
@ -37,7 +37,7 @@ def example():
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -12,7 +12,7 @@ import traceback
import sys
import random
from eccode import *
from gribapi import *
INPUT='../../data/constant_field.grib1'
OUTPUT='out.grib'
@ -22,23 +22,23 @@ def example():
fin = open(INPUT)
fout = open(OUTPUT,'w')
gid = new_from_file(fin)
gid = grib_new_from_file(fin)
nx = get(gid,'Ni')
ny = get(gid,'Nj')
nx = grib_get(gid,'Ni')
ny = grib_get(gid,'Nj')
for step in range(0,24,6):
clone_id = clone(gid)
set(clone_id,'step',step)
clone_id = grib_clone(gid)
grib_set(clone_id,'step',step)
values = [random.random() for i in range(nx*ny)]
set_values(clone_id,values)
grib_set_values(clone_id,values)
write(clone_id,fout)
release(clone_id)
grib_write(clone_id,fout)
grib_release(clone_id)
release(gid)
grib_release(gid)
fin.close()
fout.close()
@ -46,7 +46,7 @@ def example():
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/tigge_pf_ecmwf.grib2'
VERBOSE=1 # verbose error reporting
@ -19,8 +19,8 @@ VERBOSE=1 # verbose error reporting
def example():
f = open(INPUT)
mcount = count_in_file(f)
gid_list = [new_from_file(f) for i in range(mcount)]
mcount = grib_count_in_file(f)
gid_list = [grib_new_from_file(f) for i in range(mcount)]
f.close()
@ -41,24 +41,24 @@ def example():
print "processing message number",i+1
for key in keys:
print '%s=%g' % (key,get(gid,key))
print '%s=%g' % (key,grib_get(gid,key))
print 'There are %d, average is %g, min is %g, max is %g' % (
get_size(gid,'values'),
get(gid,'average'),
get(gid,'min'),
get(gid,'max')
grib_get_size(gid,'values'),
grib_get(gid,'average'),
grib_get(gid,'min'),
grib_get(gid,'max')
)
print '-'*100
release(gid)
grib_release(gid)
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,6 +1,3 @@
import traceback
import sys
# Copyright 2005-2013 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
@ -9,7 +6,10 @@ import sys
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
from eccode import *
import traceback
import sys
from gribapi import *
INPUT='../../data/reduced_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
@ -27,30 +27,30 @@ def example():
]
while 1:
gid = new_from_file(f)
gid = grib_new_from_file(f)
if gid is None: break
for key in keys:
if not is_defined(gid,key): raise Exception("Key was not defined")
print '%s=%s' % (key,get(gid,key))
if not grib_is_defined(gid,key): raise Exception("Key was not defined")
print '%s=%s' % (key,grib_get(gid,key))
if is_defined(gid,"A_very_silly_girl"): raise Exception("Key was defined")
if grib_is_defined(gid,"A_very_silly_girl"): raise Exception("Key was defined")
print 'There are %d values, average is %f, min is %f, max is %f' % (
get_size(gid,'values'),
get(gid,'average'),
get(gid,'min'),
get(gid,'max')
grib_get_size(gid,'values'),
grib_get(gid,'average'),
grib_get(gid,'min'),
grib_get(gid,'max')
)
release(gid)
grib_release(gid)
f.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys,os
from eccode import *
from gribapi import *
INPUT='../../data/index.grib'
VERBOSE=1 # verbose error reporting
@ -33,45 +33,45 @@ def example():
iid = None
if (os.path.exists(index_file)):
iid = index_read(index_file)
iid = grib_index_read(index_file)
else:
iid = index_new_from_file(INPUT,index_keys)
iid = grib_index_new_from_file(INPUT,index_keys)
# multiple files can be added to an index:
# index_add_file(iid,"grib file to add")
# grib_index_add_file(iid,"grib file to add")
index_write(iid,index_file)
grib_index_write(iid,index_file)
index_vals = []
for key in index_keys:
print "%sSize=%d" % (
key,
index_get_size(iid,key)
grib_index_get_size(iid,key)
)
key_vals = index_get(iid,key)
key_vals = grib_index_get(iid,key)
print " ".join(key_vals)
index_vals.append(key_vals)
for prod in product(*index_vals):
for i in range(len(index_keys)):
index_select(iid,index_keys[i],prod[i])
grib_index_select(iid,index_keys[i],prod[i])
while 1:
gid = new_from_index(iid)
gid = grib_new_from_index(iid)
if gid is None: break
print " ".join(["%s=%s" % (key,get(gid,key)) for key in index_keys])
release(gid)
print " ".join(["%s=%s" % (key,grib_get(gid,key)) for key in index_keys])
grib_release(gid)
index_release(iid)
grib_index_release(iid)
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/reduced_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
@ -20,16 +20,16 @@ def example():
f = open(INPUT)
while 1:
gid = new_from_file(f)
gid = grib_new_from_file(f)
if gid is None: break
iterid = iterator_new(gid,0)
iterid = grib_iterator_new(gid,0)
missingValue = get_double(gid,"missingValue")
missingValue = grib_get_double(gid,"missingValue")
i=0
while 1:
result = iterator_next(iterid)
result = grib_iterator_next(iterid)
if not result: break
[lat,lon,value] = result
@ -43,15 +43,15 @@ def example():
i += 1
iterator_delete(iterid)
release(gid)
grib_iterator_delete(iterid)
grib_release(gid)
f.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/reduced_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
@ -20,10 +20,10 @@ def example():
f = open(INPUT)
while 1:
gid = new_from_file(f)
gid = grib_new_from_file(f)
if gid is None: break
iterid = keys_iterator_new(gid,'ls')
iterid = grib_keys_iterator_new(gid,'ls')
# Different types of keys can be skipped
# grib_skip_computed(iterid)
@ -33,20 +33,20 @@ def example():
# grib_skip_read_only(iterid)
# grib_skip_function(iterid)
while keys_iterator_next(iterid):
keyname = keys_iterator_get_name(iterid)
keyval = get_string(iterid,keyname)
while grib_keys_iterator_next(iterid):
keyname = grib_keys_iterator_get_name(iterid)
keyval = grib_get_string(iterid,keyname)
print "%s = %s" % (keyname,keyval)
keys_iterator_delete(iterid)
release(gid)
grib_keys_iterator_delete(iterid)
grib_release(gid)
f.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/gts.bufr'
VERBOSE=1 # verbose error reporting
@ -23,30 +23,30 @@ def example():
bid = bufr_new_from_file(f)
if bid is None: break
iterid = keys_iterator_new(bid)
iterid = grib_keys_iterator_new(bid)
# Different types of keys can be skipped
# skip_computed(iterid)
# skip_coded(iterid)
# skip_edition_specific(iterid)
# skip_duplicates(iterid)
# skip_read_only(iterid)
# skip_function(iterid)
# grib_skip_computed(iterid)
# grib_skip_coded(iterid)
# grib_skip_edition_specific(iterid)
# grib_skip_duplicates(iterid)
# grib_skip_read_only(iterid)
# grib_skip_function(iterid)
while keys_iterator_next(iterid):
keyname = keys_iterator_get_name(iterid)
keyval = get_string(iterid,keyname)
while grib_keys_iterator_next(iterid):
keyname = grib_keys_iterator_get_name(iterid)
keyval = grib_get_string(iterid,keyname)
print "%s = %s" % (keyname,keyval)
keys_iterator_delete(iterid)
release(bid)
grib_keys_iterator_delete(iterid)
grib_release(bid)
f.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/gts.bufr'
VERBOSE=1 # verbose error reporting
@ -23,27 +23,27 @@ def example():
bid = gts_new_from_file(f)
if bid is None: break
iterid = keys_iterator_new(bid)
iterid = grib_keys_iterator_new(bid)
# Different types of keys can be skipped
# skip_computed(iterid)
# skip_coded(iterid)
# skip_read_only(iterid)
# grib_skip_computed(iterid)
# grib_skip_coded(iterid)
# grib_skip_read_only(iterid)
while keys_iterator_next(iterid):
keyname = keys_iterator_get_name(iterid)
keyval = get_string(iterid,keyname)
while grib_keys_iterator_next(iterid):
keyname = grib_keys_iterator_get_name(iterid)
keyval = grib_get_string(iterid,keyname)
print "%s = %s" % (keyname,keyval)
keys_iterator_delete(iterid)
release(bid)
grib_keys_iterator_delete(iterid)
grib_release(bid)
f.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/sample.grib2'
OUTPUT='out.grib'
@ -21,25 +21,25 @@ def example():
fin = open(INPUT)
fout = open(OUTPUT,'w')
gid = new_from_file(fin)
gid = grib_new_from_file(fin)
mgid = multi_new()
mgid = grib_multi_new()
for step in range(12,132,12):
set(gid,"step",step)
multi_append(gid,4,mgid)
grib_set(gid,"step",step)
grib_multi_append(gid,4,mgid)
multi_write(mgid,fout)
grib_multi_write(mgid,fout)
multi_release(mgid)
release(gid)
grib_multi_release(mgid)
grib_release(gid)
fin.close()
fout.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/reduced_gaussian_lsm.grib1'
VERBOSE=1 # verbose error reporting
@ -20,27 +20,27 @@ def example():
points = ((30,-20),(13,234))
f = open(INPUT)
gid = new_from_file(f)
gid = grib_new_from_file(f)
for lat,lon in points:
nearest = find_nearest(gid,lat,lon)[0]
nearest = grib_find_nearest(gid,lat,lon)[0]
print lat,lon
print nearest.lat,nearest.lon,nearest.value,nearest.distance,nearest.index
four = find_nearest(gid,lat,lon,is_lsm = False,npoints = 4)
four = grib_find_nearest(gid,lat,lon,is_lsm = False,npoints = 4)
for i in range(len(four)):
print "- %d -" % i
print four[i]
print "-"*100
release(gid)
grib_release(gid)
f.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,31 +11,31 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/regular_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
def example():
f = open(INPUT)
gid = new_from_file(f)
gid = grib_new_from_file(f)
values = get_values(gid)
values = grib_get_values(gid)
for i in xrange(len(values)):
print "%d %.10e" % (i+1,values[i])
print '%d values found in %s' % (len(values),INPUT)
for key in ('max','min','average'):
print '%s=%.10e' % (key,get(gid,key))
print '%s=%.10e' % (key,grib_get(gid,key))
release(gid)
grib_release(gid)
f.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,14 +11,14 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/tp_ecmwf.grib'
OUTPUT='out.grib'
VERBOSE=1 # verbose error reporting
def example():
sample_id = new_from_samples("regular_ll_sfc_grib1")
sample_id = grib_new_from_samples("regular_ll_sfc_grib1")
fin = open(INPUT)
fout = open(OUTPUT,'w')
@ -34,10 +34,10 @@ def example():
prev_vals = None
while 1:
gid = new_from_file(fin)
gid = grib_new_from_file(fin)
if gid is None: break
curr_vals = get_values(gid)
curr_vals = grib_get_values(gid)
if prev_vals is None:
result = prev_vals = curr_vals
@ -54,16 +54,16 @@ def example():
keys['startStep'] += 12
keys['endStep'] += 12
clone_id = clone(sample_id)
clone_id = grib_clone(sample_id)
for key in keys:
set(clone_id,key,keys[key])
grib_set(clone_id,key,keys[key])
set_values(clone_id,result * 1000)
grib_set_values(clone_id,result * 1000)
write(clone_id,fout)
grib_write(clone_id,fout)
release(gid)
grib_release(gid)
fin.close()
fout.close()
@ -71,7 +71,7 @@ def example():
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,6 +1,3 @@
import traceback
import sys
# Copyright 2005-2013 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
@ -9,7 +6,10 @@ import sys
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
from eccode import *
import traceback
import sys
from gribapi import *
from datetime import date
INPUT='../../data/regular_latlon_surface_constant.grib1'
@ -19,16 +19,16 @@ VERBOSE=1 # verbose error reporting
def example():
fin = open(INPUT)
fout = open(OUTPUT,'w')
gid = new_from_file(fin)
gid = grib_new_from_file(fin)
dt = date.today()
today = "%d%02d%02d" % (dt.year,dt.month,dt.day)
set(gid,'dataDate',int(today))
set(gid,'centre',80)
grib_set(gid,'dataDate',int(today))
grib_set(gid,'centre',80)
centreIntVal = get(gid,'centre',int)
centreStrVal = get(gid,'centre',str)
dateStrVal = get(gid,'dataDate',str)
centreIntVal = grib_get(gid,'centre',int)
centreStrVal = grib_get(gid,'centre',str)
dateStrVal = grib_get(gid,'dataDate',str)
assert(centreIntVal == 80)
assert(centreStrVal == 'cnmc')
assert(dateStrVal == today)
@ -37,30 +37,30 @@ def example():
print 'get date as a string - date = %s' % dateStrVal
# Now do the same but using set_key_vals, setting keys all at once
set_key_vals(gid, 'level=1,centre=98') # with a String
assert(get(gid,'centre',str) == 'ecmf')
assert(get(gid,'level',int) == 1)
grib_set_key_vals(gid, 'level=1,centre=98') # with a String
assert(grib_get(gid,'centre',str) == 'ecmf')
assert(grib_get(gid,'level',int) == 1)
set_key_vals(gid, ['level=2', 'centre=kwbc']) # with a Tuple
assert(get(gid,'centre',int) == 7)
assert(get(gid,'level',int) == 2)
grib_set_key_vals(gid, ['level=2', 'centre=kwbc']) # with a Tuple
assert(grib_get(gid,'centre',int) == 7)
assert(grib_get(gid,'level',int) == 2)
set_key_vals(gid, {'level': 3, 'centre': 84}) # with a Dictionary
assert(get(gid,'centre',str) == 'lfpw')
assert(get(gid,'level',int) == 3)
grib_set_key_vals(gid, {'level': 3, 'centre': 84}) # with a Dictionary
assert(grib_get(gid,'centre',str) == 'lfpw')
assert(grib_get(gid,'level',int) == 3)
gts_header(True)
gts_header(False)
grib_gts_header(True)
grib_gts_header(False)
write(gid,fout)
release(gid)
grib_write(gid,fout)
grib_release(gid)
fin.close()
fout.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,6 +1,3 @@
import traceback
import sys
# Copyright 2005-2013 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
@ -9,7 +6,9 @@ import sys
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
from eccode import *
import traceback
import sys
from gribapi import *
INPUT = '../../data/regular_latlon_surface.grib1'
OUTPUT = 'out.grib'
@ -19,33 +18,33 @@ VERBOSE = 1 # verbose error reporting
def example():
fin = open(INPUT)
fout = open(OUTPUT,'w')
gid = new_from_file(fin)
gid = grib_new_from_file(fin)
set(gid,'missingValue', MISSING)
values = get_values(gid)
set(gid, 'bitmapPresent', 1)
grib_set(gid,'missingValue', MISSING)
values = grib_get_values(gid)
grib_set(gid, 'bitmapPresent', 1)
# Change some data values to be missing
num_missing = 0
for i in range(100):
if i % 2 == 0:
values[i] = MISSING
num_missing += 1
set_values(gid, values)
grib_set_values(gid, values)
# Check counts of missing and non-missing values
num_data = get(gid,'numberOfDataPoints',int)
assert(get(gid,'numberOfCodedValues',int) == num_data-num_missing)
assert(get(gid,'numberOfMissing',int) == num_missing)
num_data = grib_get(gid,'numberOfDataPoints',int)
assert(grib_get(gid,'numberOfCodedValues',int) == num_data-num_missing)
assert(grib_get(gid,'numberOfMissing',int) == num_missing)
write(gid,fout)
release(gid)
grib_write(gid,fout)
grib_release(gid)
fin.close()
fout.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
INPUT='../../data/tigge/tigge_ecmf_pl_t.grib'
OUTPUT='out.grib'
@ -21,23 +21,23 @@ def example():
fin = open(INPUT)
fout = open(OUTPUT,'w')
gid = new_from_file(fin)
gid = grib_new_from_file(fin)
# set type of level to surface
set(gid,'typeOfFirstFixedSurface','sfc')
set_missing(gid,'scaleFactorOfFirstFixedSurface')
set_missing(gid,'scaledValueOfFirstFixedSurface')
grib_set(gid,'typeOfFirstFixedSurface','sfc')
grib_set_missing(gid,'scaleFactorOfFirstFixedSurface')
grib_set_missing(gid,'scaledValueOfFirstFixedSurface')
write(gid,fout)
grib_write(gid,fout)
release(gid)
grib_release(gid)
fin.close()
fout.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -11,7 +11,7 @@
import traceback
import sys
from eccode import *
from gribapi import *
VERBOSE=1 # verbose error reporting
@ -31,20 +31,20 @@ def example():
fout = open('out.grib1','w')
gid = grib_new_from_samples('reduced_gg_sfc_grib1')
set(gid,'typeOfLevel','hybrid')
set(gid,'level',2)
set(gid,'PVPresent',1)
set_array(gid,'pv',pv)
grib_set(gid,'typeOfLevel','hybrid')
grib_set(gid,'level',2)
grib_set(gid,'PVPresent',1)
grib_set_array(gid,'pv',pv)
write(gid,fout)
grib_write(gid,fout)
release(gid)
grib_release(gid)
fout.close()
def main():
try:
example()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -65,17 +65,17 @@ if( GRIB_API_PYTHON )
include_directories( ${PYTHON_INCLUDE_PATH} )
set_source_files_properties( eccode_swig.i PROPERTIES C ON )
set_source_files_properties( gribapi_swig.i PROPERTIES C ON )
swig_add_module( eccode_swig python grib_interface.h grib_interface.c eccode_swig.i )
swig_add_module( gribapi_swig python grib_interface.h grib_interface.c gribapi_swig.i )
swig_link_libraries( eccode_swig grib_api ${PYTHON_LIBRARIES} )
swig_link_libraries( gribapi_swig grib_api ${PYTHON_LIBRARIES} )
set(PYTHON_DEST "lib/python${PYTHON_VERSION}/site-packages" )
install(TARGETS _eccode_swig DESTINATION ${PYTHON_DEST} )
install(TARGETS _gribapi_swig DESTINATION ${PYTHON_DEST} )
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eccode_swig.py DESTINATION ${PYTHON_DEST})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gribapi_swig.py DESTINATION ${PYTHON_DEST})
endif()

View File

@ -4,25 +4,25 @@ if CREATING_SHARED_LIBS
###############################################################################
# Case when shared libraries are enabled
###############################################################################
pkgpyexec_LTLIBRARIES = _eccode_swig.la
pkgpyexec_LTLIBRARIES = _gribapi_swig.la
_eccode_swig_la_SOURCES = eccode_swig_wrap.c grib_interface.c grib_interface.h
_eccode_swig_la_LIBADD = $(top_builddir)/src/libgrib_api.la $(PYTHON_LIBS)
_eccode_swig_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS)
_gribapi_swig_la_SOURCES = gribapi_swig_wrap.c grib_interface.c grib_interface.h
_gribapi_swig_la_LIBADD = $(top_builddir)/src/libgrib_api.la $(PYTHON_LIBS)
_gribapi_swig_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS)
INCLUDES = $(PYTHON_INCLUDES) -I$(NUMPY_INCLUDE)
eccode_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c eccode_swig_wrap.c
gribapi_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c gribapi_swig_wrap.c
eccode_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py eccode_swig.py
gribapi_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py gribapi_swig.py
# Extra stuff to go into the distribution
EXTRA_DIST = grib_interface.h \
grib_interface.c \
eccode_swig.i \
eccode.py \
gribapi_swig.i \
gribapi.py \
numpy.i \
grib_errors.h \
extrules.am \
@ -34,13 +34,13 @@ EXTRA_DIST = grib_interface.h \
# What else I want installed
pkgpyexec_DATA = \
eccode.py \
eccode_swig.py
gribapi.py \
gribapi_swig.py
CLEANFILES = \
eccode_swig_wrap.c \
eccode_swig.py \
_eccode_swig.la
gribapi_swig_wrap.c \
gribapi_swig.py \
_gribapi_swig.la
include $(DEVEL_RULES)
@ -52,16 +52,16 @@ else
noinst_SCRIPTS = setup.py
CLEANFILES = $(noinst_SCRIPTS) \
eccode_swig_wrap.c \
eccode_swig.py \
_eccode_swig.so
gribapi_swig_wrap.c \
gribapi_swig.py \
_gribapi_swig.so
# Extra stuff to go into the distribution
EXTRA_DIST = setup.py.in \
grib_interface.h \
grib_interface.c \
eccode_swig.i \
eccode.py \
gribapi_swig.i \
gribapi.py \
numpy.i \
grib_errors.h \
extrules.am \
@ -72,11 +72,11 @@ EXTRA_DIST = setup.py.in \
swig_wrap_numpy.py
# What I want installed
pdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/eccode
pdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/grib_api
p_DATA = \
_eccode_swig.so \
eccode.py \
eccode_swig.py
_gribapi_swig.so \
gribapi.py \
gribapi_swig.py
do_subst = sed -e 's,[@]LIB_JASPER[@],$(LIB_JASPER),g' \
-e 's,[@]JASPER_DIR[@],$(JASPER_DIR),g' \
@ -92,13 +92,13 @@ clean-local:
setup.py: setup.py.in
$(do_subst) < setup.py.in > setup.py
eccode_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c eccode_swig_wrap.c
gribapi_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c gribapi_swig_wrap.c
eccode_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py eccode_swig.py
gribapi_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py gribapi_swig.py
_eccode_swig.so: setup.py eccode_swig_wrap.c eccode_swig.py
_gribapi_swig.so: setup.py gribapi_swig_wrap.c gribapi_swig.py
$(PYTHON) setup.py build_ext --inplace
include $(DEVEL_RULES)

View File

@ -1,8 +1,8 @@
swig : eccode_swig.i
swig : gribapi_swig.i
p4 edit swig_wrap_numpy.c swig_wrap_numpy.py swig_wrap_array.c swig_wrap_array.py
swig -python -module eccode_swig -DNUMPY -o swig_wrap_numpy.c eccode_swig.i
cp eccode_swig.py swig_wrap_numpy.py
swig -python -module gribapi_swig -DNUMPY -o swig_wrap_numpy.c gribapi_swig.i
cp gribapi_swig.py swig_wrap_numpy.py
swig -python -module eccode_swig -o swig_wrap_array.c eccode_swig.i
cp eccode_swig.py swig_wrap_array.py
swig -python -module gribapi_swig -o swig_wrap_array.c gribapi_swig.i
cp gribapi_swig.py swig_wrap_array.py

File diff suppressed because it is too large Load Diff

View File

@ -70,6 +70,7 @@ int grib_c_get_string_length(int* gid, char* key, size_t* OUTPUT);
int grib_c_clone(int* gid,int* INOUT);
int grib_c_copy_namespace(int* gid, char* name, int* INPUT);
int grib_c_get_message_size(int* gid, size_t* OUTPUT);
int grib_c_get_message_offset(int* gid, size_t* OUTPUT);
int grib_c_get_native_type(int* gid, char* key, int* OUTPUT);
// ---
@ -134,6 +135,7 @@ int grib_c_set_long_array(int* gid, char* key, long* val, int* size);
int grib_c_get_real8_element(int* gid, char* key, int* INPUT, double* OUTPUT);
int grib_c_get_real8_elements(int* gid, char* key, int* index, double* val, int* size);
int grib_c_set_missing(int* gid, char* key);
int grib_c_set_key_vals(int* gid, char* keyvals);
int grib_c_is_missing(int* gid, char* key, int* OUTPUT);
int grib_c_is_defined(int* gid, char* key, int* OUTPUT);

View File

@ -4,7 +4,7 @@ from distutils.core import setup, Extension
import os,sys
attdict = dict(
sources = ['eccode_swig_wrap.c','grib_interface.c'],
sources = ['gribapi_swig_wrap.c','grib_interface.c'],
swig_opts = [],
include_dirs = ['.'],
library_dirs = ["%s/lib" % sys.prefix],
@ -14,6 +14,7 @@ attdict = dict(
add_attribute = lambda **args: [list.append(attdict[key],value) for key,value in args.items()]
# assumes build_dir is same as source_dir -- not true for cmake builds
build_dir = '@BUILD_DIR@'
add_attribute(
include_dirs = os.path.join(build_dir,'src'),
@ -40,6 +41,7 @@ if with_openjpeg:
)
add_attribute(libraries = 'openjpeg')
# assumes png is supplied by system paths -- may not be true
png = '@LIB_PNG@'
if png:
add_attribute(libraries = 'png')
@ -57,12 +59,12 @@ if data_handler == "numpy":
include_dirs = numpy_include,
)
eccode_module = Extension('_eccode_swig',**attdict)
gribapi_module = Extension('_gribapi_swig',**attdict)
setup (name = 'eccode',
setup (name = 'gribapi',
version = '0.1',
author = 'ECMWF',
description = """Grib API SWIG module""",
ext_modules = [eccode_module],
py_modules = ['eccode_swig','eccode'],
ext_modules = [gribapi_module],
py_modules = ['gribapi_swig','gribapi'],
)

View File

@ -2682,16 +2682,16 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
#endif
/*-----------------------------------------------
@(target):= _eccode_swig.so
@(target):= _gribapi_swig.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__eccode_swig
# define SWIG_init PyInit__gribapi_swig
#else
# define SWIG_init init_eccode_swig
# define SWIG_init init_gribapi_swig
#endif
#define SWIG_name "_eccode_swig"
#define SWIG_name "_gribapi_swig"
#define SWIGVERSION 0x010340
#define SWIG_VERSION SWIGVERSION

View File

@ -12,20 +12,20 @@ if version_info >= (2,6,0):
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_eccode_swig', [dirname(__file__)])
fp, pathname, description = imp.find_module('_gribapi_swig', [dirname(__file__)])
except ImportError:
import _eccode_swig
return _eccode_swig
import _gribapi_swig
return _gribapi_swig
if fp is not None:
try:
_mod = imp.load_module('_eccode_swig', fp, pathname, description)
_mod = imp.load_module('_gribapi_swig', fp, pathname, description)
finally:
fp.close()
return _mod
_eccode_swig = swig_import_helper()
_gribapi_swig = swig_import_helper()
del swig_import_helper
else:
import _eccode_swig
import _gribapi_swig
del version_info
try:
_swig_property = property
@ -68,68 +68,68 @@ except AttributeError:
def cdata(*args):
return _eccode_swig.cdata(*args)
cdata = _eccode_swig.cdata
return _gribapi_swig.cdata(*args)
cdata = _gribapi_swig.cdata
def memmove(*args):
return _eccode_swig.memmove(*args)
memmove = _eccode_swig.memmove
GRIB_SUCCESS = _eccode_swig.GRIB_SUCCESS
GRIB_END_OF_FILE = _eccode_swig.GRIB_END_OF_FILE
GRIB_INTERNAL_ERROR = _eccode_swig.GRIB_INTERNAL_ERROR
GRIB_BUFFER_TOO_SMALL = _eccode_swig.GRIB_BUFFER_TOO_SMALL
GRIB_NOT_IMPLEMENTED = _eccode_swig.GRIB_NOT_IMPLEMENTED
GRIB_7777_NOT_FOUND = _eccode_swig.GRIB_7777_NOT_FOUND
GRIB_ARRAY_TOO_SMALL = _eccode_swig.GRIB_ARRAY_TOO_SMALL
GRIB_FILE_NOT_FOUND = _eccode_swig.GRIB_FILE_NOT_FOUND
GRIB_CODE_NOT_FOUND_IN_TABLE = _eccode_swig.GRIB_CODE_NOT_FOUND_IN_TABLE
GRIB_WRONG_ARRAY_SIZE = _eccode_swig.GRIB_WRONG_ARRAY_SIZE
GRIB_NOT_FOUND = _eccode_swig.GRIB_NOT_FOUND
GRIB_IO_PROBLEM = _eccode_swig.GRIB_IO_PROBLEM
GRIB_INVALID_MESSAGE = _eccode_swig.GRIB_INVALID_MESSAGE
GRIB_DECODING_ERROR = _eccode_swig.GRIB_DECODING_ERROR
GRIB_ENCODING_ERROR = _eccode_swig.GRIB_ENCODING_ERROR
GRIB_NO_MORE_IN_SET = _eccode_swig.GRIB_NO_MORE_IN_SET
GRIB_GEOCALCULUS_PROBLEM = _eccode_swig.GRIB_GEOCALCULUS_PROBLEM
GRIB_OUT_OF_MEMORY = _eccode_swig.GRIB_OUT_OF_MEMORY
GRIB_READ_ONLY = _eccode_swig.GRIB_READ_ONLY
GRIB_INVALID_ARGUMENT = _eccode_swig.GRIB_INVALID_ARGUMENT
GRIB_NULL_HANDLE = _eccode_swig.GRIB_NULL_HANDLE
GRIB_INVALID_SECTION_NUMBER = _eccode_swig.GRIB_INVALID_SECTION_NUMBER
GRIB_VALUE_CANNOT_BE_MISSING = _eccode_swig.GRIB_VALUE_CANNOT_BE_MISSING
GRIB_WRONG_LENGTH = _eccode_swig.GRIB_WRONG_LENGTH
GRIB_INVALID_TYPE = _eccode_swig.GRIB_INVALID_TYPE
GRIB_WRONG_STEP = _eccode_swig.GRIB_WRONG_STEP
GRIB_WRONG_STEP_UNIT = _eccode_swig.GRIB_WRONG_STEP_UNIT
GRIB_INVALID_FILE = _eccode_swig.GRIB_INVALID_FILE
GRIB_INVALID_GRIB = _eccode_swig.GRIB_INVALID_GRIB
GRIB_INVALID_INDEX = _eccode_swig.GRIB_INVALID_INDEX
GRIB_INVALID_ITERATOR = _eccode_swig.GRIB_INVALID_ITERATOR
GRIB_INVALID_KEYS_ITERATOR = _eccode_swig.GRIB_INVALID_KEYS_ITERATOR
GRIB_INVALID_NEAREST = _eccode_swig.GRIB_INVALID_NEAREST
GRIB_INVALID_ORDERBY = _eccode_swig.GRIB_INVALID_ORDERBY
GRIB_MISSING_KEY = _eccode_swig.GRIB_MISSING_KEY
GRIB_OUT_OF_AREA = _eccode_swig.GRIB_OUT_OF_AREA
GRIB_CONCEPT_NO_MATCH = _eccode_swig.GRIB_CONCEPT_NO_MATCH
GRIB_NO_DEFINITIONS = _eccode_swig.GRIB_NO_DEFINITIONS
GRIB_WRONG_TYPE = _eccode_swig.GRIB_WRONG_TYPE
GRIB_END = _eccode_swig.GRIB_END
GRIB_NO_VALUES = _eccode_swig.GRIB_NO_VALUES
GRIB_WRONG_GRID = _eccode_swig.GRIB_WRONG_GRID
GRIB_END_OF_INDEX = _eccode_swig.GRIB_END_OF_INDEX
GRIB_NULL_INDEX = _eccode_swig.GRIB_NULL_INDEX
GRIB_PREMATURE_END_OF_FILE = _eccode_swig.GRIB_PREMATURE_END_OF_FILE
GRIB_INTERNAL_ARRAY_TOO_SMALL = _eccode_swig.GRIB_INTERNAL_ARRAY_TOO_SMALL
GRIB_MESSAGE_TOO_LARGE = _eccode_swig.GRIB_MESSAGE_TOO_LARGE
GRIB_CONSTANT_FIELD = _eccode_swig.GRIB_CONSTANT_FIELD
GRIB_SWITCH_NO_MATCH = _eccode_swig.GRIB_SWITCH_NO_MATCH
GRIB_UNDERFLOW = _eccode_swig.GRIB_UNDERFLOW
GRIB_MESSAGE_MALFORMED = _eccode_swig.GRIB_MESSAGE_MALFORMED
GRIB_CORRUPTED_INDEX = _eccode_swig.GRIB_CORRUPTED_INDEX
GRIB_INVALID_BPV = _eccode_swig.GRIB_INVALID_BPV
GRIB_DIFFERENT_EDITION = _eccode_swig.GRIB_DIFFERENT_EDITION
GRIB_VALUE_DIFFERENT = _eccode_swig.GRIB_VALUE_DIFFERENT
GRIB_INVALID_KEY_VALUE = _eccode_swig.GRIB_INVALID_KEY_VALUE
return _gribapi_swig.memmove(*args)
memmove = _gribapi_swig.memmove
GRIB_SUCCESS = _gribapi_swig.GRIB_SUCCESS
GRIB_END_OF_FILE = _gribapi_swig.GRIB_END_OF_FILE
GRIB_INTERNAL_ERROR = _gribapi_swig.GRIB_INTERNAL_ERROR
GRIB_BUFFER_TOO_SMALL = _gribapi_swig.GRIB_BUFFER_TOO_SMALL
GRIB_NOT_IMPLEMENTED = _gribapi_swig.GRIB_NOT_IMPLEMENTED
GRIB_7777_NOT_FOUND = _gribapi_swig.GRIB_7777_NOT_FOUND
GRIB_ARRAY_TOO_SMALL = _gribapi_swig.GRIB_ARRAY_TOO_SMALL
GRIB_FILE_NOT_FOUND = _gribapi_swig.GRIB_FILE_NOT_FOUND
GRIB_CODE_NOT_FOUND_IN_TABLE = _gribapi_swig.GRIB_CODE_NOT_FOUND_IN_TABLE
GRIB_WRONG_ARRAY_SIZE = _gribapi_swig.GRIB_WRONG_ARRAY_SIZE
GRIB_NOT_FOUND = _gribapi_swig.GRIB_NOT_FOUND
GRIB_IO_PROBLEM = _gribapi_swig.GRIB_IO_PROBLEM
GRIB_INVALID_MESSAGE = _gribapi_swig.GRIB_INVALID_MESSAGE
GRIB_DECODING_ERROR = _gribapi_swig.GRIB_DECODING_ERROR
GRIB_ENCODING_ERROR = _gribapi_swig.GRIB_ENCODING_ERROR
GRIB_NO_MORE_IN_SET = _gribapi_swig.GRIB_NO_MORE_IN_SET
GRIB_GEOCALCULUS_PROBLEM = _gribapi_swig.GRIB_GEOCALCULUS_PROBLEM
GRIB_OUT_OF_MEMORY = _gribapi_swig.GRIB_OUT_OF_MEMORY
GRIB_READ_ONLY = _gribapi_swig.GRIB_READ_ONLY
GRIB_INVALID_ARGUMENT = _gribapi_swig.GRIB_INVALID_ARGUMENT
GRIB_NULL_HANDLE = _gribapi_swig.GRIB_NULL_HANDLE
GRIB_INVALID_SECTION_NUMBER = _gribapi_swig.GRIB_INVALID_SECTION_NUMBER
GRIB_VALUE_CANNOT_BE_MISSING = _gribapi_swig.GRIB_VALUE_CANNOT_BE_MISSING
GRIB_WRONG_LENGTH = _gribapi_swig.GRIB_WRONG_LENGTH
GRIB_INVALID_TYPE = _gribapi_swig.GRIB_INVALID_TYPE
GRIB_WRONG_STEP = _gribapi_swig.GRIB_WRONG_STEP
GRIB_WRONG_STEP_UNIT = _gribapi_swig.GRIB_WRONG_STEP_UNIT
GRIB_INVALID_FILE = _gribapi_swig.GRIB_INVALID_FILE
GRIB_INVALID_GRIB = _gribapi_swig.GRIB_INVALID_GRIB
GRIB_INVALID_INDEX = _gribapi_swig.GRIB_INVALID_INDEX
GRIB_INVALID_ITERATOR = _gribapi_swig.GRIB_INVALID_ITERATOR
GRIB_INVALID_KEYS_ITERATOR = _gribapi_swig.GRIB_INVALID_KEYS_ITERATOR
GRIB_INVALID_NEAREST = _gribapi_swig.GRIB_INVALID_NEAREST
GRIB_INVALID_ORDERBY = _gribapi_swig.GRIB_INVALID_ORDERBY
GRIB_MISSING_KEY = _gribapi_swig.GRIB_MISSING_KEY
GRIB_OUT_OF_AREA = _gribapi_swig.GRIB_OUT_OF_AREA
GRIB_CONCEPT_NO_MATCH = _gribapi_swig.GRIB_CONCEPT_NO_MATCH
GRIB_NO_DEFINITIONS = _gribapi_swig.GRIB_NO_DEFINITIONS
GRIB_WRONG_TYPE = _gribapi_swig.GRIB_WRONG_TYPE
GRIB_END = _gribapi_swig.GRIB_END
GRIB_NO_VALUES = _gribapi_swig.GRIB_NO_VALUES
GRIB_WRONG_GRID = _gribapi_swig.GRIB_WRONG_GRID
GRIB_END_OF_INDEX = _gribapi_swig.GRIB_END_OF_INDEX
GRIB_NULL_INDEX = _gribapi_swig.GRIB_NULL_INDEX
GRIB_PREMATURE_END_OF_FILE = _gribapi_swig.GRIB_PREMATURE_END_OF_FILE
GRIB_INTERNAL_ARRAY_TOO_SMALL = _gribapi_swig.GRIB_INTERNAL_ARRAY_TOO_SMALL
GRIB_MESSAGE_TOO_LARGE = _gribapi_swig.GRIB_MESSAGE_TOO_LARGE
GRIB_CONSTANT_FIELD = _gribapi_swig.GRIB_CONSTANT_FIELD
GRIB_SWITCH_NO_MATCH = _gribapi_swig.GRIB_SWITCH_NO_MATCH
GRIB_UNDERFLOW = _gribapi_swig.GRIB_UNDERFLOW
GRIB_MESSAGE_MALFORMED = _gribapi_swig.GRIB_MESSAGE_MALFORMED
GRIB_CORRUPTED_INDEX = _gribapi_swig.GRIB_CORRUPTED_INDEX
GRIB_INVALID_BPV = _gribapi_swig.GRIB_INVALID_BPV
GRIB_DIFFERENT_EDITION = _gribapi_swig.GRIB_DIFFERENT_EDITION
GRIB_VALUE_DIFFERENT = _gribapi_swig.GRIB_VALUE_DIFFERENT
GRIB_INVALID_KEY_VALUE = _gribapi_swig.GRIB_INVALID_KEY_VALUE
class intp(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, intp, name, value)
@ -137,22 +137,22 @@ class intp(_object):
__getattr__ = lambda self, name: _swig_getattr(self, intp, name)
__repr__ = _swig_repr
def __init__(self):
this = _eccode_swig.new_intp()
this = _gribapi_swig.new_intp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _eccode_swig.delete_intp
__swig_destroy__ = _gribapi_swig.delete_intp
__del__ = lambda self : None;
def assign(self, *args): return _eccode_swig.intp_assign(self, *args)
def value(self): return _eccode_swig.intp_value(self)
def cast(self): return _eccode_swig.intp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _eccode_swig.intp_frompointer
if _newclass:frompointer = staticmethod(_eccode_swig.intp_frompointer)
intp_swigregister = _eccode_swig.intp_swigregister
def assign(self, *args): return _gribapi_swig.intp_assign(self, *args)
def value(self): return _gribapi_swig.intp_value(self)
def cast(self): return _gribapi_swig.intp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _gribapi_swig.intp_frompointer
if _newclass:frompointer = staticmethod(_gribapi_swig.intp_frompointer)
intp_swigregister = _gribapi_swig.intp_swigregister
intp_swigregister(intp)
def intp_frompointer(*args):
return _eccode_swig.intp_frompointer(*args)
intp_frompointer = _eccode_swig.intp_frompointer
return _gribapi_swig.intp_frompointer(*args)
intp_frompointer = _gribapi_swig.intp_frompointer
class longp(_object):
__swig_setmethods__ = {}
@ -161,22 +161,22 @@ class longp(_object):
__getattr__ = lambda self, name: _swig_getattr(self, longp, name)
__repr__ = _swig_repr
def __init__(self):
this = _eccode_swig.new_longp()
this = _gribapi_swig.new_longp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _eccode_swig.delete_longp
__swig_destroy__ = _gribapi_swig.delete_longp
__del__ = lambda self : None;
def assign(self, *args): return _eccode_swig.longp_assign(self, *args)
def value(self): return _eccode_swig.longp_value(self)
def cast(self): return _eccode_swig.longp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _eccode_swig.longp_frompointer
if _newclass:frompointer = staticmethod(_eccode_swig.longp_frompointer)
longp_swigregister = _eccode_swig.longp_swigregister
def assign(self, *args): return _gribapi_swig.longp_assign(self, *args)
def value(self): return _gribapi_swig.longp_value(self)
def cast(self): return _gribapi_swig.longp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _gribapi_swig.longp_frompointer
if _newclass:frompointer = staticmethod(_gribapi_swig.longp_frompointer)
longp_swigregister = _gribapi_swig.longp_swigregister
longp_swigregister(longp)
def longp_frompointer(*args):
return _eccode_swig.longp_frompointer(*args)
longp_frompointer = _eccode_swig.longp_frompointer
return _gribapi_swig.longp_frompointer(*args)
longp_frompointer = _gribapi_swig.longp_frompointer
class doublep(_object):
__swig_setmethods__ = {}
@ -185,366 +185,366 @@ class doublep(_object):
__getattr__ = lambda self, name: _swig_getattr(self, doublep, name)
__repr__ = _swig_repr
def __init__(self):
this = _eccode_swig.new_doublep()
this = _gribapi_swig.new_doublep()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _eccode_swig.delete_doublep
__swig_destroy__ = _gribapi_swig.delete_doublep
__del__ = lambda self : None;
def assign(self, *args): return _eccode_swig.doublep_assign(self, *args)
def value(self): return _eccode_swig.doublep_value(self)
def cast(self): return _eccode_swig.doublep_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _eccode_swig.doublep_frompointer
if _newclass:frompointer = staticmethod(_eccode_swig.doublep_frompointer)
doublep_swigregister = _eccode_swig.doublep_swigregister
def assign(self, *args): return _gribapi_swig.doublep_assign(self, *args)
def value(self): return _gribapi_swig.doublep_value(self)
def cast(self): return _gribapi_swig.doublep_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _gribapi_swig.doublep_frompointer
if _newclass:frompointer = staticmethod(_gribapi_swig.doublep_frompointer)
doublep_swigregister = _gribapi_swig.doublep_swigregister
doublep_swigregister(doublep)
def doublep_frompointer(*args):
return _eccode_swig.doublep_frompointer(*args)
doublep_frompointer = _eccode_swig.doublep_frompointer
return _gribapi_swig.doublep_frompointer(*args)
doublep_frompointer = _gribapi_swig.doublep_frompointer
def new_doubleArray(*args):
return _eccode_swig.new_doubleArray(*args)
new_doubleArray = _eccode_swig.new_doubleArray
return _gribapi_swig.new_doubleArray(*args)
new_doubleArray = _gribapi_swig.new_doubleArray
def delete_doubleArray(*args):
return _eccode_swig.delete_doubleArray(*args)
delete_doubleArray = _eccode_swig.delete_doubleArray
return _gribapi_swig.delete_doubleArray(*args)
delete_doubleArray = _gribapi_swig.delete_doubleArray
def doubleArray_getitem(*args):
return _eccode_swig.doubleArray_getitem(*args)
doubleArray_getitem = _eccode_swig.doubleArray_getitem
return _gribapi_swig.doubleArray_getitem(*args)
doubleArray_getitem = _gribapi_swig.doubleArray_getitem
def doubleArray_setitem(*args):
return _eccode_swig.doubleArray_setitem(*args)
doubleArray_setitem = _eccode_swig.doubleArray_setitem
return _gribapi_swig.doubleArray_setitem(*args)
doubleArray_setitem = _gribapi_swig.doubleArray_setitem
def new_longArray(*args):
return _eccode_swig.new_longArray(*args)
new_longArray = _eccode_swig.new_longArray
return _gribapi_swig.new_longArray(*args)
new_longArray = _gribapi_swig.new_longArray
def delete_longArray(*args):
return _eccode_swig.delete_longArray(*args)
delete_longArray = _eccode_swig.delete_longArray
return _gribapi_swig.delete_longArray(*args)
delete_longArray = _gribapi_swig.delete_longArray
def longArray_getitem(*args):
return _eccode_swig.longArray_getitem(*args)
longArray_getitem = _eccode_swig.longArray_getitem
return _gribapi_swig.longArray_getitem(*args)
longArray_getitem = _gribapi_swig.longArray_getitem
def longArray_setitem(*args):
return _eccode_swig.longArray_setitem(*args)
longArray_setitem = _eccode_swig.longArray_setitem
return _gribapi_swig.longArray_setitem(*args)
longArray_setitem = _gribapi_swig.longArray_setitem
def new_intArray(*args):
return _eccode_swig.new_intArray(*args)
new_intArray = _eccode_swig.new_intArray
return _gribapi_swig.new_intArray(*args)
new_intArray = _gribapi_swig.new_intArray
def delete_intArray(*args):
return _eccode_swig.delete_intArray(*args)
delete_intArray = _eccode_swig.delete_intArray
return _gribapi_swig.delete_intArray(*args)
delete_intArray = _gribapi_swig.delete_intArray
def intArray_getitem(*args):
return _eccode_swig.intArray_getitem(*args)
intArray_getitem = _eccode_swig.intArray_getitem
return _gribapi_swig.intArray_getitem(*args)
intArray_getitem = _gribapi_swig.intArray_getitem
def intArray_setitem(*args):
return _eccode_swig.intArray_setitem(*args)
intArray_setitem = _eccode_swig.intArray_setitem
return _gribapi_swig.intArray_setitem(*args)
intArray_setitem = _gribapi_swig.intArray_setitem
def grib_c_new_from_file(*args):
return _eccode_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _eccode_swig.grib_c_new_from_file
return _gribapi_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _gribapi_swig.grib_c_new_from_file
def grib_c_new_bufr_from_file(*args):
return _eccode_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _eccode_swig.grib_c_new_bufr_from_file
return _gribapi_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _gribapi_swig.grib_c_new_bufr_from_file
def grib_c_new_gts_from_file(*args):
return _eccode_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _eccode_swig.grib_c_new_gts_from_file
return _gribapi_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _gribapi_swig.grib_c_new_gts_from_file
def grib_c_iterator_new(*args):
return _eccode_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _eccode_swig.grib_c_iterator_new
return _gribapi_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _gribapi_swig.grib_c_iterator_new
def grib_c_keys_iterator_new(*args):
return _eccode_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _eccode_swig.grib_c_keys_iterator_new
return _gribapi_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _gribapi_swig.grib_c_keys_iterator_new
def grib_c_new_from_samples(*args):
return _eccode_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _eccode_swig.grib_c_new_from_samples
return _gribapi_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _gribapi_swig.grib_c_new_from_samples
def grib_c_index_new_from_file(*args):
return _eccode_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _eccode_swig.grib_c_index_new_from_file
return _gribapi_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _gribapi_swig.grib_c_index_new_from_file
def grib_c_index_add_file(*args):
return _eccode_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _eccode_swig.grib_c_index_add_file
return _gribapi_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _gribapi_swig.grib_c_index_add_file
def grib_c_new_from_index(*args):
return _eccode_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _eccode_swig.grib_c_new_from_index
return _gribapi_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _gribapi_swig.grib_c_new_from_index
def grib_c_index_write(*args):
return _eccode_swig.grib_c_index_write(*args)
grib_c_index_write = _eccode_swig.grib_c_index_write
return _gribapi_swig.grib_c_index_write(*args)
grib_c_index_write = _gribapi_swig.grib_c_index_write
def grib_c_index_read(*args):
return _eccode_swig.grib_c_index_read(*args)
grib_c_index_read = _eccode_swig.grib_c_index_read
return _gribapi_swig.grib_c_index_read(*args)
grib_c_index_read = _gribapi_swig.grib_c_index_read
def grib_c_new_from_message(*args):
return _eccode_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _eccode_swig.grib_c_new_from_message
return _gribapi_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _gribapi_swig.grib_c_new_from_message
def grib_c_count_in_file(*args):
return _eccode_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _eccode_swig.grib_c_count_in_file
return _gribapi_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _gribapi_swig.grib_c_count_in_file
def grib_c_release(*args):
return _eccode_swig.grib_c_release(*args)
grib_c_release = _eccode_swig.grib_c_release
return _gribapi_swig.grib_c_release(*args)
grib_c_release = _gribapi_swig.grib_c_release
def grib_c_write(*args):
return _eccode_swig.grib_c_write(*args)
grib_c_write = _eccode_swig.grib_c_write
return _gribapi_swig.grib_c_write(*args)
grib_c_write = _gribapi_swig.grib_c_write
def grib_c_get_size_long(*args):
return _eccode_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _eccode_swig.grib_c_get_size_long
return _gribapi_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _gribapi_swig.grib_c_get_size_long
def grib_c_get_string_length(*args):
return _eccode_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _eccode_swig.grib_c_get_string_length
return _gribapi_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _gribapi_swig.grib_c_get_string_length
def grib_c_clone(*args):
return _eccode_swig.grib_c_clone(*args)
grib_c_clone = _eccode_swig.grib_c_clone
return _gribapi_swig.grib_c_clone(*args)
grib_c_clone = _gribapi_swig.grib_c_clone
def grib_c_copy_namespace(*args):
return _eccode_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _eccode_swig.grib_c_copy_namespace
return _gribapi_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _gribapi_swig.grib_c_copy_namespace
def grib_c_get_message_size(*args):
return _eccode_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _eccode_swig.grib_c_get_message_size
return _gribapi_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _gribapi_swig.grib_c_get_message_size
def grib_c_get_message_offset(*args):
return _eccode_swig.grib_c_get_message_offset(*args)
grib_c_get_message_offset = _eccode_swig.grib_c_get_message_offset
return _gribapi_swig.grib_c_get_message_offset(*args)
grib_c_get_message_offset = _gribapi_swig.grib_c_get_message_offset
def grib_c_get_native_type(*args):
return _eccode_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _eccode_swig.grib_c_get_native_type
return _gribapi_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _gribapi_swig.grib_c_get_native_type
def grib_c_multi_new():
return _eccode_swig.grib_c_multi_new()
grib_c_multi_new = _eccode_swig.grib_c_multi_new
return _gribapi_swig.grib_c_multi_new()
grib_c_multi_new = _gribapi_swig.grib_c_multi_new
def grib_c_multi_support_on():
return _eccode_swig.grib_c_multi_support_on()
grib_c_multi_support_on = _eccode_swig.grib_c_multi_support_on
return _gribapi_swig.grib_c_multi_support_on()
grib_c_multi_support_on = _gribapi_swig.grib_c_multi_support_on
def grib_c_multi_write(*args):
return _eccode_swig.grib_c_multi_write(*args)
grib_c_multi_write = _eccode_swig.grib_c_multi_write
return _gribapi_swig.grib_c_multi_write(*args)
grib_c_multi_write = _gribapi_swig.grib_c_multi_write
def grib_c_multi_support_off():
return _eccode_swig.grib_c_multi_support_off()
grib_c_multi_support_off = _eccode_swig.grib_c_multi_support_off
return _gribapi_swig.grib_c_multi_support_off()
grib_c_multi_support_off = _gribapi_swig.grib_c_multi_support_off
def grib_c_multi_release(*args):
return _eccode_swig.grib_c_multi_release(*args)
grib_c_multi_release = _eccode_swig.grib_c_multi_release
return _gribapi_swig.grib_c_multi_release(*args)
grib_c_multi_release = _gribapi_swig.grib_c_multi_release
def grib_c_multi_append(*args):
return _eccode_swig.grib_c_multi_append(*args)
grib_c_multi_append = _eccode_swig.grib_c_multi_append
return _gribapi_swig.grib_c_multi_append(*args)
grib_c_multi_append = _gribapi_swig.grib_c_multi_append
def grib_c_gribex_mode_on():
return _eccode_swig.grib_c_gribex_mode_on()
grib_c_gribex_mode_on = _eccode_swig.grib_c_gribex_mode_on
return _gribapi_swig.grib_c_gribex_mode_on()
grib_c_gribex_mode_on = _gribapi_swig.grib_c_gribex_mode_on
def grib_c_gribex_mode_off():
return _eccode_swig.grib_c_gribex_mode_off()
grib_c_gribex_mode_off = _eccode_swig.grib_c_gribex_mode_off
return _gribapi_swig.grib_c_gribex_mode_off()
grib_c_gribex_mode_off = _gribapi_swig.grib_c_gribex_mode_off
def grib_c_keys_iterator_next(*args):
return _eccode_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _eccode_swig.grib_c_keys_iterator_next
return _gribapi_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _gribapi_swig.grib_c_keys_iterator_next
def grib_c_keys_iterator_delete(*args):
return _eccode_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _eccode_swig.grib_c_keys_iterator_delete
return _gribapi_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _gribapi_swig.grib_c_keys_iterator_delete
def grib_c_skip_computed(*args):
return _eccode_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _eccode_swig.grib_c_skip_computed
return _gribapi_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _gribapi_swig.grib_c_skip_computed
def grib_c_skip_coded(*args):
return _eccode_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _eccode_swig.grib_c_skip_coded
return _gribapi_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _gribapi_swig.grib_c_skip_coded
def grib_c_skip_edition_specific(*args):
return _eccode_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _eccode_swig.grib_c_skip_edition_specific
return _gribapi_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _gribapi_swig.grib_c_skip_edition_specific
def grib_c_skip_duplicates(*args):
return _eccode_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _eccode_swig.grib_c_skip_duplicates
return _gribapi_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _gribapi_swig.grib_c_skip_duplicates
def grib_c_skip_read_only(*args):
return _eccode_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _eccode_swig.grib_c_skip_read_only
return _gribapi_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _gribapi_swig.grib_c_skip_read_only
def grib_c_skip_function(*args):
return _eccode_swig.grib_c_skip_function(*args)
grib_c_skip_function = _eccode_swig.grib_c_skip_function
return _gribapi_swig.grib_c_skip_function(*args)
grib_c_skip_function = _gribapi_swig.grib_c_skip_function
def grib_c_keys_iterator_rewind(*args):
return _eccode_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _eccode_swig.grib_c_keys_iterator_rewind
return _gribapi_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _gribapi_swig.grib_c_keys_iterator_rewind
def grib_c_keys_iterator_get_name(*args):
return _eccode_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _eccode_swig.grib_c_keys_iterator_get_name
return _gribapi_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _gribapi_swig.grib_c_keys_iterator_get_name
def grib_c_index_get_size_long(*args):
return _eccode_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _eccode_swig.grib_c_index_get_size_long
return _gribapi_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _gribapi_swig.grib_c_index_get_size_long
def grib_c_index_get_long(*args):
return _eccode_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _eccode_swig.grib_c_index_get_long
return _gribapi_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _gribapi_swig.grib_c_index_get_long
def grib_c_index_get_real8(*args):
return _eccode_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _eccode_swig.grib_c_index_get_real8
return _gribapi_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _gribapi_swig.grib_c_index_get_real8
def grib_c_index_get_string(*args):
return _eccode_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _eccode_swig.grib_c_index_get_string
return _gribapi_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _gribapi_swig.grib_c_index_get_string
def grib_c_index_select_long(*args):
return _eccode_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _eccode_swig.grib_c_index_select_long
return _gribapi_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _gribapi_swig.grib_c_index_select_long
def grib_c_index_select_real8(*args):
return _eccode_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _eccode_swig.grib_c_index_select_real8
return _gribapi_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _gribapi_swig.grib_c_index_select_real8
def grib_c_index_select_string(*args):
return _eccode_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _eccode_swig.grib_c_index_select_string
return _gribapi_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _gribapi_swig.grib_c_index_select_string
def grib_c_index_release(*args):
return _eccode_swig.grib_c_index_release(*args)
grib_c_index_release = _eccode_swig.grib_c_index_release
return _gribapi_swig.grib_c_index_release(*args)
grib_c_index_release = _gribapi_swig.grib_c_index_release
def grib_c_iterator_delete(*args):
return _eccode_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _eccode_swig.grib_c_iterator_delete
return _gribapi_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _gribapi_swig.grib_c_iterator_delete
def grib_c_iterator_next(*args):
return _eccode_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _eccode_swig.grib_c_iterator_next
return _gribapi_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _gribapi_swig.grib_c_iterator_next
def grib_c_get_string(*args):
return _eccode_swig.grib_c_get_string(*args)
grib_c_get_string = _eccode_swig.grib_c_get_string
return _gribapi_swig.grib_c_get_string(*args)
grib_c_get_string = _gribapi_swig.grib_c_get_string
def grib_c_set_string(*args):
return _eccode_swig.grib_c_set_string(*args)
grib_c_set_string = _eccode_swig.grib_c_set_string
return _gribapi_swig.grib_c_set_string(*args)
grib_c_set_string = _gribapi_swig.grib_c_set_string
def grib_c_get_long(*args):
return _eccode_swig.grib_c_get_long(*args)
grib_c_get_long = _eccode_swig.grib_c_get_long
return _gribapi_swig.grib_c_get_long(*args)
grib_c_get_long = _gribapi_swig.grib_c_get_long
def grib_c_set_long(*args):
return _eccode_swig.grib_c_set_long(*args)
grib_c_set_long = _eccode_swig.grib_c_set_long
return _gribapi_swig.grib_c_set_long(*args)
grib_c_set_long = _gribapi_swig.grib_c_set_long
def grib_c_get_double(*args):
return _eccode_swig.grib_c_get_double(*args)
grib_c_get_double = _eccode_swig.grib_c_get_double
return _gribapi_swig.grib_c_get_double(*args)
grib_c_get_double = _gribapi_swig.grib_c_get_double
def grib_c_set_double(*args):
return _eccode_swig.grib_c_set_double(*args)
grib_c_set_double = _eccode_swig.grib_c_set_double
return _gribapi_swig.grib_c_set_double(*args)
grib_c_set_double = _gribapi_swig.grib_c_set_double
def grib_c_set_real8_array(*args):
return _eccode_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _eccode_swig.grib_c_set_real8_array
return _gribapi_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _gribapi_swig.grib_c_set_real8_array
def grib_c_get_real8_array(*args):
return _eccode_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _eccode_swig.grib_c_get_real8_array
return _gribapi_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _gribapi_swig.grib_c_get_real8_array
def grib_c_get_long_array(*args):
return _eccode_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _eccode_swig.grib_c_get_long_array
return _gribapi_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _gribapi_swig.grib_c_get_long_array
def grib_c_set_long_array(*args):
return _eccode_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _eccode_swig.grib_c_set_long_array
return _gribapi_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _gribapi_swig.grib_c_set_long_array
def grib_c_get_real8_element(*args):
return _eccode_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _eccode_swig.grib_c_get_real8_element
return _gribapi_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _gribapi_swig.grib_c_get_real8_element
def grib_c_get_real8_elements(*args):
return _eccode_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _eccode_swig.grib_c_get_real8_elements
return _gribapi_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _gribapi_swig.grib_c_get_real8_elements
def grib_c_set_missing(*args):
return _eccode_swig.grib_c_set_missing(*args)
grib_c_set_missing = _eccode_swig.grib_c_set_missing
return _gribapi_swig.grib_c_set_missing(*args)
grib_c_set_missing = _gribapi_swig.grib_c_set_missing
def grib_c_set_key_vals(*args):
return _eccode_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _eccode_swig.grib_c_set_key_vals
return _gribapi_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _gribapi_swig.grib_c_set_key_vals
def grib_c_is_missing(*args):
return _eccode_swig.grib_c_is_missing(*args)
grib_c_is_missing = _eccode_swig.grib_c_is_missing
return _gribapi_swig.grib_c_is_missing(*args)
grib_c_is_missing = _gribapi_swig.grib_c_is_missing
def grib_c_is_defined(*args):
return _eccode_swig.grib_c_is_defined(*args)
grib_c_is_defined = _eccode_swig.grib_c_is_defined
return _gribapi_swig.grib_c_is_defined(*args)
grib_c_is_defined = _gribapi_swig.grib_c_is_defined
def grib_c_find_nearest_single(*args):
return _eccode_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _eccode_swig.grib_c_find_nearest_single
return _gribapi_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _gribapi_swig.grib_c_find_nearest_single
def grib_c_find_nearest_four_single(*args):
return _eccode_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _eccode_swig.grib_c_find_nearest_four_single
return _gribapi_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _gribapi_swig.grib_c_find_nearest_four_single
def grib_c_get_message(*args):
return _eccode_swig.grib_c_get_message(*args)
grib_c_get_message = _eccode_swig.grib_c_get_message
return _gribapi_swig.grib_c_get_message(*args)
grib_c_get_message = _gribapi_swig.grib_c_get_message
def grib_c_get_error_string(*args):
return _eccode_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _eccode_swig.grib_c_get_error_string
return _gribapi_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _gribapi_swig.grib_c_get_error_string
def no_fail_on_wrong_length(*args):
return _eccode_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _eccode_swig.no_fail_on_wrong_length
return _gribapi_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _gribapi_swig.no_fail_on_wrong_length
def grib_c_get_api_version():
return _eccode_swig.grib_c_get_api_version()
grib_c_get_api_version = _eccode_swig.grib_c_get_api_version
return _gribapi_swig.grib_c_get_api_version()
grib_c_get_api_version = _gribapi_swig.grib_c_get_api_version
def grib_c_gts_header_on():
return _eccode_swig.grib_c_gts_header_on()
grib_c_gts_header_on = _eccode_swig.grib_c_gts_header_on
return _gribapi_swig.grib_c_gts_header_on()
grib_c_gts_header_on = _gribapi_swig.grib_c_gts_header_on
def grib_c_gts_header_off():
return _eccode_swig.grib_c_gts_header_off()
grib_c_gts_header_off = _eccode_swig.grib_c_gts_header_off
return _gribapi_swig.grib_c_gts_header_off()
grib_c_gts_header_off = _gribapi_swig.grib_c_gts_header_off

View File

@ -2682,16 +2682,16 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
#endif
/*-----------------------------------------------
@(target):= _eccode_swig.so
@(target):= _gribapi_swig.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__eccode_swig
# define SWIG_init PyInit__gribapi_swig
#else
# define SWIG_init init_eccode_swig
# define SWIG_init init_gribapi_swig
#endif
#define SWIG_name "_eccode_swig"
#define SWIG_name "_gribapi_swig"
#define SWIGVERSION 0x010340
#define SWIG_VERSION SWIGVERSION

View File

@ -12,20 +12,20 @@ if version_info >= (2,6,0):
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_eccode_swig', [dirname(__file__)])
fp, pathname, description = imp.find_module('_gribapi_swig', [dirname(__file__)])
except ImportError:
import _eccode_swig
return _eccode_swig
import _gribapi_swig
return _gribapi_swig
if fp is not None:
try:
_mod = imp.load_module('_eccode_swig', fp, pathname, description)
_mod = imp.load_module('_gribapi_swig', fp, pathname, description)
finally:
fp.close()
return _mod
_eccode_swig = swig_import_helper()
_gribapi_swig = swig_import_helper()
del swig_import_helper
else:
import _eccode_swig
import _gribapi_swig
del version_info
try:
_swig_property = property
@ -68,68 +68,68 @@ except AttributeError:
def cdata(*args):
return _eccode_swig.cdata(*args)
cdata = _eccode_swig.cdata
return _gribapi_swig.cdata(*args)
cdata = _gribapi_swig.cdata
def memmove(*args):
return _eccode_swig.memmove(*args)
memmove = _eccode_swig.memmove
GRIB_SUCCESS = _eccode_swig.GRIB_SUCCESS
GRIB_END_OF_FILE = _eccode_swig.GRIB_END_OF_FILE
GRIB_INTERNAL_ERROR = _eccode_swig.GRIB_INTERNAL_ERROR
GRIB_BUFFER_TOO_SMALL = _eccode_swig.GRIB_BUFFER_TOO_SMALL
GRIB_NOT_IMPLEMENTED = _eccode_swig.GRIB_NOT_IMPLEMENTED
GRIB_7777_NOT_FOUND = _eccode_swig.GRIB_7777_NOT_FOUND
GRIB_ARRAY_TOO_SMALL = _eccode_swig.GRIB_ARRAY_TOO_SMALL
GRIB_FILE_NOT_FOUND = _eccode_swig.GRIB_FILE_NOT_FOUND
GRIB_CODE_NOT_FOUND_IN_TABLE = _eccode_swig.GRIB_CODE_NOT_FOUND_IN_TABLE
GRIB_WRONG_ARRAY_SIZE = _eccode_swig.GRIB_WRONG_ARRAY_SIZE
GRIB_NOT_FOUND = _eccode_swig.GRIB_NOT_FOUND
GRIB_IO_PROBLEM = _eccode_swig.GRIB_IO_PROBLEM
GRIB_INVALID_MESSAGE = _eccode_swig.GRIB_INVALID_MESSAGE
GRIB_DECODING_ERROR = _eccode_swig.GRIB_DECODING_ERROR
GRIB_ENCODING_ERROR = _eccode_swig.GRIB_ENCODING_ERROR
GRIB_NO_MORE_IN_SET = _eccode_swig.GRIB_NO_MORE_IN_SET
GRIB_GEOCALCULUS_PROBLEM = _eccode_swig.GRIB_GEOCALCULUS_PROBLEM
GRIB_OUT_OF_MEMORY = _eccode_swig.GRIB_OUT_OF_MEMORY
GRIB_READ_ONLY = _eccode_swig.GRIB_READ_ONLY
GRIB_INVALID_ARGUMENT = _eccode_swig.GRIB_INVALID_ARGUMENT
GRIB_NULL_HANDLE = _eccode_swig.GRIB_NULL_HANDLE
GRIB_INVALID_SECTION_NUMBER = _eccode_swig.GRIB_INVALID_SECTION_NUMBER
GRIB_VALUE_CANNOT_BE_MISSING = _eccode_swig.GRIB_VALUE_CANNOT_BE_MISSING
GRIB_WRONG_LENGTH = _eccode_swig.GRIB_WRONG_LENGTH
GRIB_INVALID_TYPE = _eccode_swig.GRIB_INVALID_TYPE
GRIB_WRONG_STEP = _eccode_swig.GRIB_WRONG_STEP
GRIB_WRONG_STEP_UNIT = _eccode_swig.GRIB_WRONG_STEP_UNIT
GRIB_INVALID_FILE = _eccode_swig.GRIB_INVALID_FILE
GRIB_INVALID_GRIB = _eccode_swig.GRIB_INVALID_GRIB
GRIB_INVALID_INDEX = _eccode_swig.GRIB_INVALID_INDEX
GRIB_INVALID_ITERATOR = _eccode_swig.GRIB_INVALID_ITERATOR
GRIB_INVALID_KEYS_ITERATOR = _eccode_swig.GRIB_INVALID_KEYS_ITERATOR
GRIB_INVALID_NEAREST = _eccode_swig.GRIB_INVALID_NEAREST
GRIB_INVALID_ORDERBY = _eccode_swig.GRIB_INVALID_ORDERBY
GRIB_MISSING_KEY = _eccode_swig.GRIB_MISSING_KEY
GRIB_OUT_OF_AREA = _eccode_swig.GRIB_OUT_OF_AREA
GRIB_CONCEPT_NO_MATCH = _eccode_swig.GRIB_CONCEPT_NO_MATCH
GRIB_NO_DEFINITIONS = _eccode_swig.GRIB_NO_DEFINITIONS
GRIB_WRONG_TYPE = _eccode_swig.GRIB_WRONG_TYPE
GRIB_END = _eccode_swig.GRIB_END
GRIB_NO_VALUES = _eccode_swig.GRIB_NO_VALUES
GRIB_WRONG_GRID = _eccode_swig.GRIB_WRONG_GRID
GRIB_END_OF_INDEX = _eccode_swig.GRIB_END_OF_INDEX
GRIB_NULL_INDEX = _eccode_swig.GRIB_NULL_INDEX
GRIB_PREMATURE_END_OF_FILE = _eccode_swig.GRIB_PREMATURE_END_OF_FILE
GRIB_INTERNAL_ARRAY_TOO_SMALL = _eccode_swig.GRIB_INTERNAL_ARRAY_TOO_SMALL
GRIB_MESSAGE_TOO_LARGE = _eccode_swig.GRIB_MESSAGE_TOO_LARGE
GRIB_CONSTANT_FIELD = _eccode_swig.GRIB_CONSTANT_FIELD
GRIB_SWITCH_NO_MATCH = _eccode_swig.GRIB_SWITCH_NO_MATCH
GRIB_UNDERFLOW = _eccode_swig.GRIB_UNDERFLOW
GRIB_MESSAGE_MALFORMED = _eccode_swig.GRIB_MESSAGE_MALFORMED
GRIB_CORRUPTED_INDEX = _eccode_swig.GRIB_CORRUPTED_INDEX
GRIB_INVALID_BPV = _eccode_swig.GRIB_INVALID_BPV
GRIB_DIFFERENT_EDITION = _eccode_swig.GRIB_DIFFERENT_EDITION
GRIB_VALUE_DIFFERENT = _eccode_swig.GRIB_VALUE_DIFFERENT
GRIB_INVALID_KEY_VALUE = _eccode_swig.GRIB_INVALID_KEY_VALUE
return _gribapi_swig.memmove(*args)
memmove = _gribapi_swig.memmove
GRIB_SUCCESS = _gribapi_swig.GRIB_SUCCESS
GRIB_END_OF_FILE = _gribapi_swig.GRIB_END_OF_FILE
GRIB_INTERNAL_ERROR = _gribapi_swig.GRIB_INTERNAL_ERROR
GRIB_BUFFER_TOO_SMALL = _gribapi_swig.GRIB_BUFFER_TOO_SMALL
GRIB_NOT_IMPLEMENTED = _gribapi_swig.GRIB_NOT_IMPLEMENTED
GRIB_7777_NOT_FOUND = _gribapi_swig.GRIB_7777_NOT_FOUND
GRIB_ARRAY_TOO_SMALL = _gribapi_swig.GRIB_ARRAY_TOO_SMALL
GRIB_FILE_NOT_FOUND = _gribapi_swig.GRIB_FILE_NOT_FOUND
GRIB_CODE_NOT_FOUND_IN_TABLE = _gribapi_swig.GRIB_CODE_NOT_FOUND_IN_TABLE
GRIB_WRONG_ARRAY_SIZE = _gribapi_swig.GRIB_WRONG_ARRAY_SIZE
GRIB_NOT_FOUND = _gribapi_swig.GRIB_NOT_FOUND
GRIB_IO_PROBLEM = _gribapi_swig.GRIB_IO_PROBLEM
GRIB_INVALID_MESSAGE = _gribapi_swig.GRIB_INVALID_MESSAGE
GRIB_DECODING_ERROR = _gribapi_swig.GRIB_DECODING_ERROR
GRIB_ENCODING_ERROR = _gribapi_swig.GRIB_ENCODING_ERROR
GRIB_NO_MORE_IN_SET = _gribapi_swig.GRIB_NO_MORE_IN_SET
GRIB_GEOCALCULUS_PROBLEM = _gribapi_swig.GRIB_GEOCALCULUS_PROBLEM
GRIB_OUT_OF_MEMORY = _gribapi_swig.GRIB_OUT_OF_MEMORY
GRIB_READ_ONLY = _gribapi_swig.GRIB_READ_ONLY
GRIB_INVALID_ARGUMENT = _gribapi_swig.GRIB_INVALID_ARGUMENT
GRIB_NULL_HANDLE = _gribapi_swig.GRIB_NULL_HANDLE
GRIB_INVALID_SECTION_NUMBER = _gribapi_swig.GRIB_INVALID_SECTION_NUMBER
GRIB_VALUE_CANNOT_BE_MISSING = _gribapi_swig.GRIB_VALUE_CANNOT_BE_MISSING
GRIB_WRONG_LENGTH = _gribapi_swig.GRIB_WRONG_LENGTH
GRIB_INVALID_TYPE = _gribapi_swig.GRIB_INVALID_TYPE
GRIB_WRONG_STEP = _gribapi_swig.GRIB_WRONG_STEP
GRIB_WRONG_STEP_UNIT = _gribapi_swig.GRIB_WRONG_STEP_UNIT
GRIB_INVALID_FILE = _gribapi_swig.GRIB_INVALID_FILE
GRIB_INVALID_GRIB = _gribapi_swig.GRIB_INVALID_GRIB
GRIB_INVALID_INDEX = _gribapi_swig.GRIB_INVALID_INDEX
GRIB_INVALID_ITERATOR = _gribapi_swig.GRIB_INVALID_ITERATOR
GRIB_INVALID_KEYS_ITERATOR = _gribapi_swig.GRIB_INVALID_KEYS_ITERATOR
GRIB_INVALID_NEAREST = _gribapi_swig.GRIB_INVALID_NEAREST
GRIB_INVALID_ORDERBY = _gribapi_swig.GRIB_INVALID_ORDERBY
GRIB_MISSING_KEY = _gribapi_swig.GRIB_MISSING_KEY
GRIB_OUT_OF_AREA = _gribapi_swig.GRIB_OUT_OF_AREA
GRIB_CONCEPT_NO_MATCH = _gribapi_swig.GRIB_CONCEPT_NO_MATCH
GRIB_NO_DEFINITIONS = _gribapi_swig.GRIB_NO_DEFINITIONS
GRIB_WRONG_TYPE = _gribapi_swig.GRIB_WRONG_TYPE
GRIB_END = _gribapi_swig.GRIB_END
GRIB_NO_VALUES = _gribapi_swig.GRIB_NO_VALUES
GRIB_WRONG_GRID = _gribapi_swig.GRIB_WRONG_GRID
GRIB_END_OF_INDEX = _gribapi_swig.GRIB_END_OF_INDEX
GRIB_NULL_INDEX = _gribapi_swig.GRIB_NULL_INDEX
GRIB_PREMATURE_END_OF_FILE = _gribapi_swig.GRIB_PREMATURE_END_OF_FILE
GRIB_INTERNAL_ARRAY_TOO_SMALL = _gribapi_swig.GRIB_INTERNAL_ARRAY_TOO_SMALL
GRIB_MESSAGE_TOO_LARGE = _gribapi_swig.GRIB_MESSAGE_TOO_LARGE
GRIB_CONSTANT_FIELD = _gribapi_swig.GRIB_CONSTANT_FIELD
GRIB_SWITCH_NO_MATCH = _gribapi_swig.GRIB_SWITCH_NO_MATCH
GRIB_UNDERFLOW = _gribapi_swig.GRIB_UNDERFLOW
GRIB_MESSAGE_MALFORMED = _gribapi_swig.GRIB_MESSAGE_MALFORMED
GRIB_CORRUPTED_INDEX = _gribapi_swig.GRIB_CORRUPTED_INDEX
GRIB_INVALID_BPV = _gribapi_swig.GRIB_INVALID_BPV
GRIB_DIFFERENT_EDITION = _gribapi_swig.GRIB_DIFFERENT_EDITION
GRIB_VALUE_DIFFERENT = _gribapi_swig.GRIB_VALUE_DIFFERENT
GRIB_INVALID_KEY_VALUE = _gribapi_swig.GRIB_INVALID_KEY_VALUE
class intp(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, intp, name, value)
@ -137,22 +137,22 @@ class intp(_object):
__getattr__ = lambda self, name: _swig_getattr(self, intp, name)
__repr__ = _swig_repr
def __init__(self):
this = _eccode_swig.new_intp()
this = _gribapi_swig.new_intp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _eccode_swig.delete_intp
__swig_destroy__ = _gribapi_swig.delete_intp
__del__ = lambda self : None;
def assign(self, *args): return _eccode_swig.intp_assign(self, *args)
def value(self): return _eccode_swig.intp_value(self)
def cast(self): return _eccode_swig.intp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _eccode_swig.intp_frompointer
if _newclass:frompointer = staticmethod(_eccode_swig.intp_frompointer)
intp_swigregister = _eccode_swig.intp_swigregister
def assign(self, *args): return _gribapi_swig.intp_assign(self, *args)
def value(self): return _gribapi_swig.intp_value(self)
def cast(self): return _gribapi_swig.intp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _gribapi_swig.intp_frompointer
if _newclass:frompointer = staticmethod(_gribapi_swig.intp_frompointer)
intp_swigregister = _gribapi_swig.intp_swigregister
intp_swigregister(intp)
def intp_frompointer(*args):
return _eccode_swig.intp_frompointer(*args)
intp_frompointer = _eccode_swig.intp_frompointer
return _gribapi_swig.intp_frompointer(*args)
intp_frompointer = _gribapi_swig.intp_frompointer
class longp(_object):
__swig_setmethods__ = {}
@ -161,22 +161,22 @@ class longp(_object):
__getattr__ = lambda self, name: _swig_getattr(self, longp, name)
__repr__ = _swig_repr
def __init__(self):
this = _eccode_swig.new_longp()
this = _gribapi_swig.new_longp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _eccode_swig.delete_longp
__swig_destroy__ = _gribapi_swig.delete_longp
__del__ = lambda self : None;
def assign(self, *args): return _eccode_swig.longp_assign(self, *args)
def value(self): return _eccode_swig.longp_value(self)
def cast(self): return _eccode_swig.longp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _eccode_swig.longp_frompointer
if _newclass:frompointer = staticmethod(_eccode_swig.longp_frompointer)
longp_swigregister = _eccode_swig.longp_swigregister
def assign(self, *args): return _gribapi_swig.longp_assign(self, *args)
def value(self): return _gribapi_swig.longp_value(self)
def cast(self): return _gribapi_swig.longp_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _gribapi_swig.longp_frompointer
if _newclass:frompointer = staticmethod(_gribapi_swig.longp_frompointer)
longp_swigregister = _gribapi_swig.longp_swigregister
longp_swigregister(longp)
def longp_frompointer(*args):
return _eccode_swig.longp_frompointer(*args)
longp_frompointer = _eccode_swig.longp_frompointer
return _gribapi_swig.longp_frompointer(*args)
longp_frompointer = _gribapi_swig.longp_frompointer
class doublep(_object):
__swig_setmethods__ = {}
@ -185,390 +185,390 @@ class doublep(_object):
__getattr__ = lambda self, name: _swig_getattr(self, doublep, name)
__repr__ = _swig_repr
def __init__(self):
this = _eccode_swig.new_doublep()
this = _gribapi_swig.new_doublep()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _eccode_swig.delete_doublep
__swig_destroy__ = _gribapi_swig.delete_doublep
__del__ = lambda self : None;
def assign(self, *args): return _eccode_swig.doublep_assign(self, *args)
def value(self): return _eccode_swig.doublep_value(self)
def cast(self): return _eccode_swig.doublep_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _eccode_swig.doublep_frompointer
if _newclass:frompointer = staticmethod(_eccode_swig.doublep_frompointer)
doublep_swigregister = _eccode_swig.doublep_swigregister
def assign(self, *args): return _gribapi_swig.doublep_assign(self, *args)
def value(self): return _gribapi_swig.doublep_value(self)
def cast(self): return _gribapi_swig.doublep_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _gribapi_swig.doublep_frompointer
if _newclass:frompointer = staticmethod(_gribapi_swig.doublep_frompointer)
doublep_swigregister = _gribapi_swig.doublep_swigregister
doublep_swigregister(doublep)
def doublep_frompointer(*args):
return _eccode_swig.doublep_frompointer(*args)
doublep_frompointer = _eccode_swig.doublep_frompointer
return _gribapi_swig.doublep_frompointer(*args)
doublep_frompointer = _gribapi_swig.doublep_frompointer
def new_doubleArray(*args):
return _eccode_swig.new_doubleArray(*args)
new_doubleArray = _eccode_swig.new_doubleArray
return _gribapi_swig.new_doubleArray(*args)
new_doubleArray = _gribapi_swig.new_doubleArray
def delete_doubleArray(*args):
return _eccode_swig.delete_doubleArray(*args)
delete_doubleArray = _eccode_swig.delete_doubleArray
return _gribapi_swig.delete_doubleArray(*args)
delete_doubleArray = _gribapi_swig.delete_doubleArray
def doubleArray_getitem(*args):
return _eccode_swig.doubleArray_getitem(*args)
doubleArray_getitem = _eccode_swig.doubleArray_getitem
return _gribapi_swig.doubleArray_getitem(*args)
doubleArray_getitem = _gribapi_swig.doubleArray_getitem
def doubleArray_setitem(*args):
return _eccode_swig.doubleArray_setitem(*args)
doubleArray_setitem = _eccode_swig.doubleArray_setitem
return _gribapi_swig.doubleArray_setitem(*args)
doubleArray_setitem = _gribapi_swig.doubleArray_setitem
def new_longArray(*args):
return _eccode_swig.new_longArray(*args)
new_longArray = _eccode_swig.new_longArray
return _gribapi_swig.new_longArray(*args)
new_longArray = _gribapi_swig.new_longArray
def delete_longArray(*args):
return _eccode_swig.delete_longArray(*args)
delete_longArray = _eccode_swig.delete_longArray
return _gribapi_swig.delete_longArray(*args)
delete_longArray = _gribapi_swig.delete_longArray
def longArray_getitem(*args):
return _eccode_swig.longArray_getitem(*args)
longArray_getitem = _eccode_swig.longArray_getitem
return _gribapi_swig.longArray_getitem(*args)
longArray_getitem = _gribapi_swig.longArray_getitem
def longArray_setitem(*args):
return _eccode_swig.longArray_setitem(*args)
longArray_setitem = _eccode_swig.longArray_setitem
return _gribapi_swig.longArray_setitem(*args)
longArray_setitem = _gribapi_swig.longArray_setitem
def new_intArray(*args):
return _eccode_swig.new_intArray(*args)
new_intArray = _eccode_swig.new_intArray
return _gribapi_swig.new_intArray(*args)
new_intArray = _gribapi_swig.new_intArray
def delete_intArray(*args):
return _eccode_swig.delete_intArray(*args)
delete_intArray = _eccode_swig.delete_intArray
return _gribapi_swig.delete_intArray(*args)
delete_intArray = _gribapi_swig.delete_intArray
def intArray_getitem(*args):
return _eccode_swig.intArray_getitem(*args)
intArray_getitem = _eccode_swig.intArray_getitem
return _gribapi_swig.intArray_getitem(*args)
intArray_getitem = _gribapi_swig.intArray_getitem
def intArray_setitem(*args):
return _eccode_swig.intArray_setitem(*args)
intArray_setitem = _eccode_swig.intArray_setitem
return _gribapi_swig.intArray_setitem(*args)
intArray_setitem = _gribapi_swig.intArray_setitem
def grib_c_new_from_file(*args):
return _eccode_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _eccode_swig.grib_c_new_from_file
return _gribapi_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _gribapi_swig.grib_c_new_from_file
def grib_c_new_bufr_from_file(*args):
return _eccode_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _eccode_swig.grib_c_new_bufr_from_file
return _gribapi_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _gribapi_swig.grib_c_new_bufr_from_file
def grib_c_new_gts_from_file(*args):
return _eccode_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _eccode_swig.grib_c_new_gts_from_file
return _gribapi_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _gribapi_swig.grib_c_new_gts_from_file
def grib_c_iterator_new(*args):
return _eccode_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _eccode_swig.grib_c_iterator_new
return _gribapi_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _gribapi_swig.grib_c_iterator_new
def grib_c_keys_iterator_new(*args):
return _eccode_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _eccode_swig.grib_c_keys_iterator_new
return _gribapi_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _gribapi_swig.grib_c_keys_iterator_new
def grib_c_new_from_samples(*args):
return _eccode_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _eccode_swig.grib_c_new_from_samples
return _gribapi_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _gribapi_swig.grib_c_new_from_samples
def grib_c_index_new_from_file(*args):
return _eccode_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _eccode_swig.grib_c_index_new_from_file
return _gribapi_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _gribapi_swig.grib_c_index_new_from_file
def grib_c_index_add_file(*args):
return _eccode_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _eccode_swig.grib_c_index_add_file
return _gribapi_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _gribapi_swig.grib_c_index_add_file
def grib_c_new_from_index(*args):
return _eccode_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _eccode_swig.grib_c_new_from_index
return _gribapi_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _gribapi_swig.grib_c_new_from_index
def grib_c_index_write(*args):
return _eccode_swig.grib_c_index_write(*args)
grib_c_index_write = _eccode_swig.grib_c_index_write
return _gribapi_swig.grib_c_index_write(*args)
grib_c_index_write = _gribapi_swig.grib_c_index_write
def grib_c_index_read(*args):
return _eccode_swig.grib_c_index_read(*args)
grib_c_index_read = _eccode_swig.grib_c_index_read
return _gribapi_swig.grib_c_index_read(*args)
grib_c_index_read = _gribapi_swig.grib_c_index_read
def grib_c_new_from_message(*args):
return _eccode_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _eccode_swig.grib_c_new_from_message
return _gribapi_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _gribapi_swig.grib_c_new_from_message
def grib_c_count_in_file(*args):
return _eccode_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _eccode_swig.grib_c_count_in_file
return _gribapi_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _gribapi_swig.grib_c_count_in_file
def grib_c_release(*args):
return _eccode_swig.grib_c_release(*args)
grib_c_release = _eccode_swig.grib_c_release
return _gribapi_swig.grib_c_release(*args)
grib_c_release = _gribapi_swig.grib_c_release
def grib_c_write(*args):
return _eccode_swig.grib_c_write(*args)
grib_c_write = _eccode_swig.grib_c_write
return _gribapi_swig.grib_c_write(*args)
grib_c_write = _gribapi_swig.grib_c_write
def grib_c_get_size_long(*args):
return _eccode_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _eccode_swig.grib_c_get_size_long
return _gribapi_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _gribapi_swig.grib_c_get_size_long
def grib_c_get_string_length(*args):
return _eccode_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _eccode_swig.grib_c_get_string_length
return _gribapi_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _gribapi_swig.grib_c_get_string_length
def grib_c_clone(*args):
return _eccode_swig.grib_c_clone(*args)
grib_c_clone = _eccode_swig.grib_c_clone
return _gribapi_swig.grib_c_clone(*args)
grib_c_clone = _gribapi_swig.grib_c_clone
def grib_c_copy_namespace(*args):
return _eccode_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _eccode_swig.grib_c_copy_namespace
return _gribapi_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _gribapi_swig.grib_c_copy_namespace
def grib_c_get_message_size(*args):
return _eccode_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _eccode_swig.grib_c_get_message_size
return _gribapi_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _gribapi_swig.grib_c_get_message_size
def grib_c_get_message_offset(*args):
return _eccode_swig.grib_c_get_message_offset(*args)
grib_c_get_message_offset = _eccode_swig.grib_c_get_message_offset
return _gribapi_swig.grib_c_get_message_offset(*args)
grib_c_get_message_offset = _gribapi_swig.grib_c_get_message_offset
def grib_c_get_native_type(*args):
return _eccode_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _eccode_swig.grib_c_get_native_type
return _gribapi_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _gribapi_swig.grib_c_get_native_type
def grib_c_multi_new():
return _eccode_swig.grib_c_multi_new()
grib_c_multi_new = _eccode_swig.grib_c_multi_new
return _gribapi_swig.grib_c_multi_new()
grib_c_multi_new = _gribapi_swig.grib_c_multi_new
def grib_c_multi_support_on():
return _eccode_swig.grib_c_multi_support_on()
grib_c_multi_support_on = _eccode_swig.grib_c_multi_support_on
return _gribapi_swig.grib_c_multi_support_on()
grib_c_multi_support_on = _gribapi_swig.grib_c_multi_support_on
def grib_c_multi_write(*args):
return _eccode_swig.grib_c_multi_write(*args)
grib_c_multi_write = _eccode_swig.grib_c_multi_write
return _gribapi_swig.grib_c_multi_write(*args)
grib_c_multi_write = _gribapi_swig.grib_c_multi_write
def grib_c_multi_support_off():
return _eccode_swig.grib_c_multi_support_off()
grib_c_multi_support_off = _eccode_swig.grib_c_multi_support_off
return _gribapi_swig.grib_c_multi_support_off()
grib_c_multi_support_off = _gribapi_swig.grib_c_multi_support_off
def grib_c_multi_release(*args):
return _eccode_swig.grib_c_multi_release(*args)
grib_c_multi_release = _eccode_swig.grib_c_multi_release
return _gribapi_swig.grib_c_multi_release(*args)
grib_c_multi_release = _gribapi_swig.grib_c_multi_release
def grib_c_multi_append(*args):
return _eccode_swig.grib_c_multi_append(*args)
grib_c_multi_append = _eccode_swig.grib_c_multi_append
return _gribapi_swig.grib_c_multi_append(*args)
grib_c_multi_append = _gribapi_swig.grib_c_multi_append
def grib_c_gribex_mode_on():
return _eccode_swig.grib_c_gribex_mode_on()
grib_c_gribex_mode_on = _eccode_swig.grib_c_gribex_mode_on
return _gribapi_swig.grib_c_gribex_mode_on()
grib_c_gribex_mode_on = _gribapi_swig.grib_c_gribex_mode_on
def grib_c_gribex_mode_off():
return _eccode_swig.grib_c_gribex_mode_off()
grib_c_gribex_mode_off = _eccode_swig.grib_c_gribex_mode_off
return _gribapi_swig.grib_c_gribex_mode_off()
grib_c_gribex_mode_off = _gribapi_swig.grib_c_gribex_mode_off
def grib_c_keys_iterator_next(*args):
return _eccode_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _eccode_swig.grib_c_keys_iterator_next
return _gribapi_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _gribapi_swig.grib_c_keys_iterator_next
def grib_c_keys_iterator_delete(*args):
return _eccode_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _eccode_swig.grib_c_keys_iterator_delete
return _gribapi_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _gribapi_swig.grib_c_keys_iterator_delete
def grib_c_skip_computed(*args):
return _eccode_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _eccode_swig.grib_c_skip_computed
return _gribapi_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _gribapi_swig.grib_c_skip_computed
def grib_c_skip_coded(*args):
return _eccode_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _eccode_swig.grib_c_skip_coded
return _gribapi_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _gribapi_swig.grib_c_skip_coded
def grib_c_skip_edition_specific(*args):
return _eccode_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _eccode_swig.grib_c_skip_edition_specific
return _gribapi_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _gribapi_swig.grib_c_skip_edition_specific
def grib_c_skip_duplicates(*args):
return _eccode_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _eccode_swig.grib_c_skip_duplicates
return _gribapi_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _gribapi_swig.grib_c_skip_duplicates
def grib_c_skip_read_only(*args):
return _eccode_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _eccode_swig.grib_c_skip_read_only
return _gribapi_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _gribapi_swig.grib_c_skip_read_only
def grib_c_skip_function(*args):
return _eccode_swig.grib_c_skip_function(*args)
grib_c_skip_function = _eccode_swig.grib_c_skip_function
return _gribapi_swig.grib_c_skip_function(*args)
grib_c_skip_function = _gribapi_swig.grib_c_skip_function
def grib_c_keys_iterator_rewind(*args):
return _eccode_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _eccode_swig.grib_c_keys_iterator_rewind
return _gribapi_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _gribapi_swig.grib_c_keys_iterator_rewind
def grib_c_keys_iterator_get_name(*args):
return _eccode_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _eccode_swig.grib_c_keys_iterator_get_name
return _gribapi_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _gribapi_swig.grib_c_keys_iterator_get_name
def grib_c_index_get_size_long(*args):
return _eccode_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _eccode_swig.grib_c_index_get_size_long
return _gribapi_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _gribapi_swig.grib_c_index_get_size_long
def grib_c_index_get_long(*args):
return _eccode_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _eccode_swig.grib_c_index_get_long
return _gribapi_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _gribapi_swig.grib_c_index_get_long
def grib_c_index_get_real8(*args):
return _eccode_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _eccode_swig.grib_c_index_get_real8
return _gribapi_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _gribapi_swig.grib_c_index_get_real8
def grib_c_index_get_string(*args):
return _eccode_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _eccode_swig.grib_c_index_get_string
return _gribapi_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _gribapi_swig.grib_c_index_get_string
def grib_c_index_select_long(*args):
return _eccode_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _eccode_swig.grib_c_index_select_long
return _gribapi_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _gribapi_swig.grib_c_index_select_long
def grib_c_index_select_real8(*args):
return _eccode_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _eccode_swig.grib_c_index_select_real8
return _gribapi_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _gribapi_swig.grib_c_index_select_real8
def grib_c_index_select_string(*args):
return _eccode_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _eccode_swig.grib_c_index_select_string
return _gribapi_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _gribapi_swig.grib_c_index_select_string
def grib_c_index_release(*args):
return _eccode_swig.grib_c_index_release(*args)
grib_c_index_release = _eccode_swig.grib_c_index_release
return _gribapi_swig.grib_c_index_release(*args)
grib_c_index_release = _gribapi_swig.grib_c_index_release
def grib_c_iterator_delete(*args):
return _eccode_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _eccode_swig.grib_c_iterator_delete
return _gribapi_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _gribapi_swig.grib_c_iterator_delete
def grib_c_iterator_next(*args):
return _eccode_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _eccode_swig.grib_c_iterator_next
return _gribapi_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _gribapi_swig.grib_c_iterator_next
def grib_c_get_string(*args):
return _eccode_swig.grib_c_get_string(*args)
grib_c_get_string = _eccode_swig.grib_c_get_string
return _gribapi_swig.grib_c_get_string(*args)
grib_c_get_string = _gribapi_swig.grib_c_get_string
def grib_c_set_string(*args):
return _eccode_swig.grib_c_set_string(*args)
grib_c_set_string = _eccode_swig.grib_c_set_string
return _gribapi_swig.grib_c_set_string(*args)
grib_c_set_string = _gribapi_swig.grib_c_set_string
def grib_c_get_long(*args):
return _eccode_swig.grib_c_get_long(*args)
grib_c_get_long = _eccode_swig.grib_c_get_long
return _gribapi_swig.grib_c_get_long(*args)
grib_c_get_long = _gribapi_swig.grib_c_get_long
def grib_c_set_long(*args):
return _eccode_swig.grib_c_set_long(*args)
grib_c_set_long = _eccode_swig.grib_c_set_long
return _gribapi_swig.grib_c_set_long(*args)
grib_c_set_long = _gribapi_swig.grib_c_set_long
def grib_c_get_double(*args):
return _eccode_swig.grib_c_get_double(*args)
grib_c_get_double = _eccode_swig.grib_c_get_double
return _gribapi_swig.grib_c_get_double(*args)
grib_c_get_double = _gribapi_swig.grib_c_get_double
def grib_c_set_double(*args):
return _eccode_swig.grib_c_set_double(*args)
grib_c_set_double = _eccode_swig.grib_c_set_double
return _gribapi_swig.grib_c_set_double(*args)
grib_c_set_double = _gribapi_swig.grib_c_set_double
def grib_c_set_real8_array(*args):
return _eccode_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _eccode_swig.grib_c_set_real8_array
return _gribapi_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _gribapi_swig.grib_c_set_real8_array
def grib_c_get_real8_array(*args):
return _eccode_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _eccode_swig.grib_c_get_real8_array
return _gribapi_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _gribapi_swig.grib_c_get_real8_array
def grib_c_get_long_array(*args):
return _eccode_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _eccode_swig.grib_c_get_long_array
return _gribapi_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _gribapi_swig.grib_c_get_long_array
def grib_c_set_long_array(*args):
return _eccode_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _eccode_swig.grib_c_set_long_array
return _gribapi_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _gribapi_swig.grib_c_set_long_array
def grib_c_get_real8_element(*args):
return _eccode_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _eccode_swig.grib_c_get_real8_element
return _gribapi_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _gribapi_swig.grib_c_get_real8_element
def grib_c_get_real8_elements(*args):
return _eccode_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _eccode_swig.grib_c_get_real8_elements
return _gribapi_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _gribapi_swig.grib_c_get_real8_elements
def grib_c_set_missing(*args):
return _eccode_swig.grib_c_set_missing(*args)
grib_c_set_missing = _eccode_swig.grib_c_set_missing
return _gribapi_swig.grib_c_set_missing(*args)
grib_c_set_missing = _gribapi_swig.grib_c_set_missing
def grib_c_set_key_vals(*args):
return _eccode_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _eccode_swig.grib_c_set_key_vals
return _gribapi_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _gribapi_swig.grib_c_set_key_vals
def grib_c_is_missing(*args):
return _eccode_swig.grib_c_is_missing(*args)
grib_c_is_missing = _eccode_swig.grib_c_is_missing
return _gribapi_swig.grib_c_is_missing(*args)
grib_c_is_missing = _gribapi_swig.grib_c_is_missing
def grib_c_is_defined(*args):
return _eccode_swig.grib_c_is_defined(*args)
grib_c_is_defined = _eccode_swig.grib_c_is_defined
return _gribapi_swig.grib_c_is_defined(*args)
grib_c_is_defined = _gribapi_swig.grib_c_is_defined
def with_numpy():
return _eccode_swig.with_numpy()
with_numpy = _eccode_swig.with_numpy
return _gribapi_swig.with_numpy()
with_numpy = _gribapi_swig.with_numpy
def grib_set_double_ndarray(*args):
return _eccode_swig.grib_set_double_ndarray(*args)
grib_set_double_ndarray = _eccode_swig.grib_set_double_ndarray
return _gribapi_swig.grib_set_double_ndarray(*args)
grib_set_double_ndarray = _gribapi_swig.grib_set_double_ndarray
def grib_set_long_ndarray(*args):
return _eccode_swig.grib_set_long_ndarray(*args)
grib_set_long_ndarray = _eccode_swig.grib_set_long_ndarray
return _gribapi_swig.grib_set_long_ndarray(*args)
grib_set_long_ndarray = _gribapi_swig.grib_set_long_ndarray
def grib_get_double_ndarray(*args):
return _eccode_swig.grib_get_double_ndarray(*args)
grib_get_double_ndarray = _eccode_swig.grib_get_double_ndarray
return _gribapi_swig.grib_get_double_ndarray(*args)
grib_get_double_ndarray = _gribapi_swig.grib_get_double_ndarray
def grib_get_long_ndarray(*args):
return _eccode_swig.grib_get_long_ndarray(*args)
grib_get_long_ndarray = _eccode_swig.grib_get_long_ndarray
return _gribapi_swig.grib_get_long_ndarray(*args)
grib_get_long_ndarray = _gribapi_swig.grib_get_long_ndarray
def grib_get_double_ndelements(*args):
return _eccode_swig.grib_get_double_ndelements(*args)
grib_get_double_ndelements = _eccode_swig.grib_get_double_ndelements
return _gribapi_swig.grib_get_double_ndelements(*args)
grib_get_double_ndelements = _gribapi_swig.grib_get_double_ndelements
def grib_c_find_nearest_single(*args):
return _eccode_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _eccode_swig.grib_c_find_nearest_single
return _gribapi_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _gribapi_swig.grib_c_find_nearest_single
def grib_c_find_nearest_four_single(*args):
return _eccode_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _eccode_swig.grib_c_find_nearest_four_single
return _gribapi_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _gribapi_swig.grib_c_find_nearest_four_single
def grib_c_get_message(*args):
return _eccode_swig.grib_c_get_message(*args)
grib_c_get_message = _eccode_swig.grib_c_get_message
return _gribapi_swig.grib_c_get_message(*args)
grib_c_get_message = _gribapi_swig.grib_c_get_message
def grib_c_get_error_string(*args):
return _eccode_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _eccode_swig.grib_c_get_error_string
return _gribapi_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _gribapi_swig.grib_c_get_error_string
def no_fail_on_wrong_length(*args):
return _eccode_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _eccode_swig.no_fail_on_wrong_length
return _gribapi_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _gribapi_swig.no_fail_on_wrong_length
def grib_c_get_api_version():
return _eccode_swig.grib_c_get_api_version()
grib_c_get_api_version = _eccode_swig.grib_c_get_api_version
return _gribapi_swig.grib_c_get_api_version()
grib_c_get_api_version = _gribapi_swig.grib_c_get_api_version
def grib_c_gts_header_on():
return _eccode_swig.grib_c_gts_header_on()
grib_c_gts_header_on = _eccode_swig.grib_c_gts_header_on
return _gribapi_swig.grib_c_gts_header_on()
grib_c_gts_header_on = _gribapi_swig.grib_c_gts_header_on
def grib_c_gts_header_off():
return _eccode_swig.grib_c_gts_header_off()
grib_c_gts_header_off = _eccode_swig.grib_c_gts_header_off
return _gribapi_swig.grib_c_gts_header_off()
grib_c_gts_header_off = _gribapi_swig.grib_c_gts_header_off

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
import sys
from eccode import *
from gribapi import *
import random
import traceback
@ -14,7 +14,7 @@ class Usage(Exception):
def test():
# test new from sample
#release(grib_new_from_samples("GRIB2"))
#grib_release(grib_new_from_samples("GRIB2"))
if len(sys.argv) < 2:
raise Usage
@ -29,7 +29,7 @@ def test():
while 1:
gid = grib_new_from_file(fid)
if not gid: break
release(gid)
grib_release(gid)
fid.close()
fid = open(infile,"r")
@ -70,16 +70,16 @@ def test():
#grib_print(gid,"centre")
if i == 0:
print "Message size: ",get_message_size(gid)
nval = get_size(gid,"values")
print "Message size: ",grib_get_message_size(gid)
nval = grib_get_size(gid,"values")
print "Number of values in message %d is %d" % (i,nval)
print "== %s %s %s %d ==" % \
( \
get_string(gid,"shortName"), \
get_string(gid,"name"), \
get_string(gid,"typeOfLevel"), \
get_long(gid,"level"), \
grib_get_string(gid,"shortName"), \
grib_get_string(gid,"name"), \
grib_get_string(gid,"typeOfLevel"), \
grib_get_long(gid,"level"), \
)
print "Nearest point to 10,10: "
@ -91,61 +91,61 @@ def test():
for i in range(0,5):
rand_index = random.randint(1,nval)
rand_list.append(rand_index)
myval = get_double_element(gid,"values",rand_index)
myval = grib_get_double_element(gid,"values",rand_index)
print "Random index value[%d] = %.8f" % (rand_index,myval)
all4rand = get_double_elements(gid,"values",rand_list)
all4rand = grib_get_double_elements(gid,"values",rand_list)
print "All at once index values: ",all4rand
centre = get_string(gid,"centre")
set_string(gid,"centre","ecmf")
new_centre = get_string(gid,"centre")
centre = grib_get_string(gid,"centre")
grib_set_string(gid,"centre","ecmf")
new_centre = grib_get_string(gid,"centre")
print "Before/after string centre: %s/%s" % (centre,new_centre)
centre = get_long(gid,"centre")
set_long(gid,"centre",99)
new_centre = get_long(gid,"centre")
centre = grib_get_long(gid,"centre")
grib_set_long(gid,"centre",99)
new_centre = grib_get_long(gid,"centre")
print "Before/after numeric centre: %d/%d" % (centre,new_centre)
centre = get_double(gid,"centre")
set_double(gid,"centre",9)
new_centre = get_double(gid,"centre")
centre = grib_get_double(gid,"centre")
grib_set_double(gid,"centre",9)
new_centre = grib_get_double(gid,"centre")
print "Before/after numeric floating point centre: %f/%f" % (centre,new_centre)
vals = get_double_array(gid,"values")
vals = grib_get_double_array(gid,"values")
print "Values before: ",vals[:10]
set_double_array(gid,"values",(1.0, 2.0, 3.14))
vals = get_double_array(gid,"values")
grib_set_double_array(gid,"values",(1.0, 2.0, 3.14))
vals = grib_get_double_array(gid,"values")
print "Values after: ",vals[:10]
print "Saving modified message to %s" % outfile
if WRITE: grib_write(gid,out)
print "Creating and saving a clone to %s" % clonefile
clone_gid = clone(gid)
clone_gid = grib_clone(gid)
if WRITE: grib_write(clone_gid,clone_fid)
release(clone_gid)
grib_release(clone_gid)
Ni = get(gid,"Ni")
Ni = grib_get(gid,"Ni")
print "Setting Ni to missing from --> ",Ni
set_missing(gid,"Ni")
assert is_missing(gid,"Ni")
miss_Ni = get(gid,"Ni")
grib_set_missing(gid,"Ni")
assert grib_is_missing(gid,"Ni")
miss_Ni = grib_get(gid,"Ni")
print "Ni is now --> ",miss_Ni
set(gid,"Ni",Ni)
new_Ni = get(gid,"Ni")
grib_set(gid,"Ni",Ni)
new_Ni = grib_get(gid,"Ni")
print "Set Ni back to its original value --> ",new_Ni
assert Ni == new_Ni
print "Check some keys to see if they are defined"
assert is_defined(gid,"Ni")
assert is_defined(gid,"edition")
assert not is_defined(gid,"DarkThrone")
assert grib_is_defined(gid,"Ni")
assert grib_is_defined(gid,"edition")
assert not grib_is_defined(gid,"DarkThrone")
#grib_multi_write(gid,multi)
release(gid)
grib_release(gid)
fid.close()
out.close()
@ -156,7 +156,7 @@ def test():
def main():
try:
test()
except InternalError,err:
except GribInternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else: