bring master in sync with p4 main

This commit is contained in:
Tiago Quintino 2013-03-25 14:23:07 +00:00
parent 33b891186d
commit dedac1b286
400 changed files with 10745 additions and 6527 deletions

View File

@ -3,3 +3,4 @@ Enrico Fucile
Baudoin Raoult
Cristian Codorean
Jean-Baptiste Filippi

458
ChangeLog
View File

@ -1,457 +1,5 @@
21-01-2013 Shahram Najm
-- released version 1.10.0
* Updated copyright notices to Apache Licence Version 2.0
http://www.apache.org/licenses/LICENSE-2.0
* Availability of grib2netcdf tool from grib_api
* Support in grib_api for Lambert Conformal grid (grib_get_data)
* Updated GRIB edition 2 definitions with the latest WMO V9 templates/tables
* ERA-CLIM: Added support for Simulated Radiances
* LWDA: Added support to Long Window 4DVar
* ERA-CLIM: New stream (ensemble supplementary data) and origin (Hadley Centre)
* GRIB definitions of new variables from LISFLOOD hydrological model
* Added Local Definition 21 (Sensitive area predictions) for GRIB edition 2
* Provided user-friendly function in API to check if a key is defined (grib_is_defined)
* Python: Provided function to set key values in one go (like grib_set -s)
* New MARS codes for surface parameters (effective total cloudiness)
* Corrected ifs_samples installation path
* New streams for ensemble data added to the parameter database
* New mars streams added for ensemble data assimilation
* Added pseudo-grib (budg) sample file for IFS
* Added new centre codes for COSMO, Ireland and Austria
* Bug fix: python interface missing __version__
* Bug fix: on make dist, definitions and sample go to /usr/share instead of /usr/share/grib_api/
* Bug fix: padding.sh fails in Debian automatic build machines
* Bug fix: Lambert azimuthal equal area
* Bug fix: Assertion when trying to encode the level information of some cloud cover fields
* Bug fix: ERA-CLIM: Support for existing streams EDMM, EDMO, EWMM, EWMO
* Bug fix: Netcdfs generated by grib_to_netcdf seem to be upside down
* Bug fix: python binding without numpy support grib_get_array(gid,'pv',float)
* Bug fix: grib_dump crashing with some second order packed files
* Bug fix: running grib_to_netcdf on a non regular lat/lon grid grib file results in invalid netcdf
* Bug fix: Assertion: Interpolation (or truncation) of GRIB 2 data into T21
* Bug fix: Make sure that grib_filter checks all disk writes.
* Bug fix: if "configure" is run without --prefix, IFS_SAMPLES_PATH starts with "NONE"
* Bug fix: grib_to_netcdf: long_name/units incorrect
* Bug fix: grib_filter error: converting edition 1 to 2: unable to get extraDimensionPresent as long
* Bug fix: grib_check Fortran definition is inconsistent with other Fortran definition:
uses "integer" instead of "integer(kind=kindOfInt)" as status variable
* Bug fix: Remove redundant MARS type and stream entries for TIGGE
* Bug fix: Remove layer information from grib_api concepts for soil parameters
* Bug fix: grib_api 1.10.0 with MARS client: Interpolation failed
* Bug fix: Remove parameter 500011: 2m Temperature
* Bug fix: Remove new grib2 representations for parameters: 210004 and 210061
* Bug fix: Wrong short name for centre 82 in 0.table
* Bug fix: configure option disable-vector actually enables it!
* Bug fix: LWDA: Support for Errors in Analysis
The changelog is now online. Please see:
https://software.ecmwf.int/wiki/display/GRIB/History+of+Changes
19-10-2012 Shahram Najm
-- released version 1.9.18
* Updated sample gribs with recent changes for Reduced Gaussian N1024 and N2000
* Updated GRIB2 definitions with the latest WMO version 8 templates/tables
* Added missing parts in Grid Definition Template 3.120
* Added GRIB2 template 4.32 (simulated satellite data)
* Removed redundant MARS files for type and stream combinations
* Bug fix: Segmentation violation: calling grib_set on 'values' (decimal scale factor)
* Bug fix: grib_get_data returns incorrect lat-lon values for some GRIBS
* Bug fix: grib_filter does not fail with a non-zero return code when setting an invalid key
* Bug fix: Cannot set paramId to 228170 (Field Capacity) for grib edition 2
* Bug fix: grib_api compilation fails when enabling pthreads in recent Linux distributions
* Bug fix: Segmentation violation when GRIB_DEFINITION_PATH contains colon
* Bug fix: Compilation failure: problems with GRIB_INLINE: undefined reference to stdio_read etc
* Bug fix: Setting step to the new value in GRIB2 creates wrong [day,hour]endOfOverallTimeInterval
* Bug fix: grib_keys -L should show the real contents of SAMPLES PATH
* Bug fix: Crash: Running the fortran example get_data
* Bug fix: grib_filter with verbose option -v writes out lots of blank lines
* Bug fix: tools/grib1to2.sh depends on /usr/bin/ksh which is a non standard location and breaks RPMs
* Bug fix: GRIB1: Problem with derive probability for wave height larger than 8m
* Bug fix: Bug when printing thickness of layers (typeOfLevel = depthBelowLandLayer)
* Bug fix: Correct typos in parameter database
* Bug fix: test script second_order.sh not working on some stricter shells
* Bug fix: Compilation failure: tools/grib_compare.c - error on SX9 with the "end" variable
* Bug fix: Build fails in Solaris 10: Wrong Fortran module include
16-03-2012 Shahram Najm
-- released version 1.9.16
* Disabled boustrophedonic ordering in second order packing.
* Fixed the python bug in setting keys of type "double".
* New parameters have been added to the parameter database and to the definition files.
* Fixed a problem producing unwanted padding between messages when converting some fields from second order packing
* Improved thread safety in relation to the creation of an index. Creating a new grib_handle or indexing different files is thread safe.
* Fixed grib_dump not to display zeros when all values were missing.
* Fixed minor bugs
17-03-2011 Enrico Fucile
-- released version 1.9.9
* Several changes have been made to the internal functions used by the interpolation package in EMOSLIB 381
to make the results of the grib_api based interpolation as close as possible to the GRIBEX based one.
* laplacianOperator for spectral fields is always computed. If the computation is not required please
set the key computeLaplacianOperator=0. Default behaviour is computeLaplacianOperator=1.
* New parameters have been added to the parameter database and to the definition files regarding
the MACC project.
* Second order packing (packingType=grid_second_order) is producing smaller fields as the default setting
is to use the boustrophedonic option.
25-02-2011 Enrico Fucile
-- released version 1.9.8
* WARNING: A significant change in the fortran interface has been done for which some
software using the previous versions could exhibits memory allocation problems due
to unreleased memory associated with the GRIB messages. In the previous versions
(starting from version 1.6.1) the argument IGRIB of the functions GRIB_NEW_FROM_FILE,
GRIB_NEW_FROM_MESSAGE, GRIB_NEW_FROM_INDEX, GRIB_CLONE was an input and output argument.
In the new version IGRIB is output only and the grib message associated with IGRIB will
never be released by the GRIB_NEW_FROM_FILE function. This means that to release the memory
associated to the message a call to GRIB_RELEASE(IGRIB) has to be introduced when the message
is not needed any more. In the previous version the memory was released when a value of IGRIB
associated with a valid message was passed to the function. It has been realised that this
behaviour was source of unexpected results when the IGRIB variables used in the user code were
not initialised to a non valid IGRIB value (zero or negative integer). We strongly advise the
users to revise the existing code using previous grib_api versions or to link to the new library,
add the appropriate GRIB_RELEASE calls and test it for memory allocation.
For convenience we report an example of code which could cause problems and has to be reviewed.
integer :: IGRIB1
integer :: IGRIB2
call grib_new_from_file(IGRIB1,...)
... do something ...
call grib_new_from_file(IGRIB2,...)
... do something ...
IGRIB1 and IGRIB2 are not initialised to zero and we don't know which value is assigned to them.
It could be IGRIB1=IGRIB2=5 or any other number greather or equal to zero. If this happens at the
second call of grib_new_from_file IGRIB1 will be replaced by IGRIB2 producing very dangerous
consequences as the IGRIB1 doesn't point any more to the GRIB message it was supposed to.
Please revise your code in view of this example or link to the new version and add a call
to the GRIB_RELEASE function to release the memory when the which is not any more released in the new version.
* Second order packing algorithm rewritten and working in GRIB edition 1 and 2 with
packingType=grid_second_order.
* This version is ready to be used with the new GRIB1 and GRIB2 interpolation function (INTF2)
available in EMOSLIB.
* A significant change in the fortran interface has been done for which some software using the
previous versions could exhibits memory allocation problems due to unreleased memory associated
with the GRIB messages. In the previous versions (starting from version 1.6.1) the argument IGRIB
of the function GRIB_NEW_FROM_FILE(IFILE,IGRIB) was an input and output argument.
In the new version is output only and the grib message associated with IGRIB will never be released
by the GRIB_NEW_FROM_FILE function. This means that to release the memory associated to the message
a call to GRIB_RELEASE(IGRIB) has to be introduced when the message is not needed any more. In the
previous version the memory was released when a value of IGRIB associated with a valid message was
passed to the function. It has been realised that this behaviour was source of unexpected results
when the IGRIB variables used in the user code were not initialised to a non valid IGRIB value
(zero or negative integer).
* Review and update of the code tables.
* Added new parameters. Full list of parameters accessible from
http://www.ecmwf.int/publications/manuals/d/gribapi/param/
* Bug fixes.
14-10-2010 Enrico Fucile
-- released version 1.9.5
* Python interface available with the configure option --enable-python.
See http://www.ecmwf.int/publications/manuals/grib_api/namespacegribapi.html
and http://www.ecmwf.int/publications/manuals/grib_api/grib_examples.html
* Available new environment variable GRIB_API_IO_BUFFER_SIZE defining the size in bytes of the buffer
used in the IO calls from Fortran and in the tools.
* Performance improvements and partial vectorisation for the NEC SX platform.
* Review and update of the code tables.
* Update of paramId, shortName, name key values and release of a new parameter database web interface.
* Added a new key called 'global' for regular_gg and reduced_gg which can take the values 1 ( =True) or 0 (=False).
This is used to specify whether the grid is global or not. Setting global=1 will set the grid parameters computed
only from N and Ni. It is used in the conversion from one edition to the other.
* Available new environment variable GRIB_API_NO_ABORT. Default value is 0 and when it is set to 1 the library will not
abort on failing asserts.
* Bug fixes.
07-05-2010 Enrico Fucile
-- released version 1.9.0
* Setting paramId or converting from one edition to the other when a parameter is not
defined in the paramId.def file will result in a failure.
* Improved performance in reading/cloning a message.
* Changed the indexing system and provided new functions to write the index on a file
grib_index_write and read it grib_index_read
* Provided a new tool to build an index from a set of files: grib_index_build.
* The tool grib_compare is able to compare two index files, going through the grib messages
indexed in the first and searching for them in the second.
* definition files and library have been updated to be used in operational status in the
IFS cycle 36R2
* grib_ls has slightly changed format.
* A -j option is provided in grib_ls (-l only) to have the output in json format.
* BUFR messages are read, but only very basic decoding is provided.
* Parameters have been updated.
* Native type of paramId has been changed from string to integer.
* Several small bug fixes.
23-07-2009 Enrico Fucile
-- released version 1.8.0
* Improved conversion from edition 1 to 2. Set edition=2 will do the conversion
from edition 1 to 2 also of the parameter information.
* shortName, paramId and units are defined for all the official WMO parameters
and for local parameters used at ECMWF and NCEP
* grib_compare has been modified to compare grib 1 and 2 (option -e).
Other important chages have been done on grib_compare to have a more powerful tool to compare headers and
values. New options are provided to choose the tolerance and new namespaces are available to
compare only the relevant part of information. The new namespaces are.
parameter,geography,vertical,time,local,data.
* For some ECMWF local definitions the conversion rules have been included in grib_api.
* A new key cfName is provided for the netcdf CF name. It is at the moment defined
only for some parameters.
* The parameter information is generated from a parameter database maintained at ECMWF
and accessible from a new section in the grib_api web pages.
* A new key typeOfLevel valid for grib edition 1 and 2, with the following values has been introduced
'surface', 'cloudBase', 'cloudTop', 'isothermZero', 'adiabaticCondensation', 'maxWind',
'tropopause', 'nominalTop', 'seaBottom', 'isobaricInhPa', 'isobaricInPa', 'isobaricLayer',
'meanSea', 'isobaricLayerHighPrecision', 'isobaricLayerMixedPrecision', 'heightAboveSea',
'heightAboveSeaLayer', 'heightAboveGroundHighPrecision', 'heightAboveGround', 'heightAboveGroundLayer'
'sigma', 'sigmaLayer', 'sigmaLayerHighPrecision', 'hybrid', 'hybridLayer', 'depthBelowLand',
'depthBelowLandLayer', 'theta', 'thetaLayer', 'pressureFromGround', 'pressureFromGroundLayer',
'potentialVorticity', 'depthBelowSea', 'entireAtmosphere', 'entireOcean', 'oceanWave', 'oceanMixedLayer'
* The open source library OpenJpeg can be used in place of Jasper for the jpeg 2000 coding.
--with-openjpeg options in the configure.
* decimalPrecision can be used also with grid_jpeg packing.
* parameterName,parameterUnits are provided from the code tables.
* packingError is also available for spherical harmonics packing. It provieds the error due to simple packing.
* option -l added in grib_get
* option -F added in grib_get and grib_ls to control the format of floating point keys.
* grib_ls output has been changed due to the introduction of the new typeOfLevel key
* Subroutine grib_is_missing added in the Fortran interface to check if a header value is missing.
* Changed step behaviour. If the step is "instant" and the value doesn't fit into one byte (in grib 1)
* an appropriate value of timeRangeIndicator is found to code the value in two bytes instead of 1.
* In grib_filter the function "append" has been added to append a message to a file as opposed to "write" which is
writing from the beginning of the file.
* A new grib_count function is available to count (very fate) the number of messages in a list of files.
* The value of the key level is zero in both edition when it is not relevant for the message and it is
missing in grib edition 2.
* The indexing routines have been improved to process string keys.
06-03-2009 Enrico Fucile
-- released version 1.7.0
* New indexing routines.
Example: index.f90
(http://www.ecmwf.int/publications/manuals/grib_api/grib_examples.html)
* New keys stepType,stepUnits,stepRange,startStep,endStep.
* New keys swapScanningX, swapScanningY, swapScanningLat, swapScanningLon. To
swap the field respect one axis. They swap data and fix the header accordingly.
* "Improved" error messages.
* write multi fields. Previous versions of grib_api were able only to read multi
fields, now you can also write multi fields. We don't suggest to you this
feature, it is included only to be compliant with FM-92 spec.
Examples: multi.f90, multi_write.f90
(http://www.ecmwf.int/publications/manuals/grib_api/grib_examples.html)
* function grib_new_from_template is deprecated and it will be replaced with
grib_new_from_samples. Also the environment variable GRIB_TEMPLATES_PATH is
replaced by GRIB_SAMPLES_PATH. Please replace "template" with "samples" in all
the C functions also. The behavior is the same. I made a new example showing the
best practice to use samples. The technique of cloning is strongly recommended.
Example: samples.f90
(http://www.ecmwf.int/publications/manuals/grib_api/grib_examples.html)
* New key decimalPrecision provided. Used in the previous example. Regarding
decimalPrecision and bitsPerValue the following problem was found in the
previous version. If after loading from file or from sample (template) or
cloning a constant field you set some non constant values the library doesn't
know the bitsPerValue or the decimalPrecision you want to code (those are zero
in the constant field). The result could have been a field coded with a poor
precision. Starting with the new 1.7.0 version in these ambiguous cases grib_api
is using 24 bits to pack the field (safe value). We always suggest to set
explicitly the bitsPerValue or decimalPrecision or to clone non constant fields
with those values properly set.
* grib_copy, grib_set. A key name in square brackets can be used in the output
file name. The key will be replaced with its value in the processed grib
message. This will provide an easy way for splitting fields as the file name
will be dependent on some key values. Example:
grib_copy input.grib "output_[shortName]_[date]_[step].grib"
Please remember to quote the file name otherwise you can get strange behaviors
due to the shell.
* New key packingError. The error introduced by the packing algorithm is
returned with this key. It is available only for some packing algorithms. All
the packed values are affected by this error in the sense that
original value before packing = unpacked value ± packingError
packingError is different for different fields (also for different steps of the
same parameter/level/run).
* all the nearest functions are returning the distance from the grid point in
Km, using the radius coded in the message.
* key bitmapPresent now available also in grib 2. Example: bitmap.f90
(http://www.ecmwf.int/publications/manuals/grib_api/grib_examples.html)
30-09-2008 Enrico Fucile
-- released version 1.6.4
* Fields containing a bitmap with all missing values can be coded in grib1 and grib2
* Multifields grib2 messages can be loaded from memory.
* local definition 31 added
* Better use of memory
* minor bug fixes
16-07-2008 Enrico Fucile
-- released version 1.6.1
* More efficient use of memory and improvement of performance.
* Thread safe version available through the --enable-pthread configure option.
* New computation of kindOfInt, kindOfLong, kindOfDouble, kindOfFloat, kindOfSize
to allow safe arguments handing between Fortran 90 and C.
* A new key bitmap is provided to get the full bitmap as a string with the grib_filter
instruction: print "[bitmap]";
* all the tools are failing on error and can be forced to proceed execution with
the option -f . The only exception is grib_ls because we already have an identical
tool failing (grib_get).
* new error messages from the Fortran 90 interface will give you some more chance to debug
your code.
* New function grib_count_in_file available from Fortran and C to count the messages in a file.
See example: examples/F90/count_messages.f90
* In the Fortran 90 interface any valid grib id passed to a grib_new_from_file or grib_new_from_message
will be released before being assigned to a new grib message.
Example
call grib_new_from_file(ifile,igrib, iret)
do while (iret /= GRIB_END_OF_FILE)
... do something with the message pointed by igrib
... igrib will have the same value, but
... it will point to a different message each cycle
... the message from the previous cycle will be released
... no need for grib_release(igrib)
call grib_new_from_file(ifile,igrib, iret)
enddo
If you want to keep the grib message in memory remember to pass a negative grib id.
Example
call grib_count_in_file(ifile,n)
allocate (igrib(n))
do i=1,n
call grib_new_from_file(ifile,igrib(i), iret)
...
enddo
... remember to release the grib ids to free memory
do i=1,n
call grib_release(igrib(i))
enddo
* grib_filter is now able to print with a format, number of colums and a separator for array keys.
The format is expressed with a % followed by a C like (printf) format declarator.
The number of columns is started with !
The separator string is delimited by ' '
Examples
print "[values!6%.5f',']" values with 5 digits precision in 6 columns separated by ,
print "[latitudes%.3f!1]" latitudes with 3 digits precision in a column
print "pl={[pl!7', ']}" pl (number of point for each latitude) in 7 columns separated by ', '
* New keys:
julianDay
latLonValues array containing latitude(1),longitude(1),value(1), latitude(2),longitude(2),value(2),...,
latitude(N),longitude(N),value(N) (N=number of points in the grid)
latitudes latitude(1),latitude(2),...,latitude(N) (N=number of points in the grid)
longitudes longitude(1),longitude(2),...,longitude(N) (N=number of points in the grid)
distinctLatitudes list of distinct latitudes
distinctLongitudes list of distinct longitudes
* minor bug fixes
03-06-2008 Enrico Fucile
-- released version 1.5.0
* Review of packing algorithms. Improvement of performance mainly on big endian
platforms.
* Modified the internal retrieval of keys, improving performance in getting and setting
keys.
* Implemented memory management. An efficient tecnique to reuse memory is implemented.
--disable-memory-management configure option available to disable the memory managemet
and use system malloc/free.
* Some experimental multithreaded packing is available for big endian machines.
A configure option --enable-omp-packing is provided to enable the openMP instructions
contained in the new packing. The environment variable OMP_NUM_THREADS sets the number
of threads used in the packing algorithm.
* grib_filter improvement:
* it is now possible to set array keys like values or pl as follows:
values = { 0.1, 3.2, 7.5 };
* it is now possible to print array keys like values or pl as follows:
print "values=[values]";
it is also possible to print on a file ("test.out") doing:
print("test.out") "values=[values]";
* better error messages are printed
* it does not fail if an undefined key is used in a write or print statement
* New keys or changed keys:
* a scale factor and an offset can be applied to the data values through the keys
"scaleValuesBy" and "offsetValuesBy".
* setBitsPerValue is the new key to be used to change the number of bits per value.
It also executes the repacking.
* The keys periodOfTime is now working also when indicatorOfUnitOfTimeRange=0 (time units is
minutes)
* Concepts can be defined by the user. Concepts are a way to link the value of a key to
a combination of values of other keys. They are used to define the short_name and the
name.
* minor bug fixes
07-02-2008 Enrico Fucile
-- released version 1.4.0
* New Fortan 90 interface. Main featues:
* unique grib_get/grib_set subroutines to get/set any variable type.
* status code is an optional argument in all the subroutines (when omitted
the program will exit in case of error)
* new subroutine grib_get_data to get the latitude/longitude/values arrays.
* new subroutine grib_get_element to get one or several elements of an array key
through their index.
* new subroutine grib_nearest function to get the nearest grid point of a given lat/lon.
It accepts in input also arrays of latitude/longitudes to find the nearest points in one
single call. A land sea mask mode is also available to get the nearest land point.
* New Fortran 90 examples and documentation.
* New grib_keys tool to obtain the list of keys available for a specified type of grib.
* Modified the -l option in grib_ls (see documentation or type grib_ls without arguments)
* fixed a bug in the grib_filter and added the -o option for the output file.
* minor bug fixes.
12-11-2007 Enrico Fucile
-- released version 1.3.0
* grib_ls -l lat/lon/mode to retrieve values in the nearest grid points of a given
latitude longitude point
* grib_ls -B"order by" to order the output using some keys
* grib_ls -i index. To extract the value in the index grid point.
* new grib_dump exposing a minimum set of keys which are the ones suggested for the
standard use. Some options added to the grib_dump. The output of this new
grib_dump is ready to be coupled to the new grib_gen which will be released in the
next version.
* grib_copy -r to repack data fixing problems in the original file
* improved keys search for faster tools
* grib_get_data and grib_iterator working with all scanning mode
* new experimental functions introduced, not available in the fortran
interface: grib_fieldset_new,grib_fieldset_apply_order_by,grib_fieldset_next_handle
grib_nearest_new,grib_nearest_find,grib_nearest_delete
* some examples on the grib_fieldset and grib_nearest are added.
* The management of the missing data in grib_get_data is changed. Please refer to the help
obtained executing grib_get_data without arguments.
* Added the key stepRange which is native type string. It can represent start and end of a
cumulation or a max of min interval. Example stepRange=24-36 for a precipitation means that it
is cumulated between 24 and 36. It also addresses the problems with the big steps which don't
fit in the grib1 P1 and P2.
* Added key numberOfCodedValues. It is different from numberOfValues only if a bitmap is present and
the difference between the two should be numberOfMissingValues.
* Added the option -g to grib_copy, grib_set, grib_convert, grib_filter to preserve GTS headers
wrapping the grib message
* fixed some bugs in the fortran interface
* fixed a bug in reading the signed floats with the grib_convert.
01-09-2007 Enrico Fucile
-- released version 1.2.0
* changed license. Now grib_api is distributed under LGPL see LICENSE file in distribution.
* changed io functions and configure.ac to support files larger than 2GB
* as a consequence to the large file support the key offset has native type double
* added support for predefined grids
* modified grib_handle_new_from_file to read messages with wrong message length.
In this case an error will be raised.
* A new -M option is provided for all the tools to turn off the multi-field grib
support.
* Changed behaviour of grib_copy. Default is quiet and option -v (verbose) is available.
09-07-2007 Enrico Fucile
-- released version 1.1.0
* fixed a bug affecting constant fields.
* rewritten the ibm floating point encoding/decoding routines gaining a factor of 7 in performance
* fixed a problem in the configure affecting compilation of fortran programs on AIX platforms
* Added some new keys:
* max,min,average (maximum, minimum and average respectively of the data )
* numberOfDataPoints(alias numberOfPoints) computed from the grid description
* numberOfValues is the same as the numberOfPoints if a bitmap is not present
otherwise it takes into account the bitmap
* numberOfMissing (alias numberOfMissingValues) number of missing values in the field
It's easy to check if a field is constant by simply comparing max,min,average
and some information about bitmap and missing values can be found comparing numberOfValues
numberOfPoints, numberOfMissing.
* added some new tests
* added a new example on how to print all the data when the iterator is not available.
* grib_tools are now failing with an error when the input file does not contain any
valid grib message
* added management of reduced gaussian non global fields.
17-04-2007 Enrico Fucile
* grib_api version 1.0 released

View File

@ -22,7 +22,7 @@ else
PYTHON_OPT =
endif
SUBDIRS = src tools definitions samples ifs_samples/grib1 ifs_samples/grib1_mlgrib2 ifs_samples/grib1_mlgrib2_ieee64 tests tigge $(FORTRAN_MOD) examples/C $(F90_CHECK) $(PERL_OPT) python examples/python
SUBDIRS = src tools definitions samples ifs_samples/grib1 ifs_samples/grib1_mlgrib2 ifs_samples/grib1_mlgrib2_ieee64 tests mars_tests tigge $(FORTRAN_MOD) examples/C $(F90_CHECK) $(PERL_OPT) python examples/python
EXTRA_DIST = README AUTHORS NOTICE LICENSE ChangeLog version.sh html \
src/extrules.am \

View File

@ -1,2 +1,2 @@
set( ${PROJECT_NAME}_VERSION_STR "1.10.4" )
set( ${PROJECT_NAME}_VERSION_STR "2.0.0" )

422
config/config.guess vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2009-11-20'
timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -27,16 +27,16 @@ timestamp='2009-11-20'
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# The plan is that this can be called by configure scripts if you
# don't specify an explicit build system type.
me=`echo "$0" | sed -e 's,.*/,,'`
@ -139,16 +139,6 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}" in
i?86)
test -z "$VENDOR" && VENDOR=pc
;;
*)
test -z "$VENDOR" && VENDOR=unknown
;;
esac
test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@ -180,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
| grep __ELF__ >/dev/null
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@ -213,19 +203,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
@ -290,13 +280,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo alpha-dec-winnt3.5
exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-${VENDOR}-sysv4
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-amigaos
echo ${UNAME_MACHINE}-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-morphos
echo ${UNAME_MACHINE}-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@ -311,7 +301,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm:riscos:*:*|arm:RISCOS:*:*)
echo arm-${VENDOR}-riscos
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
@ -334,33 +324,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@ -419,7 +390,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-${VENDOR}-mint${UNAME_RELEASE}
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
@ -669,7 +640,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@ -730,9 +701,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-${VENDOR}-osf1
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@ -792,19 +763,19 @@ EOF
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
case ${UNAME_MACHINE} in
pc98)
echo i386-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
@ -820,24 +791,21 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
*:Interix*:[3456]*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-${VENDOR}-interix${UNAME_RELEASE}
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@ -848,25 +816,111 @@ EOF
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-${VENDOR}-cygwin
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
echo powerpcle-${VENDOR}-cygwin
echo powerpcle-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@ -877,115 +931,105 @@ EOF
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
else
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-${VENDOR}-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-${VENDOR}-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-${VENDOR}-linux-gnu
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-${VENDOR}-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;;
PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;;
*) echo hppa-${VENDOR}-linux-gnu ;;
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-${VENDOR}-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-${VENDOR}-linux-gnu
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-${VENDOR}-linux-gnu
echo x86_64-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
}
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@ -1006,16 +1050,16 @@ EOF
echo ${UNAME_MACHINE}-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-${VENDOR}-stop
echo ${UNAME_MACHINE}-unknown-stop
exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-atheos
echo ${UNAME_MACHINE}-unknown-atheos
exit ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-${VENDOR}-lynxos${UNAME_RELEASE}
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
@ -1035,7 +1079,7 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
@ -1058,11 +1102,8 @@ EOF
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
@ -1074,7 +1115,7 @@ EOF
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-${VENDOR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@ -1100,30 +1141,20 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
@ -1173,7 +1204,7 @@ EOF
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-${VENDOR}-sysv${UNAME_RELEASE}
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@ -1185,9 +1216,6 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@ -1206,6 +1234,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
SX-9:SUPER-UX:*:*)
echo sx9-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@ -1215,16 +1246,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@ -1264,13 +1285,13 @@ EOF
else
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-${VENDOR}-plan9
echo ${UNAME_MACHINE}-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-${VENDOR}-tops10
echo pdp10-unknown-tops10
exit ;;
*:TENEX:*:*)
echo pdp10-${VENDOR}-tenex
echo pdp10-unknown-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
@ -1279,16 +1300,16 @@ EOF
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
echo pdp10-${VENDOR}-tops20
echo pdp10-unknown-tops20
exit ;;
*:ITS:*:*)
echo pdp10-${VENDOR}-its
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@ -1306,9 +1327,6 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

91
config/config.sub vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2009-11-20'
timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -32,16 +32,13 @@ timestamp='2009-11-20'
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted GNU ChangeLog entry.
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@ -125,7 +122,6 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -152,13 +148,10 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze)
-apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@ -256,16 +249,13 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@ -278,7 +268,6 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nios | nios2 \
@ -287,22 +276,20 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80)
| z8k)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@ -342,17 +329,14 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@ -373,22 +357,21 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
| z8k-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
@ -456,10 +439,6 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
@ -476,18 +455,10 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@ -555,10 +526,6 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@ -732,9 +699,6 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@ -1164,10 +1128,6 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@ -1206,7 +1166,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@ -1256,9 +1216,6 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@ -1279,11 +1236,10 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@ -1292,7 +1248,7 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
@ -1302,7 +1258,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1432,9 +1388,6 @@ case $os in
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-none)
;;
*)
@ -1632,7 +1585,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
-aix*)
vendor=ibm
;;
-beos*)

View File

@ -1,10 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
scriptversion=2003-11-08.23
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,7 +16,9 @@ scriptversion=2009-04-28.21; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -42,18 +43,17 @@ Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
exit 0
;;
esac
@ -61,10 +61,18 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@ -85,34 +93,12 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
@ -199,14 +185,14 @@ sgi)
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@ -222,39 +208,34 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
rm -f "$tmpdepfile"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@ -302,51 +283,6 @@ icc)
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@ -358,43 +294,27 @@ tru64)
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
@ -416,7 +336,7 @@ dashmstdout)
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
while test $1 != '--mode=compile'; do
shift
done
shift
@ -467,39 +387,32 @@ makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
@ -519,7 +432,7 @@ cpp)
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
while test $1 != '--mode=compile'; do
shift
done
shift
@ -545,8 +458,7 @@ cpp)
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
@ -557,27 +469,13 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
@ -590,23 +488,16 @@ msvisualcpp)
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
@ -625,6 +516,5 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# time-stamp-end: "$"
# End:

View File

@ -1,520 +1,276 @@
#!/bin/sh
#
# install - install a program, script, or datafile
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright (C) 1994 X Consortium
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
doit="${DOITPROG-}"
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
# put in absolute paths if you don't have them in your path; or use env. vars.
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
stripcmd=
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
while [ x"$1" != x ]; do
case $1 in
-c) ;;
-c) instcmd=$cpprog
shift
continue;;
-C) copy_on_change=true;;
-d) dir_arg=true
shift
continue;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
if test -z "$dir_arg"; then
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
# Move or copy the file name to the temp name
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
$doit $instcmd "$src" "$dsttmp" &&
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src;;
esac
# and set any options; do chmod last to preserve setuid bits
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
{
if [ -f "$dstdir/$dstfile" ]
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
else
:
fi
done
} &&
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

View File

@ -1,10 +1,6 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@ -18,7 +14,9 @@ scriptversion=2009-04-28.21; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -31,8 +29,6 @@ if test $# -eq 0; then
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@ -42,24 +38,18 @@ else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@ -77,7 +67,6 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@ -85,18 +74,11 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
echo "missing 0.4 - GNU automake"
;;
-*)
@ -105,69 +87,42 @@ Send bug reports to <bug-automake@gnu.org>."
exit 1
;;
esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf*)
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader*)
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@ -175,7 +130,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@ -185,8 +140,13 @@ WARNING: \`$1' is $msg. You should only need it if
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@ -195,16 +155,21 @@ WARNING: \`$1' is $msg. You should only need it if
while read f; do touch "$f"; done
;;
autom4te*)
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
@ -218,108 +183,111 @@ WARNING: \`$1' is needed, but is $msg.
fi
;;
bison*|yacc*)
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case $LASTARG in
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex*|flex*)
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case $LASTARG in
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man*)
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit $?
exit 1
fi
;;
makeinfo*)
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar*)
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@ -332,13 +300,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi
firstarg="$1"
if shift; then
case $firstarg in
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
@ -355,10 +323,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
@ -366,11 +334,3 @@ WARNING: \`$1' is needed, and is $msg.
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -72,15 +72,20 @@ AC_PROG_FC(pgf90 xlf90 gfortran f90 ifort)
dnl check availability of pthreads
AC_ARG_ENABLE([pthread],
[AS_HELP_STRING([--enable-pthread],[enable POSIX threads [by default disabled]])],
GRIB_PTHREADS=1 , GRIB_PTHREADS=0
[pthreads=${enableval}] , [pthreads=no]
)
if test "x${pthreads}" = xyes; then
GRIB_PTHREADS=1
else
GRIB_PTHREADS=0
fi
if test $GRIB_PTHREADS -eq 1
then
AC_GRIB_PTHREADS
AC_GRIB_LINUX_PTHREADS
AC_GRIB_PTHREADS
AC_GRIB_LINUX_PTHREADS
else
GRIB_LINUX_PTHREADS=0
GRIB_LINUX_PTHREADS=0
fi
AC_DEFINE_UNQUOTED(GRIB_PTHREADS,$GRIB_PTHREADS,1->pthreads enabled 0->pthreads disabled)
@ -123,8 +128,8 @@ AC_CHECK_FUNC([posix_memalign],
AC_ARG_ENABLE([align-memory],
[AS_HELP_STRING([--enable-align-memory],[enable memory alignment [by default disabled]])],
AC_DEFINE_UNQUOTED(GRIB_MEM_ALIGN,1,memory alignment required) ,
)
AC_DEFINE_UNQUOTED(GRIB_MEM_ALIGN,1,memory alignment required),
)
dnl use vectorised code
AC_ARG_ENABLE([vector],
@ -162,6 +167,7 @@ fi
AC_SUBST(DEVEL_RULES)
AC_SUBST(GRIB_DEVEL)
AM_CONDITIONAL([WITH_MARS_TESTS], [test $GRIB_DEVEL -eq 1])
dnl Large file support
AC_FUNC_FSEEKO
@ -206,7 +212,13 @@ AC_SUBST(GRIB_DEFINITION_PATH)
dnl Fortran interface
AC_ARG_ENABLE([fortran],
[AS_HELP_STRING([--disable-fortran],[disable fortran interface [by default enabled]])],
without_fortran=1,without_fortran=0)
[with_fortran=${enableval}], [with_fortran=yes])
if test "x${with_fortran}" = xyes; then
without_fortran=0
else
without_fortran=1
fi
if test "x$FC" = "x"
then
@ -306,9 +318,8 @@ AC_SUBST(EMOS_LIB)
dnl timer
AC_ARG_ENABLE([timer],
[AS_HELP_STRING([--enable-timer],[enable timer [by default disabled]])],
with_timer=1,with_timer=0)
if test ${with_timer} -eq 1
then
[with_timer=${enableval}], [with_timer=no])
if test "x${with_timer}" = xyes; then
AC_DEFINE(GRIB_TIMER,1,1->Timer on 0->Timer off)
else
AC_DEFINE(GRIB_TIMER,0,1->Timer on 0->Timer off)
@ -318,9 +329,8 @@ fi
dnl multithread packing
AC_ARG_ENABLE([omp-packing],
[AS_HELP_STRING([--enable-omp-packing],[enable OpenMP multithreaded packing [by default disabled]])],
with_omp=1,with_omp=0)
if test ${with_omp} -eq 1
then
[with_omp=${enableval}], [with_omp=no])
if test "x${with_omp}" = xyes; then
AC_DEFINE(OMP_PACKING,1,1->OpenMP packing 0->single thread packing)
else
AC_DEFINE(OMP_PACKING,0,1->OpenMP packing 0->single thread packing)
@ -623,7 +633,7 @@ AC_CHECK_FUNCS([bzero gettimeofday])
AX_LINUX_DISTRIBUTION
AC_OUTPUT( Makefile src/Makefile fortran/Makefile tools/Makefile definitions/Makefile samples/Makefile ifs_samples/grib1/Makefile ifs_samples/grib1_mlgrib2/Makefile ifs_samples/grib1_mlgrib2_ieee64/Makefile tests/Makefile examples/C/Makefile examples/F90/Makefile tigge/Makefile perl/GRIB-API/Makefile.PL perl/Makefile python/Makefile examples/python/Makefile rpms/grib_api.spec rpms/grib_api.pc rpms/grib_api_f90.pc)
AC_OUTPUT( Makefile src/Makefile fortran/Makefile tools/Makefile definitions/Makefile samples/Makefile ifs_samples/grib1/Makefile ifs_samples/grib1_mlgrib2/Makefile ifs_samples/grib1_mlgrib2_ieee64/Makefile tests/Makefile mars_tests/Makefile examples/C/Makefile examples/F90/Makefile tigge/Makefile perl/GRIB-API/Makefile.PL perl/Makefile python/Makefile examples/python/Makefile rpms/grib_api.spec rpms/grib_api.pc rpms/grib_api_f90.pc)
AC_MSG_NOTICE([

View File

@ -254,6 +254,13 @@ dist_definitionsgrib1_localConcepts_edzw_DATA = \
grib1/localConcepts/edzw/shortName.def\
grib1/localConcepts/edzw/units.def
definitionsgrib1_localConcepts_kwbcdir = @GRIB_DEFINITION_PATH@/grib1/localConcepts/kwbc
dist_definitionsgrib1_localConcepts_kwbc_DATA = \
grib1/localConcepts/kwbc/name.def\
grib1/localConcepts/kwbc/paramId.def\
grib1/localConcepts/kwbc/shortName.def\
grib1/localConcepts/kwbc/units.def
definitionsgrib1_localConcepts_lfpwdir = @GRIB_DEFINITION_PATH@/grib1/localConcepts/lfpw
dist_definitionsgrib1_localConcepts_lfpw_DATA = \
grib1/localConcepts/lfpw/name.def\

View File

@ -0,0 +1,2 @@
'Snow Depth' = { table2Version=128; indicatorOfParameter =141; }

View File

@ -0,0 +1,2 @@
'260056' = { table2Version=128; indicatorOfParameter =141; }

View File

@ -0,0 +1,2 @@
'sd' = { table2Version=128; indicatorOfParameter =141; }

View File

@ -0,0 +1,2 @@
'm of water equivalent' = { table2Version=128; indicatorOfParameter =141; }

View File

@ -14863,18 +14863,57 @@
parameterNumber = 255 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 3 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 1 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 6 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'Sea Salt Aerosol (5 - 20 um) Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 6 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'Sea Salt Aerosol (5 - 20 um) Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -14900,42 +14939,113 @@
parameterNumber = 4 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'Dust Aerosol (0.55 - 0.9 um) Mixing Ratio' = {
discipline = 0;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 9 ;
scaledValueOfFirstSize = 55 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'Dust Aerosol (0.55 - 0.9 um) Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 5 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'Dust Aerosol (0.9 - 20 um) Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 9 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'Dust Aerosol (0.9 - 20 um) Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 6 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'Hydrophobic Organic Matter Aerosol Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62016 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'Hydrophobic Organic Matter Aerosol Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 7 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'Hydrophilic Organic Matter Aerosol Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62015 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'Hydrophilic Organic Matter Aerosol Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 8 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'Hydrophobic Black Carbon Aerosol Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62014 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'Hydrophobic Black Carbon Aerosol Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 9 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'Hydrophilic Black Carbon Aerosol Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62013 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'Hydrophilic Black Carbon Aerosol Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 10 ;
}
#Sulphate Aerosol Mixing Ratio
'Sulphate Aerosol Mixing Ratio' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62006 ;
typeOfSizeInterval = 255 ;
}
#Sulphate Aerosol Mixing Ratio
'Sulphate Aerosol Mixing Ratio' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15160,6 +15270,14 @@
parameterNumber = 61 ;
}
#Methane
'Methane' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 2 ;
}
#Methane
'Methane' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15352,18 +15470,42 @@
parameterNumber = 121 ;
}
#Sulphur dioxide
'Sulphur dioxide' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 8 ;
}
#Sulphur dioxide
'Sulphur dioxide' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 122 ;
}
#Carbon monoxide
'Carbon monoxide' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 4 ;
}
#Carbon monoxide
'Carbon monoxide' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 123 ;
}
#Formaldehyde
'Formaldehyde' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 7 ;
}
#Formaldehyde
'Formaldehyde' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15394,6 +15536,14 @@
parameterNumber = 128 ;
}
#Nitrogen Oxides
'Nitrogen Oxides' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 65535 ;
}
#Nitrogen Oxides
'Nitrogen Oxides' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15652,6 +15802,14 @@
parameterNumber = 185 ;
}
#GEMS Ozone
'GEMS Ozone' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 0 ;
}
#GEMS Ozone
'GEMS Ozone' = {
discipline = 192 ;
parameterCategory = 210 ;

View File

@ -14863,18 +14863,57 @@
parameterNumber = 255 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'210001' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 3 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'210001' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 1 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'210002' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 6 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'210002' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'210003' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 6 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'210003' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -14900,42 +14939,113 @@
parameterNumber = 4 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'210005' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 9 ;
scaledValueOfFirstSize = 55 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'210005' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 5 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'210006' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 9 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'210006' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 6 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'210007' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62016 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'210007' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 7 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'210008' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62015 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'210008' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 8 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'210009' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62014 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'210009' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 9 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'210010' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62013 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'210010' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 10 ;
}
#Sulphate Aerosol Mixing Ratio
'210011' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62006 ;
typeOfSizeInterval = 255 ;
}
#Sulphate Aerosol Mixing Ratio
'210011' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15160,6 +15270,14 @@
parameterNumber = 61 ;
}
#Methane
'210062' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 2 ;
}
#Methane
'210062' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15352,18 +15470,42 @@
parameterNumber = 121 ;
}
#Sulphur dioxide
'210122' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 8 ;
}
#Sulphur dioxide
'210122' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 122 ;
}
#Carbon monoxide
'210123' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 4 ;
}
#Carbon monoxide
'210123' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 123 ;
}
#Formaldehyde
'210124' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 7 ;
}
#Formaldehyde
'210124' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15394,6 +15536,14 @@
parameterNumber = 128 ;
}
#Nitrogen Oxides
'210129' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 65535 ;
}
#Nitrogen Oxides
'210129' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15652,6 +15802,14 @@
parameterNumber = 185 ;
}
#GEMS Ozone
'210203' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 0 ;
}
#GEMS Ozone
'210203' = {
discipline = 192 ;
parameterCategory = 210 ;

View File

@ -14863,18 +14863,57 @@
parameterNumber = 255 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'aermr01' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 3 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'aermr01' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 1 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'aermr02' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 6 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'aermr02' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'aermr03' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 6 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'aermr03' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -14900,42 +14939,113 @@
parameterNumber = 4 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'aermr05' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 9 ;
scaledValueOfFirstSize = 55 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'aermr05' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 5 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'aermr06' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 9 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'aermr06' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 6 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'aermr07' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62016 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'aermr07' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 7 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'aermr08' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62015 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'aermr08' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 8 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'aermr09' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62014 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'aermr09' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 9 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'aermr10' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62013 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'aermr10' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 10 ;
}
#Sulphate Aerosol Mixing Ratio
'aermr11' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62006 ;
typeOfSizeInterval = 255 ;
}
#Sulphate Aerosol Mixing Ratio
'aermr11' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15150,8 +15260,8 @@
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
constituentType = 3 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 3 ;
}
#Carbon Dioxide
'co2' = {
@ -15160,6 +15270,14 @@
parameterNumber = 61 ;
}
#Methane
'ch4' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 2 ;
}
#Methane
'ch4' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15352,18 +15470,42 @@
parameterNumber = 121 ;
}
#Sulphur dioxide
'so2' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 8 ;
}
#Sulphur dioxide
'so2' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 122 ;
}
#Carbon monoxide
'co' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 4 ;
}
#Carbon monoxide
'co' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 123 ;
}
#Formaldehyde
'hcho' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 7 ;
}
#Formaldehyde
'hcho' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15394,6 +15536,14 @@
parameterNumber = 128 ;
}
#Nitrogen Oxides
'nox' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 65535 ;
}
#Nitrogen Oxides
'nox' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15652,6 +15802,14 @@
parameterNumber = 185 ;
}
#GEMS Ozone
'go3' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 0 ;
}
#GEMS Ozone
'go3' = {
discipline = 192 ;
parameterCategory = 210 ;

View File

@ -14863,18 +14863,57 @@
parameterNumber = 255 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 3 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 1 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 6 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 5 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 6 ;
aerosolType = 62008 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 5 ;
typeOfSizeInterval = 2 ;
}
#Sea Salt Aerosol (5 - 20 um) Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -14900,42 +14939,113 @@
parameterNumber = 4 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 7 ;
scaleFactorOfFirstSize = 8 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 9 ;
scaledValueOfFirstSize = 55 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 5 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
scaleFactorOfSecondSize = 5 ;
scaleFactorOfFirstSize = 7 ;
aerosolType = 62001 ;
scaledValueOfSecondSize = 2 ;
scaledValueOfFirstSize = 9 ;
typeOfSizeInterval = 2 ;
}
#Dust Aerosol (0.9 - 20 um) Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 6 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62016 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Organic Matter Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 7 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62015 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Organic Matter Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 8 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62014 ;
typeOfSizeInterval = 255 ;
}
#Hydrophobic Black Carbon Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 9 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62013 ;
typeOfSizeInterval = 255 ;
}
#Hydrophilic Black Carbon Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 10 ;
}
#Sulphate Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 44 ;
aerosolType = 62006 ;
typeOfSizeInterval = 255 ;
}
#Sulphate Aerosol Mixing Ratio
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15160,6 +15270,14 @@
parameterNumber = 61 ;
}
#Methane
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 2 ;
}
#Methane
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15352,18 +15470,42 @@
parameterNumber = 121 ;
}
#Sulphur dioxide
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 8 ;
}
#Sulphur dioxide
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 122 ;
}
#Carbon monoxide
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 4 ;
}
#Carbon monoxide
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
parameterNumber = 123 ;
}
#Formaldehyde
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 7 ;
}
#Formaldehyde
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15394,6 +15536,14 @@
parameterNumber = 128 ;
}
#Nitrogen Oxides
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 65535 ;
}
#Nitrogen Oxides
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;
@ -15652,6 +15802,14 @@
parameterNumber = 185 ;
}
#GEMS Ozone
'kg kg**-1' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 2 ;
productDefinitionTemplateNumber = 40 ;
constituentType = 0 ;
}
#GEMS Ozone
'kg kg**-1' = {
discipline = 192 ;
parameterCategory = 210 ;

View File

@ -8,7 +8,6 @@ PROJECT_NUMBER =
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
@ -30,7 +29,6 @@ STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
@ -67,7 +65,6 @@ GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
@ -105,7 +102,7 @@ INPUT = grib_api.dox \
../tools/grib_keys.dox \
../tools/grib_copy.dox \
../tools/grib_index_build.dox \
../python/gribapi.py
../python/eccode.py
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
@ -184,7 +181,6 @@ HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
@ -285,8 +281,6 @@ DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO

View File

@ -1,6 +1,6 @@
#!/bin/sh
./prepare_pydocs.pl < ../python/gribapi.py > gribapi.py
./prepare_pydocs.pl < ../python/eccode.py > eccode.py
cd ../tools
./make_dox.ksh

View File

@ -5,14 +5,13 @@ TESTS = iterator.sh get.sh print_data.sh set.sh keys_iterator.sh multi.sh multi_
precision.sh list.sh
noinst_PROGRAMS = nearest set_bitmap iterator get print_data set set_missing keys_iterator \
set_data mars_param values_check box nc multi multi_write precision set_pv list sections_copy
set_data mars_param values_check box multi multi2 multi_write precision set_pv list sections_copy
bin_PROGRAMS = points
box_SOURCES = box.c
set_data_SOURCES = set_data.c
mars_param_SOURCES = mars_param.c
values_check_SOURCES = values_check.c
nc_SOURCES = nc.c
nearest_SOURCES = nearest.c
multi_write_SOURCES = multi_write.c
get_SOURCES = get.c
@ -21,6 +20,7 @@ set_SOURCES = set.c
set_missing_SOURCES = set_missing.c
set_bitmap_SOURCES = set_bitmap.c
multi_SOURCES = multi.c
multi2_SOURCES = multi2.c
keys_iterator_SOURCES = keys_iterator.c
iterator_SOURCES = iterator.c
set_pv_SOURCES = set_pv.c

View File

@ -13,9 +13,6 @@
*
* Description: how to use a fieldset.
*
*
*
*
*/
#include <stdio.h>

View File

@ -13,8 +13,6 @@
*
* Description: how to get values using keys.
*
*
*
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,11 @@
#!/bin/sh
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
. ./include.sh

View File

@ -13,9 +13,6 @@
*
* Description: how to use an iterator on lat/lon/values.
*
*
*
*
*/
#include <stdio.h>

View File

@ -9,12 +9,10 @@
*/
/*
* C Implementation: get
* C Implementation: list
*
* Description: how to get values using keys.
*
*
*
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -9,12 +9,9 @@
*/
/*
* C Implementation: set
*
* Description: how to set key values.
*
*
* C Implementation: mars_param
*
* Description: how to query MARS params
*
*/
#include <stdio.h>

View File

@ -11,9 +11,15 @@
if [ ! -f "${data_dir}/multi.grib2" ]
then
echo SKIP: $0
exit
echo "SKIP test 1: $0"
else
${examples_dir}multi > /dev/null
fi
${examples_dir}multi > /dev/null
if [ ! -f "${data_dir}/multi_created.grib2" ]
then
echo "SKIP test 2: $0"
else
${examples_dir}multi2 > /dev/null
fi

73
examples/C/multi2.c Normal file
View File

@ -0,0 +1,73 @@
/*
* Copyright 2005-2012 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* 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.
*/
/*
* C Implementation: multi2.c
*
* Description: Repeatedly print data contained in a multi-field grib message
*
*/
#include "grib_api.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
void read_data(int num_msgs);
const int NUM_FIELDS = 4;
const int COUNT = 20;
const char* file_path = "../../data/multi_created.grib2";
int main(int argc, char** argv) {
int i;
/* turn on support for multi fields messages */
grib_multi_support_on(0);
for(i=1; i<COUNT; ++i) {
printf("Pass %d: \n",i);
read_data(NUM_FIELDS);
}
return 0;
}
void read_data(int num_msgs)
{
int err = 0,i;
FILE* fp = NULL;
long stepRange = 0;
grib_handle *h = NULL;
fp = fopen(file_path, "r");
if(!fp) {
fprintf(stderr, "ERROR: unable to open grib file %s\n", file_path);
exit(1);
}
printf("Opened GRIB file %s: \n", file_path);
for(i=0; i<num_msgs; ++i) {
h = grib_handle_new_from_file(0, fp, &err);
GRIB_CHECK(err, 0);
GRIB_CHECK( grib_get_long(h, "stepRange", &stepRange), 0);
printf("%d : stepRange=%ld\n", i, stepRange);
grib_handle_delete(h);
/* These tests make sure we always start from 1st field of the grib msg */
/* and not where we left off last time */
if (i == 0) assert(stepRange == 0); /* 1st field */
if (i == 1) assert(stepRange == 12); /* 2nd field */
if (i == 2) assert(stepRange == 24); /* 3rd field */
if (i == 3) assert(stepRange == 36); /* 4th field */
}
/* Must reset this file pointer for the next round */
grib_multi_support_reset_file(grib_context_get_default(), fp);
fclose(fp);
}

View File

@ -9,12 +9,10 @@
*/
/*
* C Implementation: multi
* C Implementation: multi_write
*
* Description: How to encode grib messages containing multiple
* fields.
*
*
* fields
*
*/
#include <stdio.h>
@ -44,7 +42,7 @@ int main(int argc, char** argv) {
/* open input file */
in = fopen(filename,"r");
if(!in) {
printf("ERROR: unable to open file %s\n",filename);
printf("ERROR: unable to open input file %s\n",filename);
return 1;
}
@ -68,7 +66,7 @@ int main(int argc, char** argv) {
/* open output file */
of=fopen(ofilename,"w");
if(!of) {
printf("ERROR: unable to open file %s\n",ofilename);
printf("ERROR: unable to open output file %s\n",ofilename);
exit(1);
}

View File

@ -9,13 +9,9 @@
*/
/*
* C Implementation: fieldset
*
* Description: how to use a fieldset.
*
*
*
* C Implementation: nearest
*
* Description: how to get nearest point(s)
*/
#include <stdio.h>

View File

@ -11,10 +11,6 @@
/*
* C Implementation: points
*
*
*
*
*
*/
#include <stdio.h>
@ -124,7 +120,5 @@ int main(int argc, char** argv) {
fclose(fin);
}
return ret;
}

View File

@ -13,9 +13,6 @@
*
* Description: how to control decimal precision when packing fields.
*
*
*
*
*/
#include <stdio.h>
#include <stdlib.h>
@ -44,13 +41,13 @@ int main(int argc, char** argv) {
in = fopen(infile,"r");
if(!in) {
printf("ERROR: unable to open file %s\n",infile);
printf("ERROR: unable to open input file %s\n",infile);
return 1;
}
out = fopen(outfile,"w");
if(!in) {
printf("ERROR: unable to open file %s\n",outfile);
if(!out) {
printf("ERROR: unable to open output file %s\n",outfile);
return 1;
}
@ -121,4 +118,3 @@ int main(int argc, char** argv) {
return 0;
}

View File

@ -13,8 +13,6 @@
*
* Description: prints all the data contained in a grib file
*
*
*
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -13,9 +13,6 @@
*
* Description: how to set key values.
*
*
*
*
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -14,8 +14,6 @@
* Description: how to set a bitmap in a grib message
*
*
*
*
*/
#include <stdio.h>
@ -28,7 +26,7 @@ int main(int argc, char** argv) {
size_t size=0;
FILE* in = NULL;
char* infile = "../data/regular_latlon_surface.grib1";
char* infile = "../../data/regular_latlon_surface.grib1";
FILE* out = NULL;
char* outfile = "out.grib1";
grib_handle *h = NULL;
@ -40,13 +38,13 @@ int main(int argc, char** argv) {
in = fopen(infile,"r");
if(!in) {
printf("ERROR: unable to open file %s\n",infile);
printf("ERROR: unable to open input file %s\n",infile);
return 1;
}
out = fopen(outfile,"w");
if(!in) {
printf("ERROR: unable to open file %s\n",outfile);
if(!out) {
printf("ERROR: unable to open output file %s\n",outfile);
return 1;
}

View File

@ -13,9 +13,6 @@
*
* Description: how to set a key as missing.
*
*
*
*
*/
#include <stdio.h>
#include <stdlib.h>
@ -37,13 +34,13 @@ int main(int argc, char** argv) {
in = fopen(infile,"r");
if(!in) {
printf("ERROR: unable to open file %s\n",infile);
printf("ERROR: unable to open input file %s\n",infile);
return 1;
}
out = fopen(outfile,"w");
if(!in) {
printf("ERROR: unable to open file %s\n",outfile);
if(!out) {
printf("ERROR: unable to open output file %s\n",outfile);
return 1;
}

View File

@ -9,12 +9,9 @@
*/
/*
* C Implementation: set
*
* Description: how to set pv .
*
*
* C Implementation: set_pv
*
* Description: how to set pv (vertical coordinate parameters)
*
*/
#include <stdio.h>
@ -30,7 +27,7 @@ int main(int argc, char** argv) {
size_t pvsize=4;
FILE* in = NULL;
char* infile = "../data/regular_latlon_surface.grib1";
char* infile = "../../data/regular_latlon_surface.grib1";
FILE* out = NULL;
char* outfile = "out.grib1";
grib_handle *h = NULL;
@ -38,13 +35,13 @@ int main(int argc, char** argv) {
in = fopen(infile,"r");
if(!in) {
printf("ERROR: unable to open file %s\n",infile);
printf("ERROR: unable to open input file %s\n",infile);
return 1;
}
out = fopen(outfile,"w");
if(!in) {
printf("ERROR: unable to open file %s\n",outfile);
if(!out) {
printf("ERROR: unable to open output file %s\n",outfile);
return 1;
}

View File

@ -18,7 +18,7 @@ int main(int argc, char* argv[]) {
grib_values values[2];
int nvalues=2;
int i;
char* name;
char* name = NULL;
f=fopen(infile,"r");
if (!f) {

View File

@ -6,8 +6,6 @@ C
C In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
C virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
C
C
C
C Fortran 77 Implementation: keys_iterator
C
C Description:

View File

@ -5,9 +5,6 @@ C which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
C
C In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
C virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
C
C
C
C Fortran Implementation: fieldset
C
@ -77,3 +74,4 @@ C
return 0;
}

View File

@ -1,3 +1,10 @@
! Copyright 2005-2012 ECMWF.
!
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
!
! 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.
!
!
! Description:
@ -6,9 +13,6 @@
! keys in a message.
!
!
! Copyright: See COPYING file that comes with this distribution
!
!
program keys_iterator
use grib_api
implicit none

View File

@ -7,14 +7,11 @@
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!
!
!
!
! Description: how to control decimal precision when packing fields.
!
!
!
!
!
program precision
use grib_api
implicit none

View File

@ -19,7 +19,7 @@ use grib_api
character(len=256) :: filename
integer(kind=4),dimension(intsize) :: buffer
!character,dimension(size) :: buffer
integer :: len1
integer(kind=kindOfSize_t) :: len1
! Message identifier.
integer :: igrib

View File

@ -15,7 +15,8 @@ implicit none
integer :: ifile,ofile
integer :: iret,igrib
integer , dimension(50000) :: buffer
integer :: len1,step,level
integer(kind=kindOfSize_t) :: len1
integer :: step,level
call grib_open_file(ifile,'../../data/index.grib','r')
call grib_open_file(ofile,'out.grib','w')

View File

@ -12,7 +12,6 @@
!
!
!
!
program set
use grib_api
implicit none

View File

@ -13,7 +13,6 @@
!
!
!
!
program set
use grib_api
implicit none

View File

@ -6,8 +6,6 @@
! 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.
!
!
!
! Description: Practical example of an ensemble mean using grib_api
!
!

View File

@ -6,8 +6,6 @@
! 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.
!
!
!
! Description: how to create a new GRIB message by cloning
! an existing message.
!

View File

@ -6,8 +6,6 @@
! 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.
!
!
!
! Description: count messages in the input
!
! Author: Cristian D. Codorean

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
VERBOSE=1 # verbose error reporting
@ -13,13 +23,13 @@ def example():
gid = grib_new_from_file(f)
if gid is None: break
message = grib_get_message(gid)
message = get_message(gid)
newgid = grib_new_from_message(message)
grib_write(newgid,out)
grib_release(newgid)
newgid = new_from_message(message)
write(newgid,out)
release(newgid)
grib_release(gid)
release(gid)
out.close()
f.close()
@ -27,7 +37,7 @@ def example():
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,8 +1,18 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
import random
from gribapi import *
from eccode import *
INPUT='../../data/constant_field.grib1'
OUTPUT='out.grib'
@ -14,21 +24,21 @@ def example():
gid = grib_new_from_file(fin)
nx = grib_get(gid,'Ni')
ny = grib_get(gid,'Nj')
nx = get(gid,'Ni')
ny = get(gid,'Nj')
for step in range(0,24,6):
clone_id = grib_clone(gid)
grib_set(clone_id,'step',step)
clone_id = clone(gid)
set(clone_id,'step',step)
values = [random.random() for i in range(nx*ny)]
grib_set_values(clone_id,values)
set_values(clone_id,values)
grib_write(clone_id,fout)
grib_release(clone_id)
write(clone_id,fout)
release(clone_id)
grib_release(gid)
release(gid)
fin.close()
fout.close()
@ -36,7 +46,7 @@ def example():
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/tigge_pf_ecmwf.grib2'
VERBOSE=1 # verbose error reporting
@ -31,24 +41,24 @@ def example():
print "processing message number",i+1
for key in keys:
print '%s=%g' % (key,grib_get(gid,key))
print '%s=%g' % (key,get(gid,key))
print 'There are %d, average is %g, min is %g, max is %g' % (
grib_get_size(gid,'values'),
grib_get(gid,'average'),
grib_get(gid,'min'),
grib_get(gid,'max')
get_size(gid,'values'),
get(gid,'average'),
get(gid,'min'),
get(gid,'max')
)
print '-'*100
grib_release(gid)
release(gid)
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,15 @@
import traceback
import sys
from gribapi import *
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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 *
INPUT='../../data/reduced_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
@ -23,26 +31,26 @@ def example():
if gid is None: break
for key in keys:
if not grib_is_defined(gid,key): raise Exception("Key was not defined")
print '%s=%s' % (key,grib_get(gid,key))
if not is_defined(gid,key): raise Exception("Key was not defined")
print '%s=%s' % (key,get(gid,key))
if grib_is_defined(gid,"A_very_silly_girl"): raise Exception("Key was defined")
if 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' % (
grib_get_size(gid,'values'),
grib_get(gid,'average'),
grib_get(gid,'min'),
grib_get(gid,'max')
get_size(gid,'values'),
get(gid,'average'),
get(gid,'min'),
get(gid,'max')
)
grib_release(gid)
release(gid)
f.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys,os
from gribapi import *
from eccode import *
INPUT='../../data/index.grib'
VERBOSE=1 # verbose error reporting
@ -23,45 +33,45 @@ def example():
iid = None
if (os.path.exists(index_file)):
iid = grib_index_read(index_file)
iid = index_read(index_file)
else:
iid = grib_index_new_from_file(INPUT,index_keys)
iid = index_new_from_file(INPUT,index_keys)
# multiple files can be added to an index:
# grib_index_add_file(iid,"grib file to add")
# index_add_file(iid,"grib file to add")
grib_index_write(iid,index_file)
index_write(iid,index_file)
index_vals = []
for key in index_keys:
print "%sSize=%d" % (
key,
grib_index_get_size(iid,key)
index_get_size(iid,key)
)
key_vals = grib_index_get(iid,key)
key_vals = 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)):
grib_index_select(iid,index_keys[i],prod[i])
index_select(iid,index_keys[i],prod[i])
while 1:
gid = grib_new_from_index(iid)
gid = new_from_index(iid)
if gid is None: break
print " ".join(["%s=%s" % (key,grib_get(gid,key)) for key in index_keys])
grib_release(gid)
print " ".join(["%s=%s" % (key,get(gid,key)) for key in index_keys])
release(gid)
grib_index_release(iid)
index_release(iid)
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/reduced_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
@ -13,13 +23,13 @@ def example():
gid = grib_new_from_file(f)
if gid is None: break
iterid = grib_iterator_new(gid,0)
iterid = iterator_new(gid,0)
missingValue = grib_get_double(gid,"missingValue")
missingValue = get_double(gid,"missingValue")
i=0
while 1:
result = grib_iterator_next(iterid)
result = iterator_next(iterid)
if not result: break
[lat,lon,value] = result
@ -33,15 +43,15 @@ def example():
i += 1
grib_iterator_delete(iterid)
grib_release(gid)
iterator_delete(iterid)
release(gid)
f.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/reduced_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
@ -13,7 +23,7 @@ def example():
gid = grib_new_from_file(f)
if gid is None: break
iterid = grib_keys_iterator_new(gid,'ls')
iterid = keys_iterator_new(gid,'ls')
# Different types of keys can be skipped
# grib_skip_computed(iterid)
@ -23,20 +33,20 @@ def example():
# grib_skip_read_only(iterid)
# grib_skip_function(iterid)
while grib_keys_iterator_next(iterid):
keyname = grib_keys_iterator_get_name(iterid)
keyval = grib_get_string(iterid,keyname)
while keys_iterator_next(iterid):
keyname = keys_iterator_get_name(iterid)
keyval = get_string(iterid,keyname)
print "%s = %s" % (keyname,keyval)
grib_keys_iterator_delete(iterid)
grib_release(gid)
keys_iterator_delete(iterid)
release(gid)
f.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -0,0 +1,58 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from eccode import *
INPUT='../../data/gts.bufr'
VERBOSE=1 # verbose error reporting
def example():
f = open(INPUT)
while 1:
bid = bufr_new_from_file(f)
if bid is None: break
iterid = 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)
while keys_iterator_next(iterid):
keyname = keys_iterator_get_name(iterid)
keyval = get_string(iterid,keyname)
print "%s = %s" % (keyname,keyval)
keys_iterator_delete(iterid)
release(bid)
f.close()
def main():
try:
example()
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:
print >>sys.stderr,err.msg
return 1
if __name__ == "__main__":
sys.exit(main())

View File

@ -0,0 +1,55 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from eccode import *
INPUT='../../data/gts.bufr'
VERBOSE=1 # verbose error reporting
def example():
f = open(INPUT)
while 1:
bid = gts_new_from_file(f)
if bid is None: break
iterid = keys_iterator_new(bid)
# Different types of keys can be skipped
# skip_computed(iterid)
# skip_coded(iterid)
# skip_read_only(iterid)
while keys_iterator_next(iterid):
keyname = keys_iterator_get_name(iterid)
keyval = get_string(iterid,keyname)
print "%s = %s" % (keyname,keyval)
keys_iterator_delete(iterid)
release(bid)
f.close()
def main():
try:
example()
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:
print >>sys.stderr,err.msg
return 1
if __name__ == "__main__":
sys.exit(main())

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/sample.grib2'
OUTPUT='out.grib'
@ -16,20 +26,20 @@ def example():
mgid = grib_multi_new()
for step in range(12,132,12):
grib_set(gid,"step",step)
set(gid,"step",step)
grib_multi_append(gid,4,mgid)
grib_multi_write(mgid,fout)
grib_multi_release(mgid)
grib_release(gid)
release(gid)
fin.close()
fout.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/reduced_gaussian_lsm.grib1'
VERBOSE=1 # verbose error reporting
@ -24,13 +34,13 @@ def example():
print "-"*100
grib_release(gid)
release(gid)
f.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/regular_latlon_surface.grib1'
VERBOSE=1 # verbose error reporting
@ -10,22 +20,22 @@ def example():
f = open(INPUT)
gid = grib_new_from_file(f)
values = grib_get_values(gid)
values = 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,grib_get(gid,key))
print '%s=%.10e' % (key,get(gid,key))
grib_release(gid)
release(gid)
f.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/tp_ecmwf.grib'
OUTPUT='out.grib'
@ -27,7 +37,7 @@ def example():
gid = grib_new_from_file(fin)
if gid is None: break
curr_vals = grib_get_values(gid)
curr_vals = get_values(gid)
if prev_vals is None:
result = prev_vals = curr_vals
@ -44,16 +54,16 @@ def example():
keys['startStep'] += 12
keys['endStep'] += 12
clone_id = grib_clone(sample_id)
clone_id = clone(sample_id)
for key in keys:
grib_set(clone_id,key,keys[key])
set(clone_id,key,keys[key])
grib_set_values(clone_id,result * 1000)
set_values(clone_id,result * 1000)
grib_write(clone_id,fout)
write(clone_id,fout)
grib_release(gid)
release(gid)
fin.close()
fout.close()
@ -61,7 +71,7 @@ def example():
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -9,7 +9,7 @@ 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 gribapi import *
from eccode import *
from datetime import date
INPUT='../../data/regular_latlon_surface_constant.grib1'
@ -23,44 +23,44 @@ def example():
dt = date.today()
today = "%d%02d%02d" % (dt.year,dt.month,dt.day)
grib_set(gid,'dataDate',int(today))
grib_set(gid,'centre',80)
set(gid,'dataDate',int(today))
set(gid,'centre',80)
centreIntVal = grib_get(gid,'centre',int)
centreStrVal = grib_get(gid,'centre',str)
dateStrVal = grib_get(gid,'dataDate',str)
centreIntVal = get(gid,'centre',int)
centreStrVal = get(gid,'centre',str)
dateStrVal = get(gid,'dataDate',str)
assert(centreIntVal == 80)
assert(centreStrVal == 'cnmc')
assert(dateStrVal == today)
print 'get centre as a integer - centre = %d' % centreIntVal
print 'get centre as an integer - centre = %d' % centreIntVal
print 'get centre as a string - centre = %s' % centreStrVal
print 'get date as a string - date = %s' % dateStrVal
# Now do the same but using set_key_vals, setting keys all at once
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=1,centre=98') # with a String
assert(get(gid,'centre',str) == 'ecmf')
assert(get(gid,'level',int) == 1)
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=2', 'centre=kwbc']) # with a Tuple
assert(get(gid,'centre',int) == 7)
assert(get(gid,'level',int) == 2)
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)
set_key_vals(gid, {'level': 3, 'centre': 84}) # with a Dictionary
assert(get(gid,'centre',str) == 'lfpw')
assert(get(gid,'level',int) == 3)
grib_gts_header(True)
grib_gts_header(False)
gts_header(True)
gts_header(False)
grib_write(gid,fout)
grib_release(gid)
write(gid,fout)
release(gid)
fin.close()
fout.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
INPUT='../../data/tigge/tigge_ecmf_pl_t.grib'
OUTPUT='out.grib'
@ -14,20 +24,20 @@ def example():
gid = grib_new_from_file(fin)
# set type of level to surface
grib_set(gid,'typeOfFirstFixedSurface','sfc')
grib_set_missing(gid,'scaleFactorOfFirstFixedSurface')
grib_set_missing(gid,'scaledValueOfFirstFixedSurface')
set(gid,'typeOfFirstFixedSurface','sfc')
set_missing(gid,'scaleFactorOfFirstFixedSurface')
set_missing(gid,'scaledValueOfFirstFixedSurface')
grib_write(gid,fout)
write(gid,fout)
grib_release(gid)
release(gid)
fin.close()
fout.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -1,7 +1,17 @@
#
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
import traceback
import sys
from gribapi import *
from eccode import *
VERBOSE=1 # verbose error reporting
@ -21,20 +31,20 @@ def example():
fout = open('out.grib1','w')
gid = grib_new_from_samples('reduced_gg_sfc_grib1')
grib_set(gid,'typeOfLevel','hybrid')
grib_set(gid,'level',2)
grib_set(gid,'PVPresent',1)
grib_set_array(gid,'pv',pv)
set(gid,'typeOfLevel','hybrid')
set(gid,'level',2)
set(gid,'PVPresent',1)
set_array(gid,'pv',pv)
grib_write(gid,fout)
write(gid,fout)
grib_release(gid)
release(gid)
fout.close()
def main():
try:
example()
except GribInternalError,err:
except InternalError,err:
if VERBOSE:
traceback.print_exc(file=sys.stderr)
else:

View File

@ -6,7 +6,7 @@
#
# 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.
#
same=`./same_int_long`
if [ $same -eq 1 ]

View File

@ -11,11 +11,11 @@
#include "grib_api_internal.h"
#include "grib_fortran_prototypes.h"
int grib_read_file_(int* fid, char* buffer, int* nbytes) {
int grib_read_file_(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_file_(fid,buffer,nbytes);
}
int grib_read_file__(int* fid, char* buffer, int* nbytes) {
int grib_read_file__(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_file_(fid,buffer,nbytes);
}

View File

@ -6,6 +6,7 @@
! 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.
!
!
!> Module grib_api
!>
!> The grib_api module provides the Fortran 90 interface of the GRIB API.

View File

@ -526,7 +526,7 @@
subroutine grib_read_bytes_char ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
character(len=1),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -553,7 +553,7 @@
subroutine grib_read_bytes_int4 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
integer(kind=4),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -580,7 +580,7 @@
subroutine grib_read_bytes_real4 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
real(kind=4),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -607,7 +607,7 @@
subroutine grib_read_bytes_real8 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
real(kind=8),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -634,7 +634,7 @@
subroutine grib_read_from_file_int4 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
integer(kind=4),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -661,7 +661,7 @@
subroutine grib_read_from_file_real4 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
real(kind=4),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -688,7 +688,7 @@
subroutine grib_read_from_file_real8 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
real(kind=8),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -715,7 +715,7 @@
subroutine grib_read_from_file_char ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
character(len=1),dimension(:), intent(out) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -744,7 +744,7 @@
subroutine grib_write_bytes_char ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
character(len=1), dimension(:),intent(in) :: buffer
integer(kind=kindOfInt), intent(in) :: nbytes
integer(kind=kindOfSize_t), intent(in) :: nbytes
integer(kind=kindOfInt),optional,intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -771,7 +771,7 @@
subroutine grib_write_bytes_int4 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
integer(kind=4), dimension(:),intent(in) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional,intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -798,7 +798,7 @@
subroutine grib_write_bytes_real4 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
real(kind=4), dimension(:),intent(in) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional,intent(out) :: status
integer(kind=kindOfInt) :: iret
@ -825,7 +825,7 @@
subroutine grib_write_bytes_real8 ( ifile, buffer, nbytes, status )
integer(kind=kindOfInt),intent(in) :: ifile
real(kind=8), dimension(:),intent(in) :: buffer
integer(kind=kindOfInt), intent(inout) :: nbytes
integer(kind=kindOfSize_t), intent(inout) :: nbytes
integer(kind=kindOfInt),optional,intent(out) :: status
integer(kind=kindOfInt) :: iret

View File

@ -1,3 +1,12 @@
! Copyright 2005-2012 ECMWF.
!
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
!
! 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.
!> Get the distinct values of the key in argument contained in the index. The key must belong to the index.
!>
!>

View File

@ -1,3 +1,12 @@
! Copyright 2005-2012 ECMWF.
!
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
!
! 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.
!> Get the distinct values of the key in argument contained in the index. The key must belong to the index.
!>
!>

View File

@ -707,51 +707,47 @@ static int clear_keys_iterator(int keys_iterator_id){
return ret;
}
int grib_f_read_any_headers_only_from_file_(int* fid, char* buffer, int* nbytes) {
int grib_f_read_any_headers_only_from_file_(int* fid, char* buffer, size_t* nbytes) {
grib_context* c;
int err=0;
size_t size=(size_t)*nbytes;
FILE* f=get_file(*fid);
if (f) {
c=grib_context_get_default( );
err=grib_read_any_headers_only_from_file(c,f,buffer,&size);
*nbytes=size;
err=grib_read_any_headers_only_from_file(c,f,buffer,nbytes);
return err;
} else {
return GRIB_INVALID_FILE;
}
}
int grib_f_read_any_headers_only_from_file__(int* fid, char* buffer, int* nbytes) {
int grib_f_read_any_headers_only_from_file__(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_any_headers_only_from_file_(fid,buffer,nbytes);
}
int grib_f_read_any_headers_only_from_file(int* fid, char* buffer, int* nbytes) {
int grib_f_read_any_headers_only_from_file(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_any_headers_only_from_file_(fid,buffer,nbytes);
}
int grib_f_read_any_from_file_(int* fid, char* buffer, int* nbytes) {
int grib_f_read_any_from_file_(int* fid, char* buffer, size_t* nbytes) {
grib_context* c;
int err=0;
size_t size=(size_t)*nbytes;
FILE* f=get_file(*fid);
if (f) {
c=grib_context_get_default( );
err=grib_read_any_from_file(c,f,buffer,&size);
*nbytes=size;
err=grib_read_any_from_file(c,f,buffer,nbytes);
return err;
} else {
return GRIB_INVALID_FILE;
}
}
int grib_f_read_any_from_file__(int* fid, char* buffer, int* nbytes) {
int grib_f_read_any_from_file__(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_any_from_file_(fid,buffer,nbytes);
}
int grib_f_read_any_from_file(int* fid, char* buffer, int* nbytes) {
int grib_f_read_any_from_file(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_any_from_file_(fid,buffer,nbytes);
}
int grib_f_write_file_(int* fid, char* buffer, int* nbytes) {
int grib_f_write_file_(int* fid, char* buffer, size_t* nbytes) {
grib_context* c;
FILE* f=get_file(*fid);
@ -768,14 +764,14 @@ int grib_f_write_file_(int* fid, char* buffer, int* nbytes) {
return GRIB_INVALID_FILE;
}
}
int grib_f_write_file__(int* fid, char* buffer, int* nbytes) {
int grib_f_write_file__(int* fid, char* buffer, size_t* nbytes) {
return grib_f_write_file_(fid,buffer,nbytes);
}
int grib_f_write_file(int* fid, char* buffer, int* nbytes) {
int grib_f_write_file(int* fid, char* buffer, size_t* nbytes) {
return grib_f_write_file_(fid,buffer,nbytes);
}
int grib_f_read_file_(int* fid, char* buffer, int* nbytes) {
int grib_f_read_file_(int* fid, char* buffer, size_t* nbytes) {
grib_context* c;
FILE* f=get_file(*fid);
@ -793,10 +789,10 @@ int grib_f_read_file_(int* fid, char* buffer, int* nbytes) {
}
}
int grib_f_read_file__(int* fid, char* buffer, int* nbytes) {
int grib_f_read_file__(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_file_(fid,buffer,nbytes);
}
int grib_f_read_file(int* fid, char* buffer, int* nbytes) {
int grib_f_read_file(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_file_(fid,buffer,nbytes);
}
@ -1134,7 +1130,7 @@ int grib_f_keys_iterator_get_name_(int* iterid,char* name,int len) {
fort_char_clean(name,len);
sprintf(buf, "%s", grib_keys_iterator_get_name(kiter));
sprintf(buf,"%s",grib_keys_iterator_get_name(kiter));
lsize=strlen(buf);
if (len < lsize) return GRIB_ARRAY_TOO_SMALL;
@ -1356,7 +1352,7 @@ int grib_f_headers_only_new_from_file_(int* fid, int* gid){
grib_handle *h = NULL;
if(f){
h = grib_handle_headers_only_new_from_file(0,f,&err);
h=eccode_grib_new_from_file ( 0, f,1,&err);
if(h){
push_handle(h,gid);
return GRIB_SUCCESS;

View File

@ -1,17 +1,26 @@
/*
* Copyright 2005-2012 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* 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.
*/
/* grib_fortran.c */
int grib_f_read_any_headers_only_from_file_(int *fid, char *buffer, int *nbytes);
int grib_f_read_any_headers_only_from_file__(int *fid, char *buffer, int *nbytes);
int grib_f_read_any_headers_only_from_file(int *fid, char *buffer, int *nbytes);
int grib_f_read_any_from_file_(int *fid, char *buffer, int *nbytes);
int grib_f_read_any_from_file__(int *fid, char *buffer, int *nbytes);
int grib_f_read_any_from_file(int *fid, char *buffer, int *nbytes);
int grib_f_write_file_(int *fid, char *buffer, int *nbytes);
int grib_f_write_file__(int *fid, char *buffer, int *nbytes);
int grib_f_write_file(int *fid, char *buffer, int *nbytes);
int grib_f_read_file_(int *fid, char *buffer, int *nbytes);
int grib_f_read_file__(int *fid, char *buffer, int *nbytes);
int grib_f_read_file(int *fid, char *buffer, int *nbytes);
int grib_f_read_any_headers_only_from_file_(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_any_headers_only_from_file__(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_any_headers_only_from_file(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_any_from_file_(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_any_from_file__(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_any_from_file(int *fid, char *buffer, size_t *nbytes);
int grib_f_write_file_(int *fid, char *buffer, size_t *nbytes);
int grib_f_write_file__(int *fid, char *buffer, size_t *nbytes);
int grib_f_write_file(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_file_(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_file__(int *fid, char *buffer, size_t *nbytes);
int grib_f_read_file(int *fid, char *buffer, size_t *nbytes);
int grib_f_open_file_(int *fid, char *name, char *op, int lname, int lop);
int grib_f_open_file__(int *fid, char *name, char *op, int lname, int lop);
int grib_f_open_file(int *fid, char *name, char *op, int lname, int lop);

View File

@ -1,3 +1,11 @@
! Copyright 2005-2012 ECMWF.
!
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
!
! 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.
integer function kind_of_size_t()
integer(2), dimension(2) :: x2 = (/1, 2/)
integer(4), dimension(2) :: x4 = (/1, 2/)

View File

@ -1,3 +1,11 @@
! Copyright 2005-2012 ECMWF.
!
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
!
! 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.
integer function kind_of_size_t()
integer(2), dimension(2) :: x2 = (/1, 2/)
integer(4), dimension(2) :: x4 = (/1, 2/)

View File

@ -0,0 +1,39 @@
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
constant GRIBEXSection1Problem = 120 - section1Length ;
template mars_labeling "grib1/mars_labeling.def";
unsigned[1] yearOfReference = yearOfCentury : dump;
unsigned[1] monthOfReference = month : dump;
unsigned[1] dayOfReference = day : dump;
unsigned[1] hourOfReference = hour : dump;
unsigned[1] minuteOfReference = minute : dump;
unsigned[1] centuryOfReference = centuryOfReferenceTimeOfData : dump;
transient secondsOfReference = 0 ;
unsigned[1] numberOfForcasts=0 : dump;
unsigned[1] numberOfAnalysis=1 : dump;
if (numberOfForcasts) {
unsigned[3] forecastSteps[numberOfForcasts] : dump;
}
if (numberOfAnalysis) {
signed[3] analysisOffsets[numberOfAnalysis] : dump;
}
padto padding_local_35(offsetSection1 + 120);
meta dateOfReference g1date(centuryOfReference,yearOfReference,monthOfReference,dayOfReference) : dump;
meta timeOfReference time(hourOfReference,minuteOfReference,secondsOfReference) : dump;
if (indicatorOfTypeOfLevel==160) {
alias mars.levelist = level;
}

View File

@ -0,0 +1,160 @@
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
# START grib1::section
# SECTION 4, Binary data section
# Length of section
# (octets)
position offsetSection4;
# Due to a trick done by GRIBEX to support large GRIBs, we need a special treatment
# of the message length and of the section4 lenth, so instead of
# length[3] section4Length ;
# we get:
g1_section4_length[3] section4Length(totalLength);
meta section4Pointer section_pointer(offsetSection4,section4Length,4);
g1_half_byte_codeflag halfByte;
flags[1] dataFlag "grib1/11.table" = 0 : read_only;
signed[2] binaryScaleFactor = 0 : read_only,dump;
ibmfloat referenceValue : read_only,dump;
unsigned[1] bitsPerValue : dump ;
alias numberOfBitsContainingEachPackedValue = bitsPerValue;
meta referenceValueError reference_value_error(referenceValue,ibm);
flagbit sphericalHarmonics(dataFlag,7) : dump;
flagbit complexPacking(dataFlag,6) : dump;
flagbit integerPointValues(dataFlag,5) : dump;
flagbit additionalFlagPresent(dataFlag,4) : edition_specific,dump;
transient hideThis=0;
concept packingType {
#set uses the last one
#get returns the first match
"grid_simple" = { sphericalHarmonics = 0; complexPacking = 0; additionalFlagPresent = 0;}
"grid_ieee" = { sphericalHarmonics = 0; complexPacking = 0;
integerPointValues=1; additionalFlagPresent=1;}
"spectral_complex" = { sphericalHarmonics = 1; complexPacking = 1;
additionalFlagPresent = 0; }
"spectral_simple" = { sphericalHarmonics = 1; complexPacking = 0; additionalFlagPresent = 0;
representationMode=1;}
"spectral_ieee" = { sphericalHarmonics = 1; complexPacking = 1;
additionalFlagPresent = 0; hideThis=1; }
"grid_simple_matrix" = { sphericalHarmonics = 0; complexPacking = 0; additionalFlagPresent = 1;}
"grid_second_order" = { sphericalHarmonics = 0; complexPacking = 1; }
"grid_complex" = { sphericalHarmonics = 0; complexPacking = 0; additionalFlagPresent = 0;}
"grid_complex_spatial_differencing" = { sphericalHarmonics = 0; complexPacking = 0; additionalFlagPresent = 0;}
"grid_jpeg" = { sphericalHarmonics = 0; complexPacking = 0; additionalFlagPresent = 0;}
"grid_png" = { sphericalHarmonics = 0; complexPacking = 0; additionalFlagPresent = 0;}
"grid_simple_log_preprocessing"= { sphericalHarmonics = 0; complexPacking = 0; additionalFlagPresent = 0;}
} : dump;
alias ls.packingType=packingType;
alias typeOfPacking=packingType;
if( binaryScaleFactor == -32767) {
constant dataRepresentationTemplateNumber = 0;
constant bitMapIndicator = 0;
# For grib 1 -> 2
position offsetBeforeData;
transient numberOfCodedValues=numberOfPoints;
meta values data_dummy_field(
section4Length,
offsetBeforeData,
offsetSection4,
unitsFactor,
unitsBias,
changingPrecision,
numberOfCodedValues,
bitsPerValue,
referenceValue,
binaryScaleFactor,
decimalScaleFactor,
halfByte,
packingType,
grid_ieee,precision,
missingValue,
numberOfPoints,
bitmap
) : dump;
} else {
template dataValues "grib1/data.[packingType:s].def";
}
position offsetAfterData;
transient dataLength=(offsetAfterData-offsetBeforeData)/8;
if (bitmapPresent==1) {
alias numberOfEffectiveValues=numberOfDataPoints;
} else {
alias numberOfEffectiveValues=numberOfCodedValues;
}
_if (sphericalHarmonics) {
alias numberOfEffectiveValues=numberOfValues;
}
#meta setDecimalPrecision suppressed(decimalPrecision,changeDecimalPrecision);
meta changeDecimalPrecision decimal_precision(bitsPerValue,decimalScaleFactor,changingPrecision,values) : edition_specific;
meta decimalPrecision decimal_precision(bitsPerValue,decimalScaleFactor,changingPrecision) : edition_specific;
alias setDecimalPrecision=changeDecimalPrecision;
meta bitsPerValueAndRepack bits_per_value(values,bitsPerValue) : edition_specific;
alias setBitsPerValue=bitsPerValueAndRepack;
meta scaleValuesBy scale_values(values,missingValue) : edition_specific;
meta offsetValuesBy offset_values(values,missingValue) : edition_specific;
concept gridType {
#set uses the last one
#get returns the first match
"regular_ll" = {dataRepresentationType = 0; sphericalHarmonics = 0; PLPresent=0;}
"reduced_ll" = {dataRepresentationType = 0; sphericalHarmonics = 0; PLPresent=1; Ni=missing(); }
"mercator" = {dataRepresentationType = 1; sphericalHarmonics = 0; PLPresent=0; }
"lambert" = {dataRepresentationType = 3; sphericalHarmonics = 0; PLPresent=0; }
"polar_stereographic" = {dataRepresentationType = 5; sphericalHarmonics = 0; PLPresent=0; }
"UTM" = {dataRepresentationType = 6; sphericalHarmonics = 0; PLPresent=0; }
"simple_polyconic" = {dataRepresentationType = 7; sphericalHarmonics = 0; PLPresent=0; }
"albers" = {dataRepresentationType = 8; sphericalHarmonics = 0; PLPresent=0; }
"miller" = {dataRepresentationType = 8; sphericalHarmonics = 0; PLPresent=0; }
"rotated_ll" = {dataRepresentationType = 10; sphericalHarmonics = 0; PLPresent=0; }
"stretched_ll" = {dataRepresentationType = 20; sphericalHarmonics = 0; PLPresent=0; }
"stretched_rotated_ll" = {dataRepresentationType = 30; sphericalHarmonics = 0; PLPresent=0; }
"regular_gg" = {dataRepresentationType = 4; sphericalHarmonics = 0; PLPresent=0; }
"rotated_gg" = {dataRepresentationType = 14; sphericalHarmonics = 0; PLPresent=0; }
"stretched_gg" = {dataRepresentationType = 24; sphericalHarmonics = 0; PLPresent=0; }
"stretched_rotated_gg" = {dataRepresentationType = 34; sphericalHarmonics = 0; PLPresent=0; }
"reduced_gg" = {dataRepresentationType = 4; sphericalHarmonics = 0;
PLPresent=1; numberOfPointsAlongAParallel = missing();
iDirectionIncrement = missing(); ijDirectionIncrementGiven=0;}
"sh" = {dataRepresentationType = 50; sphericalHarmonics = 1; PLPresent=0; }
"rotated_sh" = {dataRepresentationType = 60; sphericalHarmonics = 1; PLPresent=0; }
"stretched_sh" = {dataRepresentationType = 70; sphericalHarmonics = 1; PLPresent=0; }
"stretched_rotated_sh" = {dataRepresentationType = 80; sphericalHarmonics = 1; PLPresent=0; }
"space_view" = {dataRepresentationType = 90; sphericalHarmonics = 0; PLPresent=0; }
"unknown" = {PLPresent=0;}
"unknown_PLPresent" = {PLPresent=1;}
} : dump;
alias ls.gridType=gridType;
alias geography.gridType=gridType;
alias typeOfGrid=gridType;
meta getNumberOfValues size(values) : edition_specific,dump ;
padtoeven padding_sec4_1(offsetSection4,section4Length) ;
meta md5Section4 md5(offsetSection4,section4Length);

View File

@ -2,16 +2,13 @@
use strict;
my $APACHE = <<"EOF";
Copyright 2005-2007 ECMWF
Copyright 2005-2012 ECMWF.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain a
copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License
for the specific language governing permissions and limitations under
the License.
This software is licensed under the terms of the Apache Licence Version 2.0
which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
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.
EOF
my $LGPL = <<"EOF";
@ -31,7 +28,7 @@ See LICENSE for details.
EOF
my $LICENSE = $LGPL;
my $LICENSE = $APACHE;
my %COMMENTS = (

12
mars_tests/Makefile.am Executable file
View File

@ -0,0 +1,12 @@
if WITH_MARS_TESTS
TESTS = ls.sh
noinst_PROGRAMS =
LDADD = $(top_builddir)/src/libgrib_api.a $(EMOS_LIB)
INCLUDES = -I$(top_builddir)/src
EXTRA_DIST = $(TESTS)
endif

53
mars_tests/include.sh Normal file
View File

@ -0,0 +1,53 @@
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
set -ea
echo
echo "TEST: $0"
data_dir=""
# save current working dir
save=`pwd`
if [ -z "${data_dir}" ]
then
cd ../
cpath=`pwd`
GRIB_DEFINITION_PATH=$cpath/definitions
export GRIB_DEFINITION_PATH
GRIB_SAMPLES_PATH=$cpath/samples
export GRIB_SAMPLES_PATH
tools_dir=$cpath/tools/
tigge_dir=$cpath/tigge/
data_dir=$cpath/data
test_dir=$cpath/tests
def_dir=$cpath/definitions
else
tools_dir=""
tigge_dir=""
fi
if [ -z "${GRIB_API_INCLUDE}" ]
then
GRIB_API_INCLUDE=`pwd`/src
fi
if [ -z "${GRIB_API_LIB}" ]
then
GRIB_API_LIB=`pwd`/src
fi
#${tools_dir}grib_info
# go back to current working dir
cd $save
set -u

60
mars_tests/ls.sh Executable file
View File

@ -0,0 +1,60 @@
#!/bin/sh
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
. ./include.sh
rm -f log | true
workdir=`pwd`
cd ${data_dir}
infile=regular_gaussian_model_level.grib1
${tools_dir}grib_ls -P count $infile > log
${tools_dir}grib_ls -p count,step $infile >> log
${tools_dir}grib_ls $infile >> log
${tools_dir}grib_ls -l 0,0,1 $infile >> log
${tools_dir}grib_get -l 0,0,1 $infile >> log
${tools_dir}grib_get -p count,step $infile >> log
${tools_dir}grib_get -P count $infile >> log
files=" reduced_gaussian_lsm.grib1
reduced_gaussian_model_level.grib1
reduced_gaussian_model_level.grib2
reduced_gaussian_pressure_level.grib1
reduced_gaussian_pressure_level.grib2
reduced_gaussian_pressure_level_constant.grib1
reduced_gaussian_pressure_level_constant.grib2
reduced_gaussian_sub_area.grib1
reduced_gaussian_sub_area.grib2
reduced_gaussian_surface.grib1
reduced_gaussian_surface.grib2
reduced_latlon_surface.grib1
reduced_latlon_surface.grib2
regular_gaussian_model_level.grib1
regular_gaussian_model_level.grib2
regular_gaussian_pressure_level.grib1
regular_gaussian_pressure_level.grib2
regular_gaussian_pressure_level_constant.grib1
regular_gaussian_pressure_level_constant.grib2
regular_gaussian_surface.grib1
regular_gaussian_surface.grib2
regular_latlon_surface.grib1
regular_latlon_surface.grib2
"
for file in $files
do
echo $file >> log
${tools_dir}grib_ls -l 40,28 $file | grep index | awk '{print $4;}' >> log
done
diff log ls.log
rm -f log
cd $workdir

View File

@ -1,3 +1,11 @@
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
#
BEGIN {
OFMT = "%.4f"
print "<?xml version=\"1.0\" ?>"
@ -39,12 +47,6 @@ END {
}
}
function jmeter_sample(dir, test_name,test_type,time,timestamp,success) {
print "<sample lb=\"" dir test_name "_" test_type "\" t=\"" time "\" ts=\"" timestamp "\" s=\"" success "\" />"
}
@ -59,7 +61,6 @@ function junit_sample(dir,test_name,time,success) {
}
}
function get_time_in_msecs(timestring) {
if ( timestring ~ /s$/ ) {
# It must be the 0m0.003s format
@ -83,3 +84,4 @@ function get_dir(dir) {
len = split(dir,bits,"/")
return bits[len]
}

View File

@ -1,3 +1,12 @@
#This script times stuff to get nice reports
# This script times stuff to get nice reports
# Copyright 2005-2012 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# 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.
echo "DIRECTORY: " `pwd`
time $@

View File

@ -83,7 +83,7 @@ If you have a web site set up for your module, mention it here.
=head1 AUTHOR
Baudouin Raoult, E<lt>mab@suse.deE<gt>
Baudouin Raoult
=head1 COPYRIGHT AND LICENSE
Copyright 2005-2012 ECMWF.

View File

@ -4,25 +4,25 @@ if CREATING_SHARED_LIBS
###############################################################################
# Case when shared libraries are enabled
###############################################################################
pkgpyexec_LTLIBRARIES = _gribapi_swig.la
pkgpyexec_LTLIBRARIES = _eccode_swig.la
_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)
_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)
INCLUDES = $(PYTHON_INCLUDES) -I$(NUMPY_INCLUDE)
gribapi_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c gribapi_swig_wrap.c
eccode_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c eccode_swig_wrap.c
gribapi_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py gribapi_swig.py
eccode_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py eccode_swig.py
# Extra stuff to go into the distribution
EXTRA_DIST = grib_interface.h \
grib_interface.c \
gribapi_swig.i \
gribapi.py \
eccode_swig.i \
eccode.py \
numpy.i \
grib_errors.h \
extrules.am \
@ -34,13 +34,13 @@ EXTRA_DIST = grib_interface.h \
# What else I want installed
pkgpyexec_DATA = \
gribapi.py \
gribapi_swig.py
eccode.py \
eccode_swig.py
CLEANFILES = \
gribapi_swig_wrap.c \
gribapi_swig.py \
_gribapi_swig.la
eccode_swig_wrap.c \
eccode_swig.py \
_eccode_swig.la
include $(DEVEL_RULES)
@ -52,16 +52,16 @@ else
noinst_SCRIPTS = setup.py
CLEANFILES = $(noinst_SCRIPTS) \
gribapi_swig_wrap.c \
gribapi_swig.py \
_gribapi_swig.so
eccode_swig_wrap.c \
eccode_swig.py \
_eccode_swig.so
# Extra stuff to go into the distribution
EXTRA_DIST = setup.py.in \
grib_interface.h \
grib_interface.c \
gribapi_swig.i \
gribapi.py \
eccode_swig.i \
eccode.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/grib_api
pdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/eccode
p_DATA = \
_gribapi_swig.so \
gribapi.py \
gribapi_swig.py
_eccode_swig.so \
eccode.py \
eccode_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
gribapi_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c gribapi_swig_wrap.c
eccode_swig_wrap.c: swig_wrap_$(PYTHON_DATA_HANDLER).c
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).c eccode_swig_wrap.c
gribapi_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py gribapi_swig.py
eccode_swig.py: swig_wrap_$(PYTHON_DATA_HANDLER).py
cp -f swig_wrap_$(PYTHON_DATA_HANDLER).py eccode_swig.py
_gribapi_swig.so: setup.py gribapi_swig_wrap.c gribapi_swig.py
_eccode_swig.so: setup.py eccode_swig_wrap.c eccode_swig.py
$(PYTHON) setup.py build_ext --inplace
include $(DEVEL_RULES)

8
python/eccode.i Normal file
View File

@ -0,0 +1,8 @@
%module grib
%{
#include "grib_api.h";
%}
%include typemaps.i
%include "grib_api_typemaps.h"

1676
python/eccode.py Normal file

File diff suppressed because it is too large Load Diff

209
python/eccode_swig.i Normal file
View File

@ -0,0 +1,209 @@
%module eccode_swig
%include "cpointer.i"
%include "cstring.i"
%include "typemaps.i"
%include "cdata.i"
%include "carrays.i"
%include "grib_errors.h"
%{
#define SWIG_FILE_WITH_INIT
#include "grib_interface.h"
%}
#if defined(NUMPY)
%include "numpy.i"
%init %{
import_array();
%}
#endif
/* Converts a PyFile instance to a stdio FILE* */
%typemap(in) FILE* {
if ( PyFile_Check($input) ){
$1 = PyFile_AsFile($input);
} else {
PyErr_SetString(PyExc_TypeError, "$1_name must be a file type.");
return NULL;
}
}
%pointer_class(int, intp);
%pointer_class(long, longp);
%pointer_class(double, doublep);
%array_functions(double, doubleArray);
%array_functions(long, longArray);
%array_functions(int, intArray);
// creation
int grib_c_new_from_file(FILE* f, int* INOUT, int headers_only);
int grib_c_new_bufr_from_file(FILE* f, int headers_only, int* INOUT);
int grib_c_new_gts_from_file(FILE* f, int headers_only, int* INOUT);
int grib_c_iterator_new(int* INPUT, int* OUTPUT, int* INPUT);
int grib_c_keys_iterator_new(int* INPUT, int* OUTPUT, char* name_space);
int grib_c_new_from_samples(int* INOUT, char* name);
int grib_c_index_new_from_file(char* file, char* keys, int* OUTPUT);
int grib_c_index_add_file(int* INPUT, char* file);
int grib_c_new_from_index(int *INPUT, int *INOUT);
int grib_c_index_write(int* INPUT, char* file);
int grib_c_index_read(char* file, int* OUTPUT);
int grib_c_new_from_message(int *INOUT, char *binmsg, size_t *INPUT);
// ---
%apply int* INPUT { int* fid };
%apply int* INPUT { int* gid };
%apply int* INPUT { int* iterid };
%apply int* INPUT { int* iid };
// file operations
int grib_c_count_in_file(FILE* f,int* OUTPUT);
// ---
// grib handle operations
int grib_c_release(int* gid);
int grib_c_write(int* gid, FILE* f);
int grib_c_get_size_long(int* gid, char* key, long* OUTPUT);
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);
// ---
// multi support
int grib_c_multi_new(int* OUTPUT);
int grib_c_multi_support_on(void);
int grib_c_multi_write(int* gid, FILE* f);
int grib_c_multi_support_off(void);
int grib_c_multi_release(int* gid);
int grib_c_multi_append(int* INPUT, int* INPUT,int* INPUT);
// ---
// gribex support
int grib_c_gribex_mode_on(void);
int grib_c_gribex_mode_off(void);
// ---
// keys iterator
int grib_c_keys_iterator_next(int* iterid);
int grib_c_keys_iterator_delete(int* iterid);
int grib_c_skip_computed(int* iterid);
int grib_c_skip_coded(int* iterid);
int grib_c_skip_edition_specific(int* iterid);
int grib_c_skip_duplicates(int* iterid);
int grib_c_skip_read_only(int* iterid);
int grib_c_skip_function(int* iterid);
int grib_c_keys_iterator_rewind(int* iterid);
%cstring_bounded_output(char* name, 1024);
int grib_c_keys_iterator_get_name(int* iterid, char* name, int len);
// ---
// indexing routines
int grib_c_index_get_size_long(int* iid, char* key, long* OUTPUT);
int grib_c_index_get_long(int* iid, char* key, long* val, int* size);
int grib_c_index_get_real8(int* iid, char* key, double* val, int* size);
%cstring_bounded_output(char* index_string_output, 1024*1024);
int grib_c_index_get_string(int* iid, char* key, char* index_string_output, int* INPUT, int* INOUT);
int grib_c_index_select_long(int *iid, char *key, long *INPUT);
int grib_c_index_select_real8(int *iid, char *key, double *INPUT);
int grib_c_index_select_string(int *iid, char *key, char *val);
int grib_c_index_release(int* iid);
// ---
// values iterator
int grib_c_iterator_delete(int* iterid);
int grib_c_iterator_next(int* iterid, double* OUTPUT, double* OUTPUT, double* OUTPUT);
// ---
// getting/setting key values
%cstring_output_withsize(char* string_val, size_t* string_size)
int grib_c_get_string(int* gid, char* key, char* string_val, size_t* string_size);
int grib_c_set_string(int* gid, char* key, char* sval, int len2);
int grib_c_get_long(int* gid, char* key, long* OUTPUT);
int grib_c_set_long(int* gid, char* key, long* INPUT);
int grib_c_get_double(int* gid, char* key, double* OUTPUT);
int grib_c_set_double(int* gid, char* key, double* INPUT);
int grib_c_set_real8_array(int* gid, char* key, double* val, int* size);
int grib_c_get_real8_array(int* gid, char* key, double* val, int* size);
int grib_c_get_long_array(int* gid, char* key, long* val, int* size);
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);
#if defined(NUMPY)
%apply (double* IN_ARRAY1, int DIM1) {(double* dpin_val, int dpin_val_dim1)};
%apply (long* IN_ARRAY1, int DIM1) {(long* lpin_val, int lpin_val_dim1)};
%apply (int* IN_ARRAY1, int DIM1) {(int* ipin_index, int ipin_index_dim1)};
%apply (double* ARGOUT_ARRAY1, int DIM1) {(double* dpout_val, int dpout_val_dim1)};
%apply (long* ARGOUT_ARRAY1, int DIM1) {(long* lpout_val, int lpout_val_dim1)};
%inline %{
void with_numpy() {
return;
}
int grib_set_double_ndarray(int* gid, char* key, double* dpin_val, int dpin_val_dim1) {
return grib_c_set_real8_array(gid,key,dpin_val,&dpin_val_dim1);
}
int grib_set_long_ndarray(int* gid, char* key, long* lpin_val, int lpin_val_dim1) {
return grib_c_set_long_array(gid,key,lpin_val,&lpin_val_dim1);
}
int grib_get_double_ndarray(int* gid, char* key, double* dpout_val, int dpout_val_dim1) {
return grib_c_get_real8_array(gid,key,dpout_val,&dpout_val_dim1);
}
int grib_get_long_ndarray(int* gid, char* key, long* lpout_val, int lpout_val_dim1) {
return grib_c_get_long_array(gid,key,lpout_val,&lpout_val_dim1);
}
int grib_get_double_ndelements(int* gid, char* key, int* ipin_index, int ipin_index_dim1, double* dpout_val, int dpout_val_dim1) {
return grib_c_get_real8_elements(gid,key,ipin_index,dpout_val,&dpout_val_dim1);
}
%}
%clear double* dpin_val, int dpin_val_dim1;
%clear long* lpin_val, int lpin_val_dim1;
%clear int* ipout_val, int ipout_val_dim1;
%clear double* dpout_val, int dpout_val_dim1;
%clear long* lpout_val, int lpout_val_dim1;
#endif
// ---
// nearest
int grib_c_find_nearest_single(int* gid, int* INPUT, double* INPUT, double* INPUT, double* OUTPUT, double* OUTPUT, double* OUTPUT, double* OUTPUT, int* OUTPUT);
int grib_c_find_nearest_four_single(int* gid, int* INPUT, double* INPUT, double* INPUT, double* outlats, double* outlons, double* values, double* distances, int* indexes);
// ---
/*
* Get the binary string message for a grib.
*
* Set the 3rd argument to nothing in 'cstring_output_allocate_size'.
* This is kind of difficult to explain, but, *msg will point directly to
* the binary message data of the current grib (which is stored in
* handle->buffer->data if I remember correctly) so freeing it will cause
* the binary message data in the grib_handle structure to be freed. This
* is a problem as grib_api does not know that, so it tries to free it
* itself (grib_release does that) resulting in a 'Segmentation fault'.
*/
%cstring_output_allocate_size(const void **binmsg, size_t *binmsglen,);
int grib_c_get_message(int *gid, const void **binmsg, size_t *binmsglen);
%clear const void **binmsg, size_t *binmsglen;
%clear int* fid;
%clear int* gid;
%clear int* iterid;
%cstring_bounded_output(char* error_message, 1024);
int grib_c_get_error_string(int* INPUT, char* error_message, int len);
void no_fail_on_wrong_length(int flag);
long grib_c_get_api_version();
void grib_c_gts_header_on();
void grib_c_gts_header_off();

View File

@ -1,8 +1,8 @@
swig : gribapi_swig.i
swig : eccode_swig.i
p4 edit swig_wrap_numpy.c swig_wrap_numpy.py swig_wrap_array.c swig_wrap_array.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 -DNUMPY -o swig_wrap_numpy.c eccode_swig.i
cp eccode_swig.py swig_wrap_numpy.py
swig -python -module gribapi_swig -o swig_wrap_array.c gribapi_swig.i
cp gribapi_swig.py swig_wrap_array.py
swig -python -module eccode_swig -o swig_wrap_array.c eccode_swig.i
cp eccode_swig.py swig_wrap_array.py

View File

@ -992,12 +992,12 @@ int grib_c_count_in_file(FILE* f,int* n) {
return err;
}
int grib_c_new_gts_from_file(FILE* f, int* gid){
int grib_c_new_gts_from_file(FILE* f,int headers_only, int* gid){
grib_handle *h = NULL;
int err = 0;
if(f){
h = grib_gts_handle_new_from_file(0,f,&err);
h = eccode_gts_new_from_file(0,f,headers_only,&err);
if(h){
push_handle(h,gid);
@ -1012,12 +1012,12 @@ int grib_c_new_gts_from_file(FILE* f, int* gid){
return GRIB_INVALID_FILE;
}
int grib_c_new_bufr_from_file(FILE* f, int* gid){
int grib_c_new_bufr_from_file(FILE* f,int headers_only,int* gid){
grib_handle *h = NULL;
int err = 0;
if(f){
h = grib_bufr_handle_new_from_file(0,f,&err);
h = eccode_bufr_new_from_file(0,f,headers_only,&err);
if(h){
push_handle(h,gid);
@ -1037,9 +1037,7 @@ int grib_c_new_from_file(FILE* f, int* gid, int headers_only){
int err = 0;
if(f){
h = headers_only ?
grib_handle_headers_only_new_from_file(0,f,&err) :
grib_handle_new_from_file(0,f,&err);
h=eccode_grib_new_from_file(0,f,headers_only,&err);
if(h){
push_handle(h,gid);
@ -1169,6 +1167,29 @@ int grib_c_get_size_int(int* gid, char* key, int* val){
}
}
int grib_c_get_message_offset(int* gid, size_t* offset){
int err = GRIB_SUCCESS;
off_t myoffset;
grib_handle *h = get_handle(*gid);
if(!h)
return GRIB_INVALID_GRIB;
else {
err=grib_get_message_offset(h, &myoffset);
*offset=myoffset;
return err;
}
}
int grib_c_get_message_size(int* gid, size_t* size){
grib_handle *h = get_handle(*gid);
if(!h)
return GRIB_INVALID_GRIB;
else
return grib_get_message_size(h, size);
}
int grib_c_get_string_length(int* gid, char* key, size_t* val){
grib_handle *h = get_handle(*gid);
@ -1818,14 +1839,6 @@ int grib_c_get_data_real8(int* gid,double* lats, double* lons,double* values,siz
}
int grib_c_get_message_size(int* gid, size_t *len){
grib_handle *h = get_handle(*gid);
if(!h) return GRIB_INVALID_GRIB;
*len = h->buffer->ulength;
return GRIB_SUCCESS;
}
int grib_c_copy_message(int* gid, void* mess,size_t* len){
grib_handle *h = get_handle(*gid);

View File

@ -32,8 +32,8 @@ int grib_c_clone(int *gidsrc, int *giddest);
int grib_c_copy_namespace(int *gidsrc, char *name, int *giddest);
int grib_c_count_in_file(FILE *f, int *n);
int grib_c_new_from_file(FILE *f, int *gid, int headers_only);
int grib_c_new_bufr_from_file(FILE *f, int *gid);
int grib_c_new_gts_from_file(FILE *f, int *gid);
int grib_c_new_bufr_from_file(FILE *f, int headers_only,int *gid);
int grib_c_new_gts_from_file(FILE *f,int headers_only, int *gid);
int grib_c_new_from_index(int *iid, int *gid);
int grib_c_index_new_from_file(char *file, char *keys, int *gid);
int grib_c_index_add_file(int* iid, char* file);
@ -88,6 +88,7 @@ int grib_c_set_string(int *gid, char *key, char *val, int len2);
int grib_c_get_data_real4(int *gid, float *lats, float *lons, float *values, size_t *size);
int grib_c_get_data_real8(int *gid, double *lats, double *lons, double *values, size_t *size);
int grib_c_get_message_size(int *gid, size_t *len);
int grib_c_get_message_offset(int *gid, off_t *len);
int grib_c_copy_message(int *gid, void *mess, size_t *len);
void grib_c_check(int *err, char *call, char *str);
int grib_c_write(int *gid, FILE *f);

View File

@ -1,10 +1,18 @@
/*
* Copyright 2005-2012 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* 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.
*/
#include "Python.h"
#include "grib_api.h"
static PyObject* Error;
PyDoc_STRVAR(gribapi__doc__,
"gribapi point evalutation kernel");
@ -185,3 +193,4 @@ initgribapi(void)
Py_INCREF(Error);
PyModule_AddObject(m, "error", Error);
}

View File

@ -40,8 +40,8 @@ import_array();
// creation
int grib_c_new_from_file(FILE* f, int* INOUT, int headers_only);
int grib_c_new_bufr_from_file(FILE* f, int* INOUT);
int grib_c_new_gts_from_file(FILE* f, int* INOUT);
int grib_c_new_bufr_from_file(FILE* f, int headers_only, int* INOUT);
int grib_c_new_gts_from_file(FILE* f, int headers_only, int* INOUT);
int grib_c_iterator_new(int* INPUT, int* OUTPUT, int* INPUT);
int grib_c_keys_iterator_new(int* INPUT, int* OUTPUT, char* name_space);
int grib_c_new_from_samples(int* INOUT, char* name);
@ -134,7 +134,6 @@ 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 = ['gribapi_swig_wrap.c','grib_interface.c'],
sources = ['eccode_swig_wrap.c','grib_interface.c'],
swig_opts = [],
include_dirs = ['.'],
library_dirs = ["%s/lib" % sys.prefix],
@ -57,12 +57,12 @@ if data_handler == "numpy":
include_dirs = numpy_include,
)
gribapi_module = Extension('_gribapi_swig',**attdict)
eccode_module = Extension('_eccode_swig',**attdict)
setup (name = 'gribapi',
setup (name = 'eccode',
version = '0.1',
author = 'ECMWF',
description = """Grib API SWIG module""",
ext_modules = [gribapi_module],
py_modules = ['gribapi_swig','gribapi'],
ext_modules = [eccode_module],
py_modules = ['eccode_swig','eccode'],
)

View File

@ -2682,16 +2682,16 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
#endif
/*-----------------------------------------------
@(target):= _gribapi_swig.so
@(target):= _eccode_swig.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__gribapi_swig
# define SWIG_init PyInit__eccode_swig
#else
# define SWIG_init init_gribapi_swig
# define SWIG_init init_eccode_swig
#endif
#define SWIG_name "_gribapi_swig"
#define SWIG_name "_eccode_swig"
#define SWIGVERSION 0x010340
#define SWIG_VERSION SWIGVERSION
@ -4065,14 +4065,18 @@ fail:
SWIGINTERN PyObject *_wrap_grib_c_new_bufr_from_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
FILE *arg1 = (FILE *) 0 ;
int *arg2 = (int *) 0 ;
int temp2 ;
int res2 = 0 ;
int arg2 ;
int *arg3 = (int *) 0 ;
int val2 ;
int ecode2 = 0 ;
int temp3 ;
int res3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
int result;
if (!PyArg_ParseTuple(args,(char *)"OO:grib_c_new_bufr_from_file",&obj0,&obj1)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"OOO:grib_c_new_bufr_from_file",&obj0,&obj1,&obj2)) SWIG_fail;
{
if ( PyFile_Check(obj0) ){
arg1 = PyFile_AsFile(obj0);
@ -4081,23 +4085,28 @@ SWIGINTERN PyObject *_wrap_grib_c_new_bufr_from_file(PyObject *SWIGUNUSEDPARM(se
return NULL;
}
}
if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) {
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grib_c_new_bufr_from_file" "', argument " "2"" of type '" "int""'");
}
arg2 = (int)(val2);
if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) {
int val;
int ecode = SWIG_AsVal_int(obj1, &val);
int ecode = SWIG_AsVal_int(obj2, &val);
if (!SWIG_IsOK(ecode)) {
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_bufr_from_file" "', argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_bufr_from_file" "', argument " "3"" of type '" "int""'");
}
temp2 = (int)(val);
arg2 = &temp2;
res2 = SWIG_AddTmpMask(ecode);
temp3 = (int)(val);
arg3 = &temp3;
res3 = SWIG_AddTmpMask(ecode);
}
result = (int)grib_c_new_bufr_from_file(arg1,arg2);
result = (int)grib_c_new_bufr_from_file(arg1,arg2,arg3);
resultobj = SWIG_From_int((int)(result));
if (SWIG_IsTmpObj(res2)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
if (SWIG_IsTmpObj(res3)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
} else {
int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
}
return resultobj;
fail:
@ -4108,14 +4117,18 @@ fail:
SWIGINTERN PyObject *_wrap_grib_c_new_gts_from_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
FILE *arg1 = (FILE *) 0 ;
int *arg2 = (int *) 0 ;
int temp2 ;
int res2 = 0 ;
int arg2 ;
int *arg3 = (int *) 0 ;
int val2 ;
int ecode2 = 0 ;
int temp3 ;
int res3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
int result;
if (!PyArg_ParseTuple(args,(char *)"OO:grib_c_new_gts_from_file",&obj0,&obj1)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"OOO:grib_c_new_gts_from_file",&obj0,&obj1,&obj2)) SWIG_fail;
{
if ( PyFile_Check(obj0) ){
arg1 = PyFile_AsFile(obj0);
@ -4124,23 +4137,28 @@ SWIGINTERN PyObject *_wrap_grib_c_new_gts_from_file(PyObject *SWIGUNUSEDPARM(sel
return NULL;
}
}
if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) {
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grib_c_new_gts_from_file" "', argument " "2"" of type '" "int""'");
}
arg2 = (int)(val2);
if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) {
int val;
int ecode = SWIG_AsVal_int(obj1, &val);
int ecode = SWIG_AsVal_int(obj2, &val);
if (!SWIG_IsOK(ecode)) {
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_gts_from_file" "', argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_gts_from_file" "', argument " "3"" of type '" "int""'");
}
temp2 = (int)(val);
arg2 = &temp2;
res2 = SWIG_AddTmpMask(ecode);
temp3 = (int)(val);
arg3 = &temp3;
res3 = SWIG_AddTmpMask(ecode);
}
result = (int)grib_c_new_gts_from_file(arg1,arg2);
result = (int)grib_c_new_gts_from_file(arg1,arg2,arg3);
resultobj = SWIG_From_int((int)(result));
if (SWIG_IsTmpObj(res2)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
if (SWIG_IsTmpObj(res3)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
} else {
int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
}
return resultobj;
fail:
@ -4921,6 +4939,45 @@ fail:
}
SWIGINTERN PyObject *_wrap_grib_c_get_message_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
int *arg1 = (int *) 0 ;
size_t *arg2 = (size_t *) 0 ;
int temp1 ;
int res1 = 0 ;
size_t temp2 ;
int res2 = SWIG_TMPOBJ ;
PyObject * obj0 = 0 ;
int result;
arg2 = &temp2;
if (!PyArg_ParseTuple(args,(char *)"O:grib_c_get_message_offset",&obj0)) SWIG_fail;
if (!(SWIG_IsOK((res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1),SWIGTYPE_p_int,0))))) {
int val;
int ecode = SWIG_AsVal_int(obj0, &val);
if (!SWIG_IsOK(ecode)) {
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_get_message_offset" "', argument " "1"" of type '" "int""'");
}
temp1 = (int)(val);
arg1 = &temp1;
res1 = SWIG_AddTmpMask(ecode);
}
result = (int)grib_c_get_message_offset(arg1,arg2);
resultobj = SWIG_From_int((int)(result));
if (SWIG_IsTmpObj(res2)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_size_t((*arg2)));
} else {
int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_size_t, new_flags));
}
if (SWIG_IsNewObj(res1)) free((char*)arg1);
return resultobj;
fail:
if (SWIG_IsNewObj(res1)) free((char*)arg1);
return NULL;
}
SWIGINTERN PyObject *_wrap_grib_c_get_native_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
int *arg1 = (int *) 0 ;
@ -7352,6 +7409,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"grib_c_clone", _wrap_grib_c_clone, METH_VARARGS, NULL},
{ (char *)"grib_c_copy_namespace", _wrap_grib_c_copy_namespace, METH_VARARGS, NULL},
{ (char *)"grib_c_get_message_size", _wrap_grib_c_get_message_size, METH_VARARGS, NULL},
{ (char *)"grib_c_get_message_offset", _wrap_grib_c_get_message_offset, METH_VARARGS, NULL},
{ (char *)"grib_c_get_native_type", _wrap_grib_c_get_native_type, METH_VARARGS, NULL},
{ (char *)"grib_c_multi_new", _wrap_grib_c_multi_new, METH_VARARGS, NULL},
{ (char *)"grib_c_multi_support_on", _wrap_grib_c_multi_support_on, METH_VARARGS, NULL},

View File

@ -12,20 +12,20 @@ if version_info >= (2,6,0):
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_gribapi_swig', [dirname(__file__)])
fp, pathname, description = imp.find_module('_eccode_swig', [dirname(__file__)])
except ImportError:
import _gribapi_swig
return _gribapi_swig
import _eccode_swig
return _eccode_swig
if fp is not None:
try:
_mod = imp.load_module('_gribapi_swig', fp, pathname, description)
_mod = imp.load_module('_eccode_swig', fp, pathname, description)
finally:
fp.close()
return _mod
_gribapi_swig = swig_import_helper()
_eccode_swig = swig_import_helper()
del swig_import_helper
else:
import _gribapi_swig
import _eccode_swig
del version_info
try:
_swig_property = property
@ -68,68 +68,68 @@ except AttributeError:
def cdata(*args):
return _gribapi_swig.cdata(*args)
cdata = _gribapi_swig.cdata
return _eccode_swig.cdata(*args)
cdata = _eccode_swig.cdata
def memmove(*args):
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
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
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 = _gribapi_swig.new_intp()
this = _eccode_swig.new_intp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _gribapi_swig.delete_intp
__swig_destroy__ = _eccode_swig.delete_intp
__del__ = lambda self : None;
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
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
intp_swigregister(intp)
def intp_frompointer(*args):
return _gribapi_swig.intp_frompointer(*args)
intp_frompointer = _gribapi_swig.intp_frompointer
return _eccode_swig.intp_frompointer(*args)
intp_frompointer = _eccode_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 = _gribapi_swig.new_longp()
this = _eccode_swig.new_longp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _gribapi_swig.delete_longp
__swig_destroy__ = _eccode_swig.delete_longp
__del__ = lambda self : None;
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
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
longp_swigregister(longp)
def longp_frompointer(*args):
return _gribapi_swig.longp_frompointer(*args)
longp_frompointer = _gribapi_swig.longp_frompointer
return _eccode_swig.longp_frompointer(*args)
longp_frompointer = _eccode_swig.longp_frompointer
class doublep(_object):
__swig_setmethods__ = {}
@ -185,362 +185,366 @@ class doublep(_object):
__getattr__ = lambda self, name: _swig_getattr(self, doublep, name)
__repr__ = _swig_repr
def __init__(self):
this = _gribapi_swig.new_doublep()
this = _eccode_swig.new_doublep()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _gribapi_swig.delete_doublep
__swig_destroy__ = _eccode_swig.delete_doublep
__del__ = lambda self : None;
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
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
doublep_swigregister(doublep)
def doublep_frompointer(*args):
return _gribapi_swig.doublep_frompointer(*args)
doublep_frompointer = _gribapi_swig.doublep_frompointer
return _eccode_swig.doublep_frompointer(*args)
doublep_frompointer = _eccode_swig.doublep_frompointer
def new_doubleArray(*args):
return _gribapi_swig.new_doubleArray(*args)
new_doubleArray = _gribapi_swig.new_doubleArray
return _eccode_swig.new_doubleArray(*args)
new_doubleArray = _eccode_swig.new_doubleArray
def delete_doubleArray(*args):
return _gribapi_swig.delete_doubleArray(*args)
delete_doubleArray = _gribapi_swig.delete_doubleArray
return _eccode_swig.delete_doubleArray(*args)
delete_doubleArray = _eccode_swig.delete_doubleArray
def doubleArray_getitem(*args):
return _gribapi_swig.doubleArray_getitem(*args)
doubleArray_getitem = _gribapi_swig.doubleArray_getitem
return _eccode_swig.doubleArray_getitem(*args)
doubleArray_getitem = _eccode_swig.doubleArray_getitem
def doubleArray_setitem(*args):
return _gribapi_swig.doubleArray_setitem(*args)
doubleArray_setitem = _gribapi_swig.doubleArray_setitem
return _eccode_swig.doubleArray_setitem(*args)
doubleArray_setitem = _eccode_swig.doubleArray_setitem
def new_longArray(*args):
return _gribapi_swig.new_longArray(*args)
new_longArray = _gribapi_swig.new_longArray
return _eccode_swig.new_longArray(*args)
new_longArray = _eccode_swig.new_longArray
def delete_longArray(*args):
return _gribapi_swig.delete_longArray(*args)
delete_longArray = _gribapi_swig.delete_longArray
return _eccode_swig.delete_longArray(*args)
delete_longArray = _eccode_swig.delete_longArray
def longArray_getitem(*args):
return _gribapi_swig.longArray_getitem(*args)
longArray_getitem = _gribapi_swig.longArray_getitem
return _eccode_swig.longArray_getitem(*args)
longArray_getitem = _eccode_swig.longArray_getitem
def longArray_setitem(*args):
return _gribapi_swig.longArray_setitem(*args)
longArray_setitem = _gribapi_swig.longArray_setitem
return _eccode_swig.longArray_setitem(*args)
longArray_setitem = _eccode_swig.longArray_setitem
def new_intArray(*args):
return _gribapi_swig.new_intArray(*args)
new_intArray = _gribapi_swig.new_intArray
return _eccode_swig.new_intArray(*args)
new_intArray = _eccode_swig.new_intArray
def delete_intArray(*args):
return _gribapi_swig.delete_intArray(*args)
delete_intArray = _gribapi_swig.delete_intArray
return _eccode_swig.delete_intArray(*args)
delete_intArray = _eccode_swig.delete_intArray
def intArray_getitem(*args):
return _gribapi_swig.intArray_getitem(*args)
intArray_getitem = _gribapi_swig.intArray_getitem
return _eccode_swig.intArray_getitem(*args)
intArray_getitem = _eccode_swig.intArray_getitem
def intArray_setitem(*args):
return _gribapi_swig.intArray_setitem(*args)
intArray_setitem = _gribapi_swig.intArray_setitem
return _eccode_swig.intArray_setitem(*args)
intArray_setitem = _eccode_swig.intArray_setitem
def grib_c_new_from_file(*args):
return _gribapi_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _gribapi_swig.grib_c_new_from_file
return _eccode_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _eccode_swig.grib_c_new_from_file
def grib_c_new_bufr_from_file(*args):
return _gribapi_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _gribapi_swig.grib_c_new_bufr_from_file
return _eccode_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _eccode_swig.grib_c_new_bufr_from_file
def grib_c_new_gts_from_file(*args):
return _gribapi_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _gribapi_swig.grib_c_new_gts_from_file
return _eccode_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _eccode_swig.grib_c_new_gts_from_file
def grib_c_iterator_new(*args):
return _gribapi_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _gribapi_swig.grib_c_iterator_new
return _eccode_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _eccode_swig.grib_c_iterator_new
def grib_c_keys_iterator_new(*args):
return _gribapi_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _gribapi_swig.grib_c_keys_iterator_new
return _eccode_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _eccode_swig.grib_c_keys_iterator_new
def grib_c_new_from_samples(*args):
return _gribapi_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _gribapi_swig.grib_c_new_from_samples
return _eccode_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _eccode_swig.grib_c_new_from_samples
def grib_c_index_new_from_file(*args):
return _gribapi_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _gribapi_swig.grib_c_index_new_from_file
return _eccode_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _eccode_swig.grib_c_index_new_from_file
def grib_c_index_add_file(*args):
return _gribapi_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _gribapi_swig.grib_c_index_add_file
return _eccode_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _eccode_swig.grib_c_index_add_file
def grib_c_new_from_index(*args):
return _gribapi_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _gribapi_swig.grib_c_new_from_index
return _eccode_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _eccode_swig.grib_c_new_from_index
def grib_c_index_write(*args):
return _gribapi_swig.grib_c_index_write(*args)
grib_c_index_write = _gribapi_swig.grib_c_index_write
return _eccode_swig.grib_c_index_write(*args)
grib_c_index_write = _eccode_swig.grib_c_index_write
def grib_c_index_read(*args):
return _gribapi_swig.grib_c_index_read(*args)
grib_c_index_read = _gribapi_swig.grib_c_index_read
return _eccode_swig.grib_c_index_read(*args)
grib_c_index_read = _eccode_swig.grib_c_index_read
def grib_c_new_from_message(*args):
return _gribapi_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _gribapi_swig.grib_c_new_from_message
return _eccode_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _eccode_swig.grib_c_new_from_message
def grib_c_count_in_file(*args):
return _gribapi_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _gribapi_swig.grib_c_count_in_file
return _eccode_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _eccode_swig.grib_c_count_in_file
def grib_c_release(*args):
return _gribapi_swig.grib_c_release(*args)
grib_c_release = _gribapi_swig.grib_c_release
return _eccode_swig.grib_c_release(*args)
grib_c_release = _eccode_swig.grib_c_release
def grib_c_write(*args):
return _gribapi_swig.grib_c_write(*args)
grib_c_write = _gribapi_swig.grib_c_write
return _eccode_swig.grib_c_write(*args)
grib_c_write = _eccode_swig.grib_c_write
def grib_c_get_size_long(*args):
return _gribapi_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _gribapi_swig.grib_c_get_size_long
return _eccode_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _eccode_swig.grib_c_get_size_long
def grib_c_get_string_length(*args):
return _gribapi_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _gribapi_swig.grib_c_get_string_length
return _eccode_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _eccode_swig.grib_c_get_string_length
def grib_c_clone(*args):
return _gribapi_swig.grib_c_clone(*args)
grib_c_clone = _gribapi_swig.grib_c_clone
return _eccode_swig.grib_c_clone(*args)
grib_c_clone = _eccode_swig.grib_c_clone
def grib_c_copy_namespace(*args):
return _gribapi_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _gribapi_swig.grib_c_copy_namespace
return _eccode_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _eccode_swig.grib_c_copy_namespace
def grib_c_get_message_size(*args):
return _gribapi_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _gribapi_swig.grib_c_get_message_size
return _eccode_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _eccode_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
def grib_c_get_native_type(*args):
return _gribapi_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _gribapi_swig.grib_c_get_native_type
return _eccode_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _eccode_swig.grib_c_get_native_type
def grib_c_multi_new():
return _gribapi_swig.grib_c_multi_new()
grib_c_multi_new = _gribapi_swig.grib_c_multi_new
return _eccode_swig.grib_c_multi_new()
grib_c_multi_new = _eccode_swig.grib_c_multi_new
def 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
return _eccode_swig.grib_c_multi_support_on()
grib_c_multi_support_on = _eccode_swig.grib_c_multi_support_on
def grib_c_multi_write(*args):
return _gribapi_swig.grib_c_multi_write(*args)
grib_c_multi_write = _gribapi_swig.grib_c_multi_write
return _eccode_swig.grib_c_multi_write(*args)
grib_c_multi_write = _eccode_swig.grib_c_multi_write
def 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
return _eccode_swig.grib_c_multi_support_off()
grib_c_multi_support_off = _eccode_swig.grib_c_multi_support_off
def grib_c_multi_release(*args):
return _gribapi_swig.grib_c_multi_release(*args)
grib_c_multi_release = _gribapi_swig.grib_c_multi_release
return _eccode_swig.grib_c_multi_release(*args)
grib_c_multi_release = _eccode_swig.grib_c_multi_release
def grib_c_multi_append(*args):
return _gribapi_swig.grib_c_multi_append(*args)
grib_c_multi_append = _gribapi_swig.grib_c_multi_append
return _eccode_swig.grib_c_multi_append(*args)
grib_c_multi_append = _eccode_swig.grib_c_multi_append
def 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
return _eccode_swig.grib_c_gribex_mode_on()
grib_c_gribex_mode_on = _eccode_swig.grib_c_gribex_mode_on
def 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
return _eccode_swig.grib_c_gribex_mode_off()
grib_c_gribex_mode_off = _eccode_swig.grib_c_gribex_mode_off
def grib_c_keys_iterator_next(*args):
return _gribapi_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _gribapi_swig.grib_c_keys_iterator_next
return _eccode_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _eccode_swig.grib_c_keys_iterator_next
def grib_c_keys_iterator_delete(*args):
return _gribapi_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _gribapi_swig.grib_c_keys_iterator_delete
return _eccode_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _eccode_swig.grib_c_keys_iterator_delete
def grib_c_skip_computed(*args):
return _gribapi_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _gribapi_swig.grib_c_skip_computed
return _eccode_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _eccode_swig.grib_c_skip_computed
def grib_c_skip_coded(*args):
return _gribapi_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _gribapi_swig.grib_c_skip_coded
return _eccode_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _eccode_swig.grib_c_skip_coded
def grib_c_skip_edition_specific(*args):
return _gribapi_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _gribapi_swig.grib_c_skip_edition_specific
return _eccode_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _eccode_swig.grib_c_skip_edition_specific
def grib_c_skip_duplicates(*args):
return _gribapi_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _gribapi_swig.grib_c_skip_duplicates
return _eccode_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _eccode_swig.grib_c_skip_duplicates
def grib_c_skip_read_only(*args):
return _gribapi_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _gribapi_swig.grib_c_skip_read_only
return _eccode_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _eccode_swig.grib_c_skip_read_only
def grib_c_skip_function(*args):
return _gribapi_swig.grib_c_skip_function(*args)
grib_c_skip_function = _gribapi_swig.grib_c_skip_function
return _eccode_swig.grib_c_skip_function(*args)
grib_c_skip_function = _eccode_swig.grib_c_skip_function
def grib_c_keys_iterator_rewind(*args):
return _gribapi_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _gribapi_swig.grib_c_keys_iterator_rewind
return _eccode_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _eccode_swig.grib_c_keys_iterator_rewind
def grib_c_keys_iterator_get_name(*args):
return _gribapi_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _gribapi_swig.grib_c_keys_iterator_get_name
return _eccode_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _eccode_swig.grib_c_keys_iterator_get_name
def grib_c_index_get_size_long(*args):
return _gribapi_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _gribapi_swig.grib_c_index_get_size_long
return _eccode_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _eccode_swig.grib_c_index_get_size_long
def grib_c_index_get_long(*args):
return _gribapi_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _gribapi_swig.grib_c_index_get_long
return _eccode_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _eccode_swig.grib_c_index_get_long
def grib_c_index_get_real8(*args):
return _gribapi_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _gribapi_swig.grib_c_index_get_real8
return _eccode_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _eccode_swig.grib_c_index_get_real8
def grib_c_index_get_string(*args):
return _gribapi_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _gribapi_swig.grib_c_index_get_string
return _eccode_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _eccode_swig.grib_c_index_get_string
def grib_c_index_select_long(*args):
return _gribapi_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _gribapi_swig.grib_c_index_select_long
return _eccode_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _eccode_swig.grib_c_index_select_long
def grib_c_index_select_real8(*args):
return _gribapi_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _gribapi_swig.grib_c_index_select_real8
return _eccode_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _eccode_swig.grib_c_index_select_real8
def grib_c_index_select_string(*args):
return _gribapi_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _gribapi_swig.grib_c_index_select_string
return _eccode_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _eccode_swig.grib_c_index_select_string
def grib_c_index_release(*args):
return _gribapi_swig.grib_c_index_release(*args)
grib_c_index_release = _gribapi_swig.grib_c_index_release
return _eccode_swig.grib_c_index_release(*args)
grib_c_index_release = _eccode_swig.grib_c_index_release
def grib_c_iterator_delete(*args):
return _gribapi_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _gribapi_swig.grib_c_iterator_delete
return _eccode_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _eccode_swig.grib_c_iterator_delete
def grib_c_iterator_next(*args):
return _gribapi_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _gribapi_swig.grib_c_iterator_next
return _eccode_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _eccode_swig.grib_c_iterator_next
def grib_c_get_string(*args):
return _gribapi_swig.grib_c_get_string(*args)
grib_c_get_string = _gribapi_swig.grib_c_get_string
return _eccode_swig.grib_c_get_string(*args)
grib_c_get_string = _eccode_swig.grib_c_get_string
def grib_c_set_string(*args):
return _gribapi_swig.grib_c_set_string(*args)
grib_c_set_string = _gribapi_swig.grib_c_set_string
return _eccode_swig.grib_c_set_string(*args)
grib_c_set_string = _eccode_swig.grib_c_set_string
def grib_c_get_long(*args):
return _gribapi_swig.grib_c_get_long(*args)
grib_c_get_long = _gribapi_swig.grib_c_get_long
return _eccode_swig.grib_c_get_long(*args)
grib_c_get_long = _eccode_swig.grib_c_get_long
def grib_c_set_long(*args):
return _gribapi_swig.grib_c_set_long(*args)
grib_c_set_long = _gribapi_swig.grib_c_set_long
return _eccode_swig.grib_c_set_long(*args)
grib_c_set_long = _eccode_swig.grib_c_set_long
def grib_c_get_double(*args):
return _gribapi_swig.grib_c_get_double(*args)
grib_c_get_double = _gribapi_swig.grib_c_get_double
return _eccode_swig.grib_c_get_double(*args)
grib_c_get_double = _eccode_swig.grib_c_get_double
def grib_c_set_double(*args):
return _gribapi_swig.grib_c_set_double(*args)
grib_c_set_double = _gribapi_swig.grib_c_set_double
return _eccode_swig.grib_c_set_double(*args)
grib_c_set_double = _eccode_swig.grib_c_set_double
def grib_c_set_real8_array(*args):
return _gribapi_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _gribapi_swig.grib_c_set_real8_array
return _eccode_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _eccode_swig.grib_c_set_real8_array
def grib_c_get_real8_array(*args):
return _gribapi_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _gribapi_swig.grib_c_get_real8_array
return _eccode_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _eccode_swig.grib_c_get_real8_array
def grib_c_get_long_array(*args):
return _gribapi_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _gribapi_swig.grib_c_get_long_array
return _eccode_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _eccode_swig.grib_c_get_long_array
def grib_c_set_long_array(*args):
return _gribapi_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _gribapi_swig.grib_c_set_long_array
return _eccode_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _eccode_swig.grib_c_set_long_array
def grib_c_get_real8_element(*args):
return _gribapi_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _gribapi_swig.grib_c_get_real8_element
return _eccode_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _eccode_swig.grib_c_get_real8_element
def grib_c_get_real8_elements(*args):
return _gribapi_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _gribapi_swig.grib_c_get_real8_elements
return _eccode_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _eccode_swig.grib_c_get_real8_elements
def grib_c_set_missing(*args):
return _gribapi_swig.grib_c_set_missing(*args)
grib_c_set_missing = _gribapi_swig.grib_c_set_missing
return _eccode_swig.grib_c_set_missing(*args)
grib_c_set_missing = _eccode_swig.grib_c_set_missing
def grib_c_set_key_vals(*args):
return _gribapi_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _gribapi_swig.grib_c_set_key_vals
return _eccode_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _eccode_swig.grib_c_set_key_vals
def grib_c_is_missing(*args):
return _gribapi_swig.grib_c_is_missing(*args)
grib_c_is_missing = _gribapi_swig.grib_c_is_missing
return _eccode_swig.grib_c_is_missing(*args)
grib_c_is_missing = _eccode_swig.grib_c_is_missing
def grib_c_is_defined(*args):
return _gribapi_swig.grib_c_is_defined(*args)
grib_c_is_defined = _gribapi_swig.grib_c_is_defined
return _eccode_swig.grib_c_is_defined(*args)
grib_c_is_defined = _eccode_swig.grib_c_is_defined
def grib_c_find_nearest_single(*args):
return _gribapi_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _gribapi_swig.grib_c_find_nearest_single
return _eccode_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _eccode_swig.grib_c_find_nearest_single
def grib_c_find_nearest_four_single(*args):
return _gribapi_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _gribapi_swig.grib_c_find_nearest_four_single
return _eccode_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _eccode_swig.grib_c_find_nearest_four_single
def grib_c_get_message(*args):
return _gribapi_swig.grib_c_get_message(*args)
grib_c_get_message = _gribapi_swig.grib_c_get_message
return _eccode_swig.grib_c_get_message(*args)
grib_c_get_message = _eccode_swig.grib_c_get_message
def grib_c_get_error_string(*args):
return _gribapi_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _gribapi_swig.grib_c_get_error_string
return _eccode_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _eccode_swig.grib_c_get_error_string
def no_fail_on_wrong_length(*args):
return _gribapi_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _gribapi_swig.no_fail_on_wrong_length
return _eccode_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _eccode_swig.no_fail_on_wrong_length
def 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
return _eccode_swig.grib_c_get_api_version()
grib_c_get_api_version = _eccode_swig.grib_c_get_api_version
def 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
return _eccode_swig.grib_c_gts_header_on()
grib_c_gts_header_on = _eccode_swig.grib_c_gts_header_on
def 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
return _eccode_swig.grib_c_gts_header_off()
grib_c_gts_header_off = _eccode_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):= _gribapi_swig.so
@(target):= _eccode_swig.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__gribapi_swig
# define SWIG_init PyInit__eccode_swig
#else
# define SWIG_init init_gribapi_swig
# define SWIG_init init_eccode_swig
#endif
#define SWIG_name "_gribapi_swig"
#define SWIG_name "_eccode_swig"
#define SWIGVERSION 0x010340
#define SWIG_VERSION SWIGVERSION
@ -4519,14 +4519,18 @@ fail:
SWIGINTERN PyObject *_wrap_grib_c_new_bufr_from_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
FILE *arg1 = (FILE *) 0 ;
int *arg2 = (int *) 0 ;
int temp2 ;
int res2 = 0 ;
int arg2 ;
int *arg3 = (int *) 0 ;
int val2 ;
int ecode2 = 0 ;
int temp3 ;
int res3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
int result;
if (!PyArg_ParseTuple(args,(char *)"OO:grib_c_new_bufr_from_file",&obj0,&obj1)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"OOO:grib_c_new_bufr_from_file",&obj0,&obj1,&obj2)) SWIG_fail;
{
if ( PyFile_Check(obj0) ){
arg1 = PyFile_AsFile(obj0);
@ -4535,23 +4539,28 @@ SWIGINTERN PyObject *_wrap_grib_c_new_bufr_from_file(PyObject *SWIGUNUSEDPARM(se
return NULL;
}
}
if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) {
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grib_c_new_bufr_from_file" "', argument " "2"" of type '" "int""'");
}
arg2 = (int)(val2);
if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) {
int val;
int ecode = SWIG_AsVal_int(obj1, &val);
int ecode = SWIG_AsVal_int(obj2, &val);
if (!SWIG_IsOK(ecode)) {
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_bufr_from_file" "', argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_bufr_from_file" "', argument " "3"" of type '" "int""'");
}
temp2 = (int)(val);
arg2 = &temp2;
res2 = SWIG_AddTmpMask(ecode);
temp3 = (int)(val);
arg3 = &temp3;
res3 = SWIG_AddTmpMask(ecode);
}
result = (int)grib_c_new_bufr_from_file(arg1,arg2);
result = (int)grib_c_new_bufr_from_file(arg1,arg2,arg3);
resultobj = SWIG_From_int((int)(result));
if (SWIG_IsTmpObj(res2)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
if (SWIG_IsTmpObj(res3)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
} else {
int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
}
return resultobj;
fail:
@ -4562,14 +4571,18 @@ fail:
SWIGINTERN PyObject *_wrap_grib_c_new_gts_from_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
FILE *arg1 = (FILE *) 0 ;
int *arg2 = (int *) 0 ;
int temp2 ;
int res2 = 0 ;
int arg2 ;
int *arg3 = (int *) 0 ;
int val2 ;
int ecode2 = 0 ;
int temp3 ;
int res3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
int result;
if (!PyArg_ParseTuple(args,(char *)"OO:grib_c_new_gts_from_file",&obj0,&obj1)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"OOO:grib_c_new_gts_from_file",&obj0,&obj1,&obj2)) SWIG_fail;
{
if ( PyFile_Check(obj0) ){
arg1 = PyFile_AsFile(obj0);
@ -4578,23 +4591,28 @@ SWIGINTERN PyObject *_wrap_grib_c_new_gts_from_file(PyObject *SWIGUNUSEDPARM(sel
return NULL;
}
}
if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) {
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grib_c_new_gts_from_file" "', argument " "2"" of type '" "int""'");
}
arg2 = (int)(val2);
if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) {
int val;
int ecode = SWIG_AsVal_int(obj1, &val);
int ecode = SWIG_AsVal_int(obj2, &val);
if (!SWIG_IsOK(ecode)) {
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_gts_from_file" "', argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_new_gts_from_file" "', argument " "3"" of type '" "int""'");
}
temp2 = (int)(val);
arg2 = &temp2;
res2 = SWIG_AddTmpMask(ecode);
temp3 = (int)(val);
arg3 = &temp3;
res3 = SWIG_AddTmpMask(ecode);
}
result = (int)grib_c_new_gts_from_file(arg1,arg2);
result = (int)grib_c_new_gts_from_file(arg1,arg2,arg3);
resultobj = SWIG_From_int((int)(result));
if (SWIG_IsTmpObj(res2)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
if (SWIG_IsTmpObj(res3)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
} else {
int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
}
return resultobj;
fail:
@ -5375,6 +5393,45 @@ fail:
}
SWIGINTERN PyObject *_wrap_grib_c_get_message_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
int *arg1 = (int *) 0 ;
size_t *arg2 = (size_t *) 0 ;
int temp1 ;
int res1 = 0 ;
size_t temp2 ;
int res2 = SWIG_TMPOBJ ;
PyObject * obj0 = 0 ;
int result;
arg2 = &temp2;
if (!PyArg_ParseTuple(args,(char *)"O:grib_c_get_message_offset",&obj0)) SWIG_fail;
if (!(SWIG_IsOK((res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1),SWIGTYPE_p_int,0))))) {
int val;
int ecode = SWIG_AsVal_int(obj0, &val);
if (!SWIG_IsOK(ecode)) {
SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "grib_c_get_message_offset" "', argument " "1"" of type '" "int""'");
}
temp1 = (int)(val);
arg1 = &temp1;
res1 = SWIG_AddTmpMask(ecode);
}
result = (int)grib_c_get_message_offset(arg1,arg2);
resultobj = SWIG_From_int((int)(result));
if (SWIG_IsTmpObj(res2)) {
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_size_t((*arg2)));
} else {
int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_size_t, new_flags));
}
if (SWIG_IsNewObj(res1)) free((char*)arg1);
return resultobj;
fail:
if (SWIG_IsNewObj(res1)) free((char*)arg1);
return NULL;
}
SWIGINTERN PyObject *_wrap_grib_c_get_native_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
int *arg1 = (int *) 0 ;
@ -8176,6 +8233,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"grib_c_clone", _wrap_grib_c_clone, METH_VARARGS, NULL},
{ (char *)"grib_c_copy_namespace", _wrap_grib_c_copy_namespace, METH_VARARGS, NULL},
{ (char *)"grib_c_get_message_size", _wrap_grib_c_get_message_size, METH_VARARGS, NULL},
{ (char *)"grib_c_get_message_offset", _wrap_grib_c_get_message_offset, METH_VARARGS, NULL},
{ (char *)"grib_c_get_native_type", _wrap_grib_c_get_native_type, METH_VARARGS, NULL},
{ (char *)"grib_c_multi_new", _wrap_grib_c_multi_new, METH_VARARGS, NULL},
{ (char *)"grib_c_multi_support_on", _wrap_grib_c_multi_support_on, METH_VARARGS, NULL},

View File

@ -12,20 +12,20 @@ if version_info >= (2,6,0):
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_gribapi_swig', [dirname(__file__)])
fp, pathname, description = imp.find_module('_eccode_swig', [dirname(__file__)])
except ImportError:
import _gribapi_swig
return _gribapi_swig
import _eccode_swig
return _eccode_swig
if fp is not None:
try:
_mod = imp.load_module('_gribapi_swig', fp, pathname, description)
_mod = imp.load_module('_eccode_swig', fp, pathname, description)
finally:
fp.close()
return _mod
_gribapi_swig = swig_import_helper()
_eccode_swig = swig_import_helper()
del swig_import_helper
else:
import _gribapi_swig
import _eccode_swig
del version_info
try:
_swig_property = property
@ -68,68 +68,68 @@ except AttributeError:
def cdata(*args):
return _gribapi_swig.cdata(*args)
cdata = _gribapi_swig.cdata
return _eccode_swig.cdata(*args)
cdata = _eccode_swig.cdata
def memmove(*args):
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
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
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 = _gribapi_swig.new_intp()
this = _eccode_swig.new_intp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _gribapi_swig.delete_intp
__swig_destroy__ = _eccode_swig.delete_intp
__del__ = lambda self : None;
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
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
intp_swigregister(intp)
def intp_frompointer(*args):
return _gribapi_swig.intp_frompointer(*args)
intp_frompointer = _gribapi_swig.intp_frompointer
return _eccode_swig.intp_frompointer(*args)
intp_frompointer = _eccode_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 = _gribapi_swig.new_longp()
this = _eccode_swig.new_longp()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _gribapi_swig.delete_longp
__swig_destroy__ = _eccode_swig.delete_longp
__del__ = lambda self : None;
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
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
longp_swigregister(longp)
def longp_frompointer(*args):
return _gribapi_swig.longp_frompointer(*args)
longp_frompointer = _gribapi_swig.longp_frompointer
return _eccode_swig.longp_frompointer(*args)
longp_frompointer = _eccode_swig.longp_frompointer
class doublep(_object):
__swig_setmethods__ = {}
@ -185,386 +185,390 @@ class doublep(_object):
__getattr__ = lambda self, name: _swig_getattr(self, doublep, name)
__repr__ = _swig_repr
def __init__(self):
this = _gribapi_swig.new_doublep()
this = _eccode_swig.new_doublep()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _gribapi_swig.delete_doublep
__swig_destroy__ = _eccode_swig.delete_doublep
__del__ = lambda self : None;
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
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
doublep_swigregister(doublep)
def doublep_frompointer(*args):
return _gribapi_swig.doublep_frompointer(*args)
doublep_frompointer = _gribapi_swig.doublep_frompointer
return _eccode_swig.doublep_frompointer(*args)
doublep_frompointer = _eccode_swig.doublep_frompointer
def new_doubleArray(*args):
return _gribapi_swig.new_doubleArray(*args)
new_doubleArray = _gribapi_swig.new_doubleArray
return _eccode_swig.new_doubleArray(*args)
new_doubleArray = _eccode_swig.new_doubleArray
def delete_doubleArray(*args):
return _gribapi_swig.delete_doubleArray(*args)
delete_doubleArray = _gribapi_swig.delete_doubleArray
return _eccode_swig.delete_doubleArray(*args)
delete_doubleArray = _eccode_swig.delete_doubleArray
def doubleArray_getitem(*args):
return _gribapi_swig.doubleArray_getitem(*args)
doubleArray_getitem = _gribapi_swig.doubleArray_getitem
return _eccode_swig.doubleArray_getitem(*args)
doubleArray_getitem = _eccode_swig.doubleArray_getitem
def doubleArray_setitem(*args):
return _gribapi_swig.doubleArray_setitem(*args)
doubleArray_setitem = _gribapi_swig.doubleArray_setitem
return _eccode_swig.doubleArray_setitem(*args)
doubleArray_setitem = _eccode_swig.doubleArray_setitem
def new_longArray(*args):
return _gribapi_swig.new_longArray(*args)
new_longArray = _gribapi_swig.new_longArray
return _eccode_swig.new_longArray(*args)
new_longArray = _eccode_swig.new_longArray
def delete_longArray(*args):
return _gribapi_swig.delete_longArray(*args)
delete_longArray = _gribapi_swig.delete_longArray
return _eccode_swig.delete_longArray(*args)
delete_longArray = _eccode_swig.delete_longArray
def longArray_getitem(*args):
return _gribapi_swig.longArray_getitem(*args)
longArray_getitem = _gribapi_swig.longArray_getitem
return _eccode_swig.longArray_getitem(*args)
longArray_getitem = _eccode_swig.longArray_getitem
def longArray_setitem(*args):
return _gribapi_swig.longArray_setitem(*args)
longArray_setitem = _gribapi_swig.longArray_setitem
return _eccode_swig.longArray_setitem(*args)
longArray_setitem = _eccode_swig.longArray_setitem
def new_intArray(*args):
return _gribapi_swig.new_intArray(*args)
new_intArray = _gribapi_swig.new_intArray
return _eccode_swig.new_intArray(*args)
new_intArray = _eccode_swig.new_intArray
def delete_intArray(*args):
return _gribapi_swig.delete_intArray(*args)
delete_intArray = _gribapi_swig.delete_intArray
return _eccode_swig.delete_intArray(*args)
delete_intArray = _eccode_swig.delete_intArray
def intArray_getitem(*args):
return _gribapi_swig.intArray_getitem(*args)
intArray_getitem = _gribapi_swig.intArray_getitem
return _eccode_swig.intArray_getitem(*args)
intArray_getitem = _eccode_swig.intArray_getitem
def intArray_setitem(*args):
return _gribapi_swig.intArray_setitem(*args)
intArray_setitem = _gribapi_swig.intArray_setitem
return _eccode_swig.intArray_setitem(*args)
intArray_setitem = _eccode_swig.intArray_setitem
def grib_c_new_from_file(*args):
return _gribapi_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _gribapi_swig.grib_c_new_from_file
return _eccode_swig.grib_c_new_from_file(*args)
grib_c_new_from_file = _eccode_swig.grib_c_new_from_file
def grib_c_new_bufr_from_file(*args):
return _gribapi_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _gribapi_swig.grib_c_new_bufr_from_file
return _eccode_swig.grib_c_new_bufr_from_file(*args)
grib_c_new_bufr_from_file = _eccode_swig.grib_c_new_bufr_from_file
def grib_c_new_gts_from_file(*args):
return _gribapi_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _gribapi_swig.grib_c_new_gts_from_file
return _eccode_swig.grib_c_new_gts_from_file(*args)
grib_c_new_gts_from_file = _eccode_swig.grib_c_new_gts_from_file
def grib_c_iterator_new(*args):
return _gribapi_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _gribapi_swig.grib_c_iterator_new
return _eccode_swig.grib_c_iterator_new(*args)
grib_c_iterator_new = _eccode_swig.grib_c_iterator_new
def grib_c_keys_iterator_new(*args):
return _gribapi_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _gribapi_swig.grib_c_keys_iterator_new
return _eccode_swig.grib_c_keys_iterator_new(*args)
grib_c_keys_iterator_new = _eccode_swig.grib_c_keys_iterator_new
def grib_c_new_from_samples(*args):
return _gribapi_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _gribapi_swig.grib_c_new_from_samples
return _eccode_swig.grib_c_new_from_samples(*args)
grib_c_new_from_samples = _eccode_swig.grib_c_new_from_samples
def grib_c_index_new_from_file(*args):
return _gribapi_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _gribapi_swig.grib_c_index_new_from_file
return _eccode_swig.grib_c_index_new_from_file(*args)
grib_c_index_new_from_file = _eccode_swig.grib_c_index_new_from_file
def grib_c_index_add_file(*args):
return _gribapi_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _gribapi_swig.grib_c_index_add_file
return _eccode_swig.grib_c_index_add_file(*args)
grib_c_index_add_file = _eccode_swig.grib_c_index_add_file
def grib_c_new_from_index(*args):
return _gribapi_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _gribapi_swig.grib_c_new_from_index
return _eccode_swig.grib_c_new_from_index(*args)
grib_c_new_from_index = _eccode_swig.grib_c_new_from_index
def grib_c_index_write(*args):
return _gribapi_swig.grib_c_index_write(*args)
grib_c_index_write = _gribapi_swig.grib_c_index_write
return _eccode_swig.grib_c_index_write(*args)
grib_c_index_write = _eccode_swig.grib_c_index_write
def grib_c_index_read(*args):
return _gribapi_swig.grib_c_index_read(*args)
grib_c_index_read = _gribapi_swig.grib_c_index_read
return _eccode_swig.grib_c_index_read(*args)
grib_c_index_read = _eccode_swig.grib_c_index_read
def grib_c_new_from_message(*args):
return _gribapi_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _gribapi_swig.grib_c_new_from_message
return _eccode_swig.grib_c_new_from_message(*args)
grib_c_new_from_message = _eccode_swig.grib_c_new_from_message
def grib_c_count_in_file(*args):
return _gribapi_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _gribapi_swig.grib_c_count_in_file
return _eccode_swig.grib_c_count_in_file(*args)
grib_c_count_in_file = _eccode_swig.grib_c_count_in_file
def grib_c_release(*args):
return _gribapi_swig.grib_c_release(*args)
grib_c_release = _gribapi_swig.grib_c_release
return _eccode_swig.grib_c_release(*args)
grib_c_release = _eccode_swig.grib_c_release
def grib_c_write(*args):
return _gribapi_swig.grib_c_write(*args)
grib_c_write = _gribapi_swig.grib_c_write
return _eccode_swig.grib_c_write(*args)
grib_c_write = _eccode_swig.grib_c_write
def grib_c_get_size_long(*args):
return _gribapi_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _gribapi_swig.grib_c_get_size_long
return _eccode_swig.grib_c_get_size_long(*args)
grib_c_get_size_long = _eccode_swig.grib_c_get_size_long
def grib_c_get_string_length(*args):
return _gribapi_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _gribapi_swig.grib_c_get_string_length
return _eccode_swig.grib_c_get_string_length(*args)
grib_c_get_string_length = _eccode_swig.grib_c_get_string_length
def grib_c_clone(*args):
return _gribapi_swig.grib_c_clone(*args)
grib_c_clone = _gribapi_swig.grib_c_clone
return _eccode_swig.grib_c_clone(*args)
grib_c_clone = _eccode_swig.grib_c_clone
def grib_c_copy_namespace(*args):
return _gribapi_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _gribapi_swig.grib_c_copy_namespace
return _eccode_swig.grib_c_copy_namespace(*args)
grib_c_copy_namespace = _eccode_swig.grib_c_copy_namespace
def grib_c_get_message_size(*args):
return _gribapi_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _gribapi_swig.grib_c_get_message_size
return _eccode_swig.grib_c_get_message_size(*args)
grib_c_get_message_size = _eccode_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
def grib_c_get_native_type(*args):
return _gribapi_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _gribapi_swig.grib_c_get_native_type
return _eccode_swig.grib_c_get_native_type(*args)
grib_c_get_native_type = _eccode_swig.grib_c_get_native_type
def grib_c_multi_new():
return _gribapi_swig.grib_c_multi_new()
grib_c_multi_new = _gribapi_swig.grib_c_multi_new
return _eccode_swig.grib_c_multi_new()
grib_c_multi_new = _eccode_swig.grib_c_multi_new
def 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
return _eccode_swig.grib_c_multi_support_on()
grib_c_multi_support_on = _eccode_swig.grib_c_multi_support_on
def grib_c_multi_write(*args):
return _gribapi_swig.grib_c_multi_write(*args)
grib_c_multi_write = _gribapi_swig.grib_c_multi_write
return _eccode_swig.grib_c_multi_write(*args)
grib_c_multi_write = _eccode_swig.grib_c_multi_write
def 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
return _eccode_swig.grib_c_multi_support_off()
grib_c_multi_support_off = _eccode_swig.grib_c_multi_support_off
def grib_c_multi_release(*args):
return _gribapi_swig.grib_c_multi_release(*args)
grib_c_multi_release = _gribapi_swig.grib_c_multi_release
return _eccode_swig.grib_c_multi_release(*args)
grib_c_multi_release = _eccode_swig.grib_c_multi_release
def grib_c_multi_append(*args):
return _gribapi_swig.grib_c_multi_append(*args)
grib_c_multi_append = _gribapi_swig.grib_c_multi_append
return _eccode_swig.grib_c_multi_append(*args)
grib_c_multi_append = _eccode_swig.grib_c_multi_append
def 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
return _eccode_swig.grib_c_gribex_mode_on()
grib_c_gribex_mode_on = _eccode_swig.grib_c_gribex_mode_on
def 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
return _eccode_swig.grib_c_gribex_mode_off()
grib_c_gribex_mode_off = _eccode_swig.grib_c_gribex_mode_off
def grib_c_keys_iterator_next(*args):
return _gribapi_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _gribapi_swig.grib_c_keys_iterator_next
return _eccode_swig.grib_c_keys_iterator_next(*args)
grib_c_keys_iterator_next = _eccode_swig.grib_c_keys_iterator_next
def grib_c_keys_iterator_delete(*args):
return _gribapi_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _gribapi_swig.grib_c_keys_iterator_delete
return _eccode_swig.grib_c_keys_iterator_delete(*args)
grib_c_keys_iterator_delete = _eccode_swig.grib_c_keys_iterator_delete
def grib_c_skip_computed(*args):
return _gribapi_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _gribapi_swig.grib_c_skip_computed
return _eccode_swig.grib_c_skip_computed(*args)
grib_c_skip_computed = _eccode_swig.grib_c_skip_computed
def grib_c_skip_coded(*args):
return _gribapi_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _gribapi_swig.grib_c_skip_coded
return _eccode_swig.grib_c_skip_coded(*args)
grib_c_skip_coded = _eccode_swig.grib_c_skip_coded
def grib_c_skip_edition_specific(*args):
return _gribapi_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _gribapi_swig.grib_c_skip_edition_specific
return _eccode_swig.grib_c_skip_edition_specific(*args)
grib_c_skip_edition_specific = _eccode_swig.grib_c_skip_edition_specific
def grib_c_skip_duplicates(*args):
return _gribapi_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _gribapi_swig.grib_c_skip_duplicates
return _eccode_swig.grib_c_skip_duplicates(*args)
grib_c_skip_duplicates = _eccode_swig.grib_c_skip_duplicates
def grib_c_skip_read_only(*args):
return _gribapi_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _gribapi_swig.grib_c_skip_read_only
return _eccode_swig.grib_c_skip_read_only(*args)
grib_c_skip_read_only = _eccode_swig.grib_c_skip_read_only
def grib_c_skip_function(*args):
return _gribapi_swig.grib_c_skip_function(*args)
grib_c_skip_function = _gribapi_swig.grib_c_skip_function
return _eccode_swig.grib_c_skip_function(*args)
grib_c_skip_function = _eccode_swig.grib_c_skip_function
def grib_c_keys_iterator_rewind(*args):
return _gribapi_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _gribapi_swig.grib_c_keys_iterator_rewind
return _eccode_swig.grib_c_keys_iterator_rewind(*args)
grib_c_keys_iterator_rewind = _eccode_swig.grib_c_keys_iterator_rewind
def grib_c_keys_iterator_get_name(*args):
return _gribapi_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _gribapi_swig.grib_c_keys_iterator_get_name
return _eccode_swig.grib_c_keys_iterator_get_name(*args)
grib_c_keys_iterator_get_name = _eccode_swig.grib_c_keys_iterator_get_name
def grib_c_index_get_size_long(*args):
return _gribapi_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _gribapi_swig.grib_c_index_get_size_long
return _eccode_swig.grib_c_index_get_size_long(*args)
grib_c_index_get_size_long = _eccode_swig.grib_c_index_get_size_long
def grib_c_index_get_long(*args):
return _gribapi_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _gribapi_swig.grib_c_index_get_long
return _eccode_swig.grib_c_index_get_long(*args)
grib_c_index_get_long = _eccode_swig.grib_c_index_get_long
def grib_c_index_get_real8(*args):
return _gribapi_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _gribapi_swig.grib_c_index_get_real8
return _eccode_swig.grib_c_index_get_real8(*args)
grib_c_index_get_real8 = _eccode_swig.grib_c_index_get_real8
def grib_c_index_get_string(*args):
return _gribapi_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _gribapi_swig.grib_c_index_get_string
return _eccode_swig.grib_c_index_get_string(*args)
grib_c_index_get_string = _eccode_swig.grib_c_index_get_string
def grib_c_index_select_long(*args):
return _gribapi_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _gribapi_swig.grib_c_index_select_long
return _eccode_swig.grib_c_index_select_long(*args)
grib_c_index_select_long = _eccode_swig.grib_c_index_select_long
def grib_c_index_select_real8(*args):
return _gribapi_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _gribapi_swig.grib_c_index_select_real8
return _eccode_swig.grib_c_index_select_real8(*args)
grib_c_index_select_real8 = _eccode_swig.grib_c_index_select_real8
def grib_c_index_select_string(*args):
return _gribapi_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _gribapi_swig.grib_c_index_select_string
return _eccode_swig.grib_c_index_select_string(*args)
grib_c_index_select_string = _eccode_swig.grib_c_index_select_string
def grib_c_index_release(*args):
return _gribapi_swig.grib_c_index_release(*args)
grib_c_index_release = _gribapi_swig.grib_c_index_release
return _eccode_swig.grib_c_index_release(*args)
grib_c_index_release = _eccode_swig.grib_c_index_release
def grib_c_iterator_delete(*args):
return _gribapi_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _gribapi_swig.grib_c_iterator_delete
return _eccode_swig.grib_c_iterator_delete(*args)
grib_c_iterator_delete = _eccode_swig.grib_c_iterator_delete
def grib_c_iterator_next(*args):
return _gribapi_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _gribapi_swig.grib_c_iterator_next
return _eccode_swig.grib_c_iterator_next(*args)
grib_c_iterator_next = _eccode_swig.grib_c_iterator_next
def grib_c_get_string(*args):
return _gribapi_swig.grib_c_get_string(*args)
grib_c_get_string = _gribapi_swig.grib_c_get_string
return _eccode_swig.grib_c_get_string(*args)
grib_c_get_string = _eccode_swig.grib_c_get_string
def grib_c_set_string(*args):
return _gribapi_swig.grib_c_set_string(*args)
grib_c_set_string = _gribapi_swig.grib_c_set_string
return _eccode_swig.grib_c_set_string(*args)
grib_c_set_string = _eccode_swig.grib_c_set_string
def grib_c_get_long(*args):
return _gribapi_swig.grib_c_get_long(*args)
grib_c_get_long = _gribapi_swig.grib_c_get_long
return _eccode_swig.grib_c_get_long(*args)
grib_c_get_long = _eccode_swig.grib_c_get_long
def grib_c_set_long(*args):
return _gribapi_swig.grib_c_set_long(*args)
grib_c_set_long = _gribapi_swig.grib_c_set_long
return _eccode_swig.grib_c_set_long(*args)
grib_c_set_long = _eccode_swig.grib_c_set_long
def grib_c_get_double(*args):
return _gribapi_swig.grib_c_get_double(*args)
grib_c_get_double = _gribapi_swig.grib_c_get_double
return _eccode_swig.grib_c_get_double(*args)
grib_c_get_double = _eccode_swig.grib_c_get_double
def grib_c_set_double(*args):
return _gribapi_swig.grib_c_set_double(*args)
grib_c_set_double = _gribapi_swig.grib_c_set_double
return _eccode_swig.grib_c_set_double(*args)
grib_c_set_double = _eccode_swig.grib_c_set_double
def grib_c_set_real8_array(*args):
return _gribapi_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _gribapi_swig.grib_c_set_real8_array
return _eccode_swig.grib_c_set_real8_array(*args)
grib_c_set_real8_array = _eccode_swig.grib_c_set_real8_array
def grib_c_get_real8_array(*args):
return _gribapi_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _gribapi_swig.grib_c_get_real8_array
return _eccode_swig.grib_c_get_real8_array(*args)
grib_c_get_real8_array = _eccode_swig.grib_c_get_real8_array
def grib_c_get_long_array(*args):
return _gribapi_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _gribapi_swig.grib_c_get_long_array
return _eccode_swig.grib_c_get_long_array(*args)
grib_c_get_long_array = _eccode_swig.grib_c_get_long_array
def grib_c_set_long_array(*args):
return _gribapi_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _gribapi_swig.grib_c_set_long_array
return _eccode_swig.grib_c_set_long_array(*args)
grib_c_set_long_array = _eccode_swig.grib_c_set_long_array
def grib_c_get_real8_element(*args):
return _gribapi_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _gribapi_swig.grib_c_get_real8_element
return _eccode_swig.grib_c_get_real8_element(*args)
grib_c_get_real8_element = _eccode_swig.grib_c_get_real8_element
def grib_c_get_real8_elements(*args):
return _gribapi_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _gribapi_swig.grib_c_get_real8_elements
return _eccode_swig.grib_c_get_real8_elements(*args)
grib_c_get_real8_elements = _eccode_swig.grib_c_get_real8_elements
def grib_c_set_missing(*args):
return _gribapi_swig.grib_c_set_missing(*args)
grib_c_set_missing = _gribapi_swig.grib_c_set_missing
return _eccode_swig.grib_c_set_missing(*args)
grib_c_set_missing = _eccode_swig.grib_c_set_missing
def grib_c_set_key_vals(*args):
return _gribapi_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _gribapi_swig.grib_c_set_key_vals
return _eccode_swig.grib_c_set_key_vals(*args)
grib_c_set_key_vals = _eccode_swig.grib_c_set_key_vals
def grib_c_is_missing(*args):
return _gribapi_swig.grib_c_is_missing(*args)
grib_c_is_missing = _gribapi_swig.grib_c_is_missing
return _eccode_swig.grib_c_is_missing(*args)
grib_c_is_missing = _eccode_swig.grib_c_is_missing
def grib_c_is_defined(*args):
return _gribapi_swig.grib_c_is_defined(*args)
grib_c_is_defined = _gribapi_swig.grib_c_is_defined
return _eccode_swig.grib_c_is_defined(*args)
grib_c_is_defined = _eccode_swig.grib_c_is_defined
def with_numpy():
return _gribapi_swig.with_numpy()
with_numpy = _gribapi_swig.with_numpy
return _eccode_swig.with_numpy()
with_numpy = _eccode_swig.with_numpy
def grib_set_double_ndarray(*args):
return _gribapi_swig.grib_set_double_ndarray(*args)
grib_set_double_ndarray = _gribapi_swig.grib_set_double_ndarray
return _eccode_swig.grib_set_double_ndarray(*args)
grib_set_double_ndarray = _eccode_swig.grib_set_double_ndarray
def grib_set_long_ndarray(*args):
return _gribapi_swig.grib_set_long_ndarray(*args)
grib_set_long_ndarray = _gribapi_swig.grib_set_long_ndarray
return _eccode_swig.grib_set_long_ndarray(*args)
grib_set_long_ndarray = _eccode_swig.grib_set_long_ndarray
def grib_get_double_ndarray(*args):
return _gribapi_swig.grib_get_double_ndarray(*args)
grib_get_double_ndarray = _gribapi_swig.grib_get_double_ndarray
return _eccode_swig.grib_get_double_ndarray(*args)
grib_get_double_ndarray = _eccode_swig.grib_get_double_ndarray
def grib_get_long_ndarray(*args):
return _gribapi_swig.grib_get_long_ndarray(*args)
grib_get_long_ndarray = _gribapi_swig.grib_get_long_ndarray
return _eccode_swig.grib_get_long_ndarray(*args)
grib_get_long_ndarray = _eccode_swig.grib_get_long_ndarray
def grib_get_double_ndelements(*args):
return _gribapi_swig.grib_get_double_ndelements(*args)
grib_get_double_ndelements = _gribapi_swig.grib_get_double_ndelements
return _eccode_swig.grib_get_double_ndelements(*args)
grib_get_double_ndelements = _eccode_swig.grib_get_double_ndelements
def grib_c_find_nearest_single(*args):
return _gribapi_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _gribapi_swig.grib_c_find_nearest_single
return _eccode_swig.grib_c_find_nearest_single(*args)
grib_c_find_nearest_single = _eccode_swig.grib_c_find_nearest_single
def grib_c_find_nearest_four_single(*args):
return _gribapi_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _gribapi_swig.grib_c_find_nearest_four_single
return _eccode_swig.grib_c_find_nearest_four_single(*args)
grib_c_find_nearest_four_single = _eccode_swig.grib_c_find_nearest_four_single
def grib_c_get_message(*args):
return _gribapi_swig.grib_c_get_message(*args)
grib_c_get_message = _gribapi_swig.grib_c_get_message
return _eccode_swig.grib_c_get_message(*args)
grib_c_get_message = _eccode_swig.grib_c_get_message
def grib_c_get_error_string(*args):
return _gribapi_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _gribapi_swig.grib_c_get_error_string
return _eccode_swig.grib_c_get_error_string(*args)
grib_c_get_error_string = _eccode_swig.grib_c_get_error_string
def no_fail_on_wrong_length(*args):
return _gribapi_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _gribapi_swig.no_fail_on_wrong_length
return _eccode_swig.no_fail_on_wrong_length(*args)
no_fail_on_wrong_length = _eccode_swig.no_fail_on_wrong_length
def 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
return _eccode_swig.grib_c_get_api_version()
grib_c_get_api_version = _eccode_swig.grib_c_get_api_version
def 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
return _eccode_swig.grib_c_gts_header_on()
grib_c_gts_header_on = _eccode_swig.grib_c_gts_header_on
def 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
return _eccode_swig.grib_c_gts_header_off()
grib_c_gts_header_off = _eccode_swig.grib_c_gts_header_off

Some files were not shown because too many files have changed in this diff Show More